Verification #29 · 2026-10-22 · FIFO models · Medium · about 15 min

The scoreboard that believes a FIFO is bottomless

fifo4 is a 4-deep FIFO of bytes. At a rising edge with rst_n = 1:

  • A push is accepted if the FIFO isn't full, and ignored if it is.
  • A pop is accepted if the FIFO isn't empty, and ignored if it is. dout shows the oldest byte, and that's the byte a popped edge delivers.
  • Full and empty are judged before the edge, so a push and a pop together on an empty FIFO accept only the push, and on a full FIFO accept only the pop.
  • rst_n = 0 empties the FIFO.

scoreboard in scoreboard.sv keeps a queue and checks every delivered byte. Each one is counted once in checked, and also in errors if dout isn't the byte it should be.

The DUT is correct, but the scoreboard reports mismatches and counts bytes that were never delivered. Fix scoreboard.sv.

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