hex_bga_escape module#
Escape differential pairs from a hex-grid BGA: a narrow pair through the ball field and the full pair outside it.
HexBgaEscape takes two differential pairs out of a 7 by 8 hex-grid BGA
on a four-layer board to a two-lane chip 15 mm away. The BGA uses the
HexBGA landpattern of the si_bga_optimization demo, at that demo’s
1.0 mm ball pitch and 0.5 mm ball. Every ball that is not a signal is on
GND.
Vias. Each GND ball has a through via in its pad, GroundVia, which
joins the ball to the ground planes on layers 1 and 3. Each signal ball has a
blind via in its pad, SignalVia, from the top layer to layer 2, where the
pairs route as stripline between the two planes. Both are placed in code at
the ball centres, as the demo places them: they are via-in-pad on chosen
balls, which no via rule expresses. The far chip’s pads take a SignalVia
each the same way.
The ball field. On layer 2 the pair runs down the channel between two columns of ground vias. Hex columns sit 1.0 mm x sqrt(3)/2 = 0.866 mm apart and each via pad is 0.3 mm across, so the channel between pad edges is 0.866 - 0.3 = 0.566 mm. A pair needs its two traces, its pair gap and its clearance on each side. The full pair takes 2 x 0.15 + 0.15 + 2 x 0.15 = 0.75 mm, which does not fit; the neck takes 2 x 0.08 + 0.1 + 2 x 0.08 = 0.42 mm, which does. So through the field the pair takes the neck structure and outside it the full one. For another part, redo the sum with its pitch, its via pad and your structures.
Narrowing by tag. Two routing structures do it, and the rules that apply
them are the ones layout_routing_structure_by_tag teaches, with that
pattern’s tags:
design_constraint(SignalTag(), priority=2).routing_structure(full, ref_net=GND)on each pair’s net gives every section the full structure.A
PairPointjust outside the field splits the coupled route in two. The inner section, from thePairInsertionbelow the pair’s balls to thatPairPoint, carriesEscapeNeckTag, anddesign_constraint(EscapeNeckTag(), priority=4).routing_structure(neck, ref_net=GND)gives it the neck structure. The uncoupled legs from the two vias to the insertion carry the same tag, so they take the neck structure’s uncoupled region. The higher priority wins where both rules match.
layout_bga_escape passes a power trace between the balls of the same
HexBGA with a narrower trace_width. A differential pair needs its
trace width, pair gap and clearance to change together and the two traces
to stay coupled, which a routing structure carries and a trace_width
rule does not, so this pattern narrows with structures.
The change happens at the PairPoint. The point’s own copper, centred on
it, changes from the neck’s trace width to the full pair’s, so the neck
route ends and the full route starts within about 0.1 mm of it. The
point sits TRANSITION_MARGIN below the field’s lowest ball edge, far
enough that the full pair clears the last ground vias. Without the neck
rule, the routes through the field are not made: the issues report “Unable
to find path for requested route”.
A DifferentialRoutingStructure with an uncoupled_region and a
PairInsertion at the field edge also narrows the pair, but its legs run
uncoupled through the field and their gap drifts. A split at a PairPoint
keeps the pair coupled at the neck structure’s gap, which is why this
example uses it.
Fabrication limits. The neck, 0.08 mm traces 0.1 mm apart with 0.08 mm
clearance, is below the 0.127 mm floors of the sample fabrication
constraints, and a pair with all three at those floors, 5 x 0.127 =
0.635 mm, does not fit the 0.566 mm channel: the issues report “Unable to
find path for requested route”. So the substrate states the limits of the
HDI fabricator this board assumes, HdiFabConstraints (0.075 mm line
and space, 0.15 mm drill), and every structure stays at or above them. A
routing structure takes precedence over the fabrication minimums and routes
at its own widths without raising an issue, so keeping it at or above the
floors is the designer’s job; check realized copper with your fabricator’s
design rule check.
Control points. The insertion point below each pair’s balls and the
PairPoint at the field edge are fixed by the ball geometry. The bend that
takes each full pair across to the chip’s lane, and the insertion where the
pair splits for the chip’s pads, are choices a designer would make in the
physical design view: they come from designer_placed_chip_side(),
in code so that the example builds complete. JITX’s layout API refuses to
move a PairInsertion or PairPoint placed in code, so in a real
design leave these out of the code and place them in the view.
Structure labels. Each structure needs an impedance, and
Substrate.differential_routing_structure looks structures up by it, as
jitxlib’s protocol constraints do. The neck carries 0 ohm so that no
lookup for a real impedance returns it: a lookup for the pair’s 100 ohm
returns the full pair.
The widths here are illustrative, not solved for an impedance.
The test, tests/test_hex_bga_escape.py, checks the geometry offline: the
full pair does not fit the channel and the neck does, the transition clears
the field, and a ground via sits at every ground ball. With
JITX_PATTERN_RUNTIME=1 and a runtime started at the project root, it
builds the design and measures each section’s width and gap, where the
transition falls, and that every route is made.
- PAIR_BALLS = (((2, 4), (2, 3)), ((2, 6), (2, 5)))#
rows counted from 0, columns from 1. P is on the column offset half a pitch down, so P and N are neighbours 1.0 mm apart across the channel the pair escapes down.
- Type:
Each pair’s (P, N) balls as
HexBGA.get_pad(row, column)
- ESCAPE_LAYER = 2#
The stripline layer the pairs route on, between the planes on 1 and 3.
- PLANE_LAYERS = (1, 3)#
The ground plane layers.
- INSERTION_DROP = 0.25#
From the lower ball of a pair to the
PairInsertionwhere its legs join, in mm.
- TRANSITION_MARGIN = 0.5#
From the field’s lowest ball edge to the
PairPointwhere the neck ends, in mm.
- CHIP_INSERTION_RISE = 2.0#
From the far chip’s pads to the
PairInsertionabove each lane, in mm: a designer’s choice, used bydesigner_placed_chip_side().
- VELOCITY = 191335235228#
illustrative.
- Type:
Signal velocity for both structures, in mm/s
- INSERTION_LOSS = 0.0178#
illustrative.
- Type:
Insertion loss for both structures, in dB/mm
- class FourLayerStackup[source]#
Bases:
SampleStackupThe sample stackup with four copper layers.
- class HdiFabConstraints[source]#
Bases:
SampleFabConstraintsThe limits of the HDI fabricator this board assumes: 0.075 mm (3 mil) line and space, 0.15 mm drills with a 0.075 mm annular ring. Not any one fabricator’s figures; take yours from its capability sheet.
- min_copper_width: float = 0.075#
Minimum permissible copper width. This constraint will be enforced by the engine for generated copper shapes and will take precedence over other constraints and rules, such as trace width.
- min_copper_copper_space: float = 0.075#
Minimum permissible copper-to-copper spacing. This constraint will be enforced by the engine for generated copper shapes and will take precedence over other constraints and rules, such as clearance.
- class HexEscapeSubstrate(*args, **kwargs)[source]#
Bases:
SubstrateFour copper layers, the HDI fabrication limits, the two vias and the two pair structures.
- constraints: FabricationConstraints = <jitxexamples.patterns.hex_bga_escape.HdiFabConstraints object>#
- class GroundVia(*args, **kwargs)[source]#
Bases:
ViaThrough via in each ground ball’s pad.
- start_layer: int = 0#
Starting layer for the via. Setting this to a layer index other than the top layer allows for creating buried or blind vias.
- diameter: float | ViaDiameter = 0.3#
Pad diameter of the via, in mm. Can be overridden on a per-layer basis by
diameters.
- class SignalVia(*args, **kwargs)[source]#
Bases:
ViaBlind via in each signal pad, from the top to the escape layer.
- start_layer: int = 0#
Starting layer for the via. Setting this to a layer index other than the top layer allows for creating buried or blind vias.
- diameter: float | ViaDiameter = 0.3#
Pad diameter of the via, in mm. Can be overridden on a per-layer basis by
diameters.
- FULL_PAIR = DifferentialRoutingStructure(name='Full pair', impedance=<Quantity(100, 'ohm')>, layers={2: Layer(trace_width=0.15, pair_spacing=0.15, clearance=0.15, velocity=191335235228, insertion_loss=0.0178).reference(1, 1.0).reference(3, 1.0)}, uncoupled_region=RoutingStructure(name='Full pair, uncoupled', impedance=<Quantity(50, 'ohm')>, layers={2: Layer(trace_width=0.15, clearance=0.15, velocity=191335235228, insertion_loss=0.0178).reference(1, 1.0).reference(3, 1.0)}))#
0.15 mm traces, 0.15 mm apart, 0.15 mm clearance.
- Type:
The pair outside the field
- NECK_PAIR = DifferentialRoutingStructure(name='Neck pair', impedance=<Quantity(0, 'ohm')>, layers={2: Layer(trace_width=0.08, pair_spacing=0.1, clearance=0.08, velocity=191335235228, insertion_loss=0.0178).reference(1, 1.0).reference(3, 1.0)}, uncoupled_region=RoutingStructure(name='Neck pair, uncoupled', impedance=<Quantity(50, 'ohm')>, layers={2: Layer(trace_width=0.08, clearance=0.08, velocity=191335235228, insertion_loss=0.0178).reference(1, 1.0).reference(3, 1.0)}))#
0.08 mm traces, 0.1 mm apart, 0.08 mm clearance. Its 0 ohm is a label that keeps impedance lookups on the full pair, not an impedance.
- Type:
The pair in the field
- class EscapeHexBGA[source]#
Bases:
ComponentA placeholder 56-ball hex-grid BGA with two differential pairs. Not an orderable part.
lanes[i]is on the ballsPAIR_BALLS[i]; every other ball isGND.- 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.
- lanes = [DiffPair(), DiffPair()]#
- GND = [Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port()]#
- landpattern = HexBGA(num_rows=7, num_cols=8, pitch=1.0, ball_diameter=0.5).pad_config(SMDPadConfig(copper=Ellipsis, soldermask=Ellipsis, paste=Ellipsis)).package_body(RectanglePackage(height=Toleranced(0.9, 0.1, 0.1), width=Toleranced(7, 0, 0), length=Toleranced(7.5, 0, 0)))#
- symbol = BoxSymbol()#
- pad_centre(pad, origin)[source]#
A landpattern pad’s centre in the circuit’s frame, for a part placed at
originwith no rotation.
- designer_placed_chip_side(transitions, lanes)[source]#
Each pair’s bend and chip-side insertion, as (bend, insertion).
lanesare the midpoints of each chip lane’s two pads. A designer places these points in the physical design view, where the board’s other routing shows what they have to clear. They are written here so the example builds complete: the insertionCHIP_INSERTION_RISEabove the lane’s pads, and the bend halfway down from the transition to it, on the lane’s centreline.
- class HexBgaEscape[source]#
Bases:
CircuitTwo pairs from a hex-grid BGA to a two-lane chip, narrowed in the ball field.
- attachments: list[PortAttachment]#
- insertions: list[PairInsertion]#
- chip_insertions: list[PairInsertion]#