The Toolbox and the Map of This Site
Meet the tools around a design: simulation, formal, static checks, emulation and prototypes. Learn what each proves and what it cannot, why methods such as UVM exist, and which track here teaches each one.
You Will Be Able To
- Say what simulation, formal checking, equivalence, static checks, emulation and prototypes each prove.
- Name the blind spot of each tool.
- Explain why a rare input sequence is found at once by formal and almost never by random simulation.
- Explain why methods such as UVM exist, and find the track on this site that teaches each tool and language.
- Lesson
- B4.5
- Time
- 22 min
- Runs on
- Your browser
- Check
- 5 questions
A test mode opens when three exact bytes arrive in a row, and it must never open in normal use. A million random clocks never hit it. A formal tool found the sequence in about half a second.
- DUT
- Engine
- Property
- Step
- Tool
- Data
- Simulation
Runs the tests you write, on any size of design, and sees exactly what you check.
- Formal
Tries every input sequence for the rules you write, but only on designs small enough to finish.
- Static checks
Read the code without running it: style, clock crossings, two versions of a design compared.
- Emulation and prototypes
Put the design on special hardware or an FPGA to run long software. This site has neither.
Read the diagram as text
- The design: one source, many tools
- Simulation: runs the tests you write
- Formal: every input, up to a size
- Static checks: lint, clock crossings, equivalence
- Emulation: the design on special hardware, much faster
- FPGA prototype: near real speed, with real software
- Simulation → The design: stimulus
- Formal → The design: all inputs
- Static checks → The design: reads the code
- Emulation → The design: long runs
- FPGA prototype → The design: real software
An idea drawing. This site runs simulation (Icarus, Verilator), formal (SymbiYosys) and some static checks (Yosys); it has no emulator and no FPGA prototype.
Before You Start
This lesson draws on the whole track so far. Two lessons matter most: Assertions: Checks That Travel With the Design and Regressions, Seeds and the Life of a Bug.
| Question | |
|---|---|
| 1 | What does each tool in the toolbox prove, and what can it not see? |
| 2 | Why does formal find a rare sequence that random simulation misses? |
| 3 | What are emulation and FPGA prototypes for? |
| 4 | Why do methods such as UVM exist? |
| 5 | Which track on this site teaches which tool? |
The Idea: Every Tool Has a Blind Spot
Simulation is the workhorse. It runs any design and checks exactly what your tests check, but only on the inputs you drove. Formal tools take a rule and ask a solver for any input sequence that breaks it. A solver is a program that searches every possibility with mathematics. They cover every input, but only on designs small enough to finish. Static checks read the code without running it.
Some questions need speed instead. Booting an operating system takes billions of clock cycles, far beyond a simulator. Emulators run the design on special hardware built for that. FPGA prototypes load it into programmable chips that run near real speed. Both are expensive and slower to change, and this site has neither. They are part of the map so you know what they are for.
Methods sit on top of tools. A layered bench with reusable parts, the same for every test, is what UVM standardises. It exists because hand-built benches do not scale to many engineers and many projects.
New Words
| Word | Meaning |
|---|---|
| Formal verification | Checking a rule for every possible input sequence with a solver, instead of running chosen tests. |
| Counterexample | An input sequence a formal tool found that breaks the rule. |
| Bounded check | A formal search for a broken rule within a fixed number of clocks from reset, the depth. |
| Proof | A formal result that no input sequence of any length breaks the rule, while the inputs obey the stated assumptions. |
| k-induction | A proof method. If the rule holding for k clocks in a row forces it to hold on the next clock, it holds for ever. |
| Static check | A check that reads the code without running it. Lint flags risky coding style; a clock-crossing check looks at signals passing between clocks. |
| Equivalence checking | Proving two versions of a design give the same outputs. |
| Emulator | Special hardware that runs a design far faster than a simulator, for long software runs. |
| FPGA prototype | The design loaded into programmable chips, running near real speed with real software. |
| Methodology | An agreed way of building benches, such as UVM, so parts can be reused. |
The Smallest Example: The Odds of Three Bytes
The lock opens when the bytes A5, 3C and 0F arrive on three clocks in a row. Work out how often random bytes do that.
| Event | Chance |
|---|---|
| one byte is A5 | 1 in 256 |
| three exact bytes in a row | 1 in 256 x 256 x 256 = 1 in 16,777,216 |
| one hit in 200,000 random clocks | about 1 in 84 |
| one hit in 1,000,000 random clocks | about 1 in 17 |
A random test of a million clocks will usually miss it. A formal tool does not draw inputs at all. It asks a solver whether any sequence of a few clocks can make open rise, and the solver answers with the sequence.
The Rules
Rule 1: Simulation checks what you drive.
It scales to any design, and it is blind to inputs your tests never produced.
Rule 2: Formal checks every input, within its reach.
It finds rare sequences at once and can prove rules, but only for designs small enough to finish.
Rule 3: Static checks read the code without running it.
They find structural mistakes cheaply, and say nothing about whether the design does its job.
Rule 4: Emulation and prototypes buy speed.
They run real software for billions of cycles, at a high cost and with less visibility.
Rule 5: Methods make benches reusable.
UVM and layered benches exist so many people can share and reuse the same parts.
Sources for These Rules
Static verification and its tools, from model checking to equivalence and structural checks: Mehta, sections 10.1 and 10.2.
Verification and emulation in the product life cycle: Mehta, sections 15.5 and 15.6. Challenges and the choice of methods: section 2.1.
Methodology basics, reuse and bench performance: Spear and Tumbush, sections 1.5, 1.13 and 1.14.
The Lab: A Million Random Clocks Against One Proof
The lab drives the lock with random bytes, test pin low, and counts how often open rose:
200000 random clocks, test pin low: open rose in 0 of themRule 1 at work: the design is wrong, and random simulation never showed it. The same bench with a million clocks printed 1000000 random clocks, test pin low: open rose in 0 of them and took about a second.
Then the same lock went to the site's formal engine. This time the rule was written into the design.
// The property, in the form the site's formal engine runs.
always @(posedge clk) begin
if ($initstate) assume(rst); else assume(!rst); // start in reset, then run
if (!$initstate) assume(!test_pin); // normal use: test pin low
if (!rst) assert(!open); // open must never rise
end| Design | Mode | Result | Time (recorded run) |
|---|---|---|---|
| lock with the bug | bounded check, depth 10 | FAIL at step 5: din = A5, 3C, 0F, then open = 1 | 592 ms |
| lock with test_pin required | proof (smtbmc yices, k-induction) | PASS: with the test pin low, no sequence of any length opens it | 517 ms |
Rule 2 at work. The solver found the exact three bytes in three clocks, in about half a second. A bounded check that finds nothing only clears its depth: here, 10 clocks from reset. When it fails, as here, the sequence it prints is a real way to break the rule. After the fix, the k-induction proof covered every length. It still holds only under the assume lines: start in reset, then keep the test pin low. No amount of random simulation can say "any length".
Why No Single Tool Is Enough
Why not use formal for everything? Because its reach shrinks as designs grow: the number of states explodes. Formal shines on control logic, handshakes and rules like this one. A whole chip with memories and software still needs simulation, and long software runs need emulators or prototypes.
So real projects use all of them, each where it is strongest. The plan decides which tool owns which row. That is the map the rest of this site follows.
The Map of This Site
This track is the front door of the Design Verification domain. Here is where each tool and language is taught next.
| Tool | Proves | Cannot see | Here |
|---|---|---|---|
| Simulation | Behaviour on the tests you wrote, for any design size | Inputs your tests never drove | Icarus, Verilator, UVM on this site |
| Formal property checking | A rule holds for every input sequence, or a counterexample | Designs too big to finish; rules nobody wrote | SymbiYosys on this site |
| Equivalence checking | Two versions of a design give the same outputs | Whether either version is right | Formal track, module F6 |
| Lint and static checks | Coding mistakes and risky structures, without running anything | Whether the design does its job | Yosys on this site |
| Emulation | Long runs: an operating system boot, millions of transactions | Fine detail is slower to see; costly hardware | Explained only; not on this site |
| FPGA prototype | Real software at near real speed, with real devices | Timing and power of the real chip; slow to change | Explained only; not on this site |
| Track | What it teaches | First lesson |
|---|---|---|
| SystemVerilog | The language of benches: types, classes, randomization, threads, interfaces | Four-State vs Two-State Types |
| UVM | The standard library for building reusable benches | From a Layered Bench to UVM |
| Assertions | Rules on signals, checked every clock edge | Why Assertions |
| Functional Coverage | Bins, crosses and closing holes | What Coverage Measures |
| DPI and Foreign Models | Calling C and Python models from a bench | Your First DPI-C Call |
| SoC Verification | Verifying a whole chip, with and without its processor | What the Block Bench Already Proved |
| Formal Verification | Proving rules for every input | Simulation Covers Paths, Formal Covers States |
| Protocols | The rules blocks talk by: AXI, APB, UART, SPI, I2C and more | Why a Bus Needs Rules |
| Digital Fundamentals | Logic, numbers, counters and state machines | Positional Numbers and Base Conversion |
| RTL Design | Writing the design itself | What Synthesis Does with Your Code |
| SoC Architecture | How a chip is put together | From Board to Chip: What an SoC Contains |
| Low Power Design and UPF | Power domains and power intent | Dynamic, Short-Circuit and Leakage Power |
| Static Timing Analysis | Will the design meet its clock? | Why Static Timing Analysis |
| Physical Design | From netlist to layout | What the Flow Does and Why |
| Analog Circuit Foundations | Circuits with continuous signals | Nodes, Branches and the Netlist |
Traps
The first trap is trusting a long random run for a rare event. A test ran for a week and never hit the bug, so the team called it safe. Three exact bytes are about 1 in 17 million per clock. At this lab's speed, a run of a minute would usually find them. Six exact bytes are about 1 in 281 million million. A week of random clocks at a million a second would almost surely miss them.
The second trap is trusting a proof of the wrong rule. A formal tool proves exactly what you wrote. If the assume lines forbid inputs the chip will really see, the proof is empty. Read every assume as a promise about the world, and check it is true.
The third trap is reaching for a heavier tool too early. Emulators and prototypes are slow to set up and hard to debug. Most bugs are cheaper to find in a small simulation or a formal check of one block.
Where This Goes Next
Every tool on the map has a track. Start with the one your next task needs.
| The idea from this page | Where it is taught |
|---|---|
| Random cycles against bounded model checking | Simulation Covers Paths, Formal Covers States |
| A first proof with no testbench | Your First Proof: the Same SVA, No Testbench |
| Formal beside simulation | Formal with Simulation |
| From a layered bench to UVM | From a Layered Bench to UVM |
| The complete layered testbench in SystemVerilog | The Complete Layered Testbench |
Try It
Run it: 200,000 random bytes into the lock, test pin low, counting how often open rose.
Change seed to other numbers. Does any seed you try make open rise, and what would that prove?
Why can no change to the number of clocks turn this run into a proof?
200000 random clocks, test pin low: open rose in 0 of themCheck Yourself
Common Mistakes
Wrong Call a design safe because a long random run never failed.
Rare sequences can have odds far below the number of clocks run.
Fix Use formal for rules about rare sequences, and coverage to show what random reached.
Wrong Trust a formal proof without reading its assumptions.
An assumption that forbids real inputs makes the proof empty.
Fix Read every assume as a promise about the world, and check it is true.
Wrong Expect one tool to verify a whole chip.
Each tool has a blind spot.
Fix Let the plan give each row to the tool that is strongest for it.
Remember
- Simulation checks what you drive; formal checks every input within its reach; static checks read the code.
- Emulators and FPGA prototypes buy speed for long software runs; this site explains them and has neither.
- A sequence of three exact bytes was missed by a million random clocks and found by formal in about half a second.
- Methods such as UVM make benches reusable; each tool and language here has its own track.