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
374 stars 67 forks source link

`Case` and `CaseZ` don't use the edge-sampled version of `expression` #348

Closed mkorbel1 closed 1 year ago

mkorbel1 commented 1 year ago

Describe the bug

If you use a Case or CaseZ in a Sequential, the value used for computation from expression is based on current value instead of the *edge sampled` value. This causes incorrect simulation behavior.

To Reproduce

Put Case in a Sequential where expression changes after the edge sampling, e.g. off another Sequential.

Expected behavior

expression uses the edge-sampled value

Actual behavior

No response

Additional: Dart SDK info

No response

Additional: pubspec.yaml

No response

Additional: Context

Need to write tests for If, Case, and CaseZ that cover this.