Skip to content

Commit

Permalink
Merge pull request verilog-to-routing#2607 from verilog-to-routing/re…
Browse files Browse the repository at this point in the history
…dundant_physical_type

Redundant Physical Type
  • Loading branch information
amin1377 committed Jun 18, 2024
2 parents 4233826 + 07f4175 commit 31f0fbb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 22 deletions.
10 changes: 9 additions & 1 deletion vpr/src/draw/draw_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@
*******************************************/
ezgl::color t_draw_state::block_color(ClusterBlockId blk) const {
if (use_default_block_color_[blk]) {
t_physical_tile_type_ptr tile_type = get_physical_tile_type(blk);
t_physical_tile_type_ptr tile_type = nullptr;
auto& cluster_ctx = g_vpr_ctx.clustering();
auto& place_ctx = g_vpr_ctx.placement();
if (place_ctx.block_locs.empty()) { //No placement, pick best match
tile_type = pick_physical_type(cluster_ctx.clb_nlist.block_type(blk));
} else { // Have placement, select physical tile implementing blk
tile_type = physical_tile_type(blk);
}
VTR_ASSERT(tile_type != nullptr);
return get_block_type_color(tile_type);
} else {
return block_color_[blk];
Expand Down
19 changes: 2 additions & 17 deletions vpr/src/util/vpr_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -527,10 +527,9 @@ t_physical_tile_type_ptr physical_tile_type(ClusterBlockId blk) {
auto& place_ctx = g_vpr_ctx.placement();
auto& device_ctx = g_vpr_ctx.device();

auto block_loc = place_ctx.block_locs[blk];
auto loc = block_loc.loc;
auto block_loc = place_ctx.block_locs[blk].loc;

return device_ctx.grid.get_physical_type({loc.x, loc.y, loc.layer});
return device_ctx.grid.get_physical_type({block_loc.x, block_loc.y, block_loc.layer});
}

t_physical_tile_type_ptr physical_tile_type(AtomBlockId atom_blk) {
Expand Down Expand Up @@ -2150,20 +2149,6 @@ int max_pins_per_grid_tile() {
return max_pins;
}

t_physical_tile_type_ptr get_physical_tile_type(const ClusterBlockId blk) {
auto& cluster_ctx = g_vpr_ctx.clustering();
auto& place_ctx = g_vpr_ctx.placement();
if (place_ctx.block_locs.empty()) { //No placement, pick best match
return pick_physical_type(cluster_ctx.clb_nlist.block_type(blk));
} else { //Have placement, select physical tile implementing blk
auto& device_ctx = g_vpr_ctx.device();

t_pl_loc loc = place_ctx.block_locs[blk].loc;

return device_ctx.grid.get_physical_type({loc.x, loc.y, loc.layer});
}
}

int net_pin_to_tile_pin_index(const ClusterNetId net_id, int net_pin_index) {
auto& cluster_ctx = g_vpr_ctx.clustering();

Expand Down
4 changes: 0 additions & 4 deletions vpr/src/util/vpr_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,6 @@ AtomBlockId find_memory_sibling(const t_pb* pb);
*/
void place_sync_external_block_connections(ClusterBlockId iblk);

//Returns the current tile implemnting blk (if placement is valid), or
//the best expected physical tile the block should use (if no valid placement).
t_physical_tile_type_ptr get_physical_tile_type(const ClusterBlockId blk);

//Returns the physical pin of the tile, related to the given ClusterNedId, and the net pin index
int net_pin_to_tile_pin_index(const ClusterNetId net_id, int net_pin_index);

Expand Down

0 comments on commit 31f0fbb

Please sign in to comment.