-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility between UDP default
property and UDPDefinition.default_assignment
#213
Comments
Thanks! |
In the meantime, double-check whether you meant to use the get_unassigned_default() method instead. That one is subtly different and in my opinion, way more useful than SystemRDL's weird "default assignment" semantics.
More analysis on the interpretation of "default assignments" can be found here: https://systemrdl-compiler.readthedocs.io/en/stable/dev_notes/rdl_spec_errata.html#meaning-of-the-user-defined-property-default-attribute |
Table 7's "default" column isn't really applicable to UDPs. Rather, that column is generally applied to built-in RDL properties. Even then, I have found that some properties have further clauses described that contradict with Table 7. I have found that the specification creates several contradictions when it comes to UDPs. Some of them, they call out explicitly which is good. For example clause 15.1.1-d:
Regarding an un-specified UDP
Given the text in 15.1.1-d and and the above example, the interpretation that is most consistent in my opinion is that if a UDP does not provide a This is just one of many things that the SystemRDL spec leaves open to interpretation. In the end, I have to do my best to make a fair and sensible interpretation that is least surprising to the user. UDPs are one part of the spec that are pretty sloppily defined so I get a lot of questions about them. I will add it to the growing list of things I have documented here: https://systemrdl-compiler.readthedocs.io/en/stable/dev_notes/rdl_spec_errata.html |
Declaring an UDP like:
And registering the UDP definition:
This will fail with error:
It seems like the comparison is being made with an AST node for
false
instead of the value itself.The text was updated successfully, but these errors were encountered: