Relations catalog

Every query relation the fact base exposes, grouped by kind.

The relations a datalog query joins over. Each documented relation links to its full reference: the hardware it describes, its Go projector, and example queries. See the querying guide for how to compose them. This page is generated from the shipped fact base.

netlist

Relation Summary
bus(label, kind) a reader-detected bus not yet expanded into member nets (WS1-034)
component-on-net(ref_des, net) a component sits on a net
component.attr(ref_des, key, value) a component-level attribute (e.g. interface, MPN)
component.class(ref_des, class) a device class the part is in (a family tag too, e.g. a TVS is both tvs and diode)
component.mpn(ref_des, mpn) the design-side part identity (manufacturer part number)
entity(name, kind) a thing exists in the design under this name, with kind one of component/net/bus. The relation to start a name search from, since every other one ranges over an association and so misses whatever it does not reach (a part with no connections, a net with nothing on it)
external_signal_net(net) a connector-facing signal net (not a rail, ground, no-connect, or power path), the scope the ESD rules share
feedback(net) the net is a regulator feedback / sense node (must not be probed)
has_nc_channel(present) one row when the design can express intentional no-connect
has_netclass(present) one row when the design assigns net classes at all (absent it, a netclass-scoped rule selects nothing and reads clean)
has_netclass_defs(present) one row when the design declares net-class definitions at all (absent it, a declared-vs-actual rule has no limit to compare against and reads clean)
net.ac_coupled(net) a SERIES capacitor carries the net (a decoupling cap to ground/rail does not count)
net.bias(net, level) a bias resistor holds the net at a rail (high) or ground (low); absent when unbiased or held by a divider
net.bus_like(net) a shared-distribution net (ground plane, global rail, or rail-scale fan-out), the series-reach walk’s stop predicate
net.declared_track_width(net, mm) the track width a net SHOULD route at, cascaded across its classes by priority (join this, not the per-class rows)
net.declared_via_drill(net, mm) the via drill a net SHOULD route at, cascaded across its classes by priority (join this, not the per-class rows)
net.external(net) the net may extend onto an unread sheet (read-gap marker)
net.ground(net) the net is a ground rail (name-derived)
net.max_voltage(net, volts) a net’s declared rail voltage
net.netclass(net, class) the tool-assigned net class a net belongs to (KiCad net_settings; not the derived semantic role)
net.nominal_voltage(net, volts) a RAIL’s nominal voltage derived from its net name (3V3 -> 3.3). Rails only; a non-rail net’s name-derived level is net.signal_level
net.pin_count(net, count) the number of connections on a net
net.signal_level(net, volts) the signalling level a NON-RAIL net’s name declares, the other half of net.nominal_voltage. A house convention that encodes a level into a signal net’s name lands here rather than being read as a rail nominal
netclass.clearance(class, mm) the clearance a net class declares its nets should route at (millimetres)
netclass.track_width(class, mm) the track width a net class declares its nets should route at (millimetres)
netclass.via_diameter(class, mm) the via diameter a net class declares (millimetres)
netclass.via_drill(class, mm) the via drill a net class declares (millimetres)
pin(ref_des, pin) a part-type pin of a placed component
pin.name(ref_des, pin, name) the part type’s functional name for a pin (“SDA”, “PTC11”), the spelling a datasheet and a firmware header use, against the package designator every other pin relation is keyed on; absent when the part type declares none
pin.net(ref_des, pin, net) the net a pin is on (absent if unconnected)
pin.role(ref_des, pin, role) a pin’s derived role (power/ground/anode/cathode)
pin.type(ref_des, pin, etype) a pin’s electrical type (power_in, input, output, …)
pin_net_conflict(ref_des, pin, net) a pin the read placed on more than one net; one row per net (reader integrity diagnostic)
rail(net) the net is a power or ground rail
ref_des_collision(ref_des) a reference designator used by more than one part (reader integrity diagnostic)
types_power_out(present) one row when the source format classifies power-output pins (EDIF/IPC do not, so a driver-absence check is unsound there)
unresolved_symbol(ref_des, symref) a placement whose symbol did not resolve, so it carries no pins (WS1-052)

board

Relation Summary
board.layer(net, layer) a net appears on a board copper layer
board.track_width(net, mm) a copper track’s width on a net (millimetres)
board.via_drill(net, mm) a via’s drill diameter on a net (millimetres)

datasheet

Relation Summary
component.device_class(ref_des, class) the device class the part’s datasheet declares (authoritative over the ref-des/keyword class; needs –params)
component.esd_rated(ref_des) the part carries a datasheet ESD rating at or above the credit floor (needs –params)
param(mpn, symbol, max) a datasheet parameter’s max value for a part, in its SI base unit (needs –params)
param.pin(mpn, pin, name, function) a pin the part’s datasheet declares, keyed by its spec-local id, with the printed name and its function (power_input / ground / bidirectional / no_connect / …; needs –params)
param.pin_range(mpn, pin, symbol, kind, min, max) a datasheet limit bound to ONE pin, both bounds in the SI base unit, the per-terminal counterpart to param.range, so a part with several supply pins answers per pin instead of once (needs –params)
param.pin_relation(mpn, subject_pin, reference_pin, modality, min, max) a datasheet constraint BETWEEN two pins of one part: bounds on (subject - reference) in the SI base unit, with the vendor’s modality (required/recommended). The pin order is load-bearing, so swapping the two inverts the requirement (needs –params)
param.prov(mpn, symbol, doc, page, section) the citation of a datasheet parameter: the SourceDoc title, page, and table/figure it was read from. The page is a locator and binds as a string, not a number (needs –params)
param.range(mpn, symbol, kind, min, max) a datasheet parameter’s two-sided limit with its kind, both bounds in the SI base unit (absolute_max / recommended_operating / characteristic; needs –params)
param.typ(mpn, symbol, typ) a datasheet parameter’s TYPICAL value in the SI base unit, the third member of the min/typ/max triple. A typical value is what the part usually does, never a guaranteed limit, so it is its own relation rather than a column on param.range (needs –params)
param.unit(mpn, symbol, unit) the unit a datasheet parameter is PRINTED in; param and param.range carry their numbers in SI base units, so join this to see the vendor’s own spelling (needs –params)
part.audience(mpn, who) a team/license entitled to see a part’s datasheet data (record-only, needs –params)

predicate

Relation Summary
absent(value) the field carried no value at all, which is different from an empty string and from zero (a datasheet row stating only a maximum leaves its minimum absent); not absent(?x) reads “this row states one”
contains(string, substring) the string contains the substring
glob(string, pattern) the whole string matches a shell-style glob (* any run, ? one char)
match(string, regex) the string matches an (unanchored) regular expression
prefix(string, prefix) the string starts with the prefix
reaches(from, net, hops?) transitive reachability through series pass elements (R/L/ferrite/fuse); the optional third argument binds the EXACT number of crossings, so a radius is written reaches(?a,?b,?h), ?h <= 2 and not reaches(?a,?b,2), which means exactly two
route(from, net, path) the same walk as reaches, with the route it found bound as a readable value (VBUS -> [R5] -> VBUS_F -> [L1] -> VDD_3V3), so a connectivity answer carries the evidence for itself; one route per pair, and a route never ends on a rail because the walk refuses one
suffix(string, suffix) the string ends with the suffix