ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 913 microarchs · 15,555 chips · 105 sources
Arch:
Tier:

scountovf

T1 riscv register register
Supervisor Count Overflow
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeRISC-V Privileged (Sscofpmf)
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
PrivilegeS
ExtensionsSscofpmf

Summary

A 32-bit read-only register that contains shadow copies of the OF bits in the 29 mhpmevent CSRs (mhpmevent3 - mhpmevent31) — where scountovf bit X corresponds to mhpmeventX.

Syntax / Encoding

CSR 0xda0 (S-mode, RO)

Bitfields (29)

BitsFieldDescription
31OF31[when="HPM_COUNTER_EN[31] == true"] Shadow copy of mhpmevent31 overflow (OF) bit. [when="HPM_COUNTER_EN[31] == false"] This field is read-only zero because the counter is not enabled.
30OF30[when="HPM_COUNTER_EN[30] == true"] Shadow copy of mhpmevent30 overflow (OF) bit. [when="HPM_COUNTER_EN[30] == false"] This field is read-only zero because the counter is not enabled.
29OF29[when="HPM_COUNTER_EN[29] == true"] Shadow copy of mhpmevent29 overflow (OF) bit. [when="HPM_COUNTER_EN[29] == false"] This field is read-only zero because the counter is not enabled.
28OF28[when="HPM_COUNTER_EN[28] == true"] Shadow copy of mhpmevent28 overflow (OF) bit. [when="HPM_COUNTER_EN[28] == false"] This field is read-only zero because the counter is not enabled.
27OF27[when="HPM_COUNTER_EN[27] == true"] Shadow copy of mhpmevent27 overflow (OF) bit. [when="HPM_COUNTER_EN[27] == false"] This field is read-only zero because the counter is not enabled.
26OF26[when="HPM_COUNTER_EN[26] == true"] Shadow copy of mhpmevent26 overflow (OF) bit. [when="HPM_COUNTER_EN[26] == false"] This field is read-only zero because the counter is not enabled.
25OF25[when="HPM_COUNTER_EN[25] == true"] Shadow copy of mhpmevent25 overflow (OF) bit. [when="HPM_COUNTER_EN[25] == false"] This field is read-only zero because the counter is not enabled.
24OF24[when="HPM_COUNTER_EN[24] == true"] Shadow copy of mhpmevent24 overflow (OF) bit. [when="HPM_COUNTER_EN[24] == false"] This field is read-only zero because the counter is not enabled.
23OF23[when="HPM_COUNTER_EN[23] == true"] Shadow copy of mhpmevent23 overflow (OF) bit. [when="HPM_COUNTER_EN[23] == false"] This field is read-only zero because the counter is not enabled.
22OF22[when="HPM_COUNTER_EN[22] == true"] Shadow copy of mhpmevent22 overflow (OF) bit. [when="HPM_COUNTER_EN[22] == false"] This field is read-only zero because the counter is not enabled.
21OF21[when="HPM_COUNTER_EN[21] == true"] Shadow copy of mhpmevent21 overflow (OF) bit. [when="HPM_COUNTER_EN[21] == false"] This field is read-only zero because the counter is not enabled.
20OF20[when="HPM_COUNTER_EN[20] == true"] Shadow copy of mhpmevent20 overflow (OF) bit. [when="HPM_COUNTER_EN[20] == false"] This field is read-only zero because the counter is not enabled.
19OF19[when="HPM_COUNTER_EN[19] == true"] Shadow copy of mhpmevent19 overflow (OF) bit. [when="HPM_COUNTER_EN[19] == false"] This field is read-only zero because the counter is not enabled.
18OF18[when="HPM_COUNTER_EN[18] == true"] Shadow copy of mhpmevent18 overflow (OF) bit. [when="HPM_COUNTER_EN[18] == false"] This field is read-only zero because the counter is not enabled.
17OF17[when="HPM_COUNTER_EN[17] == true"] Shadow copy of mhpmevent17 overflow (OF) bit. [when="HPM_COUNTER_EN[17] == false"] This field is read-only zero because the counter is not enabled.
16OF16[when="HPM_COUNTER_EN[16] == true"] Shadow copy of mhpmevent16 overflow (OF) bit. [when="HPM_COUNTER_EN[16] == false"] This field is read-only zero because the counter is not enabled.
15OF15[when="HPM_COUNTER_EN[15] == true"] Shadow copy of mhpmevent15 overflow (OF) bit. [when="HPM_COUNTER_EN[15] == false"] This field is read-only zero because the counter is not enabled.
14OF14[when="HPM_COUNTER_EN[14] == true"] Shadow copy of mhpmevent14 overflow (OF) bit. [when="HPM_COUNTER_EN[14] == false"] This field is read-only zero because the counter is not enabled.
13OF13[when="HPM_COUNTER_EN[13] == true"] Shadow copy of mhpmevent13 overflow (OF) bit. [when="HPM_COUNTER_EN[13] == false"] This field is read-only zero because the counter is not enabled.
12OF12[when="HPM_COUNTER_EN[12] == true"] Shadow copy of mhpmevent12 overflow (OF) bit. [when="HPM_COUNTER_EN[12] == false"] This field is read-only zero because the counter is not enabled.
11OF11[when="HPM_COUNTER_EN[11] == true"] Shadow copy of mhpmevent11 overflow (OF) bit. [when="HPM_COUNTER_EN[11] == false"] This field is read-only zero because the counter is not enabled.
10OF10[when="HPM_COUNTER_EN[10] == true"] Shadow copy of mhpmevent10 overflow (OF) bit. [when="HPM_COUNTER_EN[10] == false"] This field is read-only zero because the counter is not enabled.
9OF9[when="HPM_COUNTER_EN[9] == true"] Shadow copy of mhpmevent9 overflow (OF) bit. [when="HPM_COUNTER_EN[9] == false"] This field is read-only zero because the counter is not enabled.
8OF8[when="HPM_COUNTER_EN[8] == true"] Shadow copy of mhpmevent8 overflow (OF) bit. [when="HPM_COUNTER_EN[8] == false"] This field is read-only zero because the counter is not enabled.
7OF7[when="HPM_COUNTER_EN[7] == true"] Shadow copy of mhpmevent7 overflow (OF) bit. [when="HPM_COUNTER_EN[7] == false"] This field is read-only zero because the counter is not enabled.
6OF6[when="HPM_COUNTER_EN[6] == true"] Shadow copy of mhpmevent6 overflow (OF) bit. [when="HPM_COUNTER_EN[6] == false"] This field is read-only zero because the counter is not enabled.
5OF5[when="HPM_COUNTER_EN[5] == true"] Shadow copy of mhpmevent5 overflow (OF) bit. [when="HPM_COUNTER_EN[5] == false"] This field is read-only zero because the counter is not enabled.
4OF4[when="HPM_COUNTER_EN[4] == true"] Shadow copy of mhpmevent4 overflow (OF) bit. [when="HPM_COUNTER_EN[4] == false"] This field is read-only zero because the counter is not enabled.
3OF3[when="HPM_COUNTER_EN[3] == true"] Shadow copy of mhpmevent3 overflow (OF) bit. [when="HPM_COUNTER_EN[3] == false"] This field is read-only zero because the counter is not enabled.

Reference Notes

A 32-bit read-only register that contains shadow copies of the OF bits in the 29 `mhpmevent` CSRs
(`mhpmevent3` - `mhpmevent31`) — where `scountovf` bit X corresponds to `mhpmeventX`.

This register enables supervisor-level overflow interrupt handler
software to quickly and easily determine which counter(s) have overflowed
without needing to make an execution environment call up to M-mode.

Read access to bit X is subject to the same `mcounteren` (or `mcounteren` and `hcounteren`)
CSRs that mediate access to the `hpmcounter` CSRs by S-mode (or VS-mode).

In M-mode, `scountovf` bit X is always readable.
In S/HS-mode, `scountovf` bit X is readable when `mcounteren` bit X is set, and otherwise reads as zero.
Similarly, in VS-mode, it is readable when both `mcounteren` and `hcounteren` bit X are set.

If the Smcdeleg extension is implemented and `menvcfg.CDE` is set, attempts to read `scountovf`
from VS-mode or VU-mode raise a `Virtual Instruction` exception.