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_VSTART 0x8
CSR_VXSAT 0x9
CSR_VXRM 0xa
CSR_VCSR 0xf
CSR_SEED 0x15
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_VL 0xc20
CSR_VTYPE 0xc21
CSR_VLENB 0xc22
CSR_SSTATUS 0x100
CSR_SEDELEG 0x102
CSR_SIDELEG 0x103
CSR_SIE 0x104
CSR_STVEC 0x105
CSR_STVT 0x107
CSR_STVT 0x107
CSR_SCOUNTEREN 0x106
CSR_SENVCFG 0x10a
CSR_SSTATEEN0 0x10c
CSR_SSTATEEN1 0x10d
CSR_SSTATEEN2 0x10e
CSR_SSTATEEN3 0x10f
CSR_SSCRATCH 0x140
CSR_SEPC 0x141
CSR_SCAUSE 0x142
CSR_STVAL 0x143
CSR_SIP 0x144
CSR_STIMECMP 0x14d
CSR_SATP 0x180
CSR_SCONTEXT 0x5a8
CSR_VSSTATUS 0x200
CSR_VSIE 0x204
CSR_VSTVEC 0x205
CSR_VSSCRATCH 0x240
CSR_VSEPC 0x241
CSR_VSCAUSE 0x242
CSR_VSTVAL 0x243
CSR_VSIP 0x244
CSR_VSTIMECMP 0x24d
CSR_VSATP 0x280
CSR_HSTATUS 0x600
CSR_HEDELEG 0x602
CSR_HIDELEG 0x603
CSR_HIE 0x604
CSR_HTIMEDELTA 0x605
CSR_HCOUNTEREN 0x606
CSR_HGEIE 0x607
CSR_HENVCFG 0x60a
CSR_HSTATEEN0 0x60c
CSR_HSTATEEN1 0x60d
CSR_HSTATEEN2 0x60e
CSR_HSTATEEN3 0x60f
CSR_HTVAL 0x643
CSR_HIP 0x644
CSR_HVIP 0x645
CSR_HTINST 0x64a
CSR_HGATP 0x680
CSR_HCONTEXT 0x6a8
CSR_HGEIP 0xe12
CSR_SCOUNTOVF 0xda0
CSR_UTVT 0x7
CSR_UNXTI 0x45
CSR_UINTSTATUS 0x46
CSR_USCRATCHCSW 0x48
CSR_USCRATCHCSWL 0x49
CSR_SNXTI 0x145
CSR_SINTSTATUS 0x146
CSR_SSCRATCHCSW 0x148
CSR_SSCRATCHCSWL 0x149
CSR_MTVT 0x307
CSR_MTVT 0x307
CSR_MNXTI 0x345
CSR_MNXTI 0x345
CSR_MINTSTATUS 0x346
CSR_MINTSTATUS 0x346
CSR_MSCRATCHCSW 0x348
CSR_MSCRATCHCSW 0x348
CSR_MSCRATCHCSWL 0x349
CSR_MSCRATCHCSWL 0x349
CSR_MSTATUS 0x300
CSR_MISA 0x301
CSR_MEDELEG 0x302
C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_PMPADDR24 0x3c8
CSR_PMPADDR25 0x3c9
CSR_PMPADDR26 0x3ca
CSR_PMPADDR27 0x3cb
CSR_PMPADDR28 0x3cc
CSR_PMPADDR29 0x3cd
CSR_PMPADDR30 0x3ce
CSR_PMPADDR31 0x3cf
CSR_PMPADDR32 0x3d0
CSR_PMPADDR33 0x3d1
CSR_PMPADDR34 0x3d2
CSR_PMPADDR35 0x3d3
CSR_PMPADDR36 0x3d4
CSR_PMPADDR37 0x3d5
CSR_PMPADDR38 0x3d6
CSR_PMPADDR39 0x3d7
CSR_PMPADDR40 0x3d8
CSR_PMPADDR41 0x3d9
CSR_PMPADDR42 0x3da
CSR_PMPADDR43 0x3db
CSR_PMPADDR44 0x3dc
CSR_PMPADDR45 0x3dd
CSR_PMPADDR46 0x3de
CSR_PMPADDR47 0x3df
CSR_PMPADDR48 0x3e0
CSR_PMPADDR49 0x3e1
CSR_PMPADDR50 0x3e2
CSR_PMPADDR51 0x3e3
CSR_PMPADDR52 0x3e4
CSR_PMPADDR53 0x3e5
CSR_PMPADDR54 0x3e6
CSR_PMPADDR55 0x3e7
CSR_PMPADDR56 0x3e8
CSR_PMPADDR57 0x3e9
CSR_PMPADDR58 0x3ea
CSR_PMPADDR59 0x3eb
CSR_PMPADDR60 0x3ec
CSR_PMPADDR61 0x3ed
CSR_PMPADDR62 0x3ee
CSR_PMPADDR63 0x3ef
CSR_MSECCFG 0x747
CSR_TSELECT 0x7a0
CSR_TDATA1 0x7a1
CSR_TDATA2 0x7a2
CSR_TDATA3 0x7a3
CSR_TINFO 0x7a4
CSR_TCONTROL 0x7a5
CSR_MCONTEXT 0x7a8
CSR_MSCONTEXT 0x7aa
CSR_DCSR 0x7b0
CSR_DPC 0x7b1
CSR_DSCRATCH0 0x7b2
CSR_DSCRATCH1 0x7b3
CSR_MCYCLE 0xb00
CSR_MINSTRET 0xb02
CSR_MHPMCOUNTER3 0xb03
CSR_MHPMCOUNTER4 0xb04
CSR_MHPMCOUNTER5 0xb05
CSR_MHPMCOUNTER6 0xb06
CSR_MHPMCOUNTER7 0xb07
CSR_MHPMCOUNTER8 0xb08
CSR_MHPMCOUNTER9 0xb09
CSR_MHPMCOUNTER10 0xb0a
CSR_MHPMCOUNTER11 0xb0b
CSR_MHPMCOUNTER12 0xb0c
CSR_MHPMCOUNTER13 0xb0d
CSR_MHPMCOUNTER14 0xb0e
CSR_MHPMCOUNTER15 0xb0f
CSR_MHPMCOUNTER16 0xb10
CSR_MHPMCOUNTER17 0xb11
CSR_MHPMCOUNTER18 0xb12
CSR_MHPMCOUNTER19 0xb13
CSR_MHPMCOUNTER20 0xb14
CSR_MHPMCOUNTER21 0xb15
CSR_MHPMCOUNTER22 0xb16
CSR_MHPMCOUNTER23 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_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_MCONFIGPTR 0xf15
CSR_STIMECMPH 0x15d
CSR_VSTIMECMPH 0x25d
CSR_HTIMEDELTAH 0x615
CSR_HENVCFGH 0x61a
CSR_HSTATEEN0H 0x61c
CSR_HSTATEEN1H 0x61d
CSR_HSTATEEN2H 0x61e
CSR_HSTATEEN3H 0x61f
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_MSTATUSH 0x310
CSR_MENVCFGH 0x31a
CSR_MSTATEEN0H 0x31c
CSR_MSTATEEN1H 0x31d
CSR_MSTATEEN2H 0x31e
CSR_MSTATEEN3H 0x31f
CSR_MHPMEVENT3H 0x723
CSR_MHPMEVENT4H 0x724
CSR_MHPMEVENT5H 0x725
CSR_MHPMEVENT6H 0x726
CSR_MHPMEVENT7H 0x727
CSR_MHPMEVENT8H 0x728
CSR_MHPMEVENT9H 0x729
CSR_MHPMEVENT10H 0x72a
CSR_MHPMEVENT11H 0x72b
CSR_MHPMEVENT12H 0x72c
CSR_MHPMEVENT13H 0x72d
CSR_MHPMEVENT14H 0x72e
CSR_MHPMEVENT15H 0x72f
CSR_MHPMEVENT16H 0x730
CSR_MHPMEVENT17H 0x731
CSR_MHPMEVENT18H 0x732
CSR_MHPMEVENT19H 0x733
CSR_MHPMEVENT20H 0x734
CSR_MHPMEVENT21H 0x735
CSR_MHPMEVENT22H 0x736
CSR_MHPMEVENT23H 0x737
CSR_MHPMEVENT24H 0x738
CSR_MHPMEVENT25H 0x739
CSR_MHPMEVENT26H 0x73a
CSR_MHPMEVENT27H 0x73b
CSR_MHPMEVENT28H 0x73c
CSR_MHPMEVENT29H 0x73d
CSR_MHPMEVENT30H 0x73e
CSR_MHPMEVENT31H 0x73f
CSR_MSECCFGH 0x757
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_M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