Open chykon opened 1 year ago
The order in which clock is connected to module inputs affects how the circuit behaves.
clock
The first screenshot shows the correct behavior, the second shows the wrong one:
register3
register4
register0
SCREENSHOT 1
SCREENSHOT 2
The example itself is quite large, so perhaps others should be considered as “minimal examples” (the order of joins there affected the values of x/z):
x
z
example.dart
waves.vcd
RegisterFileControllerUnit
bsm1d.dart
rfcu.clock <= intf.clock;
The connection order does not affect the behavior of the circuit.
The connection order affects the behavior of the circuit.
Dart SDK version: 2.19.3 (stable) (Tue Feb 28 15:52:19 2023 +0000) on "linux_x64"
No response
ROHD v0.4.2
Thank you for providing the detail and something to reproduce this. I haven't started debugging yet but from your description it does sound like a bug.
Describe the bug
The order in which
clock
is connected to module inputs affects how the circuit behaves.The first screenshot shows the correct behavior, the second shows the wrong one:
register3
andregister4
contain unknown values for some reasonregister0
must copy the value fromregister4
, and whileregister4
contains an unknown value,register0
contains the correct valueregister0
sets the required value in the same clock as the module receives input (as if the logic is combinational, not sequential)SCREENSHOT 1
SCREENSHOT 2
The example itself is quite large, so perhaps others should be considered as “minimal examples” (the order of joins there affected the values of
x
/z
):To Reproduce
example.dart
, openwaves.vcd
, checkRegisterFileControllerUnit
module signals - this is expected behaviorbsm1d.dart
, go to line 67rfcu.clock <= intf.clock;
and swap it with line 68.example.dart
, openwaves.vcd
, checkRegisterFileControllerUnit
module signals - this is erroneous behaviorExpected behavior
The connection order does not affect the behavior of the circuit.
Actual behavior
The connection order affects the behavior of the circuit.
Additional: Dart SDK info
Dart SDK version: 2.19.3 (stable) (Tue Feb 28 15:52:19 2023 +0000) on "linux_x64"
Additional: pubspec.yaml
No response
Additional: Context
ROHD v0.4.2