ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 1,761 microarchs · 16,083 chips · 105 sources
Arch:
Tier:

minstret

T1 riscv register register
Machine Instructions Retired Counter
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeRISC-V Privileged (Sm)
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
PrivilegeM
ExtensionsSm

Summary

Counts the number of instructions retired by this hart from some arbitrary start point in the past.

Syntax / Encoding

CSR 0xb02 (M-mode, RW)

Bitfields (1)

BitsFieldDescription
63:0COUNTInstructions retired counter. <%- if ext?(:Zicntr) -%> Aliased as instret.COUNT. <%- end -%> Increments every time an instruction retires unless: * mcountinhibit.IR <%- if ext?(:Smcdeleg) -%>or its alias scountinhibit.IR<%- end -%> is set <%- if ext?(:Smcntrpmf) -%> * minstretcfg.MINH is set and the current pr

Reference Notes

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.