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
  • 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
    • The Debug Loop
    • Reproducing Failures
    • Following the Wait
    • Bisection and Delta Debugging
    • Triage at Scale
    • Is It the Testbench?
    • Drills: Debug
  • Part 14: Sign-Off7
  • Part 15: Verification in Context8
  • Part 16: Case Studies5
  • Part 17: Capstones5
  • Part 18: Interview Preparation6
Loading lesson

‹Part 13: Debug
  1. Topics
  2. First Principles of Verification Strategy
  3. Part 13: Debug
  4. Is It the Testbench?

Part 13 · Debug · Senior (S)

Is It the Testbench?

A large share of verification failures are bugs in the testbench, not the design: a wrong expectation, a driver that breaks the protocol, a checker with a wrong model, a race. Telling them apart quickly saves designers' time and the team's credibility. The questions that separate the two, and the testbench bugs met while building this course.

On this page

    Note

    Level: Senior (S) · Answers: How do we find the cause fast?

    Before this: Triage at Scale, False Passes

    Building this course's DCRouter testbenches produced a steady stream of failures that were not DCRouter's fault. A credit audit failed the clean design until the sinks were drained first (lesson 4.8). An arbitration checker failed the clean design in 17 of 30 seeds (lesson 5.5). A formal property failed at step 2 because it ignored the reset cycle (lesson 7.9). Sending all three to the design team's queue would have cost the designers days and the verifiers their credibility.

    How do you know the bug is in the design?

    The obvious answer, and why it breaks

    The obvious assumption is that a failing check found a design bug: that is what checks are for. Testbenches are code too, often as large as the design, written faster and reviewed less. A failure is a disagreement between the design and the testbench's model of the specification; either side can be wrong, and so can the specification.

    The idea: questions that separate the two

    Question

    Points to the testbench if

    Points to the design if

    Does the clean (or previous good) design pass the same test?

    It fails too

    Only the new design fails

    Does the driver obey the interface protocol?

    A protocol assertion on the driver's side fires

    The design's outputs break the protocol

    What does the specification say, exactly?

    The checker expects more than the specification promises (lesson 2.7)

    The design does something the specification forbids

    Is the failure simulator- or ordering-dependent with the same seed?

    Only some simulators or orderings fail: a testbench race

    Consistent across simulators

    Does another, independent check agree?

    No other check sees anything

    A second checker or a formal property also fails

    Does the checker's model make assumptions the pins cannot confirm?

    Yes, as with hidden timing (lesson 5.5)

    No

    Testbench bugs met in this course

    Where

    Symptom

    Cause

    How it was told apart

    Credit audit (4.8)

    Clean design failed the audit

    Sinks still held flits and credits when the audit began

    Failed on the clean design

    Arbitration checker v1 (5.5)

    Priority violations on the clean design

    Grant time assumed from first-flit time

    Failed on the clean design across seeds

    Arbitration checker v2 (5.5)

    Priority violations with credit bugs

    Its own credit count was wrong when the design's was

    The credit audit, an independent check, failed first

    Grey-box FIFO checker (3.4)

    Could never fail on BUG_1

    Checked the design's own full flag

    Planted bug not caught

    Rotation property (7.9)

    Formal failure at step 2 on the clean design

    Ignored the reset cycle

    Failed on the clean design

    Constraints demo (4.3)

    Lengths not shaped as intended

    := instead of :/ in a dist

    Histogram did not match the intent

    Three habits caught every one of these before it reached anyone else: running every new check on the clean design (across seeds), running it against planted bugs (lesson 5.8), and comparing it with an independent check or the intended distribution.

    Reporting a design bug well

    • Show the rule: the specification sentence the design breaks.

    • Show a minimal reproduction (lesson 13.4) and the waveform at the first wrong cycle.

    • Show the clean comparison: the previous good design or a reference model passing.

    • Say what you ruled out: driver protocol, checker assumptions, simulator.

    How real teams handle the split

    Practice

    Purpose

    Protocol assertions on testbench drivers as well as the design

    Testbench protocol bugs caught at once

    New checkers validated on the clean design and planted bugs

    False failures removed before release

    Testbench bugs tracked in the same database

    Their cost visible; their causes learned from

    Bug reports with rule, reproduction and evidence

    Designers' time spent on real design bugs

    What breaks

    A team (illustrative) sent every failure straight to the designers. After weeks in which most turned out to be testbench bugs, designers began to treat verification reports as noise, and a real design bug report sat unread for nine days. Credibility is a verification asset; it is spent by every unchecked report.

    Why this matters

    Senior lens. Before a failure goes to a designer, rule out the testbench: the clean-design comparison, the driver's protocol, the specification's exact words, simulator dependence and an independent check. Validate every checker on clean designs and planted bugs, and track testbench bugs as carefully as design bugs.

    Interview

    Asked: "How do you know the bug is in the design?"

    Weak answer: Because the check failed.

    Strong answer: A failure is a disagreement, and the testbench is as likely to be wrong. I check whether the clean or previous good design passes the same test, whether the driver obeys the protocol, what the specification exactly says versus what the checker expects, whether it depends on the simulator or on event ordering with the same seed (a race), and whether an independent check agrees. Only then does it go to the designer, with the rule, a minimal reproduction and what I ruled out. Validating every new checker on the clean design and planted bugs prevents most testbench bugs from ever being reported.

    Follow-ups: (1) What testbench bug is most common? (2) Why does credibility matter?

    Check yourself Which test would have exposed each of the course's checker bugs before anyone else saw them?

    Mostly running the new check on the clean design, across seeds; for the grey-box FIFO checker, running it against the planted bug it should catch; for arbitration checker v2, an independent check (the credit audit); for the constraints demo, comparing the histogram with the intended distribution.

    Check yourself A failure appears in one simulator but not another. What does that suggest?

    A testbench race or uninitialised state (non-determinism), more likely than a design bug.

    Key takeaways

    • Many failures are testbench bugs; a failure is a disagreement, not a verdict.

    • Separate them with the clean-design comparison, protocol checks, the specification and independent checks.

    • Validate checkers on clean designs and planted bugs, and report design bugs with evidence.

    Keep going

    Next: Drills: Debug. Interview questions, a whiteboard exercise and a ten-question checkpoint for Part 13.

    Related topics

    • Part 13 overview: Debug

    Previous

    128 / 160

    Next: Drills: Debug

    Up next

    Up nextDrills: Debug

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • The Debug Loop
    • Reproducing Failures
    • Following the Wait