← Home

misa

Machine ISA Control

Address: 0x301 (769) · Privilege: M · Length: MXLEN · Writable · Defined by: Sm

Reports the XLEN and "major" extensions supported by the ISA.

Fields

RV32

31:2423:1615:87:0
MXL—X—VU—S—Q—M—IH—F—DCBA

RV64

63:5655:4847:4039:3231:2423:1615:87:0
MXL—X—VU—S—Q—M—IH—F—DCBA
BitsFieldAliasDescriptionTypeReset
RV32 [31:30]
RV64 [63:62]
MXLXLEN in M-mode.RO
return (MXLEN == 32) ? 2'b01 : 2'b10;
[0]AIndicates support for the `A` (atomic) extension.
return (implemented?(ExtensionName::A) && MUTABLE_MISA_A) ? CsrFieldType::RW : CsrFieldType::RO;
return implemented?(ExtensionName::A) ? 1 : 0;
[1]BIndicates support for the `B` (bitmanip) extension.
return (implemented?(ExtensionName::B) && MUTABLE_MISA_B) ? CsrFieldType::RW : CsrFieldType::RO;
return implemented?(ExtensionName::B) ? 1 : 0;
[2]CIndicates support for the `C` (compressed) extension. Writing 0 to this field will cause all compressed instructions to raise an `IllegalInstruction` exception. Additionally, IALIGN becomes 32.
return (implemented?(ExtensionName::C) && MUTABLE_MISA_C) ? CsrFieldType::RW : CsrFieldType::RO;
return implemented?(ExtensionName::C) ? 1 : 0;
[3]DIndicates support for the `D` (double precision float) extension. -- Writing 0 to this field will cause all double-precision floating point instructions to raise an `IllegalInstruction` exception. Additionally, the upper 32-bits of the f registers will read as zero. --
return (implemented?(ExtensionName::D) && MUTABLE_MISA_D) ? CsrFieldType::RW : CsrFieldType::RO;
return implemented?(ExtensionName::D) ? 1 : 0;
[5]FIndicates support for the `F` (single precision float) extension. -- Writing 0 to this field will cause all floating point (single and double precision) instructions to raise an `IllegalInstruction` exception. Writing 0 to this field with `misa.D` set will result in UNDEFINED behavior. --
return (implemented?(ExtensionName::F) && MUTABLE_MISA_F) ? CsrFieldType::RW : CsrFieldType::RO;
return implemented?(ExtensionName::F) ? 1 : 0;
[7]HIndicates support for the `H` (hypervisor) extension. Writing 0 to this field will cause all attempts to enter VS- or VU- mode, execute a hypervisor instruction, or access a hypervisor CSR to raise an `IllegalInstruction` fault.
return (implemented?(ExtensionName::H) && MUTABLE_MISA_H) ? CsrFieldType::RW : CsrFieldType::RO;
return implemented?(ExtensionName::H) ? 1 : 0;
[8]IIndicates support for the `I` (base) extension.RO1
[12]MIndicates support for the `M` (integer multiply/divide) extension. Writing 0 to this field will cause all attempts to execute an integer divide or remainder instruction to raise an `IllegalInstruction` exception. The multiply instructions are provided by `Zmmul` and are unaffected.
return (implemented?(ExtensionName::M) && MUTABLE_MISA_M) ? CsrFieldType::RW : CsrFieldType::RO;
return implemented?(ExtensionName::M) ? 1 : 0;
[16]QIndicates support for the `Q` (quad precision float) extension. -- Writing 0 to this field will cause all quad-precision floating point instructions to raise an `IllegalInstruction` exception. --
return MUTABLE_MISA_Q ? CsrFieldType::RW : CsrFieldType::RO;
1
[18]SIndicates support for the `S` (supervisor mode) extension. Writing 0 to this field will cause all attempts to enter S-mode or access S-mode state to raise an exception.
return (implemented?(ExtensionName::S) && MUTABLE_MISA_S) ? CsrFieldType::RW : CsrFieldType::RO;
return implemented?(ExtensionName::S) ? 1 : 0;
[20]UIndicates support for the `U` (user mode) extension. Writing 0 to this field will cause all attempts to enter U-mode to raise an exception.
return (implemented?(ExtensionName::U) && MUTABLE_MISA_U) ? CsrFieldType::RW : CsrFieldType::RO;
return implemented?(ExtensionName::U) ? 1 : 0;
[21]VIndicates support for the `V` (vector) extension. Writing 0 to this field will cause all attempts to execute a vector instruction to raise an `IllegalInstruction` trap.
return (implemented?(ExtensionName::V) && MUTABLE_MISA_V) ? CsrFieldType::RW : CsrFieldType::RO;
return implemented?(ExtensionName::V) ? 1 : 0;
[23]XThe `X` bit will be set if there are any non-standard extensions.RO
return NON_STANDARD_EXTENSION_IMPLEMENTED ? 1 : 0;

Software read

return (
  (CSR[misa].MXL `<< (xlen() - 2)) |
  (CSR[misa].X `<< 23) |
  (CSR[misa].V `<< 21) |
  (CSR[misa].U `<< 20) |
  (CSR[misa].S `<< 18) |
  (CSR[misa].Q `<< 16) |
  (CSR[misa].M `<< 12) |
  (CSR[misa].I `<< 8) |
  (CSR[misa].H `<< 7) |
  (CSR[misa].F `<< 5) |
  (CSR[misa].D `<< 3) |
  (CSR[misa].C `<< 2) |
  (CSR[misa].B `<< 1) |
  CSR[misa].A);

Version af3eaf9+cheriot.f635218

Data from the RISC-V Unified Database, copyright RISC-V International and contributors.

CHERIoT extensions from the CHERIoT specification and Sail model, copyright Microsoft and the CHERIoT Platform contributors.

This site is provided as a community resource and is NOT affiliated with nor endorsed by RISC-V International.