time
Timer for rdtime instruction
- Address
0xC01- 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
- Timer for RDTIME Instruction
Privileged spec: Timer for rdtime instruction
Description
This CSR does not exist, and access will cause an IllegalInstruction exception.
Shadow of the memory-mapped M-mode CSR mtime.
Privilege mode access is controlled with mcounteren.TM, scounteren.TM, and hcounteren.TM as follows:
mcounteren.TM | scounteren.TM | scounteren.TM | ||||
time behavior | ||||||
| S-mode | U-mode | VS-mode | VU-mode | |||
| 0 | - | - | Illegal Instruction | Illegal Instruction | Illegal Instruction | Illegal Instruction |
| 1 | 0 | 0 | read-only | Illegal Instruction | Illegal Instruction | Illegal Instruction |
| 1 | 1 | 0 | read-only | read-only | Illegal Instruction | Illegal Instruction |
| 1 | 0 | 1 | read-only | Illegal Instruction | read-only | Illegal Instruction |
| 1 | 1 | 1 | read-only | read-only | read-only | read-only |
From riscv-unified-db, reformatted.
Fields
| Field | Bits | Type | Description |
|---|---|---|---|
COUNT | 63-0 | RO-H | Reports the current wall-clock time from the timer device. Alias of the |
Fields from riscv-unified-db; field types computed by IDL functions there are not shown.
Specification and related pages
- The RISC-V Instruction Set Manual, Volume II: CSR listing (src/priv/csrs.adoc)
- riscv-opcodes csrs.csv
- riscv-unified-db: spec/std/isa/csr/time.yaml
- csrrw, csrrs, csrrc (Zicsr instructions that access CSRs)