Formal
5/5 SymbiYosys jobs · 1b → 8b → 32b spot + flags + full comb equiv (~74 s)
Verification
I checked 130 billion simulated cases against a reference model in a 2 hour 45 minute run. Formal verification separately checks the ALU’s mathematical behavior at 1, 8, and 32 bits. Here are the methods, commands, and limits of those checks.
Compare the simulated ALU with an independent reference model, stopping on a mismatch.
Prove equivalence for the configured ALU model rather than sampling more random inputs.
These checks do not certify the full computer, board timing, or physical signal integrity.
At a glance
5/5 SymbiYosys jobs · 1b → 8b → 32b spot + flags + full comb equiv (~74 s)
476/476 Icarus vectors vs unified golden · all csel modes
10B Verilator on 8b slice · 130B on 32-bit FPGA alu.v
91-row ALU control table · 1b exhaustive + 8b full + 32b regression (Questa)
make signoff · ~35 s from repo root make test
One ripple-LUT reference · out = f + g + cin · shared across all layers
Verification mirrors the hierarchy on the schematic and on lot 07 copper: prove the programmable 1-bit LUT cell, compose it into 8-bit slices, then close the full 32-bit export. Digital .dig is the logic source; read-only netlists land in verification/rtl/. Re-export, re-run sign-off.
The property under test is always the same family: out = f(a,b,c) + g(a,b,c) + h(cin). Two independent 8:1 mux planes per bit feed a ripple carry-select adder. Formal proofs the LUT relations and combinatorial output; directed replay checks the exported netlist against Digital’s vectors; UVM scoreboards the sequential flag path; the gauntlet hammers the FPGA copy of the running machine.
The main harness in verification/ signs off the Digital-export ALU — not the full CPU, ISA ROM, or memory system. From the repo root, make test runs the fast path.
~35 s
make signoff
~3 min
make signoff_full
476
directed vectors
5/5
formal jobs
01 · Formal
1b: k-induction proves MUX_OUT = OPCODE[{C,B,A}], plus generate/propagate for every input. 8b: same relations per bit-slice. 32b spot: 12 fast regression properties. 32b equiv: Out === golden(...) for all inputs (~74 s). Flags: cover mode for FLAG_WE reachability.
Inventory: 19 source asserts + 20 cover points (40 + 48 elaborated on 8b). See verification/formal/PROPERTY_INVENTORY.md.
02 · Directed
Every vector extracted from Digital testbenches passes against the unified golden — no skips. Six flag-only vectors with exp=x are skipped at codegen. Exercises all csel modes and opcode pairs the schematic actually runs.
03 · UVM
1b exhaustive: 128-row 0x96 table + 256× LUT sweep + G/P corners. 8b full: CLA boundaries, logic sweep, 5000 random. 32b regression: 476 directed + 91-op coverage + edge cases + flag test + 10k random. Requires Questa (vlog/vsim) — not wired in GitHub Actions yet.
04 · Lint
make lint on 1b, 8b, and 32b exports — zero errors before directed replay runs.
Separate tree: verification/gauntlet/ holds a copy of hardware/fpga/core/rtl/alu.v — the ALU that runs Tomato OS on the Nexys A7. Refresh with make sync; do not edit core from here.
SymbiYosys proves 1b, 8b, and 32b Out ≡ golden. Verilator drives 10,000,000,000 vectors on the 8-bit slice and 130,000,000,000 on the full 32-bit ALU. Directed warmup (LUT×minterm×cin on 8b; low-byte grid on 32b), then random fill. Measured on Apple Silicon: ~25 Mvec/s (8b), ~13–16 Mvec/s (32b) — about 7 minutes for 10B and 2 hours 45 minutes for the recorded 130B run.
Fig. — SimulationOpcode space sweep
Fig. — Artix-7AND3 · 0x80
Dependencies for sign-off: python3, yosys, symbiyosys (sby), z3, iverilog, verilator. Gauntlet needs the FPGA OSS CAD Suite on PATH.
| Command | What it does | Time |
|---|---|---|
| make test | Repo root → verification/signoff | ~35 s |
| make signoff_full | + 32b combinatorial equivalence proof | ~3 min |
| make directed | 476 Icarus vectors | seconds |
| make formal_32b_equiv | Full 32b comb proof alone | ~74 s |
| make uvm_regression | 1b + 8b + 32b UVM (Questa) | local |
| make gauntlet_smoke | 1M vectors each width | quick |
| make gauntlet_claim | Formal + 10B + 130B → CLAIM.txt | hours |
| make fpga-test | Full CPU Icarus sim (separate harness) | varies |
cd verification
make signoff # fast CI (~35 s)
make signoff_full # + 32b equiv (~3 min)
cd verification/gauntlet
make sync && make claim # formal + 10B + 130B
| Topic | Status |
|---|---|
| ALU export only | Full CPU, ISA ROM, memory, FPGA top — not this harness |
| op91_cp | 91 ALU control-table rows — not 512 CPU opcodes, not toggle/branch % |
| Sequential CSR_FLAG | Cover + UVM flag test — not SMT latch prove |
| UVM in CI | Questa not in GitHub Actions yet |
| Synthesis (make synth) | Sky130 characterization — not functional tape-out sign-off |