misa
Machine ISA Control
Reports the XLEN and "major" extensions supported by the ISA.
Fields
MXL
- Location
-
misa[63:62]
- Description
-
XLEN in M-mode.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
2
A
- Location
-
misa[0]
- Description
-
Indicates support for the A (atomic) extension.
Writing 0 to this field will cause all atomic instructions to raise an
IllegalInstruction
exception. - Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
1
B
- Location
-
misa[1]
- Description
-
Indicates support for the B (bitmanip) extension.
Writing 0 to this field will cause all bitmanip instructions to raise an
IllegalInstruction
exception. - Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
1
C
- Location
-
misa[2]
- Description
-
Indicates 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. - Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
1
D
- Location
-
misa[3]
- Description
-
Indicates 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.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
1
F
- Location
-
misa[5]
- Description
-
Indicates 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.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
1
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value
, the field will be written with the return value of the function below.if (csr_value.F == 0 && csr_value.D == 1) { return UNDEFINED_LEGAL_DETERMINISTIC; } return csr_value.F;
H
- Location
-
misa[7]
- Description
-
Indicates 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. - Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
1
I
- Location
-
misa[8]
- Description
-
Indicates support for the I (base) extension.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
1
M
- Location
-
misa[13]
- Description
-
Indicates support for the M (integer multiply/divide) extension.
Writing 0 to this field will cause all attempts to execute an integer multiply or divide instruction to raise an
IllegalInstruction
exception. - Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
1
S
- Location
-
misa[19]
- Description
-
Indicates 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.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
1
U
- Location
-
misa[21]
- Description
-
Indicates support for the U (user mode) extension.
Writing 0 to this field will cause all attempts to enter U-mode to raise an exception.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
1
V
- Location
-
misa[22]
- Description
-
Indicates 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. - Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
1
Software read
This CSR may return a value that is different from what is stored in hardware.
-
Pruned
-
Original
return (0x80000000003410ff);
return ((CSR[misa].MXL << 62) | (CSR[misa].V << 21) | (CSR[misa].U << 20) | (CSR[misa].S << 18) | (CSR[misa].M << 12) | (CSR[misa].I << 7) | (CSR[misa].H << 6) | ((CSR[misa].A & CSR[misa].M & CSR[misa].F & CSR[misa].D) << 5) | (CSR[misa].F << 4) | (CSR[misa].D << 3) | (CSR[misa].C << 2) | (CSR[misa].B << 1) | CSR[misa].A);