Whole-board studies¶
How the whole-board results were made, what each setting does and why it has the value it has, and how to make
each result again. The method itself (vias as ports, each signal layer over ideal planes, the pieces joined as one
network) is in Signal integrity: a board in pieces; the code is kicad2ems.core.segment; the scripts named
here are in tools/segment_studies/ (fetch_boards.sh gets every board below at the commit used).
The boards¶
Board |
Source (commit) |
Layers |
Selection |
Notes |
|---|---|---|---|---|
Raspberry Pi CM5 carrier (“CM5 Minima”) |
the user’s own board (not public) |
4 |
36 high-speed nets (18 pairs) |
the first board in pieces |
Antmicro Baseboard for Jetson AGX Thor, rev 1.1.0 |
antmicro/jetson-agx-thor-baseboard ( |
10 |
every differential pair’s legs: 288 nets, |
the scale target: 22k tracks, 3.3k vias |
LimeRFE 1v31 |
myriadrf/LimeRFE ( |
6 |
470 RF nets, |
KiCad 4, no stackup: |
HackRF Opera Cake |
greatscottgadgets/hackrf ( |
4 |
|
KiCad 4, no stackup: |
LibreVNA |
jankae/LibreVNA ( |
6 |
the project’s |
a 6 GHz VNA: LO and source chains, switches, the reference clock fan-out |
ThunderScope Rev 5.3 |
EEVengers/ThunderScope ( |
6 |
high speed: |
a 4-channel 1 GS/s scope: ADC LVDS lanes, PCIe, the analogue front end; its outer prepregs differ (0.100 / 0.111 mm): the stack is not mirror-symmetric |
The KiCad 4 boards needed the importer to map their renamed copper layers (T, GND, C1F: by number to F.Cu,
Inn.Cu, B.Cu), close their hand-drawn outlines (loose ends within 0.1 mm joined; the face the parts are on is the
board, not a panel’s frame) and cut stale zone fills back from other nets’ copper (a fill saved before a track was
routed). Their stackups come from the projects’ documents (add_stackup.py says which and what was assumed).
The settings, and why¶
Setting |
Default |
Why (the measurement) |
|---|---|---|
|
fine |
trace edge rings are 80 % of a long bus’s unknowns: a CM5 piece 28,964 → 3,941, its through paths within 0.07 dB. Not with |
|
the layer solver |
the physics-based via model ( |
|
sides |
no side unknowns (a fine mesh at 10 mm of pour: 51k unknowns, 7.4k of them sides) |
stripline groups |
3 plane spacings |
crosstalk falls as exp(−π s / b); microstrip’s 20 heights chained a 54-net bus |
|
24 nets |
a bigger group is grouped closer, down to 2 spacings (stripline) or 10 heights (microstrip), and says so |
stitching vias in stripline pieces |
within 1 mm ( |
without them the two ideal planes carry a parallel-plate mode: −40 to −46 dB coupling at any distance; with them −67 dB median beyond 1.5 mm |
windows ( |
groups past 32 nets |
a core of ≤ 6 nets and its neighbours within the group’s spacing; the Thor’s In7 bus 11,920 s → 1,103 s, through paths within 0.05 dB |
a window’s core ports driven alone ( |
on |
mom25d |
series parts as joints |
— |
an AC-coupling capacitor or resistor between pieces as its own R, L, C two-port: a lane through its capacitor is one channel |
|
off |
a GCPW line’s coplanar ground: without it LimeRFE’s return loss was up to 10 dB off |
|
1.5 mm |
the pour kept this far from the piece’s copper; 3 mm: |dS| 0.006, 1.5 mm: 0.007 against the pour to 6 mm on a fine mesh |
|
1.5 mm |
with the pour kept, GCPW nets 1.5 mm and more apart coupled at −68.6 dB median (−48.5 at worst) |
small pieces in parallel ( |
cores / 4, at most 6 |
pieces of ≤ 8 ports and < 30 mm² of signal copper on the CPU beside the big ones on the GPU; each |
a small piece’s memory ( |
3 GB |
its share ( |
OOMPolicy=continue in the commands below: systemd’s default for a scope stops every process in it when the kernel
kills one, and a piece’s process (its oom_score_adj raised) is the one it kills; the study then runs that piece
again at the end.
The Thor carrier (10 layers, 288 nets)¶
tools/segment_studies/fetch_boards.sh boards
NETS=$(python tools/segment_studies/select_nets.py pairs boards/jetson-agx-thor-baseboard.kicad_pcb)
systemd-run --user --scope -p MemoryMax=24G -p MemorySwapMax=0 -p OOMPolicy=continue \
python -m kicad2ems.core.segment boards/jetson-agx-thor-baseboard.kicad_pcb --nets "$NETS" \
--edges coarse --via-solver pbm --thickness grow --dmax 0.5 --fmin 0.1 --fmax 10 --points 201 --out seg
Result (2026-11-21, RX 7800 XT, 31 GB): 59 min, 12.7 GB peak; 92 channels (pairs, each through its AC-coupling
capacitors), 368 ports, 95 layer pieces (27 of them windows) and 140 via models, every channel connected; median
loss −0.33 / −1.05 / −2.41 dB at 1 / 5 / 10 GHz, the worst crosstalk 0.83 % NEXT (DP3.TX2). Outputs: the
Touchstone file, segment.json (each channel’s figures and curves), <board>_overlay.html (the channels coloured
by a chosen figure, opened from the disk), <board>_couplings.png (the worst-coupled pairs on the board) and
<board>_coupling_profiles.png (where along each victim it comes from: the local backward-coupling coefficient).
That run predates the core-port excitation, --lean and the parallel small pieces.
Its time since (RX 7800 XT, the same run): 39:30 (2026-11-22), 38:08 (2026-11-23, the GPU’s float-float
products), 28:14 (the causality check and mixed-mode conversion as matrix products, no second write of a piece’s
board), 24:33 (a piece’s file with the primitives near it alone); every channel’s figures within 0.04 dB of the
first.
What it took, in order (each is in the CHANGELOG with its numbers):
the layer pieces kept only their two adjacent planes, as whole sheets (a split plane above a stripline had been meshed: 626k unknowns → 28k);
stripline grouping at 3 spacings, the group cap, then windows;
stitching vias in stripline pieces (the parallel-plate floor, found with
coupling_vs_gap.py);mom25d on the GPU: the double Z only where it fits beside kept factors (a spilled one ran past the driver’s watchdog:
VK_ERROR_DEVICE_LOST); big networks’ figures capped; the join a frequency at a time as a sparse network (39 GB dense);coupling.modalas two products (its einsum never finished at 568 ports);channels: a lane through its AC capacitor is one channel; its ends on two different parts; series parts as joints between pieces;
connectivity, found by
unrouted()(a pre-solve check that each channel’s ports are joined through cuts on its own nets): a via in a connector’s pad kept; via circles’ holes filled and touches not cut; cut ports clear of the circle; pad ports on the layer their track meets; each net cut by its own vias’ circles only (a lane past the SoM connector’s 28-via group had been chopped into stubs: −39 dB); a part’s pad in a via’s circle given to the via model.
Checks behind it:
windows against whole groups: run once with
K2E_SEG_WINDOW=0, once as is, thencompare_results.py whole/segment.json windows/segment.json: insertion loss within 0.04 dB on 91 channels, each victim’s worst crosstalk within 0.008 points;the line model as a stand-in for a big stripline piece (
--layer-solver lines): its loss within 0.1–0.5 dB of mom25d, but it couples only traces within 5 heights: 244 of 248 lane-to-lane couplings above −50 dB missing. Set aside for crosstalk;the sweep with each entry’s delay taken out (
afs_delay_replay.pyon the In7 piece’s result): 72 solves without, the 80 cap unconverged with: the set-valued fit’s poles are common to all entries. Set aside.
LimeRFE (6 layers, RF front end, 470 nets)¶
NETS=$(python tools/segment_studies/select_nets.py rf-wide boards/Lime_RFE.kicad_pcb)
systemd-run --user --scope -p MemoryMax=24G -p MemorySwapMax=0 -p OOMPolicy=continue \
python -m kicad2ems.core.segment boards/Lime_RFE.kicad_pcb --nets "$NETS" --pour keep --thickness grow \
--fmin 0.1 --fmax 6 --points 201 --out lime
Its RF lines are 50 Ω GCPW (0.79 mm, 0.25 mm gaps) on 20 mil RO4350B over the GND layer (top) and the PWR layer (bottom). The 470 nets chain through their series parts into 178 channels (a ladder filter’s series L and C as joints, its shunt capacitors to the kept pour in the mesh); 291 layer pieces and 25 via models.
The pour check (11 nets of the high-band receive section, 0.1–6 GHz; the reference: the pour to 6 mm, fine mesh
everywhere, K2E_SEG_POUR_REACH=6 K2E_SEG_POUR_ZONE=off ... --pour keep, 33,659 unknowns, 32 min):
unknowns |
time |
max |dS| |
S11, median difference |
|
|---|---|---|---|---|
pour dropped |
5,937 |
17 s |
0.137 |
2.0 dB (up to 10 dB) |
pour kept, 3 mm, one group |
14,378 |
57 s |
0.006 |
0.05 dB |
pour kept, 1.5 mm, grouped 1.5 mm apart |
13,600 in 6 pieces |
27 s |
0.007 |
0.2 dB |
pour kept, coarse edges |
6,464 |
15 s |
0.080 |
2.3 dB |
The whole region solved as one ordinary run did not fit (a 157 GB matrix: every pour on every layer). On a GCPW
test line (gcpw_pour_study.py) the whole pour with the signal zone was the cheapest (3,929 unknowns, |dS| 0.004):
the pour’s area costs little, its edges and vias do.
Left out, by the run itself (said in its log): channels whose port has no reference copper (two legs of a
bottom-side SAW duplexer over a void in the PWR layer), and channels whose copper overlaps another net’s in the file
(the 30 MHz RX line over a relay’s pad; 84 net pairs touching the RF nets overlap: a KiCad 4 file whose nets were
renamed out of step with its tracks); series parts not fitted (‘NF’, ‘0RNF’ in their value: R90, R93, R374, R375, not assembled per the BOM)
leave their chains open, as on the board. Its parts’ values are written <value>_<package>_<part number>
(1000pF_0402_GRM1555C1H102FA01D), its ferrite beads FB_600R_... (600 ohm); checked against
hardware/1v31/BOM/Lime_RFE_1v31.xls, every series part on its RF chains is modelled but two on supply nets
(a 100 uH and a 2.2 uH with no value in the file).
Result (2026-11-23, RX 7800 XT, 31 GB): the whole board for the first time: 318 ports, 292 layer pieces and 25
via models, 684 cuts (44 left open: their legs’ other side in no piece, as the run warns). A fresh run solved 316 of
the 317 pieces in 1:17:27 (on that evening’s code, before the GPU products and the faster matrix build); the
33k-unknown F.Cu piece where several RF paths meet then solved in 207 s (13 solves, its loop/tree basis on the
matrix’s half, the GPU’s factor from the double half) where it had been OOM-killed twice; with every piece cached
the join and report take 8.4 min. 151 channels: 93 through (median insertion loss -0.01 / -0.13 dB at 1 / 5 GHz,
return loss -28.8 / -16.8 dB; the worst at 5 GHz are band filters rejecting there, |S11| near 0 dB), 21 open
(series parts not fitted or unvalued, the KiCad 4 file’s nets out of step with its tracks). Crosstalk for a 100
ps edge: up to 4.7 % NEXT (/TX_H2/PA4000/RF_OUT from /TX_H2/LPF3500/OUT); one far-end figure of 37.7 %
(Net-(C120-Pad1) from /30MHz_TX) is to be checked against the file’s overlapping nets before it is believed.
Four faults surfaced on the way, each fixed (CHANGELOG 2026-11-23): two ports at one place (a doubled track; two
parts’ pads under one wide copper), a mesh refinement’s duplicate point, the join’s one-sided cuts, the report’s
chain-shared end ports.
LibreVNA (6 layers, 134 RF nets)¶
NETS=$(python tools/segment_studies/select_nets.py netclass boards/librevna.kicad_pcb RF)
systemd-run --user --scope -p MemoryMax=23G -p MemorySwapMax=0 -p OOMPolicy=continue \
python -m kicad2ems.core.segment boards/librevna.kicad_pcb --nets "$NETS" --pour keep --thickness grow \
--fmin 0.1 --fmax 6 --points 201 --out librevna
Result (2026-11-22, RX 7800 XT, 31 GB): 30:44, 19.7 GB peak (the scope’s); 87 ports, 94 layer pieces and 24 via
models, 245 cuts; three pieces gave their memory share back and ran alone at the end. The switch, source and LO
fan-out paths lose 0.1-0.5 dB at 5 GHz (RF_HBLB_SWITCH -0.07, SOURCE_LOWBAND -0.18, PORT1SRC -0.28), the
reference-clock fan-out couples up to 2.9 % NEXT (CLKOUT from CLKIN). Open by the model, not the board:
chains through parts it does not model read -50 to -85 dB with |S11| near 0 dB: ferrite beads (value FERRITE),
the PAT0816-C-3DB-T5 3 dB attenuator chips (an R designator, a part number for a value), DNP options, and
chains that end on an amplifier’s or mixer’s pins (Net-(IC22-IN+), Net-(IC33-OUT+)). Again on 2026-11-23 (the GPU’s float-float products, the faster matrix build, the
loop/tree basis on the matrix’s half): 19:48 against 30:44, the largest process 6.9 GB against 11.1; every channel’s
figures the same (insertion loss at 1 / 3 / 5 GHz within 0.002 dB for 90 % of them, crosstalk within 0.022 %) but
the one chain through REFLO1’s via, whose box had one ground via and is the physics-based model’s now
(Net-(IC33-LO+): -18.6 -> -15.3 dB at 5 GHz).
ThunderScope Rev 5.3 (6 layers)¶
NETS=$(python tools/segment_studies/select_nets.py netclass boards/thunderscope.kicad_pcb LVDS_ADC,LVDS_ADC_CLK,PCIe)
systemd-run ... python -m kicad2ems.core.segment boards/thunderscope.kicad_pcb --nets "$NETS" --edges coarse \
--via-solver pbm --thickness grow --dmax 0.5 --fmin 0.1 --fmax 10 --points 201 --out ts_hs
NETS=$(python tools/segment_studies/select_nets.py netclass boards/thunderscope.kicad_pcb FE_50Z,FE_50Z_INPUT,FE_100Z_Diff)
systemd-run ... python -m kicad2ems.core.segment boards/thunderscope.kicad_pcb --nets "$NETS" --pour keep \
--thickness grow --edges coarse --fmin 0.01 --fmax 3 --points 201 --out ts_fe
High speed (2026-11-22): 15:12, 16.7 GB peak; 72 ports, 20 layer pieces, 23 via models (pbm). The ADC’s LVDS
lanes lose 0.4-0.6 dB at 5 GHz and 0.9-1.5 dB at 10 GHz, their worst NEXT 0.96 % (D4A from D4B). The PCIe
lanes read 3-8 dB at 5 GHz with |S11| -2 to -5 dB: three of their legs had no reference copper under a port (left
out, said in the log) and the edge fingers’ ground is cut away under them; a check against the connector’s own
model is not done. The B.Cu pieces are turned over onto In4.Cu: before 2026-11-22 every second one had its
dielectrics turned back (the stack is not mirror-symmetric here) and failed its port check.
Front end (2026-11-22): 5:47, 9.3 GB peak; 80 ports, 46 layer pieces. Its band ends at 3 GHz (the table’s 5
and 10 GHz columns repeat 3 GHz). The four ADC differential channels fan in to one point and with their kept pour
were one piece of 100,537 unknowns on the fine edge mesh (70 GB compressed): --edges coarse made it 14,584. The
ADC driver outputs lose under 0.1 dB, the attenuator paths 0.45-0.6 dB at 3 GHz, the four channels alike; the 50x
attenuator inputs are open through relays the model does not have. Again on 2026-11-23 (2:48, 4.1 GB): the four BNC
inputs, which had read open (-67 dB, put down to the relays), lose 0.07 / 0.19 dB at 1 / 3 GHz, return loss -20 / -16
dB: their via models’ ports, on the BNC’s through-hole pads, had taken the pad’s own copper as their reference (the
meshed box then open); those via models are the physics-based model’s now (CHANGELOG 2026-11-23).
Current maps¶
tools/segment_studies/current_maps.py GHZ -- <the run's own arguments> draws a finished run’s surface current, each
layer, at one frequency, without solving its sweeps again:
the network is rebuilt from the run’s folder (each piece read back by its hash);
every chain is driven at once from its start (the end whose net reads as an input,
RF_IN, else its first port;--startsnames them by hand; 1 W each, in phase, the other ends matched) and the waves at every cut solved (--mode power: each chain alone, the maps’ powers summed);each layer piece is built again from its board file and its run’s settings and solved once at that frequency (its S checked against the run’s: within 1e-6 to 4e-5 on the LimeRFE’s high-band receive section), its currents weighted by its ports’ voltages.
The map is |J| in dB of its 99.5th percentile over the selected nets’ tracks (<name>_starts.txt lists each chain’s
start and ends); the via models (no mesh) are marked. With --animate N (36 by default) it also writes one cycle at
the frequency, the instantaneous current |Re(J e^(jφ))| on a linear scale (1: the copper’s 90th-percentile
amplitude), as an MP4 and a GIF a layer. On a LimeRFE section of 11 nets at 2.4 GHz it took 55 s, the coplanar ground’s return
current 20-35 dB under the lines’.
Making a result again¶
tools/segment_studies/fetch_boards.sh boards(the boards at the commits above, the stackups added).The commands above;
K2E_SEG_*as in the settings table to reproduce a variant.The checks:
compare_results.pybetween two runs,coupling_vs_gap.pyon a piece,gcpw_pour_study.py,afs_delay_replay.py;tools/mom25d_ldl_trial.py PIECE_board.json 0.3,1,2,3,6 --zone --lt-below 1e-3(a symmetric factor as the preconditioner; a piece’s board file is in its folder under the run’s output); the terminated-port solve is a test (tests/mom25d/test_kicad2ems.py,test_terminated_ports_drive_a_few).
Timings are this machine’s (RX 7800 XT, i7-13700K class CPU, 31 GB); the ROADMAP has what would make them shorter.