diff --git a/passes/equiv/equiv_opt.cc b/passes/equiv/equiv_opt.cc index 6cdbd6717..df09510c3 100644 --- a/passes/equiv/equiv_opt.cc +++ b/passes/equiv/equiv_opt.cc @@ -74,16 +74,16 @@ struct EquivOptPass:public ScriptPass log("\n"); } - std::string command, techmap_opts, make_opts; - bool assert, undef, multiclock, async2sync, nocheck, post; + std::string command, techmap_opts, make_opts, induct_opts; + bool assert, multiclock, async2sync, nocheck, post; void clear_flags() override { command = ""; techmap_opts = ""; make_opts = ""; + induct_opts = ""; assert = false; - undef = false; multiclock = false; async2sync = false; nocheck = false; @@ -118,7 +118,11 @@ struct EquivOptPass:public ScriptPass continue; } if (args[argidx] == "-undef") { - undef = true; + induct_opts += " -undef"; + continue; + } + if (args[argidx] == "-ignore-unknown-cells") { + induct_opts += " -ignore-unknown-cells"; continue; } if (args[argidx] == "-nocheck") { @@ -213,11 +217,10 @@ struct EquivOptPass:public ScriptPass opts = make_opts; run("equiv_make" + opts + " gold gate equiv"); if (help_mode) - run("equiv_induct [-undef] equiv"); - else if (undef) - run("equiv_induct -undef equiv"); + opts = " [-undef] [-ignore-unknown-cells]"; else - run("equiv_induct equiv"); + opts = induct_opts; + run("equiv_induct" + opts + " equiv"); if (help_mode) run("equiv_status [-assert] equiv"); else if (assert) diff --git a/tests/silimate/fanoutbuf.ys b/tests/silimate/fanoutbuf.ys index 3fd70ef0a..38df60d7b 100644 --- a/tests/silimate/fanoutbuf.ys +++ b/tests/silimate/fanoutbuf.ys @@ -315,13 +315,13 @@ module top ( wire intermediate1, intermediate2; assign intermediate1 = a & b; assign intermediate2 = intermediate1 | c; - + assign w1 = intermediate1; assign w2 = intermediate1; assign w3 = intermediate1; assign w4 = intermediate1; assign w5 = intermediate1; - + assign x1 = intermediate2; assign x2 = intermediate2; assign x3 = intermediate2; @@ -376,7 +376,7 @@ EOF check -assert # Check equivalence after fanoutbuf - should insert buffers in sub module -equiv_opt -assert fanoutbuf +equiv_opt -assert -ignore-unknown-cells fanoutbuf design -load postopt select -assert-count 1 t:$buf select -assert-none t:$pos