minstret
Machine instructions-retired counter
- Address
0xB02- Group
- Machine-level CSRs
- Privilege
MRW(privileged spec CSR listing, Machine Counter/Timers)- Access
- read/write; lowest privilege M (machine)
- Address range
- Standard read/write
- Name in riscv-unified-db
- Machine Instructions Retired Counter
Privileged spec: Machine instructions-retired counter
Description
Counts the number of instructions retired by this hart from some arbitrary start point in the past.
Note: Instructions that cause synchronous exceptions, including ecall and ebreak, are not
considered to retire and hence do not increment the minstret CSR.
From riscv-unified-db, reformatted.
Fields
| Field | Bits | Type | Description |
|---|---|---|---|
COUNT | 63-0 | RW-H | Instructions retired counter. When Zicntr is implemented: Aliased as Increments every time an instruction retires unless:
When Smcntrpmf is implemented:
When S is implemented:
When U is implemented:
When H is implemented:
An instruction that causes an exception, notably including MRET/SRET,
does not retire and does not cause |
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/minstret.yaml
- csrrw, csrrs, csrrc (Zicsr instructions that access CSRs)