Skip to content

Fix REPEAT local net labels collapsing distinct rails across rooms - #53

Open
cs42 wants to merge 2 commits into
anarthrous-eda:mainfrom
contronix:fix/repeat-local-rail-groups
Open

cs42 wants to merge 2 commits into
anarthrous-eda:mainfrom
contronix:fix/repeat-local-rail-groups

Conversation

@cs42

@cs42 cs42 commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Local schematic net names on REPEAT sheets (e.g. P_IN) were used as a global rail-group alias, so unconnected PCB nets (P_IN.1, P_IN.2, …) were merged into one mega-rail in the Rails list / topology / copper eyes.
  • Alias-union requested_net ↔ pin nets only when every terminal sharing that label resolves onto shared copper; REPEAT labels with disjoint pin nets stay display-only. Per-instance SERIES bridges and unique local→canonical aliases (e.g. 5V_LOCAL+5V) are unchanged.
  • Caploop rail membership follows the same rule so a shared local name cannot match every room’s rail.

Motivation

Users correctly annotate child sheets with local names (PDN_P_NET=P_IN), not flattened PCB names. The solver already resolved terminals per instance, but the rail grouper treated the bare local string as one net identity. That made multi-motor / multi-channel designs look shorted in the UI even when copper and the FEM were separate — and hid the per-instance rails people expect after modelling drivers as REGULATORs.

Test plan

  • pytest tests/test_rails.py tests/test_rail_trees.py tests/test_caploop_identify.py
  • On a REPEAT design: two SERIES instances with the same local P_IN/P_OUT → two rails, members only within each room
  • REGULATOR outs with shared local P_IN1 and shared VDD_MOTOR in → separate OUT rails, one IN rail
  • Existing local-alias case (5V_LOCAL+5V) still groups and nests correctly

cs42 and others added 2 commits September 7, 2026 12:09
Rail grouping treated shared child-sheet names (P_IN) as a global alias key, collapsing distinct PCB nets across rooms. Only union requested_net when terminals share copper; keep local annotation and per-instance SERIES bridges.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant