Hello,
can someone help me to implement scoreboard logic
DUT which taken input address in order A1,B1,C1 and output address in any order ex B1,C1,A1 (out of order)
Thanks
Hello,
can someone help me to implement scoreboard logic
DUT which taken input address in order A1,B1,C1 and output address in any order ex B1,C1,A1 (out of order)
Thanks
In reply to dddvlsique:
I would implement something on the below lines.
I have a simple systemverilog code below (you can easily convert the below to UVM).
class my_scoreboard;
int address_aa [int];
function void write_inputmonitor(int A_input);
address_aa[A_input] = 1;
$display("address_da = %p", address_aa);
endfunction
function void write_outputmonitor(int A_output);
if(address_aa.exists(A_output)) begin
$display("Found address %0d", A_output);
address_aa.delete(A_output);
end else
$error("Output address %0d not part of input", A_output);
endfunction
function void check_timeout();
if(address_aa.size()==0) $display("Pass");
else $error("Some addresses haven't been output yet.");
endfunction
endclass
module test;
my_scoreboard sb = new();
initial begin
//Inputs
#10; sb.write_inputmonitor(10);
#10; sb.write_inputmonitor(20);
#10; sb.write_inputmonitor(30);
//Outputs
#10; sb.write_outputmonitor(20);
#10; sb.write_outputmonitor(30);
#10; sb.write_outputmonitor(10);
//Timeout
#50; sb.check_timeout();
end
endmodule