mhpmcounter26
Machine performance-monitoring counter
- Address
0xB1A- 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
- Name in riscv-unified-db
- Machine Hardware Performance Counter 26
Privileged spec: Machine performance-monitoring counter
Description
Programmable hardware performance counter.
The hpmcounter26 CSR is a read-only shadow of this CSR. Access to hpmcounter26
is controlled with mcounteren.HPM26
When S is implemented:
, scounteren.HPM26
When H is implemented:
, and hcounteren.HPM26
as follows:
When H is implemented:
mcounteren.HPM26 | scounteren.HPM26 | hcounteren.HPM26 | ||||
hpmcounter26 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.HPM26 | scounteren.HPM26 | ||
hpmcounter26 behavior | |||
| S-mode | U-mode | ||
| 0 | - | IllegalInstruction | IllegalInstruction |
| 1 | 0 | read-only | IllegalInstruction |
| 1 | 1 | read-only | read-only |
Otherwise:
mcounteren.HPM26 | |
hpmcounter26 behavior | |
| U-mode | |
| 0 | IllegalInstruction |
| 1 | read-only |
From riscv-unified-db, reformatted.
Fields
| Field | Bits | Type | Description |
|---|---|---|---|
COUNT | 63-0 | [when="HPM_COUNTER_EN[26] == true"]
--
Performance counter for event selected in Increments every time event occurs unless:
When Sscofpmf is implemented:
When S is implemented:
When U is implemented:
When H is implemented:
[when="HPM_COUNTER_EN[26] == false"] Unimplemented performance counter. Must be read-only 0 (access does not cause trap). |
Fields from riscv-unified-db; field types computed by IDL functions there are not shown.