diff --git a/passes/equiv/equiv_opt.cc b/passes/equiv/equiv_opt.cc index 1a72201b4..434452db4 100644 --- a/passes/equiv/equiv_opt.cc +++ b/passes/equiv/equiv_opt.cc @@ -69,13 +69,16 @@ struct EquivOptPass:public ScriptPass log(" -undef\n"); log(" enable modelling of undef states during equiv_induct.\n"); log("\n"); + log(" -nocheck\n"); + log(" disable running check before and after the command under test.\n"); + log("\n"); log("The following commands are executed by this verification command:\n"); help_script(); log("\n"); } std::string command, techmap_opts, make_opts, negsetuphold; - bool assert, undef, multiclock, async2sync, simple; + bool assert, undef, multiclock, async2sync, simple, nocheck; void clear_flags() override { @@ -88,6 +91,7 @@ struct EquivOptPass:public ScriptPass multiclock = false; async2sync = false; simple = false; + nocheck = false; } void execute(std::vector < std::string > args, RTLIL::Design * design) override @@ -125,6 +129,10 @@ struct EquivOptPass:public ScriptPass simple = true; continue; } + if (args[argidx] == "-nocheck") { + nocheck = true; + continue; + } if (args[argidx] == "-multiclock") { multiclock = true; continue; @@ -179,10 +187,14 @@ struct EquivOptPass:public ScriptPass if (check_label("run_pass")) { run("hierarchy -auto-top"); run("design -save preopt"); + if (!nocheck) + run("check -assert", "(unless -nocheck)"); if (help_mode) run("[command]"); else run(command); + if (!nocheck) + run("check -assert", "(unless -nocheck)"); run("design -stash postopt"); }