qfn_thermal_and_power_fanout module#
Thermal vias in a QFN’s exposed pad, and power pins fanned out to a plane.
The part is the RP2040 from jitxexamples.components.mcus: a 56-lead,
0.4 mm pitch QFN whose 3.1 mm square exposed pad is its only ground pin.
The board is a 4-layer substrate: parts and fanout on layer 0, a ground
plane on layer 1 and a 3.3 V plane on layer 2.
Thermal vias#
thermal_via_grid() places the largest grid of vias that fits the
exposed pad with its vias at least THERMAL_VIA_PITCH (1.1 mm) apart and
each via pad’s rim edge_margin inside the pad’s copper. The default
margin is the substrate’s min_soldermask_bridge plus its
solder_mask_registration: each via is tented by a soldermask dam that
reaches solder_mask_registration past its pad, so the dam ends one mask
bridge inside the pad edge and meets the mask frame there. On the RP2040’s
pad with this substrate’s ThermalVia, that is a 2 by 2 grid at a
2.036 mm pitch.
ThermalVia is the smallest via on the substrate’s floors: a 0.254 mm
drill, the min_drill_diameter, in a 0.56 mm pad, which leaves a
0.153 mm annular ring against the 0.1524 mm min_annular_ring. The
smallest via leaves the most of the pad open for paste.
The function refuses a via class whose via_in_pad is False and a
pitch below min_stitch_pitch (the larger of one via pad and one drill
plus min_hole_to_hole). JITX accepts a via inside a pad whose via class
disallows it without raising a design issue, so the check lives here.
ThermalVia sits inside a pad, so it declares via_in_pad = True;
confirm with your fabricator that tented, unfilled vias inside a pad are
accepted.
thermal_pad_opening() builds the soldermask and paste opening: the
pad less a frame one mask bridge wide, a web one mask bridge wide along each
row and column of vias, and a dam around each via, with every corner of what
is left rounded to half of min_soldermask_opening. The rounding drops
any part of a cell narrower than min_soldermask_opening: here the four
corner cells, where each via’s dam meets the frame, so 5 cells remain. The
same shape is the pad’s soldermask and its paste
(thermal_pad_config()), so solder lands only in those cells and
cannot wick down an open via barrel. StitchedRP2040 passes that config
to the landpattern’s thermal_pad before the RP2040 maps its pads, and
the circuit places a ThermalVia at each grid position on the ground net.
The paste covers 5.32 of the pad’s 9.61 square millimetres, 55 percent,
where the unstitched RP2040 pastes the whole pad. Check that against your
assembler’s stencil guidance for an exposed pad. The pitch sets the
tradeoff: a larger THERMAL_VIA_PITCH gives fewer vias, so fewer paths
for heat into the planes, and more paste; a smaller one gives the
reverse.
Power fanout#
The six IOVDD pins fan out to the 3.3 V plane, each through three pieces
of copper, on the rules layout_qfn_escape teaches:
An escape from the pad to a
RoutePoint1.0 mm past the pad’s outer edge. Its width isderive_escape()read from the landpattern: 0.13 mm on these 0.15 mm pads, narrower than the pad so it never comes closer to a neighbouring pad than the pads are to each other. AQfnEscapeTagon each escapeRouteand a priority-4 rule on that tag set the width.A trunk from the
RoutePointto a fanout via, atPOWER_WIDTH(0.8 mm) from the priority-2 rule on the net’sPowerTag. Both rules match the escape, and the higher priority wins there.The fanout via, a
PowerViawith a 1.0 mm pad, wider than the trunk, through every layer. On layer 2 it sits inside the 3.3 V pour and joins it.
The fanout vias are where a designer would choose to drop to the plane, so
designer_placed_fanout_points() returns them in a function of its
own: a designer would place them in the physical design view instead, and
they are written here so the example is complete.
Each plane is held by vias of its own net inside it, the thermal vias for the ground plane and the fanout vias for the 3.3 V plane. A pour with no pad or via of its own net inside it comes back empty.
All copper and mask stay at or above the substrate’s
FabricationConstraints: the escapes are 0.13 mm against a 0.127 mm
min_copper_width, both via classes meet min_drill_diameter and
min_annular_ring, the thermal via drills sit 1.782 mm apart against a
0.254 mm min_hole_to_hole, every mask web is min_soldermask_bridge
wide, and every part of the opening is at least min_soldermask_opening
across.
The test, tests/test_qfn_thermal_and_power_fanout.py, checks the grid,
the opening and the escape width offline. With JITX_PATTERN_RUNTIME=1
and a runtime started at the project root, it builds the design and measures
the realized escapes, trunks and planes.
- THERMAL_VIA_PITCH = 1.1#
The smallest centre-to-centre spacing of the thermal vias, in mm.
- FANOUT_RUN = 1.5#
From an escape’s
RoutePointto its fanout via’s centre, in mm.
- GROUND_PLANE_LAYER = 1#
The ground plane’s layer, under the parts.
- POWER_PLANE_LAYER = 2#
The 3.3 V plane’s layer.
- PLANE = Polygon(elements=((8.0, 8.0), (-8.0, 8.0), (-8.0, -8.0), (8.0, -8.0)), holes=())#
The outline of both planes, centred on the RP2040, in mm.
- DAM_SEGMENTS = 24#
Segments per quarter circle of each via’s mask dam and corner rounding.
- class FanoutSubstrate(*args, **kwargs)[source]#
Bases:
SubstrateFour copper layers with the sample fabrication constraints, a via allowed inside a pad, and a power via.
- constraints: FabricationConstraints = <jitx.sample.SampleFabConstraints object>#
- class ThermalVia(*args, **kwargs)[source]#
Bases:
ViaA through via allowed inside a pad: 0.56 mm pad, 0.254 mm drill.
- 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.56#
Pad diameter of the via, in mm. Can be overridden on a per-layer basis by
diameters.
- class PowerVia(*args, **kwargs)[source]#
Bases:
ViaA through via for the fanout: 1.0 mm pad, 0.5 mm drill.
- 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 = 1.0#
Pad diameter of the via, in mm. Can be overridden on a per-layer basis by
diameters.
- default_edge_margin(fab)[source]#
Via pad rim to exposed-pad edge: one mask bridge plus the mask registration, so each via’s dam ends one bridge inside the pad edge.
- Return type:
- Parameters:
fab (FabricationConstraints)
- thermal_via_grid(pad_size, via, fab, *, pitch, edge_margin=None)[source]#
Thermal via centres for an exposed pad, in the pad’s own frame.
Along each axis the grid holds as many vias as fit with centres at least
pitchapart and each via pad’s rimedge_margininside the pad edge (default_edge_margin()whenNone), spread evenly over that span and centred on the pad. Rows run along x, bottom row first.Raises
ValueErrorwhenviadoes not allow a via in a pad (JITX does not report one), whenpitchis belowmin_stitch_pitch(), and when the pad has no room for one via.
- thermal_pad_opening(pad_size, positions, via, fab)[source]#
The soldermask and paste opening of a stitched exposed pad.
The pad, in its own frame, less a frame
min_soldermask_bridgewide along its edge, a web of the same width along each row and column ofpositions, and a dam around each via that reachessolder_mask_registrationpast its pad. Every corner of what is left is rounded to half ofmin_soldermask_opening, which drops any part narrower thanmin_soldermask_opening. RaisesValueErrorwhen nothing of the pad is left open.
- thermal_pad_config(pad_size, positions, via, fab)[source]#
An
SMDPadConfigwhose soldermask and paste are boththermal_pad_opening().
- class StitchedRP2040(via, fab, pitch)[source]#
Bases:
RP2040ComponentThe RP2040 with thermal vias in its exposed pad.
thermal_via_positionsare the via centres in the landpattern’s frame; the circuit that places the part places a via at each.- Parameters:
fab (FabricationConstraints)
pitch (float)
- designer_placed_fanout_points(escapes)[source]#
Where each power pin’s trunk drops to the plane: one fanout via per escape,
FANOUT_RUNstraight out past itsRoutePoint.A designer would place these interactively, where the board has room for each via; they are written here so the example is complete.