21 / 24 · Concept
Combine a scoreboard with local invariants
Check values, ordering, occupancy, and stall stability from accepted transactions.
Lessons are free to read. Enroll to save your learning progress.
Anchor verification to input acceptance
A scoreboard calculates an expected result from each accepted input and queues it. On output delivery, compare the oldest expected item. Calculating directly from the contract rather than mirroring every pipeline register reduces shared mistakes. Add entries only on an input handshake; a presented but rejected input is not outstanding work.
For accepted ADD inputs tag10:(250,10) and tag11:(3,5), expect [(10,4,carry1),(11,8,carry0)]. A valid but stalled output does not remove an entry. Delivering tag10 removes only that entry. A repeated tag10 or value 8 tagged as 12 is incorrect even if some numbers match. Include all relevant flags and companion fields.
| Check | Example failures |
|---|---|
| Output against reference queue | Arithmetic, ordering, wrong tags |
| Accepted-delivered=occupancy | Loss, duplication, fake delivery |
| Stable stalled payload | Overwrite before acceptance |
| Occupancy within bounds | FIFO overflow or underflow |
| Empty reference queue after drain | Missing final result |
Local invariants identify the first failing edge instead of only a final mismatch. Internal occupancy is FIFO count plus stage-valid bits. Add cancellation accounting when reset or flush is allowed, and use the same edge policy in both monitors.
Combine numeric boundaries with timing cases: zero, maximum values, carry and borrow, consecutive traffic, bubbles, long stalls, full replacement, and final drain. Record random seeds for repeatable failures. Exhaust small control spaces where practical.
Completion checks need a progress assumption and a timeout. Once the sink becomes permanently ready, outstanding work should drain. Under indefinite stalls, require preservation and bounded occupancy instead. Deliberately corrupting carry or tag delay should make checks fail; this mutation test measures sensitivity. Passing Node models does not validate HDL wiring, X/Z behavior, clock-domain crossing, or implementation timing. Report only the execution scope actually observed.
Try it yourself
Accepted=9 and delivered=5. FIFO count is two and both stages are valid. Is accounting consistent? If another input is accepted without delivery and occupancy stays four, what likely happened?
Read the explanation
Accounting matches: 9-5=2+1+1=4. After another acceptance without delivery, the difference becomes five. Occupancy four suggests admission without capacity or an overwritten item. Inspect readiness at the first failing edge.