Skip to content

Commit 2c954d1

Browse files
apply PR comments
1 parent c992db7 commit 2c954d1

File tree

2 files changed

+29
-32
lines changed

2 files changed

+29
-32
lines changed

libs/libarchfpga/src/physical_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,8 +1278,8 @@ struct t_pin_to_pin_annotation {
12781278
* flat_site_index : Index of this primitive site within its primitive type within this cluster type.
12791279
* Values are in [0...total_primitive_count-1], e.g. if there are 10 ALMs per cluster, 2 FFS
12801280
* and 2 LUTs per ALM, then flat site indices for FFs would run from 0 to 19, and flat site
1281-
* indices for LUTs would run from 0 to 19. This member is only used by nodes corresponding
1282-
* to primitive sites. It is used when reconstructing clusters from a flat placement file.
1281+
* indices for LUTs would run from 0 to 19. This member is only used by nodes corresponding
1282+
* to primitive sites. It is used when reconstructing clusters from a flat placement file.
12831283
* illegal_modes : vector containing illegal modes that result in conflicts during routing
12841284
*/
12851285
class t_pb_graph_node {

vpr/src/pack/greedy_clusterer.cpp

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -176,31 +176,29 @@ GreedyClusterer::do_clustering(ClusterLegalizer& cluster_legalizer,
176176
// Try to grow a cluster from the seed molecule without doing intra-lb
177177
// route for each molecule (i.e. just use faster but not fully
178178
// conservative legality checks).
179-
LegalizationClusterId new_cluster_id = try_grow_cluster(
180-
seed_mol_id,
181-
candidate_selector,
182-
ClusterLegalizationStrategy::SKIP_INTRA_LB_ROUTE,
183-
cluster_legalizer,
184-
prepacker,
185-
balance_block_type_utilization,
186-
attraction_groups,
187-
num_used_type_instances,
188-
mutable_device_ctx);
179+
LegalizationClusterId new_cluster_id = try_grow_cluster(seed_mol_id,
180+
candidate_selector,
181+
ClusterLegalizationStrategy::SKIP_INTRA_LB_ROUTE,
182+
cluster_legalizer,
183+
prepacker,
184+
balance_block_type_utilization,
185+
attraction_groups,
186+
num_used_type_instances,
187+
mutable_device_ctx);
189188

190189
if (!new_cluster_id.is_valid()) {
191190
// If the previous strategy failed, try to grow the cluster again,
192191
// but this time perform full legalization for each molecule added
193192
// to the cluster.
194-
new_cluster_id = try_grow_cluster(
195-
seed_mol_id,
196-
candidate_selector,
197-
ClusterLegalizationStrategy::FULL,
198-
cluster_legalizer,
199-
prepacker,
200-
balance_block_type_utilization,
201-
attraction_groups,
202-
num_used_type_instances,
203-
mutable_device_ctx);
193+
new_cluster_id = try_grow_cluster(seed_mol_id,
194+
candidate_selector,
195+
ClusterLegalizationStrategy::FULL,
196+
cluster_legalizer,
197+
prepacker,
198+
balance_block_type_utilization,
199+
attraction_groups,
200+
num_used_type_instances,
201+
mutable_device_ctx);
204202
}
205203

206204
// Ensure that the seed was packed successfully.
@@ -233,16 +231,15 @@ GreedyClusterer::do_clustering(ClusterLegalizer& cluster_legalizer,
233231
return num_used_type_instances;
234232
}
235233

236-
LegalizationClusterId GreedyClusterer::try_grow_cluster(
237-
PackMoleculeId seed_mol_id,
238-
GreedyCandidateSelector& candidate_selector,
239-
ClusterLegalizationStrategy strategy,
240-
ClusterLegalizer& cluster_legalizer,
241-
const Prepacker& prepacker,
242-
bool balance_block_type_utilization,
243-
AttractionInfo& attraction_groups,
244-
std::map<t_logical_block_type_ptr, size_t>& num_used_type_instances,
245-
DeviceContext& mutable_device_ctx) {
234+
LegalizationClusterId GreedyClusterer::try_grow_cluster(PackMoleculeId seed_mol_id,
235+
GreedyCandidateSelector& candidate_selector,
236+
ClusterLegalizationStrategy strategy,
237+
ClusterLegalizer& cluster_legalizer,
238+
const Prepacker& prepacker,
239+
bool balance_block_type_utilization,
240+
AttractionInfo& attraction_groups,
241+
std::map<t_logical_block_type_ptr, size_t>& num_used_type_instances,
242+
DeviceContext& mutable_device_ctx) {
246243

247244
// Check to ensure that this molecule is unclustered.
248245
VTR_ASSERT(!cluster_legalizer.is_mol_clustered(seed_mol_id));

0 commit comments

Comments
 (0)