Skip to content

Commit 31f0fbb

Browse files
authored
Merge pull request #2607 from verilog-to-routing/redundant_physical_type
Redundant Physical Type
2 parents 4233826 + 07f4175 commit 31f0fbb

File tree

3 files changed

+11
-22
lines changed

3 files changed

+11
-22
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/util/vpr_utils.cpp

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

530-
auto block_loc = place_ctx.block_locs[blk];
531-
auto loc = block_loc.loc;
530+
auto block_loc = place_ctx.block_locs[blk].loc;
532531

533-
return device_ctx.grid.get_physical_type({loc.x, loc.y, loc.layer});
532+
return device_ctx.grid.get_physical_type({block_loc.x, block_loc.y, block_loc.layer});
534533
}
535534

536535
t_physical_tile_type_ptr physical_tile_type(AtomBlockId atom_blk) {
@@ -2150,20 +2149,6 @@ int max_pins_per_grid_tile() {
21502149
return max_pins;
21512150
}
21522151

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

vpr/src/util/vpr_utils.h

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

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

0 commit comments

Comments
 (0)