kicad2ems.core.timedomain¶
A channel in time: its TDR, its step response and its eye for a bit pattern at
a data rate, from its S-parameters through a passive macromodel
(core.macromodel), driven and received by behavioural or IBIS buffers
(core.ibis).
python -m kicad2ems.core.timedomain board.kicad_pcb --near P1 --far P2 \
--rate 5 --out out/td # the line model's S
python -m kicad2ems.core.timedomain --sparams ch.s4p --near P1 --far P2 \
--near-n P3 --far-n P4 --rate 8 --driver ibis --ibis part.ibs \
--ibis-model DQ_34 --receiver ibis --ibis-rx IN_DQ --out out/td
The S-parameters: a Touchstone file (--sparams; a segment result, a measured
one), a run's folder (--from: its Touchstone, the solver named first), or the
board solved here (--solvers, the line model by default) on a grid down to
fmax / points. The channel is the near port (and, a pair, --near-n) to the far
one; every other port is terminated in its reference. A pair is driven by two
complementary drivers and received across the legs (a termination split: each
leg half of it to Vtt).
- TDR: a step of --rise behind each near port's reference (a pair: odd),
the impedance it sees, Z = z0 V / (E - V) (a pair's 2 z0 Vd / (2 - Vd)),
against the round trip's time.
- Step: one edge of the driver, the far end's delay (50 % to 50 % from the near
end), its 10-90 % rise and overshoot.
- Eye: a PRBS at --rate after the first bit has settled the channel, folded
at the far end's latency (the step's): the inner height at the best phase,
the width at the threshold (the levels' middle), the levels; every other
port's peak (time-domain crosstalk).
- BER: the statistical eye of a lone bit's response (every pattern of the
other bits), with Gaussian noise at the receiver (--noise) and jitter on the
sampling instant (--rj Gaussian about --dj's dual-Dirac): BER contours, the
eye's height and width at --ber, the bathtub, TJ = DJ + 2 Q RJ. Exact for
linear buffers; IBIS ones' linearization about the lone bit.
What it leaves out: equalization (CTLE, FFE, DFE), IBIS-AMI, jitter on the
transmitted edges as such (the sampling instant's stands for it), a floating
differential termination (split per leg to Vtt), the driver's own supply
noise.
- class kicad2ems.core.timedomain.TimeDomain[source]¶
A channel in time: TDR, step and eye (this module).
- check_with(sets)[source]¶
(usable, one line) of one of its variants (the settings `sets` fixes): its own check.
- command(values, board, out, preview=False, results=None)[source]¶
[program, argument ...] that runs it into folder `out`; ValueError: what is missing.
- figures(folder)[source]¶
The figures of the answer in `folder`, by name: [dict(name, value, unit)], or [].
- kicad2ems.core.timedomain.delay_of(model, i, j, fmax=None)[source]¶
The delay (s) from port j to port i from S_ij's phase slope over the lower half of the band (0 where |S_ij| is under 1e-3: no path).
- kicad2ems.core.timedomain.edge(rise)[source]¶
A raised-cosine edge 0 -> 1 from t = 0, 10-90 % in `rise` (s).
- kicad2ems.core.timedomain.eye(t, v, bits, ui, t0, latency, bins=None)[source]¶
The eye of v (the far end) for `bits` from t0 (bit k sent over [t0 + k ui, ...)), arriving `latency` later: dict(height (V, the inner opening at the best phase; <= 0 closed), phase (s, from the bit's start), width (s, at the threshold), threshold, levels (the 0s' and the 1s' means at the best phase), the folded traces (phase, v) for a figure). bins: phases a UI (default: the samples a UI, at most 128: a bin with no sample had ended the width there).
- kicad2ems.core.timedomain.jitter_weights(dphi, rj=0.0, dj=0.0, tail=8.5)[source]¶
The sampling instant's shifts (s, on a grid of dphi) and their probabilities: random jitter (rj, s RMS, Gaussian) about each of the dual-Dirac's two deterministic ones (+-dj / 2, s peak-to-peak), each bin's weight its share of the distribution.
- kicad2ems.core.timedomain.prbs(n, count)[source]¶
`count` bits of PRBS-n (n in PRBS: 7, 9, 11, 15, 23, 31).
- kicad2ems.core.timedomain.qinv(ber)[source]¶
Q such that the Gaussian tail beyond Q sigma is `ber` (7.03 at 1e-12).
- kicad2ems.core.timedomain.run(a, echo=<built-in function print>)[source]¶
The question for parsed arguments `a`; returns timedomain.json's dict.
- kicad2ems.core.timedomain.sparams_of(a, out, echo=<built-in function print>)[source]¶
(f, S, z0, names, where): the S-parameters as --sparams, --from or a solve of the board give them.
- kicad2ems.core.timedomain.stat_eye(t, p, ui, latency, base=0.0, noise=0.0, rj=0.0, dj=0.0, target=1e-12, bins=64, nv=2048, nmap=240, pre=3, tail=0.0001, max_post=400)[source]¶
The statistical eye of the pulse response p(t) (a lone 1 at t = 0 on `base`, the far end's; linear superposition: every other bit's share of the pulse added or not, at 1 / 2 each), with Gaussian noise (V RMS) and jitter on the sampling instant (rj s RMS, dj s peak-to-peak dual-Dirac): dict(phase (s, bins over the UI from the bit's arrival), v (V, nmap levels), log10 BER (bins, nmap), height (V) and width (s) at `target`, their phase and threshold, bathtub (log10 BER over the phases at the threshold), cursors (pre, post), the zero-jitter eye's worst-case height). Each phase's voltage distribution is the cursors' two-point distributions convolved on a grid (each one's mass split linearly between its two nearest levels: never negative, so the tails hold to 1e-15), the noise's Gaussian after; the error tails summed from their own ends (1 - CDF would lose them at 1e-16).
- kicad2ems.core.timedomain.step(model, near, far, drivers, receivers, t, near_n=None, far_n=None)[source]¶
Every port's voltage for drivers {port: termination} (an edge each) and receivers {port: termination}; (V, the near end's and the far end's voltage (a pair's difference)).