Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Course
  • Reading Paths
  • Concept Map
  • Meet DCRouter
  • Glossary
  • Part 0: What Verification Is8
  • Part 1: What Can Go Wrong11
  • Part 2: Specifications as Checkable Rules8
  • Part 3: Observability and Controllability7
  • Part 4: Stimulus11
  • Part 5: Checking11
  • Part 6: Coverage10
  • Part 7: Formal and Simulation10
    • What Formal Does
    • Bounded Proofs
    • Induction and Full Proofs
    • Assumptions and Over-Constraint
    • Where Formal Wins
    • Where Simulation Wins
    • Formal Apps
    • Combining Formal and Simulation
    • Proving DCRouter
    • Drills: Formal and Simulation
  • Part 8: Verification Levels and Reuse8
  • Part 9: Planning and Risk9
  • Part 10: Emulation and Prototyping8
  • Part 11: Post-Silicon Validation8
  • Part 12: Bug Economics8
  • Part 13: Debug7
  • Part 14: Sign-Off7
  • Part 15: Verification in Context8
  • Part 16: Case Studies5
  • Part 17: Capstones5
  • Part 18: Interview Preparation6
Loading lesson

‹Part 7: Formal and Simulation
  1. Topics
  2. First Principles of Verification Strategy
  3. Part 7: Formal and Simulation
  4. What Formal Does

Part 7 · Formal and Simulation · Working (W)

What Formal Does

Simulation runs one input sequence at a time; formal verification reasons about every input sequence the environment allows, at once. It returns either a proof or a counterexample: the shortest sequence that breaks a property. How that changes the questions you can answer, what formal needs from you (properties and assumptions), and what it costs.

On this page

    Note

    Level: Working (W) · Answers: When should we prove instead of test?

    Before this: Part 7 overview, Assertions as Local Checkers

    Part 4's random hunt sent a few hundred packets per seed and caught BUG_21 with 16 seeds out of 20. Four seeds never produced the situation that triggers it. That is the nature of simulation: each run is one path through an enormous space, and a bug is found only if some run walks through it. Formal verification asks a different question: is there any path, of any input sequence the environment allows, that breaks this property?

    How does formal verification differ from simulation, and what does it give you?

    The obvious answer, and why it breaks

    The obvious picture is that formal is simulation with every input tried, which sounds impossible: DCRouter has about 120 input bits per cycle (lesson 0.4 counts 119), so even 10 cycles have about 2^1190 input sequences. Formal tools do not enumerate them. They translate the design and a property into logic and ask a solver whether any assignment of inputs over the cycles makes the property false. The solver reasons about all sequences symbolically, and either proves there is none or produces one.

    The idea: one question about every input sequence

    The design, its properties and the assumptions about its environment go to a solver, which returns a proof or a counterexample.

    Simulation

    Formal

    Inputs

    One sequence per run, chosen by stimulus

    Every sequence the assumptions allow

    Result

    This run passed or failed

    Proof, counterexample, or inconclusive within a bound

    Needs

    Stimulus, checks, a reference

    Properties and assumptions

    Finds rare corners

    Only if a run reaches them

    Yes, if they are within reach of the proof

    Scales to

    Whole chips and software

    Blocks and control logic; cost grows quickly with depth and state

    Shows absence of bugs

    Never

    For the stated property, under the stated assumptions

    What formal needs from you

    • Properties: the rules, written as assertions (lesson 5.3); formal checks nothing you do not state.

    • Assumptions: what the environment may do; too few give false counterexamples, too many hide bugs (lesson 7.4).

    • A bound or an argument: either a depth for a bounded check (lesson 7.2) or invariants for a full proof (lesson 7.3).

    • A design small enough: cost grows with state and depth, so formal targets blocks, not whole chips (lesson 7.6).

    The counterexample

    When a property fails, the tool returns a trace: the shortest sequence of inputs it found that breaks the property, as a waveform. It is often the clearest bug report a verification engineer ever gets: a handful of cycles, every input chosen to reach the failure, nothing irrelevant. Lesson 7.2's first counterexample is four pushes into a FIFO whose full flag rises too late.

    How real teams use formal

    Practice

    Purpose

    Formal property verification on control-heavy blocks

    Arbiters, FIFOs, counters and protocol logic proved or debugged early

    Assertions shared between simulation and formal

    Each property written once, used by both (Part 5)

    Formal applications for specific questions

    Equivalence, connectivity, X-propagation (lesson 7.7)

    What breaks

    A team (illustrative) proved every property of an arbiter and declared it verified. The proofs were correct; the arbiter's property set did not include fairness, only mutual exclusion of grants. A starvation bug passed every proof. Formal answers exactly the questions asked: the same lesson as coverage (lesson 6.1), in a different form.

    Why this matters

    Senior lens. Think of formal as a different question, not a faster simulator: "can this ever happen?" instead of "did it happen in my tests?". Use it where that question is answerable (control logic, small state, clear rules) and where simulation's sampling is weakest (rare combinations, corner timings), and read every proof together with its properties and assumptions.

    Interview

    Asked: "How is formal different from simulation?"

    Weak answer: Formal is faster than simulation.

    Strong answer: Simulation runs one input sequence at a time and can only show the presence of bugs it happens to reach. Formal translates the design, properties and assumptions into logic and asks a solver whether any allowed input sequence violates a property, so it either proves the property for all sequences (within a bound or completely) or returns a minimal counterexample. The price: it checks only what you state as properties, its result depends on the assumptions, and its cost grows quickly with state and depth, so it suits blocks and control logic rather than whole chips.

    Follow-ups: (1) What is a counterexample? (2) What can make a formal proof meaningless?

    Check yourself Why doesn't formal verification have to try about 2^1190 input sequences for 10 cycles of DCRouter?

    It reasons about all sequences symbolically: the solver searches for any assignment that violates the property, rather than enumerating assignments.

    Check yourself A proof passes. Name two things you must still check before trusting it.

    That the properties state the rules that matter (fairness, not just exclusion), and that the assumptions do not exclude legal behaviour (lesson 7.4).

    Key takeaways

    • Formal checks a property against every input sequence the assumptions allow.

    • It returns a proof or a minimal counterexample, never just "this run passed".

    • It checks only stated properties, under stated assumptions, on designs small enough to reason about.

    Keep going

    Next: Lesson 7.2, Bounded Proofs. Bounded model checking, and what a depth means.

    Related topics

    • Part 7 overview: Formal and Simulation

    • Formal course: Formal versus Simulation

    Previous

    72 / 160

    Next: Bounded Proofs

    Up next

    Up nextBounded Proofs

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Induction and Full Proofs
    • Assumptions and Over-Constraint
    • Where Formal Wins