CfgPadstacks#
- class pyedb.configuration.cfg_padstacks.CfgPadstacks(/, **data: Any)#
Bases:
pyedb.configuration.cfg_common.CfgBaseModelCollect padstack definitions and instances for serialization.
Overview#
Create a |
Reset all padstack definitions and instances to empty lists. |
|
Return a |
|
Return a |
|
Add a padstack definition from raw keyword arguments. |
|
Add a padstack definition with named parameters. |
|
Add a padstack instance from raw keyword arguments. |
|
Add a padstack instance. |
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
CfgPadstacksfrom keyword arguments.
- CfgPadstacks.clean()#
Reset all padstack definitions and instances to empty lists.
- CfgPadstacks.get_definition(name: str) CfgPadstackDefinition#
Return a
CfgPadstackDefinitionfor 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:
- name
str Padstack definition name, e.g.
"via_0.2".
- name
- Returns:
CfgPadstackDefinitionDefinition builder pre-populated with current properties.
- Raises:
KeyErrorIf 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
CfgPadstackInstancefor 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:
- name
str Padstack instance AEDT name, e.g.
"via_A1".
- name
- Returns:
CfgPadstackInstanceInstance builder pre-populated with current properties.
- Raises:
KeyErrorIf 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_parametersandhole_parametersdicts automatically) or by passing rawpad_parameters/hole_parametersdicts directly for full control.- Parameters:
- name
str Padstack definition name, e.g.
"via_0.2".- hole_plating_thickness
strorfloat,optional Plating thickness, e.g.
"25um".- material
str,optional Hole conductor material name, e.g.
"copper".- hole_range
str,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_diameter
strorfloat,optional Drill hole diameter, e.g.
"0.2mm". Used together with hole_shape when hole_parameters is not given.- hole_shape
str,optional Hole geometry type. Default is
"circle".- hole_offset_x
str,optional Hole X offset. Default is
"0".- hole_offset_y
str,optional Hole Y offset. Default is
"0".- pad_shape
str,optional Regular-pad geometry type. Accepted values:
"circle","square","rectangle","oval","bullet","round45","round90","square45","square90". Default is"circle".- pad_diameter
strorfloat,optional Pad diameter (for
"circle"shape), e.g."0.5mm".- pad_offset_x
str,optional Pad X offset. Default is
"0".- pad_offset_y
str,optional Pad Y offset. Default is
"0".- pad_rotation
str,optional Pad rotation angle. Default is
"0".- pad_x_size
strorfloat,optional Pad X size for non-circular shapes (
"rectangle","oval","bullet"), e.g."0.5mm".- pad_y_size
strorfloat,optional Pad Y size for non-circular shapes.
- anti_pad_shape
str,optional Anti-pad geometry type. Default is
"circle".- anti_pad_diameter
strorfloat,optional Anti-pad diameter (for
"circle"shape).- anti_pad_x_size
strorfloat,optional Anti-pad X size for non-circular shapes.
- anti_pad_y_size
strorfloat,optional Anti-pad Y size for non-circular shapes.
- pad_layers
listofstr,optional Layer names on which the pad geometry is applied. When
Noneand a live EDB session is attached, all signal layers are used automatically. Only used when pad_parameters is not given.- pad_parameters
dict,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_parameters
dict,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_parameters
dict,optional Raw solder-ball parameter dictionary.
- name
- Returns:
CfgPadstackDefinitionThe 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:
- name
str,optional AEDT name of the padstack instance, e.g.
"via_A1".- net_name
str,optional Net the instance belongs to, e.g.
"GND".- definition
str,optional Padstack definition name, e.g.
"via_0.2".- layer_range
listofstr,optional [start_layer, stop_layer], e.g.["1_Top", "16_Bottom"].- position
list,optional [x, y]position in metres or as unit strings.- rotation
strorfloat,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_diameter
strorfloat,optional Override diameter value, e.g.
"0.3mm".- solder_ball_layer
str,optional Layer on which the solder ball is placed.
- eid
int,optional EDB element ID.
- backdrill_parameters
CfgBackdrillParameters,optional Pre-built backdrill descriptor. Call
CfgPadstackInstance.set_backdrill()on the returned object to add backdrill geometry after creation.
- name
- Returns:
CfgPadstackInstanceThe 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)