layout_bga_escape module#
Step a power trace down to pass between BGA balls, with the width read from the balls.
Use this pattern when a power ball sits inside a BGA and a power trace at
the PowerTag width does not fit between the balls its escape runs past.
On a hex grid at 1.0 mm pitch with 0.5 mm pads, an escape leaving a ball
runs between two neighbouring balls whose pads are 0.5 mm apart. A 0.4 mm
power trace fits in that channel with 0.05 mm to each pad, under the
0.127 mm fab floor of the sample substrate. So the run between the balls is
a separate escape segment at a narrower width.
The mechanism is the one in layout_qfn_escape, on the same priority
ladder (net-tag rules at 2, escape segments at 4):
A rule on the net’s tag:
design_constraint(PowerTag(), priority=2).trace_width(0.4).The net routed as two code routes that meet at a
RoutePoint1.0 mm outside the package’s outer balls: the trunk from the source to the transition and the escape from the transition to the ball.A rule on a tag assigned to the escape
Routeobject, at priority 4, with the derived width. The trunk keeps thePowerTagwidth.
The escape width is derived by derive_escape() from the placed
pads, the substrate’s fab constraints and the escape clearance s_e the
caller chose (the clearance that governs the net, or a lower one at or above
min_copper_copper_space). It draws the escape’s centreline from the ball
centre to the transition and takes c, the smallest distance from that line
to any other pad. A trace of width w on that line clears every other pad by
c - w/2, so layout_qfn_escape.escape_width keeps w at most 2·(c - s_e),
below the ball’s width, rounded down to WIDTH_GRID (0.01 mm), and at or
above min_copper_width. On this part c is 0.25 mm (half the 1.0 mm
between the flanking ball centres, less the 0.25 mm pad radius). The design
writes no clearance rule, so s_e is the sample substrate’s 0.127 mm floor,
and the escape is 0.24 mm, which clears the flanking pads by 0.13 mm.
The part is PlaceholderHexBGA: a 4 by 3 ball hex grid built from
the HexBGA landpattern of the si_bga_optimization demo, at that
demo’s 1.0 mm pitch and 0.5 mm ball. The demo’s GenericHexGridBGA ties
every ball that is not a signal to GND, so it has no power ball to escape.
The power ball is at the origin, with its six neighbours 1.0 mm away; it
escapes in -x between the two outer-column balls at (-0.866, +-0.5).
Measured on jitx 4.6, building layout_bga_escape_design: the
escape realized 0.24 mm wide and the trunk 0.4 mm, the escape’s copper came
no closer than 0.13 mm to any other ball pad, and the design’s issues listed
routing as satisfied.
The test, tests/test_layout_bga_escape.py, checks the derivation and the
rules offline. With JITX_PATTERN_RUNTIME=1 and a runtime started at the
project root, it builds the design and measures each segment’s width and the
escape’s distance to the other balls.
- POWER_WIDTH = 0.4#
The power nets’ trace width (the
PowerTagwidth), in mm.
- WIDTH_GRID = Decimal('0.01')#
The grid the escape width is rounded down to, in mm.
- ESCAPE_RUN = 1.0#
From the outermost ball pad’s edge to the transition, in mm.
- POWER_BALL = (1, 2)#
row 1 counted from 0, column 2 counted from 1. It sits at the origin.
- Type:
The power ball’s (row, column) in
HexBGA.get_padterms
- OUTWARD = (-1.0, 0.0)#
The escape’s direction out of the package.
- ARC_TOLERANCE = 0.0001#
How far a polygonized ball pad may stray from its circle, in mm. The default of 0.01 mm moves the pad edge by more than the margin this derivation works to.
- class PlaceholderHexBGA[source]#
Bases:
ComponentA placeholder 12-ball hex-grid BGA. Not an orderable part.
One ball is
VDD; the rest are unused.- reference_designator_prefix: str | None = 'U'#
Reference designator prefix for this component. This will be used to generate a unique reference designator for each component of the same type.
Note
This field is a required data point for matching components between builds. If this value changes (including changing from unset to set), it will be treated as a new component, even if nothing else changes.
- VDD = Port()#
- NC = [Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port()]#
- landpattern = HexBGA(num_rows=4, num_cols=3, pitch=1.0, ball_diameter=0.5).pad_config(SMDPadConfig(copper=Ellipsis, soldermask=Ellipsis, paste=Ellipsis)).package_body(RectanglePackage(height=Toleranced(0.9, 0, 0), width=Toleranced(3, 0, 0), length=Toleranced(4.5, 0, 0)))#
- symbol = BoxSymbol()#
- pad_geometry(pad)[source]#
The pad’s copper in its landpattern’s frame, circles polygonized to
ARC_TOLERANCE.- Return type:
BaseGeometry- Parameters:
pad (Pad)
- class BgaEscape(channel_clearance, escape_clearance, width, ball_center, transition)[source]#
Bases:
objectThe derived escape for one ball, in the landpattern’s frame.
- Parameters:
- derive_escape(landpattern, target, outward, fab, *, escape_clearance)[source]#
Read the pads of
landpatternand derive the escape fortarget, leaving inoutward(an axis direction) to a transitionESCAPE_RUNpast the outermost pad edge.The width is
layout_qfn_escape.escape_widthof the ball’s width across the escape, c (the smallest distance from the centreline, ball centre to transition, to any other pad) andescape_clearance, rounded down toWIDTH_GRID. RaisesValueErroras that function does.- Return type:
- Parameters:
landpattern (Landpattern)
target (Pad)
fab (FabricationConstraints)
escape_clearance (float)
- class BgaPowerEscape[source]#
Bases:
CircuitA power source feeding a BGA ball: a trunk at the
PowerTagwidth and a derived escape between the balls.
- class layout_bga_escape_design(*args, **kwargs)[source]#
Bases:
SampleDesignThe BGA power escape on the sample board.