拓冰建站拓冰建站
首页 / 资讯中心 / 正文

UVM report 消息打印

UVM_VERBOSITYsettest 中设置set_report_verbosity_level(UVM_HIGH);命令行设置simv UVM_VERBOSITYUVM_LOWget我们可以在test/seq中拿到设置的uvm info 打印的冗余度en_debug_printthis.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_ERRORget_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;catchernew();uvm_report_cb::add(m_axi_model_h,catcher);// registreation, if set null for the 1st parameter means the **Global Scope**numcatcher.catcher_error_to_warning_num;// we can use the user defined var
分享:

看完干货,该让你的企业上线了

免费需求沟通 · 48 小时内出具建站方案 · 河南本地可上门