Skip to content

Commit 9be453d

Browse files
committed
moved draw_route function out of draw_rr
1 parent 042545a commit 9be453d

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

vpr/src/draw/draw.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,11 @@ static void draw_main_canvas(ezgl::renderer* g) {
195195
} else { /* ROUTING on screen */
196196

197197
if (draw_state->show_nets && draw_state->draw_nets == DRAW_ROUTED_NETS){
198-
drawroute(ALL_NETS, g);
198+
draw_route(ALL_NETS, g);
199+
200+
if(draw_state->highlight_fan_in_fan_out) {
201+
draw_route(HIGHLIGHTED, g);
202+
}
199203
}
200204

201205
draw_rr(g);

vpr/src/draw/draw_basic.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ void draw_congestion(ezgl::renderer* g) {
319319
}
320320
}
321321
g->set_line_width(0);
322-
drawroute(HIGHLIGHTED, g);
322+
draw_route(HIGHLIGHTED, g);
323323

324324
//Reset colors
325325
for (RRNodeId inode : congested_rr_nodes) {
@@ -533,7 +533,7 @@ void draw_x(float x, float y, float size, ezgl::renderer* g) {
533533
/* Draws the nets in the positions fixed by the router. If draw_net_type is *
534534
* ALL_NETS, draw all the nets. If it is HIGHLIGHTED, draw only the nets *
535535
* that are not coloured black (useful for drawing over the rr_graph). */
536-
void drawroute(enum e_draw_net_type draw_net_type, ezgl::renderer* g) {
536+
void draw_route(enum e_draw_net_type draw_net_type, ezgl::renderer* g) {
537537
/* Next free track in each channel segment if routing is GLOBAL */
538538

539539
auto& cluster_ctx = g_vpr_ctx.clustering();
@@ -615,6 +615,7 @@ void draw_partial_route(const std::vector<RRNodeId>& rr_nodes_to_draw, ezgl::ren
615615

616616
bool inter_cluster_node = is_inter_cluster_node(rr_graph, inode);
617617

618+
618619
if(inter_cluster_node && !draw_state->draw_inter_cluster_nets){
619620
continue;
620621
}

vpr/src/draw/draw_basic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void draw_x(float x, float y, float size, ezgl::renderer* g);
4949
/* Draws the nets in the positions fixed by the router. If draw_net_type is *
5050
* ALL_NETS, draw all the nets. If it is HIGHLIGHTED, draw only the nets *
5151
* that are not coloured black (useful for drawing over the rr_graph). */
52-
void drawroute(enum e_draw_net_type draw_net_type, ezgl::renderer* g);
52+
void draw_route(enum e_draw_net_type draw_net_type, ezgl::renderer* g);
5353

5454
void draw_routed_net(ParentNetId net, ezgl::renderer* g);
5555

vpr/src/draw/draw_rr.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ void draw_rr(ezgl::renderer* g) {
4646
const auto& rr_graph = device_ctx.rr_graph;
4747

4848
if (!draw_state->show_rr) {
49-
g->set_line_width(3);
50-
drawroute(HIGHLIGHTED, g);
51-
g->set_line_width(0);
5249
return;
5350
}
5451

@@ -95,7 +92,6 @@ void draw_rr(ezgl::renderer* g) {
9592
draw_rr_node(inode, draw_state->draw_rr_node[inode].color, g);
9693
}
9794

98-
drawroute(HIGHLIGHTED, g);
9995
}
10096

10197
void draw_rr_chan(RRNodeId inode, const ezgl::color color, ezgl::renderer* g) {

vpr/src/draw/draw_rr.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@
1717

1818
#include "ezgl/graphics.hpp"
1919

20-
/* Draws the routing resources that exist in the FPGA, if the user wants *
21-
* them drawn. */
20+
/**
21+
* @brief Draws the routing resources that exist in the FPGA, if the user wants
22+
* them drawn.
23+
*/
2224
void draw_rr(ezgl::renderer* g);
2325

2426
/* Draws all the edges that the user wants shown between inode and what it

0 commit comments

Comments
 (0)