RDTIME

Read Real-Time Clock

RDTIME rd

Reads the lower 32/64 bits of the real-time clock.

Details

RDTIME reads the time CSR, which reflects the current value of the real-time counter. It is an assembler pseudoinstruction for CSRRS rd, time, x0.

Pseudocode Operation

R[rd] = CSR[time];

Example

RDTIME x10

Encoding

Binary Layout
110000000001
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)