pyedb 0.16.0__py3-none-any.whl → 0.18.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_components.py +47 -1
- pyedb/configuration/configuration.py +2 -0
- pyedb/dotnet/edb.py +133 -64
- pyedb/dotnet/edb_core/cell/hierarchy/component.py +12 -17
- pyedb/dotnet/edb_core/cell/hierarchy/hierarchy_obj.py +50 -0
- pyedb/dotnet/edb_core/cell/layout.py +0 -6
- pyedb/dotnet/edb_core/cell/voltage_regulator.py +0 -5
- pyedb/dotnet/edb_core/components.py +2 -2
- pyedb/dotnet/edb_core/dotnet/primitive.py +129 -3
- pyedb/dotnet/edb_core/edb_data/hfss_pi_simulation_setup_data.py +0 -460
- pyedb/dotnet/edb_core/edb_data/primitives_data.py +38 -38
- pyedb/dotnet/edb_core/edb_data/raptor_x_simulation_setup_data.py +1 -1
- pyedb/dotnet/edb_core/layout.py +21 -0
- pyedb/dotnet/edb_core/layout_validation.py +26 -0
- pyedb/dotnet/edb_core/nets.py +1 -1
- pyedb/dotnet/edb_core/sim_setup_data/data/sim_setup_info.py +1 -1
- pyedb/dotnet/edb_core/sim_setup_data/data/simulation_settings.py +357 -0
- pyedb/dotnet/edb_core/siwave.py +14 -0
- pyedb/dotnet/edb_core/utilities/hfss_simulation_setup.py +83 -0
- pyedb/dotnet/edb_core/utilities/simulation_setup.py +7 -4
- pyedb/misc/siw_feature_config/xtalk_scan/fd_xtalk_scan_config.py +91 -0
- pyedb/misc/siw_feature_config/xtalk_scan/impedance_scan_config.py +70 -0
- pyedb/misc/siw_feature_config/xtalk_scan/net.py +69 -0
- pyedb/misc/siw_feature_config/xtalk_scan/pins.py +60 -0
- pyedb/misc/siw_feature_config/xtalk_scan/scan_config.py +88 -0
- pyedb/misc/siw_feature_config/xtalk_scan/td_xtalk_config.py +104 -0
- pyedb/workflow.py +32 -0
- {pyedb-0.16.0.dist-info → pyedb-0.18.0.dist-info}/METADATA +1 -1
- {pyedb-0.16.0.dist-info → pyedb-0.18.0.dist-info}/RECORD +32 -24
- {pyedb-0.16.0.dist-info → pyedb-0.18.0.dist-info}/LICENSE +0 -0
- {pyedb-0.16.0.dist-info → pyedb-0.18.0.dist-info}/WHEEL +0 -0
|
@@ -24,6 +24,7 @@ import logging
|
|
|
24
24
|
import re
|
|
25
25
|
import warnings
|
|
26
26
|
|
|
27
|
+
from pyedb.dotnet.edb_core.cell.hierarchy.hierarchy_obj import Group
|
|
27
28
|
from pyedb.dotnet.edb_core.cell.hierarchy.model import PinPairModel, SPICEModel
|
|
28
29
|
from pyedb.dotnet.edb_core.cell.hierarchy.netlist_model import NetlistModel
|
|
29
30
|
from pyedb.dotnet.edb_core.cell.hierarchy.pin_pair_model import PinPair
|
|
@@ -44,7 +45,7 @@ if not is_ironpython:
|
|
|
44
45
|
from pyedb.generic.general_methods import get_filename_without_extension
|
|
45
46
|
|
|
46
47
|
|
|
47
|
-
class EDBComponent(
|
|
48
|
+
class EDBComponent(Group):
|
|
48
49
|
"""Manages EDB functionalities for components.
|
|
49
50
|
|
|
50
51
|
Parameters
|
|
@@ -56,9 +57,9 @@ class EDBComponent(object):
|
|
|
56
57
|
|
|
57
58
|
"""
|
|
58
59
|
|
|
59
|
-
def __init__(self, pedb,
|
|
60
|
-
|
|
61
|
-
self.edbcomponent =
|
|
60
|
+
def __init__(self, pedb, edb_object):
|
|
61
|
+
super().__init__(pedb, edb_object)
|
|
62
|
+
self.edbcomponent = edb_object
|
|
62
63
|
self._layout_instance = None
|
|
63
64
|
self._comp_instance = None
|
|
64
65
|
|
|
@@ -186,7 +187,10 @@ class EDBComponent(object):
|
|
|
186
187
|
@property
|
|
187
188
|
def enabled(self):
|
|
188
189
|
"""Get or Set the component to active mode."""
|
|
189
|
-
|
|
190
|
+
if self.type.lower() in ["resistor", "capacitor", "inductor"]:
|
|
191
|
+
return self.component_property.IsEnabled()
|
|
192
|
+
else:
|
|
193
|
+
return
|
|
190
194
|
|
|
191
195
|
@enabled.setter
|
|
192
196
|
def enabled(self, value):
|
|
@@ -319,11 +323,11 @@ class EDBComponent(object):
|
|
|
319
323
|
str
|
|
320
324
|
Reference Designator Name.
|
|
321
325
|
"""
|
|
322
|
-
return self.
|
|
326
|
+
return self.name
|
|
323
327
|
|
|
324
328
|
@refdes.setter
|
|
325
329
|
def refdes(self, name):
|
|
326
|
-
self.
|
|
330
|
+
self.name = name
|
|
327
331
|
|
|
328
332
|
@property
|
|
329
333
|
def is_null(self):
|
|
@@ -395,12 +399,7 @@ class EDBComponent(object):
|
|
|
395
399
|
"""
|
|
396
400
|
if self.model_type == "RLC":
|
|
397
401
|
if not self._pin_pairs:
|
|
398
|
-
|
|
399
|
-
return 1e-9
|
|
400
|
-
elif self.type == "Resistor":
|
|
401
|
-
return 1e6
|
|
402
|
-
else:
|
|
403
|
-
return 1
|
|
402
|
+
return
|
|
404
403
|
else:
|
|
405
404
|
pin_pair = self._pin_pairs[0]
|
|
406
405
|
if len([i for i in pin_pair.rlc_enable if i]) == 1:
|
|
@@ -731,10 +730,6 @@ class EDBComponent(object):
|
|
|
731
730
|
"""Set component part name."""
|
|
732
731
|
self.edbcomponent.GetComponentDef().SetName(name)
|
|
733
732
|
|
|
734
|
-
@property
|
|
735
|
-
def _edb(self):
|
|
736
|
-
return self._pedb.edb_api
|
|
737
|
-
|
|
738
733
|
@property
|
|
739
734
|
def placement_layer(self):
|
|
740
735
|
"""Placement layer.
|
|
@@ -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
|
+
import logging
|
|
24
|
+
|
|
25
|
+
from pyedb.dotnet.edb_core.cell.layout_obj import Connectable
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class HierarchyObj(Connectable):
|
|
29
|
+
def __init__(self, pedb, edb_object):
|
|
30
|
+
super().__init__(pedb, edb_object)
|
|
31
|
+
|
|
32
|
+
@property
|
|
33
|
+
def component_def(self):
|
|
34
|
+
"""Component definition."""
|
|
35
|
+
return self._edb_object.GetComponentDef().GetName()
|
|
36
|
+
|
|
37
|
+
@property
|
|
38
|
+
def location(self):
|
|
39
|
+
"""XY Coordinates."""
|
|
40
|
+
flag, x, y = self._edb_object.GetLocation()
|
|
41
|
+
if flag:
|
|
42
|
+
return [x, y]
|
|
43
|
+
else: # pragma no cover
|
|
44
|
+
logging.warning(f"Failed to get location of '{self.name}'.")
|
|
45
|
+
return
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class Group(HierarchyObj):
|
|
49
|
+
def __init__(self, pedb, edb_object):
|
|
50
|
+
super().__init__(pedb, edb_object)
|
|
@@ -84,8 +84,6 @@ class Layout(EdbLayout):
|
|
|
84
84
|
|
|
85
85
|
Parameters
|
|
86
86
|
----------
|
|
87
|
-
layout : :class:`Layout <ansys.edb.layout.Layout>`
|
|
88
|
-
Layout this bondwire will be in.
|
|
89
87
|
bondwire_type : :class:`BondwireType`
|
|
90
88
|
Type of bondwire: kAPDBondWire or kJDECBondWire types.
|
|
91
89
|
definition_name : str
|
|
@@ -96,16 +94,12 @@ class Layout(EdbLayout):
|
|
|
96
94
|
Bondwire width.
|
|
97
95
|
material : str
|
|
98
96
|
Bondwire material name.
|
|
99
|
-
start_context : :class:`CellInstance <ansys.edb.hierarchy.CellInstance>`
|
|
100
|
-
Start context: None means top level.
|
|
101
97
|
start_layer_name : str
|
|
102
98
|
Name of start layer.
|
|
103
99
|
start_x : :class:`Value <ansys.edb.utility.Value>`
|
|
104
100
|
X value of start point.
|
|
105
101
|
start_y : :class:`Value <ansys.edb.utility.Value>`
|
|
106
102
|
Y value of start point.
|
|
107
|
-
end_context : :class:`CellInstance <ansys.edb.hierarchy.CellInstance>`
|
|
108
|
-
End context: None means top level.
|
|
109
103
|
end_layer_name : str
|
|
110
104
|
Name of end layer.
|
|
111
105
|
end_x : :class:`Value <ansys.edb.utility.Value>`
|
|
@@ -51,11 +51,6 @@ class VoltageRegulator(Connectable):
|
|
|
51
51
|
return
|
|
52
52
|
self._edb_object.SetGroup(self._pedb.components.instances[value].edbcomponent)
|
|
53
53
|
|
|
54
|
-
@property
|
|
55
|
-
def id(self):
|
|
56
|
-
"""Retrieve voltage regulator ID."""
|
|
57
|
-
return self._edb_object.GetId()
|
|
58
|
-
|
|
59
54
|
@property
|
|
60
55
|
def load_regulator_current(self):
|
|
61
56
|
"""Retrieve load regulator current value"""
|
|
@@ -174,7 +174,7 @@ class Components(object):
|
|
|
174
174
|
Examples
|
|
175
175
|
--------
|
|
176
176
|
|
|
177
|
-
>>> from pyedb
|
|
177
|
+
>>> from pyedb import Edb
|
|
178
178
|
>>> edbapp = Edb("myaedbfolder")
|
|
179
179
|
>>> edbapp.components.components
|
|
180
180
|
|
|
@@ -194,7 +194,7 @@ class Components(object):
|
|
|
194
194
|
Examples
|
|
195
195
|
--------
|
|
196
196
|
|
|
197
|
-
>>> from pyedb
|
|
197
|
+
>>> from pyedb import Edb
|
|
198
198
|
>>> edbapp = Edb("myaedbfolder")
|
|
199
199
|
>>> edbapp.components.components
|
|
200
200
|
|
|
@@ -72,10 +72,38 @@ class PrimitiveDotNet:
|
|
|
72
72
|
self.edb_api = api._edb
|
|
73
73
|
self.prim_obj = prim_object
|
|
74
74
|
|
|
75
|
+
@property
|
|
76
|
+
def id(self):
|
|
77
|
+
return self.prim_obj.GetId()
|
|
78
|
+
|
|
75
79
|
@property
|
|
76
80
|
def api_class(self):
|
|
77
81
|
return self.api
|
|
78
82
|
|
|
83
|
+
@property
|
|
84
|
+
def aedt_name(self):
|
|
85
|
+
"""Name to be visualized in AEDT.
|
|
86
|
+
|
|
87
|
+
Returns
|
|
88
|
+
-------
|
|
89
|
+
str
|
|
90
|
+
Name.
|
|
91
|
+
"""
|
|
92
|
+
from System import String
|
|
93
|
+
|
|
94
|
+
val = String("")
|
|
95
|
+
|
|
96
|
+
_, name = self.prim_obj.GetProductProperty(self._app._edb.ProductId.Designer, 1, val)
|
|
97
|
+
name = str(name).strip("'")
|
|
98
|
+
if name == "":
|
|
99
|
+
name = "{}__{}".format(self.primitive_type, self.id)
|
|
100
|
+
self.prim_obj.SetProductProperty(self._app._edb.ProductId.Designer, 1, name)
|
|
101
|
+
return name
|
|
102
|
+
|
|
103
|
+
@aedt_name.setter
|
|
104
|
+
def aedt_name(self, value):
|
|
105
|
+
self.prim_obj.SetProductProperty(self._app._edb.ProductId.Designer, 1, value)
|
|
106
|
+
|
|
79
107
|
@property
|
|
80
108
|
def api_object(self):
|
|
81
109
|
return self.prim_obj
|
|
@@ -298,9 +326,9 @@ class PrimitiveDotNet:
|
|
|
298
326
|
# i += 1
|
|
299
327
|
else:
|
|
300
328
|
arc_h = point.GetArcHeight().ToDouble()
|
|
301
|
-
p1 = [my_net_points[i-1].X.ToDouble(), my_net_points[i-1].Y.ToDouble()]
|
|
302
|
-
if i+1 < len(my_net_points):
|
|
303
|
-
p2 = [my_net_points[i+1].X.ToDouble(), my_net_points[i+1].Y.ToDouble()]
|
|
329
|
+
p1 = [my_net_points[i - 1].X.ToDouble(), my_net_points[i - 1].Y.ToDouble()]
|
|
330
|
+
if i + 1 < len(my_net_points):
|
|
331
|
+
p2 = [my_net_points[i + 1].X.ToDouble(), my_net_points[i + 1].Y.ToDouble()]
|
|
304
332
|
else:
|
|
305
333
|
p2 = [my_net_points[0].X.ToDouble(), my_net_points[0].Y.ToDouble()]
|
|
306
334
|
x_arc, y_arc = self._eval_arc_points(p1, p2, arc_h, num)
|
|
@@ -352,6 +380,61 @@ class PrimitiveDotNet:
|
|
|
352
380
|
except:
|
|
353
381
|
return points
|
|
354
382
|
|
|
383
|
+
def expand(self, offset=0.001, tolerance=1e-12, round_corners=True, maximum_corner_extension=0.001):
|
|
384
|
+
"""Expand the polygon shape by an absolute value in all direction.
|
|
385
|
+
Offset can be negative for negative expansion.
|
|
386
|
+
|
|
387
|
+
Parameters
|
|
388
|
+
----------
|
|
389
|
+
offset : float, optional
|
|
390
|
+
Offset value in meters.
|
|
391
|
+
tolerance : float, optional
|
|
392
|
+
Tolerance in meters.
|
|
393
|
+
round_corners : bool, optional
|
|
394
|
+
Whether to round corners or not.
|
|
395
|
+
If True, use rounded corners in the expansion otherwise use straight edges (can be degenerate).
|
|
396
|
+
maximum_corner_extension : float, optional
|
|
397
|
+
The maximum corner extension (when round corners are not used) at which point the corner is clipped.
|
|
398
|
+
"""
|
|
399
|
+
new_poly = self.polygon_data.edb_api.Expand(offset, tolerance, round_corners, maximum_corner_extension)
|
|
400
|
+
self.polygon_data = new_poly[0]
|
|
401
|
+
return True
|
|
402
|
+
|
|
403
|
+
def scale(self, factor, center=None):
|
|
404
|
+
"""Scales the polygon relative to a center point by a factor.
|
|
405
|
+
|
|
406
|
+
Parameters
|
|
407
|
+
----------
|
|
408
|
+
factor : float
|
|
409
|
+
Scaling factor.
|
|
410
|
+
center : List of float or str [x,y], optional
|
|
411
|
+
If None scaling is done from polygon center.
|
|
412
|
+
|
|
413
|
+
Returns
|
|
414
|
+
-------
|
|
415
|
+
bool
|
|
416
|
+
``True`` when successful, ``False`` when failed.
|
|
417
|
+
"""
|
|
418
|
+
if not isinstance(factor, str):
|
|
419
|
+
factor = float(factor)
|
|
420
|
+
polygon_data = self.polygon_data.create_from_arcs(self.polygon_data.edb_api.GetArcData(), True)
|
|
421
|
+
if not center:
|
|
422
|
+
center = self.polygon_data.edb_api.GetBoundingCircleCenter()
|
|
423
|
+
if center:
|
|
424
|
+
polygon_data.Scale(factor, center)
|
|
425
|
+
self.polygon_data = polygon_data
|
|
426
|
+
return True
|
|
427
|
+
else:
|
|
428
|
+
self._pedb.logger.error(f"Failed to evaluate center on primitive {self.id}")
|
|
429
|
+
elif isinstance(center, list) and len(center) == 2:
|
|
430
|
+
center = self._edb.Geometry.PointData(
|
|
431
|
+
self._edb.Utility.Value(center[0]), self._edb.Utility.Value(center[1])
|
|
432
|
+
)
|
|
433
|
+
polygon_data.Scale(factor, center)
|
|
434
|
+
self.polygon_data = polygon_data
|
|
435
|
+
return True
|
|
436
|
+
return False
|
|
437
|
+
|
|
355
438
|
|
|
356
439
|
class RectangleDotNet(PrimitiveDotNet):
|
|
357
440
|
"""Class representing a rectangle object."""
|
|
@@ -577,6 +660,28 @@ class CircleDotNet(PrimitiveDotNet):
|
|
|
577
660
|
""":obj:`bool`: If a circle can be a zone."""
|
|
578
661
|
return True
|
|
579
662
|
|
|
663
|
+
def expand(self, offset=0.001, tolerance=1e-12, round_corners=True, maximum_corner_extension=0.001):
|
|
664
|
+
"""Expand the polygon shape by an absolute value in all direction.
|
|
665
|
+
Offset can be negative for negative expansion.
|
|
666
|
+
|
|
667
|
+
Parameters
|
|
668
|
+
----------
|
|
669
|
+
offset : float, optional
|
|
670
|
+
Offset value in meters.
|
|
671
|
+
tolerance : float, optional
|
|
672
|
+
Tolerance in meters. Ignored for Circle and Path.
|
|
673
|
+
round_corners : bool, optional
|
|
674
|
+
Whether to round corners or not.
|
|
675
|
+
If True, use rounded corners in the expansion otherwise use straight edges (can be degenerate).
|
|
676
|
+
Ignored for Circle and Path.
|
|
677
|
+
maximum_corner_extension : float, optional
|
|
678
|
+
The maximum corner extension (when round corners are not used) at which point the corner is clipped.
|
|
679
|
+
Ignored for Circle and Path.
|
|
680
|
+
"""
|
|
681
|
+
center_x, center_y, radius = self.get_parameters()
|
|
682
|
+
self.set_parameters(center_x, center_y, radius.ToFloat() + offset)
|
|
683
|
+
return True
|
|
684
|
+
|
|
580
685
|
|
|
581
686
|
class TextDotNet(PrimitiveDotNet):
|
|
582
687
|
"""Class representing a text object."""
|
|
@@ -851,6 +956,27 @@ class PathDotNet(PrimitiveDotNet):
|
|
|
851
956
|
"""
|
|
852
957
|
return True
|
|
853
958
|
|
|
959
|
+
def expand(self, offset=0.001, tolerance=1e-12, round_corners=True, maximum_corner_extension=0.001):
|
|
960
|
+
"""Expand the polygon shape by an absolute value in all direction.
|
|
961
|
+
Offset can be negative for negative expansion.
|
|
962
|
+
|
|
963
|
+
Parameters
|
|
964
|
+
----------
|
|
965
|
+
offset : float, optional
|
|
966
|
+
Offset value in meters.
|
|
967
|
+
tolerance : float, optional
|
|
968
|
+
Tolerance in meters. Ignored for Circle and Path.
|
|
969
|
+
round_corners : bool, optional
|
|
970
|
+
Whether to round corners or not.
|
|
971
|
+
If True, use rounded corners in the expansion otherwise use straight edges (can be degenerate).
|
|
972
|
+
Ignored for Circle and Path.
|
|
973
|
+
maximum_corner_extension : float, optional
|
|
974
|
+
The maximum corner extension (when round corners are not used) at which point the corner is clipped.
|
|
975
|
+
Ignored for Circle and Path.
|
|
976
|
+
"""
|
|
977
|
+
self.width = self.width + offset
|
|
978
|
+
return True
|
|
979
|
+
|
|
854
980
|
|
|
855
981
|
class BondwireDotNet(PrimitiveDotNet):
|
|
856
982
|
"""Class representing a bondwire object."""
|