CfgPinGroups#

class pyedb.configuration.cfg_pin_groups.CfgPinGroups(pedb=None, pin_group_data=None, pingroup_data=None)#

Manage configuration pin group class.

Overview#

set_pin_groups_to_edb

Write all configured pin groups into the open EDB design.

get_data_from_edb

Read existing pin groups from the open EDB design.

get

Return the CfgPinGroup for an existing pin group.

add

Add one or more pin groups to this configuration.

apply

Write all configured pin groups into the open EDB design.

get_data_from_db

Read pin groups from the EDB design.

export_properties

Serialize all pin groups to plain dictionaries.

Import detail#

from pyedb.configuration.cfg_pin_groups import CfgPinGroups

Attribute detail#

CfgPinGroups.set_pingroup_to_edb#
CfgPinGroups.pin_groups#

Method detail#

CfgPinGroups.set_pin_groups_to_edb()#

Write all configured pin groups into the open EDB design.

CfgPinGroups.get_data_from_edb()#

Read existing pin groups from the open EDB design.

Returns:
list of dict

Serialized pin-group payloads.

CfgPinGroups.get(name: str) CfgPinGroup#

Return the CfgPinGroup for an existing pin group.

If the group has already been registered via add() the cached entry is returned. Otherwise the group is looked up in the live EDB session and a new entry is created from its current pin membership.

Parameters:
namestr

Pin-group name, e.g. "pg_VDD".

Returns:
CfgPinGroup

Pin-group builder pre-populated with the current pin list.

Raises:
KeyError

If no EDB session is attached or the pin group does not exist.

Examples

>>> cfg = edb.configuration.create_config_builder()
>>> pg = cfg.pin_groups.get("pg_VDD")
>>> print(pg.pins)
CfgPinGroups.add(name=None, reference_designator=None, pins=None, nets=None, net=None)#

Add one or more pin groups to this configuration.

Provide either pins (explicit list) or nets (one or more net names), not both.

When nets is a single string, one pin group is created using name. When nets is a list of strings, one pin group is created per net and the auto-generated name follows the convention "Pingroup_{reference_designator}.{net_name}". The explicit name argument is ignored in the multi-net case.

When an EDB session is attached the component pins are resolved immediately; otherwise resolution is deferred to apply().

Parameters:
reference_designatorstr

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

namestr, optional

Unique pin-group name. When omitted the name is auto-generated: "Pingroup_{reference_designator}.{net_name}" for a single net and "Pingroup_{reference_designator}" for explicit pins. In the multi-net case the name is always auto-generated.

pinslist of str, optional

Explicit list of pin names, e.g. ["A1", "A2", "B1"].

netsstr or list of str, optional

Net name(s). All component pins on each net are collected into a dedicated pin group.

Returns:
CfgPinGroup or list of CfgPinGroup

The newly created pin-group object(s). A single object is returned when nets is a string or pins is used; a list is returned when nets is a list with more than one entry.

Examples

>>> cfg.pin_groups.add("pg_VDD", "U1", nets="VDD")
>>> cfg.pin_groups.add("pg_GND", "U1", pins=["A1", "A2", "B1"])
>>> cfg.pin_groups.add("", "U1", nets=["VDD", "GND"])
CfgPinGroups.apply()#

Write all configured pin groups into the open EDB design.

CfgPinGroups.get_data_from_db()#

Read pin groups from the EDB design.

CfgPinGroups.export_properties()#

Serialize all pin groups to plain dictionaries.