CYCLE
RWCycle count value
CYCLE (bits 63:0) — Cycle count value.
What This Field Controls
- - Cycle count value
Common Values
This field is better understood together with surrounding context than as a fixed memorized enumeration.
Machine cycle counter; RW in M-mode, counts clock cycles since the hart started running.
Cycle count value
CYCLE (bits 63:0) — Cycle count value.
This field is better understood together with surrounding context than as a fixed memorized enumeration.
mcycle is a RW CSR in machine counters and performance-monitoring csrs at 0xB00. Check privilege and implemented extensions before interpreting its bit fields.
During initialization or the relevant privileged flow, software reads mcycle to observe the current state.
Modify only the target fields while preserving all other bits.
Read back the CSR or validate through later trap, interrupt, or context-switch behavior that the setting took effect.
Do not decide from the CSR name alone. The official CSR address encoding and tables define the lowest access privilege; this entry records mcycle as Machine. Access with insufficient privilege or to an unimplemented CSR raises an illegal-instruction exception.
Do not overwrite the whole CSR as if it were an ordinary integer. Modify only target fields, preserve unchanged bits, and follow the specification for WARL, WLRL, WPRI, or reserved fields.