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

  • Part 0 · What Debugging Is6
  • Part 1 · Reproduce8
  • Part 2 · Observe9
  • Part 3 · Localise10
  • Part 4 · Hypothesise and Test6
  • Part 5 · Bug Classes16
  • Part 6 · Debug by Stage9
    • RTL Simulation
    • Formal Counterexamples as Traces
    • Gate-Level Simulation
    • Equivalence Failures
    • Emulation and FPGA Prototyping
    • The First Failing Test on Silicon
    • Silicon vs Simulation Correlation
    • Marginal and Environmental Failures
    • Moving the Failure to the Cheapest Stage
  • Part 7 · Hangs and Deadlocks7
  • Part 8 · Intermittent Failures7
  • Part 9 · Fix, Prove, Prevent7
  • Part 10 · Case Studies12
  • Part 11 · Debug as a Team5
  • Part 12 · Interview Prep5
Loading lesson

‹The Art of Hardware Debug
  1. Topics
  2. The Art of Hardware Debug
  3. Part 6 · Debug by Stage

Part 6 · Debug by Stage · All levels

Part 6 · Debug by Stage

How does the method change from simulation to silicon?

  • 9topics
  • 9lessons

Topics in this section

  1. 1RTL Simulation1 lesson
  2. 2Formal Counterexamples as Traces1 lesson
  3. 3Gate-Level Simulation1 lesson
  4. 4Equivalence Failures1 lesson
  5. 5Emulation and FPGA Prototyping1 lesson
  6. 6The First Failing Test on Silicon1 lesson
  7. 7Silicon vs Simulation Correlation1 lesson
  8. 8Marginal and Environmental Failures1 lesson
  9. 9Moving the Failure to the Cheapest Stage1 lesson
