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
    • Self-Checking Testbenches
    • Where to Check
    • Assertions as Local Checkers
    • Scoreboards
    • How Precise a Reference Model?
    • Ordering and Timing in Checks
    • End-of-Test Checks
    • False Passes
    • Checking Performance
    • Hunting the Zoo with Checkers
    • Drills: Checking
  • 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 5: Checking
  1. Topics
  2. First Principles of Verification Strategy
  3. Part 5: Checking
  4. How Precise a Reference Model?

Part 5 · Checking · Senior (S)

How Precise a Reference Model?

A reference model can predict results only, results and order, approximate timing, or every cycle. Each step of precision costs more to build and maintain and constrains the design more. How to choose the depth rule by rule, and a real story from building DCRouter's arbitration checker: three versions, two of them wrong, until it modelled exactly the timing it could be sure of.

On this page

    Note

    Level: Senior (S) · Answers: How do we know the output is right?

    Before this: Scoreboards, Reference Models

    A verification lead proposes a cycle-accurate model of DCRouter: it would predict every output in the exact cycle it appears, so any difference at all is a bug. Building it means re-implementing the FIFOs, the arbiter, the credit counters and the sleep timer, cycle for cycle. It will take as long as the RTL did, and it will have its own bugs. When a designer improves the arbiter, the model must change in lockstep, or every test fails.

    How precise does a reference model need to be?

    The obvious answer, and why it breaks

    The obvious instinct is "as precise as possible": a more precise model catches more. But precision has three costs. It takes effort to build and maintain; it encodes implementation choices the specification never made, so legal changes fail tests (lesson 2.7); and a model as complex as the design is as likely to be wrong. The right depth is the specification's depth, rule by rule, plus just enough timing for the rules that are about time.

    The idea: four depths

    Depth

    Predicts

    Cost

    Good for

    Functional (untimed)

    Final results: which data, which values

    Low

    Data transformations, routing, register values

    Transaction with order

    Results plus the order the specification promises

    Low to medium

    Packets per flow, responses per ID

    Timing-aware (approximate)

    Bounds and events in time: latency limits, who was waiting when

    Medium

    Arbitration, performance, deadlines

    Cycle-accurate

    Every output in its exact cycle

    High; changes with every RTL change

    Rarely: fixed timing interfaces, or a golden model from architecture

    DCRouter's testbench uses all but the last: the scoreboard is transaction-level with per-flow order; counters are functional, checked at the end; sleep, wake and arbitration need timing, and get only the timing they need.

    A real story: three versions of an arbitration checker

    Building lesson 5.10's arbitration checker for this course went through three versions. Each was tested on the clean DCRouter with 30 random seeds before being trusted.

    Version

    Model of time

    Result

    1: judge each packet when its first flit leaves

    Assumed the grant happens just before the first flit

    False priority failures on the clean design in 17 of 30 seeds: a granted packet can wait many cycles for a credit, so the grant was much earlier than assumed

    2: also count credits from the pins

    Inferred the grant time from a credit count kept by the checker

    Clean design passed, but with credit bugs (BUG_9, 10, 22) the checker's count was wrong and it blamed the arbiter: real failures, wrong rule

    3: judge only packets that leave 2 cycles after the previous tail

    Only where the grant time is certain at the pins: the cycle the output became free

    Clean design passes all seeds; arbitration bugs caught; credit bugs left to the credit audit

    Version 3 models less than version 2 and is better. It does not guess hidden timing; it restricts itself to the moments when the pins prove when arbitration happened, which are exactly the moments inputs contend. The lesson generalises: model the timing the specification and the pins make certain, and decline to judge the rest.

    Choosing depth, rule by rule

    • Start functional: most rules are about results.

    • Add order where the specification promises it, by the domain it promises (lesson 5.6).

    • Add timing only for rules about time, as bounds rather than exact cycles.

    • When timing is hidden, judge only where it is observable, and say so in the checker's comments.

    • Validate the model across many seeds on the clean design before trusting its failures.

    How real teams choose

    Practice

    Purpose

    Transaction-level models as the default

    Cheap, stable and independent of the implementation

    Separate performance checkers with bounds

    Timing rules checked without a cycle-accurate model (lesson 5.9)

    Architecture models reused as references

    One model of intent, often untimed or approximately timed

    What breaks

    Versions 1 and 2 above are what breaks: a model that assumed timing it could not see produced false failures, and a model that inferred hidden state from its own bookkeeping blamed the wrong rule when that bookkeeping was wrong. Both looked reasonable on paper and passed the first seed tried; only many seeds and the Bug Zoo exposed them.

    Why this matters

    Principal lens. Ask of every reference model which rules it checks and at what depth, and challenge any cycle-level prediction the specification does not require. Precision the specification did not ask for is a maintenance cost and a source of false failures; precision it did ask for, such as latency bounds, belongs in focused checkers rather than in a cycle-accurate copy of the design.

    Interview

    Asked: "Should the reference model match the design cycle by cycle?"

    Weak answer: Yes, so any difference is caught.

    Strong answer: Usually not. A cycle-accurate model re-implements the design, costs as much to build, breaks on every legal timing change and has its own bugs. I match the specification's depth: functional results and the promised ordering in a transaction-level scoreboard, and timing only for rules about time, as bounds in focused checkers. Where timing is hidden I only judge at moments the pins make certain. On DCRouter's arbitration checker, guessing hidden grant timing gave false failures in 17 of 30 seeds; judging only when the timing was observable fixed it.

    Follow-ups: (1) When is a cycle-accurate model justified? (2) How do you check a latency requirement without one?

    Check yourself Why did the first arbitration checker fail the clean design?

    It assumed each packet was granted just before its first flit left, but a granted packet can wait for a credit, so a high-priority packet that arrived later looked like it had been skipped.

    Check yourself Version 3 judges fewer packets than version 2. Why is it better?

    It judges only when the grant time is certain at the pins, so it never blames the arbiter for errors in its own assumptions, and it still sees the contended moments where arbitration bugs show.

    Key takeaways

    • Match the reference model to the specification's depth: results, promised order, and timing only for rules about time.

    • Cycle-accurate models cost as much as the design and fail on legal changes.

    • Where timing is hidden, judge only where the pins make it certain, and validate on the clean design with many seeds.

    Keep going

    Next: Lesson 5.6, Ordering and Timing in Checks. Reordered, dropped and duplicated outputs.

    Related topics

    • Part 5 overview: Checking

    Previous

    55 / 160

    Next: Ordering and Timing in Checks

    Up next

    Up nextOrdering and Timing in Checks

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Self-Checking Testbenches
    • Where to Check
    • Assertions as Local Checkers