Connectivity: instantiate each document once under flat/global net scope - #51
Open
Andrei-Errapart wants to merge 1 commit into
Open
Connectivity: instantiate each document once under flat/global net scope#51Andrei-Errapart wants to merge 1 commit into
Andrei-Errapart wants to merge 1 commit into
Conversation
Block-diagram overview pages routinely reference the working sheets a second time for navigation (a micromodules project references one sheet 17 times from its top-level overview). The hierarchy walker treated every reference as a multi-channel instance, so the project netlist invented per-reference channels with channel-private power nets - GND fell apart into per-sheet islands. Under the flat and global net-identifier scopes Altium does not clone channels: identifiers merge by name and components exist once per document. HierarchyWalker.Walk now takes dedupeDuplicateSheetRefs (passed by ProjectNetlistBuilder from the resolved scope): a document referenced by several plain sheet symbols is instantiated once, later references are skipped with an Info diagnostic, and the surviving instance is not flagged as a repeated channel. Repeat() channels and hierarchical-scope projects are unaffected.
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.
Summary
Block-diagram overview pages routinely reference the working sheets a second time for
navigation (a micromodules project references one sheet 17 times from its top-level
overview). The hierarchy walker treated every reference as a multi-channel instance, so
the project netlist invented per-reference channels with channel-private power nets —
GND fell apart into per-sheet islands.
Under the flat and global net-identifier scopes Altium does not clone channels:
identifiers merge by name and components exist once per document. The walker now
instantiates each document once under those scopes.
Repeat()channels andhierarchical-scope projects are unaffected.
Changes
HierarchyWalker.Walkgains an optionaldedupeDuplicateSheetRefsparameter(default
false, preserving current behavior). When set, a document referenced byseveral plain sheet symbols is instantiated once; later references are skipped with an
Infodiagnostic, and the surviving instance is not flagged as a repeated channel.ProjectNetlistBuilderenables the flag when the resolved net-identifier scope isFlatorGlobal; hierarchical-scope projects walk exactly as before.Test Plan
dotnet test) — 850 passed, 0 failed, 10 skipped (tests requiring local sample files)Checklist
dedupeDuplicateSheetRefsis optional; the default keeps existing behavior)