pyedb 0.13.dev0__py3-none-any.whl → 0.15.dev0__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_common.py +0 -5
- pyedb/configuration/cfg_components.py +0 -2
- pyedb/configuration/cfg_operations.py +0 -2
- pyedb/configuration/cfg_package_definition.py +0 -2
- pyedb/configuration/cfg_ports_sources.py +14 -11
- pyedb/configuration/cfg_stackup.py +0 -7
- pyedb/configuration/configuration.py +0 -6
- pyedb/dotnet/application/Variables.py +4 -40
- pyedb/dotnet/edb.py +27 -82
- pyedb/dotnet/edb_core/{edb_data/components_data.py → cell/hierarchy/component.py} +13 -133
- pyedb/dotnet/edb_core/cell/hierarchy/model.py +0 -3
- pyedb/dotnet/edb_core/cell/hierarchy/netlist_model.py +30 -0
- pyedb/dotnet/edb_core/cell/hierarchy/pin_pair_model.py +105 -0
- pyedb/dotnet/edb_core/cell/hierarchy/s_parameter_model.py +34 -0
- pyedb/dotnet/edb_core/cell/hierarchy/spice_model.py +34 -0
- pyedb/dotnet/edb_core/cell/layout.py +137 -0
- pyedb/dotnet/edb_core/cell/layout_obj.py +2 -4
- pyedb/dotnet/edb_core/cell/primitive.py +199 -1
- pyedb/dotnet/edb_core/cell/terminal/bundle_terminal.py +52 -0
- pyedb/dotnet/edb_core/cell/terminal/edge_terminal.py +50 -0
- pyedb/dotnet/edb_core/cell/terminal/padstack_instance_terminal.py +88 -0
- pyedb/dotnet/edb_core/cell/terminal/pingroup_terminal.py +59 -0
- pyedb/dotnet/edb_core/cell/terminal/point_terminal.py +73 -0
- pyedb/dotnet/edb_core/{edb_data/terminals.py → cell/terminal/terminal.py} +33 -242
- pyedb/dotnet/edb_core/components.py +10 -56
- pyedb/dotnet/edb_core/definition/component_def.py +1 -8
- pyedb/dotnet/edb_core/definition/component_model.py +0 -2
- pyedb/dotnet/edb_core/definition/definitions.py +0 -2
- pyedb/dotnet/edb_core/definition/package_def.py +7 -5
- pyedb/dotnet/edb_core/edb_data/control_file.py +0 -3
- pyedb/dotnet/edb_core/edb_data/hfss_extent_info.py +0 -5
- pyedb/dotnet/edb_core/edb_data/hfss_pi_simulation_setup_data.py +4 -9
- pyedb/dotnet/edb_core/edb_data/layer_data.py +0 -7
- pyedb/dotnet/edb_core/edb_data/nets_data.py +2 -5
- pyedb/dotnet/edb_core/edb_data/padstacks_data.py +11 -29
- pyedb/dotnet/edb_core/edb_data/ports.py +4 -4
- pyedb/dotnet/edb_core/edb_data/primitives_data.py +3 -26
- pyedb/dotnet/edb_core/edb_data/raptor_x_simulation_setup_data.py +13 -20
- pyedb/dotnet/edb_core/edb_data/simulation_configuration.py +3 -11
- pyedb/dotnet/edb_core/edb_data/sources.py +12 -17
- pyedb/dotnet/edb_core/general.py +1 -6
- pyedb/dotnet/edb_core/geometry/polygon_data.py +0 -3
- pyedb/dotnet/edb_core/hfss.py +1 -33
- pyedb/dotnet/edb_core/layout.py +0 -35
- pyedb/dotnet/edb_core/layout_validation.py +1 -3
- pyedb/dotnet/edb_core/materials.py +1 -22
- pyedb/dotnet/edb_core/net_class.py +0 -8
- pyedb/dotnet/edb_core/nets.py +4 -29
- pyedb/dotnet/edb_core/padstack.py +76 -30
- pyedb/dotnet/edb_core/sim_setup_data/data/adaptive_frequency_data.py +72 -0
- pyedb/dotnet/edb_core/sim_setup_data/data/mesh_operation.py +287 -0
- pyedb/dotnet/edb_core/{edb_data/hfss_simulation_setup_data.py → sim_setup_data/data/settings.py} +174 -878
- pyedb/dotnet/edb_core/sim_setup_data/data/sweep_data.py +509 -0
- pyedb/dotnet/edb_core/sim_setup_data/io/__init__.py +0 -0
- pyedb/dotnet/edb_core/{edb_data/siwave_simulation_setup_data.py → sim_setup_data/io/siwave.py} +0 -341
- pyedb/dotnet/edb_core/siwave.py +5 -33
- pyedb/dotnet/edb_core/stackup.py +4 -51
- pyedb/dotnet/edb_core/utilities/simulation_setup.py +613 -366
- pyedb/generic/data_handlers.py +1 -9
- pyedb/generic/general_methods.py +3 -53
- pyedb/generic/plot.py +1 -2
- pyedb/ipc2581/ecad/cad_data/layer_feature.py +1 -7
- pyedb/ipc2581/ecad/cad_data/package.py +1 -4
- pyedb/ipc2581/ecad/cad_data/path.py +1 -3
- pyedb/ipc2581/ecad/cad_data/polygon.py +1 -6
- pyedb/ipc2581/ecad/cad_data/step.py +1 -10
- pyedb/ipc2581/ipc2581.py +8 -15
- pyedb/modeler/geometry_operators.py +164 -67
- pyedb/siwave.py +25 -32
- {pyedb-0.13.dev0.dist-info → pyedb-0.15.dev0.dist-info}/METADATA +2 -2
- {pyedb-0.13.dev0.dist-info → pyedb-0.15.dev0.dist-info}/RECORD +75 -61
- /pyedb/dotnet/edb_core/cell/{__init__.py → terminal/__init__.py} +0 -0
- {pyedb-0.13.dev0.dist-info → pyedb-0.15.dev0.dist-info}/LICENSE +0 -0
- {pyedb-0.13.dev0.dist-info → pyedb-0.15.dev0.dist-info}/WHEEL +0 -0
|
@@ -25,7 +25,6 @@ from pyedb.dotnet.edb_core.cell.layout_obj import Connectable
|
|
|
25
25
|
|
|
26
26
|
class Primitive(Connectable):
|
|
27
27
|
"""Manages EDB functionalities for a primitives.
|
|
28
|
-
|
|
29
28
|
It inherits EDB Object properties.
|
|
30
29
|
|
|
31
30
|
Examples
|
|
@@ -44,6 +43,21 @@ class Primitive(Connectable):
|
|
|
44
43
|
self._core_net = pedb.nets
|
|
45
44
|
self.primitive_object = self._edb_object
|
|
46
45
|
|
|
46
|
+
bondwire_type = self._pedb._edb.Cell.Primitive.BondwireType
|
|
47
|
+
self._bondwire_type = {
|
|
48
|
+
"invalid": bondwire_type.Invalid,
|
|
49
|
+
"apd": bondwire_type.ApdBondwire,
|
|
50
|
+
"jedec_4": bondwire_type.Jedec4Bondwire,
|
|
51
|
+
"jedec_5": bondwire_type.Jedec5Bondwire,
|
|
52
|
+
"num_of_bondwire_type": bondwire_type.NumOfBondwireType,
|
|
53
|
+
}
|
|
54
|
+
bondwire_cross_section_type = self._pedb._edb.Cell.Primitive.BondwireCrossSectionType
|
|
55
|
+
self._bondwire_cross_section_type = {
|
|
56
|
+
"invalid": bondwire_cross_section_type.Invalid,
|
|
57
|
+
"round": bondwire_cross_section_type.BondwireRound,
|
|
58
|
+
"rectangle": bondwire_cross_section_type.BondwireRectangle,
|
|
59
|
+
}
|
|
60
|
+
|
|
47
61
|
@property
|
|
48
62
|
def type(self):
|
|
49
63
|
"""Return the type of the primitive.
|
|
@@ -140,3 +154,187 @@ class Primitive(Connectable):
|
|
|
140
154
|
list
|
|
141
155
|
"""
|
|
142
156
|
return self._pedb.get_connected_objects(self._layout_obj_instance)
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
class Bondwire(Primitive):
|
|
160
|
+
"""Class representing a bondwire object."""
|
|
161
|
+
|
|
162
|
+
def __init__(self, pedb, edb_object=None, **kwargs):
|
|
163
|
+
super().__init__(pedb, edb_object)
|
|
164
|
+
if self._edb_object is None:
|
|
165
|
+
self._edb_object = self.__create(**kwargs)
|
|
166
|
+
|
|
167
|
+
def __create(self, **kwargs):
|
|
168
|
+
return self._pedb._edb.Cell.Primitive.Bondwire.Create(
|
|
169
|
+
self._pedb.modeler._edb_object,
|
|
170
|
+
kwargs.get("net"),
|
|
171
|
+
self._bondwire_type[kwargs.get("bondwire_type")],
|
|
172
|
+
kwargs.get("definition_name"),
|
|
173
|
+
kwargs.get("placement_layer"),
|
|
174
|
+
kwargs.get("width"),
|
|
175
|
+
kwargs.get("material"),
|
|
176
|
+
kwargs.get("start_context"),
|
|
177
|
+
kwargs.get("start_layer_name"),
|
|
178
|
+
kwargs.get("start_x"),
|
|
179
|
+
kwargs.get("start_y"),
|
|
180
|
+
kwargs.get("end_context"),
|
|
181
|
+
kwargs.get("end_layer_name"),
|
|
182
|
+
kwargs.get("end_x"),
|
|
183
|
+
kwargs.get("end_y"),
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
def get_material(self, evaluated=True):
|
|
187
|
+
"""Get material of the bondwire.
|
|
188
|
+
|
|
189
|
+
Parameters
|
|
190
|
+
----------
|
|
191
|
+
evaluated : bool, optional
|
|
192
|
+
True if an evaluated material name is wanted.
|
|
193
|
+
|
|
194
|
+
Returns
|
|
195
|
+
-------
|
|
196
|
+
str
|
|
197
|
+
Material name.
|
|
198
|
+
"""
|
|
199
|
+
return self._edb_object.GetMaterial(evaluated)
|
|
200
|
+
|
|
201
|
+
def set_material(self, material):
|
|
202
|
+
"""Set the material of a bondwire.
|
|
203
|
+
|
|
204
|
+
Parameters
|
|
205
|
+
----------
|
|
206
|
+
material : str
|
|
207
|
+
Material name.
|
|
208
|
+
"""
|
|
209
|
+
self._edb_object.SetMaterial(material)
|
|
210
|
+
|
|
211
|
+
@property
|
|
212
|
+
def type(self):
|
|
213
|
+
""":class:`BondwireType`: Bondwire-type of a bondwire object."""
|
|
214
|
+
|
|
215
|
+
type_name = self._edb_object.GetType()
|
|
216
|
+
return [i for i, j in self._bondwire_type.items() if j == type_name][0]
|
|
217
|
+
|
|
218
|
+
@type.setter
|
|
219
|
+
def type(self, bondwire_type):
|
|
220
|
+
self._edb_object.SetType(self._bondwire_type[bondwire_type])
|
|
221
|
+
|
|
222
|
+
@property
|
|
223
|
+
def cross_section_type(self):
|
|
224
|
+
""":class:`BondwireCrossSectionType`: Bondwire-cross-section-type of a bondwire object."""
|
|
225
|
+
cs_type = self._edb_object.GetCrossSectionType()
|
|
226
|
+
return [i for i, j in self._bondwire_cross_section_type.items() if j == cs_type][0]
|
|
227
|
+
|
|
228
|
+
@cross_section_type.setter
|
|
229
|
+
def cross_section_type(self, bondwire_type):
|
|
230
|
+
self._edb_object.SetCrossSectionType(self._bondwire_cross_section_type[bondwire_type])
|
|
231
|
+
|
|
232
|
+
@property
|
|
233
|
+
def cross_section_height(self):
|
|
234
|
+
""":class:`Value <ansys.edb.utility.Value>`: Bondwire-cross-section height of a bondwire object."""
|
|
235
|
+
return self._edb_object.GetCrossSectionHeight().ToDouble()
|
|
236
|
+
|
|
237
|
+
@cross_section_height.setter
|
|
238
|
+
def cross_section_height(self, height):
|
|
239
|
+
self._edb_object.SetCrossSectionHeight(self._pedb.edb_value(height))
|
|
240
|
+
|
|
241
|
+
def get_definition_name(self, evaluated=True):
|
|
242
|
+
"""Get definition name of a bondwire object.
|
|
243
|
+
|
|
244
|
+
Parameters
|
|
245
|
+
----------
|
|
246
|
+
evaluated : bool, optional
|
|
247
|
+
True if an evaluated (in variable namespace) material name is wanted.
|
|
248
|
+
|
|
249
|
+
Returns
|
|
250
|
+
-------
|
|
251
|
+
str
|
|
252
|
+
Bondwire name.
|
|
253
|
+
"""
|
|
254
|
+
return self._edb_object.GetDefinitionName(evaluated)
|
|
255
|
+
|
|
256
|
+
def set_definition_name(self, definition_name):
|
|
257
|
+
"""Set the definition name of a bondwire.
|
|
258
|
+
|
|
259
|
+
Parameters
|
|
260
|
+
----------
|
|
261
|
+
definition_name : str
|
|
262
|
+
Bondwire name to be set.
|
|
263
|
+
"""
|
|
264
|
+
self._edb_object.SetDefinitionName(definition_name)
|
|
265
|
+
|
|
266
|
+
def get_trajectory(self):
|
|
267
|
+
"""Get trajectory parameters of a bondwire object.
|
|
268
|
+
|
|
269
|
+
Returns
|
|
270
|
+
-------
|
|
271
|
+
tuple[
|
|
272
|
+
:class:`Value <ansys.edb.utility.Value>`,
|
|
273
|
+
:class:`Value <ansys.edb.utility.Value>`,
|
|
274
|
+
:class:`Value <ansys.edb.utility.Value>`,
|
|
275
|
+
:class:`Value <ansys.edb.utility.Value>`
|
|
276
|
+
]
|
|
277
|
+
|
|
278
|
+
Returns a tuple of the following format:
|
|
279
|
+
|
|
280
|
+
**(x1, y1, x2, y2)**
|
|
281
|
+
|
|
282
|
+
**x1** : X value of the start point.
|
|
283
|
+
|
|
284
|
+
**y1** : Y value of the start point.
|
|
285
|
+
|
|
286
|
+
**x1** : X value of the end point.
|
|
287
|
+
|
|
288
|
+
**y1** : Y value of the end point.
|
|
289
|
+
"""
|
|
290
|
+
return [i.ToDouble() for i in self._edb_object.GetTrajectory() if not isinstance(i, bool)]
|
|
291
|
+
|
|
292
|
+
def set_trajectory(self, x1, y1, x2, y2):
|
|
293
|
+
"""Set the parameters of the trajectory of a bondwire.
|
|
294
|
+
|
|
295
|
+
Parameters
|
|
296
|
+
----------
|
|
297
|
+
x1 : :class:`Value <ansys.edb.utility.Value>`
|
|
298
|
+
X value of the start point.
|
|
299
|
+
y1 : :class:`Value <ansys.edb.utility.Value>`
|
|
300
|
+
Y value of the start point.
|
|
301
|
+
x2 : :class:`Value <ansys.edb.utility.Value>`
|
|
302
|
+
X value of the end point.
|
|
303
|
+
y2 : :class:`Value <ansys.edb.utility.Value>`
|
|
304
|
+
Y value of the end point.
|
|
305
|
+
"""
|
|
306
|
+
values = [self._pedb.edb_value(i) for i in [x1, y1, x2, y2]]
|
|
307
|
+
self._edb_object.SetTrajectory(*values)
|
|
308
|
+
|
|
309
|
+
@property
|
|
310
|
+
def width(self):
|
|
311
|
+
""":class:`Value <ansys.edb.utility.Value>`: Width of a bondwire object."""
|
|
312
|
+
return self._edb_object.GetWidth().ToDouble()
|
|
313
|
+
|
|
314
|
+
@width.setter
|
|
315
|
+
def width(self, width):
|
|
316
|
+
self._edb_object.SetWidth(self._pedb.edb_value(width))
|
|
317
|
+
|
|
318
|
+
def set_start_elevation(self, layer, start_context=None):
|
|
319
|
+
"""Set the start elevation of a bondwire.
|
|
320
|
+
|
|
321
|
+
Parameters
|
|
322
|
+
----------
|
|
323
|
+
start_context : :class:`CellInstance <ansys.edb.hierarchy.CellInstance>`
|
|
324
|
+
Start cell context of the bondwire. None means top level.
|
|
325
|
+
layer : str or :class:`Layer <ansys.edb.layer.Layer>`
|
|
326
|
+
Start layer of the bondwire.
|
|
327
|
+
"""
|
|
328
|
+
self._edb_object.SetStartElevation(start_context, layer)
|
|
329
|
+
|
|
330
|
+
def set_end_elevation(self, layer, end_context=None):
|
|
331
|
+
"""Set the end elevation of a bondwire.
|
|
332
|
+
|
|
333
|
+
Parameters
|
|
334
|
+
----------
|
|
335
|
+
end_context : :class:`CellInstance <ansys.edb.hierarchy.CellInstance>`
|
|
336
|
+
End cell context of the bondwire. None means top level.
|
|
337
|
+
layer : str or :class:`Layer <ansys.edb.layer.Layer>`
|
|
338
|
+
End layer of the bondwire.
|
|
339
|
+
"""
|
|
340
|
+
self._edb_object.SetEndElevation(end_context, layer)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
from pyedb.dotnet.edb_core.cell.terminal.edge_terminal import EdgeTerminal
|
|
24
|
+
from pyedb.dotnet.edb_core.cell.terminal.terminal import Terminal
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class BundleTerminal(Terminal):
|
|
28
|
+
"""Manages bundle terminal properties.
|
|
29
|
+
|
|
30
|
+
Parameters
|
|
31
|
+
----------
|
|
32
|
+
pedb : pyedb.edb.Edb
|
|
33
|
+
EDB object from the ``Edblib`` library.
|
|
34
|
+
edb_object : Ansys.Ansoft.Edb.Cell.Terminal.BundleTerminal
|
|
35
|
+
BundleTerminal instance from EDB.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
def __init__(self, pedb, edb_object):
|
|
39
|
+
super().__init__(pedb, edb_object)
|
|
40
|
+
|
|
41
|
+
@property
|
|
42
|
+
def terminals(self):
|
|
43
|
+
"""Get terminals belonging to this excitation."""
|
|
44
|
+
return [EdgeTerminal(self._pedb, i) for i in list(self._edb_object.GetTerminals())]
|
|
45
|
+
|
|
46
|
+
@property
|
|
47
|
+
def name(self):
|
|
48
|
+
return self.terminals[0].name
|
|
49
|
+
|
|
50
|
+
def decouple(self):
|
|
51
|
+
"""Ungroup a bundle of terminals."""
|
|
52
|
+
return self._edb_object.Ungroup()
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
from pyedb.dotnet.edb_core.cell.terminal.terminal import Terminal
|
|
24
|
+
from pyedb.dotnet.edb_core.general import convert_py_list_to_net_list
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class EdgeTerminal(Terminal):
|
|
28
|
+
def __init__(self, pedb, edb_object):
|
|
29
|
+
super().__init__(pedb, edb_object)
|
|
30
|
+
|
|
31
|
+
def couple_ports(self, port):
|
|
32
|
+
"""Create a bundle wave port.
|
|
33
|
+
|
|
34
|
+
Parameters
|
|
35
|
+
----------
|
|
36
|
+
port : :class:`dotnet.edb_core.ports.WavePort`, :class:`dotnet.edb_core.ports.GapPort`, list, optional
|
|
37
|
+
Ports to be added.
|
|
38
|
+
|
|
39
|
+
Returns
|
|
40
|
+
-------
|
|
41
|
+
:class:`dotnet.edb_core.ports.BundleWavePort`
|
|
42
|
+
|
|
43
|
+
"""
|
|
44
|
+
if not isinstance(port, (list, tuple)):
|
|
45
|
+
port = [port]
|
|
46
|
+
temp = [self._edb_object]
|
|
47
|
+
temp.extend([i._edb_object for i in port])
|
|
48
|
+
edb_list = convert_py_list_to_net_list(temp, self._edb.cell.terminal.Terminal)
|
|
49
|
+
_edb_bundle_terminal = self._edb.cell.terminal.BundleTerminal.Create(edb_list)
|
|
50
|
+
return self._pedb.ports[self.name]
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
from pyedb.dotnet.edb_core.cell.terminal.terminal import Terminal
|
|
24
|
+
from pyedb.dotnet.edb_core.edb_data.padstacks_data import EDBPadstackInstance
|
|
25
|
+
from pyedb.generic.general_methods import generate_unique_name
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class PadstackInstanceTerminal(Terminal):
|
|
29
|
+
"""Manages bundle terminal properties."""
|
|
30
|
+
|
|
31
|
+
def __init__(self, pedb, edb_object):
|
|
32
|
+
super().__init__(pedb, edb_object)
|
|
33
|
+
|
|
34
|
+
@property
|
|
35
|
+
def position(self):
|
|
36
|
+
"""Return terminal position.
|
|
37
|
+
Returns
|
|
38
|
+
-------
|
|
39
|
+
Position [x,y] : [float, float]
|
|
40
|
+
"""
|
|
41
|
+
edb_padstack_instance = self._edb_object.GetParameters()
|
|
42
|
+
if edb_padstack_instance[0]:
|
|
43
|
+
return EDBPadstackInstance(edb_padstack_instance[1], self._pedb).position
|
|
44
|
+
return False
|
|
45
|
+
|
|
46
|
+
def create(self, padstack_instance, name=None, layer=None, is_ref=False):
|
|
47
|
+
"""Create an edge terminal.
|
|
48
|
+
|
|
49
|
+
Parameters
|
|
50
|
+
----------
|
|
51
|
+
prim_id : int
|
|
52
|
+
Primitive ID.
|
|
53
|
+
point_on_edge : list
|
|
54
|
+
Coordinate of the point to define the edge terminal.
|
|
55
|
+
The point must be on the target edge but not on the two
|
|
56
|
+
ends of the edge.
|
|
57
|
+
terminal_name : str, optional
|
|
58
|
+
Name of the terminal. The default is ``None``, in which case the
|
|
59
|
+
default name is assigned.
|
|
60
|
+
is_ref : bool, optional
|
|
61
|
+
Whether it is a reference terminal. The default is ``False``.
|
|
62
|
+
|
|
63
|
+
Returns
|
|
64
|
+
-------
|
|
65
|
+
Edb.Cell.Terminal.EdgeTerminal
|
|
66
|
+
"""
|
|
67
|
+
if not name:
|
|
68
|
+
pin_name = padstack_instance._edb_object.GetName()
|
|
69
|
+
refdes = padstack_instance.component.refdes
|
|
70
|
+
name = "{}_{}".format(refdes, pin_name)
|
|
71
|
+
name = generate_unique_name(name)
|
|
72
|
+
|
|
73
|
+
if not layer:
|
|
74
|
+
layer = padstack_instance.start_layer
|
|
75
|
+
|
|
76
|
+
layer_obj = self._pedb.stackup.signal_layers[layer]
|
|
77
|
+
|
|
78
|
+
terminal = self._edb.cell.terminal.PadstackInstanceTerminal.Create(
|
|
79
|
+
self._pedb.active_layout,
|
|
80
|
+
padstack_instance.net.net_object,
|
|
81
|
+
name,
|
|
82
|
+
padstack_instance._edb_object,
|
|
83
|
+
layer_obj._edb_layer,
|
|
84
|
+
isRef=is_ref,
|
|
85
|
+
)
|
|
86
|
+
terminal = PadstackInstanceTerminal(self._pedb, terminal)
|
|
87
|
+
|
|
88
|
+
return terminal if not terminal.is_null else False
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
from pyedb.dotnet.edb_core.cell.terminal.terminal import Terminal
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class PinGroupTerminal(Terminal):
|
|
27
|
+
"""Manages pin group terminal properties."""
|
|
28
|
+
|
|
29
|
+
def __init__(self, pedb, edb_object=None):
|
|
30
|
+
super().__init__(pedb, edb_object)
|
|
31
|
+
|
|
32
|
+
def create(self, name, net_name, pin_group_name, is_ref=False):
|
|
33
|
+
"""Create a pin group terminal.
|
|
34
|
+
|
|
35
|
+
Parameters
|
|
36
|
+
----------
|
|
37
|
+
name : str
|
|
38
|
+
Name of the terminal.
|
|
39
|
+
net_name : str
|
|
40
|
+
Name of the net.
|
|
41
|
+
pin_group_name : str,
|
|
42
|
+
Name of the pin group.
|
|
43
|
+
is_ref : bool, optional
|
|
44
|
+
Whether it is a reference terminal. The default is ``False``.
|
|
45
|
+
|
|
46
|
+
Returns
|
|
47
|
+
-------
|
|
48
|
+
:class:`pyedb.dotnet.edb_core.edb_data.terminals.PinGroupTerminal`
|
|
49
|
+
"""
|
|
50
|
+
net_obj = self._pedb.edb_api.cell.net.find_by_name(self._pedb.active_layout, net_name)
|
|
51
|
+
term = self._pedb.edb_api.cell.terminal.PinGroupTerminal.Create(
|
|
52
|
+
self._pedb.active_layout,
|
|
53
|
+
net_obj.api_object,
|
|
54
|
+
name,
|
|
55
|
+
self._pedb.siwave.pin_groups[pin_group_name]._edb_object,
|
|
56
|
+
is_ref,
|
|
57
|
+
)
|
|
58
|
+
term = PinGroupTerminal(self._pedb, term)
|
|
59
|
+
return term if not term.is_null else False
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
from pyedb.dotnet.edb_core.cell.terminal.terminal import Terminal
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class PointTerminal(Terminal):
|
|
27
|
+
"""Manages point terminal properties."""
|
|
28
|
+
|
|
29
|
+
def __init__(self, pedb, edb_object=None):
|
|
30
|
+
super().__init__(pedb, edb_object)
|
|
31
|
+
self._pedb = pedb
|
|
32
|
+
|
|
33
|
+
def create(self, name, net, location, layer, is_ref=False):
|
|
34
|
+
"""Create a point terminal.
|
|
35
|
+
|
|
36
|
+
Parameters
|
|
37
|
+
----------
|
|
38
|
+
name : str
|
|
39
|
+
Name of the terminal.
|
|
40
|
+
net : str
|
|
41
|
+
Name of the net.
|
|
42
|
+
location : list
|
|
43
|
+
Location of the terminal.
|
|
44
|
+
layer : str
|
|
45
|
+
Name of the layer.
|
|
46
|
+
is_ref : bool, optional
|
|
47
|
+
Whether it is a reference terminal.
|
|
48
|
+
|
|
49
|
+
Returns
|
|
50
|
+
-------
|
|
51
|
+
:class:`pyedb.dotnet.edb_core.edb_data.terminals.PointTerminal`
|
|
52
|
+
"""
|
|
53
|
+
terminal = self._pedb.edb_api.cell.terminal.PointTerminal.Create(
|
|
54
|
+
self._pedb.active_layout,
|
|
55
|
+
self._pedb.nets[net].net_object,
|
|
56
|
+
name,
|
|
57
|
+
self._pedb.point_data(*location),
|
|
58
|
+
self._pedb.stackup[layer]._edb_layer,
|
|
59
|
+
is_ref,
|
|
60
|
+
)
|
|
61
|
+
terminal = PointTerminal(self._pedb, terminal)
|
|
62
|
+
return terminal if not terminal.is_null else False
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def ref_terminal(self):
|
|
66
|
+
"""Get reference terminal."""
|
|
67
|
+
|
|
68
|
+
terminal = Terminal(self._pedb, self._edb_object.GetReferenceTerminal())
|
|
69
|
+
return terminal if not terminal.is_null else False
|
|
70
|
+
|
|
71
|
+
@ref_terminal.setter
|
|
72
|
+
def ref_terminal(self, value):
|
|
73
|
+
self._edb_object.SetReferenceTerminal(value._edb_object)
|