diff options
author | Claire Xenia Wolf <claire@clairexen.net> | 2021-05-04 19:02:37 +0200 |
---|---|---|
committer | Jannis Harder <me@jix.one> | 2022-10-07 16:04:51 +0200 |
commit | 051630763741914c3ba3bdf25ea091395dbc00b4 (patch) | |
tree | 889c069162786419ff57177fe297fc0065eeaf8c /passes | |
parent | f0478c520dd87f463a7fd8aee741273a85f3b1d4 (diff) | |
download | yosys-051630763741914c3ba3bdf25ea091395dbc00b4.tar.gz yosys-051630763741914c3ba3bdf25ea091395dbc00b4.tar.bz2 yosys-051630763741914c3ba3bdf25ea091395dbc00b4.zip |
Add "check -assert" to equiv_opt
Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
Diffstat (limited to 'passes')
-rw-r--r-- | passes/equiv/equiv_opt.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/passes/equiv/equiv_opt.cc b/passes/equiv/equiv_opt.cc index 4d0400448..f5eb75730 100644 --- a/passes/equiv/equiv_opt.cc +++ b/passes/equiv/equiv_opt.cc @@ -60,13 +60,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; - bool assert, undef, multiclock, async2sync; + bool assert, undef, multiclock, async2sync, nocheck; void clear_flags() override { @@ -77,6 +80,7 @@ struct EquivOptPass:public ScriptPass undef = false; multiclock = false; async2sync = false; + nocheck = false; } void execute(std::vector < std::string > args, RTLIL::Design * design) override @@ -110,6 +114,10 @@ struct EquivOptPass:public ScriptPass undef = true; continue; } + if (args[argidx] == "-nocheck") { + nocheck = true; + continue; + } if (args[argidx] == "-multiclock") { multiclock = true; continue; @@ -153,10 +161,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"); } |