拓十年匠心定制 · 商业建站与技术教学双线并行 咨询热线:400-886-1026 service@lmnt.cn
ARTICLE DETAIL

资讯详情

深耕网站建设与运营推广的一线实战洞察。

UVM report 消息打印

UVM report 消息打印

UVM_VERBOSITY

set

  1. test 中设置:set_report_verbosity_level(UVM_HIGH);
  2. 命令行设置:simv +UVM_VERBOSITY=UVM_LOW

get

我们可以在test/seq中拿到设置的uvm info 打印的冗余度:

en_debug_print=this.get_report_verbosity_level()==UVM_DEBUG;

uvm_report_catcher

其本质上是一个UVM report中的Callback Hook, 当我们有些特殊的case 比如error injected case希望某些ERROR不打印或者打印成INFO,就可以override catch() function,让某些log在被打印之前对 severity、id、message、action 做任意修改,甚至直接不打印。

classaxi_timeout_demoterextends uvm_report_catcher;intcatcher_error_to_warning_num;virtualfunction action_ecatch();// get_message() will return full string of message, just 2nd parameter of uvm_info/uvm_error/uvm_fatal/uvm_warning//if(get_severity()==UVM_ERROR&&get_id()=="AXI_TIMEOUT")beginset_severity(UVM_WARNING);// override this uvm_info print severitycatcher_error_to_warning_num++;// return CAUGHT; // terminate message print, will not print this message// return THROW; // continue uvm report process// set_message() // override the uvm report string print (2nd parameter of uvm_info...)// set_id() // override the message id (1st parameter of uvm_info...)endreturnTHROW;endfunction endclass// test_vseqaxi_timeout_demoter catcher;catcher=new();uvm_report_cb::add(m_axi_model_h,catcher);// registreation, if set null for the 1st parameter means the **Global Scope**num=catcher.catcher_error_to_warning_num;// we can use the user defined var
返回列表