aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-06-17 16:03:16 +0200
committerDavid Shah <davey1576@gmail.com>2018-06-17 16:03:16 +0200
commitf66999a8830c5829872b93ce15491de1673cb4e3 (patch)
treeca8211c79f598e5d00f6c35b71cb23757e5077bb /common
parentf723aaa373e188a4c926eff07c4c63b0d8467e0e (diff)
downloadnextpnr-f66999a8830c5829872b93ce15491de1673cb4e3.tar.gz
nextpnr-f66999a8830c5829872b93ce15491de1673cb4e3.tar.bz2
nextpnr-f66999a8830c5829872b93ce15491de1673cb4e3.zip
Minor performance tweaks and fixes
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'common')
-rw-r--r--common/place_sa.cc2
-rw-r--r--common/route.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/common/place_sa.cc b/common/place_sa.cc
index e8b3725c..12ca30d8 100644
--- a/common/place_sa.cc
+++ b/common/place_sa.cc
@@ -66,7 +66,7 @@ static float random_float_upto(rnd_state &rnd, float limit)
static int random_int_between(rnd_state &rnd, int a, int b)
{
- return a + int(random_float_upto(rnd, b - a));
+ return a + int(random_float_upto(rnd, b - a) - 0.00001);
}
// Initial random placement
diff --git a/common/route.cc b/common/route.cc
index 32212c7d..247c8840 100644
--- a/common/route.cc
+++ b/common/route.cc
@@ -440,8 +440,8 @@ void route_design(Design *design, bool verbose)
"routing.\n",
int(netsQueue.size()));
- ripup_pip_penalty += 5;
- ripup_wire_penalty += 5;
+ ripup_pip_penalty *= 1.5;
+ ripup_wire_penalty *= 1.5;
}
}