Comparison method in scoreboard has more method than the method in class uvm_component

Hello All,

I am verifying very simple dut with the UVM-1.1d. in Questasim-10.2c. Does anyone have faces this issue before as given below:

Error: scoreboard.sv(22): Virtual method 'check' has more arguments than the method in class 'uvm_component' or a return type mismatch

The line 22 contains the method that is called from scoreboard subscriber. Can someone point to something that can solved this error.

The scoreboard subscriber looks like:

class sb_subscriber extends uvm_subscriber#(transaction);
  `uvm_component_utils(sb_subscriber)
  
  function new(string name, uvm_component parent);
      super.new(name, parent);
   endfunction
   
  function void write(transaction t);
     scoreboard scbd;
     $cast(scbd, m_parent);
     scbd.check(t);
      
   endfunction
  
   endclass

Please guide and suggest…

Regards
Sunil S.

In reply to sunils:

You should show the prototype of your function check. uvm_component does not have a check method.

Hello Sir,

The code for scoreboard_subscriber is given below:

class sb_subscriber extends uvm_subscriber#(transaction);
  `uvm_component_utils(sb_subscriber)
  
  function new(string name, uvm_component parent);
      super.new(name, parent);
   endfunction
   
  function void write(transaction t);
     scoreboard scbd;
     $cast(scbd, m_parent);
     scbd.check(t);
      
   endfunction
  
   endclass

And the code for scoreboard.sv file is given below:

class scoreboard extends uvm_scoreboard;
  `uvm_component_utils(scoreboard)
  
  uvm_analysis_export#(transaction)sbd_ae;
  sb_subscriber sbd_subs;
  
  function new(string name, uvm_component parent);
      super.new(name, parent);
   endfunction: new
   
   function void build_phase(uvm_phase phase);
      super.build_phase(phase);
      sbd_ae = new("sbd_ae",this);
      sbd_subs = sb_subscriber::type_id::create("sbd_subs", this);
   endfunction
   
   function void connect_phase(uvm_phase phase);
      super.connect_phase(phase);
      sbd_ae.connect(sbd_subs.analysis_export);
   endfunction
   
virtual function void check(transaction t);
uvm_table_printer p = new;
   `uvm_info("jelly_bean_scoreboard", { "You have a good sense of taste.\n", t.sprint(p) }, UVM_LOW);
endfunction

endclass

And the error is given below:

# ** Error: scoreboard.sv(22): Virtual method 'check' has more arguments than the method in class 'uvm_component' or a return type mismatch

Kindly suggest and guide.

Thanks and Regards
Sunil S.

In reply to sunils:

The uvm_component class has an existing check() function. This function is the same as the check_phase() function. It is meant to be called after the run_phase() and not meant to be used as you are attempting to do. You should rename your check() function.

In reply to cgales:

Hello Cgales,

It is working after renaming the check function. Thanks a lot.

Regards
Sunil S.