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
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.