← Home

mhpmcounter16

Machine Hardware Performance Counter 16

Address: 0xB10 (2832) · Privilege: M · Length: 64 · Writable · Defined by: Sm · Indirect address: 80 · Indirect slot: 1

Programmable hardware performance counter.

The `hpmcounter16` CSR is a read-only shadow of this CSR. Access to `hpmcounter16` is controlled with `mcounteren.HPM16`

, `scounteren.HPM16`

, and `hcounteren.HPM16`

as follows:

.2+h![.rotate]#`mcounteren.HPM16`# .2+h! [.rotate]#`scounteren.HPM16`# .2+h! [.rotate]#`hcounteren.HPM16`# 4+^.>h! `hpmcounter16` 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.HPM16`# .2+h! [.rotate]#`scounteren.HPM16`# 2+^.>h! `hpmcounter16` 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.HPM16`# ^.>h! `hpmcounter16` behavior .^h! U-mode

! 0 ! `IllegalInstruction` ! 1 ! read-only

Fields

63:5655:4847:4039:3231:2423:1615:87:0
COUNT
BitsFieldAliasDescriptionTypeReset
[63:0]COUNT[when="HPM_COUNTER_EN[16] == true"] -- Performance counter for event selected in `mhpmevent16.EVENT`. Increments every time event occurs unless: * `mcountinhibit.HPM16` or its alias `scountinhibit.HPM16` is set * `mhpmevent16.MINH` is set and the current privilege level is M * `mhpmevent16.SINH` or its alias `hpmevent16.SINH` is set and the current privilege level is (H)S * `mhpmevent16.UINH` or its alias `hpmevent16.UINH` is set and the current privilege level is U * `mhpmevent16.VSINH` or its alias `hpmevent16.VSINH` is set and the current privilege level is VS * `mhpmevent16.VUINH` or its alias `hpmevent16.VUINH` is set and the current privilege level is VU -- [when="HPM_COUNTER_EN[16] == false"] Unimplemented performance counter. Must be read-only 0 (access does not cause trap).
return (HPM_COUNTER_EN[16]) ? CsrFieldType::RWH : CsrFieldType::RO;
return (HPM_COUNTER_EN[16]) ? UNDEFINED_LEGAL : 0;

Software read

if (HPM_COUNTER_EN[16]) {
  return read_hpm_counter(16);
} 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.