Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,23 @@ The power rails share a routing layer, not a net. A downstream board design must
create the appropriate isolated copper regions for the 23 named power nets on
`inner2`.

The breakout declares that plane intent once through the fanout phase:

```tsx
<autoroutingphase
autorouter="fanout"
fanoutPourNetMap={{
inner1: "GND",
inner2: RK3326_POWER_RAIL_NETS,
}}
/>
```

There is no singleton bus per supply ball. The fanout router recognizes each
source-only supply trace from its net and drops it to the mapped layer. In a
board design with matching `<copperpour>` components, the same layer-to-net
intent can be inferred without specifying `fanoutPourNetMap`.

```tsx
import { RK3326Breakout } from "@tsci/tscircuit.rk3326"

Expand Down
1 change: 1 addition & 0 deletions __snapshots__/index.circuit-pcb.snap.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export {
RK3326_INITIAL_FANOUT_BUS_IDS,
RK3326_PLANE_FANOUT_CONNECTIONS,
RK3326_POWER_PLANE_LAYER,
RK3326_POWER_RAIL_NETS,
RK3326_SUPPLY_PINS,
getRK3326FanoutBreakoutPoints,
getRK3326PlaneFanoutConnections,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"devDependencies": {
"@types/bun": "^1.3.14",
"@types/react": "^19.2.17",
"tscircuit": "0.0.2180",
"tscircuit": "0.0.2185",
"typescript": "^5.0.0"
}
}
40 changes: 22 additions & 18 deletions src/RK3326Breakout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ export interface RK3326PlaneFanoutConnection {
pinFunction: string
netName: string
traceName: string
busName: string
layer: typeof RK3326_GROUND_PLANE_LAYER | typeof RK3326_POWER_PLANE_LAYER
direction: RK3326FanoutDirection
}
Expand Down Expand Up @@ -435,6 +434,14 @@ export const RK3326_SUPPLY_PINS = RK3326_BALLS.flatMap((ball) => {
return supplyPin ? [supplyPin] : []
})

export const RK3326_POWER_RAIL_NETS = Array.from(
new Set(
RK3326_SUPPLY_PINS.filter(({ category }) => category === "power").map(
({ netName }) => netName,
),
),
)

export const getRK3326PlaneFanoutConnections = (
selectedSignalBusIds: readonly RK3326FanoutBusId[] = RK3326_INITIAL_FANOUT_BUS_IDS,
): readonly RK3326PlaneFanoutConnection[] => {
Expand All @@ -449,7 +456,6 @@ export const getRK3326PlaneFanoutConnections = (
pinFunction,
netName,
traceName: `PLANE_TRACE_${ball}`,
busName: `plane-${category}-${ball}`,
layer:
category === "ground"
? RK3326_GROUND_PLANE_LAYER
Expand Down Expand Up @@ -509,7 +515,10 @@ export const RK3326Breakout = ({
),
...planeFanoutConnections.map(
(connection) =>
[connection.busName, directionToAnchor[connection.direction]] as const,
[
connection.traceName,
directionToAnchor[connection.direction],
] as const,
),
])
const { sizeMm, paddingMm } = RK3326_BREAKOUT_GEOMETRY
Expand Down Expand Up @@ -538,24 +547,19 @@ export const RK3326Breakout = ({
autorouter="fanout"
busFanoutDirections={busFanoutDirections}
fanoutRoutingLayers={[...signalFanoutLayers]}
fanoutPourNetMap={{
[RK3326_GROUND_PLANE_LAYER]: "GND",
[RK3326_POWER_PLANE_LAYER]: RK3326_POWER_RAIL_NETS,
}}
/>
<RK3326 name={chipName} pcbX={0} pcbY={0} />
{planeFanoutConnections.map((connection) => (
<Fragment key={connection.busName}>
<trace
name={connection.traceName}
from={`.${chipName} > .${connection.ball}`}
to={`net.${connection.netName}`}
/>
<bus
name={connection.busName}
connections={[connection.traceName]}
fanoutTermination={{
type: "plane",
layer: connection.layer,
}}
/>
</Fragment>
<trace
key={connection.traceName}
name={connection.traceName}
from={`.${chipName} > .${connection.ball}`}
to={`net.${connection.netName}`}
/>
))}
{breakoutPoints.map(
({ ball, busId, endpointName, netName, traceName, pcbX, pcbY }) => (
Expand Down
Loading