Warn when chip power pins lack decoupling capacitors - #175
Open
0hmX wants to merge 3 commits into
Open
Conversation
0hmX
commented
Jul 31, 2026
0hmX
commented
Jul 31, 2026
0hmX
commented
Jul 31, 2026
0hmX
commented
Jul 31, 2026
0hmX
commented
Jul 31, 2026
0hmX
marked this pull request as ready for review
July 31, 2026 17:38
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
This is a cross-package implementation of the chip-power-pin decoupling check:
@tscircuit/coredetermines each chip pin's decoupling requirement while rendering JSX and serializes that intent into Circuit JSON.@tscircuit/checksreads the serialized metadata, evaluates circuit connectivity, and emits the warning.This keeps component semantics in core and DRC warning ownership in checks.
End-to-end workflow
pinAttributesonto the generatedsource_port.should_have_decoupling_capacitorusing this precedence:shouldHaveDecouplingCapacitorvalue wins.providesPower: trueresolves tofalsebecause a power-source output should not require a local decoupling capacitor.requiresPowervalue resolves to the same boolean.true.{ "type": "source_port", "should_have_decoupling_capacitor": true, "recommended_decoupling_capacitor_capacitance": "100nF" }simple_chipport that requires decoupling, checks looks for a two-pinsimple_capacitorwith:source_pin_missing_trace_warning, including the recommended capacitance in the message when supplied.runAllNetlistChecks.False-positive behavior
shouldHaveDecouplingCapacitor: falseis preserved in Circuit JSON and suppresses the warning.providesPower: trueare serialized with the requirement set tofalse.requires_power === true && provides_power !== true.Cross-repository PRs
Both changes are required for the complete JSX → Circuit JSON → connectivity check → warning workflow.
Validation