Skip to content

Commit a18705d

Browse files
committed
ppl: new attempt of fixing uninitialized variables
Signed-off-by: Eder Monteiro <[email protected]>
1 parent 3738174 commit a18705d

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

src/ppl/src/IOPlacer.cpp

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -842,31 +842,34 @@ std::vector<Point> IOPlacer::findLayerSlots(const int layer,
842842
/ min_dst_pins))
843843
- num_tracks_offset;
844844

845-
int curr_x;
846-
int curr_y;
847-
848845
if (vertical_pin) {
846+
int curr_x;
847+
int curr_y;
849848
curr_x = init_tracks + start_idx * min_dst_pins;
850849
if (is_die_polygon) {
851850
curr_y = edge_start.getY();
852851
} else {
853852
curr_y = (edge == Edge::bottom) ? lb_y : ub_y;
854853
}
854+
855+
for (int i = start_idx; i <= end_idx; ++i) {
856+
odb::Point pos(curr_x, curr_y);
857+
slots.push_back(pos);
858+
curr_x += min_dst_pins;
859+
}
855860
} else {
861+
int curr_x;
862+
int curr_y;
856863
curr_y = init_tracks + start_idx * min_dst_pins;
857864
if (is_die_polygon) {
858865
curr_x = edge_start.getX();
859866
} else {
860867
curr_x = (edge == Edge::left) ? lb_x : ub_x;
861868
}
862-
}
863869

864-
for (int i = start_idx; i <= end_idx; ++i) {
865-
odb::Point pos(curr_x, curr_y);
866-
slots.push_back(pos);
867-
if (vertical_pin) {
868-
curr_x += min_dst_pins;
869-
} else {
870+
for (int i = start_idx; i <= end_idx; ++i) {
871+
odb::Point pos(curr_x, curr_y);
872+
slots.push_back(pos);
870873
curr_y += min_dst_pins;
871874
}
872875
}

0 commit comments

Comments
 (0)