A layered testbench separates stimulus, driving, observation, and checking into classes joined by mailboxes. The class world touches the DUT only through virtual interfaces owned by the static harness.
Topic | Lessons | What it covers | Time | Path |
|---|---|---|---|---|
4 | How a layered testbench is organized, from the static harness to tests and a complete example. | 30 min | Required | |
8 | Stimulus flow plus constraint shaping: transactions, generators, drivers, and closure. | 65 min | Required | |
5 | Passive monitors, scoreboards and reference models that prove a testbench checked the DUT, plus the PacketFIFO checker step. | 40 min | Required | |
4 | Self-checking tests that print their own verdict, plus seeds, logging, and the regression flow. | 30 min | Recommended | |
3 | Map each hand-built testbench piece to its UVM counterpart and plan the migration. | 25 min | Recommended |
Path tells you how to spend your time. Required is the core first pass for building a layered testbench. Recommended is what most learners should read. Optional is reference, specialist or revision material that you can return to later. Each topic hub labels its own lessons.
Layers and the harness: Testbench Anatomy & Layering, then the stimulus pipeline (transaction, driver).
Checking: the passive monitor, the in-order scoreboard and the drain at the end of the test.
The verdict: one PASS or FAIL line and an exit code.
Project: the PacketFIFO monitor and scoreboard step.
Stimulus depth: Generator Patterns and scenario randomization, once the basic pipeline works.
Logging: Logging & Verbosity Strategy, when logs start to hurt.
Migration: Migrating a TB to UVM, when a real move to UVM is planned.
The mailbox decouples their timing, so the generator can randomize ahead while the driver consumes transactions at DUT pace. It also lets both run as independent threads.
Five questions that cover the section. Each answer names the lesson that teaches it.
Only the signal and command layers name pins; intent lives in the test layer. Taught in The Layered Testbench.
Hold the same item on the pins, with valid still high, until a cycle where ready is high, and only then take the next item from the mailbox. Taught in Driver Design.
Only those beats were accepted, so counting offered beats would double-count held data; a monitor that drives would check its own stimulus. Taught in Monitor Design.
End the test at quiescence and fail it unless the compare count matches the number sent, no packets are left over and the DUT is empty. Taught in Compare and End-of-Test.
The seed and the test name, printed at the start of the run, so the same run can be repeated exactly. Taught in Seeds & Reproducibility.