From d3c6b160815472a43700f6a69301d0b6b15b5db1 Mon Sep 17 00:00:00 2001 From: seveibar Date: Thu, 30 Jul 2026 15:40:01 -0700 Subject: [PATCH 1/6] Document advanced BGA breakout fanout --- docs/elements/breakout.mdx | 203 +++++++++++++++++++++++++------------ 1 file changed, 140 insertions(+), 63 deletions(-) diff --git a/docs/elements/breakout.mdx b/docs/elements/breakout.mdx index 0a15a9a7..b52777d2 100644 --- a/docs/elements/breakout.mdx +++ b/docs/elements/breakout.mdx @@ -14,110 +14,187 @@ connections that leave the breakout. import CircuitPreview from "@site/src/components/CircuitPreview" -This 100-pin BGA breakout groups signals into four buses. The default fanout -autorouter sends each bus toward the side of the package where its connector is -placed, then completes the routes. +This 100-pin BGA keeps two 8-bit buses on contiguous outer columns and assigns +each bus an explicit fanout direction. Eight center-region balls connect to +GND and VCC pours on separate inner layers. + bus.signals.map((signal, index) => [ + "pin" + bus.pins[index], + signal, + ]), + ), + ...powerDrops.map((drop) => ["pin" + drop.pin, drop.name]), +]) + export default () => ( - + + + + {buses.map((bus) => ( - [ + "pin" + (index + 1), + signal, + ]), + )} + footprint={ + + {fanoutExitYs.map((pcbY, index) => ( + + ))} + + } /> ))} {buses.map((bus) => ( - + bus.name + "_" + signal, + )} ))} {buses.flatMap((bus) => bus.signals.map((signal) => ( )), )} + {powerDrops.map((drop) => ( + + ))} ) `} /> +The explicit `` is needed here because the advanced fanout +controls live on the phase. `busFanoutDirections` sends each named bus toward a +specific side and can also guide an individual source trace, as shown for the +power balls. + +`fanoutRoutingLayers={["top"]}` reserves the top layer for signal escape. The +GND and VCC traces have only one component endpoint, so the fanout router +infers their destination layers from the matching `` elements +and drops them to `inner1` and `inner2`. Those pour layers do not need to appear +in `fanoutRoutingLayers`. + +If a net has pours on multiple layers, disambiguate the plane destination with +an explicit map: + +```tsx + +``` + ## Auto-Generated Breakout Points When traces connect from components inside a `` to components outside From 9a815e99eedd4a0699ab812fa080a80a1d913b68 Mon Sep 17 00:00:00 2001 From: seveibar Date: Thu, 30 Jul 2026 17:44:33 -0700 Subject: [PATCH 2/6] Fix breakout preview JSX --- docs/elements/breakout.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/elements/breakout.mdx b/docs/elements/breakout.mdx index b52777d2..41e8f960 100644 --- a/docs/elements/breakout.mdx +++ b/docs/elements/breakout.mdx @@ -149,6 +149,7 @@ export default () => ( connections={bus.signals.map( (signal) => bus.name + "_" + signal, )} + /> ))} {buses.flatMap((bus) => bus.signals.map((signal) => ( From 49088c47969d8977f975ec0dec88ccd870a438e1 Mon Sep 17 00:00:00 2001 From: seveibar Date: Thu, 30 Jul 2026 18:05:51 -0700 Subject: [PATCH 3/6] Trigger Vercel preview From 17f40fd3f6360d33e7f78d20364e586616cf4801 Mon Sep 17 00:00:00 2001 From: seveibar Date: Thu, 30 Jul 2026 18:25:31 -0700 Subject: [PATCH 4/6] Use breakout fanout props in BGA example --- docs/elements/breakout.mdx | 72 +++++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/docs/elements/breakout.mdx b/docs/elements/breakout.mdx index 41e8f960..462a4e0b 100644 --- a/docs/elements/breakout.mdx +++ b/docs/elements/breakout.mdx @@ -33,7 +33,7 @@ const buses = [ "DATA7", ], pins: [20, 30, 40, 50, 60, 70, 80, 90], - targetX: 5.275, + targetX: 5.75, }, { name: "ADDRESS", @@ -48,7 +48,7 @@ const buses = [ "ADDR7", ], pins: [11, 21, 31, 41, 51, 61, 71, 81], - targetX: -5.275, + targetX: -5.75, }, ] @@ -91,24 +91,26 @@ export default () => ( > - - + ( ) `} /> -The explicit `` is needed here because the advanced fanout -controls live on the phase. `busFanoutDirections` sends each named bus toward a -specific side and can also guide an individual source trace, as shown for the -power balls. +The breakout uses the fanout autorouter by default, so its fanout controls can +be set directly on ``. `busFanoutDirections` sends each named bus +toward a specific side and can also guide an individual source trace, as shown +for the power balls. `fanoutRoutingLayers={["top"]}` reserves the top layer for signal escape. The -GND and VCC traces have only one component endpoint, so the fanout router -infers their destination layers from the matching `` elements -and drops them to `inner1` and `inner2`. Those pour layers do not need to appear -in `fanoutRoutingLayers`. +GND and VCC traces have only one component endpoint, so `fanoutPourNetMap` +drops them to `inner1` and `inner2`. Those plane layers do not need to appear in +`fanoutRoutingLayers`. -If a net has pours on multiple layers, disambiguate the plane destination with -an explicit map: +When `fanoutPourNetMap` is omitted, tscircuit infers the plane destinations +from matching `` elements. An explicit map is useful when a net +has pours on multiple layers: ```tsx - +> + {/* BGA, buses, and traces */} + ``` ## Auto-Generated Breakout Points @@ -279,4 +282,7 @@ export default () => ( | `padding` | Uniform padding around the breakout region. | | `paddingLeft` / `paddingRight` / `paddingTop` / `paddingBottom` | Control padding for each side individually. | | `autorouter` | Autorouter used to escape components inside the breakout. Defaults to `fanout`. | +| `busFanoutDirections` | Maps named buses or source traces to preferred escape directions. | | `fanoutBoundaryPadding` | Padding between the source pads and the shared boundary where fanout traces terminate. | +| `fanoutRoutingLayers` | Copper layers available to boundary-terminated fanout buses. | +| `fanoutPourNetMap` | Maps plane layers to nets for source-only fanout escapes. Matching copper pours are inferred when omitted. | From 787c92ccb67c460e9e25e889a9f74214fc6283b1 Mon Sep 17 00:00:00 2001 From: seveibar Date: Thu, 30 Jul 2026 18:39:10 -0700 Subject: [PATCH 5/6] Remove auto-generated breakout points section --- docs/elements/breakout.mdx | 74 -------------------------------------- 1 file changed, 74 deletions(-) diff --git a/docs/elements/breakout.mdx b/docs/elements/breakout.mdx index 462a4e0b..8a288097 100644 --- a/docs/elements/breakout.mdx +++ b/docs/elements/breakout.mdx @@ -199,80 +199,6 @@ has pours on multiple layers: ``` -## Auto-Generated Breakout Points - -When traces connect from components inside a `` to components outside -of it, tscircuit can create the needed breakout points automatically. This keeps -the breakout local to the component cluster while still letting board-level -traces connect to headers and other surrounding parts. - -The example below routes a QFP16 controller inside a breakout to an external pin -header and nearby passives without adding any manual `` -elements. - - ( - - - - - - - - - - - - - - -) -`} /> - ## Properties `` accepts all the layout properties of `` plus a few extras: From 49fba13233b427a65c8ec21ba0ebb948496d09f5 Mon Sep 17 00:00:00 2001 From: seveibar Date: Thu, 30 Jul 2026 19:32:41 -0700 Subject: [PATCH 6/6] Keep power drops out of bus directions --- docs/elements/breakout.mdx | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/docs/elements/breakout.mdx b/docs/elements/breakout.mdx index 8a288097..4d35f5f4 100644 --- a/docs/elements/breakout.mdx +++ b/docs/elements/breakout.mdx @@ -101,14 +101,6 @@ export default () => ( busFanoutDirections={{ DATA: "center_right", ADDRESS: "center_left", - GND_44: "center_left", - VCC_45: "bottom_center", - GND_46: "bottom_center", - VCC_47: "center_right", - VCC_54: "center_left", - GND_55: "top_center", - VCC_56: "top_center", - GND_57: "center_right", }} > ( The breakout uses the fanout autorouter by default, so its fanout controls can be set directly on ``. `busFanoutDirections` sends each named bus -toward a specific side and can also guide an individual source trace, as shown -for the power balls. +toward a specific side. `fanoutRoutingLayers={["top"]}` reserves the top layer for signal escape. The GND and VCC traces have only one component endpoint, so `fanoutPourNetMap` @@ -208,7 +199,7 @@ has pours on multiple layers: | `padding` | Uniform padding around the breakout region. | | `paddingLeft` / `paddingRight` / `paddingTop` / `paddingBottom` | Control padding for each side individually. | | `autorouter` | Autorouter used to escape components inside the breakout. Defaults to `fanout`. | -| `busFanoutDirections` | Maps named buses or source traces to preferred escape directions. | +| `busFanoutDirections` | Maps named buses to preferred escape directions. | | `fanoutBoundaryPadding` | Padding between the source pads and the shared boundary where fanout traces terminate. | | `fanoutRoutingLayers` | Copper layers available to boundary-terminated fanout buses. | | `fanoutPourNetMap` | Maps plane layers to nets for source-only fanout escapes. Matching copper pours are inferred when omitted. |