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
  • 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
    • Functional Safety Verification
    • Security Verification
    • Low-Power Verification Strategy
    • CDC and RDC in the Plan
    • Verifying Processors
    • Verifying AI Accelerators
    • Verifying Configurable IP
    • Drills: Verification in Context
  • Part 16: Case Studies5
  • Part 17: Capstones5
  • Part 18: Interview Preparation6
Loading lesson

‹Part 15: Verification in Context
  1. Topics
  2. First Principles of Verification Strategy
  3. Part 15: Verification in Context
  4. Verifying Processors

Part 15 · Verification in Context · Principal (P)

Verifying Processors

A processor's input space is every possible program, and its specification, the instruction set, is unusually precise. Processor teams exploit both: an instruction-set simulator is the reference model, random instruction generators produce programs, and every retired instruction is compared in lock-step. Compliance suites, formal on the pipeline, and the bugs that still escape: hazards, exceptions and the microarchitecture the ISA does not describe.

On this page

    Note

    Level: Principal (P) · Answers: What changes for safety, security, processors and AI hardware?

    Before this: Reference Model Depth, Why Random Works

    DCRouter's input space was packets on four ports, and still it took six lessons of stimulus, checking and coverage to catch 24 bugs. A processor's input space is every program that could ever run on it, in every privilege mode, with interrupts arriving at any instruction. Yet processor teams have one large advantage DCRouter's team never had: an instruction-set architecture that defines, precisely and publicly, the result of every instruction.

    How are processors verified, given that their input space is every program?

    The obvious answer, and why it breaks

    The obvious approach is to run real programs (benchmarks, an operating system boot) and check that they produce correct output. Real programs are a good final test, but they use a narrow slice of the instruction set, rarely hit hazards in unusual orders, and check only their final output, so a wrong intermediate result that does not change the output, or a bug in a rarely used instruction, is missed. And when the output is wrong after a billion instructions, finding the first wrong one is the hard part.

    The idea: the ISA as the oracle, compared at every instruction

    A random program runs on the RTL and on an instruction-set simulator; each retired instruction's effects are compared, so the first divergence is reported at the instruction that caused it.

    Element

    Role

    Instruction-set simulator (ISS)

    The reference model: executes each instruction as the ISA defines it

    Lock-step comparison

    After every retired instruction, compare PC, register and memory writes and traps; a mismatch points at the first wrong instruction

    Random instruction generators

    Programs constrained to be legal, biased towards hazards, branches, exceptions and unusual operands (riscv-dv is an open example, fact V16)

    Compliance suites

    Directed tests that every instruction behaves as the ISA specifies (riscv-arch-test, fact V16)

    Formal on the pipeline

    Forwarding, stalls and hazards proved, often by comparing against a non-pipelined model

    Real software

    Boots and benchmarks on emulation and prototypes (Part 10)

    This is DCRouter's reference model and checked random hunt (lessons 5.5 and 5.10) scaled up, with an oracle someone else has already written precisely. Lock-step comparison is the processor equivalent of comparing every packet rather than the final counts: the earlier the check, the closer the failure report is to the bug.

    What the ISA does not cover

    • Microarchitecture: branch predictors, caches and speculation are invisible in the ISS; bugs that only affect performance need performance checks (lesson 8.7), and leaks need security properties (lesson 15.2).

    • Asynchronous events: interrupts and debug requests arrive at arbitrary points; the ISS must be told when the RTL took them, then check the effects.

    • Implementation-defined behaviour: where the ISA allows choices, the ISS must be configured to match the design's choices, or the comparison reports false mismatches.

    • Memory ordering with several cores: no single sequential reference exists; ordering is checked against the memory model's rules instead.

    • The ISS itself: it can be wrong; compliance suites and a second model help.

    How real teams verify processors

    Practice

    Purpose

    Lock-step ISS comparison in every random test

    Every instruction checked, failures localised

    Generators biased by coverage of hazards, exceptions and privilege transitions

    Rare pipeline interactions exercised

    Compliance suites as a release gate

    Every instruction meets the ISA

    OS boots and benchmarks on emulation

    Long, realistic programs and software interaction

    What breaks

    A team (illustrative) compared only the final register file at the end of each random program. A forwarding bug occasionally gave a wrong value to an instruction whose result was later overwritten, so the final state was correct and the bug survived months of regressions. Switching to lock-step comparison at every retired instruction exposed it in the first night's run.

    Why this matters

    Principal lens. Use the ISA as the oracle and check at every retired instruction: an ISS in lock-step, random generators biased towards hazards and exceptions, compliance suites as a gate, formal on the pipeline, and real software on emulation. Plan separately for what the ISA does not describe: microarchitecture, asynchronous events, multi-core ordering and the ISS's own correctness.

    Interview

    Asked: "How would you verify a RISC-V core?"

    Weak answer: Run the compliance tests and boot Linux.

    Strong answer: Use the ISA as the oracle. Run random programs from a constrained generator such as riscv-dv on the RTL and an instruction-set simulator, and compare every retired instruction in lock-step: PC, register and memory writes, traps, so a mismatch points at the first wrong instruction. Bias the generator towards hazards, branches, exceptions and privilege changes, and measure coverage of them. Use the architectural compliance suite as a gate, formal for forwarding and stalls, and OS boots on emulation for long software runs. Plan separately for interrupts, implementation-defined choices, caches and speculation, which the ISS doesn't describe.

    Follow-ups: (1) How do you handle interrupts in lock-step comparison? (2) What can an ISS not check?

    Check yourself Why is lock-step comparison better than comparing the final state?

    A wrong intermediate value can be overwritten before the end, and when the final state is wrong, finding the first wrong instruction is hard; lock-step reports the first divergence where it happens.

    Check yourself Why can't an ISS find a cache bug that only slows the core down?

    The ISS models architectural results, not timing; a performance-only bug produces correct results, so it needs performance checks.

    Key takeaways

    • A processor's ISA is a precise, ready-made oracle.

    • Random programs, an ISS in lock-step and compliance suites form the core strategy.

    • Plan separately for microarchitecture, asynchronous events and multi-core ordering.

    Keep going

    Next: Lesson 15.6, Verifying AI Accelerators. Tolerances, huge input spaces and model-level oracles.

    Related topics

    • Part 15 overview: Verification in Context

    Previous

    141 / 160

    Next: Verifying AI Accelerators

    Up next

    Up nextVerifying AI Accelerators

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Functional Safety Verification
    • Security Verification
    • Low-Power Verification Strategy