minstret

Machine Instructions Retired Counter

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

Instructions that cause synchronous exceptions, including ecall and ebreak, are not considered to retire and hence do not increment the minstret CSR.

Attributes

Defining Extension

  • Zicntr, version >= 0

CSR Address

0xb02

Length

64-bit

Privilege Mode

M

Format

minstret format
Figure 1. minstret format

Field Summary

Name Location Type Reset Value

COUNT

63:0

RW-H

UNDEFINED_LEGAL

Fields

COUNT

Location

63:0

Description

Instructions retired counter.


Increments every time an instruction retires unless:

  • mcountinhibit.IR is set

    An instruction that causes an exception, notably including MRET/SRET,
    does not retire and does not cause minstret.COUNT to increment.

Type

RW-H

Reset value

UNDEFINED_LEGAL