Skip to content

Commit 751b2d5

Browse files
committed
vpr: Clean-up Draw RR combo box options
1 parent 46d66ba commit 751b2d5

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

vpr/src/draw/buttons.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,8 @@ void button_for_toggle_rr() {
253253
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(toggle_rr_widget), "None");
254254
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(toggle_rr_widget), "Nodes");
255255
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(toggle_rr_widget), "Nodes SBox");
256-
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(toggle_rr_widget), "All but Buffers");
256+
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(toggle_rr_widget), "Nodes SBox CBox");
257+
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(toggle_rr_widget), "Nodes SBox CBox Internal");
257258
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(toggle_rr_widget), "All");
258259
gtk_combo_box_set_active((GtkComboBox*)toggle_rr_widget, 0); // default set to None which has an index 0
259260
gtk_widget_set_name(toggle_rr_widget, "toggle_rr");

vpr/src/draw/draw.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,10 @@ void toggle_rr(GtkWidget* /*widget*/, gint /*response_id*/, gpointer /*data*/) {
580580
new_state = DRAW_NODES_RR;
581581
else if (strcmp(combo_box_content, "Nodes SBox") == 0)
582582
new_state = DRAW_NODES_SBOX_RR;
583-
else if (strcmp(combo_box_content, "All but Buffers") == 0)
584-
new_state = DRAW_ALL_BUT_BUFFERS_RR;
583+
else if (strcmp(combo_box_content, "Nodes SBox CBox") == 0)
584+
new_state = DRAW_NODES_SBOX_CBOX_RR;
585+
else if (strcmp(combo_box_content, "Nodes SBox CBox Internal") == 0)
586+
new_state = DRAW_NODES_SBOX_CBOX_INTERNAL_RR;
585587
else // all rr
586588
new_state = DRAW_ALL_RR;
587589

@@ -1542,7 +1544,8 @@ static void draw_rr_edges(int inode, ezgl::renderer* g) {
15421544
from_type = device_ctx.rr_nodes[inode].type();
15431545

15441546
if ((draw_state->draw_rr_toggle == DRAW_NODES_RR)
1545-
|| (draw_state->draw_rr_toggle == DRAW_NODES_SBOX_RR && from_type == OPIN)) {
1547+
|| (draw_state->draw_rr_toggle == DRAW_NODES_SBOX_RR && (from_type == OPIN || from_type == SOURCE || from_type == IPIN))
1548+
|| (draw_state->draw_rr_toggle == DRAW_NODES_SBOX_CBOX_RR && (from_type == SOURCE || from_type == IPIN))) {
15461549
return; /* Nothing to draw. */
15471550
}
15481551

vpr/src/draw/draw_types.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ enum e_draw_rr_toggle {
5353
DRAW_NO_RR = 0,
5454
DRAW_NODES_RR,
5555
DRAW_NODES_SBOX_RR,
56-
DRAW_ALL_BUT_BUFFERS_RR,
56+
DRAW_NODES_SBOX_CBOX_RR,
57+
DRAW_NODES_SBOX_CBOX_INTERNAL_RR,
5758
DRAW_ALL_RR,
5859
};
5960

0 commit comments

Comments
 (0)