UVM & SystemVerilog · Debug & CoverageWhy the first scoreboard comparison fails after reset
Imagine a block that doubles its input. Packet A carries 0x12, so the predictor queues 0x24. Reset arrives before A produces an output. According to this block’s specification, reset cancels A.
After recovery, packet B carries 0x35. The DUT returns 0x6A, exactly as expected. Yet the scoreboard reports expected 0x24, actual 0x6A. Before tracing the multiplier, ask where the scoreboard got 0x24. It belongs to A.
Log four events with packet IDs and timestamps: input acceptance, prediction, reset assertion and output observation. Follow A’s prediction to wherever it lived when reset arrived. A common surprise is an empty expected FIFO. A comparison thread may already have retrieved A and be holding it locally while it waits for an actual output. Flushing the FIFO leaves that local handle intact.
Test the repair at two distinct moments. First, assert reset while A is still queued. Then assert it after the worker retrieves A. In both runs, B should match exactly once. Also inject an unexpected late output for A and confirm that the checker flags it. That last check catches a tempting workaround: suppressing the first mismatch after every reset.