diff options
author | Alessandro Comodi <acomodi@antmicro.com> | 2021-07-07 19:16:48 +0200 |
---|---|---|
committer | Alessandro Comodi <acomodi@antmicro.com> | 2021-07-08 16:51:23 +0200 |
commit | dc0819b01a6bb976ea29151da2cd95e8227f8e08 (patch) | |
tree | 0a22dd1c2415ad27b809f1101c07306752bf1ea0 /fpga_interchange/arch_pack_clusters.cc | |
parent | 6829e4c197758a4bd68449e4843a6b3992ca3723 (diff) | |
download | nextpnr-dc0819b01a6bb976ea29151da2cd95e8227f8e08.tar.gz nextpnr-dc0819b01a6bb976ea29151da2cd95e8227f8e08.tar.bz2 nextpnr-dc0819b01a6bb976ea29151da2cd95e8227f8e08.zip |
interchange: reduce run-time to check dedicated interconnect
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
Diffstat (limited to 'fpga_interchange/arch_pack_clusters.cc')
-rw-r--r-- | fpga_interchange/arch_pack_clusters.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fpga_interchange/arch_pack_clusters.cc b/fpga_interchange/arch_pack_clusters.cc index 18162aa4..f4e50233 100644 --- a/fpga_interchange/arch_pack_clusters.cc +++ b/fpga_interchange/arch_pack_clusters.cc @@ -193,6 +193,8 @@ bool Arch::getClusterPlacement(ClusterId cluster, BelId root_bel, const Context *ctx = getCtx(); const Cluster &packed_cluster = clusters.at(cluster); + auto &cluster_data = cluster_info(chip_info, packed_cluster.index); + CellInfo *root_cell = getClusterRootCell(cluster); if (!ctx->isValidBelForCellType(root_cell->type, root_bel)) return false; @@ -205,8 +207,6 @@ bool Arch::getClusterPlacement(ClusterId cluster, BelId root_bel, next_bel = root_bel; } else { // Find next chained cluster node - auto &cluster_data = cluster_info(chip_info, packed_cluster.index); - IdString next_bel_pin(cluster_data.chainable_ports[0].bel_source); WireId next_bel_pin_wire = ctx->getBelPinWire(next_bel, next_bel_pin); next_bel = BelId(); @@ -256,7 +256,8 @@ bool Arch::getClusterPlacement(ClusterId cluster, BelId root_bel, WireId bel_pin_wire = ctx->getBelPinWire(next_bel, bel_pin); ExpansionDirection direction = port_type == PORT_IN ? CLUSTER_UPHILL_DIR : CLUSTER_DOWNHILL_DIR; - pool<BelId> cluster_bels = find_cluster_bels(ctx, bel_pin_wire, direction); + pool<BelId> cluster_bels = + find_cluster_bels(ctx, bel_pin_wire, direction, (bool)cluster_data.out_of_site_clusters); if (cluster_bels.size() == 0) continue; |