Verification #20 · 2026-10-13 · Object comparison · Easy · about 10 min

The scoreboard that fails a perfect DUT

The DUT forwards packets in order and must not change them. The testbench has a monitor on each side, and each monitor builds a packet object for what it sees:

  • expect_pkt(p) is called by the input monitor for each packet going in.
  • got(p) is called by the output monitor for each packet coming out.

The scoreboard in scoreboard.sv should count, in errors, exactly one error for each packet that comes out different from the one that went in: a different addr, a different write, or a payload that differs in any byte or in length. A packet that comes through unchanged is not an error.

The current scoreboard reports an error for every packet, even when the DUT is perfect. Fix scoreboard.sv.

Write and run your answer in the browser. The hidden tests check it, and it’s free.