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

marchid

T1 riscv register register
Machine Architecture ID
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

The marchid CSR is an MXLEN-bit read-only register encoding the base microarchitecture of the hart. This register must be readable in any implementation, but a value of 0 can be returned to indicate the field is not implemented. The combination of mvendorid and marchid should uniquely identify the type of hart microarchitecture that is implemented.

Syntax / Encoding

CSR 0xf12 (M-mode, RO)

Bitfields (1)

BitsFieldDescription
63:0ArchitectureVendor-specific microarchitecture ID. [RV32: 31:0, RV64: 63:0]

Reference Notes

The `marchid` CSR is an MXLEN-bit read-only register encoding the base
microarchitecture of the hart. This register must be readable in any
implementation, but a value of 0 can be returned to indicate the field
is not implemented. The combination of `mvendorid` and `marchid` should
uniquely identify the type of hart microarchitecture that is
implemented.

Open-source project architecture IDs are allocated globally by RISC-V
International, and have non-zero architecture IDs with a zero
most-significant-bit (MSB). Commercial architecture IDs are allocated by
each commercial vendor independently, but must have the MSB set and
cannot contain zero in the remaining MXLEN-1 bits.

[NOTE]
====
The intent is for the architecture ID to represent the microarchitecture
associated with the repo around which development occurs rather than a
particular organization. Commercial fabrications of open-source designs
should (and might be required by the license to) retain the original
architecture ID. This will aid in reducing fragmentation and tool
support costs, as well as provide attribution. Open-source architecture
IDs are administered by RISC-V International and should only be
allocated to released, functioning open-source projects. Commercial
architecture IDs can be managed independently by any registered vendor
but are required to have IDs disjoint from the open-source architecture
IDs (MSB set) to prevent collisions if a vendor wishes to use both
closed-source and open-source microarchitectures.

The convention adopted within the following Implementation field can be
used to segregate branches of the same architecture design, including by
organization. The `misa` register also helps distinguish different
variants of a design.
====