rf_connector_launch module#
An SMA end launch into a fenced grounded coplanar line, built in code.
A connector on each board edge launches into the line between them. The
two connectors sit 8.0 mm apart across the board, so the line turns at each
launch. Each launch has four parts: the connector placed by its exit’s shape
and direction, a straight exit of a stated length, a small ground copper
square on the inside of the turn that sets the bend, and a hyperbolic cutout
in the ground under the centre pad and the start of the exit. Between the
launches runs the grounded coplanar line of layout_cpwg_two_row_fence,
with its two rows of fence vias.
The numbers are the example’s inputs, chosen for illustration, not validated
RF performance: a 3.0 mm straight exit, a 0.2 mm square 1.0 mm off the
trace, a 1.6 mm wide cutout under the centre pad, a 2.5 mm taper, and the
launch points 20 mm apart along the board and 8.0 mm across it. The
line’s 0.3 mm trace and 0.2 mm gap come from layout_cpwg_two_row_fence,
where the 50 ohm on the structure is a label, not a solved value. That
module’s coplanar_gap puts the pour 0.01 mm beyond the 0.2 mm gap, so
the pour stands 0.21 mm off the trace on each side. The board uses the
two-layer sample substrate, 0.75 mm from top copper to bottom copper. Take
the cutout and the line from a field solver for your own stackup.
The connector#
The connector is the Würth Elektronik 60312202114514 WR-SMA end launch,
from jitxexamples.components.connectors.wurth_elektronik_60312202114514.
Its land pattern’s frame puts x = 0 on the body face and +x into the board
along the 0.61 mm centre pad, so the exit’s shape and direction come from
the part: EdgeLaunch places the connector at its own origin, and the
launch is placed with its origin on the board edge and its +x axis into the
board. The right-hand launch is the same circuit turned 180 degrees. The part
has ground pads on the top and on the bottom, so both ground pours have a
ground object on their layer and fill with no via placed to anchor them. The
part is made for a 1.6 mm board; this example uses its land pattern only.
The pads start at the board edge, closer to it than the sample fabrication
constraints’ 0.5 mm min_copper_edge_space. Land-pattern pads are placed
as drawn, and pads closer to the edge than min_copper_edge_space raise
no design issue, so confirm the edge distance with your fabricator and check
realized copper with your fabricator’s design rule check.
The straight exit#
A code route from a pad to another pad does not leave the pad along its
axis. A RoutePoint on the axis does: the route from the centre pad to it
is a straight section on the axis, as wilkinson_tree makes its port
exits. launch_point() puts it LAUNCH_LENGTH past the inner end
of the centre pad. Its position follows from the connector and the stated
length, so it is not a point a designer would move.
The exit takes the structure’s 0.3 mm width from the pad’s centre, so the
copper steps from the 0.61 mm pad to the 0.3 mm trace at the pad’s inner
end, over the cutout. The example draws no taper. To taper into the pad
instead, split the exit at a second RoutePoint near the pad, so that the
pad is the destination of the short route from that point, and give that
route Route.Config(destination_target=...), as code_route_basics
does.
The tangency square#
Past the launch point the line turns toward the other connector. Where it
bends is set by a square of ground copper on the inside of the turn
(tangency_square()): TANGENCY_SQUARE (0.2 mm) on a side, on the
signal layer, running along the axis from the launch point to 0.2 mm past
it, its near side TANGENCY_CLEARANCE (1.0 mm) off the trace’s copper
edge. The square carries TangencyTag, and
design_constraint(TangencyTag(), RFLineTag(), priority=3).clearance(1.0)
holds the line’s copper that clearance from it. The line then runs on the
axis past the square’s far edge and bends around the square’s corner on a
centre-line radius of half the trace plus the clearance, 1.15 mm. The
clearance to the square sets the bend radius: a larger clearance gives a
larger bend, with the square moved out to match.
The square has to stand the clearance off the trace’s copper. Nearer than
that, the router cannot keep the clearance on the axis and leaves the route
unrealized. A rule clearance under the structure’s own 0.2 mm loses to the
structure. The square goes on the inside of the turn only: squares on both
sides turn the line away at the launch point. The rule is at priority 3 so
that it wins over the gap rule between RFLineTag and GroundTag at
priority 2, since the square is on the ground net.
The square is copper, not a keepout. A route keepout gets no clearance from
the router, so the line’s copper runs along its edge and bends at half the
trace whatever the clearance, and a keepout with via set would also
remove the fence vias it covers. The square is on the ground net and inside
the coplanar pour, and holds other-net copper off by its rule, with no
keepout at all. Hold any other copper off the line the same way: a tag on it
and a clearance rule to RFLineTag, not a keepout.
The cutout#
A KeepOut with pour and via set, on each layer of
REFERENCE_LAYERS, voids the ground pour under the centre pad and the
start of the exit (cutout_outline()). It is a rectangle
PAD_CUTOUT_WIDTH wide from the board edge to the inner end of the centre
pad, then a taper over CUTOUT_TAPER_LENGTH that narrows to the line’s
coplanar slot (line_slot_width(): the trace and the coplanar gap on
each side, 0.72 mm). Its half-width h follows a hyperbola:
h(s) = k / (s + s0), s0 = L h1 / (h0 - h1), k = h0 s0,
with s the distance along the taper, L its length, h0 the half-width under
the pad and h1 the slot’s half-width. Here s0 = 2.045 mm and
k = 1.636 mm²: the cutout is 1.6 mm wide at the pad, 0.993 mm halfway along
the taper and 0.72 mm at its end. The outline is drawn with CUTOUT_STEPS
straight segments per side.
The pour’s edge follows the keepout’s outline. The via flag keeps the
fence vias out of the cutout, and it is the example’s guard for the first
row of the fence, nearer the trace, beside the 0.61 mm centre pad. That row’s
via pads start 0.375 mm from the centreline, so a row-1 via beside the pad
would sit 0.07 mm from it, under the sample board’s 0.127 mm
min_copper_copper_space. The example does not rely on the runtime to
keep fence vias to that floor: checked_fence_pattern in
layout_cpwg_two_row_fence records fence pads placed nearer a trace than
the floor with no issue. Over the cutout the first row is left out; the
second runs beside it.
cutout_outline() refuses a cutout too narrow to be that guard.
row_one_hold() returns the first row’s pad edge, 0.375 mm from the
centreline, and its reach: how far past the pad the first row would still
come closer than min_copper_copper_space to the pad’s corner. The cutout
must be more than 0.75 mm wide out to that distance past the pad; a narrower
one raises a ValueError that names that width. A taper that has no
length, or that ends within that reach, raises a ValueError that names
the taper, since no cutout width can then hold the first row off the pad.
The cutout must also be wider than the 0.72 mm coplanar slot it tapers to,
or it raises a ValueError that names the slot, and narrower than the
7.1 mm between the connector’s bottom ground pads. The taper is refused if
it is longer than the straight exit, since it assumes a straight trace over
it, and steps below 1 raises a ValueError that names steps.
The line#
The structure, its rule and the gap rule are layout_cpwg_two_row_fence’s
(see that module for why each is there): cpwg_structure, applied by a
routing_structure rule on RFLineTag with the ground as reference net,
and a pair rule between RFLineTag and GroundTag at the gap. The tag
sits on the RF net, so the structure shapes the exits as well as the line,
and the fence runs along both. straight_run_fence_sites in
layout_cpwg_two_row_fence gives the vias per side it accepts for each
row on a straight line between end pads. Between this line’s two bends, on a
20.28 mm run, the build held 19 vias per side in the second row, one fewer
than that count gives, so check the rows here by their gaps. The pair
rule sets the gap beside the routes but not beside the centre pad, where the
coplanar pour keeps its own pullback from the pad. Check that gap in the
realized copper against your fabricator’s minimum copper space.
The test, tests/test_rf_connector_launch.py, checks the geometry offline.
With JITX_PATTERN_RUNTIME=1 and a runtime started at the project root,
it builds the design and measures the exits, the bend around each square and
the line’s clearance to it, the cutout in the computed ground pour against
the hyperbola, the fence rows, and each fence via’s distance from the signal
copper.
- RF_LAYER = 0#
the layer
cpwg_structureis defined on.- Type:
The layer of the connector’s centre pad and the line
- REFERENCE_LAYERS = (1,)#
The ground layers under the line that the cutout voids. The sample board has one, its bottom layer.
- LAUNCH_LENGTH = 3.0#
From the inner end of the connector’s centre pad to the launch point, in mm: the length of the straight exit past the pad.
- PAD_CUTOUT_WIDTH = 1.6#
Width of the cutout under the centre pad, in mm.
- CUTOUT_TAPER_LENGTH = 2.5#
Length of the cutout’s hyperbolic taper, from the inner end of the centre pad along the exit, in mm.
- CUTOUT_STEPS = 32#
Straight segments the taper’s outline is drawn with, per side.
- TANGENCY_SQUARE = 0.2#
Side of the ground copper square that sets each bend, in mm.
- TANGENCY_CLEARANCE = 1.0#
Clearance from the line’s copper to each square, in mm. The square’s near side stands this far off the trace’s copper edge, and the line bends around the square’s corner on a centre-line radius of half the trace plus this.
- LINE_LENGTH = 20.0#
Distance along the board between the two launch points, in mm.
- LAUNCH_OFFSET = 8.0#
Distance across the board between the two connectors’ axes, in mm. The line turns at each launch point to cover it.
- BOARD_WIDTH = 20.0#
Board size across the line, in mm.
- BOARD_LENGTH = 29.939999999999998#
the line and a launch at each end. Each connector’s body face sits on a board edge.
- Type:
Board size along the line, in mm
- POUR_INSET = 0.5#
the sample fabrication constraints’
min_copper_edge_space.- Type:
How far inside the board edge the ground pours stop, in mm
- MIN_COPPER_SPACE = 0.127#
The sample fabrication constraints’ minimum copper-to-copper space, in mm: the floor fence row 1 has to keep from the centre pad.
- line_slot_width()[source]#
Width of the line’s coplanar slot on the signal layer, in mm: the trace and the coplanar gap on each side, as
coplanar_gapgives it for the line’s structure and pair rule.- Return type:
- cutout_half_width(s, start, end, length)[source]#
Half-width of the cutout’s taper
smm along it, narrowing fromstarttoendoverlength, in mm.The outline is a hyperbola, h = k / (s + s0), so 1 / h changes linearly along the taper.
- row_one_hold()[source]#
Where the cutout has to hold fence row 1 off the centre pad.
Returns
(edge, reach), in mm.edgeis how far row 1’s via pads start from the centreline, fromfence_row_centreand the fence via’s pad.reachis how far past the inner end of the centre pad a row-1 pad would still come closer thanMIN_COPPER_SPACEto the pad’s corner. Up toreach, the cutout’s half-width has to exceededge, so that every row-1 site there touches the cutout’s via keepout. Areachof 0 means row 1 clears the centre pad by itself.
- cutout_outline(pad_cutout_width=1.6, taper_length=2.5, steps=32)[source]#
The cutout’s outline in the connector’s frame: x = 0 on the board edge, +x into the board along the centre pad.
A rectangle
pad_cutout_widthwide under the centre pad, then the hyperbolic taper overtaper_length, instepsstraight segments, down toline_slot_width(). RaisesValueErrorfor fewer than one step; for a taper with no length, or one that ends within the reach ofrow_one_hold(), where no width holds fence row 1 off the centre pad; for a taper longer than the straight exit; for a cutout no wider than the line’s coplanar slot, which would not narrow; for one too narrow to hold fence row 1 off the centre pad; and for one as wide as the gap between the connector’s ground pads.
- launch_point()[source]#
The launch point in the connector’s frame: on the centre pad’s axis,
LAUNCH_LENGTHpast the pad’s inner end. It is fixed by the connector and the stated length.
- tangency_square(side)[source]#
The square that sets the bend past the launch point, in the connector’s frame, on
sideof the axis (1 for +y, -1 for -y): the inside of the turn. It runs from the launch point toTANGENCY_SQUAREpast it along the axis, its near sideTANGENCY_CLEARANCEoff the trace’s copper edge.
- class TangencyTag[source]#
Bases:
TagCopper the line keeps
TANGENCY_CLEARANCEfrom: the squares that set its bends.
- class EdgeLaunch(turn=1)[source]#
Bases:
CircuitOne end launch, in the connector’s frame: the connector, its straight exit to the launch point, the tangency square past it and the cutout under the pad. Place it with its origin on the board edge and its +x axis into the board.
turnis the side the line turns to past the launch point, 1 for the connector’s +y and -1 for its -y; the square goes on that side.rfis the signal, joined to the centre pin and the launch point. ConnectGNDto the board ground; the square is on that net.- Parameters:
turn (int)
- rf = Port()#
- GND = Port()#
- class ConnectorLaunchLine[source]#
Bases:
CircuitA launch on each board edge and the fenced coplanar line between their launch points.