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

mhpmcounter6h

T1 riscv register register
Machine Hardware Performance Counter 6, Upper half
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeRISC-V Privileged (Sm)
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
PrivilegeM
ExtensionsSm

Summary

Upper half of mhpmcounter6.

Syntax / Encoding

CSR 0xb86 (M-mode, RW)

Bitfields (1)

BitsFieldDescription
31:0COUNTUpper bits of counter.

Reference Notes

Upper half of mhpmcounter6.

The `hpmcounter6h` CSR is a read-only shadow of this CSR. Access to `hpmcounter6h`
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! `hpmcounter6h` 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! `hpmcounter6h` 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! `hpmcounter6h` behavior
.^h! U-mode

! 0 ! `IllegalInstruction`
! 1 ! read-only
!===
<%- end -%>