Visible to Intel only — GUID: wdn1629599723937
Ixiasoft
2.3.8.1. Debug Mode
You can enter the Debug Mode, as specified in the RISC-V architecture specification, in the following ways:
- Halt from Debug Module
- Software breakpoints
- Trigger
Upon entering Debug Mode, Nios® V processor completes the instruction in W-stage. By the order of priority, instruction in M-stage, E-stage, D-stage or F-stage takes the interrupt.
-
When there is a valid instruction, Program Counter writes to the Debug Program Counter, .dpc.
-
If the instruction in M-stage is not valid, then instruction in E-stage takes the interrupt and so on and so forth.
-
If there is no valid instruction in the pipeline, the Program Counter for the next instruction writes to the Debug Program Counter, .dpc.
Note: For branches, the next Program Counter depends on whether a branch was taken or not taken, and whether the branch prediction (if any) was correct.
Debug Module selects Hardware Thread (Hart); which can be in one of the following states:
- Non-existent: Debug Module probes a hart which does not exist.
- Unavailable: Reset or temporary shutdown.
- Running: Normal operation outside of debug.
- Halted: Hart is said to be halted when it is in debug mode.
Figure 3. Debug Module Block Diagram