pyedb 0.15.dev0__py3-none-any.whl → 0.17.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_common.py +1 -3
- pyedb/configuration/cfg_components.py +49 -5
- pyedb/configuration/cfg_data.py +3 -6
- pyedb/configuration/cfg_package_definition.py +3 -5
- pyedb/configuration/cfg_setup.py +214 -176
- pyedb/configuration/cfg_stackup.py +4 -4
- pyedb/configuration/configuration.py +9 -5
- pyedb/dotnet/edb.py +64 -44
- pyedb/dotnet/edb_core/cell/__init__.py +0 -0
- 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 +143 -0
- 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 +25 -1
- 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/mesh_operation.py +63 -49
- pyedb/dotnet/edb_core/sim_setup_data/data/settings.py +1 -1
- pyedb/dotnet/edb_core/sim_setup_data/data/sim_setup_info.py +81 -0
- pyedb/dotnet/edb_core/sim_setup_data/data/simulation_settings.py +424 -0
- pyedb/dotnet/edb_core/sim_setup_data/data/sweep_data.py +131 -96
- pyedb/dotnet/edb_core/siwave.py +63 -0
- pyedb/dotnet/edb_core/utilities/hfss_simulation_setup.py +469 -0
- pyedb/dotnet/edb_core/utilities/simulation_setup.py +112 -773
- pyedb/dotnet/edb_core/utilities/siwave_simulation_setup.py +369 -0
- 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.15.dev0.dist-info → pyedb-0.17.0.dist-info}/METADATA +1 -1
- {pyedb-0.15.dev0.dist-info → pyedb-0.17.0.dist-info}/RECORD +42 -28
- {pyedb-0.15.dev0.dist-info → pyedb-0.17.0.dist-info}/LICENSE +0 -0
- {pyedb-0.15.dev0.dist-info → pyedb-0.17.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,143 @@
|
|
|
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 Connectable
|
|
24
|
+
from pyedb.dotnet.edb_core.edb_data.padstacks_data import EDBPadstackInstance
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class VoltageRegulator(Connectable):
|
|
28
|
+
"""Class managing EDB voltage regulator."""
|
|
29
|
+
|
|
30
|
+
def __init__(self, pedb, edb_object=None):
|
|
31
|
+
super().__init__(pedb, edb_object)
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def component(self):
|
|
35
|
+
"""Retrieve voltage regulator component"""
|
|
36
|
+
if not self._edb_object.GetComponent().IsNull():
|
|
37
|
+
ref_des = self._edb_object.GetComponent().GetName()
|
|
38
|
+
if not ref_des:
|
|
39
|
+
return False
|
|
40
|
+
return self._pedb.components.instances[ref_des]
|
|
41
|
+
self._pedb.logger.warning("No voltage regulator component.")
|
|
42
|
+
return False
|
|
43
|
+
|
|
44
|
+
@component.setter
|
|
45
|
+
def component(self, value):
|
|
46
|
+
if not isinstance(value, str):
|
|
47
|
+
self._pedb.logger.error("refdes name must be provided to set vrm component")
|
|
48
|
+
return
|
|
49
|
+
if value not in self._pedb.components.instances:
|
|
50
|
+
self._pedb.logger.error(f"component {value} not found in layout")
|
|
51
|
+
return
|
|
52
|
+
self._edb_object.SetGroup(self._pedb.components.instances[value].edbcomponent)
|
|
53
|
+
|
|
54
|
+
@property
|
|
55
|
+
def load_regulator_current(self):
|
|
56
|
+
"""Retrieve load regulator current value"""
|
|
57
|
+
return self._edb_object.GetLoadRegulationCurrent().ToDouble()
|
|
58
|
+
|
|
59
|
+
@load_regulator_current.setter
|
|
60
|
+
def load_regulator_current(self, value):
|
|
61
|
+
_value = self._pedb.edb_value(value)
|
|
62
|
+
self._edb_object.SetLoadRegulationCurrent(_value)
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def load_regulation_percent(self):
|
|
66
|
+
"""Retrieve load regulation percent value."""
|
|
67
|
+
return self._edb_object.GetLoadRegulationPercent().ToDouble()
|
|
68
|
+
|
|
69
|
+
@load_regulation_percent.setter
|
|
70
|
+
def load_regulation_percent(self, value):
|
|
71
|
+
_value = self._edb_object.edb_value(value)
|
|
72
|
+
self._edb_object.SetLoadRegulationPercent(_value)
|
|
73
|
+
|
|
74
|
+
@property
|
|
75
|
+
def name(self):
|
|
76
|
+
"""Retrieve voltage regulator name."""
|
|
77
|
+
return self._edb_object.GetName()
|
|
78
|
+
|
|
79
|
+
@name.setter
|
|
80
|
+
def name(self, value):
|
|
81
|
+
if isinstance(value, str):
|
|
82
|
+
self._edb_object.SetName(value)
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def negative_remote_sense_pin(self):
|
|
86
|
+
"""Retrieve negative remote sense pin."""
|
|
87
|
+
edb_pin = self._edb_object.GetNegRemoteSensePin()
|
|
88
|
+
return self._pedb.padstacks.instances[edb_pin.GetId()]
|
|
89
|
+
|
|
90
|
+
@negative_remote_sense_pin.setter
|
|
91
|
+
def negative_remote_sense_pin(self, value):
|
|
92
|
+
if isinstance(value, int):
|
|
93
|
+
if value in self._pedb.padsatcks.instances:
|
|
94
|
+
_inst = self._pedb.padsatcks.instances[value]
|
|
95
|
+
if self._edb_object.SetNegRemoteSensePin(_inst._edb_object):
|
|
96
|
+
self._negative_remote_sense_pin = _inst
|
|
97
|
+
elif isinstance(value, EDBPadstackInstance):
|
|
98
|
+
if self._edb_object.SetNegRemoteSensePin(value._edb_object):
|
|
99
|
+
self._negative_remote_sense_pin = value
|
|
100
|
+
|
|
101
|
+
@property
|
|
102
|
+
def positive_remote_sense_pin(self):
|
|
103
|
+
"""Retrieve positive remote sense pin."""
|
|
104
|
+
edb_pin = self._edb_object.GetPosRemoteSensePin()
|
|
105
|
+
return self._pedb.padstacks.instances[edb_pin.GetId()]
|
|
106
|
+
|
|
107
|
+
@positive_remote_sense_pin.setter
|
|
108
|
+
def positive_remote_sense_pin(self, value):
|
|
109
|
+
if isinstance(value, int):
|
|
110
|
+
if value in self._pedb.padsatcks.instances:
|
|
111
|
+
_inst = self._pedb.padsatcks.instances[value]
|
|
112
|
+
if self._edb_object.SetPosRemoteSensePin(_inst._edb_object):
|
|
113
|
+
self._positive_remote_sense_pin = _inst
|
|
114
|
+
if not self.component:
|
|
115
|
+
self.component = _inst._edb_object.GetComponent().GetName()
|
|
116
|
+
elif isinstance(value, EDBPadstackInstance):
|
|
117
|
+
if self._edb_object.SetPosRemoteSensePin(value._edb_object):
|
|
118
|
+
self._positive_remote_sense_pin = value
|
|
119
|
+
if not self.component:
|
|
120
|
+
self.component = value._edb_object.GetComponent().GetName()
|
|
121
|
+
|
|
122
|
+
@property
|
|
123
|
+
def voltage(self):
|
|
124
|
+
"""Retrieve voltage value."""
|
|
125
|
+
return self._edb_object.GetVoltage().ToDouble()
|
|
126
|
+
|
|
127
|
+
@voltage.setter
|
|
128
|
+
def voltage(self, value):
|
|
129
|
+
self._edb_object.SetVoltage(self._pedb.edb_value(value))
|
|
130
|
+
|
|
131
|
+
@property
|
|
132
|
+
def is_active(self):
|
|
133
|
+
"""Check is voltage regulator is active."""
|
|
134
|
+
return self._edb_object.IsActive()
|
|
135
|
+
|
|
136
|
+
@is_active.setter
|
|
137
|
+
def is_active(self, value):
|
|
138
|
+
if isinstance(value, bool):
|
|
139
|
+
self._edb_object.SetIsActive(value)
|
|
140
|
+
|
|
141
|
+
@property
|
|
142
|
+
def is_null(self):
|
|
143
|
+
return self._edb_object.IsNull()
|
|
@@ -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."""
|