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. From Prose to Rules

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

From Prose to Rules

Specifications are written in prose; checks need rules. A method for turning each sentence into numbered rules that say exactly when, on which signals, and what must hold, with DCRouter's sleep requirement worked through from a vague sentence to assertions.

On this page

    Note

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

    Before this: Intent and the Oracle

    A specification says "the router enters a low-power state when idle and wakes when traffic arrives". A verification engineer has to turn that into checks. Idle for how long? What counts as idle: empty FIFOs, no locked outputs, no valid inputs? Wakes how soon? What happens to a packet that arrives while it is going to sleep? Each question is a decision someone must make, and until it is made there is nothing to check.

    How do you turn a specification sentence into rules a machine can check?

    The obvious answer, and why it breaks

    The obvious approach is to read the sentence, form an impression, and write a check that matches it. The impression fills every gap with an assumption, and the check enforces that assumption. Different engineers fill the gaps differently, and none of the decisions is written down where the designer can see it. The fix is to make each gap a question, and each answer a rule.

    The idea: every rule answers when, where and what

    Part of a rule

    Question

    Sleep example

    Trigger

    When does the rule apply?

    After 8 consecutive idle cycles

    Definition

    What do the words mean, in signals?

    Idle = all FIFOs empty, no output locked, no input valid

    Obligation

    What must hold?

    sleeping rises

    Timing

    Within how long?

    In the next cycle

    Exceptions

    When does it not apply?

    Not when lp_en is clear

    Consequences

    What else follows?

    While sleeping, accept nothing and send nothing

    Worked through, the vague sentence becomes several numbered rules:

    Diagram
    Prose:  "The router enters a low-power state when idle and wakes when traffic arrives."
    
    R13a  With lp_en set, if all FIFOs are empty, no output is locked and no in_vld is high
          for 8 consecutive cycles, sleeping is high in the next cycle.
    R13b  sleeping never rises while any output is locked.
    R13c  While sleeping is high, in_rdy is low on every port and out_vld is low on every port.
    R13d  If sleeping is high and any in_vld is high, sleeping is low in the next cycle.
    R13e  Credit returns (out_crd) are counted while sleeping.

    From rules to checks

    Each rule now maps to one check. Rules about relations between signals become assertions (Part 5); rules about results become reference-model predictions (lesson 2.3).

    design.sv
    1
    2
    3
    4
    5
    // snippet: two of the sleep rules as assertions
    // R13c: while asleep, nothing is accepted or sent.
    assert property (@(posedge clk) disable iff (rst) sleeping |-> (in_rdy == 4'b0) && (out_vld == 4'b0));
    // R13d: any valid input wakes the router in the next cycle.
    assert property (@(posedge clk) disable iff (rst) sleeping && (in_vld != 4'b0) |=> !sleeping);

    Each assertion is one rule, named after it, so a failure points straight to the sentence it enforces.

    The method, as a checklist

    • One idea per rule, numbered, so it can be referenced by checks, coverage and bug reports.

    • Signals, not words: every term ("idle", "full", "error") is defined in terms of signals and states.

    • Explicit timing: same cycle, next cycle, within N cycles, or eventually (which needs a bound before simulation can check it, Part 5).

    • Exceptions stated: modes, resets and configurations where the rule does not apply.

    • Questions filed: anything the specification does not answer becomes a specification bug (lesson 1.2), answered before the rule is final.

    How real teams do it

    Practice

    Purpose

    Numbered requirements in the specification

    Every check, coverage point and bug refers to a rule

    Rule extraction as a review step

    Designers and verifiers agree the rules before RTL and tests

    Assertion names matching rule numbers

    Failures report the rule they break

    What breaks

    DCRouter's three low-power bugs each break one of the rules above: sleeping with an output locked breaks R13b, failing to wake from port 3 breaks R13d, and ignoring credit returns while asleep breaks R13e. With only the prose sentence, none of the three has a check: "wakes when traffic arrives" does not say from which port, and the credits are not mentioned at all.

    Why this matters

    Senior lens. Measure a specification by how many of its sentences survive conversion to rules unchanged. Every sentence that needs a question answered first was a disagreement waiting to happen; getting the answers in writing, early, is cheaper than any test you will write later.

    Interview

    Asked: "How do you turn a spec into checks?"

    Weak answer: Read it carefully and write tests for each feature.

    Strong answer: Sentence by sentence, I turn prose into numbered rules that each answer: when does it apply, what the words mean in signals, what must hold, within what time, and with what exceptions. Anything the spec doesn't answer becomes a filed question. Then each rule maps to one check: relations between signals become named assertions, results become reference-model predictions, and each rule also gets coverage so I know it was exercised. A sentence that can't become a rule isn't precise yet.

    Follow-ups: (1) What do you do with "eventually" in a requirement? (2) Who signs off the rules?

    Check yourself Turn "the FIFO asserts full when it cannot accept more data" into a rule.

    For example: "full is high in a cycle if and only if the FIFO holds 8 entries; while full is high, in_rdy is low." It defines full by occupancy and states the consequence.

    Check yourself Why number rules?

    So checks, coverage points, test plans and bug reports can each refer to exactly one rule, and gaps are visible.

    Key takeaways

    • A checkable rule states trigger, definitions in signals, obligation, timing and exceptions.

    • Each gap in the prose becomes a question, and each answer a numbered rule.

    • Each rule maps to one check (an assertion or a model prediction) and to coverage.

    Keep going

    Next: Lesson 2.3, Reference Models. A model that predicts DCRouter's outputs: DCRouter step 3.

    Related topics

    • Part 2 overview: Specifications as Checkable Rules

    • Protocols course: Writing an Interface Contract

    Previous

    26 / 160

    Next: Reference Models

    Up next

    Up nextReference Models

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Tables and Executable Specifications
    • Specification Review and Ambiguity
    • Requirements Traceability