misa
Machine ISA Control
Reports the XLEN and "major" extensions supported by the ISA.
Attributes
Defining Extension |
|
||||
---|---|---|---|---|---|
CSR Address |
0x301 |
||||
Length |
|
||||
Privilege Mode |
M |
Field Summary
Name | Location | Type | Reset Value | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
63:62 |
RO |
2 |
|||||||||
0 |
|
1 |
|||||||||
1 |
|
1 |
|||||||||
2 |
|
1 |
|||||||||
3 |
|
1 |
|||||||||
5 |
|
1 |
|||||||||
6 |
|
|
|||||||||
7 |
|
1 |
|||||||||
8 |
RO |
1 |
|||||||||
13 |
|
1 |
|||||||||
19 |
|
1 |
|||||||||
21 |
|
1 |
|||||||||
22 |
RO |
1 |
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 << 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);