mcycleh

High-half machine Cycle Counter

High-half alias of mcycle.

Attributes

Defining Extension

  • Zicntr, version >= 0

CSR Address

0xb80

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

31:0

Description

Alias of upper half of mcycle.COUNT.

Type

RW-RH

Reset value

UNDEFINED_LEGAL

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:

COUNT = # since writes to this register may not be hart-local, it must be handled
# as a special case
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.

return read_mcycle()[63:32];