A Scoreboard's primary role is to compare the expected behavior of the DUT, as generated by the testbench's reference model or golden model, with the actual responses produced by the DUT. The scoreboard acts as an arbiter between the monitor and the reference model, ensuring that the DUT's behavior aligns with the expected behavior. In majority of cases, it is only used for data comparison and not behavioural comparison.
// Filename : basic_scoreboard.sv class basic_scoreboard extends uvm_scoreboard; `uvm_component_utils(basic_scoreboard) basic_config cfg; extern function new(string name, uvm_component parent); extern virtual function void build_phase(uvm_phase phase); extern virtual function void connect_phase(uvm_phase phase); extern virtual task main_phase(uvm_phase phase); extern virtual function void extract_phase(uvm_phase phase); extern virtual function void check_phase(uvm_phase phase); extern virtual function void report_phase(uvm_phase phase); extern virtual function void final_phase(uvm_phase phase); endclass: basic_scoreboard //------------------------------------------------------------------// function basic_scoreboard::new(string name, uvm_component parent); super.new(name, parent); endfunction: new //------------------------------------------------------------------// function void basic_scoreboard::build_phase(uvm_phase phase); super.build_phase(phase); endfunction: build_phase //------------------------------------------------------------------// function void basic_scoreboard::connect_phase(uvm_phase phase); super.connect_phase(phase); endfunction: connect_phase //------------------------------------------------------------------// task basic_scoreboard::main_phase(uvm_phase phase); super.main_phase(phase); endtask: main_phase //------------------------------------------------------------------// function void basic_scoreboard::extract_phase(uvm_phase phase); super.extract_phase(phase); endfunction: extract_phase //------------------------------------------------------------------// function void basic_scoreboard::check_phase(uvm_phase phase); super.check_phase(phase); endfunction: check_phase //------------------------------------------------------------------// function void basic_scoreboard::report_phase(uvm_phase phase); super.report_phase(phase); endfunction: report_phase //------------------------------------------------------------------// function void basic_scoreboard::final_phase(uvm_phase phase); super.final_phase(phase); endfunction: final_phase