Skip to content

Commit 953aa50

Browse files
authored
feat: add misa Q bit, add MUTABLE_MISA_Q parameter to Q extension (#801)
This pull request introduces the following changes: ### MISA Q Bit - Added a new field `Q` in `arch/csr/misa.yaml` to indicate support for the Q (quad precision float) extension. ### MUTABLE_MISA_Q Parameter - Introduced a new parameter `MUTABLE_MISA_Q` in `arch/ext/Q.yaml`. ### Additional Notes - Changes to `F` and `D` bits might be required. Looking forward to getting some feedback on this. **Related Issue:** - Issue #788
1 parent 1f91393 commit 953aa50

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

arch/csr/misa.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,28 @@ fields:
169169
.. Execute every in-scope multiply extension instruction
170170
. check
171171
.. Check that every multiply extension instruction throws illegal instruction exception
172+
Q:
173+
location: 16
174+
description: |
175+
Indicates support for the `Q` (quad precision float) extension.
176+
177+
[when,"MUTABLE_MISA_Q == true"]
178+
--
179+
Writing 0 to this field will cause all quad-precision floating point instructions to raise an `IllegalInstruction` exception.
180+
--
181+
type(): |
182+
return MUTABLE_MISA_Q ? CsrFieldType::RW : CsrFieldType::RO;
183+
reset_value: 1
184+
definedBy: Q
185+
sw_write(csr_value): |
186+
if ((csr_value.F == 0 || csr_value.D == 0) && csr_value.Q == 1) {
187+
return UNDEFINED_LEGAL_DETERMINISTIC;
188+
}
189+
190+
# fall-through; write the intended value
191+
return csr_value.Q;
192+
legal?(csr_value): |
193+
return !(csr_value.Q == 1 && csr_value.D == 0);
172194
S:
173195
location: 18
174196
description: |

arch/ext/Q.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ versions:
1818
state: ratified
1919
ratification_date: null
2020
requires: D
21+
params:
22+
MUTABLE_MISA_Q:
23+
description: |
24+
Indicates whether or not the `Q` extension can be disabled with the `misa.Q` bit.
25+
schema:
26+
type: boolean

0 commit comments

Comments
 (0)