summaryrefslogtreecommitdiff
path: root/chip_design/generate-chipdesign.py
diff options
context:
space:
mode:
Diffstat (limited to 'chip_design/generate-chipdesign.py')
-rwxr-xr-xchip_design/generate-chipdesign.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/chip_design/generate-chipdesign.py b/chip_design/generate-chipdesign.py
index ca2f229..bd96543 100755
--- a/chip_design/generate-chipdesign.py
+++ b/chip_design/generate-chipdesign.py
@@ -71,9 +71,7 @@ for i, (w, h) in enumerate(all_components):
# Avoid overlap between any pair, so any other component must be outside the
# current pivot.
for i in range(len(all_components)):
- for j in range(len(all_components)):
- if i == j:
- continue
+ for j in range(i + 1, len(all_components)):
# other (j) must be below, on the left of pivot (i).
# or above or on the right (mind the width/height!).
altpreds = [
@@ -86,9 +84,7 @@ for i in range(len(all_components)):
# require minimum distance between power components
for i in range(len(powers)):
- for j in range(len(powers)):
- if i == j:
- continue
+ for j in range(i + 1, len(powers)):
# need center_i >= center_j + distance (for center from {X,Y}, repeat
# for i and j swapped in case j occurs after i)
# center = x + w / 2