Skip to content

Commit 06bd0a2

Browse files
committed
updated pb text display
1 parent 60ecf8b commit 06bd0a2

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

vpr/src/draw/intra_logic_block.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -434,19 +434,22 @@ static void draw_internal_pb(const ClusterBlockId clb_index, t_pb* pb, const ezg
434434
g->draw_rectangle(abs_bbox);
435435
}
436436

437-
// draw text for each physical block.
438-
// format: <block_type_name>:<mode_name>[<placement_index>]
437+
// Display text for each physical block.
439438
std::string pb_type_name(pb_type->name);
440439

441-
// get the mode of the physical block
442440
if (!pb->is_primitive()) {
443-
// primitives have no modes
441+
// Format for non-primitives: <block_type_name>[<placement_index>]:<mode_name>
442+
pb_type_name += "[" + std::to_string(pb->pb_graph_node->placement_index) + "]";
444443
std::string mode_name = pb->pb_graph_node->pb_type->modes[pb->mode].name;
445444
pb_type_name += ":" + mode_name;
445+
} else {
446+
// Format for primitives: <block_type_name>(<block_name>)
447+
if (pb->name != nullptr) {
448+
std::string pb_name(pb->name);
449+
pb_type_name += "(" + pb_name + ")";
450+
}
446451
}
447452

448-
pb_type_name += "[" + std::to_string(pb->pb_graph_node->placement_index) + "]";
449-
450453
g->set_font_size(16);
451454
if (pb_type->depth == draw_state->show_blk_internal || pb->child_pbs == nullptr) {
452455
// If this pb is at the lowest displayed level, or has no more children, then

0 commit comments

Comments
 (0)