Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/refactor-edb-cfg' into refactor-…
Browse files Browse the repository at this point in the history
…edb-cfg
  • Loading branch information
ring630 committed Oct 19, 2024
2 parents 4ecbe8d + ae21736 commit f21fbac
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 38 deletions.
46 changes: 23 additions & 23 deletions src/pyedb/configuration/cfg_padstacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def __init__(self, pedb, padstack_dict=None):
self.definitions = []
self.instances = []


if padstack_dict:
padstack_defs_layout = self._pedb.padstacks.definitions
for pdef in padstack_dict.get("definitions", []):
Expand Down Expand Up @@ -75,6 +74,7 @@ def retrieve_parameters_from_edb(self):

class Definition:
"""Padstack definition data class."""

PAD_SHAPE_PARAMETERS = {
"circle": ["diameter"],
"square": ["size"],
Expand Down Expand Up @@ -118,28 +118,28 @@ def retrieve_parameters_from_edb(self):
def _get_pad_parameters_from_edb(self):
"""Pad parameters.
Returns
-------
dict
params = {
'regular_pad': [
{'layer_name': '1_Top', 'shape': 'circle', 'offset_x': '0.1mm', 'offset_y': '0', 'rotation': '0',
'diameter': '0.5mm'}
],
'anti_pad': [
{'layer_name': '1_Top', 'shape': 'circle', 'offset_x': '0', 'offset_y': '0', 'rotation': '0',
'diameter': '1mm'}
],
'thermal_pad': [
{'layer_name': '1_Top', 'shape': 'round90', 'offset_x': '0', 'offset_y': '0', 'rotation': '0',
'inner': '1mm', 'channel_width': '0.2mm', 'isolation_gap': '0.3mm'},
],
'hole': [
{'layer_name': '1_Top', 'shape': 'circle', 'offset_x': '0', 'offset_y': '0', 'rotation': '0',
'diameter': '0.1499997mm'},
]
}
"""
Returns
-------
dict
params = {
'regular_pad': [
{'layer_name': '1_Top', 'shape': 'circle', 'offset_x': '0.1mm', 'offset_y': '0', 'rotation': '0',
'diameter': '0.5mm'}
],
'anti_pad': [
{'layer_name': '1_Top', 'shape': 'circle', 'offset_x': '0', 'offset_y': '0', 'rotation': '0',
'diameter': '1mm'}
],
'thermal_pad': [
{'layer_name': '1_Top', 'shape': 'round90', 'offset_x': '0', 'offset_y': '0', 'rotation': '0',
'inner': '1mm', 'channel_width': '0.2mm', 'isolation_gap': '0.3mm'},
],
'hole': [
{'layer_name': '1_Top', 'shape': 'circle', 'offset_x': '0', 'offset_y': '0', 'rotation': '0',
'diameter': '0.1499997mm'},
]
}
"""
pdef_data = self._pyedb_obj._padstack_def_data
pad_type_list = [
self._pedb._edb.Definition.PadType.RegularPad,
Expand Down
30 changes: 15 additions & 15 deletions src/pyedb/configuration/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,21 +308,21 @@ def get_data_from_db(self, **kwargs):
return data

def export(
self,
file_path,
stackup=True,
package_definitions=True,
setups=True,
sources=True,
ports=True,
nets=True,
pin_groups=True,
operations=True,
components=True,
boundaries=True,
s_parameters=True,
padstacks=True,
general=True,
self,
file_path,
stackup=True,
package_definitions=True,
setups=True,
sources=True,
ports=True,
nets=True,
pin_groups=True,
operations=True,
components=True,
boundaries=True,
s_parameters=True,
padstacks=True,
general=True,
):
"""Export the configuration data from layout to a file.
Expand Down

0 comments on commit f21fbac

Please sign in to comment.