pyedb 0.18.0__py3-none-any.whl → 0.20.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_data.py +8 -11
- pyedb/configuration/cfg_nets.py +14 -0
- pyedb/configuration/cfg_pin_groups.py +57 -20
- pyedb/configuration/cfg_ports_sources.py +248 -60
- pyedb/configuration/configuration.py +51 -17
- pyedb/dotnet/edb.py +156 -236
- 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 +271 -76
- 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 +10 -0
- pyedb/dotnet/edb_core/cell/terminal/pingroup_terminal.py +5 -0
- pyedb/dotnet/edb_core/cell/terminal/point_terminal.py +1 -12
- pyedb/dotnet/edb_core/cell/terminal/terminal.py +36 -20
- pyedb/dotnet/edb_core/cell/voltage_regulator.py +2 -16
- pyedb/dotnet/edb_core/components.py +88 -31
- pyedb/dotnet/edb_core/dotnet/database.py +5 -10
- pyedb/dotnet/edb_core/dotnet/primitive.py +20 -7
- pyedb/dotnet/edb_core/edb_data/control_file.py +2 -12
- pyedb/dotnet/edb_core/edb_data/padstacks_data.py +28 -37
- pyedb/dotnet/edb_core/edb_data/ports.py +0 -18
- pyedb/dotnet/edb_core/edb_data/primitives_data.py +1 -1
- 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 +23 -10
- pyedb/dotnet/edb_core/sim_setup_data/data/sim_setup_info.py +42 -3
- pyedb/dotnet/edb_core/sim_setup_data/data/simulation_settings.py +92 -158
- pyedb/dotnet/edb_core/sim_setup_data/data/siw_dc_ir_settings.py +22 -22
- pyedb/dotnet/edb_core/sim_setup_data/data/sweep_data.py +5 -2
- pyedb/dotnet/edb_core/sim_setup_data/io/siwave.py +76 -76
- pyedb/dotnet/edb_core/siwave.py +5 -6
- pyedb/dotnet/edb_core/stackup.py +18 -23
- pyedb/dotnet/edb_core/utilities/hfss_simulation_setup.py +23 -94
- pyedb/dotnet/edb_core/utilities/simulation_setup.py +40 -41
- pyedb/dotnet/edb_core/utilities/siwave_simulation_setup.py +26 -17
- 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.18.0.dist-info → pyedb-0.20.0.dist-info}/METADATA +8 -8
- {pyedb-0.18.0.dist-info → pyedb-0.20.0.dist-info}/RECORD +53 -52
- pyedb/dotnet/edb_core/dotnet/layout.py +0 -260
- {pyedb-0.18.0.dist-info → pyedb-0.20.0.dist-info}/LICENSE +0 -0
- {pyedb-0.18.0.dist-info → pyedb-0.20.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,16 +23,168 @@
|
|
|
23
23
|
"""
|
|
24
24
|
This module contains these classes: `EdbLayout` and `Shape`.
|
|
25
25
|
"""
|
|
26
|
-
|
|
26
|
+
from pyedb.dotnet.edb_core.cell.hierarchy.component import EDBComponent
|
|
27
27
|
from pyedb.dotnet.edb_core.cell.primitive import Bondwire
|
|
28
|
-
from pyedb.dotnet.edb_core.
|
|
29
|
-
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
|
+
)
|
|
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
|
+
)
|
|
50
|
+
from pyedb.dotnet.edb_core.edb_data.sources import PinGroup
|
|
51
|
+
from pyedb.dotnet.edb_core.general import convert_py_list_to_net_list
|
|
52
|
+
from pyedb.dotnet.edb_core.utilities.obj_base import ObjBase
|
|
30
53
|
|
|
31
54
|
|
|
32
|
-
class Layout(
|
|
55
|
+
class Layout(ObjBase):
|
|
33
56
|
def __init__(self, pedb, edb_object):
|
|
34
|
-
super().__init__(pedb)
|
|
35
|
-
|
|
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()
|
|
36
188
|
|
|
37
189
|
@property
|
|
38
190
|
def nets(self):
|
|
@@ -40,15 +192,41 @@ class Layout(EdbLayout):
|
|
|
40
192
|
|
|
41
193
|
Returns
|
|
42
194
|
-------
|
|
43
|
-
dict[str, :class:`pyedb.dotnet.edb_core.edb_data.nets_data.EDBNetsData`]
|
|
44
|
-
Dictionary of nets.
|
|
45
195
|
"""
|
|
46
196
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
|
52
230
|
|
|
53
231
|
@property
|
|
54
232
|
def bondwires(self):
|
|
@@ -59,73 +237,90 @@ class Layout(EdbLayout):
|
|
|
59
237
|
list :
|
|
60
238
|
List of bondwires.
|
|
61
239
|
"""
|
|
62
|
-
return [
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
]
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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)]
|
|
268
|
+
|
|
269
|
+
@property
|
|
270
|
+
def padstack_instances(self):
|
|
271
|
+
"""Get all padstack instances in a list."""
|
|
272
|
+
return [EDBPadstackInstance(i, self._pedb) for i in self._edb_object.PadstackInstances]
|
|
273
|
+
|
|
274
|
+
@property
|
|
275
|
+
def voltage_regulators(self):
|
|
276
|
+
return [VoltageRegulator(self._pedb, i) for i in list(self._edb_object.VoltageRegulators)]
|
|
277
|
+
|
|
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.
|
|
281
|
+
|
|
282
|
+
True if they are connected, False otherwise.
|
|
283
|
+
Read-Only.
|
|
284
|
+
"""
|
|
285
|
+
return self._edb_object.ArePortReferenceTerminalsConnected()
|
|
286
|
+
|
|
287
|
+
def find_object_by_id(self, value: int):
|
|
288
|
+
"""Find a layout object by Database ID.
|
|
289
|
+
|
|
290
|
+
Parameters
|
|
291
|
+
----------
|
|
292
|
+
value : int
|
|
293
|
+
ID of the object.
|
|
294
|
+
"""
|
|
295
|
+
obj = self._pedb._edb.Cell.Connectable.FindById(self._edb_object, value)
|
|
296
|
+
if obj.GetObjType().ToString() == "PadstackInstance":
|
|
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
|
|
84
301
|
|
|
85
302
|
Parameters
|
|
86
303
|
----------
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
definition_name : str
|
|
90
|
-
Bondwire definition name.
|
|
91
|
-
placement_layer : str
|
|
92
|
-
Layer name this bondwire will be on.
|
|
93
|
-
width : :class:`Value <ansys.edb.utility.Value>`
|
|
94
|
-
Bondwire width.
|
|
95
|
-
material : str
|
|
96
|
-
Bondwire material name.
|
|
97
|
-
start_layer_name : str
|
|
98
|
-
Name of start layer.
|
|
99
|
-
start_x : :class:`Value <ansys.edb.utility.Value>`
|
|
100
|
-
X value of start point.
|
|
101
|
-
start_y : :class:`Value <ansys.edb.utility.Value>`
|
|
102
|
-
Y value of start point.
|
|
103
|
-
end_layer_name : str
|
|
104
|
-
Name of end layer.
|
|
105
|
-
end_x : :class:`Value <ansys.edb.utility.Value>`
|
|
106
|
-
X value of end point.
|
|
107
|
-
end_y : :class:`Value <ansys.edb.utility.Value>`
|
|
108
|
-
Y value of end point.
|
|
109
|
-
net : str or :class:`Net <ansys.edb.net.Net>` or None
|
|
110
|
-
Net of the Bondwire.
|
|
304
|
+
value : str
|
|
305
|
+
Name of the net.
|
|
111
306
|
|
|
112
307
|
Returns
|
|
113
308
|
-------
|
|
114
|
-
|
|
115
|
-
Bondwire object created.
|
|
309
|
+
|
|
116
310
|
"""
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
)
|
|
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
|
|
313
|
+
|
|
314
|
+
def find_component_by_name(self, value: str):
|
|
315
|
+
"""Find a component object by name. Component name is the reference designator in layout.
|
|
316
|
+
|
|
317
|
+
Parameters
|
|
318
|
+
----------
|
|
319
|
+
value : str
|
|
320
|
+
Name of the component.
|
|
321
|
+
Returns
|
|
322
|
+
-------
|
|
323
|
+
|
|
324
|
+
"""
|
|
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"),
|
|
@@ -86,3 +86,13 @@ class PadstackInstanceTerminal(Terminal):
|
|
|
86
86
|
terminal = PadstackInstanceTerminal(self._pedb, terminal)
|
|
87
87
|
|
|
88
88
|
return terminal if not terminal.is_null else False
|
|
89
|
+
|
|
90
|
+
def _get_parameters(self):
|
|
91
|
+
"""Gets the parameters of the padstack instance terminal."""
|
|
92
|
+
_, padstack_inst, layer_obj = self._edb_object.GetParameters()
|
|
93
|
+
return padstack_inst, layer_obj
|
|
94
|
+
|
|
95
|
+
@property
|
|
96
|
+
def padstack_instance(self):
|
|
97
|
+
p_inst, _ = self._get_parameters()
|
|
98
|
+
return self._pedb.layout.find_object_by_id(p_inst.GetId())
|
|
@@ -57,3 +57,8 @@ class PinGroupTerminal(Terminal):
|
|
|
57
57
|
)
|
|
58
58
|
term = PinGroupTerminal(self._pedb, term)
|
|
59
59
|
return term if not term.is_null else False
|
|
60
|
+
|
|
61
|
+
def pin_group(self):
|
|
62
|
+
"""Gets the pin group the terminal refers to."""
|
|
63
|
+
name = self._edb_object.GetPinGroup().GetName()
|
|
64
|
+
return self._pedb.siwave.pin_groups[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,
|
|
@@ -60,14 +60,3 @@ class PointTerminal(Terminal):
|
|
|
60
60
|
)
|
|
61
61
|
terminal = PointTerminal(self._pedb, terminal)
|
|
62
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)
|