mhpmcounter12h
Upper 32 bits of mhpmcounter12, RV32 only
- Address
0xB8C- Group
- Machine-level CSRs
- Privilege
MRW(privileged spec CSR listing, Machine Counter/Timers)- Access
- read/write; lowest privilege M (machine)
- Address range
- Standard read/write
- XLEN
- RV32 only
- Name in riscv-unified-db
- Machine Hardware Performance Counter 12, Upper half
Privileged spec: Upper 32 bits of mhpmcounter12, RV32 only
Description
Upper half of mhpmcounter12.
The hpmcounter12h CSR is a read-only shadow of this CSR. Access to hpmcounter12h
is controlled with mcounteren.HPM12
When S is implemented:
, scounteren.HPM12
When H is implemented:
, and hcounteren.HPM12
as follows:
When H is implemented:
mcounteren.HPM12 | scounteren.HPM12 | hcounteren.HPM12 | ||||
hpmcounter12h behavior | ||||||
| S-mode | U-mode | VS-mode | VU-mode | |||
| 0 | - | - | IllegalInstruction | IllegalInstruction | IllegalInstruction | IllegalInstruction |
| 1 | 0 | 0 | read-only | IllegalInstruction | VirtualInstruction | VirtualInstruction |
| 1 | 1 | 0 | read-only | read-only | VirtualInstruction | VirtualInstruction |
| 1 | 0 | 1 | read-only | IllegalInstruction | read-only | VirtualInstruction |
| 1 | 1 | 1 | read-only | read-only | read-only | read-only |
Otherwise, when S is implemented:
mcounteren.HPM12 | scounteren.HPM12 | ||
hpmcounter12h behavior | |||
| S-mode | U-mode | ||
| 0 | - | IllegalInstruction | IllegalInstruction |
| 1 | 0 | read-only | IllegalInstruction |
| 1 | 1 | read-only | read-only |
Otherwise:
mcounteren.HPM12 | |
hpmcounter12h behavior | |
| U-mode | |
| 0 | IllegalInstruction |
| 1 | read-only |
From riscv-unified-db, reformatted.
Fields
| Field | Bits | Type | Description |
|---|---|---|---|
COUNT | 31-0 | Upper bits of counter. |
Fields from riscv-unified-db; field types computed by IDL functions there are not shown.