aboutsummaryrefslogtreecommitdiffstats
path: root/common/route.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-06-20 12:50:38 +0200
committerClifford Wolf <clifford@clifford.at>2018-06-20 12:50:38 +0200
commitc3837027b22b67a5079d84419bae20c4d545430b (patch)
tree49196c574fdda739506d7c78df6a96960620590f /common/route.cc
parenta06d2aeb4da0c51fb50d8283367836e6dbf91b4d (diff)
downloadnextpnr-c3837027b22b67a5079d84419bae20c4d545430b.tar.gz
nextpnr-c3837027b22b67a5079d84419bae20c4d545430b.tar.bz2
nextpnr-c3837027b22b67a5079d84419bae20c4d545430b.zip
Add better iCE40 delay estimates
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'common/route.cc')
-rw-r--r--common/route.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/common/route.cc b/common/route.cc
index b031237c..42a705a1 100644
--- a/common/route.cc
+++ b/common/route.cc
@@ -206,15 +206,16 @@ struct Router
assert(next_delay >= 0);
if (visited.count(next_wire)) {
- if (visited.at(next_wire).delay <= next_delay + 1e-3)
+ if (visited.at(next_wire).delay <=
+ next_delay + ctx->getDelayEpsilon())
continue;
#if 0 // FIXME
if (ctx->verbose)
log("Found better route to %s. Old vs new delay "
- "estimate: %.2f %.2f\n",
+ "estimate: %.3f %.3f\n",
ctx->getWireName(next_wire).c_str(),
- float(visited.at(next_wire).delay),
- float(next_delay));
+ ctx->getDelayNS(visited.at(next_wire).delay),
+ ctx->getDelayNS(next_delay));
#endif
revisitCnt++;
}
@@ -246,8 +247,8 @@ struct Router
}
if (ctx->verbose)
- log(" Final path delay: %.2f\n",
- float(visited[dst_wire].delay));
+ log(" Final path delay: %.3f\n",
+ ctx->getDelayNS(visited[dst_wire].delay));
maxDelay = fmaxf(maxDelay, visited[dst_wire].delay);
if (ctx->verbose)
@@ -257,7 +258,8 @@ struct Router
while (1) {
if (ctx->verbose)
- log(" %8.2f %s\n", float(visited[cursor].delay),
+ log(" %8.3f %s\n",
+ ctx->getDelayNS(visited[cursor].delay),
ctx->getWireName(cursor).c_str(ctx));
if (src_wires.count(cursor))