EdbPadstacks#
- class pyedb.dotnet.database.padstack.EdbPadstacks(p_edb)#
Bases:
objectManages EDB methods for nets management accessible from Edb.padstacks property.
Examples
>>> from pyedb import Edb >>> edbapp = Edb("myaedbfolder", edbversion="2021.2") >>> edb_padstacks = edbapp.padstacks
Overview#
Convert an integer to an EDB.PadGeometryType. |
|
Convert an integer to an EDB.PadGeometryType. |
|
Find a padstack instance by database id. |
|
Create a circular padstack. |
|
Create dielectric-filled back-drills for through-hole vias. |
|
Delete padstack instances by net names. |
|
Set solderball for the given PadstackInstance. |
|
Create HFSS 3Dlayout coaxial lumped port on a pastack |
|
Retrieve pins given a component’s reference designator and net name. |
|
Get Padstack Parameters from Pin or Padstack Definition. |
|
Set all anti-pads from all pad-stack definition to the given value. |
|
Check for minimum via plating ration value, values found below the minimum one are replaced by default |
|
Get the list for EDB vias from a net name list. |
|
Create a padstack. |
|
Create a padstack. |
|
Duplicate a padstack. |
|
Duplicate a padstack. |
|
Place a via. |
|
Place the padstack. |
|
Remove the Pad from a padstack on a specific layer by setting it as a 0 thickness circle. |
|
Set pad and antipad properties of the padstack. |
|
Get padstack instances by conditions. |
|
Get a list of padstack instances by net name. |
|
Search for reference pins using given criteria. |
|
Returns padstack instances Rtree index. |
|
Returns the list of padstack instances ID intersecting a given bounding box and nets. |
|
Returns the list of padstack instances ID intersecting a given bounding box and nets. |
|
Evaluate padstack instances included on the provided point list and replace all by single instance. |
|
Replace padstack instances along lines into a single polygon. |
|
reduce the number of vias intersecting bounding box and nets by x and y samples. |
|
Reduce the number of vias by density. Keep only one via which is closest to the center of the cell. The cells |
Db object. |
|
Padstack definitions. |
|
Padstacks via padstack definitions. |
|
Dictionary of all padstack instances (vias and pins). |
|
Dictionary of all padstack instances (vias and pins) by name. |
|
Dictionary of all pins instances (belonging to component). |
|
Dictionary of all vias instances not belonging to component. |
|
List of padstack instances. |
|
All Layout Pin groups. |
|
Return a PadType Enumerator. |
density based spatial clustering for padstack instances |
Get a padstack definition or instance from the Edb project. |
Import detail#
from pyedb.dotnet.database.padstack import EdbPadstacks
Property detail#
- property EdbPadstacks.db#
Db object.
- property EdbPadstacks.definitions#
Padstack definitions.
- property EdbPadstacks.padstacks#
Padstacks via padstack definitions.
Deprecated since version 0.6.58.
Use
definitions()property instead.
- property EdbPadstacks.instances#
Dictionary of all padstack instances (vias and pins).
- property EdbPadstacks.instances_by_name#
Dictionary of all padstack instances (vias and pins) by name.
- property EdbPadstacks.pins#
Dictionary of all pins instances (belonging to component).
- Returns:
dic[str,dotnet.database.edb_data.definitions.EDBPadstackInstance]Dictionary of EDBPadstackInstance Components.
Examples
>>> edbapp = dotnet.Edb("myproject.aedb") >>> pin_net_name = edbapp.pins[424968329].netname
- property EdbPadstacks.vias#
Dictionary of all vias instances not belonging to component.
- Returns:
dic[str,dotnet.database.edb_data.definitions.EDBPadstackInstance]Dictionary of EDBPadstackInstance Components.
Examples
>>> edbapp = dotnet.Edb("myproject.aedb") >>> pin_net_name = edbapp.pins[424968329].netname
- property EdbPadstacks.padstack_instances#
List of padstack instances.
Deprecated since version 0.6.58.
Use
instances()property instead.
- property EdbPadstacks.pad_type#
Return a PadType Enumerator.
Method detail#
- EdbPadstacks.__getitem__(name)#
Get a padstack definition or instance from the Edb project.
- Parameters:
- Returns:
- EdbPadstacks.int_to_pad_type(val=0)#
Convert an integer to an EDB.PadGeometryType.
- EdbPadstacks.int_to_geometry_type(val=0)#
Convert an integer to an EDB.PadGeometryType.
- EdbPadstacks.find_instance_by_id(value: int)#
Find a padstack instance by database id.
- Parameters:
- value
int
- value
- EdbPadstacks.create_circular_padstack(padstackname=None, holediam='300um', paddiam='400um', antipaddiam='600um', startlayer=None, endlayer=None)#
Create a circular padstack.
- Parameters:
- padstackname
str,optional Name of the padstack. The default is
None.- holediam
str,optional Diameter of the hole with units. The default is
"300um".- paddiam
str,optional Diameter of the pad with units. The default is
"400um".- antipaddiam
str,optional Diameter of the antipad with units. The default is
"600um".- startlayer
str,optional Starting layer. The default is
None, in which case the top is the starting layer.- endlayer
str,optional Ending layer. The default is
None, in which case the bottom is the ending layer.
- padstackname
- Returns:
strName of the padstack if the operation is successful.
- EdbPadstacks.create_dielectric_filled_backdrills(layer: str, diameter: float | str, material: str, permittivity: float, padstack_instances: List[pyedb.dotnet.database.edb_data.padstacks_data.EDBPadstackInstance] | None = None, padstack_definition: str | List[str] | None = None, dielectric_loss_tangent: float | None = None, nets: str | List[str] | None = None) bool#
Create dielectric-filled back-drills for through-hole vias.
Back-drilling (a.k.a. controlled-depth drilling) is used to remove the unused via stub that acts as an unterminated transmission-line segment, thereby improving signal-integrity at high frequencies. This routine goes one step further: after the stub is removed the resulting cylindrical cavity is completely filled with a user-specified dielectric. The fill material restores mechanical rigidity, prevents solder-wicking, and keeps the original via’s electrical characteristics intact on the remaining, still-plated, portion.
- Parameters:
- layer
str Signal layer name up to which the back-drill is performed (inclusive). The drill always starts on the bottom-most signal layer of the stack-up.
- diameter
floatorstr Finished hole diameter for the back-drill. A numeric value is interpreted in the database length unit; a string such as
"0.3mm"is evaluated with units.- material
str Name of the dielectric material that fills the drilled cavity. If the material does not yet exist in the central material library it is created on the fly.
- permittivity
float Relative permittivity \(\varepsilon_{\mathrm{r}}\) used when the material has to be created. Must be positive.
- padstack_instances
list[PadstackInstance],optional Explicit list of via instances to process. When provided,
padstack_definitionandnetsare ignored for filtering.- padstack_definition
strorlist[str],optional Pad-stack definition(s) to process. If omitted, all through-hole definitions are considered.
- dielectric_loss_tangent
float,optional Loss tangent \(\tan\delta\) used when the material has to be created. Defaults to
0.0.- nets
strorlist[str],optional Net name(s) used to filter vias. If omitted, vias belonging to any net are processed.
- layer
- Returns:
boolTruewhen at least one back-drill was successfully created.Falseif no suitable via was found or any error occurred.
- Raises:
ValueErrorIf
materialis empty or ifpermittivityis non-positive when a new material must be created.
Notes
The routine is safe to call repeatedly: existing back-drills are not duplicated because the
*_BDdefinition name is deterministic.The original via keeps its pad-stack definition and net assignment; only its unused stub is removed.
The back-drill is not subtracted from anti-pads or plane clearances; the filling material is assumed to be electrically invisible at the frequencies of interest.
Examples
Create back-drills on all vias belonging to two specific pad-stack definitions and two DDR4 nets:
>>> edb.padstacks.create_dielectric_filled_backdrills( ... layer="L3", ... diameter="0.25mm", ... material="EPON_827", ... permittivity=3.8, ... dielectric_loss_tangent=0.015, ... padstack_definition=["VIA_10MIL", "VIA_16MIL"], ... nets=["DDR4_DQ0", "DDR4_DQ1"], ... ) True
- EdbPadstacks.delete_padstack_instances(net_names)#
Delete padstack instances by net names.
- Parameters:
- Returns:
- bool
Truewhen successful,Falsewhen failed.
References
>>> Edb.padstacks.delete_padstack_instances(net_names=["GND"])
- EdbPadstacks.set_solderball(padstackInst, sballLayer_name, isTopPlaced=True, ballDiam=0.0001)#
Set solderball for the given PadstackInstance.
- Parameters:
- padstackInst
Edb.Cell.Primitive.PadstackInstanceorint Padstack instance id or object.
- sballLayer_namestr,
Name of the layer where the solder ball is placed. No default values.
- isTopPlacedbool, optional.
Bollean triggering is the solder ball is placed on Top or Bottom of the layer stackup.
- ballDiam
double, optional, Solder ball diameter value.
- padstackInst
- Returns:
- EdbPadstacks.create_coax_port(padstackinstance, use_dot_separator=True, name=None)#
Create HFSS 3Dlayout coaxial lumped port on a pastack Requires to have solder ball defined before calling this method.
- Parameters:
- padstackinstanceEdb.Cell.Primitive.PadstackInstance or
int Padstack instance object.
- use_dot_separatorbool,
optional Whether to use
.as the separator for the naming convention, which is[component][net][pin]. The default isTrue. IfFalse,_is used as the separator instead.- name
str Port name for overwriting the default port-naming convention, which is
[component][net][pin]. The port name must be unique. If a port with the specified name already exists, the default naming convention is used so that port creation does not fail.
- padstackinstanceEdb.Cell.Primitive.PadstackInstance or
- Returns:
strTerminal name.
- EdbPadstacks.get_pinlist_from_component_and_net(refdes=None, netname=None)#
Retrieve pins given a component’s reference designator and net name.
- EdbPadstacks.get_pad_parameters(pin, layername, pad_type=0)#
Get Padstack Parameters from Pin or Padstack Definition.
- EdbPadstacks.set_all_antipad_value(value)#
Set all anti-pads from all pad-stack definition to the given value.
- EdbPadstacks.check_and_fix_via_plating(minimum_value_to_replace=0.0, default_plating_ratio=0.2)#
Check for minimum via plating ration value, values found below the minimum one are replaced by default plating ratio.
- Parameters:
- Returns:
- bool
Truewhen successful,Falseif an anti-pad value fails to be assigned.
- EdbPadstacks.get_via_instance_from_net(net_list=None)#
Get the list for EDB vias from a net name list.
- EdbPadstacks.create_padstack(padstackname=None, holediam='300um', paddiam='400um', antipaddiam='600um', startlayer=None, endlayer=None, antipad_shape='Circle', x_size='600um', y_size='600um', corner_radius='300um', offset_x='0.0', offset_y='0.0', rotation='0.0', has_hole=True, pad_offset_x='0.0', pad_offset_y='0.0', pad_rotation='0.0')#
Create a padstack.
Deprecated since version 0.6.62.
Use
create()method instead.- Parameters:
- padstackname
str,optional Name of the padstack. The default is
None.- holediam
str,optional Diameter of the hole with units. The default is
"300um".- paddiam
str,optional Diameter of the pad with units. The default is
"400um".- antipaddiam
str,optional Diameter of the antipad with units. The default is
"600um".- startlayer
str,optional Starting layer. The default is
None, in which case the top is the starting layer.- endlayer
str,optional Ending layer. The default is
None, in which case the bottom is the ending layer.- antipad_shape
str,optional Shape of the antipad. The default is
"Circle". Options are"Circle"and"Bullet".- x_size
str,optional Only applicable to bullet shape. The default is
"600um".- y_size
str,optional Only applicable to bullet shape. The default is
"600um".- corner_radius
Only applicable to bullet shape. The default is
"300um".- offset_x
str,optional X offset of antipad. The default is
"0.0".- offset_y
str,optional Y offset of antipad. The default is
"0.0".- rotation
str,optional rotation of antipad. The default is
"0.0".- has_holebool,
optional Whether this padstack has a hole.
- padstackname
- Returns:
strName of the padstack if the operation is successful.
- EdbPadstacks.create(padstackname=None, holediam='300um', paddiam='400um', antipaddiam='600um', pad_shape='Circle', antipad_shape='Circle', x_size='600um', y_size='600um', corner_radius='300um', offset_x='0.0', offset_y='0.0', rotation='0.0', has_hole=True, pad_offset_x='0.0', pad_offset_y='0.0', pad_rotation='0.0', pad_polygon=None, antipad_polygon=None, polygon_hole=None, start_layer=None, stop_layer=None, add_default_layer=False, anti_pad_x_size='600um', anti_pad_y_size='600um', hole_range='upper_pad_to_lower_pad')#
Create a padstack.
- Parameters:
- padstackname
str,optional Name of the padstack. The default is
None.- holediam
str,optional Diameter of the hole with units. The default is
"300um".- paddiam
str,optional Diameter of the pad with units, used with
"Circle"shape. The default is"400um".- antipaddiam
str,optional Diameter of the antipad with units. The default is
"600um".- pad_shape
str,optional Shape of the pad. The default is
"Circle. Options are"Circle","Rectangle"and"Polygon".- antipad_shape
str,optional Shape of the antipad. The default is
"Circle". Options are"Circle""Rectangle"and"Bullet".- x_size
str,optional Only applicable to bullet and rectangle shape. The default is
"600um".- y_size
str,optional Only applicable to bullet and rectangle shape. The default is
"600um".- corner_radius
Only applicable to bullet shape. The default is
"300um".- offset_x
str,optional X offset of antipad. The default is
"0.0".- offset_y
str,optional Y offset of antipad. The default is
"0.0".- rotation
str,optional rotation of antipad. The default is
"0.0".- has_holebool,
optional Whether this padstack has a hole.
- pad_offset_x
str,optional Padstack offset in X direction.
- pad_offset_y
str,optional Padstack offset in Y direction.
- pad_rotation
str,optional Padstack rotation.
- start_layer
str,optional Start layer of the padstack definition.
- stop_layer
str,optional Stop layer of the padstack definition.
- add_default_layerbool,
optional Add
"Default"to padstack definition. Default isFalse.- anti_pad_x_size
str,optional Only applicable to bullet and rectangle shape. The default is
"600um".- anti_pad_y_size
str,optional Only applicable to bullet and rectangle shape. The default is
"600um".- hole_range
str,optional Define the padstack hole range. Arguments supported,
"through","begin_on_upper_pad","end_on_lower_pad","upper_pad_to_lower_pad".
- padstackname
- Returns:
strName of the padstack if the operation is successful.
- EdbPadstacks.duplicate_padstack(target_padstack_name, new_padstack_name='')#
Duplicate a padstack.
Deprecated since version 0.6.62.
Use
duplicate()method instead.
- EdbPadstacks.duplicate(target_padstack_name, new_padstack_name='')#
Duplicate a padstack.
- EdbPadstacks.place(position, definition_name, net_name='', via_name='', rotation=0.0, fromlayer=None, tolayer=None, solderlayer=None, is_pin=False)#
Place a via.
- Parameters:
- position
list List of float values for the [x,y] positions where the via is to be placed.
- definition_name
str Name of the padstack definition.
- net_name
str,optional Name of the net. The default is
"".- via_name
str,optional The default is
"".- rotation
float,str,optional Rotation of the padstack in degrees. The default is
0.- fromlayer
The default is
None.- tolayer
The default is
None.- solderlayer
The default is
None.- is_pinbool,
optional Whether if the padstack is a pin or not. Default is False.
- position
- Returns:
dotnet.database.edb_data.padstacks_data.EDBPadstackInstance
- EdbPadstacks.place_padstack(position, definition_name, net_name='', via_name='', rotation=0.0, fromlayer=None, tolayer=None, solderlayer=None, is_pin=False)#
Place the padstack.
Deprecated since version 0.6.62.
Use
place()method instead.- Parameters:
- position
list List of float values for the [x,y] positions where the via is to be placed.
- definition_name
str Name of the padstack definition.
- net_name
str,optional Name of the net. The default is
"".- via_name
str,optional The default is
"".- rotation
float,optional Rotation of the padstack in degrees. The default is
0.- fromlayer
The default is
None.- tolayer
The default is
None.- solderlayer
The default is
None.
- position
- Returns:
- EdbPadstacks.remove_pads_from_padstack(padstack_name, layer_name=None)#
Remove the Pad from a padstack on a specific layer by setting it as a 0 thickness circle.
- EdbPadstacks.set_pad_property(padstack_name, layer_name=None, pad_shape='Circle', pad_params=0, pad_x_offset=0, pad_y_offset=0, pad_rotation=0, antipad_shape='Circle', antipad_params=0, antipad_x_offset=0, antipad_y_offset=0, antipad_rotation=0)#
Set pad and antipad properties of the padstack.
- Parameters:
- padstack_name
str Name of the padstack.
- layer_name
str,optional Name of the layer. If None, all layers will be taken.
- pad_shape
str,optional Shape of the pad. The default is
"Circle". Options are"Circle","Square","Rectangle","Oval"and"Bullet".- pad_params
str,optional Dimension of the pad. The default is
"0".- pad_x_offset
str,optional X offset of the pad. The default is
"0".- pad_y_offset
str,optional Y offset of the pad. The default is
"0".- pad_rotation
str,optional Rotation of the pad. The default is
"0".- antipad_shape
str,optional Shape of the antipad. The default is
"0".- antipad_params
str,optional Dimension of the antipad. The default is
"0".- antipad_x_offset
str,optional X offset of the antipad. The default is
"0".- antipad_y_offset
str,optional Y offset of the antipad. The default is
"0".- antipad_rotation
str,optional Rotation of the antipad. The default is
"0".
- padstack_name
- Returns:
- bool
Trueif successful.
- EdbPadstacks.get_instances(name=None, pid=None, definition_name=None, net_name=None, component_reference_designator=None, component_pin=None)#
Get padstack instances by conditions.
- Parameters:
- name
str,optional Name of the padstack.
- pid
int,optional Id of the padstack.
- definition_name
str,list,optional Name of the padstack definition.
- net_name
str,optional The net name to be used for filtering padstack instances.
- component_pin: str, optional
Pin Number of the component.
- Returns
- ——-
- list
List of
dotnet.database.edb_data.padstacks_data.EDBPadstackInstance.
- name
- EdbPadstacks.get_padstack_instance_by_net_name(net_name)#
Get a list of padstack instances by net name.
- EdbPadstacks.get_reference_pins(positive_pin, reference_net='gnd', search_radius=0.005, max_limit=0, component_only=True)#
Search for reference pins using given criteria.
- Parameters:
- positive_pin
EDBPadstackInstance Pin used for evaluating the distance on the reference pins found.
- reference_net
str,optional Reference net. The default is
"gnd".- search_radius
float,optional Search radius for finding padstack instances. The default is
5e-3.- max_limit
int,optional Maximum limit for the padstack instances found. The default is
0, in which case no limit is applied. The maximum limit value occurs on the nearest reference pins from the positive one that is found.- component_onlybool,
optional Whether to limit the search to component padstack instances only. The default is
True. WhenFalse, the search is extended to the entire layout.
- positive_pin
- Returns:
listList of
dotnet.database.edb_data.padstacks_data.EDBPadstackInstance.
Examples
>>> edbapp = Edb("target_path") >>> pin = edbapp.components.instances["J5"].pins["19"] >>> reference_pins = edbapp.padstacks.get_reference_pins(positive_pin=pin, reference_net="GND", >>> search_radius=5e-3, max_limit=0, component_only=True)
- EdbPadstacks.get_padstack_instances_rtree_index(nets=None)#
Returns padstack instances Rtree index.
- EdbPadstacks.get_padstack_instances_id_intersecting_polygon(points, nets=None, padstack_instances_index=None)#
Returns the list of padstack instances ID intersecting a given bounding box and nets.
- Parameters:
- bounding_box
tupleor list. bounding box, [x1, y1, x2, y2]
- nets
strorlist,optional net name of list of nets name applying filtering on padstack instances selection. If
Noneis provided all instances are included in the index. Default value isNone.- padstack_instances_index
optional,Rtreeobject. Can be provided optionally to prevent computing padstack instances Rtree index again.
- bounding_box
- Returns:
ListofpadstackinstancesIDintersectingtheboundingbox.
- EdbPadstacks.get_padstack_instances_intersecting_bounding_box(bounding_box, nets=None, padstack_instances_index=None)#
Returns the list of padstack instances ID intersecting a given bounding box and nets.
- Parameters:
- bounding_box
tupleor list. bounding box, [x1, y1, x2, y2]
- nets
strorlist,optional net name of list of nets name applying filtering on padstack instances selection. If
Noneis provided all instances are included in the index. Default value isNone.- padstack_instances_index
optional,Rtreeobject. Can be provided optionally to prevent computing padstack instances Rtree index again.
- bounding_box
- Returns:
ListofpadstackinstancesIDintersectingtheboundingbox.
- EdbPadstacks.merge_via(contour_boxes, net_filter=None, start_layer=None, stop_layer=None)#
Evaluate padstack instances included on the provided point list and replace all by single instance.
- Parameters:
- contour_boxes
List[List[List[float,float]]] Nested list of polygon with points [x,y].
- net_filter
optional List[str: net_name] apply a net filter, nets included in the filter are excluded from the via merge.
- start_layer
optional,str Padstack instance start layer, if None the top layer is selected.
- stop_layer
optional,str Padstack instance stop layer, if None the bottom layer is selected.
- contour_boxes
- EdbPadstacks.merge_via_along_lines(net_name='GND', distance_threshold=0.005, minimum_via_number=6, selected_angles=None, padstack_instances_id=None)#
Replace padstack instances along lines into a single polygon.
Detect all padstack instances that are placed along lines and replace them by a single polygon based one forming a wall shape. This method is designed to simplify meshing on via fence usually added to shield RF traces on PCB.
- Parameters:
- net_name
str Net name used for detected padstack instances. Default value is
"GND".- distance_threshold
float,None,optional If two points in a line are separated by a distance larger than distance_threshold, the line is divided in two parts. Default is
5e-3(5mm), in which case the control is not performed.- minimum_via_number
int,optional The minimum number of points that a line must contain. Default is
6.- selected_angles
list[int,float] Specify angle in degrees to detected, for instance [0, 180] is only detecting horizontal and vertical lines. Other values can be assigned like 45 degrees. When None is provided all lines are detected. Default value is None.
- padstack_instances_id
List[int] List of padstack instances ID’s to include. If None, the algorithm will scan all padstack instances belonging to the specified net. Default value is None.
- net_name
- Returns:
- bool
List[int], list of created padstack instances id.
- EdbPadstacks.reduce_via_in_bounding_box(bounding_box, x_samples, y_samples, nets=None)#
reduce the number of vias intersecting bounding box and nets by x and y samples.
- Parameters:
- Returns:
- bool
Truewhen succeededFalsewhen failed. <
- static EdbPadstacks.dbscan(padstack: Dict[int, List[float]], max_distance: float = 0.001, min_samples: int = 5) Dict[int, List[str]]#
density based spatial clustering for padstack instances
- Parameters:
- padstackdict.
padstack id: [x, y]
- max_distance: float
maximum distance between two points to be included in one cluster
- min_samples: int
minimum number of points that a cluster must have
- Returns:
dictclusters {cluster label: [padstack ids]} <
- EdbPadstacks.reduce_via_by_density(padstacks: List[int], cell_size_x: float = 0.001, cell_size_y: float = 0.001, delete: bool = False) tuple[List[int], List[List[List[float]]]]#
Reduce the number of vias by density. Keep only one via which is closest to the center of the cell. The cells are automatically populated based on the input vias.
- Parameters:
- Returns: