Supervisor Counter Inhibit
`scountinhibit` is a masked alias of `mcountinhibit`. For counters delegated to S-mode, the associated `mcountinhibit` bits can be accessed via `scountinhibit`. For counters not delegated to S-mode, the associated bits in `scountinhibit` are read-only zero.
A counter _i_ is delegated to S-mode when `mcounteren`[_i_]=1 and `menvcfg.CDE`=1.
When `menvcfg.CDE`=0, attempts to access `scountinhibit` raise an `Illegal Instruction` exception. When Supervisor Counter Delegation is enabled, attempts to access `scountinhibit` from VS-mode or VU-mode raise a `Virtual Instruction` exception.
| 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 | — | CY |
| Bits | Field | Alias | Description | Type | Reset |
|---|---|---|---|---|---|
| [0] | CY | mcountinhibit.CY | Alias of `mcountinhibit.CY` when `mcycle` is delegated to S-mode (`mcounteren.CY`=1); otherwise read-only zero. | return COUNTINHIBIT_EN[0] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[0] ? UNDEFINED_LEGAL : 0; |
| [2] | IR | mcountinhibit.IR | Alias of `mcountinhibit.IR` when `minstret` is delegated to S-mode (`mcounteren.IR`=1); otherwise read-only zero. | return COUNTINHIBIT_EN[2] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[2] ? UNDEFINED_LEGAL : 0; |
| [3] | HPM3 | mcountinhibit.HPM3 | [when="COUNTINHIBIT_EN[3] == true"] Alias of `mcountinhibit.HPM3` when `mhpmcounter3` is delegated to S-mode (`mcounteren.HPM3`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[3] == false"] Since `mcountinhibit.HPM3` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[3] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[3] ? UNDEFINED_LEGAL : 0; |
| [4] | HPM4 | mcountinhibit.HPM4 | [when="COUNTINHIBIT_EN[4] == true"] Alias of `mcountinhibit.HPM4` when `mhpmcounter4` is delegated to S-mode (`mcounteren.HPM4`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[4] == false"] Since `mcountinhibit.HPM4` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[4] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[4] ? UNDEFINED_LEGAL : 0; |
| [5] | HPM5 | mcountinhibit.HPM5 | [when="COUNTINHIBIT_EN[5] == true"] Alias of `mcountinhibit.HPM5` when `mhpmcounter5` is delegated to S-mode (`mcounteren.HPM5`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[5] == false"] Since `mcountinhibit.HPM5` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[5] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[5] ? UNDEFINED_LEGAL : 0; |
| [6] | HPM6 | mcountinhibit.HPM6 | [when="COUNTINHIBIT_EN[6] == true"] Alias of `mcountinhibit.HPM6` when `mhpmcounter6` is delegated to S-mode (`mcounteren.HPM6`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[6] == false"] Since `mcountinhibit.HPM6` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[6] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[6] ? UNDEFINED_LEGAL : 0; |
| [7] | HPM7 | mcountinhibit.HPM7 | [when="COUNTINHIBIT_EN[7] == true"] Alias of `mcountinhibit.HPM7` when `mhpmcounter7` is delegated to S-mode (`mcounteren.HPM7`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[7] == false"] Since `mcountinhibit.HPM7` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[7] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[7] ? UNDEFINED_LEGAL : 0; |
| [8] | HPM8 | mcountinhibit.HPM8 | [when="COUNTINHIBIT_EN[8] == true"] Alias of `mcountinhibit.HPM8` when `mhpmcounter8` is delegated to S-mode (`mcounteren.HPM8`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[8] == false"] Since `mcountinhibit.HPM8` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[8] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[8] ? UNDEFINED_LEGAL : 0; |
| [9] | HPM9 | mcountinhibit.HPM9 | [when="COUNTINHIBIT_EN[9] == true"] Alias of `mcountinhibit.HPM9` when `mhpmcounter9` is delegated to S-mode (`mcounteren.HPM9`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[9] == false"] Since `mcountinhibit.HPM9` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[9] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[9] ? UNDEFINED_LEGAL : 0; |
| [10] | HPM10 | mcountinhibit.HPM10 | [when="COUNTINHIBIT_EN[10] == true"] Alias of `mcountinhibit.HPM10` when `mhpmcounter10` is delegated to S-mode (`mcounteren.HPM10`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[10] == false"] Since `mcountinhibit.HPM10` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[10] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[10] ? UNDEFINED_LEGAL : 0; |
| [11] | HPM11 | mcountinhibit.HPM11 | [when="COUNTINHIBIT_EN[11] == true"] Alias of `mcountinhibit.HPM11` when `mhpmcounter11` is delegated to S-mode (`mcounteren.HPM11`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[11] == false"] Since `mcountinhibit.HPM11` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[11] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[11] ? UNDEFINED_LEGAL : 0; |
| [12] | HPM12 | mcountinhibit.HPM12 | [when="COUNTINHIBIT_EN[12] == true"] Alias of `mcountinhibit.HPM12` when `mhpmcounter12` is delegated to S-mode (`mcounteren.HPM12`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[12] == false"] Since `mcountinhibit.HPM12` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[12] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[12] ? UNDEFINED_LEGAL : 0; |
| [13] | HPM13 | mcountinhibit.HPM13 | [when="COUNTINHIBIT_EN[13] == true"] Alias of `mcountinhibit.HPM13` when `mhpmcounter13` is delegated to S-mode (`mcounteren.HPM13`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[13] == false"] Since `mcountinhibit.HPM13` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[13] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[13] ? UNDEFINED_LEGAL : 0; |
| [14] | HPM14 | mcountinhibit.HPM14 | [when="COUNTINHIBIT_EN[14] == true"] Alias of `mcountinhibit.HPM14` when `mhpmcounter14` is delegated to S-mode (`mcounteren.HPM14`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[14] == false"] Since `mcountinhibit.HPM14` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[14] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[14] ? UNDEFINED_LEGAL : 0; |
| [15] | HPM15 | mcountinhibit.HPM15 | [when="COUNTINHIBIT_EN[15] == true"] Alias of `mcountinhibit.HPM15` when `mhpmcounter15` is delegated to S-mode (`mcounteren.HPM15`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[15] == false"] Since `mcountinhibit.HPM15` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[15] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[15] ? UNDEFINED_LEGAL : 0; |
| [16] | HPM16 | mcountinhibit.HPM16 | [when="COUNTINHIBIT_EN[16] == true"] Alias of `mcountinhibit.HPM16` when `mhpmcounter16` is delegated to S-mode (`mcounteren.HPM16`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[16] == false"] Since `mcountinhibit.HPM16` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[16] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[16] ? UNDEFINED_LEGAL : 0; |
| [17] | HPM17 | mcountinhibit.HPM17 | [when="COUNTINHIBIT_EN[17] == true"] Alias of `mcountinhibit.HPM17` when `mhpmcounter17` is delegated to S-mode (`mcounteren.HPM17`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[17] == false"] Since `mcountinhibit.HPM17` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[17] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[17] ? UNDEFINED_LEGAL : 0; |
| [18] | HPM18 | mcountinhibit.HPM18 | [when="COUNTINHIBIT_EN[18] == true"] Alias of `mcountinhibit.HPM18` when `mhpmcounter18` is delegated to S-mode (`mcounteren.HPM18`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[18] == false"] Since `mcountinhibit.HPM18` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[18] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[18] ? UNDEFINED_LEGAL : 0; |
| [19] | HPM19 | mcountinhibit.HPM19 | [when="COUNTINHIBIT_EN[19] == true"] Alias of `mcountinhibit.HPM19` when `mhpmcounter19` is delegated to S-mode (`mcounteren.HPM19`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[19] == false"] Since `mcountinhibit.HPM19` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[19] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[19] ? UNDEFINED_LEGAL : 0; |
| [20] | HPM20 | mcountinhibit.HPM20 | [when="COUNTINHIBIT_EN[20] == true"] Alias of `mcountinhibit.HPM20` when `mhpmcounter20` is delegated to S-mode (`mcounteren.HPM20`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[20] == false"] Since `mcountinhibit.HPM20` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[20] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[20] ? UNDEFINED_LEGAL : 0; |
| [21] | HPM21 | mcountinhibit.HPM21 | [when="COUNTINHIBIT_EN[21] == true"] Alias of `mcountinhibit.HPM21` when `mhpmcounter21` is delegated to S-mode (`mcounteren.HPM21`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[21] == false"] Since `mcountinhibit.HPM21` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[21] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[21] ? UNDEFINED_LEGAL : 0; |
| [22] | HPM22 | mcountinhibit.HPM22 | [when="COUNTINHIBIT_EN[22] == true"] Alias of `mcountinhibit.HPM22` when `mhpmcounter22` is delegated to S-mode (`mcounteren.HPM22`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[22] == false"] Since `mcountinhibit.HPM22` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[22] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[22] ? UNDEFINED_LEGAL : 0; |
| [23] | HPM23 | mcountinhibit.HPM23 | [when="COUNTINHIBIT_EN[23] == true"] Alias of `mcountinhibit.HPM23` when `mhpmcounter23` is delegated to S-mode (`mcounteren.HPM23`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[23] == false"] Since `mcountinhibit.HPM23` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[23] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[23] ? UNDEFINED_LEGAL : 0; |
| [24] | HPM24 | mcountinhibit.HPM24 | [when="COUNTINHIBIT_EN[24] == true"] Alias of `mcountinhibit.HPM24` when `mhpmcounter24` is delegated to S-mode (`mcounteren.HPM24`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[24] == false"] Since `mcountinhibit.HPM24` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[24] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[24] ? UNDEFINED_LEGAL : 0; |
| [25] | HPM25 | mcountinhibit.HPM25 | [when="COUNTINHIBIT_EN[25] == true"] Alias of `mcountinhibit.HPM25` when `mhpmcounter25` is delegated to S-mode (`mcounteren.HPM25`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[25] == false"] Since `mcountinhibit.HPM25` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[25] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[25] ? UNDEFINED_LEGAL : 0; |
| [26] | HPM26 | mcountinhibit.HPM26 | [when="COUNTINHIBIT_EN[26] == true"] Alias of `mcountinhibit.HPM26` when `mhpmcounter26` is delegated to S-mode (`mcounteren.HPM26`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[26] == false"] Since `mcountinhibit.HPM26` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[26] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[26] ? UNDEFINED_LEGAL : 0; |
| [27] | HPM27 | mcountinhibit.HPM27 | [when="COUNTINHIBIT_EN[27] == true"] Alias of `mcountinhibit.HPM27` when `mhpmcounter27` is delegated to S-mode (`mcounteren.HPM27`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[27] == false"] Since `mcountinhibit.HPM27` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[27] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[27] ? UNDEFINED_LEGAL : 0; |
| [28] | HPM28 | mcountinhibit.HPM28 | [when="COUNTINHIBIT_EN[28] == true"] Alias of `mcountinhibit.HPM28` when `mhpmcounter28` is delegated to S-mode (`mcounteren.HPM28`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[28] == false"] Since `mcountinhibit.HPM28` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[28] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[28] ? UNDEFINED_LEGAL : 0; |
| [29] | HPM29 | mcountinhibit.HPM29 | [when="COUNTINHIBIT_EN[29] == true"] Alias of `mcountinhibit.HPM29` when `mhpmcounter29` is delegated to S-mode (`mcounteren.HPM29`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[29] == false"] Since `mcountinhibit.HPM29` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[29] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[29] ? UNDEFINED_LEGAL : 0; |
| [30] | HPM30 | mcountinhibit.HPM30 | [when="COUNTINHIBIT_EN[30] == true"] Alias of `mcountinhibit.HPM30` when `mhpmcounter30` is delegated to S-mode (`mcounteren.HPM30`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[30] == false"] Since `mcountinhibit.HPM30` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[30] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[30] ? UNDEFINED_LEGAL : 0; |
| [31] | HPM31 | mcountinhibit.HPM31 | [when="COUNTINHIBIT_EN[31] == true"] Alias of `mcountinhibit.HPM31` when `mhpmcounter31` is delegated to S-mode (`mcounteren.HPM31`=1); otherwise read-only zero. [when="COUNTINHIBIT_EN[31] == false"] Since `mcountinhibit.HPM31` is not writable, this field is read-only zero. | return COUNTINHIBIT_EN[31] ? CsrFieldType::RWR : CsrFieldType::RO; | return COUNTINHIBIT_EN[31] ? UNDEFINED_LEGAL : 0; |
if (CSR[menvcfg].CDE == 1'b0) {
raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
}
if (virtual_mode?()) {
raise(ExceptionCode::VirtualInstruction, mode(), $encoding);
}
return $bits(CSR[mcountinhibit]) & $bits(CSR[mcounteren]);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.