diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-07-21 17:54:47 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-07-21 17:54:47 +0200 |
commit | 2f996e6a30efd261b1f759bdb5b435396a2ad459 (patch) | |
tree | 1f9c41093ae01335ada01af4e2d022fc2a3e86bf /common | |
parent | 41194d934b8e747659dc0ec41c2308f1750eafdb (diff) | |
download | nextpnr-2f996e6a30efd261b1f759bdb5b435396a2ad459.tar.gz nextpnr-2f996e6a30efd261b1f759bdb5b435396a2ad459.tar.bz2 nextpnr-2f996e6a30efd261b1f759bdb5b435396a2ad459.zip |
Add final sanity check in router1
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'common')
-rw-r--r-- | common/router1.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/common/router1.cc b/common/router1.cc index 99cbcd14..79a6bf5d 100644 --- a/common/router1.cc +++ b/common/router1.cc @@ -864,6 +864,25 @@ bool router1(Context *ctx) totalVisitCnt, (100.0 * totalRevisitCnt) / totalVisitCnt, (100.0 * totalOvertimeRevisitCnt) / totalVisitCnt); + NPNR_ASSERT(jobQueue.empty()); + jobCache.clear(); + + for (auto &net_it : ctx->nets) + addNetRouteJobs(ctx, net_it.first, jobCache, jobQueue); + +#ifndef NDEBUG + if (!jobQueue.empty()) { + log_info("Design strangely still contains unrouted source-sink pairs:\n"); + while (!jobQueue.empty()) { + log_info(" user %d on net %s.\n", jobQueue.top().user_idx, jobQueue.top().net.c_str(ctx)); + jobQueue.pop(); + } + log_info("Checksum: 0x%08x\n", ctx->checksum()); + ctx->check(); + return false; + } +#endif + log_info("Checksum: 0x%08x\n", ctx->checksum()); #ifndef NDEBUG ctx->check(); |