← Home

dpc

Debug PC Register

Address: 0x7B1 (1969) · Privilege: D · Length: MXLEN · Writable · Defined by: Sdext

Upon entry to debug mode, dpc is updated with the virtual address of the next instruction to be executed.

Executing the Program Buffer may cause the value of dpc to become UNSPECIFIED. If that is the case, it must be possible to read/write dpc using an abstract command with postexec not set. The debugger must attempt to save dpc between halting and executing a Program Buffer, and then restore dpc before leaving Debug Mode.

If the Access Register abstract command supports reading dpc while the hart is running, then the value read should be the address of a recently executed instruction.

If the Access Register abstract command supports writing dpc while the hart is running, then the executing program should jump to the written address shortly after the write occurs.

The writability of dpc follows the same rules as mepc as defined in the Privileged Spec. In particular, dpc must be able to hold all valid virtual addresses and the writability of the low bits depends on IALIGN.

When resuming, the hart’s PC is updated to the virtual address stored in dpc. A debugger may write dpc to change where the hart resumes.

This CSR is read/write.

Fields

RV32

31:2423:1615:87:0
DPC

RV64

63:5655:4847:4039:3231:2423:1615:87:0
DPC
BitsFieldAliasDescriptionTypeReset
RV32 [31:0]
RV64 [63:0]
DPCDebug PC ValueRWUNDEFINED_LEGAL

Version af3eaf9+cheriot.f635218

Data from the RISC-V Unified Database, copyright RISC-V International and contributors.

CHERIoT extensions from the CHERIoT specification and Sail model, copyright Microsoft and the CHERIoT Platform contributors.

This site is provided as a community resource and is NOT affiliated with nor endorsed by RISC-V International.