Hi,
Recently we come across some thoughts…
How can we regulate obj.print() calls?
Basically, obj.print should print ONLY when we set verbosity UVM_DEBUG/UVM_FULL for the simulation.
Not for UVM_HIGH or below.
Kindly suggest some good idea to implement the same.
John
The way I do it is:
if (uvm_report_enabled(UVM_HIGH))
some_obj.print();
The `uvm_info macro expands to similar code (same if).
In reply to Tudor Timi:
Thanks Tudor.
But some reason, some cases didn’t work…!?!
if (uvm_report_enabled(UVM_HIGH))
obj.print();
For example,
If I set uvm_verbosity from command line as below works. (prints my object)
+UVM_VERBOSITY=UVM_HIGH
If I set uvm_verbosity from command line as below doesn’t works. (did not print my object)
+UVM_VERBOSITY=UVM_MEDIUM +UVM_SET_VERBOSITY=uvm_test_top.tb.env.*,_ALL_,UVM_HIGH,time,0
if I give as below, all verbosity levels set to UVM_MEDIUM.
+UVM_SET_VERBOSITY=uvm_test_top.tb.env.*,_ALL_,UVM_HIGH,time,0 +UVM_VERBOSITY=UVM_MEDIUM
John