scountinhibit
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.
Attributes
CSR Address |
0x120 |
|---|---|
Defining extension |
(Ssccfg && |
Length |
32-bit |
Privilege Mode |
S |
Field Summary
| Name | Location | Type | Reset Value |
|---|---|---|---|
0 |
RW-R |
UNDEFINED_LEGAL |
|
2 |
RW-R |
UNDEFINED_LEGAL |
|
3 |
RW-R |
UNDEFINED_LEGAL |
|
4 |
RW-R |
UNDEFINED_LEGAL |
|
5 |
RW-R |
UNDEFINED_LEGAL |
|
6 |
RW-R |
UNDEFINED_LEGAL |
|
7 |
RW-R |
UNDEFINED_LEGAL |
|
8 |
RW-R |
UNDEFINED_LEGAL |
|
9 |
RW-R |
UNDEFINED_LEGAL |
|
10 |
RW-R |
UNDEFINED_LEGAL |
|
11 |
RO |
0 |
|
12 |
RO |
0 |
|
13 |
RO |
0 |
|
14 |
RO |
0 |
|
15 |
RO |
0 |
|
16 |
RO |
0 |
|
17 |
RO |
0 |
|
18 |
RO |
0 |
|
19 |
RO |
0 |
|
20 |
RO |
0 |
|
21 |
RO |
0 |
|
22 |
RO |
0 |
|
23 |
RO |
0 |
|
24 |
RO |
0 |
|
25 |
RO |
0 |
|
26 |
RO |
0 |
|
27 |
RO |
0 |
|
28 |
RO |
0 |
|
29 |
RO |
0 |
|
30 |
RO |
0 |
|
31 |
RO |
0 |
Fields
CY
- Location
-
scountinhibit[0] - Description
-
Alias of mcountinhibit.CY when mcycle is delegated to S-mode (mcounteren.CY=1); otherwise read-only zero.
- Type
RW-R |
Read-Write Restricted Field is writable by software. Only certain values are legal. Writing an illegal value into the field is ignored, and the field retains its prior state. |
- Reset value
-
UNDEFINED_LEGAL
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.if (CSR[menvcfg].CDE == 1'b0) { raise(ExceptionCode::IllegalInstruction, mode(), $encoding); } if (virtual_mode?()) { raise(ExceptionCode::VirtualInstruction, mode(), $encoding); } if (CSR[mcounteren].CY == 1'b1) { CSR[mcountinhibit].CY = csr_value.CY; return csr_value.CY; } return 1'b0;
IR
- Location
-
scountinhibit[2] - Description
-
Alias of mcountinhibit.IR when minstret is delegated to S-mode (mcounteren.IR=1); otherwise read-only zero.
- Type
RW-R |
Read-Write Restricted Field is writable by software. Only certain values are legal. Writing an illegal value into the field is ignored, and the field retains its prior state. |
- Reset value
-
UNDEFINED_LEGAL
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.if (CSR[menvcfg].CDE == 1'b0) { raise(ExceptionCode::IllegalInstruction, mode(), $encoding); } if (virtual_mode?()) { raise(ExceptionCode::VirtualInstruction, mode(), $encoding); } if (CSR[mcounteren].IR == 1'b1) { CSR[mcountinhibit].IR = csr_value.IR; return csr_value.IR; } return 1'b0;
HPM3
- Location
-
scountinhibit[3] - Description
Alias of mcountinhibit.HPM3 when mhpmcounter3 is delegated to S-mode (mcounteren.HPM3=1); otherwise read-only zero.
+
Since mcountinhibit.HPM3 is not writable, this field is read-only zero.
- Type
RW-R |
Read-Write Restricted Field is writable by software. Only certain values are legal. Writing an illegal value into the field is ignored, and the field retains its prior state. |
- Reset value
-
UNDEFINED_LEGAL
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.if (CSR[menvcfg].CDE == 1'b0) { raise(ExceptionCode::IllegalInstruction, mode(), $encoding); } if (virtual_mode?()) { raise(ExceptionCode::VirtualInstruction, mode(), $encoding); } if (CSR[mcounteren].HPM3 == 1'b1) { CSR[mcountinhibit].HPM3 = csr_value.HPM3; return csr_value.HPM3; } return 1'b0;
HPM4
- Location
-
scountinhibit[4] - Description
Alias of mcountinhibit.HPM4 when mhpmcounter4 is delegated to S-mode (mcounteren.HPM4=1); otherwise read-only zero.
+
Since mcountinhibit.HPM4 is not writable, this field is read-only zero.
- Type
RW-R |
Read-Write Restricted Field is writable by software. Only certain values are legal. Writing an illegal value into the field is ignored, and the field retains its prior state. |
- Reset value
-
UNDEFINED_LEGAL
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.if (CSR[menvcfg].CDE == 1'b0) { raise(ExceptionCode::IllegalInstruction, mode(), $encoding); } if (virtual_mode?()) { raise(ExceptionCode::VirtualInstruction, mode(), $encoding); } if (CSR[mcounteren].HPM4 == 1'b1) { CSR[mcountinhibit].HPM4 = csr_value.HPM4; return csr_value.HPM4; } return 1'b0;
HPM5
- Location
-
scountinhibit[5] - Description
Alias of mcountinhibit.HPM5 when mhpmcounter5 is delegated to S-mode (mcounteren.HPM5=1); otherwise read-only zero.
+
Since mcountinhibit.HPM5 is not writable, this field is read-only zero.
- Type
RW-R |
Read-Write Restricted Field is writable by software. Only certain values are legal. Writing an illegal value into the field is ignored, and the field retains its prior state. |
- Reset value
-
UNDEFINED_LEGAL
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.if (CSR[menvcfg].CDE == 1'b0) { raise(ExceptionCode::IllegalInstruction, mode(), $encoding); } if (virtual_mode?()) { raise(ExceptionCode::VirtualInstruction, mode(), $encoding); } if (CSR[mcounteren].HPM5 == 1'b1) { CSR[mcountinhibit].HPM5 = csr_value.HPM5; return csr_value.HPM5; } return 1'b0;
HPM6
- Location
-
scountinhibit[6] - Description
Alias of mcountinhibit.HPM6 when mhpmcounter6 is delegated to S-mode (mcounteren.HPM6=1); otherwise read-only zero.
+
Since mcountinhibit.HPM6 is not writable, this field is read-only zero.
- Type
RW-R |
Read-Write Restricted Field is writable by software. Only certain values are legal. Writing an illegal value into the field is ignored, and the field retains its prior state. |
- Reset value
-
UNDEFINED_LEGAL
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.if (CSR[menvcfg].CDE == 1'b0) { raise(ExceptionCode::IllegalInstruction, mode(), $encoding); } if (virtual_mode?()) { raise(ExceptionCode::VirtualInstruction, mode(), $encoding); } if (CSR[mcounteren].HPM6 == 1'b1) { CSR[mcountinhibit].HPM6 = csr_value.HPM6; return csr_value.HPM6; } return 1'b0;
HPM7
- Location
-
scountinhibit[7] - Description
Alias of mcountinhibit.HPM7 when mhpmcounter7 is delegated to S-mode (mcounteren.HPM7=1); otherwise read-only zero.
+
Since mcountinhibit.HPM7 is not writable, this field is read-only zero.
- Type
RW-R |
Read-Write Restricted Field is writable by software. Only certain values are legal. Writing an illegal value into the field is ignored, and the field retains its prior state. |
- Reset value
-
UNDEFINED_LEGAL
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.if (CSR[menvcfg].CDE == 1'b0) { raise(ExceptionCode::IllegalInstruction, mode(), $encoding); } if (virtual_mode?()) { raise(ExceptionCode::VirtualInstruction, mode(), $encoding); } if (CSR[mcounteren].HPM7 == 1'b1) { CSR[mcountinhibit].HPM7 = csr_value.HPM7; return csr_value.HPM7; } return 1'b0;
HPM8
- Location
-
scountinhibit[8] - Description
Alias of mcountinhibit.HPM8 when mhpmcounter8 is delegated to S-mode (mcounteren.HPM8=1); otherwise read-only zero.
+
Since mcountinhibit.HPM8 is not writable, this field is read-only zero.
- Type
RW-R |
Read-Write Restricted Field is writable by software. Only certain values are legal. Writing an illegal value into the field is ignored, and the field retains its prior state. |
- Reset value
-
UNDEFINED_LEGAL
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.if (CSR[menvcfg].CDE == 1'b0) { raise(ExceptionCode::IllegalInstruction, mode(), $encoding); } if (virtual_mode?()) { raise(ExceptionCode::VirtualInstruction, mode(), $encoding); } if (CSR[mcounteren].HPM8 == 1'b1) { CSR[mcountinhibit].HPM8 = csr_value.HPM8; return csr_value.HPM8; } return 1'b0;
HPM9
- Location
-
scountinhibit[9] - Description
Alias of mcountinhibit.HPM9 when mhpmcounter9 is delegated to S-mode (mcounteren.HPM9=1); otherwise read-only zero.
+
Since mcountinhibit.HPM9 is not writable, this field is read-only zero.
- Type
RW-R |
Read-Write Restricted Field is writable by software. Only certain values are legal. Writing an illegal value into the field is ignored, and the field retains its prior state. |
- Reset value
-
UNDEFINED_LEGAL
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.if (CSR[menvcfg].CDE == 1'b0) { raise(ExceptionCode::IllegalInstruction, mode(), $encoding); } if (virtual_mode?()) { raise(ExceptionCode::VirtualInstruction, mode(), $encoding); } if (CSR[mcounteren].HPM9 == 1'b1) { CSR[mcountinhibit].HPM9 = csr_value.HPM9; return csr_value.HPM9; } return 1'b0;
HPM10
- Location
-
scountinhibit[10] - Description
Alias of mcountinhibit.HPM10 when mhpmcounter10 is delegated to S-mode (mcounteren.HPM10=1); otherwise read-only zero.
+
Since mcountinhibit.HPM10 is not writable, this field is read-only zero.
- Type
RW-R |
Read-Write Restricted Field is writable by software. Only certain values are legal. Writing an illegal value into the field is ignored, and the field retains its prior state. |
- Reset value
-
UNDEFINED_LEGAL
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.if (CSR[menvcfg].CDE == 1'b0) { raise(ExceptionCode::IllegalInstruction, mode(), $encoding); } if (virtual_mode?()) { raise(ExceptionCode::VirtualInstruction, mode(), $encoding); } if (CSR[mcounteren].HPM10 == 1'b1) { CSR[mcountinhibit].HPM10 = csr_value.HPM10; return csr_value.HPM10; } return 1'b0;
HPM11
- Location
-
scountinhibit[11] - Description
Alias of mcountinhibit.HPM11 when mhpmcounter11 is delegated to S-mode (mcounteren.HPM11=1); otherwise read-only zero.
+
Since mcountinhibit.HPM11 is not writable, this field is read-only zero.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.
HPM12
- Location
-
scountinhibit[12] - Description
Alias of mcountinhibit.HPM12 when mhpmcounter12 is delegated to S-mode (mcounteren.HPM12=1); otherwise read-only zero.
+
Since mcountinhibit.HPM12 is not writable, this field is read-only zero.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.
HPM13
- Location
-
scountinhibit[13] - Description
Alias of mcountinhibit.HPM13 when mhpmcounter13 is delegated to S-mode (mcounteren.HPM13=1); otherwise read-only zero.
+
Since mcountinhibit.HPM13 is not writable, this field is read-only zero.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.
HPM14
- Location
-
scountinhibit[14] - Description
Alias of mcountinhibit.HPM14 when mhpmcounter14 is delegated to S-mode (mcounteren.HPM14=1); otherwise read-only zero.
+
Since mcountinhibit.HPM14 is not writable, this field is read-only zero.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.
HPM15
- Location
-
scountinhibit[15] - Description
Alias of mcountinhibit.HPM15 when mhpmcounter15 is delegated to S-mode (mcounteren.HPM15=1); otherwise read-only zero.
+
Since mcountinhibit.HPM15 is not writable, this field is read-only zero.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.
HPM16
- Location
-
scountinhibit[16] - Description
Alias of mcountinhibit.HPM16 when mhpmcounter16 is delegated to S-mode (mcounteren.HPM16=1); otherwise read-only zero.
+
Since mcountinhibit.HPM16 is not writable, this field is read-only zero.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.
HPM17
- Location
-
scountinhibit[17] - Description
Alias of mcountinhibit.HPM17 when mhpmcounter17 is delegated to S-mode (mcounteren.HPM17=1); otherwise read-only zero.
+
Since mcountinhibit.HPM17 is not writable, this field is read-only zero.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.
HPM18
- Location
-
scountinhibit[18] - Description
Alias of mcountinhibit.HPM18 when mhpmcounter18 is delegated to S-mode (mcounteren.HPM18=1); otherwise read-only zero.
+
Since mcountinhibit.HPM18 is not writable, this field is read-only zero.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.
HPM19
- Location
-
scountinhibit[19] - Description
Alias of mcountinhibit.HPM19 when mhpmcounter19 is delegated to S-mode (mcounteren.HPM19=1); otherwise read-only zero.
+
Since mcountinhibit.HPM19 is not writable, this field is read-only zero.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.
HPM20
- Location
-
scountinhibit[20] - Description
Alias of mcountinhibit.HPM20 when mhpmcounter20 is delegated to S-mode (mcounteren.HPM20=1); otherwise read-only zero.
+
Since mcountinhibit.HPM20 is not writable, this field is read-only zero.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.
HPM21
- Location
-
scountinhibit[21] - Description
Alias of mcountinhibit.HPM21 when mhpmcounter21 is delegated to S-mode (mcounteren.HPM21=1); otherwise read-only zero.
+
Since mcountinhibit.HPM21 is not writable, this field is read-only zero.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.
HPM22
- Location
-
scountinhibit[22] - Description
Alias of mcountinhibit.HPM22 when mhpmcounter22 is delegated to S-mode (mcounteren.HPM22=1); otherwise read-only zero.
+
Since mcountinhibit.HPM22 is not writable, this field is read-only zero.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.
HPM23
- Location
-
scountinhibit[23] - Description
Alias of mcountinhibit.HPM23 when mhpmcounter23 is delegated to S-mode (mcounteren.HPM23=1); otherwise read-only zero.
+
Since mcountinhibit.HPM23 is not writable, this field is read-only zero.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.
HPM24
- Location
-
scountinhibit[24] - Description
Alias of mcountinhibit.HPM24 when mhpmcounter24 is delegated to S-mode (mcounteren.HPM24=1); otherwise read-only zero.
+
Since mcountinhibit.HPM24 is not writable, this field is read-only zero.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.
HPM25
- Location
-
scountinhibit[25] - Description
Alias of mcountinhibit.HPM25 when mhpmcounter25 is delegated to S-mode (mcounteren.HPM25=1); otherwise read-only zero.
+
Since mcountinhibit.HPM25 is not writable, this field is read-only zero.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.
HPM26
- Location
-
scountinhibit[26] - Description
Alias of mcountinhibit.HPM26 when mhpmcounter26 is delegated to S-mode (mcounteren.HPM26=1); otherwise read-only zero.
+
Since mcountinhibit.HPM26 is not writable, this field is read-only zero.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.
HPM27
- Location
-
scountinhibit[27] - Description
Alias of mcountinhibit.HPM27 when mhpmcounter27 is delegated to S-mode (mcounteren.HPM27=1); otherwise read-only zero.
+
Since mcountinhibit.HPM27 is not writable, this field is read-only zero.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.
HPM28
- Location
-
scountinhibit[28] - Description
Alias of mcountinhibit.HPM28 when mhpmcounter28 is delegated to S-mode (mcounteren.HPM28=1); otherwise read-only zero.
+
Since mcountinhibit.HPM28 is not writable, this field is read-only zero.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.
HPM29
- Location
-
scountinhibit[29] - Description
Alias of mcountinhibit.HPM29 when mhpmcounter29 is delegated to S-mode (mcounteren.HPM29=1); otherwise read-only zero.
+
Since mcountinhibit.HPM29 is not writable, this field is read-only zero.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.
HPM30
- Location
-
scountinhibit[30] - Description
Alias of mcountinhibit.HPM30 when mhpmcounter30 is delegated to S-mode (mcounteren.HPM30=1); otherwise read-only zero.
+
Since mcountinhibit.HPM30 is not writable, this field is read-only zero.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.
HPM31
- Location
-
scountinhibit[31] - Description
Alias of mcountinhibit.HPM31 when mhpmcounter31 is delegated to S-mode (mcounteren.HPM31=1); otherwise read-only zero.
+
Since mcountinhibit.HPM31 is not writable, this field is read-only zero.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.
Software read
This CSR may return a value that is different from what is stored in hardware.
-
Pruned
-
Original
if (CSR[menvcfg].CDE == 1'b0) {
raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
}
if (virtual_mode?()) {
raise(ExceptionCode::VirtualInstruction, mode(), $encoding);
}
return $bits(CSR[CSR[mcountinhibit]]) & $bits(CSR[CSR[mcounteren]]);
if (CSR[menvcfg].CDE == 1'b0) {
raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
}
if (virtual_mode?()) {
raise(ExceptionCode::VirtualInstruction, mode(), $encoding);
}
return $bits(CSR[CSR[mcountinhibit]]) & $bits(CSR[CSR[mcounteren]]);