summaryrefslogtreecommitdiff
path: root/passes
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-07-20 15:23:08 +0200
committerClifford Wolf <clifford@clifford.at>2014-07-20 15:33:07 +0200
commit4c38ec1cc81c95b79fbd717dafd9f79708c123e8 (patch)
tree21a1d1a3f5c1546e2942ea653a617747da0b6457 /passes
parent8d04ca7d22e375fbe075dee1f189669046ee8906 (diff)
Added "miter -equiv -flatten"
Diffstat (limited to 'passes')
-rw-r--r--passes/sat/miter.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/passes/sat/miter.cc b/passes/sat/miter.cc
index 6c8e2ff4..0ef9e9aa 100644
--- a/passes/sat/miter.cc
+++ b/passes/sat/miter.cc
@@ -27,6 +27,7 @@ static void create_miter_equiv(struct Pass *that, std::vector<std::string> args,
bool flag_make_outputs = false;
bool flag_make_outcmp = false;
bool flag_make_assert = false;
+ bool flag_flatten = false;
log_header("Executing MITER pass (creating miter circuit).\n");
@@ -49,6 +50,10 @@ static void create_miter_equiv(struct Pass *that, std::vector<std::string> args,
flag_make_assert = true;
continue;
}
+ if (args[argidx] == "-flatten") {
+ flag_flatten = true;
+ continue;
+ }
break;
}
if (argidx+3 != args.size() || args[argidx].substr(0, 1) == "-")
@@ -287,6 +292,12 @@ static void create_miter_equiv(struct Pass *that, std::vector<std::string> args,
miter_module->add(not_cell);
miter_module->fixup_ports();
+
+ if (flag_flatten) {
+ log_push();
+ Pass::call_on_module(design, miter_module, "flatten; opt_const -undriven;;");
+ log_pop();
+ }
}
struct MiterPass : public Pass {
@@ -317,6 +328,9 @@ struct MiterPass : public Pass {
log(" -make_assert\n");
log(" also create an 'assert' cell that checks if trigger is always low.\n");
log("\n");
+ log(" -flatten\n");
+ log(" call 'flatten; opt_const -undriven;;' on the miter circuit.\n");
+ log("\n");
}
virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
{