Skip to content

Commit 07f4175

Browse files
committed
[vpr][draw] use physical_tile_type if the block is placed, otherwise call pick_physical_type
1 parent 4dd555e commit 07f4175

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
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];

0 commit comments

Comments
 (0)