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
    • A Taxonomy of Bugs
    • Specification Bugs
    • Corner Cases and Boundaries
    • Concurrency and Races
    • Integration and Interface Bugs
    • Configuration and Mode Bugs
    • Performance Bugs
    • Reset, Clock and Power Bugs
    • Where Bugs Hide
    • Classifying the Bug Zoo
    • Drills: What Can Go Wrong
  • 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
  • Part 14: Sign-Off7
  • Part 15: Verification in Context8
  • Part 16: Case Studies5
  • Part 17: Capstones5
  • Part 18: Interview Preparation6
Loading lesson

‹Part 1: What Can Go Wrong
  1. Topics
  2. First Principles of Verification Strategy
  3. Part 1: What Can Go Wrong
  4. Specification Bugs

Part 1 · What Can Go Wrong · Working (W)

Specification Bugs

Some bugs are in the document, not the design: requirements that are wrong, ambiguous, incomplete or contradictory. Why verification against the specification cannot find them, how verification engineers find them anyway, and examples from DCRouter's own rules.

On this page

    Note

    Level: Working (W) · Answers: What can go wrong?

    Before this: A Taxonomy of Bugs, Intent, Design and Implementation

    A verification engineer writing checks for a FIFO reaches the sentence "the FIFO asserts full when it cannot accept more data" and stops. Does full assert in the cycle the last slot fills, or the cycle after? Can a push and a pop in the same cycle be accepted when it is full? The designer has already decided, and so, silently, has the engineer writing the scoreboard. If they decided differently, someone will find out later. If they decided the same wrong way, nobody will.

    What are specification bugs, and how can they be found when every check is written against the specification?

    The obvious answer, and why it breaks

    The obvious view is that the specification is the reference: verification checks the design against it, and the specification is correct by definition. That makes specification bugs invisible to verification by construction. A check written from a wrong sentence enforces the wrong behaviour, and a check written from an ambiguous sentence enforces one reading out of several. The only way to catch them is to treat the specification itself as something to verify.

    The idea: four ways a specification fails

    Kind

    Example

    What happens

    Wrong

    A register reset value that contradicts the boot software's assumption

    The design matches the document; the system fails

    Ambiguous

    "Full when it cannot accept more data": same cycle or next?

    Designer and verifier pick different readings, or the same wrong one

    Incomplete

    Nothing says what happens to a packet in flight when its port is disabled

    Each team invents behaviour; nobody checks it

    Contradictory

    One section says errors are counted per input, another per output

    Whichever section the designer read wins

    How verification finds them anyway

    • Writing a check forces precision: if a sentence cannot be turned into an assertion or a model, it is not yet precise (Part 2).

    • Independent readings disagree: when the model and the design differ, ask which one matches the specification, and whether the specification is clear.

    • Questions are bugs: every question raised while writing checks is filed against the specification and answered in writing.

    • Corner questions: what happens at reset, at limits, on errors, and when two things happen at once? Specifications are most often silent exactly there.

    DCRouter's own specification shows how much precision takes. Compare a vague version of one rule with the one the course uses:

    Diagram
    Vague:   "The router counts errors in ERR_CNT."
    
    Precise: R9. ERR_CNT[i] counts errors of input i, saturating at 255;
             a write clears only that counter.

    The vague version leaves four questions open: per input or per output, what happens at 255, how it is cleared, and whether clearing one clears others. Three of the Bug Zoo's bugs live in exactly those questions.

    How real teams handle specification bugs

    Practice

    Purpose

    Specification review with verification present

    The people who must write checks ask the questions designers skip

    Filing ambiguities as specification bugs

    Answers become written, versioned rules instead of hallway decisions

    Executable specifications and reference models

    A model forces every rule to be precise enough to run (Part 2)

    Validation against real use

    Catches specifications that are precise but wrong (lesson 0.1)

    What breaks

    A DMA specification (illustrative) said a transfer "completes when all data has been written". The designer raised the completion interrupt when the last write left the engine; the verification model raised it when the last write response returned. The scoreboard flagged a mismatch, and the review that followed found the real question: could software read the data as soon as the interrupt arrived? It could not, with the designer's reading. The fix was a specification change and a design change; without the second, independent reading, it would have been a silicon bug.

    Why this matters

    Senior lens. Count the questions you file against a specification as part of verification progress. Early in a project, a verifier who files twenty precise questions has found more risk than one who has written twenty tests, because each question is a disagreement that would otherwise surface as a bug much later.

    Interview

    Asked: "How do you find bugs in the specification itself?"

    Weak answer: The architect is responsible for the spec.

    Strong answer: By treating the spec as something to verify. Writing checks forces precision: if a sentence can't become an assertion or part of a model, it's ambiguous, and I file that as a spec bug and get a written answer. Independent readings help too: when my model and the design disagree, the first question is whether the spec is clear. I look especially at reset, limits, errors and simultaneous events, where specs are most often silent. And precise-but-wrong specs need validation against real use, since verification can't see them.

    Follow-ups: (1) What do you do while waiting for an answer? (2) Who should own the answer?

    Check yourself The model and the design disagree about when a FIFO's full flag rises, and both readings fit the specification's wording. Whose bug is it?

    The specification's: it is ambiguous. File it, get a written answer, then fix whichever of the design or model is wrong.

    Check yourself Why can't a perfect regression find a specification that is precise but wrong?

    Every check enforces the specification, so a design that matches a wrong specification passes; only validation against the real need can show it.

    Key takeaways

    • Specifications fail by being wrong, ambiguous, incomplete or contradictory.

    • Verification against the specification cannot see these bugs, so the specification must itself be verified.

    • Writing checks forces precision: every question raised is a specification bug to file and answer.

    Keep going

    Next: Lesson 1.3, Corner Cases and Boundaries. Full, empty, maximum, wrap-around: where off-by-ones live.

    Related topics

    • Part 1 overview: What Can Go Wrong

    Previous

    15 / 160

    Next: Corner Cases and Boundaries

    Up next

    Up nextCorner Cases and Boundaries

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Concurrency and Races
    • Integration and Interface Bugs
    • Configuration and Mode Bugs