Skip to content

Commit 6e2ed11

Browse files
committed
fixed intra-cluster nets flylines
1 parent 820ab5b commit 6e2ed11

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

doc/src/vpr/graphics.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ To visualize nets, first enable the **Display Nets** switch under the **Net** Ta
7474
The user can choose between drawing nets as **Flylines** (direct connections between sources and sinks) or as **Routing** (the actual routed path of the net).
7575
Only the **Flylines** option is available during placement, as routing has not yet been performed.
7676

77-
The Inter-Cluster Nets and Intra-Cluster Nets options allow the user to choose whether to visualize nets between clbs or within a clb, respectively. The Intra-Cluster Nets option is currently only available when **flat routing is enabled**.
77+
The Inter-Cluster Nets and Intra-Cluster Nets options allow the user to choose whether to visualize nets between clbs or within a clb, respectively. The Intra-Cluster Routed Nets option is currently only available when **flat routing is enabled**.
7878

7979
.. figure:: ../Images/Net_Settings.png
8080
:align: center

vpr/src/draw/draw_toggle_functions.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void toggle_show_nets_cbk(GtkSwitch*, gboolean state, ezgl::application* app) {
3636

3737
gtk_widget_set_sensitive(GTK_WIDGET(app->get_object("ToggleNetType")), state);
3838
gtk_widget_set_sensitive(GTK_WIDGET(app->get_object("ToggleInterClusterNets")), state);
39-
if (draw_state->is_flat) {
39+
if (draw_state->is_flat || draw_state->draw_nets != DRAW_ROUTED_NETS) {
4040
gtk_widget_set_sensitive(GTK_WIDGET(app->get_object("ToggleIntraClusterNets")), state);
4141
}
4242
gtk_widget_set_sensitive(GTK_WIDGET(app->get_object("FanInFanOut")), state);
@@ -54,8 +54,18 @@ void toggle_draw_nets_cbk(GtkComboBox* self, ezgl::application* app) {
5454
// assign corresponding enum value to draw_state->show_nets
5555
if (strcmp(setting, "Routing") == 0) {
5656
new_state = DRAW_ROUTED_NETS;
57+
58+
// Make sure that intra-cluster routed nets is never enabled when flat routing is off
59+
if (!draw_state->is_flat) {
60+
gtk_widget_set_sensitive(GTK_WIDGET(app->get_object("ToggleIntraClusterNets")), false);
61+
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(app->get_object("ToggleIntraClusterNets")), false);
62+
draw_state->draw_intra_cluster_nets = false;
63+
}
64+
5765
} else { // Flylines - direct connections between sources and sinks
5866
new_state = DRAW_FLYLINES;
67+
68+
gtk_widget_set_sensitive(GTK_WIDGET(app->get_object("ToggleIntraClusterNets")), true);
5969
}
6070

6171
draw_state->draw_nets = new_state;

0 commit comments

Comments
 (0)