kicad2ems.pcbqs.pdn.cli¶
python -m kicad2ems.pcbqs.pdn: a power rail's DC drop and PDN impedance from a
KiCad board (or a kicad2ems board.json).
python -m kicad2ems.pcbqs.pdn board.kicad_pcb --rail +3V3 --volts 3.3 \
--load U21=2 --load U14=1 --out pdn_3v3
python -m kicad2ems.pcbqs.pdn board.kicad_pcb --rail +3V3 --volts 3.3 \
--out pdn_3v3
# the loads: the parts' pdn.load fields
python -m kicad2ems.pcbqs.pdn board.kicad_pcb --rail +3V3 --volts 3.3 \
--spread-load 5 --out pdn_3v3
# 5 A shared by pad count
python -m kicad2ems.pcbqs.pdn --describe --json
# the options, for the GUI's PDN page
It writes <out>/pdn.json (the rail tree, each load's voltage and drop, the
series parts, the hottest vias, the plane pairs, each part's connection and
mount inductance, the impedance each load sees and where it is over the target,
the notes), <out>/z.csv, and the figures <out>/dc_power_<layer>.png,
dc_ground_<layer>.png (drop or rise, current per mm, vias by current) and
pdn_z.png. The DC solve is also written where kicad2ems's viewer reads results
(pdn/viewer.py: the board, the mesh, each layer's drop and current on a grid),
named under 'viewer' in pdn.json. Its progress goes to stdout, one line per step
('pdn: ...').
- kicad2ems.pcbqs.pdn.cli.dc_figures(board, dc, volts, out)[source]¶
dc_power_<layer>.png and dc_ground_<layer>.png for the layers carrying most of the current: the drop (or the rise), the current per mm, the vias by their current.
- kicad2ems.pcbqs.pdn.cli.droop_figure(droop, allowed, out)[source]¶
droop.png: each load's drop against time from the step, the allowed ripple marked.
- kicad2ems.pcbqs.pdn.cli.parse_loads(a)[source]¶
(loads {REF: A}, returns {REF: the part it returns through}, dcr {REF: ohms}) of the rail options --load REF=AMPS[@RETURN] and --dcr REF=OHMS.
- kicad2ems.pcbqs.pdn.cli.read_rail(a, ground, loads, returns, dcr, log=<function say>)[source]¶
The board (its rail tree's and ground's copper) and the rail (rail.Rail) of the rail options: the loads given, else the parts' own fields, else --spread-load's share. (board, rail, dict(assumed, fielded, field_notes)); the electrothermal tool's too.
- kicad2ems.pcbqs.pdn.cli.ref_values(items, flag, form, most=1)[source]¶
{REF: [values]} of REF=V[,V...] options (`most` values, each positive); SystemExit naming the bad one.
- kicad2ems.pcbqs.pdn.cli.ripple(pdn, spectra, observe, allowed)[source]¶
The ripple the loads' current spectra make on the rail where each load meets it: dict(allowed_V, highest_Hz, sources {ref: dict(file, harmonics, fundamental_Hz, largest_A)}, loads {ref: dict(pp_V, rms_V, bound, f, V, worst_f)}). spectra: {ref: (file, f Hz, complex peak amplitudes)}, the current a load draws on top of its DC. Each frequency's voltage at a load is the sum over the spectra of the transfer impedance times the current (V: its peak). It is the rail's voltage at the load's connection to the planes: a load's own pads add the L di/dt of its own current through that connection, which is its pin's voltage and not the rail's (and, for a converter whose input capacitors sit beside it, not the path its edges take: pcbqs.mqs has that loop). pp_V is the waveform's peak to peak over the period when every frequency is a harmonic of the lowest (bound False), else the bound 2 sum |V|; both are of the harmonics the files hold and no more.
- kicad2ems.pcbqs.pdn.cli.write_z(path, f, Z, names, what="the rail's impedance between the loads' connections to it")[source]¶
Touchstone v1 of the impedance matrices Z (nf, n, n) at f Hz: '# HZ Z RI R 1', its rows as Touchstone has them (a 2-port 11 21 12 22, more ports row by row, four pairs a line).