Replies: 3 comments 1 reply
-
It really depends on the context and the view being generated. Emitting enums for the HTML views is the natural first step since the information is in the database, and it provides readers information about design intent. For other views the utility varies.
So yes, currently enums are essentially only for documentation, but the information exists in the compiled database and I am open to expanding the support for them in the situations that it makes sense to do so. |
Beta Was this translation helpful? Give feedback.
-
I think it would be helpful for sw developers to have the enum exported to the headers file. thanks |
Beta Was this translation helpful? Give feedback.
-
FWIW I have some home-grown exporters that expose the enums. With C headers, the main pain is that RDL enums are nicely scoped and namespaced, but in C they're very much not. So you end up writing long explicit enum typenames and member names in your RDL to not break the C. Maybe some kind of name mangling could be done, but I imagine it'd quickly lead to very unwieldy names. With SV I've not found casting back and forth between enums too painful (though I've not used any sparse enums). |
Beta Was this translation helpful? Give feedback.
-
I am wondering what is the purpose of enumeration in RDL.
Lets take the following example (snippet taken from the Caliptra project )
I modified the code above and removed the enumeration completely from the CMD field:
I do not see any differences in RTL/UVM or the generated C headers.
I do see however the enum values appear in the generated html documentation:
Is it right to say that enumeration is only used for documentation ?
thank you
Beta Was this translation helpful? Give feedback.
All reactions