mirror of https://github.com/YosysHQ/nextpnr.git
timeout for router1
This commit is contained in:
parent
900249033f
commit
496df84b3b
|
|
@ -538,6 +538,10 @@ void CommandHandler::setupContext(Context *ctx)
|
|||
if (vm.count("parallel-refine"))
|
||||
ctx->settings[ctx->id("placerHeap/parallelRefine")] = true;
|
||||
|
||||
if (vm.count("router1-timeout")) {
|
||||
ctx->settings[ctx->id("router1/timeout")] = vm["router1-timeout"].as<int>();
|
||||
}
|
||||
|
||||
if (vm.count("router2-heatmap"))
|
||||
ctx->settings[ctx->id("router2/heatmap")] = vm["router2-heatmap"].as<std::string>();
|
||||
if (vm.count("tmg-ripup") || vm.count("router2-tmg-ripup"))
|
||||
|
|
|
|||
|
|
@ -1199,6 +1199,13 @@ bool router1(Context *ctx, const Router1Cfg &cfg)
|
|||
last_arcs_with_ripup = router.arcs_with_ripup;
|
||||
last_arcs_without_ripup = router.arcs_without_ripup;
|
||||
ctx->yield();
|
||||
|
||||
if (cfg.timeout){
|
||||
if (curr_time - rstart > std::chrono::seconds(cfg.timeout)) {
|
||||
log_error("Timeout reached, stopping routing.\n");
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
router.check();
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ struct Router1Cfg
|
|||
delay_t netRipupPenalty;
|
||||
delay_t reuseBonus;
|
||||
delay_t estimatePrecision;
|
||||
int timeout;
|
||||
};
|
||||
|
||||
extern bool router1(Context *ctx, const Router1Cfg &cfg);
|
||||
|
|
|
|||
Loading…
Reference in New Issue