Combinational
is overly optimistic in equivalent always_comb
inferred sensitivities
#290
Labels
bug
Something isn't working
Describe the bug
In SystemVerilog, the
always_comb
sensitivities are only signals referenced within thealways_comb
block. In ROHD, currently, any combinational signal that may modify the input to aCombinational
is treated as a sensitivity. When thealways_comb
is created, it can generate a non-equivalent implementation relative to the ROHD simulation.When inlineable modules are used, things are generally equivalent thanks to the fix for #158.
However, if the module is not inlined (e.g. from another generator, see steveicarus/iverilog#872) or the module itself is non-inlineable (easy to create with the existing ROHD generator), then the behavior of the simulation in ROHD will not necessarily match the SystemVerilog simulation.
Perhaps a modification from
always_comb
toalways @(list, of, sensitivities)
could help, but this has two problems:always_comb
) can be treated as separate processes by the SystemVerilog simulator and lead to non-deterministic race conditions in simulation behavior.To Reproduce
This new test (based off others in
comb_math_test.dart
) will fail due to simulation behavior mismatch in ROHD and Icarus Verilog because the&
gate has been moved into a non-inlineable module.Expected behavior
ROHD should reliable generate SystemVerilog which unambiguously has equivalent simulation and synthesis behavior to the simulation behavior in the ROHD simulator.
Actual behavior
ROHD and SV simulators disagree due to extra sensitivities relative to SV and/or nondeterministic race conditions in the SV implementation.
Additional: Dart SDK info
No response
Additional: pubspec.yaml
No response
Additional: Context
Present in ROHD v0.4.2
The text was updated successfully, but these errors were encountered: