Last active
August 7, 2023 03:43
-
-
Save dvtalk/1aabedf6c6e79fad258dfece0aa073c9 to your computer and use it in GitHub Desktop.
Change the uvm report severity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+uvm_set_severity=uvm_test_top.env0.*,ALL,UVM_ERROR,UVM_WARNING | |
set_report_severity_id_verbosity_hier() in the test after the build_phase is complete. | |
// demote uvm error to warning | |
class uvm_reg_error_demoter extends uvm_report_catcher; | |
function new(string name="uvm_reg_error_demoter"); | |
super.new(name); | |
endfunction | |
function action_e catch(); | |
if(get_severity() == UVM_ERROR && get_id() == "RegModel" && !uvm_re_match(".*because it overlaps with.*", get_message()) ) begin | |
set_severity(UVM_WARNING); | |
end | |
return THROW; | |
endfunction | |
endclass | |
protected uvm_reg_error_demoter m_demoter = new(); | |
uvm_report_cb::add(null, m_demoter); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment