Set_report_severity_id_override not working

Hi,
I am trying to demote UVM_WARNING to UVM_INFO for one of my test cases using set_report_severity_id_override, but it is not working.
In the build phase of the test case, I have added the following lines:

virtual function void build_phase(uvm_phase phase);
super.build_phase(phase);
seq_handle = seq_base::type_id::create(“seq_handle”);
uvm_top.set_report_severity_id_override(UVM_WARNING, “m_driver”, UVM_INFO);
endfunction : build_phase

Would you please help me to fix this issue

In reply to Sivajim:

This is the wrong pahse where you are doing this. Instead of the build_phase use the end_of_elaboration_phase or the start_of_simulation_phase.

In reply to chr_sue:
Which phase you do this in is only part of the problem. Classes derived from uvm_component are also derived from uvm_report_object. That means they can have independent set_report_ settings. So you have to apply the setting to the specific component object. You can do this from your test either using a handle the component:

m_env.m_agent.m_driver.set_report_...(...);

or you can apply it to the entire component hierarchy (from the component where the function gets called)

set_report_..._hier(...);

In both cases, these function call must be made after constructing the component you want to target. That will be any phase after the build_phase.

Hi,
Thanks …it’s working