Verification #6 · 2026-09-29 · Scoreboards · Medium · about 15 min

A scoreboard for out-of-order responses

The DUT accepts read requests tagged with an id (0 to 15) and answers each one exactly once, but not in order: a later request may be answered first. An id is only reused after its response has come back.

The testbench's monitors call the scoreboard in scoreboard.sv:

  • expect_rsp(id, data) when a request goes in, with the data a correct DUT will return.
  • got(id, data) when a response comes out.
  • final_check() once, at the end of the test.

The current scoreboard assumes responses come back in order, so it reports errors against a perfectly good DUT and misses real bugs. Rewrite it so that it counts, in errors, exactly one error for each:

  • response whose data doesn't match its request,
  • response with an id that has no request waiting for it,
  • request that still has no response at final_check().

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