RDCYCLE

Read Cycle Counter

RDCYCLE rd

Reads the lower 32/64 bits of the cycle counter.

Details

RDCYCLE reads the cycle CSR, which counts the number of clock cycles executed by the processor. It is an assembler pseudoinstruction for CSRRS rd, cycle, x0.

Pseudocode Operation

R[rd] = CSR[cycle];

Example

RDCYCLE x10

Encoding

Binary Layout
110000000000
31:20
00000
19:15
010
14:12
rd
11:7
1110011
6:0
 
Format I-Type
Opcode 0x73
Extension Pseudo

Operands

  • rd
    Destination register (integer)