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. Drills: Formal and Simulation

Part 7 · Formal and Simulation · All levels

Drills: Formal and Simulation

Interview questions, a whiteboard exercise and a ten-question checkpoint for Part 7.

On this page

    Answer each question out loud before opening it. If you miss more than three in the checkpoint, revisit the lessons linked at the end.

    Interview questions

    Check yourself How is formal different from simulation?

    It checks a property against every input sequence the assumptions allow and returns a proof or a minimal counterexample; simulation samples one sequence per run.

    Check yourself What does a bounded proof tell you?

    No violation within N cycles of reset, under the assumptions; nothing about deeper states.

    Check yourself Why does induction fail without invariants?

    The step can start from unreachable states; helper invariants, asserted and proved, rule them out.

    Check yourself What is over-constraining?

    Assumptions stricter than the real environment, which silently exclude legal traces and the bugs in them; covers and planted bugs expose it.

    Check yourself When would you choose formal?

    For control logic with short reach: arbiters, FIFOs, counters, credit loops, handshakes, decoders, deadlock, rules that must always hold.

    Check yourself When is formal the wrong tool?

    Deep state, wide data, accumulated results, whole systems with software, statistics, and rules nobody wrote as properties.

    Check yourself What is equivalence checking for?

    Proving two implementations behave identically (RTL and netlist, before and after an ECO); it does not check either against the specification.

    Check yourself How do you split a plan between formal and simulation?

    By rule, in one evidence ledger, with important rules getting both and every assumption of one method verified by the other.

    Whiteboard exercise

    Task. A credit-based link layer has a 16-entry retry buffer, an 8-bit sequence number that wraps, a replay timer of 4,096 cycles and a CRC on every packet. Decide which rules you would prove and which you would simulate, what properties and assumptions the proofs need, and how you would handle the deep state.

    Check yourself Open a model answer

    Prove: credit conservation (credits plus outstanding packets constant), the retry buffer never overflows or replays a packet it has freed, sequence numbers are assigned consecutively and acknowledged in order, and the replay logic never sends while the link is down. Assumptions: the peer acknowledges only sequence numbers that were sent, within the window; credits are returned only for consumed packets. Deep state: use a parameterised configuration (a 4-entry buffer, 3-bit sequence numbers, a 16-cycle timer) for the proofs, with induction and helper invariants (buffer occupancy equals the distance between head and tail pointers; outstanding count equals the sequence-number distance), and confirm the full-size configuration in simulation. Simulate: the CRC (a reference model in the scoreboard), long error-and-replay scenarios with the real 4,096-cycle timer, throughput and latency under error rates, and interoperability with a real peer model. Use a register app for the control registers and equivalence checking after synthesis.

    Checkpoint: ten questions

    Check yourself 1. How long was the counterexample for the FIFO with a late full flag, and what was it?

    Five steps: reset, then four pushes; at step 5 the FIFO holds four words and full is still low.

    Check yourself 2. How did the cost of a bounded check of DCRouter grow with depth?

    About 3 s at depth 6, 41 s at depth 8, over five minutes at depth 10.

    Check yourself 3. What helper invariant made the FIFO induction pass?

    The count equals the distance between the pointers, and is at most 4.

    Check yourself 4. Why must a helper be asserted, not assumed?

    An assumption is never checked; if false, it silently removes real behaviour from the proof.

    Check yourself 5. What exposed the over-constrained FIFO proof?

    A cover on "full", written as an assertion of its negation, that passed: full was unreachable.

    Check yourself 6. What did the course's Yosys version do with a bind statement?

    Accepted and ignored it, so the bound properties were never checked; a deliberately false property passing revealed it.

    Check yourself 7. Which formal app would catch DCRouter's wrong CTRL reset value?

    Register checking against the machine-readable register map.

    Check yourself 8. How many Bug Zoo bugs did the depth-7 bounded check catch, and the full proof?

    7 and 9.

    Check yourself 9. Which two bugs did only the full proof catch, and why?

    BUG_1 and BUG_22: their effects need more cycles than the bound (a full FIFO, a credit returned during sleep).

    Check yourself 10. Why did formal miss the other 15 bugs?

    Their rules (framing, error flags, counters, registers, configuration, sleep and wake) had no formal properties.

    Revisit

    • 7.1 What Formal Does

    • 7.2 Bounded Proofs

    • 7.3 Induction and Full Proofs

    • 7.4 Assumptions and Over-Constraint

    • 7.5 Where Formal Wins

    • 7.6 Where Simulation Wins

    • 7.7 Formal Apps

    • 7.8 Combining Formal and Simulation

    • 7.9 Proving DCRouter

    Keep going

    Next: Part 8: Verification Levels and Reuse. At which level should each thing be verified?

    Previous

    81 / 160

    Next: Part 8: Verification Levels and Reuse

    Up next

    Up nextPart 8: Verification Levels and Reuse

    Sign in to save progress

    Practice this lessonReport an error

    See also

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