diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-06-13 18:28:02 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-06-13 18:28:02 +0200 |
commit | 9b3af68e44f927cf71a76949acd54947ebf4b88c (patch) | |
tree | 93f8fc1fdc57e3916e0d66e7b964931215a520f4 | |
parent | 537b0e6e9442b2c33b0c130d0540e5541b34fecd (diff) | |
download | nextpnr-9b3af68e44f927cf71a76949acd54947ebf4b88c.tar.gz nextpnr-9b3af68e44f927cf71a76949acd54947ebf4b88c.tar.bz2 nextpnr-9b3af68e44f927cf71a76949acd54947ebf4b88c.zip |
Improve router error reporting
Signed-off-by: Clifford Wolf <clifford@clifford.at>
-rw-r--r-- | common/route.cc | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/common/route.cc b/common/route.cc index 02fbfe96..d175670d 100644 --- a/common/route.cc +++ b/common/route.cc @@ -48,6 +48,9 @@ void route_design(Design *design, bool verbose) int itercnt = 0, netcnt = 0; float maxDelay = 0.0; + int failedPathCnt = 0; + std::unordered_set<IdString> failedNets; + log_info("Routing..\n"); for (auto &net_it : design->nets) { @@ -203,10 +206,14 @@ void route_design(Design *design, bool verbose) } } - if (visited.count(dst_wire) == 0) - log_error("Failed to route %s -> %s.\n", - chip.getWireName(src_wire).c_str(), - chip.getWireName(dst_wire).c_str()); + if (visited.count(dst_wire) == 0) { + log_info("Failed to route %s -> %s.\n", + chip.getWireName(src_wire).c_str(), + chip.getWireName(dst_wire).c_str()); + failedNets.insert(net_name); + failedPathCnt++; + continue; + } if (verbose) log(" Final path delay: %.2f\n", visited[dst_wire].delay); @@ -237,6 +244,10 @@ void route_design(Design *design, bool verbose) log_info("routed %d nets, visited %d wires.\n", netcnt, itercnt); log_info("longest path delay: %.2f\n", maxDelay); + + if (failedPathCnt > 0) + log_error("Failed to route %d paths (%d nets).\n", failedPathCnt, + int(failedNets.size())); } NEXTPNR_NAMESPACE_END |