Skip to content

Commit 55a5276

Browse files
committed
remove is_net_unrouted, replace it with more appropriate logic
1 parent 3887c35 commit 55a5276

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

vpr/src/draw/search_bar.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@
4242

4343
extern std::string rr_highlight_message;
4444

45-
bool is_net_unrouted(AtomNetId atomic_net_id) {
46-
RoutingContext& route_ctx = g_vpr_ctx.mutable_routing();
47-
return !route_ctx.route_trees[atomic_net_id].has_value();
48-
}
49-
5045
bool is_net_fully_absorbed(AtomNetId atomic_net_id) {
5146
const RRGraphView& rr_graph = g_vpr_ctx.device().rr_graph;
5247
RoutingContext& route_ctx = g_vpr_ctx.mutable_routing();
@@ -74,6 +69,7 @@ void search_and_highlight(GtkWidget* /*widget*/, ezgl::application* app) {
7469
auto& device_ctx = g_vpr_ctx.device();
7570
auto& cluster_ctx = g_vpr_ctx.clustering();
7671
auto& atom_ctx = g_vpr_ctx.atom();
72+
const RoutingContext& route_ctx = g_vpr_ctx.routing();
7773

7874
// get ID from search bar
7975
GtkEntry* text_entry = (GtkEntry*)app->get_object("TextInput");
@@ -160,7 +156,7 @@ void search_and_highlight(GtkWidget* /*widget*/, ezgl::application* app) {
160156
app->refresh_drawing();
161157
return;
162158
}
163-
if (is_net_unrouted(atom_net_id)) {
159+
if (!route_ctx.net_status.is_routed(atom_net_id)) {
164160
warning_dialog_box("Net is unrouted");
165161
app->refresh_drawing();
166162
return;
@@ -195,7 +191,7 @@ void search_and_highlight(GtkWidget* /*widget*/, ezgl::application* app) {
195191
app->refresh_drawing();
196192
return;
197193
}
198-
if (is_net_unrouted(atom_net_id)) {
194+
if (!route_ctx.net_status.is_routed(atomic_net_id)) {
199195
warning_dialog_box("Net is unrouted");
200196
app->refresh_drawing();
201197
return;

vpr/src/draw/search_bar.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
#include "ezgl/application.hpp"
1818

19-
bool is_net_unrouted(AtomNetId atomic_net_id);
2019
bool is_net_fully_absorbed(AtomNetId atomic_net_id);
2120

2221
void search_and_highlight(GtkWidget* /*widget*/, ezgl::application* app);

0 commit comments

Comments
 (0)