and much more_primer ch19 reporting


Initially used

$display $error $fatal does printing, there is no control;

uvm print

`uvm_info(<Message ID string>,<msg string>,<verbosity>)
`uvm_warning(<Message ID string>,<msg string>)
`uvm_error(<Message ID string>,<msg string>)
`uvm_fatal(<Message ID string>,<msg string>)

There can be multiple ways to set UVM_VERBOSITY

vsim top_optim -coverage + UVM_NAME = random_test + UVM_VERBOSITY = UVM_HIGH

class env extends uvm_env;

   `uvm_component_utils(env);
...
 function void end_of_elaboration_phase(uvm_phase phase);
     scoreboard_h.set_report_severity_action_hier(UVM_ERROR, UVM_NO_ACTION);
 endfunction : end_of_elaboration_phase
...
endclass

_hier represents this object and all the contents contained in
it. You can also use
set_report_severity_action(UVM_HIGH);

UVM_NO_ACTION is used to control warning /error/fatal

and much more_report_info

What is the relationship between uvm_report_info and uvm_info? ?

uvm_report_info(get_type_name(),$psprintf("rq_attr = %0h",rq_attr));
REPORT_TAG = $sformatf("RST_AGENT_DRV[%0s]",cfg.id);

uvm_report_fatal(REPORT_TAG,"Unsupported cmd_type in sequence item");
uvm_report_fatal(REPORT_TAG, {
    
    "rst_agent_cfg must be set for: ", get_full_name(), ".cfg"});

if (cfg.use_rst_in) begin
    uvm_report_error(REPORT_TAG,$sformatf(
      "Reset %s is configured to use rst_in as its control, so it should not receive a sequence item, but one was just sent. Ignoring sequence item.\n",cfg.id));

Guess you like

Origin blog.csdn.net/weixin_39060517/article/details/113094635