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

AboutRoadmapCareersInternshipsFAQContactPrivacyTerms
Skip to lesson

Course contents

  • Start Here5
  • SystemVerilog Language Foundations28
  • Object-Oriented SystemVerilog for Verification30
  • Constraint Randomization — Interview-Critical Deep Dive39
  • SystemVerilog Assertions — Interview-Critical Deep Dive41
  • Functional Coverage in SystemVerilog25
  • Testbench Architecture in SystemVerilog24
  • Advanced Language & Integration26
  • Senior & Interview Preparation23
  • Principal-Level Verification34
    • Reusable Testbench Architecture
    • Checking Out-of-Order Traffic
    • Assertion Depth
    • Coverage Modelling for Real Features
    • Capstone: Out-of-Order Memory Controller
      • Spec and Plan
      • Executable Spec: One Bench per Rule
      • Environment
      • Environment Self-Test
      • Checking
      • Testing the Checkers
      • Coverage and Closure
      • Merging Runs and Reading Holes
      • Bug Hunt: Six Bugs and the Full Bench
      • Bug Hunt Results and Sign-Off
    • Principal Judgment
Loading lesson

←Capstone: Out-of-Order Memory Controller
  1. Topics
  2. SystemVerilog
  3. Principal-Level Verification
  4. Capstone: Out-of-Order Memory Controller
  5. Spec and Plan
On this page

    Part 9 of 9, lesson 20 of 34Part 9 of 9/Principal-Level Verification/Lesson 20 of 34Advanced

    Spec and Plan

    The controller's interface and rules, a risk ranking of its features, plan rows with closure criteria, and a directed bench that checks each rule once.

    The design

    ooo_memctl is a 16-word memory behind two request ports and one response port. Each request port carries a 2-bit ID, so there are eight ordering domains, one per {port, id}. Reads are held in an 8-entry table. Each read waits a pseudo-random 0 to 7 cycles before it may leave, and never leaves before an older read on its own ID; a ninth read can wait in the response register. The Part 8 FIFO capstone had one stream and a total order. This one has eight streams and a partial order, which is what changes the checking.

    Interface

    Signals

    Driven by

    Request port 0 and 1

    valid, write, id[1:0], addr[3:0] (word), wdata[31:0], wstrb[3:0]

    Testbench

    ready

    Controller

    Response port

    valid, port, id[1:0], data[31:0]

    Controller

    ready

    Testbench

    Global

    clk, rst_n (asynchronous, active low)

    Testbench

    The rules

    Rule

    Statement

    R1

    Read responses on the same {port, id} return in request order.

    R2

    Responses on different {port, id} may return in any order.

    R3

    A write applies its byte strobes when it is accepted. Writes are posted: they produce no response. A read returns the memory contents at the moment it was accepted.

    R4

    valid/ready on every port. A stalled response holds its payload. A request is accepted only when the read table has a free entry.

    R5

    Reset drops every outstanding read: no response is ever sent for it. Memory contents survive reset.

    R6

    When both ports request in the same cycle, acceptance alternates (round-robin). At most one request is accepted per cycle.

    R3 sets the ordering point. Because read data is fixed at acceptance, the reference model is updated on write acceptance and snapshotted on read acceptance, exactly as in the memory-model lesson. R5 tells the scoreboard what to do on reset: forget outstanding reads, keep the memory model. Writing these down before any code is what lets the checkers be exact.

    Features ranked by risk

    Rank features by how likely a bug is and how bad an escape would be. Likelihood comes from complexity and from how hard the state is to reach; impact comes from what software sees.

    Feature

    Likelihood

    Impact

    Rank

    Why

    Per-ID ordering with a shared table

    High

    High

    1

    Ordering state is spread over the table and per-ID counters

    Reset with reads in flight

    High

    High

    2

    Rarely reached by random traffic; state that survives reset is a classic bug

    Table full and response stalls

    Medium

    High

    3

    Last entry, allocation and release in one cycle

    Byte strobes per port

    Medium

    High

    4

    Silent data corruption

    Arbitration fairness

    Medium

    Medium

    5

    Starvation looks like low performance, not a failure

    Response ID and duplicate control

    Low

    High

    6

    A wrong ID corrupts another transaction's data

    Plan rows with closure criteria

    Each row names its stimulus, the checker that judges it, the coverage that proves it was exercised, and what "done" means. A row without a checker is a hope; a row without coverage cannot be closed.

    Row

    Feature

    Stimulus

    Checker

    Coverage

    Done when

    P1

    R1, R2 ordering

    Same-ID bursts, random latency

    ID scoreboard

    CV2 same-ID depth, CV3 cross-ID overtake

    0 mismatches; CV2 and CV3 at goal

    P2

    R3 strobes

    Partial writes on both ports, reads of hot words

    Memory model through the scoreboard

    CV4 lane x port, CV5 read-after-write

    All 8 lane bins and CV5 at goal

    P3

    R4 back-pressure

    Response ready 25-70%

    a_rsp_stable, drain

    CV1 depth bins, CV1b entry 7, CV6 stalls

    Table found full at least 3 times

    P4

    R5 reset

    Reset in the middle of a stalled phase

    Scoreboard flush, watchdog, drain

    CV8 reset busy, CV9 ID reuse after reset

    Both hit; nothing leaks after reset

    P5

    R6 fairness

    Both ports back to back

    a_fair (two assertions)

    CV7 wins per port

    No assertion failure; both ports win

    P6

    Checker quality

    Six planted bugs

    Each must fail the bench

    n/a

    Every bug caught; table recorded

    Plan rows that say "verify ordering" with no checker or done criterion. They cannot be closed and cannot be reviewed. Every row above names the object that fails the test and the number that ends the work.

    Likely question: “How do you turn a spec into a verification plan?” Answer: number the rules, find the ordering point and the reset semantics because they decide the checker design, rank features by likelihood and impact, and write rows that name stimulus, checker, coverage and a measurable done criterion. Then prove each rule once with a directed test before trusting random runs.

    Check yourself Why does rule R3 matter more to the checker than to the designer?

    It fixes when expected read data is computed. If read data were fixed at response time, a write accepted between a read and its response would change the expected value, and the model would need to snapshot at a different point. Getting the ordering point wrong produces false failures or hides real ones.

    Check yourself The plan ranks reset with reads in flight second, above table-full. Why?

    Random traffic almost never asserts reset, so the state is unreachable unless a test does it on purpose, and state that wrongly survives reset corrupts behaviour long after. Table-full is reached naturally under heavy back-pressure.

    Related topics

    • Capstone: Out-of-Order Memory Controller (topic)

    • Next: Executable Spec

    • Spec to Verification Plan (Part 8)

    • From Spec to Coverage Plan

    Previous

    261 / 275

    Next: Executable Spec: One Bench per Rule

    Up next

    Up nextExecutable Spec: One Bench per Rule

    Sign in to save progress

    Practice this lessonPrevious lessonReport an error

    See also

    • Environment
    • Environment Self-Test
    • Checking