I’m changing the uvm_severity of an specific message id from UVM_ERROR to UVM_INFO but at the end of the simulation the tests still fails because the severity is being changed but the error count is still being incremented.
What do I need to do to stop counting errors of messages that have their severity changed?
This is the code I’ve implemented:
class top_report_catcher extends uvm_report_catcher;
uvm_severity id_severity[string];
uvm_action id_action[string];
`uvm_object_utils(top_report_catcher)
function new(string name="top_report_catcher");
endfunction
virtual function void add_change(uvm_severity severity="UVM_INFO", string message_id);
id_severity[message_id] = severity;
id_action[message_id] = UVM_NO_ACTION;
endfunction
virtual function action_e catch();
string message_id = get_id();
if (id_severity.exists(message_id)) begin
set_severity(id_severity[message_id]);
set_action(id_action[message_id]);
end
end
return THROW;
endfunction
endclass