aboutsummaryrefslogtreecommitdiffstats
path: root/fpga_interchange/site_routing_cache.cc
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-06-11 11:36:42 +0100
committerGitHub <noreply@github.com>2021-06-11 11:36:42 +0100
commit1c7efdc02ce3e36558374e641ea07833cb3a1849 (patch)
treeb68e79f3e3972e913a0fba94ea7b654208199426 /fpga_interchange/site_routing_cache.cc
parent7278d3c0edbc6f92ef4c69d7c5db66e811c7e9c4 (diff)
parentaa1784c5d9d0b5a3c26b0a148afa6b2de3dc68de (diff)
downloadnextpnr-1c7efdc02ce3e36558374e641ea07833cb3a1849.tar.gz
nextpnr-1c7efdc02ce3e36558374e641ea07833cb3a1849.tar.bz2
nextpnr-1c7efdc02ce3e36558374e641ea07833cb3a1849.zip
Merge pull request #720 from acomodi/interchange-clusters
interchange: enable clusters support
Diffstat (limited to 'fpga_interchange/site_routing_cache.cc')
-rw-r--r--fpga_interchange/site_routing_cache.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/fpga_interchange/site_routing_cache.cc b/fpga_interchange/site_routing_cache.cc
index 512ca2ac..cd16cfff 100644
--- a/fpga_interchange/site_routing_cache.cc
+++ b/fpga_interchange/site_routing_cache.cc
@@ -68,7 +68,7 @@ void SiteRoutingSolution::store_solution(const SiteArch *ctx, const RouteNodeSto
solution_offsets.push_back(solution_storage.size());
}
-void SiteRoutingSolution::verify(const SiteArch *ctx, const SiteNetInfo &net)
+bool SiteRoutingSolution::verify(const SiteArch *ctx, const SiteNetInfo &net)
{
pool<SiteWire> seen_users;
for (size_t i = 0; i < num_solutions(); ++i) {
@@ -88,7 +88,7 @@ void SiteRoutingSolution::verify(const SiteArch *ctx, const SiteNetInfo &net)
NPNR_ASSERT(net.driver == cursor);
}
- NPNR_ASSERT(seen_users.size() == net.users.size());
+ return seen_users.size() == net.users.size();
}
SiteRoutingKey SiteRoutingKey::make(const SiteArch *ctx, const SiteNetInfo &site_net)
@@ -194,9 +194,7 @@ bool SiteRoutingCache::get_solution(const SiteArch *ctx, const SiteNetInfo &net,
}
}
- solution->verify(ctx, net);
-
- return true;
+ return solution->verify(ctx, net);
}
void SiteRoutingCache::add_solutions(const SiteArch *ctx, const SiteNetInfo &net, const SiteRoutingSolution &solution)