Skip to content

Releases: SystemRDL/systemrdl-compiler

1.29.3

09 Jan 03:42
Compare
Choose a tag to compare

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(), and FieldNode.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 for RegNode 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.
image

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:
image
... as well as property-specific return type inlay hints:
image
(Did you know the "reset" property can return all those other variants? Most people assume it is always an int!)

1.28.0

18 Dec 06:21
Compare
Choose a tag to compare

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 for UserEnumMemberContainer. #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

12 Jan 05:36
Compare
Choose a tag to compare

Bug Fixes:

  • Fix FieldNode.is_volatile incorrectly returning non-boolean value if some properties are assigned references.

1.27.2

08 Nov 05:43
Compare
Choose a tag to compare

Bug Fixes:

  • Fix error handling if struct is not fully defined (#192)
  • Fix omission of 6.3.2.3.2-b: Auto-assign default values to unset members of struct literals.

1.27.1

12 Oct 04:53
Compare
Choose a tag to compare

no-op release to fix readthedocs stable docs build. No changes.

1.27.0

12 Oct 04:04
Compare
Choose a tag to compare

Updates:

  • Upgrade to Antlr 4.13.1 runtime
  • Add method to generate a globally scoped type name. #187

1.26.1

04 Aug 06:04
Compare
Choose a tag to compare

Bug Fixes:

  • Fix missed check on valid assignment component for UDPs
  • More proper fix for quirk where parameter override across multiple elaborations would use cached default value. #166, #181, #182
  • Fix support for UDP array type defaults. #180

1.26.0

09 Jun 04:19
Compare
Choose a tag to compare

Updates:

  • Add ability to inject define macros into preprocessor. #174

Bug Fixes:

  • Fix compile crash when encountering empty group-like nodes. #176
  • Bypass irrelevant storage-related rule checks for alias registers. #173

1.25.7

21 Apr 05:32
Compare
Choose a tag to compare

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

1.25.6

10 Apr 06:18
Compare
Choose a tag to compare

Bug Fixes:

  • Fix mishandled implicit boolean assignment for donttest/dontcompare properties. #167