Change verbosity on MISCMP uvm_object messages

Hi,
I’m trying to figure out a good way to get rid of the following messages in my log:

UVM_INFO @ 100: reporter [MISCMP] 11 Miscompare(s) (1 shown) for object blahA vs. blahB

They show up for a UVM_LOW verbosity and are printed from the compare function of the uvm_object class. It appears that the uvm_comparer has a verbosity of UVM_LOW by default. I also have little control over the child compare function that calls the parent since it’s part of our verification IP and I’d rather not mess with it. What’s a good way to change the verbosity on these messages?

I’ve seen posts complaining about this issue but no real solutions…
Thanks,
Bilal

In reply to bmaassar:

You can use set_report_verbosity_level_hier. This sets the verbosity for this component and all components below.

See here ‘function void set_report_verbosity_level_hier (int verbosity)’.

In reply to bmaassar:

Other than using simple set_report_verbosity, one can also extend the report catcher class and override “catch” function. This approach is similar to the approach used for demoting uvm_error to uvm_info.

Sample is available here.

In reply to sharvil111:
In reply to chr_sue:

Thank you for your replies. I think I should provide a bit more detail:
I have a scoreboard in which I compare transfers which have a class type that is extended from the uvm_sequence_item. When the transfer class’s compare function (which I don’t want to modify) is called in the sb, the parent functions in the hierarchy are called as a result all the way up to uvm_object. The compare function in the uvm_object is what’s printing the annoying [MISCMP] messages.
Therefore, and please correct me if I’m wrong, I don’t think I can use set_report_verbosity_level_hier, set_report_verbosity or the report catcher class because they all seem to be outside the uvm_void/uvm_object/uvm_transaction/uvm_sequence_item/uvm_sequence class chain of hierarchy. I couldn’t find similar functions in that chain of classes.

I tried the catch function override anyway and I still get the messages:


//class override
class miscmp_error_demoter extends uvm_report_catcher;

  function new(string name="miscmp_error_demoter");
    super.new(name);
  endfunction

  function action_e catch();
    if(get_id() == "MISCMP")
      set_verbosity(UVM_HIGH);
    return THROW;
  endfunction

endclass

// In tb_top.sv,
...
  miscmp_error_demoter  demoter;

  initial begin

    demoter = new();

    uvm_report_cb::add( null, demoter);
...

In reply to bmaassar:

The MISCMP is report info, so we can not demote it as a simple demotion. We can still implement catcher/demoter and work according to verbosity. The following works for me.


  class my_data extends uvm_sequence_item;
    int data;
    `uvm_object_utils(my_data)
    function new(string name="");
      super.new(name);
    endfunction
  endclass
  
  class demoter extends uvm_report_catcher;
    `uvm_object_utils(demoter)
    function new(string name="miscmp_error_demoter");
      super.new(name);
    endfunction
 
    function action_e catch();
      if(get_id() == "MISCMP") begin
        return (get_verbosity() <= UVM_HIGH) ? (CAUGHT) : (THROW); 
      end
      return THROW;
    endfunction
    
  endclass
  
  class base_test extends uvm_test;
   `uvm_component_utils (base_test)
 
   my_data obj0, obj1;
   demoter d;
 
   function new (string name = "base_test", uvm_component parent);
      super.new (name, parent);
   endfunction
 
   virtual function void build_phase (uvm_phase phase);
      super.build_phase (phase);
      obj0 = my_data::type_id::create ("obj0");
      obj1 = my_data::type_id::create ("obj1");
      d = new("d");
      uvm_report_cb::add(null, d); 
            
      `uvm_info ("COMPARE", "Trying out compare_field", UVM_MEDIUM)
      obj0.data = 5;       
      obj1.data = 6;
      obj1.compare (obj0);
   endfunction
 
endclass

There was a similar thread and Mantis entry for the same.

In reply to sharvil111:

Thanks, your sample code helped me get something working. I did some reading on what the uvm_report_catcher is and I understand better why this works :)