Skip to content

Course: Verifying hardware with t27 -- testbenches, waveforms, formal, mutation (9x3, hardware track) #1483

Description

@gHashTag

Parent epic: #1476

Course id: verify-hardware
Audience: hardware engineers (RTL / FPGA / ASIC).
Prerequisites: Course 0 (t27 basics) module tests-and-functions; Course 1 module program.

Why this course

Verification is more than half of real hardware work, and it is where t27's claim (the spec IS the test) is strongest. The repo has 30 *_tb testbenches, VCD tracing and comparison, a formal spec, cosimulation and mutation tooling (tri x7-mutate). None of it is taught. Verification engineers are a large audience that the current courses ignore.

What already exists in the repo (grounding)

  • fpga/testbench.t27, 30 files under fpga/testbench/*_tb.t27, fpga/simulator.t27
  • fpga/vcd_trace.t27, fpga/vcd_conformance_compare.t27
  • fpga/formal.t27 + formal_tb, fpga/verification/build_verify.t27
  • conformance/e2e_scenarios.t27, numeric/formats_catalog.t27 (bit-exact vectors)
  • tools/trios/tri/x7-mutate.t27, fpga-batch-cosim.t27, fpga-selftest.t27

Decomposition: 9 modules x 3 lessons

Module 1 -- why-verify: the spec is the golden model

# Lesson id What the reader learns Spec Widget idea
1 bugs-that-compile classes of bugs that pass synthesis fpga/testbench/uart_tb.t27 bug gallery, each with the test that catches it
2 golden-model spec tests as a reference model for RTL fpga/testbench.t27 spec vs RTL side by side
3 plan-before-code a verification plan: features x checks fpga/verification/build_verify.t27 plan table from the spec

Module 2 -- testbenches: stimulus, check, report

# Lesson id What the reader learns Spec Widget idea
4 anatomy-of-a-tb what every *_tb spec has in common fpga/testbench/fifo_tb.t27 tb anatomy annotator
5 self-checking assertions instead of eyeballing waves fpga/testbench/spi_tb.t27 pass/fail matrix of the tb
6 directed-vs-random directed cases vs constrained random fpga/testbench/uart_tb.t27 random stimulus generator with seed

Module 3 -- waveforms: reading what happened

# Lesson id What the reader learns Spec Widget idea
7 vcd-format the VCD format line by line fpga/vcd_trace.t27 vcd-wrapped
8 debug-with-waves finding a bug in a trace fpga/vcd_trace.t27 test-waves with a planted bug
9 compare-traces conformance by trace comparison fpga/vcd_conformance_compare.t27 diff of two VCDs

Module 4 -- conformance-vectors: bit-exact or nothing

# Lesson id What the reader learns Spec Widget idea
10 what-a-vector-is input, expected output, bit-exact numeric/formats_catalog.t27 vector browser
11 golden-ruler-vectors the Golden Ruler catalog as a test corpus (arXiv:2606.09686) numeric/formats_catalog.t27 format -> vectors -> pass count
12 end-to-end-scenarios scenario tests across the whole pipeline conformance/e2e_scenarios.t27 scenario timeline

Module 5 -- cosimulation: spec, RTL and board must agree

# Lesson id What the reader learns Spec Widget idea
13 three-way-agreement spec vs simulator vs board tools/trios/tri/fpga-batch-cosim.t27 three-column agreement table
14 simulator-internals event-driven vs cycle-based simulation fpga/simulator.t27 event queue stepper
15 when-they-disagree triage a cosim mismatch tools/trios/tri/fpga-batch-cosim.t27 mismatch walkthrough from a real run

Module 6 -- coverage: what you did not test

# Lesson id What the reader learns Spec Widget idea
16 line-and-toggle line and toggle coverage NEW fpga/coverage.t27 coverage heatmap over the spec
17 fsm-coverage state and transition coverage NEW fpga/coverage.t27 fsm-sketch with visited edges
18 coverage-lies 100% coverage with a broken design fpga/testbench/fifo_tb.t27 counter-example

Module 7 -- formal: proof instead of samples

# Lesson id What the reader learns Spec Widget idea
19 assertions immediate vs temporal assertions fpga/formal.t27 assertion editor with verdict
20 bounded-model-checking BMC: depth, counterexamples fpga/formal.t27 counterexample trace
21 induction k-induction and why BMC is not a proof fpga/testbench/formal_tb.t27 induction step visual

Module 8 -- mutation: testing the tests

# Lesson id What the reader learns Spec Widget idea
22 kill-the-mutant mutation testing: change the design, a test must fail tools/trios/tri/x7-mutate.t27 mutant scoreboard
23 surviving-mutants what a surviving mutant tells you tools/trios/tri/x7-mutate.t27 survivor list from a real run
24 test-strength mutation score vs coverage tools/trios/tri/x7-mutate.t27 two-axis plot

Module 9 -- sign-off: done means proven

# Lesson id What the reader learns Spec Widget idea
25 build-verify the sign-off checklist as a spec fpga/verification/build_verify.t27 checklist with live verdicts
26 board-selftest self-test on the board tools/trios/tri/fpga-selftest.t27 self-test log replay
27 capstone verify a peripheral: tb + formal + mutation + board fpga/uart.t27 sign-off receipt

Specs that do not exist yet (write in gHashTag/t27 first)

  • fpga/coverage.t27 -- line, toggle and FSM coverage model

Honesty notes and traps

  • The browser runner cannot run most *_tb specs today (calls, locals, struct fields). This course is the strongest reason to land that issue first.
  • Avoid repeating Course 1 lesson tests-are-the-spec; link to it.

Acceptance criteria

  • specs/course/<id>.t27 + <id>-ru.t27 exist, registered in specs/course/courses.t27, built by course-from-spec.mjs (recipe: specs/course_recipe/course-27.t27).
  • Exactly 9 modules x 3 lessons = 27 lessons; every lesson names one widget and one spec.
  • Every lesson spec compiles AND its test blocks pass in the reader's browser (blocked by the browser-runner issue), or the lesson says plainly that it is a recorded tri cast and links the recording.
  • Every number on a page comes from real tool output named in the widget's DATA_SOURCES (yosys / nextpnr / board run / spec test). No invented figures.
  • Board named on every hardware page (Wukong xc7a200tfgg676 vs AX7203 xc7a200tfbg484 vs Arty A7 / XC7A100T).
  • Black-and-white share cards and SEO pages generated for all 27 lessons (EN + RU).
  • The course PR carries a blog post: EN body + RU ruBody.
  • Lessons that need a spec that does not exist yet are listed as sub-tasks (spec first in gHashTag/t27, then copied here).

Blocked by: #1477 (browser test runner) for every lesson whose spec uses calls, locals or struct fields in tests.

Activity

  1. added a commit that references this issue on Oct 7, 2026
    5b78130
  2. added a commit that references this issue on Oct 7, 2026
    c7c8c22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions