rtl-testbench-disciplinelisted
Install: claude install-skill Premchand006/AI-assistant-skills
# Testbenches that can fail
A testbench that prints signals for a human to read is a demo. A testbench that
decides pass or fail, cannot hang, and says why it failed is a regression test.
The gap between them is where "simulation was clean" comes from on a design
that does not work.
```bash
python3 scripts/check_testbench.py tb/ --fail-on error
```
The checker handles SystemVerilog and cocotb, and looks for testbenches that
cannot fail: no assertion or comparison anywhere, no watchdog, an exit status
that ignores the result, stimulus racing the clock edge the DUT samples on.
## The five properties
**It checks.** Compare against an expected value from a reference model, not
against a value copied out of a previous waveform. A scoreboard — a model
simple enough to be obviously correct, compared on every transaction — scales
past the twenty-case mark where hand-written expected values stop being
maintainable.
**It counts what it checked.** Zero errors out of zero checks is the most
common false pass in hardware verification. Report both, and fail a run where
the check count is zero.
**It cannot hang.** A watchdog that calls `$fatal` after a bounded time, or
`timeout_time` on `@cocotb.test()`. Without it, a DUT that never asserts `done`
blocks a CI runner until someone notices.
**Its exit status is the result.** `$finish` exits 0, so a failing test that
ends in `$finish` is a green build. End failing runs with `$fatal(1)`. In UVM,
set `set_report_max_quit_count(1)` so `UV