misa
Machine ISA Control
Reports the XLEN and "major" extensions supported by the ISA.
Attributes
Defining Extension |
|
---|---|
CSR Address |
0x301 |
Length |
#<ConfiguredArchitecture:0x00007f75efbd67c8>-bit |
Privilege Mode |
M |
Format
This CSR format changes dynamically.
Field Summary
Name | Location | Type | Reset Value |
---|---|---|---|
* 31:30 when CSR[misa].MXL == 0 * 63:62 when CSR[misa].MXL == 1 |
RO |
UNDEFINED_LEGAL |
|
0 |
UNDEFINED_LEGAL |
||
1 |
UNDEFINED_LEGAL |
||
2 |
UNDEFINED_LEGAL |
||
3 |
UNDEFINED_LEGAL |
||
5 |
UNDEFINED_LEGAL |
||
6 |
UNDEFINED_LEGAL |
||
7 |
UNDEFINED_LEGAL |
||
8 |
RO |
1 |
|
13 |
UNDEFINED_LEGAL |
||
19 |
UNDEFINED_LEGAL |
||
21 |
UNDEFINED_LEGAL |
||
22 |
UNDEFINED_LEGAL |
Software write
This CSR may store a value that is different from what software attempts to write.
When a software write occurs (e.g., through csrrw), the following determines the written value:
MXL = csr_value.MXL A = csr_value.A B = csr_value.B C = csr_value.C D = csr_value.D F = if (csr_value.F == 0 && csr_value.D == 1) { return UNDEFINED_LEGAL_DETERMINISTIC; } # fall-through; write the intended value return csr_value.F; G = csr_value.G H = csr_value.H I = csr_value.I M = csr_value.M S = csr_value.S U = csr_value.U V = csr_value.V
Software read
This CSR may return a value that is different from what is stored in hardware.
return CSR[misa].MXL << (xlen() - 2 | (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);