Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-synthesizable APIs on LogicStructure rely on packed #457

Closed
mkorbel1 opened this issue Jan 5, 2024 · 0 comments · Fixed by #458
Closed

Non-synthesizable APIs on LogicStructure rely on packed #457

mkorbel1 opened this issue Jan 5, 2024 · 0 comments · Fixed by #458
Labels
bug Something isn't working

Comments

@mkorbel1
Copy link
Contributor

mkorbel1 commented Jan 5, 2024

Describe the bug

Non-synthesizable APIs such as posedge or value depend on the result of packed to compute their value. This is generally accurate, but has two major downsides:

  • Calling packed creates and connects a new signal. If a testbench calls packed (directly or indirectly) on a signal within a Module, it will generate some additional hardware (though it won't have any functional impact).
  • The previousValue will be null the first time it is called since packed is lazily initialized. This can cause surprising testbench failures.

To Reproduce

Call previousValue on a LogicStructure and observe that it is null.

Expected behavior

The APIs should not have side effects of creating hardware (even without functional impact) and should be functional in the same way as Logic.

Actual behavior

No response

Additional: Dart SDK info

No response

Additional: pubspec.yaml

No response

Additional: Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant