mirror of https://github.com/YosysHQ/nextpnr.git
Merge de38bd34fb into 68c1acd80a
This commit is contained in:
commit
fbb29b4d6d
|
|
@ -382,6 +382,8 @@ po::options_description CommandHandler::getGeneralOptions()
|
||||||
general.add_options()("parallel-refine", "use new experimental parallelised engine for placement refinement");
|
general.add_options()("parallel-refine", "use new experimental parallelised engine for placement refinement");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
general.add_options()("router1-timeout", po::value<int>(), "Timeout for router1 in iteration count (default: 0, no timeout)");
|
||||||
|
|
||||||
general.add_options()("router2-heatmap", po::value<std::string>(),
|
general.add_options()("router2-heatmap", po::value<std::string>(),
|
||||||
"prefix for router2 resource congestion heatmaps");
|
"prefix for router2 resource congestion heatmaps");
|
||||||
|
|
||||||
|
|
@ -516,6 +518,10 @@ void CommandHandler::setupContext(Context *ctx)
|
||||||
if (vm.count("parallel-refine"))
|
if (vm.count("parallel-refine"))
|
||||||
ctx->settings[ctx->id("placerHeap/parallelRefine")] = true;
|
ctx->settings[ctx->id("placerHeap/parallelRefine")] = true;
|
||||||
|
|
||||||
|
if (vm.count("router1-timeout")) {
|
||||||
|
ctx->settings[ctx->id("router1/maxIterCnt")] = std::to_string(std::max(0, vm["router1-timeout"].as<int>()));
|
||||||
|
}
|
||||||
|
|
||||||
if (vm.count("router2-heatmap"))
|
if (vm.count("router2-heatmap"))
|
||||||
ctx->settings[ctx->id("router2/heatmap")] = vm["router2-heatmap"].as<std::string>();
|
ctx->settings[ctx->id("router2/heatmap")] = vm["router2-heatmap"].as<std::string>();
|
||||||
if (vm.count("tmg-ripup") || vm.count("router2-tmg-ripup"))
|
if (vm.count("tmg-ripup") || vm.count("router2-tmg-ripup"))
|
||||||
|
|
|
||||||
|
|
@ -1146,7 +1146,7 @@ NEXTPNR_NAMESPACE_BEGIN
|
||||||
|
|
||||||
Router1Cfg::Router1Cfg(Context *ctx)
|
Router1Cfg::Router1Cfg(Context *ctx)
|
||||||
{
|
{
|
||||||
maxIterCnt = ctx->setting<int>("router1/maxIterCnt", 200);
|
maxIterCnt = ctx->setting<int>("router1/maxIterCnt", 0);
|
||||||
cleanupReroute = ctx->setting<bool>("router1/cleanupReroute", true);
|
cleanupReroute = ctx->setting<bool>("router1/cleanupReroute", true);
|
||||||
fullCleanupReroute = ctx->setting<bool>("router1/fullCleanupReroute", true);
|
fullCleanupReroute = ctx->setting<bool>("router1/fullCleanupReroute", true);
|
||||||
useEstimate = ctx->setting<bool>("router1/useEstimate", true);
|
useEstimate = ctx->setting<bool>("router1/useEstimate", true);
|
||||||
|
|
@ -1199,10 +1199,16 @@ bool router1(Context *ctx, const Router1Cfg &cfg)
|
||||||
last_arcs_with_ripup = router.arcs_with_ripup;
|
last_arcs_with_ripup = router.arcs_with_ripup;
|
||||||
last_arcs_without_ripup = router.arcs_without_ripup;
|
last_arcs_without_ripup = router.arcs_without_ripup;
|
||||||
ctx->yield();
|
ctx->yield();
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
router.check();
|
router.check();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
if (cfg.maxIterCnt){
|
||||||
|
if (iter_cnt > cfg.maxIterCnt) {
|
||||||
|
log_error("Max iteration count reached, stopping routing.\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (ctx->debug)
|
if (ctx->debug)
|
||||||
log("-- %d --\n", iter_cnt);
|
log("-- %d --\n", iter_cnt);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue