mhpmcounter21h

Machine Hardware Performance Counter 21, Upper half

Upper half of mhpmcounter21.

Attributes

Defining Extension

  • Smhpm, version >= 0

CSR Address

0xb95

Length

32-bit

Privilege Mode

M

Format

mhpmcounter21h format
Figure 1. mhpmcounter21h format

Field Summary

Name Location Type Reset Value

COUNT

32:0

RW-H
RO
UNDEFINED_LEGAL
0

Fields

COUNT

Location

32:0

Description

Upper bits of counter.

Type
RW-H
RO
Reset value
UNDEFINED_LEGAL
0

Software read

This CSR may return a value that is different from what is stored in hardware.

if (HPM_COUNTER_EN[21]) {
  return read_hpm_counter(21)[63:32];
} else {
  return 0;
}