In this phase we will see the scoreboard implementation.
Scoreboard has 2 mailboxes. One is used to for getting the packets from the driver and other from the receiver. Then the packets are compared and if they don't match, then error is asserted.
Scoreboard in implemented in file Scoreboard.sv.
1) Declare 2 mailboxes drvr2sb and rcvr2sb.
2) Declare a constructor method with "drvr2sb" and "rcvr2sb" mailboxes as arguments.
function new(mailbox drvr2sb,mailbox rcvr2sb);
3) Connect the mailboxes of the constructor to the mail boxes of the scoreboard.
this.drvr2sb = drvr2sb;
this.rcvr2sb = rcvr2sb;
4) Define a start method.
Do the following steps forever.
Wait until there is a packet is in "rcvr2sb". Then pop the packet from the mail box.
$display(" %0d : Scorebooard : Scoreboard received a packet from receiver ",$time);
Then pop the packet from drvr2sb.
Compare both packets and increment an error counter if they are not equal.