Closed chykon closed 1 year ago
My initial feeling is that you're right that this is a bug. I would have expected Combinational
and gets
to operate pretty much identically here. I'm able to reproduce your observations, thank you for filing and for the detailed reproduction instructions!
One difference between a Combinational
and gets
is that the Combinational
will execute procedurally, so actually it is possible for them to meaningfully be different.
As an experiment, I tried moving them into independent Combinational
s:
Combinational([ConditionalAssign(_out, nand2gate2.out)]);
Combinational([ConditionalAssign(_outB, nand2gate3.out)]);
Unexpectedly with these changes, your test now passes! There's definitely something wrong going on here.
Indeed, it works. It's not a bug, it's a feature
:D
In that case, please close the https://github.com/intel/rohd/issues/285 issue when you need it. I just don't know if it is related to this problem or not.
This bug will be closed by #344 which now makes a combinational circuit representing a latch always either drive X or a fatal exception due to "write after read", depending on the details of the implementation.
Describe the bug
Related to https://github.com/intel/rohd/issues/285
If you replace
Combinational
withgets
inDLatch
, then the module will return only theX
value.To Reproduce
Modified example from https://github.com/intel/rohd/issues/285
Expected behavior
The behavior of
gets
is equivalent toCombinational
.Actual behavior
The behavior of
gets
is not equivalent toCombinational
.Additional: Dart SDK info
No response
Additional: pubspec.yaml
No response
Additional: Context
No response