pyedb 0.19.0__py3-none-any.whl → 0.21.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/dotnet/edb.py +311 -335
- pyedb/dotnet/edb_core/cell/connectable.py +64 -0
- pyedb/dotnet/edb_core/cell/hierarchy/component.py +12 -10
- pyedb/dotnet/edb_core/cell/hierarchy/hierarchy_obj.py +1 -1
- pyedb/dotnet/edb_core/cell/layout.py +253 -105
- pyedb/dotnet/edb_core/cell/layout_obj.py +4 -49
- pyedb/dotnet/edb_core/cell/primitive.py +14 -2
- pyedb/dotnet/edb_core/cell/terminal/padstack_instance_terminal.py +1 -1
- pyedb/dotnet/edb_core/cell/terminal/point_terminal.py +1 -1
- pyedb/dotnet/edb_core/cell/terminal/terminal.py +1 -19
- pyedb/dotnet/edb_core/cell/voltage_regulator.py +2 -16
- pyedb/dotnet/edb_core/components.py +14 -13
- pyedb/dotnet/edb_core/dotnet/database.py +5 -10
- pyedb/dotnet/edb_core/dotnet/primitive.py +11 -1
- pyedb/dotnet/edb_core/edb_data/control_file.py +2 -12
- pyedb/dotnet/edb_core/edb_data/padstacks_data.py +20 -33
- pyedb/dotnet/edb_core/general.py +6 -9
- pyedb/dotnet/edb_core/hfss.py +4 -8
- pyedb/dotnet/edb_core/layout_obj_instance.py +30 -0
- pyedb/dotnet/edb_core/materials.py +4 -11
- pyedb/dotnet/edb_core/{layout.py → modeler.py} +153 -7
- pyedb/dotnet/edb_core/net_class.py +7 -8
- pyedb/dotnet/edb_core/nets.py +3 -9
- pyedb/dotnet/edb_core/padstack.py +13 -9
- pyedb/dotnet/edb_core/sim_setup_data/data/sweep_data.py +5 -2
- pyedb/dotnet/edb_core/siwave.py +5 -6
- pyedb/dotnet/edb_core/stackup.py +18 -23
- pyedb/dotnet/edb_core/utilities/simulation_setup.py +1 -4
- pyedb/generic/filesystem.py +2 -8
- pyedb/generic/general_methods.py +4 -10
- pyedb/generic/plot.py +26 -29
- pyedb/generic/process.py +2 -6
- pyedb/misc/downloads.py +3 -40
- pyedb/siwave.py +2 -5
- {pyedb-0.19.0.dist-info → pyedb-0.21.0.dist-info}/METADATA +2 -2
- {pyedb-0.19.0.dist-info → pyedb-0.21.0.dist-info}/RECORD +39 -38
- pyedb/dotnet/edb_core/dotnet/layout.py +0 -260
- {pyedb-0.19.0.dist-info → pyedb-0.21.0.dist-info}/LICENSE +0 -0
- {pyedb-0.19.0.dist-info → pyedb-0.21.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,64 @@
|
|
|
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.layout_obj import LayoutObj
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class Connectable(LayoutObj):
|
|
27
|
+
"""Manages EDB functionalities for a connectable object."""
|
|
28
|
+
|
|
29
|
+
def __init__(self, pedb, edb_object):
|
|
30
|
+
super().__init__(pedb, edb_object)
|
|
31
|
+
|
|
32
|
+
@property
|
|
33
|
+
def net(self):
|
|
34
|
+
"""Net Object.
|
|
35
|
+
|
|
36
|
+
Returns
|
|
37
|
+
-------
|
|
38
|
+
:class:`pyedb.dotnet.edb_core.edb_data.nets_data.EDBNetsData`
|
|
39
|
+
"""
|
|
40
|
+
from pyedb.dotnet.edb_core.edb_data.nets_data import EDBNetsData
|
|
41
|
+
|
|
42
|
+
return EDBNetsData(self._edb_object.GetNet(), self._pedb)
|
|
43
|
+
|
|
44
|
+
@net.setter
|
|
45
|
+
def net(self, value):
|
|
46
|
+
"""Set net."""
|
|
47
|
+
net = self._pedb.nets[value]
|
|
48
|
+
self._edb_object.SetNet(net.net_object)
|
|
49
|
+
|
|
50
|
+
@property
|
|
51
|
+
def component(self):
|
|
52
|
+
"""Component connected to this object.
|
|
53
|
+
|
|
54
|
+
Returns
|
|
55
|
+
-------
|
|
56
|
+
:class:`dotnet.edb_core.edb_data.nets_data.EDBComponent`
|
|
57
|
+
"""
|
|
58
|
+
from pyedb.dotnet.edb_core.cell.hierarchy.component import EDBComponent
|
|
59
|
+
|
|
60
|
+
edb_comp = self._edb_object.GetComponent()
|
|
61
|
+
if edb_comp.IsNull():
|
|
62
|
+
return None
|
|
63
|
+
else:
|
|
64
|
+
return EDBComponent(self._pedb, edb_comp)
|
|
@@ -32,16 +32,14 @@ from pyedb.dotnet.edb_core.cell.hierarchy.s_parameter_model import SparamModel
|
|
|
32
32
|
from pyedb.dotnet.edb_core.cell.hierarchy.spice_model import SpiceModel
|
|
33
33
|
from pyedb.dotnet.edb_core.definition.package_def import PackageDef
|
|
34
34
|
from pyedb.dotnet.edb_core.edb_data.padstacks_data import EDBPadstackInstance
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"Install with \n\npip install numpy\n\nRequires CPython."
|
|
44
|
-
)
|
|
35
|
+
|
|
36
|
+
try:
|
|
37
|
+
import numpy as np
|
|
38
|
+
except ImportError:
|
|
39
|
+
warnings.warn(
|
|
40
|
+
"The NumPy module is required to run some functionalities of EDB.\n"
|
|
41
|
+
"Install with \n\npip install numpy\n\nRequires CPython."
|
|
42
|
+
)
|
|
45
43
|
from pyedb.generic.general_methods import get_filename_without_extension
|
|
46
44
|
|
|
47
45
|
|
|
@@ -63,6 +61,10 @@ class EDBComponent(Group):
|
|
|
63
61
|
self._layout_instance = None
|
|
64
62
|
self._comp_instance = None
|
|
65
63
|
|
|
64
|
+
@property
|
|
65
|
+
def group_type(self):
|
|
66
|
+
return self._edb_object.ToString().split(".")[-1].lower()
|
|
67
|
+
|
|
66
68
|
@property
|
|
67
69
|
def layout_instance(self):
|
|
68
70
|
"""EDB layout instance object."""
|
|
@@ -23,18 +23,168 @@
|
|
|
23
23
|
"""
|
|
24
24
|
This module contains these classes: `EdbLayout` and `Shape`.
|
|
25
25
|
"""
|
|
26
|
+
from pyedb.dotnet.edb_core.cell.hierarchy.component import EDBComponent
|
|
26
27
|
from pyedb.dotnet.edb_core.cell.primitive import Bondwire
|
|
27
|
-
from pyedb.dotnet.edb_core.
|
|
28
|
+
from pyedb.dotnet.edb_core.cell.terminal.bundle_terminal import BundleTerminal
|
|
29
|
+
from pyedb.dotnet.edb_core.cell.terminal.edge_terminal import EdgeTerminal
|
|
30
|
+
from pyedb.dotnet.edb_core.cell.terminal.padstack_instance_terminal import (
|
|
31
|
+
PadstackInstanceTerminal,
|
|
32
|
+
)
|
|
33
|
+
from pyedb.dotnet.edb_core.cell.terminal.pingroup_terminal import PinGroupTerminal
|
|
34
|
+
from pyedb.dotnet.edb_core.cell.terminal.point_terminal import PointTerminal
|
|
35
|
+
from pyedb.dotnet.edb_core.cell.voltage_regulator import VoltageRegulator
|
|
36
|
+
from pyedb.dotnet.edb_core.edb_data.nets_data import (
|
|
37
|
+
EDBDifferentialPairData,
|
|
38
|
+
EDBExtendedNetData,
|
|
39
|
+
EDBNetClassData,
|
|
40
|
+
EDBNetsData,
|
|
41
|
+
)
|
|
28
42
|
from pyedb.dotnet.edb_core.edb_data.padstacks_data import EDBPadstackInstance
|
|
43
|
+
from pyedb.dotnet.edb_core.edb_data.primitives_data import (
|
|
44
|
+
EdbCircle,
|
|
45
|
+
EdbPath,
|
|
46
|
+
EdbPolygon,
|
|
47
|
+
EdbRectangle,
|
|
48
|
+
EdbText,
|
|
49
|
+
)
|
|
29
50
|
from pyedb.dotnet.edb_core.edb_data.sources import PinGroup
|
|
30
51
|
from pyedb.dotnet.edb_core.general import convert_py_list_to_net_list
|
|
31
|
-
from pyedb.dotnet.edb_core.
|
|
52
|
+
from pyedb.dotnet.edb_core.utilities.obj_base import ObjBase
|
|
32
53
|
|
|
33
54
|
|
|
34
|
-
class Layout(
|
|
55
|
+
class Layout(ObjBase):
|
|
35
56
|
def __init__(self, pedb, edb_object):
|
|
36
|
-
super().__init__(pedb)
|
|
37
|
-
|
|
57
|
+
super().__init__(pedb, edb_object)
|
|
58
|
+
|
|
59
|
+
@property
|
|
60
|
+
def cell(self):
|
|
61
|
+
""":class:`Cell <ansys.edb.layout.Cell>`: Owning cell for this layout.
|
|
62
|
+
|
|
63
|
+
Read-Only.
|
|
64
|
+
"""
|
|
65
|
+
return self._pedb._active_cell
|
|
66
|
+
|
|
67
|
+
@property
|
|
68
|
+
def layer_collection(self):
|
|
69
|
+
""":class:`LayerCollection <ansys.edb.layer.LayerCollection>` : Layer collection of this layout."""
|
|
70
|
+
return self._edb_object.GetLayerCollection()
|
|
71
|
+
|
|
72
|
+
@layer_collection.setter
|
|
73
|
+
def layer_collection(self, layer_collection):
|
|
74
|
+
"""Set layer collection."""
|
|
75
|
+
self._edb_object.SetLayerCollection(layer_collection)
|
|
76
|
+
|
|
77
|
+
@property
|
|
78
|
+
def _edb(self):
|
|
79
|
+
return self._pedb.edb_api
|
|
80
|
+
|
|
81
|
+
def expanded_extent(self, nets, extent, expansion_factor, expansion_unitless, use_round_corner, num_increments):
|
|
82
|
+
"""Get an expanded polygon for the Nets collection.
|
|
83
|
+
|
|
84
|
+
Parameters
|
|
85
|
+
----------
|
|
86
|
+
nets : list[:class:`Net <ansys.edb.net.Net>`]
|
|
87
|
+
A list of nets.
|
|
88
|
+
extent : :class:`ExtentType <ansys.edb.geometry.ExtentType>`
|
|
89
|
+
Geometry extent type for expansion.
|
|
90
|
+
expansion_factor : float
|
|
91
|
+
Expansion factor for the polygon union. No expansion occurs if the `expansion_factor` is less than or \
|
|
92
|
+
equal to 0.
|
|
93
|
+
expansion_unitless : bool
|
|
94
|
+
When unitless, the distance by which the extent expands is the factor multiplied by the longer dimension\
|
|
95
|
+
(X or Y distance) of the expanded object/net.
|
|
96
|
+
use_round_corner : bool
|
|
97
|
+
Whether to use round or sharp corners.
|
|
98
|
+
For round corners, this returns a bounding box if its area is within 10% of the rounded expansion's area.
|
|
99
|
+
num_increments : int
|
|
100
|
+
Number of iterations desired to reach the full expansion.
|
|
101
|
+
|
|
102
|
+
Returns
|
|
103
|
+
-------
|
|
104
|
+
:class:`PolygonData <ansys.edb.geometry.PolygonData>`
|
|
105
|
+
|
|
106
|
+
Notes
|
|
107
|
+
-----
|
|
108
|
+
Method returns the expansion of the contour, so any voids within expanded objects are ignored.
|
|
109
|
+
"""
|
|
110
|
+
return self._edb_object.GetExpandedExtentFromNets(
|
|
111
|
+
convert_py_list_to_net_list(nets),
|
|
112
|
+
extent,
|
|
113
|
+
expansion_factor,
|
|
114
|
+
expansion_unitless,
|
|
115
|
+
use_round_corner,
|
|
116
|
+
num_increments,
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
def convert_primitives_to_vias(self, primitives, is_pins=False):
|
|
120
|
+
"""Convert a list of primitives into vias or pins.
|
|
121
|
+
|
|
122
|
+
Parameters
|
|
123
|
+
----------
|
|
124
|
+
primitives : list[:class:`Primitive <ansys.edb.primitive.Primitive>`]
|
|
125
|
+
List of primitives to convert.
|
|
126
|
+
is_pins : bool, optional
|
|
127
|
+
True for pins, false for vias (default).
|
|
128
|
+
"""
|
|
129
|
+
self._edb_object.ConvertPrimitivesToVias(convert_py_list_to_net_list(primitives), is_pins)
|
|
130
|
+
|
|
131
|
+
@property
|
|
132
|
+
def zone_primitives(self):
|
|
133
|
+
""":obj:`list` of :class:`Primitive <ansys.edb.primitive.Primitive>` : List of all the primitives in \
|
|
134
|
+
:term:`zones <Zone>`.
|
|
135
|
+
|
|
136
|
+
Read-Only.
|
|
137
|
+
"""
|
|
138
|
+
return list(self._edb_object.GetZonePrimitives())
|
|
139
|
+
|
|
140
|
+
@property
|
|
141
|
+
def fixed_zone_primitive(self):
|
|
142
|
+
""":class:`Primitive <ansys.edb.primitive.Primitive>` : Fixed :term:`zones <Zone>` primitive."""
|
|
143
|
+
return list(self._edb_object.GetFixedZonePrimitive())
|
|
144
|
+
|
|
145
|
+
@fixed_zone_primitive.setter
|
|
146
|
+
def fixed_zone_primitive(self, value):
|
|
147
|
+
self._edb_object.SetFixedZonePrimitives(value)
|
|
148
|
+
|
|
149
|
+
@property
|
|
150
|
+
def terminals(self):
|
|
151
|
+
"""Get terminals belonging to active layout.
|
|
152
|
+
|
|
153
|
+
Returns
|
|
154
|
+
-------
|
|
155
|
+
Terminal dictionary : Dict[str, pyedb.dotnet.edb_core.edb_data.terminals.Terminal]
|
|
156
|
+
"""
|
|
157
|
+
temp = []
|
|
158
|
+
for i in list(self._edb_object.Terminals):
|
|
159
|
+
terminal_type = i.ToString().split(".")[-1]
|
|
160
|
+
if terminal_type == "PinGroupTerminal":
|
|
161
|
+
temp.append(PinGroupTerminal(self._pedb, i))
|
|
162
|
+
elif terminal_type == "PadstackInstanceTerminal":
|
|
163
|
+
temp.append(PadstackInstanceTerminal(self._pedb, i))
|
|
164
|
+
elif terminal_type == "EdgeTerminal":
|
|
165
|
+
temp.append(EdgeTerminal(self._pedb, i))
|
|
166
|
+
elif terminal_type == "BundleTerminal":
|
|
167
|
+
temp.append(BundleTerminal(self._pedb, i))
|
|
168
|
+
elif terminal_type == "PointTerminal":
|
|
169
|
+
temp.append(PointTerminal(self._pedb, i))
|
|
170
|
+
return temp
|
|
171
|
+
|
|
172
|
+
@property
|
|
173
|
+
def cell_instances(self):
|
|
174
|
+
""":obj:`list` of :class:`CellInstance <ansys.edb.hierarchy.CellInstances>` : List of the cell instances in \
|
|
175
|
+
this layout.
|
|
176
|
+
|
|
177
|
+
Read-Only.
|
|
178
|
+
"""
|
|
179
|
+
return list(self._edb_object.CellInstances)
|
|
180
|
+
|
|
181
|
+
@property
|
|
182
|
+
def layout_instance(self):
|
|
183
|
+
""":class:`LayoutInstance <ansys.edb.layout_instance.LayoutInstance>` : Layout instance of this layout.
|
|
184
|
+
|
|
185
|
+
Read-Only.
|
|
186
|
+
"""
|
|
187
|
+
return self._edb_object.GetLayoutInstance()
|
|
38
188
|
|
|
39
189
|
@property
|
|
40
190
|
def nets(self):
|
|
@@ -42,15 +192,41 @@ class Layout(EdbLayout):
|
|
|
42
192
|
|
|
43
193
|
Returns
|
|
44
194
|
-------
|
|
45
|
-
dict[str, :class:`pyedb.dotnet.edb_core.edb_data.nets_data.EDBNetsData`]
|
|
46
|
-
Dictionary of nets.
|
|
47
195
|
"""
|
|
48
196
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
197
|
+
return [EDBNetsData(net, self._pedb) for net in self._edb_object.Nets]
|
|
198
|
+
|
|
199
|
+
@property
|
|
200
|
+
def primitives(self):
|
|
201
|
+
"""List of primitives.Read-Only.
|
|
202
|
+
|
|
203
|
+
Returns
|
|
204
|
+
-------
|
|
205
|
+
list of :class:`dotnet.edb_core.dotnet.primitive.PrimitiveDotNet` cast objects.
|
|
206
|
+
"""
|
|
207
|
+
prims = []
|
|
208
|
+
for p in self._edb_object.Primitives:
|
|
209
|
+
if p.GetPrimitiveType().ToString() == "Rectangle":
|
|
210
|
+
prims.append(EdbRectangle(p, self._pedb))
|
|
211
|
+
elif p.GetPrimitiveType().ToString() == "Circle":
|
|
212
|
+
prims.append(EdbCircle(p, self._pedb))
|
|
213
|
+
elif p.GetPrimitiveType().ToString() == "Polygon":
|
|
214
|
+
prims.append(EdbPolygon(p, self._pedb))
|
|
215
|
+
elif p.GetPrimitiveType().ToString() == "Path":
|
|
216
|
+
prims.append(EdbPath(p, self._pedb))
|
|
217
|
+
elif p.GetPrimitiveType().ToString() == "Bondwire":
|
|
218
|
+
prims.append(Bondwire(self._pedb, p))
|
|
219
|
+
elif p.GetPrimitiveType().ToString() == "Text":
|
|
220
|
+
prims.append(EdbText(p, self._pedb))
|
|
221
|
+
elif p.GetPrimitiveType().ToString() == "PrimitivePlugin":
|
|
222
|
+
pass
|
|
223
|
+
elif p.GetPrimitiveType().ToString() == "Path3D":
|
|
224
|
+
pass
|
|
225
|
+
elif p.GetPrimitiveType().ToString() == "BoardBendDef":
|
|
226
|
+
pass
|
|
227
|
+
else:
|
|
228
|
+
pass
|
|
229
|
+
return prims
|
|
54
230
|
|
|
55
231
|
@property
|
|
56
232
|
def bondwires(self):
|
|
@@ -61,118 +237,90 @@ class Layout(EdbLayout):
|
|
|
61
237
|
list :
|
|
62
238
|
List of bondwires.
|
|
63
239
|
"""
|
|
64
|
-
return [
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
]
|
|
240
|
+
return [i for i in self.primitives if i.primitive_type == "bondwire"]
|
|
241
|
+
|
|
242
|
+
@property
|
|
243
|
+
def groups(self):
|
|
244
|
+
temp = []
|
|
245
|
+
for i in list(self._edb_object.Groups):
|
|
246
|
+
group_type = i.ToString().split(".")[-1].lower()
|
|
247
|
+
if group_type == "component":
|
|
248
|
+
temp.append(EDBComponent(self._pedb, i))
|
|
249
|
+
else:
|
|
250
|
+
pass
|
|
251
|
+
return temp
|
|
252
|
+
|
|
253
|
+
@property
|
|
254
|
+
def pin_groups(self):
|
|
255
|
+
return [PinGroup(pedb=self._pedb, edb_pin_group=i, name=i.GetName()) for i in self._edb_object.PinGroups]
|
|
256
|
+
|
|
257
|
+
@property
|
|
258
|
+
def net_classes(self):
|
|
259
|
+
return [EDBNetClassData(self._pedb, i) for i in list(self._edb_object.NetClasses)]
|
|
260
|
+
|
|
261
|
+
@property
|
|
262
|
+
def extended_nets(self):
|
|
263
|
+
return [EDBExtendedNetData(self._pedb, i) for i in self._edb_object.ExtendedNets]
|
|
264
|
+
|
|
265
|
+
@property
|
|
266
|
+
def differential_pairs(self):
|
|
267
|
+
return [EDBDifferentialPairData(self._pedb, i) for i in list(self._edb_object.DifferentialPairs)]
|
|
69
268
|
|
|
70
269
|
@property
|
|
71
270
|
def padstack_instances(self):
|
|
72
271
|
"""Get all padstack instances in a list."""
|
|
73
272
|
return [EDBPadstackInstance(i, self._pedb) for i in self._edb_object.PadstackInstances]
|
|
74
273
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
placement_layer,
|
|
79
|
-
width,
|
|
80
|
-
material,
|
|
81
|
-
start_layer_name,
|
|
82
|
-
start_x,
|
|
83
|
-
start_y,
|
|
84
|
-
end_layer_name,
|
|
85
|
-
end_x,
|
|
86
|
-
end_y,
|
|
87
|
-
net,
|
|
88
|
-
bondwire_type="jedec4",
|
|
89
|
-
):
|
|
90
|
-
"""Create a bondwire object.
|
|
274
|
+
@property
|
|
275
|
+
def voltage_regulators(self):
|
|
276
|
+
return [VoltageRegulator(self._pedb, i) for i in list(self._edb_object.VoltageRegulators)]
|
|
91
277
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
Type of bondwire: kAPDBondWire or kJDECBondWire types.
|
|
96
|
-
definition_name : str
|
|
97
|
-
Bondwire definition name.
|
|
98
|
-
placement_layer : str
|
|
99
|
-
Layer name this bondwire will be on.
|
|
100
|
-
width : :class:`Value <ansys.edb.utility.Value>`
|
|
101
|
-
Bondwire width.
|
|
102
|
-
material : str
|
|
103
|
-
Bondwire material name.
|
|
104
|
-
start_layer_name : str
|
|
105
|
-
Name of start layer.
|
|
106
|
-
start_x : :class:`Value <ansys.edb.utility.Value>`
|
|
107
|
-
X value of start point.
|
|
108
|
-
start_y : :class:`Value <ansys.edb.utility.Value>`
|
|
109
|
-
Y value of start point.
|
|
110
|
-
end_layer_name : str
|
|
111
|
-
Name of end layer.
|
|
112
|
-
end_x : :class:`Value <ansys.edb.utility.Value>`
|
|
113
|
-
X value of end point.
|
|
114
|
-
end_y : :class:`Value <ansys.edb.utility.Value>`
|
|
115
|
-
Y value of end point.
|
|
116
|
-
net : str or :class:`Net <ansys.edb.net.Net>` or None
|
|
117
|
-
Net of the Bondwire.
|
|
278
|
+
@property
|
|
279
|
+
def port_reference_terminals_connected(self):
|
|
280
|
+
""":obj:`bool`: Determine if port reference terminals are connected, applies to lumped ports and circuit ports.
|
|
118
281
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
:class:`pyedb.dotnet.edb_core.dotnet.primitive.BondwireDotNet`
|
|
122
|
-
Bondwire object created.
|
|
282
|
+
True if they are connected, False otherwise.
|
|
283
|
+
Read-Only.
|
|
123
284
|
"""
|
|
124
|
-
return
|
|
125
|
-
pedb=self._pedb,
|
|
126
|
-
bondwire_type=bondwire_type,
|
|
127
|
-
definition_name=definition_name,
|
|
128
|
-
placement_layer=placement_layer,
|
|
129
|
-
width=self._pedb.edb_value(width),
|
|
130
|
-
material=material,
|
|
131
|
-
start_layer_name=start_layer_name,
|
|
132
|
-
start_x=self._pedb.edb_value(start_x),
|
|
133
|
-
start_y=self._pedb.edb_value(start_y),
|
|
134
|
-
end_layer_name=end_layer_name,
|
|
135
|
-
end_x=self._pedb.edb_value(end_x),
|
|
136
|
-
end_y=self._pedb.edb_value(end_y),
|
|
137
|
-
net=self.nets[net]._edb_object,
|
|
138
|
-
)
|
|
285
|
+
return self._edb_object.ArePortReferenceTerminalsConnected()
|
|
139
286
|
|
|
140
287
|
def find_object_by_id(self, value: int):
|
|
141
|
-
"""Find a
|
|
288
|
+
"""Find a layout object by Database ID.
|
|
142
289
|
|
|
143
290
|
Parameters
|
|
144
291
|
----------
|
|
145
292
|
value : int
|
|
293
|
+
ID of the object.
|
|
146
294
|
"""
|
|
147
295
|
obj = self._pedb._edb.Cell.Connectable.FindById(self._edb_object, value)
|
|
148
296
|
if obj.GetObjType().ToString() == "PadstackInstance":
|
|
149
|
-
return EDBPadstackInstance(obj, self._pedb)
|
|
297
|
+
return EDBPadstackInstance(obj, self._pedb) if obj is not None else None
|
|
298
|
+
|
|
299
|
+
def find_net_by_name(self, value: str):
|
|
300
|
+
"""Find a net object by name
|
|
301
|
+
|
|
302
|
+
Parameters
|
|
303
|
+
----------
|
|
304
|
+
value : str
|
|
305
|
+
Name of the net.
|
|
306
|
+
|
|
307
|
+
Returns
|
|
308
|
+
-------
|
|
309
|
+
|
|
310
|
+
"""
|
|
311
|
+
obj = self._pedb._edb.Cell.Net.FindByName(self._edb_object, value)
|
|
312
|
+
return EDBNetsData(obj, self._pedb) if obj is not None else None
|
|
150
313
|
|
|
151
|
-
def
|
|
152
|
-
"""
|
|
314
|
+
def find_component_by_name(self, value: str):
|
|
315
|
+
"""Find a component object by name. Component name is the reference designator in layout.
|
|
153
316
|
|
|
154
317
|
Parameters
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
318
|
+
----------
|
|
319
|
+
value : str
|
|
320
|
+
Name of the component.
|
|
321
|
+
Returns
|
|
322
|
+
-------
|
|
323
|
+
|
|
161
324
|
"""
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
if pins_by_id is not None:
|
|
165
|
-
for p in pins_by_id:
|
|
166
|
-
pins.append(self.find_object_by_id(p._edb_object))
|
|
167
|
-
else:
|
|
168
|
-
p_inst = self.padstack_instances
|
|
169
|
-
while True:
|
|
170
|
-
p = p_inst.pop(0)
|
|
171
|
-
if p.aedt_name in pins_by_aedt_name:
|
|
172
|
-
pins.append(p._edb_object)
|
|
173
|
-
pins_by_aedt_name.remove(p.aedt_name)
|
|
174
|
-
if len(pins_by_aedt_name) == 0:
|
|
175
|
-
break
|
|
176
|
-
|
|
177
|
-
obj = self._edb.cell.hierarchy.pin_group.Create(self._edb_object, name, convert_py_list_to_net_list(pins))
|
|
178
|
-
return PinGroup(name, obj, self._pedb)
|
|
325
|
+
obj = self._pedb._edb.Cell.Hierarchy.Component.FindByName(self._edb_object, value)
|
|
326
|
+
return EDBComponent(self._pedb, obj) if obj is not None else None
|
|
@@ -20,17 +20,10 @@
|
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
|
+
from pyedb.dotnet.edb_core.layout_obj_instance import LayoutObjInstance
|
|
23
24
|
from pyedb.dotnet.edb_core.utilities.obj_base import ObjBase
|
|
24
25
|
|
|
25
26
|
|
|
26
|
-
class LayoutObjInstance:
|
|
27
|
-
"""Manages EDB functionalities for the layout object instance."""
|
|
28
|
-
|
|
29
|
-
def __init__(self, pedb, edb_object):
|
|
30
|
-
self._pedb = pedb
|
|
31
|
-
self._edb_object = edb_object
|
|
32
|
-
|
|
33
|
-
|
|
34
27
|
class LayoutObj(ObjBase):
|
|
35
28
|
"""Manages EDB functionalities for the layout object."""
|
|
36
29
|
|
|
@@ -89,45 +82,7 @@ class LayoutObj(ObjBase):
|
|
|
89
82
|
def delete(self):
|
|
90
83
|
"""Delete this primitive."""
|
|
91
84
|
self._edb_object.Delete()
|
|
85
|
+
self._pedb.modeler._primitives = []
|
|
86
|
+
self._pedb.padstacks._instances = {}
|
|
87
|
+
self._pedb.padstacks._definitions = {}
|
|
92
88
|
return True
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
class Connectable(LayoutObj):
|
|
96
|
-
"""Manages EDB functionalities for a connectable object."""
|
|
97
|
-
|
|
98
|
-
def __init__(self, pedb, edb_object):
|
|
99
|
-
super().__init__(pedb, edb_object)
|
|
100
|
-
|
|
101
|
-
@property
|
|
102
|
-
def net(self):
|
|
103
|
-
"""Net Object.
|
|
104
|
-
|
|
105
|
-
Returns
|
|
106
|
-
-------
|
|
107
|
-
:class:`pyedb.dotnet.edb_core.edb_data.nets_data.EDBNetsData`
|
|
108
|
-
"""
|
|
109
|
-
from pyedb.dotnet.edb_core.edb_data.nets_data import EDBNetsData
|
|
110
|
-
|
|
111
|
-
return EDBNetsData(self._edb_object.GetNet(), self._pedb)
|
|
112
|
-
|
|
113
|
-
@net.setter
|
|
114
|
-
def net(self, value):
|
|
115
|
-
"""Set net."""
|
|
116
|
-
net = self._pedb.nets[value]
|
|
117
|
-
self._edb_object.SetNet(net.net_object)
|
|
118
|
-
|
|
119
|
-
@property
|
|
120
|
-
def component(self):
|
|
121
|
-
"""Component connected to this object.
|
|
122
|
-
|
|
123
|
-
Returns
|
|
124
|
-
-------
|
|
125
|
-
:class:`dotnet.edb_core.edb_data.nets_data.EDBComponent`
|
|
126
|
-
"""
|
|
127
|
-
from pyedb.dotnet.edb_core.cell.hierarchy.component import EDBComponent
|
|
128
|
-
|
|
129
|
-
edb_comp = self._edb_object.GetComponent()
|
|
130
|
-
if edb_comp.IsNull():
|
|
131
|
-
return None
|
|
132
|
-
else:
|
|
133
|
-
return EDBComponent(self._pedb, edb_comp)
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
|
-
from pyedb.dotnet.edb_core.cell.
|
|
23
|
+
from pyedb.dotnet.edb_core.cell.connectable import Connectable
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class Primitive(Connectable):
|
|
@@ -73,6 +73,18 @@ class Primitive(Connectable):
|
|
|
73
73
|
except AttributeError: # pragma: no cover
|
|
74
74
|
return ""
|
|
75
75
|
|
|
76
|
+
@property
|
|
77
|
+
def primitive_type(self):
|
|
78
|
+
"""Return the type of the primitive.
|
|
79
|
+
|
|
80
|
+
Expected output is among ``"circle"``, ``"rectangle"``,``"polygon"``,``"path"`` or ``"bondwire"``.
|
|
81
|
+
|
|
82
|
+
Returns
|
|
83
|
+
-------
|
|
84
|
+
str
|
|
85
|
+
"""
|
|
86
|
+
return self._edb_object.GetPrimitiveType().ToString().lower()
|
|
87
|
+
|
|
76
88
|
@property
|
|
77
89
|
def net_name(self):
|
|
78
90
|
"""Get the primitive net name.
|
|
@@ -166,7 +178,7 @@ class Bondwire(Primitive):
|
|
|
166
178
|
|
|
167
179
|
def __create(self, **kwargs):
|
|
168
180
|
return self._pedb._edb.Cell.Primitive.Bondwire.Create(
|
|
169
|
-
self._pedb.
|
|
181
|
+
self._pedb.layout._edb_object,
|
|
170
182
|
kwargs.get("net"),
|
|
171
183
|
self._bondwire_type[kwargs.get("bondwire_type")],
|
|
172
184
|
kwargs.get("definition_name"),
|
|
@@ -52,7 +52,7 @@ class PointTerminal(Terminal):
|
|
|
52
52
|
"""
|
|
53
53
|
terminal = self._pedb.edb_api.cell.terminal.PointTerminal.Create(
|
|
54
54
|
self._pedb.active_layout,
|
|
55
|
-
self._pedb.
|
|
55
|
+
self._pedb.layout.find_net_by_name(net)._edb_object,
|
|
56
56
|
name,
|
|
57
57
|
self._pedb.point_data(*location),
|
|
58
58
|
self._pedb.stackup[layer]._edb_layer,
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
import re
|
|
24
24
|
|
|
25
|
-
from pyedb.dotnet.edb_core.cell.
|
|
25
|
+
from pyedb.dotnet.edb_core.cell.connectable import Connectable
|
|
26
26
|
from pyedb.dotnet.edb_core.edb_data.padstacks_data import EDBPadstackInstance
|
|
27
27
|
from pyedb.dotnet.edb_core.edb_data.primitives_data import cast
|
|
28
28
|
|
|
@@ -159,24 +159,6 @@ class Terminal(Connectable):
|
|
|
159
159
|
ppp.DoRenormalize = value
|
|
160
160
|
self._port_post_processing_prop = ppp
|
|
161
161
|
|
|
162
|
-
@property
|
|
163
|
-
def name(self):
|
|
164
|
-
"""Port Name.
|
|
165
|
-
|
|
166
|
-
Returns
|
|
167
|
-
-------
|
|
168
|
-
str
|
|
169
|
-
"""
|
|
170
|
-
return self._edb_object.GetName()
|
|
171
|
-
|
|
172
|
-
@name.setter
|
|
173
|
-
def name(self, value):
|
|
174
|
-
if isinstance(value, str):
|
|
175
|
-
if not any(port for port in list(self._pedb.excitations.keys()) if port == value):
|
|
176
|
-
self._edb_object.SetName(value)
|
|
177
|
-
else:
|
|
178
|
-
self._pedb.logger.warning("An existing port already has this same name. A port name must be unique.")
|
|
179
|
-
|
|
180
162
|
@property
|
|
181
163
|
def net_name(self):
|
|
182
164
|
"""Net name.
|