aboutsummaryrefslogtreecommitdiffstats
path: root/passes
diff options
context:
space:
mode:
authorclairexen <claire@symbioticeda.com>2020-07-28 12:56:22 +0200
committerGitHub <noreply@github.com>2020-07-28 12:56:22 +0200
commit66afed6f55be9c32eb2a1eef921633b302efa9c4 (patch)
tree3bd90b24e40dd45430bb2e67b99130c8c5fe11b5 /passes
parenta2fb84fd0c5f57b601b6a3c4cee0b409d74b5d21 (diff)
parenta1a0abf52afe397e11b63bfc67e82aaf7bf9f498 (diff)
downloadyosys-66afed6f55be9c32eb2a1eef921633b302efa9c4.tar.gz
yosys-66afed6f55be9c32eb2a1eef921633b302efa9c4.tar.bz2
yosys-66afed6f55be9c32eb2a1eef921633b302efa9c4.zip
Merge pull request #2306 from YosysHQ/mwk/equiv_induct-undef
equiv_induct: Fix up assumption for $equiv cells in -undef mode.
Diffstat (limited to 'passes')
-rw-r--r--passes/equiv/equiv_induct.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/passes/equiv/equiv_induct.cc b/passes/equiv/equiv_induct.cc
index 596c938fc..37aec50cd 100644
--- a/passes/equiv/equiv_induct.cc
+++ b/passes/equiv/equiv_induct.cc
@@ -65,8 +65,10 @@ struct EquivInductWorker
int ez_a = satgen.importSigBit(bit_a, step);
int ez_b = satgen.importSigBit(bit_b, step);
int cond = ez->IFF(ez_a, ez_b);
- if (satgen.model_undef)
+ if (satgen.model_undef) {
+ cond = ez->AND(cond, ez->NOT(satgen.importUndefSigBit(bit_b, step)));
cond = ez->OR(cond, satgen.importUndefSigBit(bit_a, step));
+ }
ez_equal_terms.push_back(cond);
}
}