mhpmcounter6
riscv_unified_db)RV32 / RV64 (Ratified & Standard Extensions)
main
MSmSummary
Programmable hardware performance counter.
Syntax / Encoding
CSR 0xb06 (M-mode, RW)
Bitfields (1)
| Bits | Field | Description |
|---|---|---|
63:0 | COUNT | [when="HPM_COUNTER_EN[6] == true"] -- Performance counter for event selected in mhpmevent6.EVENT. Increments every time event occurs unless: * mcountinhibit.HPM6 <%- if ext?(:Smcdeleg) -%>or its alias scountinhibit.HPM6<%- end -%> is set <%- if ext?(:Sscofpmf) -%> * mhpmevent6.MINH is set and the current privil |
Reference Notes
Programmable hardware performance counter. The `hpmcounter6` CSR is a read-only shadow of this CSR. Access to `hpmcounter6` is controlled with `mcounteren.HPM6` <%- if ext?(:S) -%> , `scounteren.HPM6` <%- if ext?(:H) -%> , and `hcounteren.HPM6` <%- end -%> <%- end -%> as follows: <%- if ext?(:H) -%> [%autowidth,cols="1,1,1,1,1,1,1",separator="!"] !=== .2+h![.rotate]#`mcounteren.HPM6`# .2+h! [.rotate]#`scounteren.HPM6`# .2+h! [.rotate]#`hcounteren.HPM6`# 4+^.>h! `hpmcounter6` 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 !=== <%- elsif ext?(:S) -%> [%autowidth,cols="1,1,1,1",separator="!"] !=== .2+h![.rotate]#`mcounteren.HPM6`# .2+h! [.rotate]#`scounteren.HPM6`# 2+^.>h! `hpmcounter6` behavior .^h! S-mode .^h! U-mode ! 0 ! - ! `IllegalInstruction` ! `IllegalInstruction` ! 1 ! 0 ! read-only ! `IllegalInstruction` ! 1 ! 1 ! read-only ! read-only !=== <%- else -%> [%autowidth,cols="1,1",separator="!"] !=== .2+h![.rotate]#`mcounteren.HPM6`# ^.>h! `hpmcounter6` behavior .^h! U-mode ! 0 ! `IllegalInstruction` ! 1 ! read-only !=== <%- end -%>