mcycleh

High-half machine Cycle Counter

High-half alias of mcycle.

Attributes

CSR Address

0xb80

Defining extension

  • Zicntr, version >= Zicntr@2.0.0

Length

32-bit

Privilege Mode

M

Format

mcycleh format
Figure 1. mcycleh format

Field Summary

Name Location Type Reset Value

COUNT

31:0

RW-RH

UNDEFINED_LEGAL

Fields

COUNT

Location

mcycleh[31:0]

Description

Alias of upper half of mcycle.COUNT.

Type

RW-RH

Read-Write Restricted with Hardware update

Field is writable by software. Only certain values are legal. Writing an illegal value into the field is ignored, such that the field retains its prior state. Hardware also updates the field without an explicit software write.)

Reset value

UNDEFINED_LEGAL

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 (xlen() == 32) {
  return sw_write_mcycle({csr_value.COUNT[31:0], read_mcycle()[31:0]});
} else {
  return sw_write_mcycle(csr_value.COUNT);
}

Software read

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

  • Pruned

  • Original

return read_mcycle()[63:32];
return read_mcycle()[63:32];