Definition
In the Ibex verification flow, a debug request is treated as a form of external stimulus to the core, alongside other asynchronous events such as interrupts. When a debug request is asserted, the core is expected to enter Debug Mode and update the relevant control/status registers (CSRs) accordingly.
Why ISS Co-Simulation Cannot Directly Check Debug Requests
The end-to-end RTL/ISS co-simulation flow compares the trace log produced by the Ibex core against the trace log produced by a chosen golden-model ISS. Under normal execution the two logs are compared register writeback by register writeback to confirm that the correct data is written to the correct registers in the correct order.
This checking model is explicitly described as breaking down when situations involving external stimulus — including debug requests — are tested. ISS models can simulate traps due to architectural exceptions, but they cannot model traps due to external stimulus such as debug requests. As a result, the ISS trace log will not contain execution information for code run in the debug ROM or in any interrupt handler, and a naive per-writeback comparison would yield false mismatches.
How Debug Requests Are Verified
To support verification of external debug requests, the Ibex test environment relies on two complementary mechanisms:
RISCV-DV handshaking mechanism. The core sends status information to the testbench during program execution, allowing the testbench to analyze whether the core has entered Debug Mode properly and updated the relevant CSRs. The signature address used by this testbench for the handshake is
0x8ffffffc. A small set of API tasks is provided indv/uvm/core_ibex/tests/core_ibex_base_test.svto integrate this mechanism, and the handshake is applied indv/uvm/core_ibex/tests/core_ibex_test_lib.svto provide runtime verification for situations involving external debug requests, interrupt assertions, and memory faults.Modified trace-log comparison. Rather than comparing every register writeback across the full simulation, only the final values contained in every register at the end of the test are compared. This avoids false mismatches caused by code executed in the debug ROM and trap handlers, on the assumption that such code should not corrupt register state elsewhere in the program.
Test Flow Control
The full verification flow, including the handling of debug-request scenarios, is orchestrated by the Makefile at dv/uvm/core_ibex/Makefile, which supports running single tests, full regressions, seeded runs with waveform dumps, verbose logging, parallel execution via LSF, assembly generation, and coverage-enabled regressions.