Skip to content

Commit fc2cf8f

Browse files
committed
vpr: Fix out-of-bounds memory access on bidir RR graphs
1 parent 2c9415c commit fc2cf8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vpr/src/route/rr_graph2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ int get_bidir_opin_connections(
703703
chan = ((to_type == CHANX) ? tr_j : tr_i);
704704
seg = ((to_type == CHANX) ? tr_i : tr_j);
705705

706-
bool vert = ((side == TOP) || (side == BOTTOM));
706+
bool vert = !((side == TOP) || (side == BOTTOM));
707707

708708
/* Don't connect where no tracks on fringes */
709709
if ((tr_i < 0) || (tr_i > int(device_ctx.grid.width() - 2))) { //-2 for no perimeter channels

0 commit comments

Comments
 (0)