CfgPinGroups#
- class pyedb.configuration.cfg_pin_groups.CfgPinGroups(pedb=None, pin_group_data=None, pingroup_data=None)#
Manage configuration pin group class.
Overview#
Write all configured pin groups into the open EDB design. |
|
Read existing pin groups from the open EDB design. |
|
Return the |
|
Add one or more pin groups to this configuration. |
|
Write all configured pin groups into the open EDB design. |
|
Read pin groups from the EDB design. |
|
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.
- CfgPinGroups.get(name: str) CfgPinGroup#
Return the
CfgPinGroupfor 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:
- name
str Pin-group name, e.g.
"pg_VDD".
- name
- Returns:
CfgPinGroupPin-group builder pre-populated with the current pin list.
- Raises:
KeyErrorIf 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_designator
str Reference designator of the owning component, e.g.
"U1".- name
str,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.- pins
listofstr,optional Explicit list of pin names, e.g.
["A1", "A2", "B1"].- nets
strorlistofstr,optional Net name(s). All component pins on each net are collected into a dedicated pin group.
- reference_designator
- Returns:
CfgPinGrouporlistofCfgPinGroupThe 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.