Releases: SystemRDL/systemrdl-compiler
1.29.3
Summary
Updates:
- Improve namespace collision errors to also show location of previous definition. #231, #235
- Add option for
RegNode.fields()
utility to also return gaps between fields. #244 Node.children()
,Node.signals()
,Node.Registers()
,RegNode.fields()
,RegNode.aliases()
, andFieldNode.aliases()
now return lists rather than generators.- Significant improvements in static type hinting. #242
- Node iterators now advertise more accurate narrowed return types.
Node.parent
,Node.inst
, and other members are more accurately typed in subclasses- Expected return types annotated for all built-in properties from
Node.get_property()
Bugs fixed:
- Fix internal error from compiler if parser fails to produce a parse tree. #243
- Move
Node.fields()
method to be exclusively forRegNode
as it is meaningless for all other node types. - Fix missed elaboration of signal's 'external' property. #245
Details
Better namespace collision errors
Previously, if you had multiple declarations of a component of the same name in the same namespace, the compiler would only report the offending second definition. In large designs, this could result in a lengthy search for what is causing the namespace collision.
This release introduces an additional warning message that provides more context.
RegNode.fields() can now return gaps between fields
RDL has no explicit concept for reserved fields, so historically the RegNode.fields()
utility would only return actual existing fields.
For many output generators, calculating the gaps for padding between fields is still a very common operation. Speaking from experience, it is also very easy to screw up!
This update adds an optional argument: RegNode.fields(include_gaps=True)
.
When enabled, one can iterate over fields, and gaps between fields:
for field in reg_node.fields(include_gaps=True):
if isinstance(field, FieldNode):
print(f"Actual field: {field}")
elif isinstance(field, tuple): # <-- NEW!
high, low = field
print(f"Gap between fields: [{high}:{low}]")
Node iterator utilities now return lists instead of generators
The Node.children()
, Node.signals()
, Node.Registers()
, RegNode.fields()
, RegNode.aliases()
, and FieldNode.aliases()
utilities used to be implemented as generators.
It turns out that since these are relatively low-cost operations, it is more performant in nearly all cases for the API to directly construct lists instead.
This should have zero impact on your code, except for maybe allowing you to remove a few pesky re-casts to lists in some places.
Significant improvements in static type hinting
If you are a developer, this is a massive quality-of-life improvement.
Nearly all of the public compiler API is now properly type-annotated. Most notably, the Node.get_property()
is exhaustively annotated with overload annotations. If you're using VSCode+PyLance, this means you get really nice auto-completion for available property names:
... as well as property-specific return type inlay hints:
(Did you know the "reset" property can return all those other variants? Most people assume it is always an int!)
1.28.0
Updates:
⚠️ Drop support for Python 3.5 and 3.6- C extension reworked to be compatible with the Python Stable ABI. Rather than generating per-python-version wheels, simplified deploy to only produce
abi3
wheels. - Add
usedforsecurity
flag to all hashlib calls to satisfy FIPS audits (#219) - Fix missing
py.typed
from installed package. #207, #241 - Fix comparison of default UDP assignment with API-provided object. #213
- Add
__hash__
method forUserEnumMemberContainer
. #239 - Fix use of enums in concatenation expressions. #230
- Fix an amusing edge-case that causes an out-of-memory crash. #224
1.27.3
1.27.2
1.27.1
1.27.0
1.26.1
1.26.0
1.25.7
Bug Fixes:
- Remove inaccurate mutually-exclusive limitation on dontcompare/donttest properties.
- Fix missed validation of field access policy if swwe/swwel/we/wel properties are assigned a reference.
- Fix quirk where parameter override across multiple elaborations would use cached default value. #166