Change verbosity on MISCMP uvm_object messages

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.