You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my RDL I have a set of user-defined properties (approximately 5) some are associated with fields and some are associated with regs. I want these to end up in the views exported from RDL (eg, to appear in a derived UVM register model)
I'd like some mechanism that allows my exporter to iterate over all properties on a node. I don't think this is currently possible. Is it a mad/bad idea? When iterating I might need to skip some "standard" properties like reset value but then I could process all of the others without needing pre-knowledge of their names.
Currently, the only solution I see is for my exporter to use get_property for each of the user-defined properties in turn. This requires hard-wiring the names of the user-defined properties into the exporter, which will cause painful maintenance if I add a new one.
(I have read about pre-registering a UDP and about soft UDP. I understand the reasons for these mechanisms and how soft UDP (in partucular) provide some nice protection for the user and the back-end consumer of the exported views. In my particular application, the RDL is acting as an intermediate format exported from a proprietary database and the syntax of the RDL is "guaranteed by design")
Thank you for your consideration
Neal.
The text was updated successfully, but these errors were encountered:
Hi Neal,
If I'm understanding your request correctly, I believe the mechanism to do what you want to do already exists.
See the Node.list_properties() method.
This will return a list of all the property names that are valid for the current node type. Furthermore, the method has options to filter them down based on whether they were explicitly assigned, they are UDPs or they are native RDL properties.
Using that list, you can then call Node.get_property() individually.
Hi @amykyta3,
thanks for your super-fast and courteous response. Yes, it sounds like this does exactly what I want, and the method's options also sound useful. I missed it in the documentation because I searched for "property" but not "properties".
In my RDL I have a set of user-defined properties (approximately 5) some are associated with fields and some are associated with regs. I want these to end up in the views exported from RDL (eg, to appear in a derived UVM register model)
I'd like some mechanism that allows my exporter to iterate over all properties on a node. I don't think this is currently possible. Is it a mad/bad idea? When iterating I might need to skip some "standard" properties like reset value but then I could process all of the others without needing pre-knowledge of their names.
Currently, the only solution I see is for my exporter to use get_property for each of the user-defined properties in turn. This requires hard-wiring the names of the user-defined properties into the exporter, which will cause painful maintenance if I add a new one.
(I have read about pre-registering a UDP and about soft UDP. I understand the reasons for these mechanisms and how soft UDP (in partucular) provide some nice protection for the user and the back-end consumer of the exported views. In my particular application, the RDL is acting as an intermediate format exported from a proprietary database and the syntax of the RDL is "guaranteed by design")
Thank you for your consideration
Neal.
The text was updated successfully, but these errors were encountered: