Skip to content

Commit 63fa078

Browse files
committed
Clarify confusing power pin calculation logic
- Fix line 160: change 'height // 2 + height // 2' to just 'height // 2' - Add clarifying comment about pin numbering for left side - The original expression was confusing and simplified to wrong value - Addresses gatecat review comment on standard.py:160
1 parent 521710b commit 63fa078

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

chipflow_lib/packaging/standard.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ def _power(self) -> List[PowerPins]:
156156
# Heuristic for sensible number of power pins for given size
157157
n = (self.width + self.height) // 12
158158

159-
# Left side
160-
p = self.height // 2 + self.height // 2
159+
# Left side (pins 1 to height)
160+
p = self.height // 2 # Middle of left side
161161
assert p > 3
162162
pins.append(PowerPins(p - 2, p - 1))
163163
pins.append(PowerPins(p, p + 1, name='d'))

0 commit comments

Comments
 (0)