Core CSR Encoding

Click Nuclei Core CSR to learn about Core CSR in Nuclei ISA Spec.

Core CSR Register Definitions

group NMSIS_Core_CSR_Registers

NMSIS Core CSR Register Definitions.

The following macros are used for CSR Register Defintions.

Defines

CSR_USTATUS 0x0
CSR_FFLAGS 0x1
CSR_FRM 0x2
CSR_FCSR 0x3
CSR_CYCLE 0xc00
CSR_TIME 0xc01
CSR_INSTRET 0xc02
CSR_HPMCOUNTER3 0xc03
CSR_HPMCOUNTER4 0xc04
CSR_HPMCOUNTER5 0xc05
CSR_HPMCOUNTER6 0xc06
CSR_HPMCOUNTER7 0xc07
CSR_HPMCOUNTER8 0xc08
CSR_HPMCOUNTER9 0xc09
CSR_HPMCOUNTER10 0xc0a
CSR_HPMCOUNTER11 0xc0b
CSR_HPMCOUNTER12 0xc0c
CSR_HPMCOUNTER13 0xc0d
CSR_HPMCOUNTER14 0xc0e
CSR_HPMCOUNTER15 0xc0f
CSR_HPMCOUNTER16 0xc10
CSR_HPMCOUNTER17 0xc11
CSR_HPMCOUNTER18 0xc12
CSR_HPMCOUNTER19 0xc13
CSR_HPMCOUNTER20 0xc14
CSR_HPMCOUNTER21 0xc15
CSR_HPMCOUNTER22 0xc16
CSR_HPMCOUNTER23 0xc17
CSR_HPMCOUNTER24 0xc18
CSR_HPMCOUNTER25 0xc19
CSR_HPMCOUNTER26 0xc1a
CSR_HPMCOUNTER27 0xc1b
CSR_HPMCOUNTER28 0xc1c
CSR_HPMCOUNTER29 0xc1d
CSR_HPMCOUNTER30 0xc1e
CSR_HPMCOUNTER31 0xc1f
CSR_SSTATUS 0x100
CSR_SIE 0x104
CSR_STVEC 0x105
CSR_SSCRATCH 0x140
CSR_SEPC 0x141
CSR_SCAUSE 0x142
CSR_SBADADDR 0x143
CSR_SIP 0x144
CSR_SPTBR 0x180
CSR_MSTATUS 0x300
CSR_MISA 0x301
CSR_MEDELEG 0x302
CSR_MIDELEG 0x303
CSR_MIE 0x304
CSR_MTVEC 0x305
CSR_MCOUNTERE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HPMCOUNTER23 0xb17
CSR_MHPMCOUNTER24 0xb18
CSR_MHPMCOUNTER25 0xb19
CSR_MHPMCOUNTER26 0xb1a
CSR_MHPMCOUNTER27 0xb1b
CSR_MHPMCOUNTER28 0xb1c
CSR_MHPMCOUNTER29 0xb1d
CSR_MHPMCOUNTER30 0xb1e
CSR_MHPMCOUNTER31 0xb1f
CSR_MUCOUNTEREN 0x320
CSR_MSCOUNTEREN 0x321
CSR_MHPMEVENT3 0x323
CSR_MHPMEVENT4 0x324
CSR_MHPMEVENT5 0x325
CSR_MHPMEVENT6 0x326
CSR_MHPMEVENT7 0x327
CSR_MHPMEVENT8 0x328
CSR_MHPMEVENT9 0x329
CSR_MHPMEVENT10 0x32a
CSR_MHPMEVENT11 0x32b
CSR_MHPMEVENT12 0x32c
CSR_MHPMEVENT13 0x32d
CSR_MHPMEVENT14 0x32e
CSR_MHPMEVENT15 0x32f
CSR_MHPMEVENT16 0x330
CSR_MHPMEVENT17 0x331
CSR_MHPMEVENT18 0x332
CSR_MHPMEVENT19 0x333
CSR_MHPMEVENT20 0x334
CSR_MHPMEVENT21 0x335
CSR_MHPMEVENT22 0x336
CSR_MHPMEVENT23 0x337
CSR_MHPMEVENT24 0x338
CSR_MHPMEVENT25 0x339
CSR_MHPMEVENT26 0x33a
CSR_MHPMEVENT27 0x33b
CSR_MHPMEVENT28 0x33c
CSR_MHPMEVENT29 0x33d
CSR_MHPMEVENT30 0x33e
CSR_MHPMEVENT31 0x33f
CSR_MVENDORID 0xf11
CSR_MARCHID 0xf12
CSR_MIMPID 0xf13
CSR_MHARTID 0xf14
CSR_CYCLEH 0xc80
CSR_TIMEH 0xc81
CSR_INSTRETH 0xc82
CSR_HPMCOUNTER3H 0xc83
CSR_HPMCOUNTER4H 0xc84
CSR_HPMCOUNTER5H 0xc85
CSR_HPMCOUNTER6H 0xc86
CSR_HPMCOUNTER7H 0xc87
CSR_HPMCOUNTER8H 0xc88
CSR_HPMCOUNTER9H 0xc89
CSR_HPMCOUNTER10H 0xc8a
CSR_HPMCOUNTER11H 0xc8b
CSR_HPMCOUNTER12H 0xc8c
CSR_HPMCOUNTER13H 0xc8d
CSR_HPMCOUNTER14H 0xc8e
CSR_HPMCOUNTER15H 0xc8f
CSR_HPMCOUNTER16H 0xc90
CSR_HPMCOUNTER17H 0xc91
CSR_HPMCOUNTER18H 0xc92
CSR_HPMCOUNTER19H 0xc93
CSR_HPMCOUNTER20H 0xc94
CSR_HPMCOUNTER21H 0xc95
CSR_HPMCOUNTER22H 0xc96
CSR_HPMCOUNTER23H 0xc97
CSR_HPMCOUNTER24H 0xc98
CSR_HPMCOUNTER25H 0xc99
CSR_HPMCOUNTER26H 0xc9a
CSR_HPMCOUNTER27H 0xc9b
CSR_HPMCOUNTER28H 0xc9c
CSR_HPMCOUNTER29H 0xc9d
CSR_HPMCOUNTER30H 0xc9e
CSR_HPMCOUNTER31H 0xc9f
CSR_MCYCLEH 0xb80
CSR_MINSTRETH 0xb82
CSR_MHPMCOUNTER3H 0xb83
CSR_MHPMCOUNTER4H 0xb84
CSR_MHPMCOUNTER5H 0xb85
CSR_MHPMCOUNTER6H 0xb86
CSR_MHPMCOUNTER7H 0xb87
CSR_MHPMCOUNTER8H 0xb88
CSR_MHPMCOUNTER9H 0xb89
CSR_MHPMCOUNTER10H 0xb8a
CSR_MHPMCOUNTER11H 0xb8b
CSR_MHPMCOUNTER12H 0xb8c
CSR_MHPMCOUNTER13H 0xb8d
CSR_MHPMCOUNTER14H 0xb8e
CSR_MHPMCOUNTER15H 0xb8f
CSR_MHPMCOUNTER16H 0xb90
CSR_MHPMCOUNTER17H 0xb91
CSR_MHPMCOUNTER18H 0xb92
CSR_MHPMCOUNTER19H 0xb93
CSR_MHPMCOUNTER20H 0xb94
CSR_MHPMCOUNTER21H 0xb95
CSR_MHPMCOUNTER22H 0xb96
CSR_MHPMCOUNTER23H 0xb97
CSR_MHPMCOUNTER24H 0xb98
CSR_MHPMCOUNTER25H 0xb99
CSR_MHPMCOU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