Skip to content

Commit 8d457c0

Browse files
committed
Fixed drawing issue
1 parent 90e87dd commit 8d457c0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

vpr/src/draw/draw_rr_edges.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ void draw_chanx_to_chany_edge(int chanx_node, int chanx_track, int chany_node, i
259259
y1 = chanx_bbox.bottom();
260260
x2 = chany_bbox.left();
261261

262+
// these values xhigh/low yhigh/low mark the cordinates for the begining and ends of the wire.
262263
chanx_xlow = rr_graph.node_xlow(RRNodeId(chanx_node));
263264
chanx_y = rr_graph.node_ylow(RRNodeId(chanx_node));
264265
chany_x = rr_graph.node_xlow(RRNodeId(chany_node));
@@ -267,8 +268,7 @@ void draw_chanx_to_chany_edge(int chanx_node, int chanx_track, int chany_node, i
267268
if (chanx_xlow <= chany_x) { /* Can draw connection going right */
268269
/* Connection not at end of the CHANX segment. */
269270
x1 = draw_coords->tile_x[chany_x] + draw_coords->get_tile_width();
270-
271-
if (rr_graph.node_direction(RRNodeId(chanx_node)) != Direction::BIDIR) {
271+
if (rr_graph.node_direction(RRNodeId(chanx_node)) != Direction::BIDIR && (SwitchType)switch_type != SwitchType::SHORT) {
272272
if (edge_dir == FROM_X_TO_Y) {
273273
if ((chanx_track % 2) == 1) { /* If dec wire, then going left */
274274
x1 = draw_coords->tile_x[chany_x + 1];
@@ -279,12 +279,11 @@ void draw_chanx_to_chany_edge(int chanx_node, int chanx_track, int chany_node, i
279279
} else { /* Must draw connection going left. */
280280
x1 = chanx_bbox.left();
281281
}
282-
283282
if (chany_ylow <= chanx_y) { /* Can draw connection going up. */
284283
/* Connection not at end of the CHANY segment. */
285284
y2 = draw_coords->tile_y[chanx_y] + draw_coords->get_tile_width();
286285

287-
if (rr_graph.node_direction(RRNodeId(chany_node)) != Direction::BIDIR) {
286+
if (rr_graph.node_direction(RRNodeId(chany_node)) != Direction::BIDIR && (SwitchType)switch_type != SwitchType::SHORT) {
288287
if (edge_dir == FROM_Y_TO_X) {
289288
if ((chany_track % 2) == 1) { /* If dec wire, then going down */
290289
y2 = draw_coords->tile_y[chanx_y + 1];

0 commit comments

Comments
 (0)