dscratch0
Debug scratch register 0
- Address
0x7B2- Group
- Debug CSRs (0x7A0 to 0x7BF)
- Privilege
DRW(privileged spec CSR listing, Debug Mode Registers)- Access
- read/write; lowest privilege Debug mode only
- Address range
- Debug-mode-only CSRs
- Name in riscv-unified-db
- Debug scratch register
Privileged spec: Debug scratch register 0
Description
Optional scratch register that can be used by implementations that need it. A debugger must not write to this register unless hartinfo explicitly mentions it (the Debug Module may use this register internally).
From riscv-unified-db, reformatted.
Fields
| Field | Bits | Type | Description |
|---|---|---|---|
VALUE | RV32 31-0 / RV64 63-0 | RW-H | Scratch field to hold a value used by debug routines. |
Fields from riscv-unified-db; field types computed by IDL functions there are not shown.
Specification and related pages
- The RISC-V Instruction Set Manual, Volume II: CSR listing (src/priv/csrs.adoc)
- riscv-opcodes csrs.csv
- riscv-unified-db: spec/std/isa/csr/dscratch0.yaml
- csrrw, csrrs, csrrc (Zicsr instructions that access CSRs)