Skip to content

Commit 74b17a4

Browse files
committed
Make pin allocation error actionable
- Include interface name in error message - Provide guidance to delete pins.lock or verify design - Addresses gatecat review comment on allocation.py:221
1 parent 47f98fe commit 74b17a4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

chipflow_lib/packaging/allocation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,9 @@ def _linear_allocate_components(interfaces: dict, lockfile: LockFile | None, all
218218
old_width = sum([len(p.pins) for p in old_ports.values() if p.pins is not None])
219219
if old_width != width:
220220
raise ChipFlowError(
221-
f"top level interface has changed size. "
222-
f"Old size = {old_width}, new size = {width}"
221+
f"Interface '{component}.{interface}' has changed size. "
222+
f"Old size = {old_width}, new size = {width}. "
223+
f"Delete pins.lock to force reallocation, or verify your design matches the locked pin configuration."
223224
)
224225
port_map._add_ports(component, interface, old_ports)
225226
else:

0 commit comments

Comments
 (0)