-
I'm developing a SystemRDL exporter for Opentitan reggen. Since some reggen properties lack direct SystemRDL equivalents, I'm using UDPs. However, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi Douglas, UDP declarations in RDLFor some background - First I'll explain how UDPs work a pure RDL design, without any importers in-play. property my_udp {
type = longint;
component = field;
}; This allows one to declare a property, alongside some very very basic semantics: The property called In your case, the importer API is likely rejecting the assignment because there was no declaration of the UDP yet. One way to fix this is to compile an RDL file that contains this UDP declaration prior to any importer activities. The UDPDefinition DescriptorIf you're working with UDPs in the RDL compiler API, pretty quickly, you'll probably realize that the purely textual declaration in RDL has some shortfalls in practice:
To solve these problems, the RDL compiler lets you "pre-register" a UDP. Why you should use "soft" UDP registrationsWhen reading through the UDP docs, you'll notice that the default behavior will still require one to explicitly declare the UDP in RDL code. Despite this seeming like a silly extra step, I would still recommend enforcing this since it improves the portability of your RDL in case you use other RDL-compatible tools in the future. Hope this helps get you in the right direction. I'd be happy to clarify anything else if needed |
Beta Was this translation helpful? Give feedback.
Hi Douglas,
There are a few things at play here.
UDP declarations in RDL
For some background - First I'll explain how UDPs work a pure RDL design, without any importers in-play.
The SystemRDL standard mandates that any user-defined properties be explicitly declared in the code ahead of their use. For example:
This allows one to declare a property, alongside some very very basic semantics: The property called
my_udp
takes an integer type, and can only be applied to fields. Once declared, this unlocks the ability to assign themy_udp
property to field components. If not declared, the compiler will reject it as an unrecognized p…