CfgNets#

class pyedb.configuration.cfg_nets.CfgNets(pedb=None, signal_nets=None, power_nets=None, reference_nets=None)#

Fluent builder for the nets configuration section.

Overview#

set_parameters_to_edb

Write signal / power-ground net classifications into the open EDB design.

get_parameters_from_edb

Read net classifications from EDB.

to_dict

Serialize the in-memory net classification lists.

get

Return a CfgNet object for an existing net in the EDB layout.

add_signal_nets

Append signal net names, accepting str, CfgNet, or lists thereof.

add_power_ground_nets

Append power/ground net names, accepting str, CfgNet, or lists thereof.

add_reference_nets

Append reference net names, accepting str, CfgNet, or lists thereof.

apply

Apply net configuration on the layout.

get_data_from_db

Read net classifications from EDB.

power_ground_nets

list of str: Power and ground net names (alias for power_nets).

Import detail#

from pyedb.configuration.cfg_nets import CfgNets

Property detail#

property CfgNets.power_ground_nets#

list of str: Power and ground net names (alias for power_nets).

Attribute detail#

CfgNets.signal_nets = []#
CfgNets.power_nets = []#
CfgNets.reference_nets = []#

Method detail#

CfgNets.set_parameters_to_edb()#

Write signal / power-ground net classifications into the open EDB design.

CfgNets.get_parameters_from_edb()#

Read net classifications from EDB.

CfgNets.to_dict()#

Serialize the in-memory net classification lists.

Unlike get_parameters_from_edb(), this method does not query the live EDB session and therefore preserves any pending changes made via add_power_ground_nets() / add_signal_nets() before set_parameters_to_edb() has been called.

Returns:
dict

Dictionary with "signal_nets" and "power_ground_nets" keys.

CfgNets.get(net_name: str)#

Return a CfgNet object for an existing net in the EDB layout.

Parameters:
net_namestr

Net name to look up, e.g. "GND" or "CLK".

Returns:
CfgNet or False

A CfgNet instance bound to the live EDB session, or False if the net does not exist in EDB.

Raises:
KeyError

If no EDB session is attached.

Examples

>>> cfg = edb.configuration.create_config_builder()
>>> net = cfg.nets.get("GND")
>>> if net:
...     print(net.classification)  # 'power_ground'
CfgNets.add_signal_nets(nets)#

Append signal net names, accepting str, CfgNet, or lists thereof.

Any net already present in power_nets or reference_nets is removed from those lists before being added here.

Parameters:
netsstr, CfgNet, or list of str/CfgNet

Net name(s) to classify as signal.

CfgNets.add_power_ground_nets(nets)#

Append power/ground net names, accepting str, CfgNet, or lists thereof.

Any net already present in signal_nets or reference_nets is removed from those lists before being added here.

Parameters:
netsstr, CfgNet, or list of str/CfgNet

Net name(s) to classify as power/ground.

CfgNets.add_reference_nets(nets)#

Append reference net names, accepting str, CfgNet, or lists thereof.

Any net already present in signal_nets or power_nets is removed from those lists before being added here.

Parameters:
netsstr, CfgNet, or list of str/CfgNet

Net name(s) to use as reference nets.

CfgNets.apply()#

Apply net configuration on the layout.

CfgNets.get_data_from_db()#

Read net classifications from EDB.

Classes#

CfgNet

Represents a single net in the EDB layout with live session access.