On this page

    Part 6 answers: How does the method change from simulation to silicon?

    Where Part 6 sits on the debug loop: Observe, Localise.

    The loop never changes; the instruments do. Simulation sees everything, formal proves or gives a trace, gate-level adds real cells, emulation and FPGA trade visibility for speed, and silicon shows almost nothing. This part applies the method at each stage and teaches how to move a failure to the cheapest stage that still shows it.

    After this part you can

    • Use a formal counterexample as a debug trace.

    • Decide what gate-level simulation and equivalence add.

    • Move a silicon failure back into simulation.

    Lessons in this part

    9 lessons, about 106 min

    1. 1RTL SimulationYou can use RTL simulation's full visibility with the whole debug loop, name the three things it hides, and recognise a failure that RTL simulation cannot show and must move to a later stage.10 min
    2. 2Formal Counterexamples as TracesYou can read a formal counterexample step by step like a waveform, shrink it to the inputs that matter, move the failure closer to the cause with a stronger property, and replay it in simulation as a directed test.13 min
    3. 3Gate-Level SimulationYou can run the RTL bench on a netlist, explain a gate-level failure from the synthesis log, and decide with random start values whether a gate-level X is a real bug or pessimism.13 min
    4. 4Equivalence FailuresYou can read an equivalence report from its unproven points, get the input sequence that separates the two designs, and tell a real difference from a failure caused by unmatched state.12 min
    5. 5Emulation and FPGA PrototypingYou can explain the speed against visibility trade of emulation and FPGA prototyping, design a trigger from a hypothesis, use deterministic replay to walk a failure back to its cause, and move it into simulation.12 min
    6. 6The First Failing Test on SiliconYou can confirm a silicon failure is the chip's, choose observations from least to most intrusive, read a scan dump with a question, load it into simulation, and test a hypothesis by editing one dumped bit.12 min
    7. 7Silicon vs Simulation CorrelationYou can separate a silicon-simulation disagreement into inputs, model and die, align the inputs from a register dump, find the first differing window from signatures, and decide which source to believe for which question.11 min
    8. 8Marginal and Environmental FailuresYou can map a marginal failure over voltage, period and temperature, read a shmoo's shape as setup-type, hold-type or pattern-dependent, measure the margin at the operating point, and pick the next stage that has timing in it.11 min
    9. 9Moving the Failure to the Cheapest StageYou can list the ingredients a failure needs, match them against what each stage contains, move a failure down and prove it is the same failure, and use the cheap stage to map the bug's whole extent.12 min

    Revision sheet

    The part on one page, taken from each lesson's Remember box.

    RTL Simulation

    • RTL simulation shows everything the model does. It cannot show what the model leaves out: wire and gate delays, real start-up values, the real world around the design.

    • Zero delay means no glitches. Logic that is only safe without glitches, like a decoded asynchronous reset, passes every RTL test.

    • When the chip disagrees with a clean RTL run, ask first which of the three gaps the bug could live in.

    Rule of thumb: debug in RTL simulation whenever it can show the bug, and know the three things it cannot show.

    Formal Counterexamples as Traces

    • A bounded check stops at the first failing step, so its trace is already the shortest. Read it from reset, one step per clock.

    • Inputs in steps where they cannot matter are filled in at random by the solver. Pin them with assumptions and check the trace still fails.

    • A property that watches the cause fails earlier than one that watches the symptom. Replay the trace in simulation to make a test.

    Rule of thumb: treat a counterexample as a failing test: read it, shrink it, replay it, then fix and run the same check again.

    Gate-Level Simulation

    • An unknown start value is a free choice for synthesis. It may pick a constant, so the netlist can do something no RTL run showed.

    • Gate-level X depends on the cell models: a mux cell can be as optimistic as RTL, and AND-OR gates more pessimistic than the chip.

    • Real or pessimism: start the X source at 0 and at 1. If the outputs differ, the X is real; if they never do, it is pessimism.

    Rule of thumb: never clear gate-level X by initialising every flop; find each X's source and prove it harmless or fix it.

    Equivalence Failures

    • Each point is proved with its inputs assumed equal, so the unproven point nearest the inputs is the difference; points after it often prove.

    • A real difference has a counterexample from reset. Get it with a miter and read it like a short trace.

    • No counterexample from reset, and a register with no partner in the cone: suspect the setup. Add the mapping; it must prove too.

    Rule of thumb: an unproven point is a question: answer it with a counterexample from reset or a proven mapping, never with a waiver alone.

    Emulation and FPGA Prototyping

    • Fast platforms trade visibility for speed: on an FPGA you see only the signals you chose before the build, in a window of a few thousand samples.

    • Trigger on the symptom first to learn when; then trigger on what the hypothesis says happened earlier. Each replay moves the window back.

    • Replay is only useful if the run is deterministic. Record or control every input that is not, then bring the cycle back to simulation.

    Rule of thumb: a trigger is a hypothesis: write down what you expect to see in the window before you arm it.

    The First Failing Test on Silicon

    • Do not reset a failing chip until the state is saved. Read what does not disturb it first; a scan dump is the last, one-shot step.

    • Two dumps taken apart in time tell a deadlock (nothing moves) from a livelock or a slow chip (something counts).

    • A dump is a state, not a history. Loaded into simulation it reproduces what happens next; it cannot show how the chip got there.

    Rule of thumb: save the state before you touch the chip, and test every theory in simulation from that state before trying it on the bench.

    Silicon vs Simulation Correlation

    • A disagreement has three possible homes: different inputs, a model that cannot show the effect, or this die. Rule out inputs first; they are the commonest.

    • Compare at the finest grain both sides can give: per-window signatures or counters, not one pass or fail at the end.

    • One die differing is a die. Every die differing is the design or the model. Change the die before you change the design.

    Rule of thumb: never compare outputs until the inputs are shown to be the same, and never call silicon wrong from one die.

    Marginal and Environmental Failures

    • A wall that moves with the clock period is setup-type. A band at high voltage or cold that ignores the period is hold-type. Neither is a logic bug.

    • A shmoo belongs to one test at one temperature. Switching-heavy tests and temperature both move the wall, so map the worst test at the worst corner.

    • Ask how far the operating point is from the wall, not whether it passes. One step of margin at 25 C can be none when hot.

    Rule of thumb: a failure that moves with voltage, frequency or temperature is a margin question until a shmoo says otherwise.

    Moving the Failure to the Cheapest Stage

    • The cheapest stage is the cheapest one that contains every ingredient of the failure, not the cheapest one there is. Name the ingredients first.

    • A failure that moved must keep its signature. If the symptom changes, check you still have the same bug, or a new one.

    • A cheap stage pays twice: faster experiments now, and a test that sweeps the space the expensive stage only sampled.

    Rule of thumb: debug where the failure is cheapest to see, prove the fix there and where it was found.

    Practise it

    • Practice question: D flip-flop with asynchronous reset: glitch-free reset

    • Practice question: FSM reset synchronisation and glitch prevention

    • Code lab: DFF with asynchronous reset

    • Code lab: Reset synchroniser

    • Practice question: Formal-assisted coverage: witness traces

    • Interview: run a mock interview on this topic

    Related topics

    • Course hub

    • Previous: Part 5 · Bug Classes

    • Next: Part 7 · Hangs and Deadlocks

    PreviousNext: RTL Simulation

    Up next

    Up nextRTL Simulation

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Part 0 · What Debugging Is
    • Part 1 · Reproduce
    • Part 2 · Observe