CfgTerminalInfo#

class pyedb.configuration.cfg_ports_sources.CfgTerminalInfo(pedb, **kwargs)#

Bases: pyedb.configuration.cfg_common.CfgBase

Describe a high-level terminal selector used by ports, sources, and probes.

Overview#

update_contact_radius

Update the contact radius used for equipotential region creation.

export_properties

Serialize this terminal selector to a plain dictionary.

pin

Create a terminal selector that targets a single component pin.

net

Create a terminal selector that targets all pins of a net on a component.

pin_group

Create a terminal selector that references a named pin group.

padstack

Create a terminal selector that targets a named padstack instance.

coordinates

Create a terminal selector at an exact XY location on a layer.

nearest_pin

Create a terminal selector that resolves to the nearest reference pin.

Import detail#

from pyedb.configuration.cfg_ports_sources import CfgTerminalInfo

Attribute detail#

CfgTerminalInfo.CFG_TERMINAL_TYPES = ['pin', 'net', 'pin_group', 'nearest_pin', 'coordinates']#
CfgTerminalInfo.value#
CfgTerminalInfo.reference_designator#
CfgTerminalInfo.contact_type#
CfgTerminalInfo.contact_radius#
CfgTerminalInfo.num_of_contact#
CfgTerminalInfo.contact_expansion#

Method detail#

static CfgTerminalInfo.pin(pin_name: str, reference_designator: str | None = None) dict#

Create a terminal selector that targets a single component pin.

Parameters:
pin_namestr

Physical pin identifier on the component, e.g. "A1".

reference_designatorstr, optional

Reference designator of the owning component, e.g. "U1".

Returns:
dict

Terminal-selector dictionary, e.g. {"pin": "A1", "reference_designator": "U1"}.

Examples

>>> TerminalInfo.pin("A1", reference_designator="U1")
{'pin': 'A1', 'reference_designator': 'U1'}
static CfgTerminalInfo.net(net_name: str, reference_designator: str | None = None) dict#

Create a terminal selector that targets all pins of a net on a component.

Parameters:
net_namestr

Net name, e.g. "VDD".

reference_designatorstr, optional

Component whose pins should be used, e.g. "U1".

Returns:
dict

Terminal-selector dictionary.

Examples

>>> TerminalInfo.net("VDD", reference_designator="U1")
{'net': 'VDD', 'reference_designator': 'U1'}
static CfgTerminalInfo.pin_group(pin_group_name: str) dict#

Create a terminal selector that references a named pin group.

Parameters:
pin_group_namestr

Name of a pre-defined pin group, e.g. "pg_VDD".

Returns:
dict

Terminal-selector dictionary {"pin_group": pin_group_name}.

Examples

>>> TerminalInfo.pin_group("pg_VDD")
{'pin_group': 'pg_VDD'}
static CfgTerminalInfo.padstack(padstack_instance_name: str) dict#

Create a terminal selector that targets a named padstack instance.

Use this for coaxial ports placed on named via instances.

Parameters:
padstack_instance_namestr

AEDT padstack-instance name, e.g. "via_A1".

Returns:
dict

Terminal-selector dictionary {"padstack": padstack_instance_name}.

Examples

>>> TerminalInfo.padstack("via_A1")
{'padstack': 'via_A1'}
static CfgTerminalInfo.coordinates(layer: str, x: float | int, y: float | int, net: str) dict#

Create a terminal selector at an exact XY location on a layer.

Parameters:
layerstr

Layer name on which the terminal is placed, e.g. "top".

xfloat

X coordinate in metres.

yfloat

Y coordinate in metres.

netstr

Net name the terminal belongs to.

Returns:
dict

Terminal-selector dictionary with a "coordinates" key.

Examples

>>> TerminalInfo.coordinates("top", 0.001, 0.002, "SIG")
{'coordinates': {'layer': 'top', 'point': [0.001, 0.002], 'net': 'SIG'}}
static CfgTerminalInfo.nearest_pin(reference_net: str, search_radius='5mm') dict#

Create a terminal selector that resolves to the nearest reference pin.

Useful as a negative_terminal when you want the solver to auto-find a ground reference.

Parameters:
reference_netstr

Net name to search for the nearest pin, e.g. "GND".

search_radiusstr, optional

Search radius around the positive terminal. Accepts unit strings such as "5mm" or "0.5e-3". Default is "5mm".

Returns:
dict

Terminal-selector dictionary with a "nearest_pin" key.

Examples

>>> TerminalInfo.nearest_pin("GND", search_radius="3mm")
{'nearest_pin': {'reference_net': 'GND', 'search_radius': '3mm'}}
CfgTerminalInfo.update_contact_radius(radius: str | float | int)#

Update the contact radius used for equipotential region creation.

Parameters:
radiusstr float, or int.

Contact radius. A unit string ("0.1mm") is accepted when an EDB session is attached; otherwise the value is stored as-is.

CfgTerminalInfo.export_properties()#

Serialize this terminal selector to a plain dictionary.

Returns:
dict

Dictionary containing the selector type key and, if present, the reference_designator.