testbench ¤
Test-bench helpers for wrapping device netlists with sources and loads.
A device netlist (e.g. from GDSFactory or hand-written SAX) describes the device only — its connectivity and external ports mapping. Running it in circulax additionally requires every external port to be terminated: driven by a source, loaded by a detector, or tied to GND.
:func:attach_testbench wraps the device into a runnable netlist by adding the requested terminations and wiring them to the device's external ports.
Functions:
| Name | Description |
|---|---|
attach_testbench | Wrap a device netlist with sources, loads, and GND terminations. |
attach_testbench ¤
attach_testbench(
device: dict | Netlist,
*,
sources: dict[str, dict[str, Any]] | None = None,
loads: dict[str, dict[str, Any]] | None = None,
gnd: Iterable[str] | None = None
) -> dict | Netlist
Wrap a device netlist with sources, loads, and GND terminations.
Accepts either a SAX-format dict or a kfnetlist.Netlist. Returns the same type as the input.