board_ground_pours module#
Ground pours on every copper layer, anchored and pulled back from the edge.
A 4-layer board carries one GND pour per copper layer. Each pour is
drawn larger than the board, POUR_OUTLINE, so its realized copper is
the board’s outline less the pullback the rules ask for. Three pieces make
it work:
One pour per layer.
BoardGroundPoursreads the conductor count from the substrate of the design that uses it, so the same circuit pours every layer of a 6- or 8-layer substrate too.A same-net anchor on every layer. A pour with no pad or via of its own net inside it comes back empty, and an anchor counts only on the layers where it has copper.
gnd_anchoris a through via onGND, so one via has copper on all four layers and holds all four pours; it is sized to the substrate’smin_drill_diameterandmin_annular_ring. A via that spans only some layers holds only those layers’ pours, and the others come back empty with no design issue.The board-edge rule that
layout_edge_and_cutoutteaches:design_constraint(IsBoardEdge, AnyObject).clearance(EDGE_CLEARANCE), with its 1.5 mmEDGE_CLEARANCE.IsBoardEdgeis the outer edge of the board outline, and the rule names no layer, so it pulls back the inner layers’ pours the same distance as the outer ones. Without it the pours stop at the substrate’smin_copper_edge_space(0.5 mm on the sample fabrication constraints); the rule is the larger, so it decides.
Each pour fills the board up to that distance from its edge, on every layer.
Stitching the pours to each other with a via grid is a stitch_via rule
on a pour tag, which layout_stitched_pour teaches. Its generated vias do
not hold a pour: with no anchor of their own, stitched pours come back empty
while the rule still generates their vias. The anchor stays even on a
stitched board.
The test, tests/test_board_ground_pours.py, checks offline that every
layer has a pour and an anchor that reaches it. With
JITX_PATTERN_RUNTIME=1 and a runtime started at the project root, it
builds the design and measures each pour’s copper and its gap to the board
edge.
- POUR_OUTLINE = Polygon(elements=((25.0, 20.0), (-25.0, 20.0), (-25.0, -20.0), (25.0, -20.0)), holes=())#
Each pour’s authored outline, larger than the board on every side, in mm.
- ANCHOR_AT = (-15.0, -10.0)#
The anchor via’s position, inside every pour’s realized copper, in mm.
- class GroundPourSubstrate(*args, **kwargs)[source]#
Bases:
SubstrateFour copper layers with the sample fabrication constraints.
- constraints: FabricationConstraints = <jitx.sample.SampleFabConstraints object>#
- class THVia(*args, **kwargs)[source]#
Bases:
ViaA through via on the substrate’s floors: a 0.254 mm drill, the
min_drill_diameter, in a 0.56 mm pad, for a 0.153 mm annular ring against the 0.1524 mmmin_annular_ring.- 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 GroundPourBoard[source]#
Bases:
BoardA 40 mm by 30 mm board with 3 mm corner radii.
- shape: Shape = ArcPolygon(elements=(Arc(center=(17.0, 12.0), radius=3.0, start=0.0, arc=90.0), Arc(center=(-17.0, 12.0), radius=3.0, start=90.0, arc=90.0), Arc(center=(-17.0, -12.0), radius=3.0, start=180.0, arc=90.0), Arc(center=(17.0, -12.0), radius=3.0, start=270.0, arc=90.0)))#
The board outline shape.