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. Where to Check

Part 5 · Checking · Working (W)

Where to Check

A rule can be checked where it applies, every cycle, by a local assertion, or end to end, by a scoreboard comparing outputs with a reference. Local checks fail at the cause and are cheap to debug; end-to-end checks see the whole result and survive redesign. Which rules suit which, decided for DCRouter, and why good testbenches use both.

On this page

    Note

    Level: Working (W) · Answers: How do we know the output is right?

    Before this: Self-Checking Testbenches

    DCRouter's BUG_21 stops input 3 from waking the router. In lesson 4.10 the random hunt caught it through its scoreboard: after 40,000 cycles with flits still undelivered, the run reported "flits still pending" at 439,965 ns. Lesson 5.3 adds a one-line assertion that any valid input wakes the router in the next cycle; with the same stimulus it fails at 39,985 ns, naming the rule and the input. Same bug, same traffic: one check reported a symptom at the end, the other the cause at the moment it happened.

    Should a rule be checked locally where it applies, or end to end at the outputs?

    The obvious answer, and why it breaks

    One obvious answer is "end to end": compare final outputs with a reference model, and every bug that matters shows up there. It does, eventually, as a symptom: a missing packet, a hang, a wrong counter, far from the cause. The other obvious answer, "assert everything locally", turns every rule into a cycle-level property, including rules about data transformations that are much easier to state as "this packet should come out". Each approach is good at different rules.

    The idea: check at the cause or at the effect

    Assertions watch individual rules where they apply, every cycle; the scoreboard compares what leaves the design with what should have.

    Local assertion

    End-to-end scoreboard

    Checks

    A rule at the place and cycle it applies

    The final result against a reference

    Fails

    At the cause, in the cycle it happens

    At the effect, often much later

    Debug

    Points at the rule and the signals

    Points at a wrong output; the cause must be traced back

    Best for

    Protocol and timing rules, relations between signals, illegal states

    Data transformations, routing, ordering, end results

    Survives redesign

    If written on stable interfaces

    Yes, if the reference is at the specification's level

    Misses

    Rules that need a model of the whole function

    Masked or hidden state (lesson 3.3); timing rules with no data effect

    DCRouter, rule by rule

    Rule

    Check

    Why

    R3 whole packets, per-flow order

    Scoreboard

    A statement about results: which packets arrive where, in what order

    R5, R8 out_err on faulty tails

    Scoreboard, plus an assertion that out_err appears only with out_last

    Which packets are faulty is data; where the flag may appear is a local rule

    R1 disabled port never ready

    Assertion

    A relation between configuration and one signal, every cycle

    R7 credits

    Sink overrun check plus a credit audit

    A count the sink can see, and hidden state the audit exposes

    R9, R10 counters

    End-of-test register reads

    Results accumulated over the whole test

    R13 sleep and wake

    Assertions

    Timing rules with no data of their own: a wake that never comes only shows as a hang

    R6 arbitration

    A dedicated checker (lesson 5.10)

    Needs a model of who was waiting when

    Guidelines

    • End to end for what the specification states as results: data, routing, order, counts.

    • Locally for what it states as relations or timing: handshakes, illegal combinations, deadlines.

    • Both for important rules: the assertion finds the cause fast; the scoreboard confirms the result.

    • Neither alone is complete: lesson 5.10 needs scoreboard, assertions and an arbitration checker together.

    How real teams split the work

    Practice

    Purpose

    Protocol assertion checkers on every interface

    Local rules checked everywhere, reused across projects

    Scoreboards per data path

    End-to-end correctness against a reference model

    Designer assertions inside blocks

    Internal rules checked at their source (lesson 3.4)

    What breaks

    A team (illustrative) relied on an end-to-end scoreboard alone for a bus bridge. A handshake bug held valid high for one cycle too long, so a beat was sometimes accepted twice downstream. The scoreboard saw a duplicated transfer thousands of cycles later and reported a data mismatch at the output. It took two days to trace back to the handshake; a one-line assertion on valid and ready would have failed in the cycle it happened.

    Why this matters

    Senior lens. Place each check where its rule lives: results end to end, relations and timing locally. When a bug escapes to a late symptom, ask which local assertion would have fired at the cause and add it; the debug time it saves repays the effort many times.

    Interview

    Asked: "Assertions or scoreboard?"

    Weak answer: Scoreboards, because they check the real outputs.

    Strong answer: Both, for different rules. Assertions check relations and timing where they apply, every cycle (handshakes, illegal states, deadlines, a wake that must happen next cycle), and they fail at the cause, which makes debug fast. Scoreboards check results end to end against a reference (data, routing, ordering, counts), which assertions express badly. Important rules often get both: on DCRouter a wake assertion caught a bug at 40 thousand nanoseconds that the scoreboard only reported as a hang at 440 thousand.

    Follow-ups: (1) Which DCRouter rules suit assertions? (2) Why do assertions make debug faster?

    Check yourself Why is "a valid input wakes the router in the next cycle" a poor fit for a scoreboard?

    It is a timing rule with no data of its own; a scoreboard only sees its effect, much later, as missing or late packets.

    Check yourself Why is "each packet arrives whole at its destination, in order within its flow" a poor fit for assertions alone?

    It is a statement about results across many cycles and packets; a reference model and scoreboard express it directly.

    Key takeaways

    • Local assertions check relations and timing where they apply, and fail at the cause.

    • Scoreboards check results end to end against a reference, and survive redesign.

    • Use both: results end to end, relations and timing locally, and both for important rules.

    Keep going

    Next: Lesson 5.3, Assertions as Local Checkers. DCRouter step 6: assertions on DCRouter's pins.

    Related topics

    • Part 5 overview: Checking

    Previous

    52 / 160

    Next: Assertions as Local Checkers

    Up next

    Up nextAssertions as Local Checkers

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Scoreboards
    • How Precise a Reference Model?
    • Ordering and Timing in Checks