How to override field macros of a transaction from sequence or test

Hi. In my use case I’m not using certain fields of a transaction. However they get randomized and printed in the log when I use txn.sprint(). I wanted to avoid this print by suppressing these fields with OVM_NOPRINT.

Pls help me with suggestions.

Thanks in advance.

You can’t other than by overriding the do_print() method and selecting the fields you want printed.

We strongly recommend against using the `ovm_field_ macros for this reason as well as the extremely poor performance impact they have on your entire simulation.

In reply to dave_59:

Thank you Dave. This really helps.