Supervisor Counter Enable
Delegates control of the hardware performance-monitoring counters to U-mode
| 31:24 | 23:16 | 15:8 | 7:0 | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| HPM31 | HPM30 | HPM29 | HPM28 | HPM27 | HPM26 | HPM25 | HPM24 | HPM23 | HPM22 | HPM21 | HPM20 | HPM19 | HPM18 | HPM17 | HPM16 | HPM15 | HPM14 | HPM13 | HPM12 | HPM11 | HPM10 | HPM9 | HPM8 | HPM7 | HPM6 | HPM5 | HPM4 | HPM3 | IR | TM | CY |
| Bits | Field | Alias | Description | Type | Reset |
|---|---|---|---|---|---|
| [0] | CY | When both `scounteren.CY` and `mcounteren.CY` are set, the `cycle` CSR (an alias of `mcycle`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.CY`). | if (SCOUNTENABLE_EN[0]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[0]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [1] | TM | When both `scounteren.TM` and `mcounteren.TM` are set, the `time` CSR (an alias of `mtime` memory-mapped CSR) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.TM`). | if (SCOUNTENABLE_EN[1]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[1]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [2] | IR | When both `scounteren.IR` and `mcounteren.IR` are set, the `instret` CSR (an alias of memory-mapped `minstret`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.IR`). | if (SCOUNTENABLE_EN[2]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[2]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [3] | HPM3 | When both `scounteren.HPM3` and `mcounteren.HPM3` are set, the `hpmcounter3` CSR (an alias of `mhpmcounter3`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM3`). | if (SCOUNTENABLE_EN[3]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[3]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [4] | HPM4 | When both `scounteren.HPM4` and `mcounteren.HPM4` are set, the `hpmcounter4` CSR (an alias of `mhpmcounter4`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM4`). | if (SCOUNTENABLE_EN[4]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[4]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [5] | HPM5 | When both `scounteren.HPM5` and `mcounteren.HPM5` are set, the `hpmcounter5` CSR (an alias of `mhpmcounter5`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM5`). | if (SCOUNTENABLE_EN[5]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[5]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [6] | HPM6 | When both `scounteren.HPM6` and `mcounteren.HPM6` are set, the `hpmcounter6` CSR (an alias of `mhpmcounter6`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM6`). | if (SCOUNTENABLE_EN[6]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[6]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [7] | HPM7 | When both `scounteren.HPM7` and `mcounteren.HPM7` are set, the `hpmcounter7` CSR (an alias of `mhpmcounter7`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM7`). | if (SCOUNTENABLE_EN[7]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[7]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [8] | HPM8 | When both `scounteren.HPM8` and `mcounteren.HPM8` are set, the `hpmcounter8` CSR (an alias of `mhpmcounter8`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM8`). | if (SCOUNTENABLE_EN[8]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[8]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [9] | HPM9 | When both `scounteren.HPM9` and `mcounteren.HPM9` are set, the `hpmcounter9` CSR (an alias of `mhpmcounter9`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM9`). | if (SCOUNTENABLE_EN[9]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[9]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [10] | HPM10 | When both `scounteren.HPM10` and `mcounteren.HPM10` are set, the `hpmcounter10` CSR (an alias of `mhpmcounter10`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM10`). | if (SCOUNTENABLE_EN[10]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[10]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [11] | HPM11 | When both `scounteren.HPM11` and `mcounteren.HPM11` are set, the `hpmcounter11` CSR (an alias of `mhpmcounter11`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM11`). | if (SCOUNTENABLE_EN[11]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[11]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [12] | HPM12 | When both `scounteren.HPM12` and `mcounteren.HPM12` are set, the `hpmcounter12` CSR (an alias of `mhpmcounter12`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM12`). | if (SCOUNTENABLE_EN[12]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[12]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [13] | HPM13 | When both `scounteren.HPM13` and `mcounteren.HPM13` are set, the `hpmcounter13` CSR (an alias of `mhpmcounter13`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM13`). | if (SCOUNTENABLE_EN[13]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[13]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [14] | HPM14 | When both `scounteren.HPM14` and `mcounteren.HPM14` are set, the `hpmcounter14` CSR (an alias of `mhpmcounter14`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM14`). | if (SCOUNTENABLE_EN[14]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[14]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [15] | HPM15 | When both `scounteren.HPM15` and `mcounteren.HPM15` are set, the `hpmcounter15` CSR (an alias of `mhpmcounter15`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM15`). | if (SCOUNTENABLE_EN[15]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[15]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [16] | HPM16 | When both `scounteren.HPM16` and `mcounteren.HPM16` are set, the `hpmcounter16` CSR (an alias of `mhpmcounter16`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM16`). | if (SCOUNTENABLE_EN[16]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[16]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [17] | HPM17 | When both `scounteren.HPM17` and `mcounteren.HPM17` are set, the `hpmcounter17` CSR (an alias of `mhpmcounter17`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM17`). | if (SCOUNTENABLE_EN[17]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[17]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [18] | HPM18 | When both `scounteren.HPM18` and `mcounteren.HPM18` are set, the `hpmcounter18` CSR (an alias of `mhpmcounter18`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM18`). | if (SCOUNTENABLE_EN[18]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[18]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [19] | HPM19 | When both `scounteren.HPM19` and `mcounteren.HPM19` are set, the `hpmcounter19` CSR (an alias of `mhpmcounter19`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM19`). | if (SCOUNTENABLE_EN[19]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[19]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [20] | HPM20 | When both `scounteren.HPM20` and `mcounteren.HPM20` are set, the `hpmcounter20` CSR (an alias of `mhpmcounter20`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM20`). | if (SCOUNTENABLE_EN[20]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[20]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [21] | HPM21 | When both `scounteren.HPM21` and `mcounteren.HPM21` are set, the `hpmcounter21` CSR (an alias of `mhpmcounter21`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM21`). | if (SCOUNTENABLE_EN[21]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[21]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [22] | HPM22 | When both `scounteren.HPM22` and `mcounteren.HPM22` are set, the `hpmcounter22` CSR (an alias of `mhpmcounter22`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM22`). | if (SCOUNTENABLE_EN[22]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[22]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [23] | HPM23 | When both `scounteren.HPM23` and `mcounteren.HPM23` are set, the `hpmcounter23` CSR (an alias of `mhpmcounter23`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM23`). | if (SCOUNTENABLE_EN[23]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[23]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [24] | HPM24 | When both `scounteren.HPM24` and `mcounteren.HPM24` are set, the `hpmcounter24` CSR (an alias of `mhpmcounter24`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM24`). | if (SCOUNTENABLE_EN[24]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[24]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [25] | HPM25 | When both `scounteren.HPM25` and `mcounteren.HPM25` are set, the `hpmcounter25` CSR (an alias of `mhpmcounter25`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM25`). | if (SCOUNTENABLE_EN[25]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[25]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [26] | HPM26 | When both `scounteren.HPM26` and `mcounteren.HPM26` are set, the `hpmcounter26` CSR (an alias of `mhpmcounter26`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM26`). | if (SCOUNTENABLE_EN[26]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[26]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [27] | HPM27 | When both `scounteren.HPM27` and `mcounteren.HPM27` are set, the `hpmcounter27` CSR (an alias of `mhpmcounter27`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM27`). | if (SCOUNTENABLE_EN[27]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[27]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [28] | HPM28 | When both `scounteren.HPM28` and `mcounteren.HPM28` are set, the `hpmcounter28` CSR (an alias of `mhpmcounter28`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM28`). | if (SCOUNTENABLE_EN[28]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[28]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [29] | HPM29 | When both `scounteren.HPM29` and `mcounteren.HPM29` are set, the `hpmcounter29` CSR (an alias of `mhpmcounter29`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM29`). | if (SCOUNTENABLE_EN[29]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[29]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [30] | HPM30 | When both `scounteren.HPM30` and `mcounteren.HPM30` are set, the `hpmcounter30` CSR (an alias of `mhpmcounter30`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM30`). | if (SCOUNTENABLE_EN[30]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[30]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} | |
| [31] | HPM31 | When both `scounteren.HPM31` and `mcounteren.HPM31` are set, the `hpmcounter31` CSR (an alias of `mhpmcounter31`) is accessible to U-mode (delegation to VS/VU mode is further handled by `hcounteren.HPM31`). | if (SCOUNTENABLE_EN[31]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
} | if (SCOUNTENABLE_EN[31]) {
return UNDEFINED_LEGAL;
} else {
return 0;
} |
Version af3eaf9+cheriot.f635218
Data from the RISC-V Unified Database, copyright RISC-V International and contributors.
CHERIoT extensions from the CHERIoT specification and Sail model, copyright Microsoft and the CHERIoT Platform contributors.
This site is provided as a community resource and is NOT affiliated with nor endorsed by RISC-V International.