pyedb 0.43.0__py3-none-any.whl → 0.45.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pyedb might be problematic. Click here for more details.
- pyedb/__init__.py +1 -1
- pyedb/configuration/cfg_boundaries.py +21 -15
- pyedb/configuration/cfg_components.py +8 -8
- pyedb/configuration/cfg_general.py +14 -6
- pyedb/configuration/cfg_modeler.py +8 -0
- pyedb/configuration/cfg_operations.py +40 -1
- pyedb/configuration/cfg_package_definition.py +41 -1
- pyedb/configuration/cfg_padstacks.py +611 -256
- pyedb/configuration/cfg_pin_groups.py +1 -1
- pyedb/configuration/cfg_ports_sources.py +234 -66
- pyedb/configuration/cfg_s_parameter_models.py +81 -1
- pyedb/configuration/cfg_setup.py +167 -33
- pyedb/configuration/cfg_stackup.py +44 -0
- pyedb/configuration/configuration.py +13 -3
- pyedb/dotnet/database/cell/primitive/path.py +12 -0
- pyedb/dotnet/database/edb_data/design_options.py +19 -1
- pyedb/dotnet/database/edb_data/padstacks_data.py +9 -4
- pyedb/dotnet/database/geometry/point_data.py +26 -0
- pyedb/dotnet/database/geometry/polygon_data.py +13 -2
- pyedb/dotnet/database/nets.py +13 -3
- pyedb/dotnet/database/padstack.py +6 -2
- pyedb/dotnet/database/utilities/simulation_setup.py +7 -17
- pyedb/dotnet/database/utilities/siwave_simulation_setup.py +30 -0
- pyedb/dotnet/edb.py +41 -18
- pyedb/grpc/database/components.py +2 -3
- pyedb/grpc/database/definition/component_def.py +15 -0
- pyedb/grpc/database/definition/component_pin.py +1 -1
- pyedb/grpc/database/definition/materials.py +27 -0
- pyedb/grpc/database/definition/package_def.py +20 -2
- pyedb/grpc/database/definition/padstack_def.py +5 -2
- pyedb/grpc/database/hfss.py +10 -1
- pyedb/grpc/database/hierarchy/component.py +4 -2
- pyedb/grpc/database/hierarchy/pingroup.py +12 -8
- pyedb/grpc/database/layers/layer.py +28 -0
- pyedb/grpc/database/layers/stackup_layer.py +281 -40
- pyedb/grpc/database/layout/layout.py +12 -6
- pyedb/grpc/database/layout_validation.py +2 -2
- pyedb/grpc/database/modeler.py +8 -8
- pyedb/grpc/database/padstacks.py +15 -9
- pyedb/grpc/database/ports/ports.py +3 -3
- pyedb/grpc/database/primitive/bondwire.py +3 -3
- pyedb/grpc/database/primitive/circle.py +1 -1
- pyedb/grpc/database/primitive/padstack_instance.py +13 -3
- pyedb/grpc/database/primitive/path.py +2 -2
- pyedb/grpc/database/primitive/polygon.py +3 -3
- pyedb/grpc/database/primitive/primitive.py +1 -1
- pyedb/grpc/database/primitive/rectangle.py +2 -2
- pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +78 -30
- pyedb/grpc/database/simulation_setup/siwave_simulation_setup.py +73 -30
- pyedb/grpc/database/simulation_setup/sweep_data.py +12 -1
- pyedb/grpc/database/siwave.py +10 -1
- pyedb/grpc/database/source_excitations.py +19 -9
- pyedb/grpc/database/stackup.py +26 -10
- pyedb/grpc/database/terminal/bundle_terminal.py +3 -3
- pyedb/grpc/database/terminal/edge_terminal.py +95 -2
- pyedb/grpc/database/terminal/padstack_instance_terminal.py +42 -2
- pyedb/grpc/database/terminal/pingroup_terminal.py +48 -2
- pyedb/grpc/database/terminal/point_terminal.py +10 -1
- pyedb/grpc/database/terminal/terminal.py +4 -4
- pyedb/grpc/database/utility/hfss_extent_info.py +14 -10
- pyedb/grpc/edb.py +21 -17
- pyedb/grpc/edb_init.py +19 -15
- pyedb/grpc/rpc_session.py +11 -8
- pyedb/misc/misc.py +13 -0
- {pyedb-0.43.0.dist-info → pyedb-0.45.0.dist-info}/METADATA +6 -6
- {pyedb-0.43.0.dist-info → pyedb-0.45.0.dist-info}/RECORD +68 -68
- {pyedb-0.43.0.dist-info → pyedb-0.45.0.dist-info}/LICENSE +0 -0
- {pyedb-0.43.0.dist-info → pyedb-0.45.0.dist-info}/WHEEL +0 -0
pyedb/__init__.py
CHANGED
|
@@ -79,7 +79,7 @@ class CfgBoundaries(CfgBase):
|
|
|
79
79
|
if self.air_box_horizontal_padding:
|
|
80
80
|
self._pedb.hfss.hfss_extent_info.air_box_horizontal_extent = float(self.air_box_horizontal_padding)
|
|
81
81
|
if self.air_box_positive_vertical_padding:
|
|
82
|
-
self._pedb.hfss.hfss_extent_info.
|
|
82
|
+
self._pedb.hfss.hfss_extent_info.air_box_positive_vertical_extent = float(
|
|
83
83
|
self.air_box_positive_vertical_padding
|
|
84
84
|
)
|
|
85
85
|
if self.air_box_negative_vertical_padding:
|
|
@@ -88,20 +88,26 @@ class CfgBoundaries(CfgBase):
|
|
|
88
88
|
)
|
|
89
89
|
|
|
90
90
|
def get_parameters_from_edb(self):
|
|
91
|
-
self.open_region = self._pedb.hfss.hfss_extent_info.use_open_region
|
|
92
|
-
self.open_region_type = self._pedb.hfss.hfss_extent_info.open_region_type
|
|
93
|
-
self.pml_visible = self._pedb.hfss.hfss_extent_info.is_pml_visible
|
|
94
|
-
self.pml_operation_frequency = self._pedb.hfss.hfss_extent_info.operating_freq
|
|
95
|
-
self.pml_radiation_factor = self._pedb.hfss.hfss_extent_info.pml_radiation_factor
|
|
96
|
-
self.dielectric_extent_type = self._pedb.hfss.hfss_extent_info.extent_type
|
|
97
|
-
self.horizontal_padding = self._pedb.hfss.hfss_extent_info.dielectric_extent_size
|
|
98
|
-
self.honor_primitives_on_dielectric_layers = self._pedb.hfss.hfss_extent_info.honor_user_dielectric
|
|
99
|
-
self.air_box_extent_type = self._pedb.hfss.hfss_extent_info.extent_type
|
|
100
|
-
self.air_box_truncate_model_ground_layers =
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
self.
|
|
104
|
-
|
|
91
|
+
self.parent.open_region = self._pedb.hfss.hfss_extent_info.use_open_region
|
|
92
|
+
self.parent.open_region_type = self._pedb.hfss.hfss_extent_info.open_region_type
|
|
93
|
+
self.parent.pml_visible = self._pedb.hfss.hfss_extent_info.is_pml_visible
|
|
94
|
+
self.parent.pml_operation_frequency = self._pedb.hfss.hfss_extent_info.operating_freq
|
|
95
|
+
self.parent.pml_radiation_factor = self._pedb.hfss.hfss_extent_info.pml_radiation_factor
|
|
96
|
+
self.parent.dielectric_extent_type = self._pedb.hfss.hfss_extent_info.extent_type
|
|
97
|
+
self.parent.horizontal_padding = self._pedb.hfss.hfss_extent_info.dielectric_extent_size
|
|
98
|
+
self.parent.honor_primitives_on_dielectric_layers = self._pedb.hfss.hfss_extent_info.honor_user_dielectric
|
|
99
|
+
self.parent.air_box_extent_type = self._pedb.hfss.hfss_extent_info.extent_type
|
|
100
|
+
self.parent.air_box_truncate_model_ground_layers = (
|
|
101
|
+
self._pedb.hfss.hfss_extent_info.truncate_air_box_at_ground
|
|
102
|
+
)
|
|
103
|
+
self.parent.air_box_horizontal_padding = self._pedb.hfss.hfss_extent_info.air_box_horizontal_extent
|
|
104
|
+
self.parent.air_box_positive_vertical_padding = (
|
|
105
|
+
self._pedb.hfss.hfss_extent_info.air_box_positive_vertical_extent
|
|
106
|
+
)
|
|
107
|
+
self.parent.air_box_negative_vertical_padding = (
|
|
108
|
+
self._pedb.hfss.hfss_extent_info.air_box_negative_vertical_extent
|
|
109
|
+
)
|
|
110
|
+
return self.parent.get_attributes(exclude="boundary_data")
|
|
105
111
|
|
|
106
112
|
class DotNet(Grpc):
|
|
107
113
|
def __init__(self, parent):
|
|
@@ -136,9 +136,9 @@ class CfgComponent(CfgBase):
|
|
|
136
136
|
die_type = pascal_to_snake(ic_die_prop.die_type.name)
|
|
137
137
|
temp["type"] = die_type
|
|
138
138
|
if not die_type == "no_die":
|
|
139
|
-
temp["orientation"] =
|
|
139
|
+
temp["orientation"] = ic_die_prop.die_orientation.name.lower()
|
|
140
140
|
if die_type == "wire_bond":
|
|
141
|
-
temp["height"] = ic_die_prop.height.value
|
|
141
|
+
temp["height"] = str(ic_die_prop.height.value)
|
|
142
142
|
|
|
143
143
|
self.parent.ic_die_properties = temp
|
|
144
144
|
|
|
@@ -183,10 +183,10 @@ class CfgComponent(CfgBase):
|
|
|
183
183
|
uses_solder_ball = solder_ball_prop.uses_solderball
|
|
184
184
|
|
|
185
185
|
temp["uses_solder_ball"] = uses_solder_ball
|
|
186
|
-
temp["shape"] =
|
|
187
|
-
temp["diameter"] = diam
|
|
188
|
-
temp["mid_diameter"] = mid_diam
|
|
189
|
-
temp["height"] = height
|
|
186
|
+
temp["shape"] = shape.lower()
|
|
187
|
+
temp["diameter"] = str(diam)
|
|
188
|
+
temp["mid_diameter"] = str(mid_diam)
|
|
189
|
+
temp["height"] = str(height)
|
|
190
190
|
temp["material"] = material
|
|
191
191
|
|
|
192
192
|
self.parent.solder_ball_properties = temp
|
|
@@ -262,7 +262,7 @@ class CfgComponent(CfgBase):
|
|
|
262
262
|
def set_parameters_to_edb(self):
|
|
263
263
|
if self.parent.type:
|
|
264
264
|
self.pyedb_obj.type = self.parent.type
|
|
265
|
-
if self.parent.enabled:
|
|
265
|
+
if self.parent.enabled is not None:
|
|
266
266
|
self.pyedb_obj.enabled = self.parent.enabled
|
|
267
267
|
|
|
268
268
|
self._set_model_properties_to_edb()
|
|
@@ -495,7 +495,7 @@ class CfgComponent(CfgBase):
|
|
|
495
495
|
|
|
496
496
|
self.port_properties = kwargs.get("port_properties", {})
|
|
497
497
|
self.solder_ball_properties = kwargs.get("solder_ball_properties", {})
|
|
498
|
-
self.ic_die_properties = kwargs.get("ic_die_properties", {})
|
|
498
|
+
self.ic_die_properties = kwargs.get("ic_die_properties", {"type": "no_die"})
|
|
499
499
|
self.pin_pair_model = kwargs.get("pin_pair_model", [])
|
|
500
500
|
self.spice_model = kwargs.get("spice_model", {})
|
|
501
501
|
self.s_parameter_model = kwargs.get("s_parameter_model", {})
|
|
@@ -34,8 +34,8 @@ class CfgGeneral:
|
|
|
34
34
|
self.pedb.active_cell.suppress_pads = self.parent.suppress_pads
|
|
35
35
|
|
|
36
36
|
def get_parameters_from_edb(self):
|
|
37
|
-
anti_pads_always_on = self.pedb.
|
|
38
|
-
suppress_pads = self.pedb.
|
|
37
|
+
anti_pads_always_on = self.pedb.active_cell.anti_pads_always_on
|
|
38
|
+
suppress_pads = self.pedb.active_cell.suppress_pads
|
|
39
39
|
data = {"anti_pads_always_on": anti_pads_always_on, "suppress_pads": suppress_pads}
|
|
40
40
|
return data
|
|
41
41
|
|
|
@@ -44,8 +44,16 @@ class CfgGeneral:
|
|
|
44
44
|
super().__init__(parent)
|
|
45
45
|
|
|
46
46
|
def set_parameters_to_edb(self):
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
if self.parent.anti_pads_always_on is not None:
|
|
48
|
+
self.pedb.design_options.anti_pads_always_on = self.parent.anti_pads_always_on
|
|
49
|
+
if self.parent.suppress_pads is not None:
|
|
50
|
+
self.pedb.design_options.suppress_pads = self.parent.suppress_pads
|
|
51
|
+
|
|
52
|
+
def get_parameters_from_edb(self):
|
|
53
|
+
anti_pads_always_on = self.pedb.design_options.antipads_always_on
|
|
54
|
+
suppress_pads = self.pedb.design_options.suppress_pads
|
|
55
|
+
data = {"anti_pads_always_on": anti_pads_always_on, "suppress_pads": suppress_pads}
|
|
56
|
+
return data
|
|
49
57
|
|
|
50
58
|
def __init__(self, pedb, data):
|
|
51
59
|
self.pedb = pedb
|
|
@@ -55,8 +63,8 @@ class CfgGeneral:
|
|
|
55
63
|
self.api = self.DotNet(self)
|
|
56
64
|
self.spice_model_library = data.get("spice_model_library", "")
|
|
57
65
|
self.s_parameter_library = data.get("s_parameter_library", "")
|
|
58
|
-
self.anti_pads_always_on = data.get("anti_pads_always_on",
|
|
59
|
-
self.suppress_pads = data.get("suppress_pads",
|
|
66
|
+
self.anti_pads_always_on = data.get("anti_pads_always_on", None)
|
|
67
|
+
self.suppress_pads = data.get("suppress_pads", None)
|
|
60
68
|
|
|
61
69
|
def apply(self):
|
|
62
70
|
self.api.set_parameters_to_edb()
|
|
@@ -141,6 +141,11 @@ class CfgModeler:
|
|
|
141
141
|
c.pyedb_obj = obj
|
|
142
142
|
c.api.set_parameters_to_edb()
|
|
143
143
|
|
|
144
|
+
def delete_primitives(self):
|
|
145
|
+
primitives = self._pedb.layout.find_primitive(**self.parent.primitives_to_delete)
|
|
146
|
+
for i in primitives:
|
|
147
|
+
i.delete()
|
|
148
|
+
|
|
144
149
|
class DotNet(Grpc):
|
|
145
150
|
def __init__(self, parent):
|
|
146
151
|
super().__init__(parent)
|
|
@@ -175,6 +180,7 @@ class CfgModeler:
|
|
|
175
180
|
net_name=p.net_name,
|
|
176
181
|
position=p.position,
|
|
177
182
|
definition_name=p.definition,
|
|
183
|
+
rotation=p.rotation if p.rotation is not None else 0,
|
|
178
184
|
)
|
|
179
185
|
p.pyedb_obj = p_inst
|
|
180
186
|
p.api.set_parameters_to_edb()
|
|
@@ -229,6 +235,8 @@ class CfgModeler:
|
|
|
229
235
|
]
|
|
230
236
|
self.planes = [CfgPlane(**i) for i in data.get("planes", [])]
|
|
231
237
|
self.components = [CfgComponent(self._pedb, None, **i) for i in data.get("components", [])]
|
|
238
|
+
self.primitives_to_delete = data.get("primitives_to_delete", {"layer_name": [], "name": [], "net_name": []})
|
|
232
239
|
|
|
233
240
|
def apply(self):
|
|
234
241
|
self.api.set_parameter_to_edb()
|
|
242
|
+
self.api.delete_primitives()
|
|
@@ -56,6 +56,9 @@ class CfgCutout(CfgBase):
|
|
|
56
56
|
self.api = self.Grpc(self)
|
|
57
57
|
else:
|
|
58
58
|
self.api = self.DotNet(self)
|
|
59
|
+
self.auto_identify_nets = kwargs.get(
|
|
60
|
+
"auto_identify_nets", {"enabled": False, "resistor_below": 100, "inductor_below": 1, "capacitor_above": 1}
|
|
61
|
+
)
|
|
59
62
|
self.signal_list = kwargs.get("signal_list")
|
|
60
63
|
self.reference_list = kwargs.get("reference_list")
|
|
61
64
|
self.extent_type = kwargs.get("extent_type")
|
|
@@ -99,7 +102,43 @@ class CfgOperations(CfgBase):
|
|
|
99
102
|
|
|
100
103
|
def apply_on_edb(self):
|
|
101
104
|
if self.parent.op_cutout:
|
|
102
|
-
|
|
105
|
+
cutout_params = self.parent.op_cutout.get_attributes()
|
|
106
|
+
auto_identify_nets = cutout_params.pop("auto_identify_nets")
|
|
107
|
+
if auto_identify_nets["enabled"]:
|
|
108
|
+
reference_list = cutout_params.get("reference_list", [])
|
|
109
|
+
if auto_identify_nets:
|
|
110
|
+
self._pedb.nets.generate_extended_nets(
|
|
111
|
+
auto_identify_nets["resistor_below"],
|
|
112
|
+
auto_identify_nets["inductor_below"],
|
|
113
|
+
auto_identify_nets["capacitor_above"],
|
|
114
|
+
auto_identify_nets.get("exception_list", []),
|
|
115
|
+
)
|
|
116
|
+
signal_nets = []
|
|
117
|
+
for i in self._pedb.ports.values():
|
|
118
|
+
# Positive terminal
|
|
119
|
+
extended_net = i.net.extended_net
|
|
120
|
+
if extended_net:
|
|
121
|
+
temp = [i2 for i2 in extended_net.nets.keys() if i2 not in reference_list]
|
|
122
|
+
temp = [i2 for i2 in temp if i2 not in signal_nets]
|
|
123
|
+
signal_nets.extend(temp)
|
|
124
|
+
else:
|
|
125
|
+
signal_nets.append(i.net.name)
|
|
126
|
+
|
|
127
|
+
# Negative terminal
|
|
128
|
+
ref_net = i.ref_terminal.net if i.ref_terminal else None
|
|
129
|
+
if ref_net is None:
|
|
130
|
+
continue
|
|
131
|
+
elif ref_net.name not in reference_list:
|
|
132
|
+
extended_net = ref_net.extended_net
|
|
133
|
+
if extended_net:
|
|
134
|
+
temp = [i2 for i2 in extended_net.nets.keys() if i2 not in reference_list]
|
|
135
|
+
temp = [i2 for i2 in temp if i2 not in signal_nets]
|
|
136
|
+
signal_nets.extend(temp)
|
|
137
|
+
else:
|
|
138
|
+
signal_nets.append(ref_net.name)
|
|
139
|
+
|
|
140
|
+
cutout_params["signal_list"] = signal_nets
|
|
141
|
+
polygon_points = self._pedb.cutout(**cutout_params)
|
|
103
142
|
if "pyedb_cutout" not in self._pedb.stackup.all_layers:
|
|
104
143
|
self._pedb.stackup.add_document_layer(name="pyedb_cutout")
|
|
105
144
|
self._pedb.modeler.create_polygon(
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
23
|
from pyedb.configuration.cfg_common import CfgBase
|
|
24
|
-
from pyedb.dotnet.database.definition.package_def import PackageDef
|
|
25
24
|
|
|
26
25
|
|
|
27
26
|
class CfgPackage(CfgBase):
|
|
@@ -70,6 +69,8 @@ class CfgPackageDefinitions:
|
|
|
70
69
|
self._pedb = parent._pedb
|
|
71
70
|
|
|
72
71
|
def set_parameter_to_edb(self):
|
|
72
|
+
from pyedb.grpc.database.definition.package_def import PackageDef
|
|
73
|
+
|
|
73
74
|
for pkg in self.parent.packages:
|
|
74
75
|
comp_def_from_db = self._pedb.definitions.component[pkg.component_definition]
|
|
75
76
|
if pkg.name in self._pedb.definitions.package:
|
|
@@ -130,6 +131,45 @@ class CfgPackageDefinitions:
|
|
|
130
131
|
def __init__(self, parent):
|
|
131
132
|
super().__init__(parent)
|
|
132
133
|
|
|
134
|
+
def set_parameter_to_edb(self):
|
|
135
|
+
from pyedb.dotnet.database.definition.package_def import PackageDef
|
|
136
|
+
|
|
137
|
+
for pkg in self.parent.packages:
|
|
138
|
+
comp_def_from_db = self._pedb.definitions.component[pkg.component_definition]
|
|
139
|
+
if pkg.name in self._pedb.definitions.package:
|
|
140
|
+
self._pedb.definitions.package[pkg.name].delete()
|
|
141
|
+
|
|
142
|
+
if pkg.extent_bounding_box:
|
|
143
|
+
package_def = PackageDef(self._pedb, name=pkg.name, extent_bounding_box=pkg.extent_bounding_box)
|
|
144
|
+
else:
|
|
145
|
+
package_def = PackageDef(self._pedb, name=pkg.name, component_part_name=pkg.component_definition)
|
|
146
|
+
pkg.set_attributes(package_def)
|
|
147
|
+
|
|
148
|
+
if pkg.heatsink:
|
|
149
|
+
attrs = pkg.heatsink.get_attributes()
|
|
150
|
+
for attr, value in attrs.items():
|
|
151
|
+
package_def.set_heatsink(**attrs)
|
|
152
|
+
|
|
153
|
+
comp_list = dict()
|
|
154
|
+
if pkg.apply_to_all:
|
|
155
|
+
comp_list.update(
|
|
156
|
+
{
|
|
157
|
+
refdes: comp
|
|
158
|
+
for refdes, comp in comp_def_from_db.components.items()
|
|
159
|
+
if refdes not in pkg.components
|
|
160
|
+
}
|
|
161
|
+
)
|
|
162
|
+
else:
|
|
163
|
+
comp_list.update(
|
|
164
|
+
{
|
|
165
|
+
refdes: comp
|
|
166
|
+
for refdes, comp in comp_def_from_db.components.items()
|
|
167
|
+
if refdes in pkg.components
|
|
168
|
+
}
|
|
169
|
+
)
|
|
170
|
+
for _, i in comp_list.items():
|
|
171
|
+
i.package_def = pkg.name
|
|
172
|
+
|
|
133
173
|
def __init__(self, pedb, data):
|
|
134
174
|
self._pedb = pedb
|
|
135
175
|
if self._pedb.grpc:
|