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. Where Formal Wins

Part 7 · Formal and Simulation · Senior (S)

Where Formal Wins

Formal is strongest where behaviour is control, not data: arbiters, FIFOs and counters, handshakes, deadlock, ordering, and rare combinations of a few signals. On DCRouter, depth-7 proofs found the arbitration and credit bugs in two to six steps, including BUG_5, which simulation could see only with a purpose-built arbitration checker. The kinds of logic where proof beats testing, and why.

On this page

    Note

    Level: Senior (S) · Answers: When should we prove instead of test?

    Before this: Assumptions and Over-Constraint

    DCRouter's round-robin bug, BUG_5, took this course four lessons to catch in simulation: random traffic reached it constantly, but only a purpose-built arbitration checker could see it (lesson 5.10). The formal proofs of lesson 7.9 found it in step 4, with no stimulus at all, from one property about how the pointer must move.

    What kinds of logic are better proved than tested?

    The obvious answer, and why it breaks

    The obvious rule is "use formal for small blocks". Size matters, but the better guide is the kind of behaviour. Formal's strength is exhaustive reasoning over a few cycles about a modest amount of control state; its weakness is long sequences and wide data. A small block full of arithmetic can be hopeless for formal, while a large block whose risky part is a small arbiter can be ideal.

    The idea: control, coincidence and "never"

    Kind of logic or rule

    Why formal wins

    DCRouter example

    Arbiters and schedulers

    Every combination of requests in every state, including the rare ones

    BUG_6, 7: counterexample in step 3

    FIFOs, counters and credit loops

    Invariants such as count bounds and conservation of credits

    BUG_10: step 2; BUG_9: step 6

    Handshakes and protocols

    Every timing of valid, ready and stalls

    R1 and R13 rules as assertions

    Coincidences of a few signals

    Simultaneous events that random stimulus rarely aligns

    BUG_2 (push and pop together): step 5

    "Never" and "always" rules

    A proof covers all executions; simulation samples a few

    No credit is ever lost or invented

    Deadlock and liveness

    Can reason about whether progress is always possible

    A locked output is always eventually released (with the right tools)

    Routing and decoding

    Every address or header value at once

    BUG_24 (stale destination): step 6

    DCRouter, simulation against proof

    Bug

    First simulation catch in this course

    Formal (lesson 7.9)

    BUG_5

    Lesson 5.10: purpose-built arbitration checker

    Step 4

    BUG_6, BUG_7

    Lesson 5.10, only with the hot-spot phases

    Step 3

    BUG_9

    Lesson 4.1's credit check and later audits

    Step 6

    BUG_24

    Lesson 4.7: varied back-to-back traffic

    Step 6

    For the bugs within reach of its bound, formal needed no stimulus design, no checker timing model and no seeds: one property per rule and a solver.

    Signals that a block suits formal

    • Few cycles to the interesting states: a 4-deep FIFO, not a 1,024-deep one (or use a small configuration).

    • Rules about relations, not computed values: "granted means requesting", not "the FFT is right".

    • Rare coincidences matter: several conditions in one cycle.

    • High cost of escape: arbitration, coherence, security and safety logic where "never" must really mean never.

    How real teams choose formal targets

    Practice

    Purpose

    Formal plans per block, listing properties and target proof depth

    Formal effort aimed where it wins

    Designer-run formal on new control logic

    Bugs found before simulation environments exist

    Formal sign-off for critical control blocks

    Proofs instead of coverage for the highest-risk logic (Part 14)

    What breaks

    A team (illustrative) proved its interconnect arbiter exhaustively and left the address decoder to simulation, since "decoders are simple". A two-region overlap in the decode map, reachable only by one address range, escaped to silicon. Decoders are a formal sweet spot: every address at once is exactly what a solver does well.

    Why this matters

    Senior lens. Choose formal by the shape of the risk: control state, coincidences, and rules that must hold always. Put formal on arbiters, FIFOs, credit loops, handshakes and decoders early, ideally in designers' hands, and save simulation for what formal cannot reach.

    Interview

    Asked: "When would you choose formal?"

    Weak answer: When the block is small.

    Strong answer: When the risk is control rather than data: arbiters, FIFOs, counters and credit loops, handshakes, decoders, deadlock, and rules that must hold always, especially where bugs need rare coincidences of a few signals. Formal explores every combination within its bound without stimulus design. On the course's router, depth-7 proofs found the round-robin, priority, credit and routing bugs in two to six steps, including priority bugs that simulation only caught with a dedicated checker and hot-spot traffic.

    Follow-ups: (1) Why are decoders good formal targets? (2) When does block size stop mattering?

    Check yourself Why did formal find BUG_5 without any traffic pattern, when simulation needed a purpose-built checker?

    The property states how the round-robin pointer must move after every grant; the solver finds the first grant where it does not, while simulation needed a purpose-built fairness checker to turn the stuck pointer into a visible failure.

    Check yourself Name two DCRouter rules that are good formal targets and one that is not.

    Good: credits are conserved (R7); the arbiter grants the specified winner (R6). Poor: a 255-error counter saturates (R9) needs hundreds of cycles; payload data integrity through long packets is better checked by the scoreboard.

    Key takeaways

    • Formal wins on control: arbiters, FIFOs, counters, handshakes, decoders, deadlock.

    • It finds rare coincidences without stimulus design, and proves "never" within its reach.

    • Choose targets by the shape of the risk, not only by block size.

    Keep going

    Next: Lesson 7.6, Where Simulation Wins. And where simulation is still the right tool.

    Related topics

    • Part 7 overview: Formal and Simulation

    Previous

    76 / 160

    Next: Where Simulation Wins

    Up next

    Up nextWhere Simulation Wins

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • What Formal Does
    • Bounded Proofs
    • Induction and Full Proofs