diff options
author | Alessandro Comodi <acomodi@antmicro.com> | 2021-06-02 09:49:30 +0200 |
---|---|---|
committer | Alessandro Comodi <acomodi@antmicro.com> | 2021-06-11 11:19:01 +0200 |
commit | 104536b7aae5970ae1d1e95394f26fbf04603d12 (patch) | |
tree | 0f1fad9a952f272e6436456077fe54ba3a7730ea /fpga_interchange/site_routing_cache.cc | |
parent | 7278d3c0edbc6f92ef4c69d7c5db66e811c7e9c4 (diff) | |
download | nextpnr-104536b7aae5970ae1d1e95394f26fbf04603d12.tar.gz nextpnr-104536b7aae5970ae1d1e95394f26fbf04603d12.tar.bz2 nextpnr-104536b7aae5970ae1d1e95394f26fbf04603d12.zip |
interchange: add support for generating BEL clusters
Clustering greatly helps the placer to identify and pack together
specific cells at the same site (e.g. LUT+FF), or cells that are chained through
dedicated interconnections (e.g. CARRY CHAINS)
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
Diffstat (limited to 'fpga_interchange/site_routing_cache.cc')
-rw-r--r-- | fpga_interchange/site_routing_cache.cc | 8 |
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) |