aboutsummaryrefslogtreecommitdiffstats
path: root/passes
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-09-12 12:26:28 +0100
committerGitHub <noreply@github.com>2019-09-12 12:26:28 +0100
commit6044fff074f026676312f047cfd5a7c862ff987f (patch)
tree67b1bdced6f74eb2551f087df2adb2e17556e974 /passes
parentf72765090cd001ff4dc54d5a9c01a2d4b3339865 (diff)
parentc43e52d2d7d16c26b1a4a9c20fad83c9f4577910 (diff)
downloadyosys-6044fff074f026676312f047cfd5a7c862ff987f.tar.gz
yosys-6044fff074f026676312f047cfd5a7c862ff987f.tar.bz2
yosys-6044fff074f026676312f047cfd5a7c862ff987f.zip
Merge pull request #1370 from YosysHQ/dave/equiv_opt_multiclock
Add equiv_opt -multiclock
Diffstat (limited to 'passes')
-rw-r--r--passes/equiv/equiv_opt.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/passes/equiv/equiv_opt.cc b/passes/equiv/equiv_opt.cc
index 19d1c25ac..d4c7f7953 100644
--- a/passes/equiv/equiv_opt.cc
+++ b/passes/equiv/equiv_opt.cc
@@ -46,6 +46,9 @@ struct EquivOptPass:public ScriptPass
log(" -assert\n");
log(" produce an error if the circuits are not equivalent.\n");
log("\n");
+ log(" -multiclock\n");
+ log(" run clk2fflogic before equivalence checking.\n");
+ log("\n");
log(" -undef\n");
log(" enable modelling of undef states during equiv_induct.\n");
log("\n");
@@ -55,7 +58,7 @@ struct EquivOptPass:public ScriptPass
}
std::string command, techmap_opts;
- bool assert, undef;
+ bool assert, undef, multiclock;
void clear_flags() YS_OVERRIDE
{
@@ -63,6 +66,7 @@ struct EquivOptPass:public ScriptPass
techmap_opts = "";
assert = false;
undef = false;
+ multiclock = false;
}
void execute(std::vector < std::string > args, RTLIL::Design * design) YS_OVERRIDE
@@ -92,6 +96,10 @@ struct EquivOptPass:public ScriptPass
undef = true;
continue;
}
+ if (args[argidx] == "-multiclock") {
+ multiclock = true;
+ continue;
+ }
break;
}
@@ -146,6 +154,8 @@ struct EquivOptPass:public ScriptPass
}
if (check_label("prove")) {
+ if (multiclock || help_mode)
+ run("clk2fflogic", "(only with -multiclock)");
run("equiv_make gold gate equiv");
if (help_mode)
run("equiv_induct [-undef] equiv");