-
Notifications
You must be signed in to change notification settings - Fork 6
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
Default partitioning of eqy fails to prove equivalence for circuit containing only "eq" and "neq", but succeeds if output is turned into internal wire #47
Comments
FWIW adding this to
workaround equiv.eqy:
|
This is not a bug in SBY, but a known current limitation of EQY's partitioning that we plan to improve on. When EQY passes a partition to SBY, that partition is checked in isolation, that's a core part of EQY's design, but it requires that the partitioning is done in a way that equality can still be proved. Our current partitioning code often requires some manual tuning to ensure that this is possible. In this case EQY decided to split the partitions in such a way that when checking that the gold side During partition EQY prints the following warnings as it couldn't perfectly align both sides due to structural changes between gold and gate, which is an indicator that such a problem might be present, especially if it's present for both gold and gate inputs for the same partition.
In this case I could pinpoint the problem just from the observed behavior and log output, but in general the directory created by eqy contains more detailed log, data and RTLIL files that can help diagnosing such issues, especially for larger designs. One workaround that directly addresses this underlying reason for the false-positive equivalence-failure is to explicitly tell EQY to make the definition of
|
Actually I'll keep this issue open, even if requiring manual annotations is currently by design, as we do plan to improve this and keeping track of examples where the current approach doesn't do the right thing automatically is useful for that. |
Thanks, the
Am I understanding correctly that whenever I see this warning |
This is the smallest reproducer for the bug, given modules
gate.v
:and
gold.v
:sby
claims that theneq
partitions are not equivalent. In the generated.vcd
trace botheq
andneq
are shown with value1
forgold.v
which doesn't make sense, those 2 should always be a negation of each-other.If I change
eq
to be a wire instead of an output then suddenly it is able to prove thatneq
is in fact equivalent.(Note that introducing additional wires in
gate.v
doesn't help either).I tried several
smtbmc
engines (bitwuzla
,boolector
) with the same result, the problem seems to be with the way the partition is created.Reproduced the bug with oss-cad-suite-linux-x64-20230821.tgz running on Fedora 38.
I've attached the full working and failing inputs and the full logs created by
eqy
:sbybug.zip
The warning about unconnected inputs here looks suspicious:
What am I doing wrong?
The text was updated successfully, but these errors were encountered: