Webcentive RISC-V Reference

cycle

Cycle counter for rdcycle instruction

Address
0xC00
Group
Unprivileged and user-level CSRs
Privilege
URO (privileged spec CSR listing, Unprivileged Counter/Timers)
Access
read-only; lowest privilege U (user/unprivileged)
Address range
Standard read-only
Name in riscv-unified-db
Cycle counter for RDCYCLE Instruction

Privileged spec: Cycle counter for rdcycle instruction

Description

Alias for M-mode CSR mcycle.

Privilege mode access is controlled with mcounteren.CY, scounteren.CY, and hcounteren.CY as follows:

mcounteren.CYscounteren.CYhcounteren.CY
cycle behavior
S-modeU-modeVS-modeVU-mode
0--IllegalInstructionIllegalInstructionIllegalInstructionIllegalInstruction
100read-onlyIllegalInstructionVirtualInstructionVirtualInstruction
110read-onlyread-onlyVirtualInstructionVirtualInstruction
101read-onlyIllegalInstructionread-onlyVirtualInstruction
111read-onlyread-onlyread-onlyread-only

From riscv-unified-db, reformatted.

Fields

FieldBitsTypeDescription
COUNT63-0RO-H

Alias of mcycle.COUNT.

Fields from riscv-unified-db; field types computed by IDL functions there are not shown.

Specification and related pages