CfgPadstacks#

class pyedb.configuration.cfg_padstacks.CfgPadstacks(/, **data: Any)#

Bases: pyedb.configuration.cfg_common.CfgBaseModel

Collect padstack definitions and instances for serialization.

Overview#

create

Create a CfgPadstacks from keyword arguments.

clean

Reset all padstack definitions and instances to empty lists.

get_definition

Return a CfgPadstackDefinition for an existing padstack definition.

get_instance

Return a CfgPadstackInstance for an existing padstack instance.

add_padstack_definition

Add a padstack definition from raw keyword arguments.

add_definition

Add a padstack definition with named parameters.

add_padstack_instance

Add a padstack instance from raw keyword arguments.

add_instance

Add a padstack instance.

definitions

instances

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Import detail#

from pyedb.configuration.cfg_padstacks import CfgPadstacks

Attribute detail#

CfgPadstacks.definitions: list[CfgPadstackDefinition] = None#
CfgPadstacks.instances: list[CfgPadstackInstance] = None#
CfgPadstacks.model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Method detail#

classmethod CfgPadstacks.create(pedb=None, **kwargs) CfgPadstacks#

Create a CfgPadstacks from keyword arguments.

CfgPadstacks.clean()#

Reset all padstack definitions and instances to empty lists.

CfgPadstacks.get_definition(name: str) CfgPadstackDefinition#

Return a CfgPadstackDefinition for an existing padstack definition.

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

Parameters:
namestr

Padstack definition name, e.g. "via_0.2".

Returns:
CfgPadstackDefinition

Definition builder pre-populated with current properties.

Raises:
KeyError

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

Examples

>>> cfg = edb.configuration.create_config_builder()
>>> via_def = cfg.padstacks.get_definition("via_0.2")
>>> via_def.hole_plating_thickness = "30um"
>>> edb.configuration.run(cfg)
CfgPadstacks.get_instance(name: str) CfgPadstackInstance#

Return a CfgPadstackInstance for an existing padstack instance.

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

Parameters:
namestr

Padstack instance AEDT name, e.g. "via_A1".

Returns:
CfgPadstackInstance

Instance builder pre-populated with current properties.

Raises:
KeyError

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

Examples

>>> cfg = edb.configuration.create_config_builder()
>>> via = cfg.padstacks.get_instance("via_A1")
>>> via.set_backdrill("L3", "0.25mm", drill_from_bottom=True)
>>> edb.configuration.run(cfg)
CfgPadstacks.add_padstack_definition(**kwargs)#

Add a padstack definition from raw keyword arguments.

Deprecated since version Use: add_definition() instead.

Parameters:
**kwargs

Arguments forwarded to add_definition().

Returns:
CfgPadstackDefinition
CfgPadstacks.add_definition(name: str, hole_plating_thickness=None, material=None, hole_range=None, hole_diameter=None, hole_shape='circle', hole_offset_x='0', hole_offset_y='0', pad_shape='circle', pad_diameter=None, pad_offset_x='0', pad_offset_y='0', pad_rotation='0', pad_x_size=None, pad_y_size=None, anti_pad_shape='circle', anti_pad_diameter=None, anti_pad_x_size=None, anti_pad_y_size=None, pad_layers=None, pad_parameters=None, hole_parameters=None, solder_ball_parameters=None)#

Add a padstack definition with named parameters.

Pad geometry can be specified either via the convenience arguments (which build the pad_parameters and hole_parameters dicts automatically) or by passing raw pad_parameters / hole_parameters dicts directly for full control.

Parameters:
namestr

Padstack definition name, e.g. "via_0.2".

hole_plating_thicknessstr or float, optional

Plating thickness, e.g. "25um".

materialstr, optional

Hole conductor material name, e.g. "copper".

hole_rangestr, optional

Layer range the hole spans. Accepted values:

  • "through" — hole goes fully through all layers.

  • "begin_on_upper_pad" — hole starts at the upper pad surface.

  • "end_on_lower_pad" — hole ends at the lower pad surface.

  • "upper_pad_to_lower_pad" (default) — upper pad to lower pad.

hole_diameterstr or float, optional

Drill hole diameter, e.g. "0.2mm". Used together with hole_shape when hole_parameters is not given.

hole_shapestr, optional

Hole geometry type. Default is "circle".

hole_offset_xstr, optional

Hole X offset. Default is "0".

hole_offset_ystr, optional

Hole Y offset. Default is "0".

pad_shapestr, optional

Regular-pad geometry type. Accepted values: "circle", "square", "rectangle", "oval", "bullet", "round45", "round90", "square45", "square90". Default is "circle".

pad_diameterstr or float, optional

Pad diameter (for "circle" shape), e.g. "0.5mm".

pad_offset_xstr, optional

Pad X offset. Default is "0".

pad_offset_ystr, optional

Pad Y offset. Default is "0".

pad_rotationstr, optional

Pad rotation angle. Default is "0".

pad_x_sizestr or float, optional

Pad X size for non-circular shapes ("rectangle", "oval", "bullet"), e.g. "0.5mm".

