Summary
Updates:
- Significant performance improvements to compilation back-end!
- Split
RDLWalker
into two different variants:RDLSimpleWalker
,RDLSteerableWalker
- Promote several more properties to the
Node
API layer in preparation for deprecating theNode.inst
API - Update
FieldNode.implements_storage
: All hardware-writable fields that are qualified bywe
orwel
now imply storage. ⚠️ Node.inst
deprecated from public API. May be removed/changed in the future.⚠️ Removed deprecatedRDLCompiler.define_udp()
method
Bugs Fixed:
- Fix incorrect type hints for
get_property("hdl_path_slice")
andget_property("hdl_path_gate_slice")
- Fix importer support for assigning array values to properties. #276
Details
Performance Improvements
We're excited to announce that with this release, the compilation speed of large RDL designs should be much better! Several aspects of the compilation and elaboration back-end were reworked to eliminate several computational hot-spots.
What actually changed?
- Reworked and simplified how parameter references are represented during the compile process. Eliminates the need to perform an expensive deep-copy of expression syntax trees during each instantiation.
- Reworked the implementation of dynamic property assignments to resolve them on-the-fly and do more intelligent piecemeal object copying while resolving these assignments. This eliminates even more copy operations.
- Eliminate expensive deep-copy operations on component members and their children when instantiating. Since this operation was previously done on each instantiation, this represented a very poor performance scaling of approximately O(n^2), where n = the hierarchical depth of the design.
- Optimized internal elaboration instantiation mechanism to eliminate unnecessary string comparisons (Contributed by @nachumg via #290)
- Several other minor hot-path optimizations that added up to a few extra % speedup.
It is difficult to generally quantify the speedup you should expect since it depends on the depth and breadth of your specific design, but for large projects it will definitely be noticeable.
New alternatives to RDLWalker
During our code profiling adventure, we discovered that the additional overhead to implement the seldom-used WalkerAction traversal steering mechanism was somewhat significant. If your application does not require this mechanism when using a Walker/Listener, recommend using a new, more lightweight RDLSimpleWalker
.
The old walker has been renamed to RDLSteerableWalker
for clarity. To avoid breaking existing libraries, an alias to this via the old name is still provided.
Promote several more properties to the Node
API layer
This release adds the following properties and methods to the Node API layer:
- Node.inst_src_ref
- Node.def_src_ref
- Node.property_src_ref
- Node.get_scope_path()
- Node.parameters
- AddressableNode.n_elements
- RegNode.is_msb0_order
Accessing internals via Node.inst
is no longer recommended (See deprecation details below). If you are a tool maintainer, strive to clean up any references in your code from Node.inst.<old>
to Node.<new>
⚠️ Node.inst
deprecated from public API
The Node.inst
component layer is now no longer considered part of the public API, and querying into these Component
objects is not recommended. This release preserves the interface as much as possible, but beware that this may not be true in future releases.
Originally, interaction with the elaborated register model encouraged accessing some concepts from the Node
objects, and others from the Component
layer via Node.inst
. This split of where to get information added unnecessary complexity to the API, and also created a very large grey area as to what is actually part of the stable & public API. This grey-area makes maintenance difficult since it prevents breaking changes from being made in Component
objects. Removing the requirement that the Component
layer be part of a stable user-facing API allows the flexibility for implementing future enhancements that require more drastic changes to the internal object model.
In order to prepare for this, more functionality has been promoted into the Node
classes so that ideally, developers only need to rely on that layer as the user-facing API.
As mentioned earlier, please strive to strive to clean up any references in your code from Node.inst.<old>
to Node.<new>
.
⚠️ Removed deprecated RDLCompiler.define_udp()
method
This UDP registration method has been deprecated for a few years, since the 1.25.0 release . Finally cleaning up.
If you haven't migrated to the new UDP registration scheme yet, see the details in the docs.