Skip to content

Commit cba0c3c

Browse files
committed
disabled extra flyline drawing function. drawing nets over rrgraph.
1 parent 054884c commit cba0c3c

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
lines changed

vpr/src/draw/draw.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,9 @@ static void draw_main_canvas(ezgl::renderer* g) {
180180
drawplace(g);
181181
draw_internal_draw_subblk(g);
182182

183-
if (draw_state->pic_on_screen == PLACEMENT) {
184-
if (draw_state->draw_nets == DRAW_FLYLINES && draw_state->show_nets) {
185-
draw_flylines_placement(g);
186-
}
187-
} else { // ROUTING on screen
183+
if(draw_state->pic_on_screen == ROUTING) { // ROUTING on screen
184+
185+
draw_rr(g);
188186

189187
if (draw_state->show_nets && draw_state->draw_nets == DRAW_ROUTED_NETS) {
190188
draw_route(ALL_NETS, g);
@@ -194,8 +192,6 @@ static void draw_main_canvas(ezgl::renderer* g) {
194192
}
195193
}
196194

197-
draw_rr(g);
198-
199195
draw_congestion(g);
200196

201197
draw_routing_costs(g);

vpr/src/draw/draw_basic.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,9 +582,7 @@ void draw_routed_net(ParentNetId net_id, ezgl::renderer* g) {
582582
draw_state->draw_rr_node[inode].node_highlighted = true;
583583
} else {
584584
// If not highlighted, draw the node in default color.
585-
if (!draw_state->draw_rr_node[inode].node_highlighted) {
586-
draw_state->draw_rr_node[inode].color = DEFAULT_RR_NODE_COLOR;
587-
}
585+
draw_state->draw_rr_node[inode].color = DEFAULT_RR_NODE_COLOR;
588586
}
589587

590588
// When drawing a new branch, add the parent node to the vector to ensure that the conenction is drawn.

vpr/src/draw/draw_basic.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@
2929
* Blocks are drawn in layer order (so that semi-transparent blocks/grids render well)*/
3030
void drawplace(ezgl::renderer* g);
3131

32-
/* This routine draws the nets on the placement. The nets have not *
33-
* yet been routed, so we just draw a chain showing a possible path *
34-
* for each net. This gives some idea of future congestion. */
32+
/** This routine draws the nets on the placement. The nets have not
33+
* yet been routed, so we just draw a chain showing a possible path
34+
* for each net. This gives some idea of future congestion.
35+
* This function may be deprecated. draw_logical_connections() is preferred. */
3536
void draw_flylines_placement(ezgl::renderer* g);
3637

3738
/* Draws all the overused routing resources (i.e. congestion) in various contrasting colors showing congestion ratio. */

vpr/src/draw/draw_rr.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,10 +336,10 @@ void draw_rr_edges(RRNodeId inode, ezgl::renderer* g) {
336336
// Need to check both highlighting and hit nodes since when the user clicks off a node, the node is de-highlighted but still in the hit nodes.
337337
if (draw_state->highlight_rr_edges) {
338338
if (draw_state->draw_rr_node[inode].node_highlighted && draw_state->hit_nodes.find(inode) != draw_state->hit_nodes.end()) {
339-
color = draw_state->draw_rr_node[to_node].color;
339+
color = ezgl::RED;
340340
draw_edge = true;
341341
} else if (draw_state->draw_rr_node[to_node].node_highlighted && draw_state->hit_nodes.find(to_node) != draw_state->hit_nodes.end()) {
342-
color = draw_state->draw_rr_node[inode].color;
342+
color = ezgl::BLUE;
343343
draw_edge = true;
344344
}
345345
}

0 commit comments

Comments
 (0)