diff options
author | David Shah <dave@ds0.me> | 2019-02-25 11:56:10 +0000 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2019-03-22 10:31:54 +0000 |
commit | 7142db28a8b828da557729a706c20c8f330ba129 (patch) | |
tree | ad9898be5e31227bcfeabde06b4c24c5455d143b /ice40 | |
parent | 1c824709e21b18073bfdc182793351e40269c373 (diff) | |
download | nextpnr-7142db28a8b828da557729a706c20c8f330ba129.tar.gz nextpnr-7142db28a8b828da557729a706c20c8f330ba129.tar.bz2 nextpnr-7142db28a8b828da557729a706c20c8f330ba129.zip |
HeAP: Make HeAP placer optional
A CMake option 'BUILD_HEAP' (default on) configures building of the
HeAP placer and the associated Eigen3 dependency.
Default for the iCE40 is SA placer, with --heap-placer to use HeAP
Default for the ECP5 is HeAP placer, as SA placer can take 1hr+ for
large ECP5 designs and HeAP tends to give better QoR. --sa-placer can
be used to use SA instead, and auto-fallback to SA if HeAP not built.
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'ice40')
-rw-r--r-- | ice40/arch.cc | 11 | ||||
-rw-r--r-- | ice40/main.cc | 5 |
2 files changed, 11 insertions, 5 deletions
diff --git a/ice40/arch.cc b/ice40/arch.cc index 5688b6e6..09e64b16 100644 --- a/ice40/arch.cc +++ b/ice40/arch.cc @@ -671,10 +671,13 @@ bool Arch::getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay bool Arch::place() { - // if (!placer1(getCtx(), Placer1Cfg(getCtx()))) - // return false; - if (!placer_heap(getCtx())) - return false; + if (bool_or_default(settings, id("heap_placer"), false)) { + if (!placer_heap(getCtx())) + return false; + } else { + if (!placer1(getCtx(), Placer1Cfg(getCtx()))) + return false; + } if (bool_or_default(settings, id("opt_timing"), false)) { TimingOptCfg tocfg(getCtx()); tocfg.cellTypes.insert(id_ICESTORM_LC); diff --git a/ice40/main.cc b/ice40/main.cc index 2313c2ae..7233f169 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -69,6 +69,8 @@ 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()("heap-placer", + "use HeAP analytic placer instead of simulated annealing (faster, experimental)"); specific.add_options()("opt-timing", "run post-placement timing optimisation pass (experimental)"); specific.add_options()("tmfuzz", "run path delay estimate fuzzer"); specific.add_options()("pcf-allow-unconstrained", "don't require PCF to constrain all IO"); @@ -176,7 +178,8 @@ std::unique_ptr<Context> Ice40CommandHandler::createContext() ctx->settings[ctx->id("opt_timing")] = "1"; if (vm.count("pcf-allow-unconstrained")) ctx->settings[ctx->id("pcf_allow_unconstrained")] = "1"; - + if (vm.count("heap-placer")) + ctx->settings[ctx->id("heap_placer")] = "1"; return ctx; } |