Skip to content

Allow multi-connector SOURCE/SINK terminals via PDN_P_DES / PDN_N_DES - #47

Merged
anarthrous-eda merged 20 commits into
anarthrous-eda:mainfrom
contronix:feature/multi-connector-pdn-source
Sep 4, 2026
Merged

Allow multi-connector SOURCE/SINK terminals via PDN_P_DES / PDN_N_DES#47
anarthrous-eda merged 20 commits into
anarthrous-eda:mainfrom
contronix:feature/multi-connector-pdn-source

Conversation

@cs42

@cs42 cs42 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Motivation

Lab and prototype boards often bring supply in through separate single-pin connectors (banana jacks): one jack for the rail, several for return. FYPA previously required both PDN_P_NET and PDN_N_NET pads on the same annotated footprint, so a two-terminal SOURCE could not be placed on that topology without a kludge (2-pin symbol, wrong injection point, or single-net mode that ignores return copper).

This change lets one logical SOURCE or SINK keep its value on a host part while binding each terminal to pads on other designators — so current injects at the real lab connectors.

Summary

  • Add optional PDN_P_DES / PDN_N_DES (and PDNn_*) — comma-separated designator lists for the P/N side. When set, that side uses only those parts’ pads on the named net (host is not auto-included).
  • Same semantics in the FYPA editor via p_des / n_des on .fypa directives, plus slim CSV fields in the PDN panel.
  • TerminalPin.component_designator and metadata component / pad_label so multi-part terminals stay readable; raw pad stays unlock-safe.
  • Docs (user guide + README) and unit tests for resolution, errors, editor round-trip, and unlock seeding.

Example

# on J1 (host)
PDN_ROLE  = SOURCE
PDN_V     = 5V
PDN_P_NET = +5V
PDN_N_NET = GND
PDN_N_DES = J2,J3,J4

Without *_DES, behaviour is unchanged (pads on the host only).

Test plan

  • pytest tests/test_annotations.py tests/test_editor_directives.py
  • Annotate a P-only jack as SOURCE with PDN_N_DES listing return jacks; confirm N pads/solve use those connectors
  • Missing or wrong DES designator → clear error; no pad on net → clear error
  • Without *_DES, existing two-terminal sources behave unchanged
  • Unlock a multi-DES schematic directive in the editor: DES fields and pin lists seed correctly; Apply keeps remote pads

cs42 and others added 12 commits July 16, 2026 14:03
Generic script reads branch config from team/local via git show, fetches origin branches by default (--local-only to disable), auto-resolves .gitignore merge conflicts on throwaway test/combined.

Co-authored-by: Cursor <cursoragent@cursor.com>
Pass a .PrjPcb path to launch FYPA gui directly after the combined test branch run. Also gitignore scripts/py314.local.json.

Co-authored-by: Cursor <cursoragent@cursor.com>
Reuse test/combined when input SHAs match a git-note stamp, fall back to local refs when fetch fails, skip pytest via -SkipTests, and quiet fetch stderr so stamp matching works reliably from Altium.
PowerShell only accepts the PascalCase switch; the kebab-case form never matched a parameter.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Rebuild and publish the shared tip via maintain-test-combined.ps1
(origin tips only). test-combined.ps1 and launch-combined-gui.ps1
only check out origin/test/combined — no merges at Altium start.

Co-authored-by: Cursor <cursoragent@cursor.com>
First publish has no origin/test/combined yet; do not fail the
input fetch when that ref is absent.

Co-authored-by: Cursor <cursoragent@cursor.com>
Leave the in-progress merge on test/combined so conflicts can be
resolved without losing MERGE_HEAD.

Co-authored-by: Cursor <cursoragent@cursor.com>
Centralize test/combined maintain + launch
Default updates from origin/test/combined and merges only missing tips so
prior conflict resolutions survive. -Rebuild stays the clean recreate.
-Abort resets a stuck test/combined without forcing a dirty checkout.
Document the finish/abort conflict path in fork-workflow.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
maintain-test-combined: incremental + Abort
@cs42
cs42 marked this pull request as ready for review August 7, 2026 06:40
@cs42
cs42 force-pushed the feature/multi-connector-pdn-source branch from f84abfb to 10dd87c Compare September 2, 2026 11:00
@anarthrous-eda
anarthrous-eda merged commit 62aedac into anarthrous-eda:main Sep 4, 2026
1 check failed
@cs42
cs42 deleted the feature/multi-connector-pdn-source branch September 7, 2026 06:56
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.

2 participants