EdbNets#

class pyedb.dotnet.database.nets.EdbNets(p_edb)#

Bases: pyedb.common.nets.CommonNets

Manages EDB methods for nets management accessible from Edb.nets property.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder", edbversion="2021.2")
>>> edb_nets = edbapp.nets

Overview#

eligible_power_nets

Return a list of nets calculated by area to be eligible for PWR/Ground net classification.

generate_extended_nets

Get extended net and associated components.

classify_nets

Reassign power/ground or signal nets based on list of nets.

is_power_gound_net

Determine if one of the nets in a list is power or ground.

get_dcconnected_net_list

Get the nets connected to the direct current through inductors.

get_powertree

Retrieve the power tree.

get_net_by_name

Find a net by name.

delete_nets

Delete one or more nets from EDB.

delete

Delete one or more nets from EDB.

find_or_create_net

Find or create the net with the given name in the layout.

is_net_in_component

Check if a net belongs to a component.

find_and_fix_disjoint_nets

Find and fix disjoint nets from a given netlist.

merge_nets_polygons

Convert paths from net into polygons, evaluate all connected polygons and perform the merge.

db

Db object.

nets

Nets.

netlist

Return the cell netlist.

signal_nets

Signal nets.

power_nets

Power nets.

signal

Signal nets.

power

Power nets.

nets_by_components

Get all nets for each component instance.

components_by_nets

Get all component instances grouped by nets.

__getitem__

Get a net from the Edb project.

__contains__

Determine if a net is named name or not.

Import detail#

from pyedb.dotnet.database.nets import EdbNets

Property detail#

property EdbNets.db#

Db object.

property EdbNets.nets#

Nets.

Returns:
dict[str, pyedb.dotnet.database.edb_data.nets_data.EDBNetsData]

Dictionary of nets.

property EdbNets.netlist#

Return the cell netlist.

Returns:
list

Net names.

property EdbNets.signal_nets#

Signal nets.

Deprecated since version 0.6.62: Use signal() instead.

Returns:
dict[str, pyedb.dotnet.database.edb_data.EDBNetsData]

Dictionary of signal nets.

property EdbNets.power_nets#

Power nets.

Deprecated since version 0.6.62: Use power() instead.

Returns:
dict[str, pyedb.dotnet.database.edb_data.EDBNetsData]

Dictionary of power nets.

property EdbNets.signal#

Signal nets.

Returns:
dict[str, pyedb.dotnet.database.edb_data.EDBNetsData]

Dictionary of signal nets.

property EdbNets.power#

Power nets.

Returns:
dict[str, pyedb.dotnet.database.edb_data.EDBNetsData]

Dictionary of power nets.

property EdbNets.nets_by_components: dict#

Get all nets for each component instance.

property EdbNets.components_by_nets: dict#

Get all component instances grouped by nets.

Method detail#

EdbNets.__getitem__(name)#

Get a net from the Edb project.

