Mechanism and evidence
A doorbell transfers responsibility.
Follow a descriptor from software publication through hardware readiness and acknowledgement, including a timeout recovery path.
Checkpoint 1 · Publish a visible descriptor.
- DESCRIPTOR
- visible
- DOORBELL
- 0
- STATUS
- idle
- OWNERSHIP
- software
Compare all 4 checkpoints
1 · Publish a visible descriptor.
- DESCRIPTOR
- visible
- DOORBELL
- 0
- STATUS
- idle
- OWNERSHIP
- software
2 · Ring the doorbell.
- DESCRIPTOR
- owned
- DOORBELL
- 1
- STATUS
- pending
- OWNERSHIP
- hardware
3 · Hardware responds within the bound.
- DESCRIPTOR
- owned
- DOORBELL
- 0
- STATUS
- ready
- OWNERSHIP
- hardware
4 · Acknowledge and release ownership.
- DESCRIPTOR
- released
- DOORBELL
- 0
- STATUS
- acked
- OWNERSHIP
- software
Publish a visible descriptor.
- Owner
- Software
- Descriptor
- Visible
Program descriptor data and establish the platform-specific visibility required before notifying hardware.
Check descriptor fields and the required ordering/visibility operation.
Inspect the checker Selected checkpoint pseudocode
write_descriptor();
make_descriptor_visible_to_device();Example contract & limitations
Example contract. T is the timeout required by the interface contract, not a numeric platform guarantee. Timeout wins at elapsed ≥ T, including a simultaneous readiness response. The fixture cancels the old request on timeout; a later response is retained as diagnostic evidence and cannot complete a new request. Checkpoints show selected state changes, not equally spaced simulation cycles.
Read the complete walkthrough
Response within T
- Publish a visible descriptor.. Program descriptor data and establish the platform-specific visibility required before notifying hardware. Evidence: Check descriptor fields and the required ordering/visibility operation.
- Ring the doorbell.. Notify hardware only after the descriptor is visible. Hardware now owns the accepted request. Evidence: Observe doorbell acceptance and request identity.
- Hardware responds within the bound.. The ready/status response belongs to the current request and arrives before T. Evidence: Correlate request ID, response status, and the response boundary.
- Acknowledge and release ownership.. Software consumes status and acknowledges exactly once. The completed request can now be retired. Evidence: Check the acknowledgement and return to an idle contract state.
Response after T
- Publish a visible descriptor.. Program descriptor data and establish the platform-specific visibility required before notifying hardware. Evidence: Check descriptor fields and the required ordering/visibility operation.
- Ring the doorbell.. Notify hardware only after the descriptor is visible. Hardware now owns the accepted request. Evidence: Observe doorbell acceptance and request identity.
- T expires before readiness.. The request reaches its timeout without a valid response. Mark it cancelled and enter recovery before issuing replacement work. Evidence: Capture status and ownership at the timeout boundary.
- A late response cannot complete cancelled work.. Retain the old response for diagnosis. Do not count it as a new completion or let it change replacement-request ownership. Evidence: Match the late response to its cancelled request and inspect recovery policy.
Response exactly at T
- Publish a visible descriptor.. Program descriptor data and establish the platform-specific visibility required before notifying hardware. Evidence: Check descriptor fields and the required ordering/visibility operation.
- Ring the doorbell.. Notify hardware only after the descriptor is visible. Hardware now owns the accepted request. Evidence: Observe doorbell acceptance and request identity.
- Timeout wins at the equal boundary.. Ready and expiry coincide at T. This fixture gives expiry priority: cancel the request and retain the simultaneous response as late evidence. Evidence: Capture status and ownership at the timeout boundary.
- A late response cannot complete cancelled work.. Retain the old response for diagnosis. Do not count it as a new completion or let it change replacement-request ownership. Evidence: Match the late response to its cancelled request and inspect recovery policy.
Related implementation: Mailbox doorbell contract
SW writes Doorbell
-> HW starts the mailbox state machine
-> HW signals Ready
-> SW Acknowledges
-> transaction completes within the specified timeout
Interrupt coalescing:
interrupt when packet_count == N
OR when the coalescing timer expiresPages 62 through 65 contain no source code. This native contract preserves the source's required doorbell, Ready/Acknowledge, timeout, recovery, and coalescing relationships.
Understand the failure+
The verification sequence mirrors the firmware flow and checks programming order, hardware work, timeout behavior, interrupt status, acknowledgement, and recovery.
Firmware-equivalent HSI path
The verification environment reuses the software contract while replacing slow full-firmware execution with UVM and DPI-controlled transactions.
- Programming guide / C driver
- Defines the real boot order, registers, headers, and checksum behavior.
- UVM sequence or DPI-C adapter
- Turns software intent into timed bus transactions without a full firmware boot.
- Mailbox Doorbell
- Software write launches the hardware state machine and Ready/Ack protocol.
- HW agent and DUT
- Provide normal, delayed, timeout, interrupt, and coalescing behavior.
- HSI scoreboard
- Checks completion, recovery, N-packet threshold, and timer expiry.
- Programming guide or C API -> firmware-equivalent operation
- Operation -> UVM bus transaction -> Doorbell register
- Doorbell -> hardware Ready -> software Acknowledge
- Slow response -> timeout -> recovery flow
- N packets or timer expiry -> coalesced interrupt
Why it matters
- The real user of modern silicon is often a firmware driver rather than a UVM sequence.
- A poorly defined Hardware-Software Interface can create interrupt storms or mailbox deadlocks that block-level verification never exercised.
- End-to-end integration checks that hardware responds correctly to the programming guide, boot flow, interrupt handling, and recovery behavior used by software.
What is difficult
- A full 50 MB firmware binary can take impractically long to reach main() in a SystemVerilog RTL simulation.
- A UVM reimplementation is fast but can drift when the software team changes the real driver.
- Reusing C driver functions through DPI-C requires an adapter from function calls and software data structures to UVM transactions.
- Mailbox Doorbell protocols combine register ordering, Ready/Acknowledge handshake timing, interrupts, and timeout recovery.
Failure signatures
- A firmware-equivalent sequence no longer matches the current software driver or header definitions.
- A doorbell write does not trigger the expected hardware state machine.
- Hardware never asserts Ready, software never Acknowledges, or either side violates the mailbox timeout.
- A slow hardware response makes the software sequence hang instead of entering recovery.
- Interrupt coalescing fires before N packets, misses N packets, or ignores timer expiry.
- Block-level verification passes even though the complete boot or interrupt-handling order deadlocks.
Compare approaches+
Two viable approaches—and their cost
Firmware-equivalent UVM sequences
Write SystemVerilog sequences that follow the Software Programming Guide and mirror boot and interrupt flows.
- Fast enough for RTL simulation.
- Keeps the testbench in SystemVerilog and makes delays easy to randomize.
- Can drift out of sync when the software team changes its driver.
- Duplicates software control flow and constants unless generation or shared artifacts are used.
DPI-C driver reuse
Call the software team's C functions through DPI-C and adapt those operations into UVM agent transactions.
- Creates a shared source for driver behavior, header values, and checksum algorithms.
- Can expose mismatches in headers and real driver logic.
- Needs a complex adapter between C calls and time-consuming UVM transactions.
- C execution, simulation time, re-entrancy, and software memory assumptions need explicit ownership.
Explain it in an interview+
Interview answer, built from the mechanism
- I focus firmware integration on the Hardware-Software Interface rather than attempting to boot an entire 50 MB image in RTL simulation.
- Firmware-equivalent UVM sequences mirror the exact boot flow and interrupt-handling steps from the programming guide, with randomized hardware delays and negative responses.
- Where practical, I use DPI-C to share the real C header definitions, checksum algorithms, and driver functions. A controlled adapter translates those calls into UVM transactions.
- The main sign-off scenarios are mailbox doorbell handshakes, Ready/Acknowledge timeout and recovery, interrupt service, and coalescing after N packets or timer expiry.
Assign responsibilities+
Component responsibility contract
| Component | Responsibility | Required change |
|---|---|---|
| Firmware-equivalent sequence | Programming flow | Mirror the software boot, register, interrupt, mailbox, and recovery order. |
| DPI-C adapter | Driver reuse | Translate C driver calls, headers, and checksum operations into UVM transactions. |
| HW agent | Timing and fault injection | Randomize Ready, Acknowledge, interrupt, and slow-response behavior. |
| HSI scoreboard | End-to-end contract | Check doorbell state transitions, timeout recovery, and interrupt coalescing. |
Build the checker+
Implementation patterns
SW writes Doorbell
-> HW starts the mailbox state machine
-> HW signals Ready
-> SW Acknowledges
-> transaction completes within the specified timeout
Interrupt coalescing:
interrupt when packet_count == N
OR when the coalescing timer expiresPages 62 through 65 contain no source code. This native contract preserves the source's required doorbell, Ready/Acknowledge, timeout, recovery, and coalescing relationships.
Stress the design+
Stress recipe
- Translate the documented boot flow into a firmware-equivalent sequence and trace every HSI register transition.
- Reuse or compare the software team's headers and checksum algorithms through the DPI-C boundary.
- Write the Doorbell register and require the expected hardware state-machine transition.
- Randomize the latency from Doorbell to Ready and from Ready to software Acknowledge.
- Inject a response slower than the specified timeout and require recovery rather than a blocked sequence.
- Generate N minus 1 packets and require no coalesced interrupt.
- Generate packet N and require the interrupt, then repeat with timer expiry before N.
- Run the same mailbox and interrupt order through boot and post-boot service contexts to expose integration-only deadlocks.
Follow-up questions
What is a doorbell register?
It is a register software writes to notify hardware that a task is ready. The write triggers a hardware state machine.
How do you verify software timeout logic?
Inject slow responses from the hardware agent and require the software sequence to enter its recovery flow instead of hanging.
How do you handle interrupt coalescing in software?
Verify that hardware interrupts software only after N packets arrive or the coalescing timer expires, reducing CPU context-switch overhead.

