Closed AtomCrafty closed 1 year ago
Good idea as it allows to catch errors early.
Yup great idea, and a good companion to the new [[format=...]]
attribute. Will add it to the spec.
Proactively added to spec: Diff
(TBD if this feature makes it into 2.0 or is pushed)
Remind me again, did we decide to include the frontend checks for this in 2.0? Syntax is already supported.
If I remember correctly the decision was no checking in the frontend. As it is an 'expected' setting violations should not be an error ;-)
Ok great, closing this then.
I would like to suggest an
[[expected_encoding_width=32]]
attribute that can be applied to theinstructions
block of an ISA or individual instructions and will cause the frontend to report a warning/error if an instruction's encoding has a differing width.The reason is that - with so many bit ranges and verilog literals - it is very easy to slip up and be off by one bit here and there. Especially because you need to keep in mind that the bit ranges are inclusive on both ends, so their length is
end - start + 1
.Here is an example.