Verification #15 · 2026-10-08 · Reference models · Medium · about 15 min
The scoreboard that never stalls
add_pipe is a two-stage pipelined adder with a stall input. At a rising edge with en = 1, both stages move: if in_valid is 1 it accepts a and b, and two enabled edges later out_valid is 1 with sum = a + b. With en = 0 nothing moves and the outputs hold. rst_n = 0 empties the pipeline.
scoreboard in scoreboard.sv watches the same signals and predicts each result:
- A result is delivered at every rising edge where
rst_n,enandout_validare all 1. Each one is counted once inchecked. - If the delivered
sumisn't the sum of theaandbthat produced it, it is also counted inerrors.
The DUT is correct, but when a test stalls the pipeline the scoreboard reports mismatches. Fix scoreboard.sv.
Write and run your answer in the browser. The hidden tests check it, and it’s free.