Visible to Intel only — GUID: vjr1630033066861
Ixiasoft
3.3.6.1.1. Machine Status Register (mstatus)
3.3.6.1.2. Machine Trap-Vector Base-Address Register (mtvec)
3.3.6.1.3. Machine Interrupt Register (mip and mie)
3.3.6.1.4. Machine Exception Program Counter Register (mepc)
3.3.6.1.5. Machine Cause Register (mcause)
3.3.6.1.6. Machine Trap Value Register (mtval)
4.3.1. General-Purpose Register File
4.3.2. Arithmetic Logic Unit
4.3.3. Multipy and Divide Units
4.3.4. Floating-Point Unit
4.3.5. Custom Instruction
4.3.6. Instruction Cycles
4.3.7. Reset and Debug Signals
4.3.8. Control and Status Registers
4.3.9. Trap Controller (CLINT)
4.3.10. Memory and I/O Organization
4.3.11. RISC-V based Debug Module
4.3.12. Error Correction Code (ECC)
4.3.13. Branch Prediction
4.3.14. Lockstep Module
4.3.9.1.1. Machine Status Register (mstatus)
4.3.9.1.2. Machine Trap-Vector Base-Address Register (mtvec)
4.3.9.1.3. Machine Interrupt Register (mip and mie)
4.3.9.1.4. Machine Exception Program Counter Register (mepc)
4.3.9.1.5. Machine Cause Register (mcause)
4.3.9.1.6. Machine Trap Value Register (mtval)
4.3.9.1.7. Machine Second Trap Value Register (mtval2)
Visible to Intel only — GUID: vjr1630033066861
Ixiasoft
3.4.2.1. Control and Status Register Field
The value in the each CSR registers determines the state of the Nios® V/m processor. The field descriptions are based on the RISC-V specification.
All CSRs can be accessed by using csrr* instruction in Machine mode except for the Debug mode registers (0x7B0 and 0x7B1) which can only be accessed through Debug mode.
Bit Field | |||||||||||||||
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
SD | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
0 | 0 | MPP[1:0] | 0 | 0 | MPIE | 0 | 0 | 0 | MIE | 0 | 0 | 0 |
- Bit 22 (TSR = 0): S-mode is not supported
- Bit 21 (TW = 0): There are no modes less privileged than M-mode.
- Bit 20 (TVM = 0): S-mode is not supported
- Bit 19 (MXR = 0): S-mode is not supported
- Bit 18 (SUM = 0): S-mode and U-mode are not supported
- Bit 17 (MPRV = 0): U-mode is not supported
- Bit 16 and Bit 15 (XS[1:0] = 0): S-mode is not supported
- Bit 14 and Bit 13 (FS[1:0] = 0): “F” extension for Single-Precision Floating-Point is not supported
- Bit 10 and Bit 9 (VS[1:0] = 0): S-mode is not supported
- Bit 8 (SPP = 0): S-mode is not supported
- Bit 6 (UBE = 0): U-mode is not supported
- Bit 5 (SPIE = 0): S-mode is not supported
- Bit 1 (SIE = 0): S-mode is not supported
Bit Field | |||||||||||||||
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
MXL[1:0] | 0 | Extension[25:0] | |||||||||||||
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Extension[25:0] |
Bit Field | |||||||||||||||
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
Platform Interrupt[15:0] | |||||||||||||||
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
0 | MEIE | 0 | 0 | 0 | MTIE | 0 | 0 | 0 | MSIE | 0 | 0 | 0 |
Bit Field | |||||||||||||||
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
Base[31:2] | |||||||||||||||
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Base[31:2] | Mode |
Bit Field | ||||||||||||||
31 | 30 | 29 | 28 | 27 | 26 | 25 | ... | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
mepc |
Bit Field | |||||||||||||||
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
Interrupt | Exception code [30:16] | ||||||||||||||
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Exception code [15:0] |
Bit Field | ||||||||||||||
31 | 30 | 29 | 28 | 27 | 26 | 25 | ... | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
mtval |
Bit Field | |||||||||||||||
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
Platform Interrupt[15:0] | |||||||||||||||
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
0 | MEIP | 0 | 0 | 0 | MTIP | 0 | 0 | 0 | MSIP | 0 | 0 | 0 |
Bit Field | ||||||||||||||
31 | 30 | 29 | 28 | 27 | 26 | 25 | ... | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
tselect |
Bit Field | |||||||||||||||
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
type=2 | dmode | maskmax | hit | select | timing | sizelo | |||||||||
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
action | chain | match | m | 0 | 0 | 0 | execute | store | load |
Bit Field | ||||||||||||||
31 | 30 | 29 | 28 | 27 | 26 | 25 | … | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
tdata2 |
Bit Field | |||||||||||||
31 | 30 | 29 | … | 18 | 17 | 16 | 15 | 14 | 13 | … | 2 | 1 | 0 |
0 | info |
Bit Field | |||||||||||||||
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
debugver | 0 | ||||||||||||||
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
ebreakm | 0 | 0 | 0 | stepie | stopcount | stoptime | cause | 0 | mprven | nmip | step | prv |
Bit Field | ||||||||||||||
31 | 30 | 29 | 28 | 27 | 26 | 25 | ... | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
dpc |
Bit Field | |||||||||||||||
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
Bank | |||||||||||||||
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Bank | Offset |
Bit Field | ||||||||||||||
31 | 30 | 29 | 28 | 27 | 26 | 25 | ... | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Architecture ID |
Bit Field | ||||||||||||||
31 | 30 | 29 | 28 | 27 | 26 | 25 | ... | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Implementation |
Bit Field | ||||||||||||||
31 | 30 | 29 | 28 | 27 | 26 | 25 | ... | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Hart ID |