pad_y_sizestr or float, optional

Pad Y size for non-circular shapes.

anti_pad_shapestr, optional

Anti-pad geometry type. Default is "circle".

anti_pad_diameterstr or float, optional

Anti-pad diameter (for "circle" shape).

anti_pad_x_sizestr or float, optional

Anti-pad X size for non-circular shapes.

anti_pad_y_sizestr or float, optional

Anti-pad Y size for non-circular shapes.

pad_layerslist of str, optional

Layer names on which the pad geometry is applied. When None and a live EDB session is attached, all signal layers are used automatically. Only used when pad_parameters is not given.

pad_parametersdict, optional

Full raw pad-parameter dictionary. Overrides all convenience pad arguments above. Structure:

{
    "regular_pad": [
        {
            "layer_name": "1_Top",
            "shape": "circle",
            "diameter": "0.5mm",
            "offset_x": "0",
            "offset_y": "0",
            "rotation": "0",
        },
        ...,
    ],
    "anti_pad": [...],
    "thermal_pad": [...],
    "hole": [...],
}
hole_parametersdict, optional

Full raw hole-parameter dictionary. Overrides hole_diameter / hole_shape convenience args. Structure:

{"shape": "circle", "diameter": "0.2mm", "offset_x": "0", "offset_y": "0", "rotation": "0"}
solder_ball_parametersdict, optional

Raw solder-ball parameter dictionary.

Returns:
CfgPadstackDefinition

The newly created definition object.

Examples

Simple circular via on all signal layers (requires live session):

>>> cfg.padstacks.add_definition(
...     "via_0.2",
...     material="copper",
...     hole_plating_thickness="25um",
...     hole_diameter="0.2mm",
...     pad_diameter="0.5mm",
...     anti_pad_diameter="0.8mm",
... )

Blind via with explicit layers:

>>> cfg.padstacks.add_definition(
...     "via_blind",
...     hole_range="begin_on_upper_pad",
...     hole_diameter="0.15mm",
...     pad_diameter="0.35mm",
...     anti_pad_diameter="0.6mm",
...     pad_layers=["1_Top", "DE1"],
... )

Raw dict form for full control:

>>> cfg.padstacks.add_definition(
...     "via_custom",
...     pad_parameters={
...         "regular_pad": [
...             {
...                 "layer_name": "1_Top",
...                 "shape": "rectangle",
...                 "x_size": "0.5mm",
...                 "y_size": "0.3mm",
...                 "offset_x": "0",
...                 "offset_y": "0",
...                 "rotation": "0",
...             },
...         ],
...         "anti_pad": [
...             {
...                 "layer_name": "1_Top",
...                 "shape": "circle",
...                 "diameter": "0.8mm",
...                 "offset_x": "0",
...                 "offset_y": "0",
...                 "rotation": "0",
...             },
...         ],
...     },
...     hole_parameters={
...         "shape": "circle",
...         "diameter": "0.2mm",
...         "offset_x": "0",
...         "offset_y": "0",
...         "rotation": "0",
...     },
... )
CfgPadstacks.add_padstack_instance(**kwargs)#

Add a padstack instance from raw keyword arguments.

Deprecated since version Use: add_instance() instead.

Parameters:
**kwargs

Arguments forwarded to add_instance().

Returns:
CfgPadstackInstance
CfgPadstacks.add_instance(name: str = None, net_name: str = None, definition: str = None, layer_range: list = None, position: list = None, rotation: str | float = None, is_pin: bool = False, hole_override_enabled: bool = None, hole_override_diameter: str | float = None, solder_ball_layer: str = None, eid: int = None, backdrill_parameters: CfgBackdrillParameters = None) CfgPadstackInstance#

Add a padstack instance.

Parameters:
namestr, optional

AEDT name of the padstack instance, e.g. "via_A1".

net_namestr, optional

Net the instance belongs to, e.g. "GND".

definitionstr, optional

Padstack definition name, e.g. "via_0.2".

layer_rangelist of str, optional

[start_layer, stop_layer], e.g. ["1_Top", "16_Bottom"].

positionlist, optional

[x, y] position in metres or as unit strings.

rotationstr or float, optional

Rotation angle in degrees.

is_pinbool, optional

Whether this instance is a component pin. Default is False.

hole_override_enabledbool, optional

Enable hole-size override.

hole_override_diameterstr or float, optional

Override diameter value, e.g. "0.3mm".

solder_ball_layerstr, optional

Layer on which the solder ball is placed.

eidint, optional

EDB element ID.

backdrill_parametersCfgBackdrillParameters, optional

Pre-built backdrill descriptor. Call CfgPadstackInstance.set_backdrill() on the returned object to add backdrill geometry after creation.

Returns:
CfgPadstackInstance

The newly created instance object.

Examples

>>> via = cfg.padstacks.add_instance(name="v1", net_name="GND", layer_range=["1_Top", "16_Bottom"])
>>> via.set_backdrill("L3", "0.25mm", drill_from_bottom=True)