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
    • Levels and What They See
    • What to Verify Where
    • Reuse up the Hierarchy
    • Standard Interfaces and VIP
    • SoC and Software-Driven Tests
    • Hardware-Software Co-Verification
    • Performance and Power Verification
    • Drills: Verification Levels and Reuse
  • 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 8: Verification Levels and Reuse
  1. Topics
  2. First Principles of Verification Strategy
  3. Part 8: Verification Levels and Reuse
  4. Hardware-Software Co-Verification

Part 8 · Verification Levels and Reuse · Principal (P)

Hardware-Software Co-Verification

A chip ships with drivers and firmware, and many failures live in the contract between them and the hardware: register sequences, interrupt handling, error recovery, low-power entry. How to verify driver and hardware together before silicon, using virtual platforms, RTL simulation and emulation, and what DCRouter's driver would need verified.

On this page

    Note

    Level: Principal (P) · Answers: At which level should each thing be verified?

    Before this: SoC and Software-Driven Tests

    DCRouter's hardware is fully verified at block level. Its driver is written by a software team from the register specification. The driver clears error counters by writing ERR_CNT0 through ERR_CNT3 in a loop after reading them, enables low power during initialisation, and treats any counter value of 255 as "counter broken". Each of those choices interacts with a hardware rule (writes clear only one counter, sleep after 8 idle cycles, saturation at 255). If any reading of the specification differs between the two teams, both sides pass their own tests and the product fails.

    How do you verify a driver and its hardware together before silicon exists?

    The obvious answer, and why it breaks

    The obvious plan is to wait for silicon, or at least for an FPGA prototype, and bring the driver up there. Bugs found then are expensive: a hardware bug needs a workaround or a respin, a contract misunderstanding needs both teams. Earlier options exist, each running the real driver against a different model of the hardware, and they trade speed against accuracy.

    The idea: run the real software against hardware models

    The same driver can run on a virtual platform, on emulation or an FPGA prototype, or in RTL simulation, trading speed for accuracy.

    Platform

    Speed

    Accuracy

    Good for

    Virtual platform (transaction-level models)

    Close to real time

    Registers and functions, not timing

    Driver development before RTL; register sequences; error paths

    RTL simulation

    Very slow

    Cycle-exact

    Short driver sequences against the real RTL: initialisation, interrupt handling

    Emulation, FPGA prototype

    Fast

    Cycle-exact RTL

    Full driver and OS bring-up, long scenarios (Part 10)

    Hybrid (virtual processor plus RTL block)

    Fast where it can be

    Exact for the block under test

    A real driver against one RTL block early

    What DCRouter's driver needs verified with the hardware

    Driver behaviour

    Hardware rule it depends on

    Risk if the readings differ

    Clears each ERR_CNT by writing it

    R9: a write clears only that counter

    A loop that writes only ERR_CNT0 expecting all four cleared

    Enables low power at initialisation

    R13: sleep after 8 idle cycles; any valid wakes it

    Driver waits for a status the router cannot show while asleep

    Treats 255 as a broken counter

    R9: saturates at 255 by design

    Error storms reported as hardware faults

    Reads PKT_CNT for statistics

    R10: wraps at 65,535

    Statistics jump backwards

    Handles the unmapped-address error

    R12: pslverr on unmapped addresses

    Bus fault handler never exercised

    Each row is a contract between two teams. Co-verification runs the driver's real code against the real register behaviour, so the contract is tested rather than assumed.

    Practices

    • One register specification, generated for both sides: RTL, verification model and driver headers from the same source (lesson 2.4).

    • Driver tests in the verification plan: initialisation, error recovery, low power, as chip-level scenarios.

    • Hardware checkers stay on under the driver: the driver may do things no testbench did (lesson 8.3).

    • Software engineers review the hardware specification early: their questions are specification review (lesson 2.5).

    How real teams co-verify

    Practice

    Purpose

    Virtual platforms available before RTL

    Driver development and register-sequence checks months earlier

    Driver boot on emulation before tape-out

    The full software stack exercised on the real RTL

    Shared bug tracking between hardware and software

    Contract misunderstandings resolved once, in the specification

    What breaks

    A team (illustrative) shipped a network controller whose driver enabled interrupts before clearing a sticky status bit the hardware set at reset. In every hardware test, the status had been cleared first by the testbench's own initialisation; in every driver test on the virtual platform, the model did not set the bit at reset. The first boot on silicon raised a spurious interrupt and the driver locked up. Running the driver's initialisation once against the RTL would have shown it.

    Why this matters

    Principal lens. Treat the register interface as a contract between two teams and verify it with the real software, not with each team's model of the other. Plan virtual platforms for early driver work and emulation for full-stack runs, and put the driver's critical sequences into the verification plan as first-class scenarios.

    Interview

    Asked: "How do you verify a driver before silicon?"

    Weak answer: Write unit tests for the driver.

    Strong answer: Run the real driver against models of the hardware, choosing speed or accuracy as needed: a virtual platform with register-accurate models from early on for development and error paths; short sequences like initialisation and interrupt handling against the RTL in simulation; and full driver and OS bring-up on emulation or an FPGA prototype. The register specification is generated for both sides from one source, hardware checkers stay enabled under the driver, and the driver's critical sequences are scenarios in the verification plan.

    Follow-ups: (1) What can a virtual platform not check? (2) Why keep hardware assertions on during driver tests?

    Check yourself Why might DCRouter's driver and hardware both pass their own tests yet fail together on clearing error counters?

    If the driver team read "a write clears the counters" as clearing all four, its tests against its own model pass; the hardware clears only the one written, as its tests check.

    Check yourself What is a virtual platform good for, and what does it miss?

    Fast, early driver development and register-sequence and error-path checks; it misses cycle timing and any behaviour its model does not implement.

    Key takeaways

    • Many failures live in the contract between drivers or firmware and the hardware.

    • Run the real software against virtual platforms, RTL simulation and emulation, trading speed for accuracy.

    • Generate the register interface for both sides from one source and put driver sequences in the plan.

    Keep going

    Next: Lesson 8.7, Performance and Power Verification. Verifying numbers and power intent, not just functions.

    Related topics

    • Part 8 overview: Verification Levels and Reuse

    Previous

    87 / 160

    Next: Performance and Power Verification

    Up next

    Up nextPerformance and Power Verification

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Levels and What They See
    • What to Verify Where
    • Reuse up the Hierarchy