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
    • Intent and the Oracle
    • From Prose to Rules
    • Reference Models
    • Tables and Executable Specifications
    • Specification Review and Ambiguity
    • Requirements Traceability
    • What Not to Check
    • Drills: Specifications as Checkable Rules
  • 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 2: Specifications as Checkable Rules
  1. Topics
  2. First Principles of Verification Strategy
  3. Part 2: Specifications as Checkable Rules
  4. Intent and the Oracle

Part 2 · Specifications as Checkable Rules · Working (W)

Intent and the Oracle

Every check compares the design with something that knows the right answer: an oracle. Kinds of oracle (rules, reference models, golden results, properties, other implementations), what each costs, and why building and trusting the oracle is often the hardest part of verification.

On this page

    Note

    Level: Working (W) · Answers: What exactly are we checking against?

    Before this: Intent, Design and Implementation

    A team builds a beautiful random testbench for an image scaler: millions of frames, every resolution, every mode. Then someone asks how the testbench knows each output frame is correct. The answer is that it does not: it checks the frame has the right size and no X values. The stimulus was sophisticated; the judgement of right and wrong was almost absent. Without an oracle, a testbench is a very expensive way to watch a design run.

    What decides whether an output is correct, and why is that often the hardest part to build?

    The obvious answer, and why it breaks

    The obvious answer is "the specification decides". But a specification is prose, and prose cannot compare two numbers. Something executable has to turn the specification into an expected answer for every input the stimulus produces, including inputs nobody wrote down. That something, the oracle, must be correct, complete enough for the stimulus, and independent of the design. Building it can take as much effort as the design itself.

    The idea: kinds of oracle

    Oracle

    How it knows the answer

    Good for

    Weakness

    Rules (assertions)

    Checks properties every output must satisfy

    Protocols, invariants, local behaviour

    Says what is forbidden, not the exact answer

    Reference model

    Computes the expected output from the input

    Data transformations, routing, arithmetic

    A second implementation, with its own bugs

    Golden results

    Stored outputs from a trusted source

    Fixed tests, regression of known cases

    Only for inputs someone ran before

    Inverse or round trip

    Undo the operation and compare with the input

    Encoders and decoders, compressors

    Misses errors the inverse also makes

    Another implementation

    Compare with a previous version or a different design

    Re-implementations, optimisations

    Shared mistakes look like agreement

    People

    An expert inspects the result

    Images, audio, early bring-up

    Slow, not repeatable

    Stimulus only creates situations; the oracle is what decides right and wrong. A testbench is only as good as its oracle.

    What a good oracle needs

    • Correctness: an oracle with a bug either hides design bugs or reports false ones.

    • Coverage of the stimulus: it must give an answer for every input the stimulus can produce, not just the cases someone wrote down.

    • Independence: written from the specification by someone other than the designer (lesson 0.3).

    • The right precision: predict what the specification promises, and no more (lesson 2.7).

    How real teams build oracles

    Practice

    Purpose

    Reference models written in a high-level language

    Easier to write and review than RTL; a different implementation

    Assertions for protocol and invariant rules

    Cheap, local oracles that need no expected values

    Golden data from algorithm teams

    An independent source for numerical results

    Oracle reviews against the specification

    The oracle is code, and its bugs are verification bugs

    What breaks

    The opening scaler (illustrative) ran for months with a size-and-X check as its only oracle. When an algorithm team's Python reference was finally connected, the first night found eleven bugs, including a rounding error visible in every frame. The stimulus had exercised all of them from the start; nothing had been able to say the output was wrong.

    Why this matters

    Senior lens. Budget the oracle explicitly when planning: who writes it, from which source, how it is validated, and which outputs it can judge. Stimulus is the visible part of a testbench, but the oracle decides what any test can find, and an incomplete oracle quietly caps the value of every cycle you run.

    Interview

    Asked: "What is the oracle problem in verification?"

    Weak answer: Knowing which tests to run.

    Strong answer: Every check needs something that knows the right answer for the input the stimulus produced, and that's often the hardest part to build. Oracles can be rules checked by assertions, a reference model that computes expected outputs, golden data from a trusted source, an inverse operation, another implementation, or a person. Each has a weakness: models have their own bugs, golden data only covers inputs someone ran, other implementations share mistakes. So the oracle must be correct, cover everything the stimulus generates, be independent of the design, and predict only what the spec promises.

    Follow-ups: (1) How do you validate the oracle itself? (2) Which oracle would you use for a video scaler?

    Check yourself A random testbench checks only that outputs are not X. Which bugs can it find?

    Only bugs that produce unknown values: wrong data, wrong order or wrong timing all pass, because nothing knows the right answer.

    Check yourself Why is "compare with the previous chip's RTL" a risky oracle?

    Mistakes shared by both versions look like agreement, and intended changes look like mismatches that must be explained away.

    Key takeaways

    • Every check needs an oracle: something that knows the right answer for each input.

    • Oracles include rules, reference models, golden data, inverses, other implementations and people, each with a weakness.

    • A testbench is only as good as its oracle; budget, review and validate it like design code.

    Keep going

    Next: Lesson 2.2, From Prose to Rules. Turning specification sentences into numbered, checkable rules.

    Related topics

    • Part 2 overview: Specifications as Checkable Rules

    Previous

    25 / 160

    Next: From Prose to Rules

    Up next

    Up nextFrom Prose to Rules

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Reference Models
    • Tables and Executable Specifications
    • Specification Review and Ambiguity