mhpmevent31

Machine Hardware Performance Counter 31 Control

Programmable hardware performance counter event selector and overflow/filtering control

Attributes

CSR Address

0x33f

Defining extension

  • Smhpm, version >= 0

Length

64-bit

Privilege Mode

M

Format

mhpmevent31 format
Figure 1. mhpmevent31 format

Field Summary

Name Location Type Reset Value

OF

63

RO

0

MINH

62

RO

0

SINH

61

RO

0

UINH

60

RO

0

VSINH

59

RO

0

VUINH

58

RO

0

EVENT

57:0

RO

0

Fields

OF

Location

mhpmevent31[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 mhpmcounter31 overflows.

Type

RO

Read-Only

Field has a hardwired value that does not change. Writes to an RO field are ignored.

Reset value

0

MINH

Location

mhpmevent31[62]

Description

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

Type

RO

Read-Only

Field has a hardwired value that does not change. Writes to an RO field are ignored.

Reset value

0

SINH

Location

mhpmevent31[61]

Description

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

Type

RO

Read-Only

Field has a hardwired value that does not change. Writes to an RO field are ignored.

Reset value

0

UINH

Location

mhpmevent31[60]

Description

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

Type

RO

Read-Only

Field has a hardwired value that does not change. Writes to an RO field are ignored.

Reset value

0

VSINH

Location

mhpmevent31[59]

Description

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

Type

RO

Read-Only

Field has a hardwired value that does not change. Writes to an RO field are ignored.

Reset value

0

VUINH

Location

mhpmevent31[58]

Description

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

Type

RO

Read-Only

Field has a hardwired value that does not change. Writes to an RO field are ignored.

Reset value

0

EVENT

Location

mhpmevent31[57:0]

Description

Event selector for performance counter mhpmcounter31.

Type

RO

Read-Only

Field has a hardwired value that does not change. Writes to an RO field are ignored.

Reset value

0

Software write

This field has special behavior when written by software (e.g., through csrrw).

When software tries to write csr_value, the field will be written with the return value of the function below.

if (ary_includes?<$array_size(HPM_EVENTS), 58>(HPM_EVENTS, csr_value.EVENT)) {
  return csr_value.EVENT;
} else {
  return UNDEFINED_LEGAL_DETERMINISTIC;
}