Set_report_severity_if_override usage

HI,

I have the following code in on of my components

   `uvm_error(get_name(), $sformatf("channel up status"));

From the test I am trying to demote it

function void end_of_elaboration_phase(uvm_phase phase);
    if($test$plusargs("DEMOTE"))
    begin
      env.m_env.m_agent_1[0].set_report_severity_id_override(UVM_ERROR,"m_receiver",UVM_WARNING);
    end

  endfunction : end_of_elaboration_phase

But I do not see the ERROR being demote. Am I missing anything? I have tried not give hierarchial path. I have referred to other posts on this topic as well but i am unable to fix this problem

The component is a parametrized class and it extends from another class. Parent class has the error message. Child class is the one i am demoting in the test. NOt sure if that the problem

In reply to CRVAddict:

Look at the message printed by `uvm_error. You are using get_name() as the message ID. Make sure the ID names match.

In reply to dave_59:

# UVM_ERROR 464677.800ns: uvm_test_top.env.m_env.m_agent_1[0].m_receiver [**m_receiver**] channel up status 0

Yes, I use get_name and it returns “m_receiver” so i think ID’s match.

In reply to CRVAddict:

You are setting the override in the agent, not the m_reciever component. You want it 1 level down.

      env.m_env.m_agent_1[0].m_reciever.set_report_severity_id_override(UVM_ERROR,"m_receiver",UVM_WARNING);

In reply to CRVAddict:

Great works now!