Skip to content

Commit 4d5a522

Browse files
committed
changed pb name display
1 parent 11d01c0 commit 4d5a522

File tree

1 file changed

+27
-32
lines changed

1 file changed

+27
-32
lines changed

vpr/src/draw/intra_logic_block.cpp

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -421,43 +421,38 @@ static void draw_internal_pb(const ClusterBlockId clb_index, t_pb* pb, const ezg
421421

422422
/// then draw text ///
423423

424-
if (pb->name != nullptr) {
425-
g->set_font_size(16); // note: calc_text_xbound(...) assumes this is 16
426-
if (pb_type->depth == draw_state->show_blk_internal || pb->child_pbs == nullptr) {
427-
// If this pb is at the lowest displayed level, or has no more children, then
428-
// label it in the center with its type and name
429-
430-
std::string pb_type_name(pb_type->name);
431-
std::string pb_name(pb->name);
432-
433-
std::string blk_tag = pb_type_name + pb_name;
434-
435-
if (draw_state->draw_block_text) {
436-
g->draw_text(
437-
abs_bbox.center(),
438-
blk_tag.c_str(),
439-
abs_bbox.width(),
440-
abs_bbox.height());
441-
}
424+
std::string pb_type_name(pb_type->name);
442425

443-
} else {
444-
// else (ie. has chilren, and isn't at the lowest displayed level)
445-
// just label its type, and put it up at the top so we can see it
446-
if (draw_state->draw_block_text) {
447-
g->draw_text(
448-
ezgl::point2d(abs_bbox.center_x(),
449-
abs_bbox.top() - draw_coords->get_tile_height() * FRACTION_TEXT_PADDING),
450-
pb_type->name,
451-
abs_bbox.width(),
452-
abs_bbox.height());
453-
}
426+
pb_type_name += "[" + std::to_string(pb->pb_graph_node->placement_index) + "]";
427+
428+
//get the mode of the physical block
429+
if (!pb->is_primitive()) {
430+
// primitives have no modes
431+
std::string mode_name = pb->pb_graph_node->pb_type->modes[pb->mode].name;
432+
pb_type_name += "[" + mode_name + "]";
433+
}
434+
435+
g->set_font_size(16); // note: calc_text_xbound(...) assumes this is 16
436+
if (pb_type->depth == draw_state->show_blk_internal || pb->child_pbs == nullptr) {
437+
// If this pb is at the lowest displayed level, or has no more children, then
438+
// label it in the center with its type and name
439+
440+
if (draw_state->draw_block_text) {
441+
g->draw_text(
442+
abs_bbox.center(),
443+
pb_type_name.c_str(),
444+
abs_bbox.width(),
445+
abs_bbox.height());
454446
}
447+
455448
} else {
456-
// If child block is not used, label it only by its type
449+
// else (ie. has chilren, and isn't at the lowest displayed level)
450+
// just label its type, and put it up at the top so we can see it
457451
if (draw_state->draw_block_text) {
458452
g->draw_text(
459-
abs_bbox.center(),
460-
pb_type->name,
453+
ezgl::point2d(abs_bbox.center_x(),
454+
abs_bbox.top() - draw_coords->get_tile_height() * FRACTION_TEXT_PADDING),
455+
pb_type_name.c_str(),
461456
abs_bbox.width(),
462457
abs_bbox.height());
463458
}

0 commit comments

Comments
 (0)