intel / rohd-hcl

A hardware component library developed with ROHD.
https://pub.dev/packages/rohd_hcl
BSD 3-Clause "New" or "Revised" License
81 stars 23 forks source link

Trace errors due to forgotten addInput can be detected only upon instantiation in a Module not a test #136

Open desmonddak opened 1 week ago

desmonddak commented 1 week ago

Describe the bug

Creating a component, instantiating in a directed test, and testing will NOT uncover a forgotten addInput.

Yet, instantiating that component in another module does uncover trace errors.

For the HCL, it would be good if we can eliminate this source of errors that show up late.

To Reproduce

Create a simple component, but don't use addInput for one of the inputs (or delete the addInput for an existing component -- in one case it was an optional input that was driven).

then instantiate that component in a simple wrapper module and drive with a similar test. You will see a connectivity trace error.

Expected behavior

We expect trace errors show up during basic directed tests which are required of most component.s

Actual behavior

We see trace errors show up only when the component is used and this is typically a forgotten addInput.

Additional: Dart SDK info

No response

Additional: pubspec.yaml

No response

Additional: Context

A possible solution is to create a wrap routine that instantiates a module by mirroring its ports. This would be enough to catch trace errors due to forgotten addInput routines.

mkorbel1 commented 2 days ago

The configurator tests instantiate modules already, perhaps we can leverage that to also test for this?