Agents know one interface each. Above them sit two layers that decide whether a testbench scales: the environment, which assembles agents and checkers into something reusable, and the tests, which turn that assembly into scenarios. On the DMA bench, one 30-line environment is reused twice, unchanged, to verify a two-DMA chain, and one base test supports nine scenarios that differ by a few lines each. This part explains the design decisions behind both, and the mistakes that make benches impossible to reuse.
Design an environment with a config object that works with or without a test-provided config, and decide what belongs in env config, agent config and the test.
Reuse a block environment inside a subsystem environment unchanged, with passive agents on internal buses and an end-to-end checker on top.
Integrate third-party VIP behind an adapter, a config map and a message policy, and choose where the virtual sequencer lives at each level.
Write a base test that every scenario can rely on, express each scenario as one kind of change, register factory overrides from tests, and put end-of-test policy in one place.
Select tests and knobs from the command line, write a top module the next level can replace, and grow a test library without copy-paste.
Topic | Lessons | What it covers |
|---|---|---|
4 |
| |
7 |
|
Some neighbouring material is taught elsewhere and only linked from here: run_test and timeouts (how a run ends), Command-line overrides (factory and config plusargs), and the two virtual-sequence lessons, Virtual Sequencer Wiring and Virtual Sequences Without a Virtual Sequencer.