Part 12 answers: How do I show debug skill in an interview?
Debug questions are where interviewers separate people who have shipped silicon from people who have read about it. This part rehearses the common forms with model answers, each grounded in a real run, and ends with a full mock interview and a rubric.
Find a bug in a waveform out loud, step by step.
Answer the hang and the intermittent questions with a method.
Explain how you would prove a fix.
Run a 30-minute mock debug interview and score it against a senior and a principal bar.
5 lessons, about 58 min
The part on one page, taken from each lesson's Remember box.
Find the Bug in This Waveform
Ask for the spec before you look. A lane you cannot predict is a lane you cannot call wrong.
Say the expected value slot by slot. The first slot where one output disagrees is the answer; everything after it is consequence.
Finish with the mechanism, the fix and a check: an assertion, a lint rule or a model compare that fires at that slot.
Rule of thumb: never say what is wrong until you have said what should be there.
The Chip Hangs: What Do You Do?
The first move is not to reset. A hung chip is a snapshot of the bug; read every status, counter and debug register before anyone power-cycles it.
Classify before you chase: no attempts anywhere is a deadlock, attempts without progress a livelock, one agent waiting while others work is starvation.
A fix must remove an arrow from the wait-for cycle. A longer timeout or a retry only changes how the test ends.
Rule of thumb: capture the state of a hang before you change anything, and do not call it fixed until the wait-for cycle cannot form.
A Test Fails Once in 500 Runs
First ask what the 500 runs were. 500 seeds is 500 different tests; one seed run 500 times is a nondeterminism question. They need different answers.
A rate from a few failures is wide: 3 in 500 is anywhere from 1 in 810 to 1 in 57 at 95%. Say the interval, not the point.
Prove a fix with enough clean runs to rule out the old rate: here 1,500 fresh clean seeds bound it below 0.20%, against 0.60% before.
Rule of thumb: never call a test flaky until the same seed has passed and failed on the same commit and command.
How Do You Know Your Fix Works?
The repro must fail without the fix and pass with it, in every simulator that showed it. One pass on its own proves nothing.
A check at the cause beats a passing symptom: the clamp assertion fired at cycle 76 before the fix and nowhere in 21 runs after it.
A sweep only counts if it varies what the bug needs. 50 seeds of a test whose timing ignores the seed are one run, 50 times.
Rule of thumb: a fix is proven when the repro, a check on the broken rule and a sweep of what the bug needs all agree, and something in the regression would catch it again.
Mock Debug Interview
Spend the first minutes on the report. Questions about seeds, commits and other tests save the next twenty minutes.
Say a prediction before each exhibit. The interviewer scores the reasoning that chose the experiment, not the luck of the result.
The principal answer does not stop at the fix: why it escaped, what test would have caught it, and what the process change costs.
Rule of thumb: in an interview, name the loop step you are on and the output that will finish it.
Practice question: Waveform debug: a write transaction timeout
Practice question: FIFO flag off-by-one: full and empty at wrap
Practice question: Two-stage valid/ready pipeline
Code lab: Synchronous FIFO (4 entries)
Code lab: Round-robin arbiter
Interview: run a mock interview on this topic