Parameters:
namestr, int
Returns:
:class:` pyedb.dotnet.database.edb_data.nets_data.EDBNetsData
EdbNets.__contains__(name)#

Determine if a net is named name or not.

Parameters:
namestr
Returns:
bool

True when one of the net is named name, False otherwise.

EdbNets.eligible_power_nets(threshold=0.3)#
Return a list of nets calculated by area to be eligible for PWR/Ground net classification.

It uses the same algorithm implemented in SIwave.

Parameters:
thresholdfloat, optional

Area ratio used by the get_power_ground_nets method.

Returns:
list of pyedb.dotnet.database.edb_data.EDBNetsData
EdbNets.generate_extended_nets(resistor_below: int | float = 10, inductor_below: int | float = 1, capacitor_above: int | float = 1, exception_list: list = None, include_signal: bool = True, include_power: bool = True) list#

Get extended net and associated components.

Parameters:
resistor_belowint, float, optional

Threshold of resistor value. Search extended net across resistors which has value lower than the threshold.

inductor_belowint, float, optional

Threshold of inductor value. Search extended net across inductances which has value lower than the threshold.

capacitor_aboveint, float, optional

Threshold of capacitor value. Search extended net across capacitors which has value higher than the threshold.

exception_listlist, optional

List of components to bypass when performing threshold checks. Components in the list are considered as serial components. The default is None.

include_signalstr, optional

Whether to generate extended signal nets. The default is True.

include_powerstr, optional

Whether to generate extended power nets. The default is True.

Returns:
list

List of all extended nets.

Examples

>>> from pyedb import Edb
>>> app = Edb()
>>> app.nets.get_extended_nets()
EdbNets.classify_nets(power_nets=None, signal_nets=None)#

Reassign power/ground or signal nets based on list of nets.

Parameters:
power_netsstr, list, optional

List of power nets to assign. Default is None.

signal_netsstr, list, optional

List of signal nets to assign. Default is None.

Returns:
bool

True when successful, False when failed.

EdbNets.is_power_gound_net(netname_list)#

Determine if one of the nets in a list is power or ground.

Parameters:
netname_listlist

List of net names.

Returns:
bool

True when one of the net names is "power" or "ground", False otherwise.

EdbNets.get_dcconnected_net_list(ground_nets=['GND'], res_value=0.001)#

Get the nets connected to the direct current through inductors.

Note

Only inductors are considered.

Parameters:
ground_netslist, optional

List of ground nets. The default is ["GND"].

Returns:
list

List of nets connected to DC through inductors.

EdbNets.get_powertree(power_net_name, ground_nets)#

Retrieve the power tree.

Parameters:
power_net_namestr

Name of the power net.

ground_nets
Returns:
EdbNets.get_net_by_name(net_name)#

Find a net by name.

EdbNets.delete_nets(netlist)#

Delete one or more nets from EDB.

Deprecated since version 0.6.62: Use delete() method instead.

Parameters:
netliststr or list

One or more nets to delete.

Returns:
list

List of nets that were deleted.

Examples

>>> deleted_nets = database.nets.delete(["Net1", "Net2"])
EdbNets.delete(netlist)#

Delete one or more nets from EDB.

Parameters:
netliststr or list

One or more nets to delete.

Returns:
list

List of nets that were deleted.

Examples

>>> deleted_nets = database.nets.delete(["Net1", "Net2"])
EdbNets.find_or_create_net(net_name='', start_with='', contain='', end_with='')#

Find or create the net with the given name in the layout.

Parameters:
net_namestr, optional

Name of the net to find or create. The default is "".

start_withstr, optional

All net name starting with the string. Not case-sensitive.

containstr, optional

All net name containing the string. Not case-sensitive.

end_withstr, optional

All net name ending with the string. Not case-sensitive.

Returns:
object

Net Object.

EdbNets.is_net_in_component(component_name, net_name)#

Check if a net belongs to a component.

Parameters:
component_namestr

Name of the component.

net_namestr

Name of the net.

Returns:
bool

True if the net is found in component pins.

EdbNets.find_and_fix_disjoint_nets(net_list=None, keep_only_main_net=False, clean_disjoints_less_than=0.0, order_by_area=False)#

Find and fix disjoint nets from a given netlist.

Deprecated since version Use: new property edb.layout_validation.disjoint_nets() instead.

Parameters:
net_liststr, list, optional

List of nets on which check disjoints. If None is provided then the algorithm will loop on all nets.

keep_only_main_netbool, optional

Remove all secondary nets other than principal one (the one with more objects in it). Default is False.

clean_disjoints_less_thanbool, optional

Clean all disjoint nets with area less than specified area in square meters. Default is 0.0 to disable it.

order_by_areabool, optional

Whether if the naming order has to be by number of objects (fastest) or area (slowest but more accurate). Default is False.

Returns:
List

New nets created.

Examples

>>> renamed_nets = database.nets.find_and_fix_disjoint_nets(["GND", "Net2"])
EdbNets.merge_nets_polygons(net_names_list)#

Convert paths from net into polygons, evaluate all connected polygons and perform the merge.

Parameters:
net_names_liststr or list[str]

Net name of list of net name.

Returns:
bool

True when successful, False when failed.