This capstone verifies a parameterized synchronous FIFO end to end. Planning, stimulus, checking, assertions, coverage and closure each appear once, in one environment.
This is the finale of the PacketFIFO project. PacketFIFO v0 is the same kind of design: a valid/ready FIFO whose in_ready is low exactly when it is full and whose out_valid is low exactly when it is empty. It stores 9-bit entries, a last bit next to each byte, in 4 slots.
The capstone FIFO is the parameterized form of that design. WIDTH and DEPTH are parameters (default 8 and 16) and it adds explicit full and empty pins. Set WIDTH to 9 and DEPTH to 4 and it holds PacketFIFO's storage. Where PacketFIFO v0 has no flag pins, derive them: full is !in_ready and empty is !out_valid.
The packet format (header with kind, dest and len, the payload, the check byte, and last) stays in the testbench. The capstone environment moves plain words and never needs to know about packets, which is why the same environment checks PacketFIFO unchanged. The packet layer sits on top: a generator that builds whole packets and a checker that compares them.
CAPSTONE ENVIRONMENT MAP
┌───────────── tb_top ─────────────┐
│ clk/rst gen fifo_if │
│ ┌───────┐ │
gen ──mailbox──► drv ════════════════►│ DUT │ │
│ │ (cb drive) │ fifo │ │
scenario │ └───┬───┘ │
knobs │ ▲ bind: fifo_sva │ │
│ └────────────────┘ │
│ in_mon (push side) out_mon (pop side)
│ │ │ │
│ ▼ ▼ │
│ ┌──────── scoreboard ───────┐ │
│ │ queue model · in-order cmp│ │
│ └───────────┬───────────────┘ │
│ coverage (cov) │
└─────────────────────────────────┘
stimulus stack: gen → mailbox → drv → fifo_if
checking stack: monitors → scoreboard ← reference model
always-on: bound assertions + sampled coverageLesson | What it builds | Path |
|---|---|---|
The spec, the question log, features F-01 to F-11 and the plan table. | Required | |
The interface with its clocking blocks, the harness, and a first handshake run. | Recommended | |
Transactions, scenario knobs, the generator, the driver and the environment. | Recommended | |
Passive monitors and a queue-based scoreboard. | Required | |
Bound assertions and a covergroup that tracks the plan. | Recommended | |
Regression tiers, a planted bug found by a bound assertion, hole analysis and sign-off. | Required |
Path: Required is the core first pass for this topic, Recommended is what most learners should read, and Optional is reference, specialist or revision material you can skip at first.
It is small enough to verify completely and rich enough to need every technique. Boundaries, simultaneity, reset, backpressure and parameter corners all fit in one design.