aboutsummaryrefslogtreecommitdiffstats
path: root/ice40
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2018-12-02 14:08:11 +0000
committerDavid Shah <dave@ds0.me>2018-12-06 10:53:01 +0000
commitf3adf5a576a881e39cf78e599cbcd7ed3d3b8ec1 (patch)
treea8626ad61a21d111f49df67a741351d9aa460cd1 /ice40
parent0f40e5fe8ce29bf55a943f7f0ff288a5e78dde6b (diff)
downloadnextpnr-f3adf5a576a881e39cf78e599cbcd7ed3d3b8ec1.tar.gz
nextpnr-f3adf5a576a881e39cf78e599cbcd7ed3d3b8ec1.tar.bz2
nextpnr-f3adf5a576a881e39cf78e599cbcd7ed3d3b8ec1.zip
timing_opt: Make an optional pass controlled by command line
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'ice40')
-rw-r--r--ice40/arch.cc11
-rw-r--r--ice40/main.cc3
2 files changed, 11 insertions, 3 deletions
diff --git a/ice40/arch.cc b/ice40/arch.cc
index 98e6d4c7..9dbc78bb 100644
--- a/ice40/arch.cc
+++ b/ice40/arch.cc
@@ -631,9 +631,14 @@ bool Arch::place()
{
if (!placer1(getCtx(), Placer1Cfg(getCtx())))
return false;
- TimingOptCfg tocfg(getCtx());
- tocfg.cellTypes.insert(id_ICESTORM_LC);
- return timing_opt(getCtx(), tocfg);
+ if(bool_or_default(settings, id("opt_timing"), false)) {
+ TimingOptCfg tocfg(getCtx());
+ tocfg.cellTypes.insert(id_ICESTORM_LC);
+ return timing_opt(getCtx(), tocfg);
+ } else {
+ return true;
+ }
+
}
bool Arch::route() { return router1(getCtx(), Router1Cfg(getCtx())); }
diff --git a/ice40/main.cc b/ice40/main.cc
index 4b6a9e42..543bd229 100644
--- a/ice40/main.cc
+++ b/ice40/main.cc
@@ -68,6 +68,7 @@ po::options_description Ice40CommandHandler::getArchOptions()
specific.add_options()("promote-logic",
"enable promotion of 'logic' globals (in addition to clk/ce/sr by default)");
specific.add_options()("no-promote-globals", "disable all global promotion");
+ specific.add_options()("opt-timing", "run post-placement timing optimisation pass (experimental)");
specific.add_options()("tmfuzz", "run path delay estimate fuzzer");
return specific;
}
@@ -161,6 +162,8 @@ std::unique_ptr<Context> Ice40CommandHandler::createContext()
ctx->settings[ctx->id("promote_logic")] = "1";
if (vm.count("no-promote-globals"))
ctx->settings[ctx->id("no_promote_globals")] = "1";
+ if (vm.count("opt-timing"))
+ ctx->settings[ctx->id("opt_timing")] = "1";
return ctx;
}