CSR Bit Fields

RISC-V mhpmevent16h CSR Register

Address 0x730Privilege MachineAccess RW / RV32 high-half / 32-bitMachine counters and performance-monitoring CSRs

mhpmevent16h at 0x730 is the RV32 high-half CSR for bits 63:32 of mhpmevent16, provided with Sscofpmf.

Bit Overview
bit 3 = only bit 3; bits 12..11 = bits 12 down to 11
MSBLSB
Field Map

Understand mhpmevent16h By Bit Fields

8 key fields
31

OF

RW

Corresponds to mhpmevent16[63], the overflow status and interrupt-disable bit for mhpmcounter16.

OF (bit 31) — Corresponds to mhpmevent16[63], the overflow status and interrupt-disable bit for mhpmcounter16.

What This Field Controls

  • - Corresponds to mhpmevent16[63], the overflow status and interrupt-disable bit for mhpmcounter16.

Common Values

Sscofpmf OF bit
0No overflow recorded

The OF bit for mhpmcounter16 is clear; this bit itself does not disable generation of a later count-overflow interrupt request.

1Overflow recorded

mhpmcounter16 has overflowed and set the sticky OF bit; it remains set until cleared by software and disables new count-overflow interrupt requests for this counter.

30

MINH

RW

Corresponds to mhpmevent16[62]; when set, inhibits M-mode event counting.

MINH (bit 30) — Corresponds to mhpmevent16[62]; when set, inhibits M-mode event counting.

What This Field Controls

  • - Corresponds to mhpmevent16[62]; when set, inhibits M-mode event counting.

Common Values

MINH mode-filter bit
0Counting allowed

mhpmcounter16 event counting in M-mode is not inhibited by this bit; other counter configuration, event selection, and implementation support still apply.

1Counting inhibited

mhpmcounter16 event counting in M-mode is inhibited.

29

SINH

RW

Corresponds to mhpmevent16[61]; when set, inhibits S/HS-mode event counting.

SINH (bit 29) — Corresponds to mhpmevent16[61]; when set, inhibits S/HS-mode event counting.

What This Field Controls

  • - Corresponds to mhpmevent16[61]; when set, inhibits S/HS-mode event counting.

Common Values

SINH mode-filter bit
0Counting allowed

mhpmcounter16 event counting in S/HS-mode is not inhibited by this bit; other counter configuration, event selection, and implementation support still apply.

1Counting inhibited

mhpmcounter16 event counting in S/HS-mode is inhibited; if the associated privilege mode is not implemented, this bit is read-only zero.

28

UINH

RW

Corresponds to mhpmevent16[60]; when set, inhibits U-mode event counting.

UINH (bit 28) — Corresponds to mhpmevent16[60]; when set, inhibits U-mode event counting.

What This Field Controls

  • - Corresponds to mhpmevent16[60]; when set, inhibits U-mode event counting.

Common Values

UINH mode-filter bit
0Counting allowed

mhpmcounter16 event counting in U-mode is not inhibited by this bit; other counter configuration, event selection, and implementation support still apply.

1Counting inhibited

mhpmcounter16 event counting in U-mode is inhibited; if the associated privilege mode is not implemented, this bit is read-only zero.

27

VSINH

RW

Corresponds to mhpmevent16[59]; when set, inhibits VS-mode event counting.

VSINH (bit 27) — Corresponds to mhpmevent16[59]; when set, inhibits VS-mode event counting.

What This Field Controls

  • - Corresponds to mhpmevent16[59]; when set, inhibits VS-mode event counting.

Common Values

VSINH mode-filter bit
0Counting allowed

mhpmcounter16 event counting in VS-mode is not inhibited by this bit; other counter configuration, event selection, and implementation support still apply.

1Counting inhibited

mhpmcounter16 event counting in VS-mode is inhibited; if the associated privilege mode is not implemented, this bit is read-only zero.

26

VUINH

RW

Corresponds to mhpmevent16[58]; when set, inhibits VU-mode event counting.

VUINH (bit 26) — Corresponds to mhpmevent16[58]; when set, inhibits VU-mode event counting.

What This Field Controls

  • - Corresponds to mhpmevent16[58]; when set, inhibits VU-mode event counting.

Common Values

VUINH mode-filter bit
0Counting allowed

mhpmcounter16 event counting in VU-mode is not inhibited by this bit; other counter configuration, event selection, and implementation support still apply.

1Counting inhibited

mhpmcounter16 event counting in VU-mode is inhibited; if the associated privilege mode is not implemented, this bit is read-only zero.

25:24

WPRI

WPRI

Corresponds to reserved writes-preserve-values bits mhpmevent16[57:56].

WPRI (bits 25:24) — Corresponds to reserved writes-preserve-values bits mhpmevent16[57:56].

What This Field Controls

  • - Corresponds to reserved writes-preserve-values bits mhpmevent16[57:56].

Common Values

This field is better understood together with surrounding context than as a fixed memorized enumeration.

23:0

EVENT_HI

WARL

Corresponds to platform-defined event-selector bits mhpmevent16[55:32].

EVENT_HI (bits 23:0) — Corresponds to platform-defined event-selector bits mhpmevent16[55:32].

What This Field Controls

  • - Corresponds to platform-defined event-selector bits mhpmevent16[55:32].

Common Values

This field is better understood together with surrounding context than as a fixed memorized enumeration.

Official Basis & Search Notes

mhpmevent16h is not an independent event selector; it is the RV32 access window for the upper 32 bits of mhpmevent16. It carries Sscofpmf OF and mode-filtering fields.

Sscofpmf standardizes mhpmevent16[63:58] as OF and xINH fields.
mhpmevent16h[31:26] correspond to those standardized upper bits.
The upper event-selector bits remain part of the platform-defined event encoding.

What To Check First When Reading This CSR

  • - mhpmevent16h is an RV32-only high-half CSR provided with Sscofpmf.
  • - Reading it is equivalent to reading bits 63:32 of mhpmevent16.
  • - The OF bit can also be observed through the corresponding read-only shadow bit in scountovf.

Risk Checks Before Writing

  • - Preserve WPRI bits, and do not change EVENT_HI without knowing the platform event encoding.
  • - Writing mhpmevent16h changes the upper 32 bits of mhpmevent16, including OF and xINH controls.

Put It Back Into A Real Flow

1

On RV32, read mhpmevent16h to inspect the upper-half state of mhpmevent16.

2

Handle OF or mode-filtering bits as needed.

3

Check overflow state together with mhpmcounter16 readings and scountovf.

FAQ

Can mhpmevent16h be accessed from any privilege level?

No. The official CSR table lists mhpmevent16h as a Machine mode CSR. Lower-privilege software may access the corresponding state only when a relevant standard extension provides an explicit delegation or permission mechanism. Direct CSR access with insufficient privilege, or to an unimplemented CSR, raises an illegal-instruction exception.

Should mhpmevent16h and mhpmevent16 be written together?

On RV32, handle them as halves of one 64-bit CSR and avoid one path changing the high half while another path changes the low half inconsistently.