Jump to content

How to create custom report severity


Recommended Posts

What is best way to override default uvm severity types (UVM_INFO, UVM_ERROR, UVM_WARNING, UVM_FATAL) with custom report severity types. For example, instead of displaying :

 

UVM_INFO @ 0: reporter [RNTST] Running test test_read_modify_write...
UVM_INFO test_lib.sv(55) @ 0: uvm_test_top [test_read_modify_write] Printing the test topology :

 

I would like to display something like:

MY_INFO @ 0: reporter [RNTST] Running test test_read_modify_write...
MY_INFO test_lib.sv(55) @ 0: uvm_test_top [test_read_modify_write] Printing the test topology :

Link to comment
Share on other sites

The best way: your favorite awk/sed/perl script.

 

No really, why do you want to do this? Adding any kind of report catcher will just slow the system down.

 

One example...If you are selling verification IP, it would be nice to be able to distinguish your debug messages from a sea of UVM_INFO messages in the customer's environment.

Link to comment
Share on other sites

an alternative is to override the uvm_report_server::report/compose_message/process_report and have them messages from your components formatted or colorized differently. also you could install component local report_handlers for your objects with a derived uvm_report_handler::report() functionality. they could prefix ID, MSG, etc.

 

technically the definition of the uvm_severity cannot be changed other than by changing the uvm source itself

 

(you can also cheat and do the following. it works because uvm_severity is an int and not the enum. this might change in the future. the final thing not shown here is to replace uvm_report_server::compose_message and translate the int back to the literal you want  ...)

 

module test282;
        import uvm_pkg::*;
 
const int MY_SEVERITY=4;
 
        initial begin
           uvm_top.set_report_severity_action_hier(MY_SEVERITY,UVM_DISPLAY|UVM_COUNT);
 
           uvm_report(MY_SEVERITY,"ID","MSG",UVM_NONE,`__FILE__,`__LINE__);
 
        end
endmodule
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...