aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-06-14 15:45:47 +0200
committerClifford Wolf <clifford@clifford.at>2018-06-14 15:45:47 +0200
commit66ced800d7d969b8a2378b21a01a47dbdcc8fc96 (patch)
tree9aaa86c57b0796d4e362bbd46f2890d863db4572
parent312699e590183d80e6dc4d1fbd74ea364c56baf3 (diff)
downloadnextpnr-66ced800d7d969b8a2378b21a01a47dbdcc8fc96.tar.gz
nextpnr-66ced800d7d969b8a2378b21a01a47dbdcc8fc96.tar.bz2
nextpnr-66ced800d7d969b8a2378b21a01a47dbdcc8fc96.zip
Increase ripup penalties over time
Signed-off-by: Clifford Wolf <clifford@clifford.at>
-rw-r--r--common/route.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/common/route.cc b/common/route.cc
index 0ad5cec9..952c266b 100644
--- a/common/route.cc
+++ b/common/route.cc
@@ -65,7 +65,7 @@ struct Router
bool routedOkay = false;
float maxDelay = 0.0;
- Router(Design *design, IdString net_name, bool verbose, bool ripup,
+ Router(Design *design, IdString net_name, bool verbose, bool ripup = false,
float ripup_pip_penalty = 5.0, float ripup_wire_penalty = 5.0)
{
auto &chip = design->chip;
@@ -290,6 +290,8 @@ void route_design(Design *design, bool verbose)
{
auto &chip = design->chip;
float maxDelay = 0.0;
+ float ripup_pip_penalty = 5.0;
+ float ripup_wire_penalty = 5.0;
log_info("Routing..\n");
@@ -357,7 +359,8 @@ void route_design(Design *design, bool verbose)
int ripCnt = 0;
for (auto net_name : ripupQueue) {
- Router router(design, net_name, verbose, true);
+ Router router(design, net_name, verbose, true,
+ ripup_pip_penalty, ripup_wire_penalty);
netCnt++;
visitCnt += router.visitCnt;
@@ -385,6 +388,9 @@ void route_design(Design *design, bool verbose)
log_info("ripped up %d previously routed nets. continue routing.\n",
int(netsQueue.size()));
+
+ ripup_pip_penalty *= 1.5;
+ ripup_wire_penalty *= 1.5;
}
}