intel / rohd

The Rapid Open Hardware Development (ROHD) framework is a framework for describing and verifying hardware in the Dart programming language.
https://intel.github.io/rohd-website
BSD 3-Clause "New" or "Revised" License
370 stars 65 forks source link

Do not generate SystemVerilog parameter syntax when there are 0 parameters #498

Closed mkorbel1 closed 1 month ago

mkorbel1 commented 1 month ago

Description & Motivation

This is a bug fix for when parameter arguments in custom-generated SystemVerilog have provided parameter information (either instantiation or definition), but the list/map is empty (but non-null). It is illegal SystemVerilog syntax to generate something like #( ), but that's what was being generated. The fix is to look for null OR empty conditions.

Related Issue(s)

N/A

Testing

Added a new test that covers both instantiation and definition empty parameter scenarios.

Backwards-compatibility

Is this a breaking change that will not be backwards-compatible? If yes, how so?

No

Documentation

Does the change require any updates to documentation? If so, where? Are they included?

No