mcountinhibit
Machine Counter Inhibit
Bits to inhibit (stops counting) performance counters.
The counter-inhibit register mcountinhibit is a WARL register that controls which of the hardware performance-monitoring counters increment. The settings in this register only control whether the counters increment; their accessibility is not affected by the setting of this register.
When the CY, IR, or HPMn bit in the mcountinhibit register is clear,
the mcycle, minstret, or mhpmcountern
register increments as usual.
When the CY, IR, or HPM_n_ bit is set, the corresponding counter does
not increment.
The mcycle CSR may be shared between harts on the same core, in which case the mcountinhibit.CY field is also shared between those harts, and so writes to mcountinhibit.CY will be visible to those harts.
If the mcountinhibit register is not implemented, the implementation behaves as though the register were set to zero.
When the mcycle and minstret counters are not needed, it is desirable to conditionally inhibit them to reduce energy consumption. Providing a single CSR to inhibit all counters also allows the counters to be atomically sampled. Because the |
Attributes
CSR Address |
0x320 |
---|---|
Defining extension |
|
Length |
32-bit |
Privilege Mode |
M |
Field Summary
Name | Location | Type | Reset Value |
---|---|---|---|
0 |
RW |
UNDEFINED_LEGAL |
|
2 |
RW |
UNDEFINED_LEGAL |
|
3 |
RW |
UNDEFINED_LEGAL |
|
4 |
RW |
UNDEFINED_LEGAL |
|
5 |
RW |
UNDEFINED_LEGAL |
|
6 |
RW |
UNDEFINED_LEGAL |
|
7 |
RW |
UNDEFINED_LEGAL |
|
8 |
RW |
UNDEFINED_LEGAL |
|
9 |
RW |
UNDEFINED_LEGAL |
|
10 |
RW |
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
-
mcountinhibit[0]
- Description
-
When set, mcycle.COUNT stops counting in all privilege modes.
- Type
RW |
Read-Write Field is writable by software. Any value that fits in the field is acceptable and shall be retained for subsequent reads. |
- Reset value
-
UNDEFINED_LEGAL
IR
- Location
-
mcountinhibit[2]
- Description
-
When set, minstret.COUNT stops counting in all privilege modes.
- Type
RW |
Read-Write Field is writable by software. Any value that fits in the field is acceptable and shall be retained for subsequent reads. |
- Reset value
-
UNDEFINED_LEGAL
HPM3
- Location
-
mcountinhibit[3]
- Description
When set, hpmcounter3.COUNT stops counting in all privilege modes.
+
Since hpmcounter3 is not implemented, this field is read-only zero.
- Type
RW |
Read-Write Field is writable by software. Any value that fits in the field is acceptable and shall be retained for subsequent reads. |
- Reset value
-
UNDEFINED_LEGAL
HPM4
- Location
-
mcountinhibit[4]
- Description
When set, hpmcounter4.COUNT stops counting in all privilege modes.
+
Since hpmcounter4 is not implemented, this field is read-only zero.
- Type
RW |
Read-Write Field is writable by software. Any value that fits in the field is acceptable and shall be retained for subsequent reads. |
- Reset value
-
UNDEFINED_LEGAL
HPM5
- Location
-
mcountinhibit[5]
- Description
When set, hpmcounter5.COUNT stops counting in all privilege modes.
+
Since hpmcounter5 is not implemented, this field is read-only zero.
- Type
RW |
Read-Write Field is writable by software. Any value that fits in the field is acceptable and shall be retained for subsequent reads. |
- Reset value
-
UNDEFINED_LEGAL
HPM6
- Location
-
mcountinhibit[6]
- Description
When set, hpmcounter6.COUNT stops counting in all privilege modes.
+
Since hpmcounter6 is not implemented, this field is read-only zero.
- Type
RW |
Read-Write Field is writable by software. Any value that fits in the field is acceptable and shall be retained for subsequent reads. |
- Reset value
-
UNDEFINED_LEGAL
HPM7
- Location
-
mcountinhibit[7]
- Description
When set, hpmcounter7.COUNT stops counting in all privilege modes.
+
Since hpmcounter7 is not implemented, this field is read-only zero.
- Type
RW |
Read-Write Field is writable by software. Any value that fits in the field is acceptable and shall be retained for subsequent reads. |
- Reset value
-
UNDEFINED_LEGAL
HPM8
- Location
-
mcountinhibit[8]
- Description
When set, hpmcounter8.COUNT stops counting in all privilege modes.
+
Since hpmcounter8 is not implemented, this field is read-only zero.
- Type
RW |
Read-Write Field is writable by software. Any value that fits in the field is acceptable and shall be retained for subsequent reads. |
- Reset value
-
UNDEFINED_LEGAL
HPM9
- Location
-
mcountinhibit[9]
- Description
When set, hpmcounter9.COUNT stops counting in all privilege modes.
+
Since hpmcounter9 is not implemented, this field is read-only zero.
- Type
RW |
Read-Write Field is writable by software. Any value that fits in the field is acceptable and shall be retained for subsequent reads. |
- Reset value
-
UNDEFINED_LEGAL
HPM10
- Location
-
mcountinhibit[10]
- Description
When set, hpmcounter10.COUNT stops counting in all privilege modes.
+
Since hpmcounter10 is not implemented, this field is read-only zero.
- Type
RW |
Read-Write Field is writable by software. Any value that fits in the field is acceptable and shall be retained for subsequent reads. |
- Reset value
-
UNDEFINED_LEGAL
HPM11
- Location
-
mcountinhibit[11]
- Description
When set, hpmcounter11.COUNT stops counting in all privilege modes.
+
Since hpmcounter11 is not implemented, 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
HPM12
- Location
-
mcountinhibit[12]
- Description
When set, hpmcounter12.COUNT stops counting in all privilege modes.
+
Since hpmcounter12 is not implemented, 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
HPM13
- Location
-
mcountinhibit[13]
- Description
When set, hpmcounter13.COUNT stops counting in all privilege modes.
+
Since hpmcounter13 is not implemented, 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
HPM14
- Location
-
mcountinhibit[14]
- Description
When set, hpmcounter14.COUNT stops counting in all privilege modes.
+
Since hpmcounter14 is not implemented, 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
HPM15
- Location
-
mcountinhibit[15]
- Description
When set, hpmcounter15.COUNT stops counting in all privilege modes.
+
Since hpmcounter15 is not implemented, 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
HPM16
- Location
-
mcountinhibit[16]
- Description
When set, hpmcounter16.COUNT stops counting in all privilege modes.
+
Since hpmcounter16 is not implemented, 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
HPM17
- Location
-
mcountinhibit[17]
- Description
When set, hpmcounter17.COUNT stops counting in all privilege modes.
+
Since hpmcounter17 is not implemented, 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
HPM18
- Location
-
mcountinhibit[18]
- Description
When set, hpmcounter18.COUNT stops counting in all privilege modes.
+
Since hpmcounter18 is not implemented, 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
HPM19
- Location
-
mcountinhibit[19]
- Description
When set, hpmcounter19.COUNT stops counting in all privilege modes.
+
Since hpmcounter19 is not implemented, 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
HPM20
- Location
-
mcountinhibit[20]
- Description
When set, hpmcounter20.COUNT stops counting in all privilege modes.
+
Since hpmcounter20 is not implemented, 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
HPM21
- Location
-
mcountinhibit[21]
- Description
When set, hpmcounter21.COUNT stops counting in all privilege modes.
+
Since hpmcounter21 is not implemented, 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
HPM22
- Location
-
mcountinhibit[22]
- Description
When set, hpmcounter22.COUNT stops counting in all privilege modes.
+
Since hpmcounter22 is not implemented, 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
HPM23
- Location
-
mcountinhibit[23]
- Description
When set, hpmcounter23.COUNT stops counting in all privilege modes.
+
Since hpmcounter23 is not implemented, 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
HPM24
- Location
-
mcountinhibit[24]
- Description
When set, hpmcounter24.COUNT stops counting in all privilege modes.
+
Since hpmcounter24 is not implemented, 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
HPM25
- Location
-
mcountinhibit[25]
- Description
When set, hpmcounter25.COUNT stops counting in all privilege modes.
+
Since hpmcounter25 is not implemented, 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
HPM26
- Location
-
mcountinhibit[26]
- Description
When set, hpmcounter26.COUNT stops counting in all privilege modes.
+
Since hpmcounter26 is not implemented, 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
HPM27
- Location
-
mcountinhibit[27]
- Description
When set, hpmcounter27.COUNT stops counting in all privilege modes.
+
Since hpmcounter27 is not implemented, 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
HPM28
- Location
-
mcountinhibit[28]
- Description
When set, hpmcounter28.COUNT stops counting in all privilege modes.
+
Since hpmcounter28 is not implemented, 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
HPM29
- Location
-
mcountinhibit[29]
- Description
When set, hpmcounter29.COUNT stops counting in all privilege modes.
+
Since hpmcounter29 is not implemented, 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
HPM30
- Location
-
mcountinhibit[30]
- Description
When set, hpmcounter30.COUNT stops counting in all privilege modes.
+
Since hpmcounter30 is not implemented, 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
HPM31
- Location
-
mcountinhibit[31]
- Description
When set, hpmcounter31.COUNT stops counting in all privilege modes.
+
Since hpmcounter31 is not implemented, 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