NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
|
Control and Status Registers (CSR) definitions. More...
#include <stdint.h>
Go to the source code of this file.
Control and Status Registers (CSR) definitions.
enum NEORV32_CSR_enum |
Available CPU Control and Status Registers (CSRs)
Enumerator | |
---|---|
CSR_FFLAGS | 0x001 - fflags: Floating-point accrued exception flags (NEORV32_CSR_FFLAGS_enum) |
CSR_FRM | 0x002 - frm: Floating-point dynamic rounding mode |
CSR_FCSR | 0x003 - fcsr: Floating-point control/status register (frm + fflags) |
CSR_MSTATUS | 0x300 - mstatus: Machine status register (NEORV32_CSR_MSTATUS_enum) |
CSR_MISA | 0x301 - misa: Machine ISA and extensions (NEORV32_CSR_MISA_enum) |
CSR_MIE | 0x304 - mie: Machine interrupt-enable register (NEORV32_CSR_MIE_enum) |
CSR_MTVEC | 0x305 - mtvec: Machine trap-handler base address |
CSR_MCOUNTEREN | 0x305 - mcounteren: Machine counter enable register (NEORV32_CSR_MCOUNTEREN_enum) |
CSR_MSTATUSH | 0x310 - mstatush: Machine status register - high word |
CSR_MCOUNTINHIBIT | 0x320 - mcountinhibit: Machine counter-inhibit register (NEORV32_CSR_MCOUNTINHIBIT_enum) |
CSR_MENVCFG | 0x30a - menvcfg: Machine environment configuration register - low word |
CSR_MENVCFGH | 0x31a - menvcfgh: Machine environment configuration register - high word |
CSR_MHPMEVENT3 | 0x323 - mhpmevent3: Machine hardware performance monitor event selector 3 (NEORV32_HPMCNT_EVENT_enum) |
CSR_MHPMEVENT4 | 0x324 - mhpmevent4: Machine hardware performance monitor event selector 4 (NEORV32_HPMCNT_EVENT_enum) |
CSR_MHPMEVENT5 | 0x325 - mhpmevent5: Machine hardware performance monitor event selector 5 (NEORV32_HPMCNT_EVENT_enum) |
CSR_MHPMEVENT6 | 0x326 - mhpmevent6: Machine hardware performance monitor event selector 6 (NEORV32_HPMCNT_EVENT_enum) |
CSR_MHPMEVENT7 | 0x327 - mhpmevent7: Machine hardware performance monitor event selector 7 (NEORV32_HPMCNT_EVENT_enum) |
CSR_MHPMEVENT8 | 0x328 - mhpmevent8: Machine hardware performance monitor event selector 8 (NEORV32_HPMCNT_EVENT_enum) |
CSR_MHPMEVENT9 | 0x329 - mhpmevent9: Machine hardware performance monitor event selector 9 (NEORV32_HPMCNT_EVENT_enum) |
CSR_MHPMEVENT10 | 0x32a - mhpmevent10: Machine hardware performance monitor event selector 10 (NEORV32_HPMCNT_EVENT_enum) |
CSR_MHPMEVENT11 | 0x32b - mhpmevent11: Machine hardware performance monitor event selector 11 (NEORV32_HPMCNT_EVENT_enum) |
CSR_MHPMEVENT12 | 0x32c - mhpmevent12: Machine hardware performance monitor event selector 12 (NEORV32_HPMCNT_EVENT_enum) |
CSR_MHPMEVENT13 | 0x32d - mhpmevent13: Machine hardware performance monitor event selector 13 (NEORV32_HPMCNT_EVENT_enum) |
CSR_MHPMEVENT14 | 0x32e - mhpmevent14: Machine hardware performance monitor event selector 14 (NEORV32_HPMCNT_EVENT_enum) |
CSR_MHPMEVENT15 | 0x32f - mhpmevent15: Machine hardware performance monitor event selector 15 (NEORV32_HPMCNT_EVENT_enum) |
CSR_MSCRATCH | 0x340 - mscratch: Machine scratch register |
CSR_MEPC | 0x341 - mepc: Machine exception program counter |
CSR_MCAUSE | 0x342 - mcause: Machine trap cause (NEORV32_EXCEPTION_CODES_enum) |
CSR_MTVAL | 0x343 - mtval: Machine trap value |
CSR_MIP | 0x344 - mip: Machine interrupt pending register (NEORV32_CSR_MIP_enum) |
CSR_MTINST | 0x34a - mtinst: Machine trap instruction |
CSR_PMPCFG0 | 0x3a0 - pmpcfg0: Physical memory protection configuration register 0: regions 0..3 (NEORV32_PMPCFG_ATTRIBUTES_enum, NEORV32_PMP_MODES_enum) |
CSR_PMPCFG1 | 0x3a1 - pmpcfg1: Physical memory protection configuration register 1: regions 4..7 (NEORV32_PMPCFG_ATTRIBUTES_enum, NEORV32_PMP_MODES_enum) |
CSR_PMPCFG2 | 0x3a2 - pmpcfg2: Physical memory protection configuration register 2: regions 8..11 (NEORV32_PMPCFG_ATTRIBUTES_enum, NEORV32_PMP_MODES_enum) |
CSR_PMPCFG3 | 0x3a3 - pmpcfg3: Physical memory protection configuration register 3: regions 12..15 (NEORV32_PMPCFG_ATTRIBUTES_enum, NEORV32_PMP_MODES_enum) |
CSR_PMPADDR0 | 0x3b0 - pmpaddr0: Physical memory protection address register 0 |
CSR_PMPADDR1 | 0x3b1 - pmpaddr1: Physical memory protection address register 1 |
CSR_PMPADDR2 | 0x3b2 - pmpaddr2: Physical memory protection address register 2 |
CSR_PMPADDR3 | 0x3b3 - pmpaddr3: Physical memory protection address register 3 |
CSR_PMPADDR4 | 0x3b4 - pmpaddr4: Physical memory protection address register 4 |
CSR_PMPADDR5 | 0x3b5 - pmpaddr5: Physical memory protection address register 5 |
CSR_PMPADDR6 | 0x3b6 - pmpaddr6: Physical memory protection address register 6 |
CSR_PMPADDR7 | 0x3b7 - pmpaddr7: Physical memory protection address register 7 |
CSR_PMPADDR8 | 0x3b8 - pmpaddr8: Physical memory protection address register 8 |
CSR_PMPADDR9 | 0x3b9 - pmpaddr9: Physical memory protection address register 9 |
CSR_PMPADDR10 | 0x3ba - pmpaddr10: Physical memory protection address register 10 |
CSR_PMPADDR11 | 0x3bb - pmpaddr11: Physical memory protection address register 11 |
CSR_PMPADDR12 | 0x3bc - pmpaddr12: Physical memory protection address register 12 |
CSR_PMPADDR13 | 0x3bd - pmpaddr13: Physical memory protection address register 13 |
CSR_PMPADDR14 | 0x3be - pmpaddr14: Physical memory protection address register 14 |
CSR_PMPADDR15 | 0x3bf - pmpaddr15: Physical memory protection address register 15 |
CSR_TSELECT | 0x7a0 - tselect: Trigger select |
CSR_TDATA1 | 0x7a1 - tdata1: Trigger data register 0 |
CSR_TDATA2 | 0x7a2 - tdata2: Trigger data register 1 |
CSR_TINFO | 0x7a4 - tinfo: Trigger info |
CSR_DCSR | 0x7b0 - dcsr: Debug status and control register |
CSR_DPC | 0x7b1 - dpc: Debug program counter |
CSR_DSCRATCH0 | 0x7b2 - dscratch0: Debug scratch register |
CSR_CFUREG0 | 0x800 - cfureg0: custom CFU CSR 0 |
CSR_CFUREG1 | 0x801 - cfureg1: custom CFU CSR 1 |
CSR_CFUREG2 | 0x802 - cfureg2: custom CFU CSR 2 |
CSR_CFUREG3 | 0x803 - cfureg3: custom CFU CSR 3 |
CSR_MCYCLE | 0xb00 - mcycle: Machine cycle counter low word |
CSR_MINSTRET | 0xb02 - minstret: Machine instructions-retired counter low word |
CSR_MHPMCOUNTER3 | 0xb03 - mhpmcounter3: Machine hardware performance monitor 3 counter low word |
CSR_MHPMCOUNTER4 | 0xb04 - mhpmcounter4: Machine hardware performance monitor 4 counter low word |
CSR_MHPMCOUNTER5 | 0xb05 - mhpmcounter5: Machine hardware performance monitor 5 counter low word |
CSR_MHPMCOUNTER6 | 0xb06 - mhpmcounter6: Machine hardware performance monitor 6 counter low word |
CSR_MHPMCOUNTER7 | 0xb07 - mhpmcounter7: Machine hardware performance monitor 7 counter low word |
CSR_MHPMCOUNTER8 | 0xb08 - mhpmcounter8: Machine hardware performance monitor 8 counter low word |
CSR_MHPMCOUNTER9 | 0xb09 - mhpmcounter9: Machine hardware performance monitor 9 counter low word |
CSR_MHPMCOUNTER10 | 0xb0a - mhpmcounter10: Machine hardware performance monitor 10 counter low word |
CSR_MHPMCOUNTER11 | 0xb0b - mhpmcounter11: Machine hardware performance monitor 11 counter low word |
CSR_MHPMCOUNTER12 | 0xb0c - mhpmcounter12: Machine hardware performance monitor 12 counter low word |
CSR_MHPMCOUNTER13 | 0xb0d - mhpmcounter13: Machine hardware performance monitor 13 counter low word |
CSR_MHPMCOUNTER14 | 0xb0e - mhpmcounter14: Machine hardware performance monitor 14 counter low word |
CSR_MHPMCOUNTER15 | 0xb0f - mhpmcounter15: Machine hardware performance monitor 15 counter low word |
CSR_MCYCLEH | 0xb80 - mcycleh: Machine cycle counter high word |
CSR_MINSTRETH | 0xb82 - minstreth: Machine instructions-retired counter high word |
CSR_MHPMCOUNTER3H | 0xb83 - mhpmcounter3 : Machine hardware performance monitor 3 counter high word |
CSR_MHPMCOUNTER4H | 0xb84 - mhpmcounter4h: Machine hardware performance monitor 4 counter high word |
CSR_MHPMCOUNTER5H | 0xb85 - mhpmcounter5h: Machine hardware performance monitor 5 counter high word |
CSR_MHPMCOUNTER6H | 0xb86 - mhpmcounter6h: Machine hardware performance monitor 6 counter high word |
CSR_MHPMCOUNTER7H | 0xb87 - mhpmcounter7h: Machine hardware performance monitor 7 counter high word |
CSR_MHPMCOUNTER8H | 0xb88 - mhpmcounter8h: Machine hardware performance monitor 8 counter high word |
CSR_MHPMCOUNTER9H | 0xb89 - mhpmcounter9h: Machine hardware performance monitor 9 counter high word |
CSR_MHPMCOUNTER10H | 0xb8a - mhpmcounter10h: Machine hardware performance monitor 10 counter high word |
CSR_MHPMCOUNTER11H | 0xb8b - mhpmcounter11h: Machine hardware performance monitor 11 counter high word |
CSR_MHPMCOUNTER12H | 0xb8c - mhpmcounter12h: Machine hardware performance monitor 12 counter high word |
CSR_MHPMCOUNTER13H | 0xb8d - mhpmcounter13h: Machine hardware performance monitor 13 counter high word |
CSR_MHPMCOUNTER14H | 0xb8e - mhpmcounter14h: Machine hardware performance monitor 14 counter high word |
CSR_MHPMCOUNTER15H | 0xb8f - mhpmcounter15h: Machine hardware performance monitor 15 counter high word |
CSR_CYCLE | 0xc00 - cycle: User cycle counter low word |
CSR_INSTRET | 0xc02 - instret: User instructions-retired counter low word |
CSR_CYCLEH | 0xc80 - cycleh: User cycle counter high word |
CSR_INSTRETH | 0xc82 - instreth: User instructions-retired counter high word |
CSR_MVENDORID | 0xf11 - mvendorid: Machine vendor ID |
CSR_MARCHID | 0xf12 - marchid: Machine architecture ID |
CSR_MIMPID | 0xf13 - mimpid: Machine implementation ID |
CSR_MHARTID | 0xf14 - mhartid: Machine hardware thread ID |
CSR_MCONFIGPTR | 0xf15 - mconfigptr: Machine configuration pointer register |
CSR_MXISA | 0xfc0 - mxisa: Machine extended ISA and extensions (NEORV32_CSR_XISA_enum) |
CPU fflags (fcsr) CSR (r/w): FPU accrued exception flags
CPU mcountinhibitCSR (r/w): Machine counter-inhibit
enum NEORV32_CSR_MIE_enum |
CPU mie CSR (r/w): Machine interrupt enable
enum NEORV32_CSR_MIP_enum |
CPU mip CSR (r/-): Machine interrupt pending
CPU misa CSR (r/-): Machine instruction set extensions
CPU mstatus CSR (r/w): Machine status
CPU mxisa CSR (r/-): Machine extended instruction set extensions (NEORV32-specific)
Trap codes from mcause CSR.
CPU mhpmevent hardware performance monitor events
CPU pmpcfg PMP configuration attributes
Enumerator | |
---|---|
PMPCFG_R | CPU pmpcfg attribute (0): Read |
PMPCFG_W | CPU pmpcfg attribute (1): Write |
PMPCFG_X | CPU pmpcfg attribute (2): Execute |
PMPCFG_A_LSB | CPU pmpcfg attribute (3): Mode LSB NEORV32_PMP_MODES_enum |
PMPCFG_A_MSB | CPU pmpcfg attribute (4): Mode MSB NEORV32_PMP_MODES_enum |
PMPCFG_L | CPU pmpcfg attribute (7): Locked |