Get_verbosity to control displays

HI,

There are some displays ($display,$write) which will print some kind of table format.
I need to control those displays.Also i need to add delays.

If i run with UVM_NONE , those displays should not be executed.

I need to use something like this

if(get_verbosity == UVM_NONE) begin
  //DO nothing
end else begin
  $display("TABLE")
end

I am getting compilation error,
“get_verbosity not found”

Please help

In reply to naaj_ila:

You should never be using $display in an UVM testbench. But, assuming this code is inside a UVM class, did you mean to use get**report**verbosity_level()?

Outside of UVM class use uvm_pkg::uvm_report_enabled

In reply to dave_59:

Hi Dave,
I am using $display to print some kind of table like this
------------------------------------------- TABLE -----------
|MNRW= 0|| Se_ 1 || Se_ 2 || Se_ 3 || Se_ 4 || Se_ 5 |

Don 0 |XXDIRXX||XXDIRXX||XXDIRXX|| NON || NON ||XXDIRXX|
Don 1 | NON || NON || NON || NON || NON || NON |
Don 2 | NON || NON || NON || NON || NON || NON |
Don 3 |XXDIRXX|| NON ||XXDIRXX||XXDIRXX||XXDIRXX||XXDIRXX|
Don_PRR_P | NON || NON || NON || NON || NON || NON |

that’s why i am using $write and $displays.

Yes, i mean to use get_report_verbosity_level()

Thanks

In reply to naaj_ila:

Suggest that you do

if (uvm_report_enabled(UVM_LOW,UVM_INFO,"myID")) begin
   string message;
   // use $sformatf and $swrite to build up your message
   uvm_report_info("myID", message, UVM_LOW);
end

Then you have full control of your table just like any other `uvm_info statement.