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. http://verificationhorizons.verificationacademy.com/volume-7_issue-2/articles/stream/are-ovm-and-uvm-macros-evil-a-cost-benefit-analysis_vh-v7-i2.pdf

In reply to dave_59:

Thank you Dave. This really helps.