Self-checking, not staring

You will learn

How to write a testbench that fails loudly, and why eyeballing waves is not a check.

A testbench that prints waves and stops is a machine for producing staring. A self-checking one computes a verdict and exits nonzero when it fails, so a script can run a thousand of them and trust the exit code. The widget is the terminal for seven t27 backends: every command run on hello_world, 21 pass, 0 fail -- every pass earned by an assert that executed, not by finishing. The lesson's spec, spi_tb, ends the same way: a count of checks, and a failure mode that cannot be mistaken for success.

Open the interactive lesson →