Machine Hardware Performance Counter 8
Programmable hardware performance counter.
The `hpmcounter8` CSR is a read-only shadow of this CSR. Access to `hpmcounter8` is controlled with `mcounteren.HPM8`
, `scounteren.HPM8`
, and `hcounteren.HPM8`
as follows:
.2+h![.rotate]#`mcounteren.HPM8`# .2+h! [.rotate]#`scounteren.HPM8`# .2+h! [.rotate]#`hcounteren.HPM8`# 4+^.>h! `hpmcounter8` behavior .^h! S-mode .^h! U-mode .^h! VS-mode .^h! 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
.2+h![.rotate]#`mcounteren.HPM8`# .2+h! [.rotate]#`scounteren.HPM8`# 2+^.>h! `hpmcounter8` behavior .^h! S-mode .^h! U-mode
! 0 ! - ! `IllegalInstruction` ! `IllegalInstruction` ! 1 ! 0 ! read-only ! `IllegalInstruction` ! 1 ! 1 ! read-only ! read-only
.2+h![.rotate]#`mcounteren.HPM8`# ^.>h! `hpmcounter8` behavior .^h! U-mode
! 0 ! `IllegalInstruction` ! 1 ! read-only
| 63:56 | 55:48 | 47:40 | 39:32 | 31:24 | 23:16 | 15:8 | 7:0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| COUNT | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Bits | Field | Alias | Description | Type | Reset |
|---|---|---|---|---|---|
| [63:0] | COUNT | [when="HPM_COUNTER_EN[8] == true"] -- Performance counter for event selected in `mhpmevent8.EVENT`. Increments every time event occurs unless: * `mcountinhibit.HPM8` or its alias `scountinhibit.HPM8` is set * `mhpmevent8.MINH` is set and the current privilege level is M * `mhpmevent8.SINH` or its alias `hpmevent8.SINH` is set and the current privilege level is (H)S * `mhpmevent8.UINH` or its alias `hpmevent8.UINH` is set and the current privilege level is U * `mhpmevent8.VSINH` or its alias `hpmevent8.VSINH` is set and the current privilege level is VS * `mhpmevent8.VUINH` or its alias `hpmevent8.VUINH` is set and the current privilege level is VU -- [when="HPM_COUNTER_EN[8] == false"] Unimplemented performance counter. Must be read-only 0 (access does not cause trap). | return (HPM_COUNTER_EN[8]) ? CsrFieldType::RWH : CsrFieldType::RO; | return (HPM_COUNTER_EN[8]) ? UNDEFINED_LEGAL : 0; |
if (HPM_COUNTER_EN[8]) {
return read_hpm_counter(8);
} else {
return 0;
}Version af3eaf9+cheriot.f635218
Data from the RISC-V Unified Database, copyright RISC-V International and contributors.
CHERIoT extensions from the CHERIoT specification and Sail model, copyright Microsoft and the CHERIoT Platform contributors.
This site is provided as a community resource and is NOT affiliated with nor endorsed by RISC-V International.