Webcentive RISC-V Reference

instret

Instructions-retired counter for rdinstret instruction

Address
0xC02
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
Instructions retired counter for RDINSTRET Instruction

Privileged spec: Instructions-retired counter for rdinstret instruction

Description

Alias for M-mode CSR minstret.

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

mcounteren.IRscounteren.IRhcounteren.IR
instret 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 minstret.COUNT.

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

Specification and related pages