Inherit unindexed PDN_* as templates for indexed channels - #46
Merged
anarthrous-eda merged 17 commits intoSep 4, 2026
Merged
Conversation
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
Shared values and nets (e.g. PDN_R, PDN_IN_*) apply to PDNn_* when unset, and a legacy channel is omitted when indexed terminals alone define the part — fixing multi-path SERIES and multi-output REGULATOR annotations. Co-authored-by: Cursor <cursoragent@cursor.com>
Require a complete unindexed terminal pair before emitting a legacy channel, scope discovery to active roles to avoid cross-role phantoms, and quiet dry-run role resolution for bridge/supply maps. Co-authored-by: Cursor <cursoragent@cursor.com>
Indexed-only parts no longer emit a false missing-PDN_ROLE error for shared PDN_R/V/I values; document that unindexed PDN_NET stays a real legacy channel. Co-authored-by: Cursor <cursoragent@cursor.com>
cs42
force-pushed
the
feature/pdn-channel-templates
branch
from
September 2, 2026 09:48
750395a to
fbdc198
Compare
anarthrous-eda
added a commit
that referenced
this pull request
Sep 4, 2026
…nnels Post-merge fixes for PR #46, where unindexed templates were inherited too broadly and silently changed the solved model: - role: a PDN1_ROLE=SERIES channel inherited a SINK part's terminals and dropped a resistor across its rail - discovery: a stray PDN1_MIN_V / PDN1_QUIESCENT cloned the unindexed directive, double-counting the load - terminal mode: PDN_NET beside an indexed PDN1_P_NET pair failed _terminal_mode and dropped the channel - bridge graph: a shared PDN_P_NET resolved as a directive but produced no SERIES bridge pair, so Vin inference and rail grouping missed it Also require the legacy channel's own value param before keeping it beside indexed channels, so shared terminals no longer report a spurious "missing PDN_I". 9 regression tests; docs updated to match.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Multi-path SERIES and multi-output REGULATOR parts often share one value or one side of the terminals (
PDN_R,PDN_IN_*, a common return net) while each path has its own indexed nets. Today FYPA only auto-fills that pattern for a single unindexed 2-pad SERIES, so designers either duplicate every parameter per channel or get a misleading “N pads, not 2” / missing-channel failure when only the sharedPDN_*form is present.This change treats unset
PDNn_*fields as inheriting from the unindexedPDN_*template, and only emits a legacy unindexed directive when that form still has a complete terminal set — so shared templates stay declarative and indexed channels resolve correctly.Summary
PDN_*templates via channel materializationPDNn_ROLEwithoutPDN_ROLE): unindexed params stay templatesreport_errors=False)Test plan
uv run pytest tests/test_annotations.pyPDN_R/ return and per-channel nets → two SERIES directivesPDN_Vand per-channel OUTs → two regulatorsPDNn_ROLEdoes not emit “missing PDN_ROLE” for templatePDN_R/PDN_VPDN1_*on another role does not invent a phantom channel