0
votes

In UVM, there are pre-defined verbosity levels:

  • UVM_DEBUG
  • UVM_FULL
  • UVM_HIGH
  • UVM_MEDIUM
  • UVM_LOW
  • UVM_NONE

Actual reporting can be controlled using command line argument, e.g. +UVM_VERBOSITY=UVM_LOW

(1) Is there a way to have user-defined verbosity levels (or at least aliases)?

  • Like e.g. "UVM_INFO" with same priority as UVM_NONE

(2) Is it possible to create completely user-defined verbosity level, with different priority ?

  • Say something between UVM_NONE and UVM_LOW

  • And, how to control such thing from CLI ??

Reason for this is that even with UVM_LOW some commercial VIP is still rather verbose. If possible, I would like to have a "level of my own" for some testbench elements...

1

1 Answers

0
votes

I have an idea for uvm-1.2 version so I can tell in that context. Yes, you can set the custom verbosity. You can create an object of uvm_report_object and call the set_report_verbosity_level to set the verbosity of your choice. For example a small testcase would look like -

module top;
     import uvm_pkg::*;
     uvm_report_object rep_obj;
     initial begin;
         rep_obj = new("");
         rep_obj.set_report_verbosity_level(350);
         rep_obj.uvm_report_info("", "", 350);
     end
endmodule

"set_report_verbosity_level" will set the verbosity_level of uvm_report_handler class to 350 for that particular uvm_report_object. "set_report_info" is now being called with verbosity of 350 which otherwise takes UVM_MEDIUM as the default verbosity. In this example you don't have to add any additional command with the run commandline.

If you want to use the custom verbosity to use to prinout out new error messages, in that case you will have to create a class derived from uvm_report_object and create your own function definition for that custom message (For ex:- uvm_custom_report_info). If you see the definitions of uvm_report_info/uvm_report_warning in your uvm_report_object class, it will give you the idea.

I hope this answers your question to some extent.