mhpmevent24

Machine Hardware Performance Counter 24 Control

Programmable hardware performance counter event selector

Attributes

Defining Extension

  • Smhpm, version >= 0

CSR Address

0x338

Length

64-bit

Privilege Mode

M

Format

mhpmevent24 format
Figure 1. mhpmevent24 format

Field Summary

Name Location Type Reset Value

OF

63

RW-H
RO
UNDEFINED_LEGAL
0

MINH

62

RW
RO
UNDEFINED_LEGAL
0

SINH

61

RW
RO
UNDEFINED_LEGAL
0

UINH

60

RW
RO
UNDEFINED_LEGAL
0

VSINH

59

RW
RO
UNDEFINED_LEGAL
0

VUINH

58

RW
RO
UNDEFINED_LEGAL
0

EVENT

57:0

RW
RO
UNDEFINED_LEGAL
0

Fields

OF

Location

63

Description

Overflow status and interrupt disable.

The OF bit is set when the corresponding hpmcounter overflows, and remains set until written by
software. Since hpmcounter values are unsigned values, overflow is defined as unsigned
overflow of the implemented counter bits.

The OF bit is sticky; it stays set until explictly cleared by a CSR write.

A Local Counter Overflow Interrupt (LCOFI) is generated when OF is clear and
mhpmcounter24 overflows.

Type
RW-H
RO
Reset value
UNDEFINED_LEGAL
0

MINH

Location

62

Description

When set, mhpmcounter24 does not increment while the hart in operating in M-mode.

Type
RW
RO
Reset value
UNDEFINED_LEGAL
0

SINH

Location

61

Description

When set, mhpmcounter24 does not increment while the hart in operating in (H)S-mode.

Type
RW
RO
Reset value
UNDEFINED_LEGAL
0

UINH

Location

60

Description

When set, mhpmcounter24 does not increment while the hart in operating in U-mode.

Type
RW
RO
Reset value
UNDEFINED_LEGAL
0

VSINH

Location

59

Description

When set, mhpmcounter24 does not increment while the hart in operating in VS-mode.

Type
RW
RO
Reset value
UNDEFINED_LEGAL
0

VUINH

Location

58

Description

When set, mhpmcounter24 does not increment while the hart in operating in VU-mode.

Type
RW
RO
Reset value
UNDEFINED_LEGAL
0

EVENT

Location

57:0

Description

Event selector for performance counter mhpmcounter24.

Type
RW
RO
Reset value
UNDEFINED_LEGAL
0

Software write

This CSR may store a value that is different from what software attempts to write.

When a software write occurs (e.g., through csrrw), the following determines the written value:

OF = csr_value.OF
MINH = csr_value.MINH
SINH = csr_value.SINH
UINH = csr_value.UINH
VSINH = csr_value.VSINH
VUINH = csr_value.VUINH
EVENT = if (ary_includes?<$array_size(HPM_EVENTS), 58>(HPM_EVENTS, csr_value.EVENT)) {
  return csr_value.EVENT;
} else {
  return UNDEFINED_LEGAL_DETERMINISTIC;
}