15#include <nlohmann/json.hpp>
64 std::vector<LineSolution>
lines;
The board model (design doc 02 §3): every object TraceMaker reads from a .kicad_pcb,...
Component-rule catalogue (design doc 15 §6.1): categories of components with their detectors,...
Closed-form transmission-line impedance for PCB traces (design doc 15 §5.3) and the IPC-2221 width fo...
nlohmann::json current_json(const CurrentPlan &p)
double pair_impedance(const model::Board &b, int copper, Coord width, Coord gap)
Differential impedance of an existing width/gap on a copper layer (to compare a board net class with ...
std::vector< LayerDelay > prop_delays(const model::Board &b, const Catalogue &cat)
nlohmann::json impedance_json(const ImpedancePlan &p)
CurrentPlan plan_current(const model::Board &b, const RuleSpec &r)
nlohmann::json stackup_json(const model::Board &b, const Catalogue &cat)
std::vector< LayerGeometry > stackup_geometry(const model::Board &b)
std::string stackup_summary(const model::Board &b, const Catalogue &cat)
One line for the report header: the stackup summary and the delays, or why defaults are used.
ImpedancePlan plan_impedance(const model::Board &b, const model::DesignRules *rules, const RuleSpec &r)
Board bounds used for solving: the narrowest width and the pair / coplanar gap (see impedance_rules....
std::string impedance_text(const ImpedancePlan &p)
std::string current_text(const CurrentPlan &p)
std::int64_t Coord
Engine coordinate: signed 64-bit nanometres.
Design rules as KiCad defines them (design doc 08 §3–4): board minimums and net classes from the ....
Width for a rule that names a current (doc 15 §5.4, IPC-2221).
bool copper_assumed
no stackup: 35 um (1 oz) assumed
Coord inner_copper
inner 0: no inner layers
std::vector< LineSolution > lines
bool computed
false: why says why (no stackup, no target, ...)
std::string structure
rule parameter, "" = microstrip/stripline by layer
Coord coplanar_gap
the bounds used, and where they came from
Propagation delay per copper layer used to turn ps skew budgets into mm (doc 15 §4): from the stackup...
One copper layer's line geometry from the stackup.
Coord h2
dielectric to ref_a (microstrip) / to the planes above and below (stripline)
imp::Structure structure
outer: microstrip; inner: stripline
std::string ref_b_note
"zone GND" or "no zone: assumed plane"
Coord t
copper thickness of this layer
int ref_b
reference copper layers (microstrip: ref_a only; stripline: above, below)
bool routing
false for KiCad "power" (plane) layers
double er
dielectric permittivity (stripline: series combination of both sides)
The width (and gap) that meets one target on one layer.
double error_pct
stated formula error
Coord h2
dielectric to the reference (stripline: above, below)
std::string ref
"F.Cu", "In1.Cu (zone GND)"
Coord gap
gap: pair gap (differential) or coplanar ground gap (GCPW); 0 otherwise
double ps_per_mm
differential: odd mode
std::string note
e.g. "gap raised: width at the board minimum"
double z
achieved impedance at the integer-nm solution