Verification #43 · 2026-11-05 · Scoreboards · Easy · about 10 min

A scoreboard that never notices missing data

scoreboard checks a DUT whose outputs come out in order. The reference model calls expect_item for each predicted item, the monitor calls actual_item for each item that comes out, and the test calls finish() once at the end. error_count() must then be the number of things that went wrong:

  • an output whose value differs from the one predicted for that position,
  • an output when nothing was predicted,
  • a predicted item that never came out.

Each problem counts once. Run feeds the scoreboard three scenarios: a clean one, one where the DUT loses its last item, and one where it produces one item too many. Fix sb.sv.

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