timing_opt: Make an optional pass controlled by command line
Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
parent
0f40e5fe8c
commit
f3adf5a576
@ -631,9 +631,14 @@ bool Arch::place()
|
|||||||
{
|
{
|
||||||
if (!placer1(getCtx(), Placer1Cfg(getCtx())))
|
if (!placer1(getCtx(), Placer1Cfg(getCtx())))
|
||||||
return false;
|
return false;
|
||||||
|
if(bool_or_default(settings, id("opt_timing"), false)) {
|
||||||
TimingOptCfg tocfg(getCtx());
|
TimingOptCfg tocfg(getCtx());
|
||||||
tocfg.cellTypes.insert(id_ICESTORM_LC);
|
tocfg.cellTypes.insert(id_ICESTORM_LC);
|
||||||
return timing_opt(getCtx(), tocfg);
|
return timing_opt(getCtx(), tocfg);
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Arch::route() { return router1(getCtx(), Router1Cfg(getCtx())); }
|
bool Arch::route() { return router1(getCtx(), Router1Cfg(getCtx())); }
|
||||||
|
@ -68,6 +68,7 @@ po::options_description Ice40CommandHandler::getArchOptions()
|
|||||||
specific.add_options()("promote-logic",
|
specific.add_options()("promote-logic",
|
||||||
"enable promotion of 'logic' globals (in addition to clk/ce/sr by default)");
|
"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()("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");
|
specific.add_options()("tmfuzz", "run path delay estimate fuzzer");
|
||||||
return specific;
|
return specific;
|
||||||
}
|
}
|
||||||
@ -161,6 +162,8 @@ std::unique_ptr<Context> Ice40CommandHandler::createContext()
|
|||||||
ctx->settings[ctx->id("promote_logic")] = "1";
|
ctx->settings[ctx->id("promote_logic")] = "1";
|
||||||
if (vm.count("no-promote-globals"))
|
if (vm.count("no-promote-globals"))
|
||||||
ctx->settings[ctx->id("no_promote_globals")] = "1";
|
ctx->settings[ctx->id("no_promote_globals")] = "1";
|
||||||
|
if (vm.count("opt-timing"))
|
||||||
|
ctx->settings[ctx->id("opt_timing")] = "1";
|
||||||
return ctx;
|
return ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user