ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 1,823 microarchs · 16,083 chips · 105 sources
Arch:
Tier:

cycle

T1 riscv register register
Cycle counter for RDCYCLE Instruction
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeRISC-V Privileged (Zicntr)
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
PrivilegeU
ExtensionsZicntr

Summary

Alias for M-mode CSR mcycle.

Syntax / Encoding

CSR 0xc00 (U-mode, RO)

Bitfields (1)

BitsFieldDescription
63:0COUNTAlias of mcycle.COUNT.

Reference Notes

Alias for M-mode CSR `mcycle`.

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

[%autowidth,cols="1,1,1,1,1,1,1",separator="!"]
!===
.2+h![.rotate]#`mcounteren.CY`# .2+h! [.rotate]#`scounteren.CY`# .2+h! [.rotate]#`hcounteren.CY`#
4+^.>h! `cycle` behavior
.^h! S-mode .^h! U-mode .^h! VS-mode .^h! VU-mode

! 0 ! - ! - ! `IllegalInstruction` ! `IllegalInstruction` ! `IllegalInstruction` ! `IllegalInstruction`
! 1 ! 0 ! 0 ! read-only ! `IllegalInstruction` ! `VirtualInstruction` ! `VirtualInstruction`
! 1 ! 1 ! 0 ! read-only ! read-only ! `VirtualInstruction` ! `VirtualInstruction`
! 1 ! 0 ! 1 ! read-only ! `IllegalInstruction` ! read-only ! `VirtualInstruction`
! 1 ! 1 ! 1 ! read-only ! read-only ! read-only ! read-only
!===