Skip to content

Commit fed10de

Browse files
authored
Merge branch 'master' into openfpga
2 parents e099206 + 31f0fbb commit fed10de

File tree

5 files changed

+19
-30
lines changed

5 files changed

+19
-30
lines changed

vpr/src/draw/draw_types.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,15 @@
1313
*******************************************/
1414
ezgl::color t_draw_state::block_color(ClusterBlockId blk) const {
1515
if (use_default_block_color_[blk]) {
16-
t_physical_tile_type_ptr tile_type = get_physical_tile_type(blk);
16+
t_physical_tile_type_ptr tile_type = nullptr;
17+
auto& cluster_ctx = g_vpr_ctx.clustering();
18+
auto& place_ctx = g_vpr_ctx.placement();
19+
if (place_ctx.block_locs.empty()) { //No placement, pick best match
20+
tile_type = pick_physical_type(cluster_ctx.clb_nlist.block_type(blk));
21+
} else { // Have placement, select physical tile implementing blk
22+
tile_type = physical_tile_type(blk);
23+
}
24+
VTR_ASSERT(tile_type != nullptr);
1725
return get_block_type_color(tile_type);
1826
} else {
1927
return block_color_[blk];

vpr/src/pack/re_cluster.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,6 @@ bool move_mol_to_new_cluster(t_pack_molecule* molecule,
7373
//Commit or revert the move
7474
if (is_created) {
7575
commit_mol_move(old_clb, new_clb, during_packing, true);
76-
// Update the clb-->atoms lookup table
77-
helper_ctx.atoms_lookup.resize(helper_ctx.total_clb_num);
78-
for (int i_atom = 0; i_atom < molecule_size; ++i_atom) {
79-
if (molecule->atom_block_ids[i_atom]) {
80-
helper_ctx.atoms_lookup[new_clb].insert(molecule->atom_block_ids[i_atom]);
81-
}
82-
}
83-
8476
VTR_LOGV(verbosity > 4, "Atom:%zu is moved to a new cluster\n", molecule->atom_block_ids[molecule->root]);
8577
} else {
8678
revert_mol_move(old_clb, molecule, old_router_data, during_packing, clustering_data);

vpr/src/pack/re_cluster_util.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,14 @@ bool start_new_cluster_for_mol(t_pack_molecule* molecule,
190190
int molecule_size = get_array_size_of_molecule(molecule);
191191
update_cluster_pb_stats(molecule, molecule_size, clb_index, true);
192192

193+
// Update the clb-->atoms lookup table
194+
helper_ctx.atoms_lookup.resize(helper_ctx.total_clb_num);
195+
for (int i_atom = 0; i_atom < molecule_size; ++i_atom) {
196+
if (molecule->atom_block_ids[i_atom]) {
197+
helper_ctx.atoms_lookup[clb_index].insert(molecule->atom_block_ids[i_atom]);
198+
}
199+
}
200+
193201
//If you are still in packing, update the clustering data. Otherwise, update the clustered netlist.
194202
if (during_packing) {
195203
clustering_data.intra_lb_routing.push_back((*router_data)->saved_lb_nets);

vpr/src/util/vpr_utils.cpp

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -525,10 +525,9 @@ t_physical_tile_type_ptr physical_tile_type(ClusterBlockId blk) {
525525
auto& place_ctx = g_vpr_ctx.placement();
526526
auto& device_ctx = g_vpr_ctx.device();
527527

528-
auto block_loc = place_ctx.block_locs[blk];
529-
auto loc = block_loc.loc;
528+
auto block_loc = place_ctx.block_locs[blk].loc;
530529

531-
return device_ctx.grid.get_physical_type({loc.x, loc.y, loc.layer});
530+
return device_ctx.grid.get_physical_type({block_loc.x, block_loc.y, block_loc.layer});
532531
}
533532

534533
t_physical_tile_type_ptr physical_tile_type(AtomBlockId atom_blk) {
@@ -2148,20 +2147,6 @@ int max_pins_per_grid_tile() {
21482147
return max_pins;
21492148
}
21502149

2151-
t_physical_tile_type_ptr get_physical_tile_type(const ClusterBlockId blk) {
2152-
auto& cluster_ctx = g_vpr_ctx.clustering();
2153-
auto& place_ctx = g_vpr_ctx.placement();
2154-
if (place_ctx.block_locs.empty()) { //No placement, pick best match
2155-
return pick_physical_type(cluster_ctx.clb_nlist.block_type(blk));
2156-
} else { //Have placement, select physical tile implementing blk
2157-
auto& device_ctx = g_vpr_ctx.device();
2158-
2159-
t_pl_loc loc = place_ctx.block_locs[blk].loc;
2160-
2161-
return device_ctx.grid.get_physical_type({loc.x, loc.y, loc.layer});
2162-
}
2163-
}
2164-
21652150
int net_pin_to_tile_pin_index(const ClusterNetId net_id, int net_pin_index) {
21662151
auto& cluster_ctx = g_vpr_ctx.clustering();
21672152

vpr/src/util/vpr_utils.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,6 @@ AtomBlockId find_memory_sibling(const t_pb* pb);
236236
*/
237237
void place_sync_external_block_connections(ClusterBlockId iblk);
238238

239-
//Returns the current tile implemnting blk (if placement is valid), or
240-
//the best expected physical tile the block should use (if no valid placement).
241-
t_physical_tile_type_ptr get_physical_tile_type(const ClusterBlockId blk);
242-
243239
//Returns the physical pin of the tile, related to the given ClusterNedId, and the net pin index
244240
int net_pin_to_tile_pin_index(const ClusterNetId net_id, int net_pin_index);
245241

0 commit comments

Comments
 (0)