FVO — Formal Verification Online
Lesson 1.1 · Welcome to Formal Verification

What formal verification really is

Imagine you are handed a padlock and asked: "Can this lock ever be opened without the right key?" One way to answer is to try every key in a big bucket and see whether any of them works. That is simulation: you pick inputs, run them, and look at the results. If none of your keys opens the lock, you feel better — but you have only tested the keys you had.

The other way is to take the lock apart and reason about the pins and springs until you can say, with certainty, which keys can turn the cylinder. That is formal verification (FV): instead of trying values, a tool builds a mathematical model of the design and proves whether a statement about it holds for every possible input sequence.

Simulation: individual test points (bug at the red dot is missed)every reachable state examinedFormal: the whole space is covered (the bug is found)
Simulation explores the points you drive. Formal reasons about the whole space of legal behaviours at once.

Why "trying more tests" does not scale

Consider a humble 32-bit adder with two inputs. It has 264 ≈ 1.8 × 1019 input combinations. Even at a billion simulations per second, checking them all would take roughly 585 years — for a block with no state at all. Add a few registers and the number of sequences of inputs explodes far beyond that. Real designs have thousands of flip-flops. Simulation can never be exhaustive; it can only be clever about where it looks.

Formal tools avoid enumerating values one by one. They manipulate sets of values symbolically (using techniques you will meet in Chapter 2), so a single run can say "for all 264 input pairs, the sum is correct" or "here is the one input pair where it is wrong".

The three ingredients

Every formal run, whatever the tool, combines three things:

  1. The design — your RTL, usually SystemVerilog or VHDL.
  2. Assertions — statements that must always be true, e.g. grant is never given to two requesters at once.
  3. Assumptions (constraints) — what the outside world is allowed to do, e.g. a request stays high until it is granted.

The tool then answers one question per assertion: "Is there any sequence of legal inputs, starting from reset, that makes this assertion false?"

The vocabulary you will use daily

TermMeaning
PropertyA statement about design behaviour, written in a language such as SVA (SystemVerilog Assertions).
AssertionA property the design must satisfy. The tool tries to break it.
AssumptionA property the tool treats as true about the inputs. It limits the search to legal behaviour.
CoverA behaviour you want to see happen. The tool tries to produce a waveform that reaches it.
Counterexample (CEX)A concrete waveform, from reset, that violates an assertion.
ProofA guarantee that no counterexample exists, for any input sequence of any length.
Bounded proofA guarantee that no counterexample exists up to N cycles from reset.
Was this page helpful?

Tip: select any text on the page before clicking Report and it will be quoted in your report.