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

miselect

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

Summary

The CSRs listed in the table above provide a window for accessing register state indirectly. The value of miselect determines which register is accessed upon read or write of each of the machine indirect alias CSRs (mireg*). miselect value ranges are allocated to dependent extensions, which specify the register state accessible via each miregi register, for each miselect value. miselect is a WARL register.

Syntax / Encoding

CSR 0x350 (M-mode, RW)

Bitfields (1)

BitsFieldDescription
63:0VALUESelects which indirect register is accessed via mireg*. [RV32: 31:0, RV64: 63:0]

Reference Notes

The CSRs listed in the table above provide a window for accessing register state indirectly.
The value of `miselect` determines which register is accessed upon read or write of each of
the machine indirect alias CSRs (`mireg*`). `miselect` value ranges are allocated to dependent
extensions, which specify the register state accessible via each `miregi` register, for each
`miselect` value. `miselect` is a WARL register.

The `miselect` register implements at least enough bits to support all implemented `miselect`
values (corresponding to the implemented extensions that utilize `miselect`/`mireg*` to
indirectly access register state). The `miselect` register may be read-only zero if there are
no extensions implemented that utilize it.

Values of `miselect` with the most-significant bit set (bit XLEN - 1 = 1) are designated only for
custom use, presumably for accessing custom registers through the alias CSRs. Values of
`miselect` with the most-significant bit clear are designated only for standard use and are
reserved until allocated to a standard architecture extension.

If XLEN is changed, the most-significant bit of `miselect` moves to the new position,
retaining its value from before.

An implementation is not required to support any custom values for `miselect`.