pyedb 0.48.0__py3-none-any.whl → 0.50.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_modeler.py +42 -11
- pyedb/configuration/cfg_ports_sources.py +9 -1
- pyedb/configuration/cfg_stackup.py +4 -4
- pyedb/dotnet/database/cell/hierarchy/component.py +64 -8
- pyedb/dotnet/database/cell/hierarchy/s_parameter_model.py +7 -0
- pyedb/dotnet/database/cell/terminal/terminal.py +3 -3
- pyedb/dotnet/database/components.py +68 -46
- pyedb/dotnet/database/definition/package_def.py +29 -5
- pyedb/dotnet/database/edb_data/padstacks_data.py +5 -5
- pyedb/dotnet/database/edb_data/primitives_data.py +3 -3
- pyedb/dotnet/database/edb_data/variables.py +3 -3
- pyedb/dotnet/database/geometry/polygon_data.py +14 -1
- pyedb/dotnet/database/materials.py +16 -16
- pyedb/dotnet/database/modeler.py +50 -9
- pyedb/dotnet/database/padstack.py +7 -5
- pyedb/dotnet/database/sim_setup_data/data/settings.py +28 -0
- pyedb/dotnet/database/siwave.py +36 -32
- pyedb/dotnet/database/stackup.py +1 -0
- pyedb/dotnet/database/utilities/hfss_simulation_setup.py +5 -6
- pyedb/dotnet/database/utilities/siwave_simulation_setup.py +3 -1
- pyedb/dotnet/edb.py +22 -20
- pyedb/extensions/__init__.py +0 -0
- pyedb/extensions/via_design_backend.py +681 -0
- pyedb/grpc/database/components.py +57 -48
- pyedb/grpc/database/definition/materials.py +33 -33
- pyedb/grpc/database/definitions.py +6 -4
- pyedb/grpc/database/hfss.py +2 -2
- pyedb/grpc/database/hierarchy/component.py +3 -2
- pyedb/grpc/database/layers/stackup_layer.py +119 -22
- pyedb/grpc/database/layout_validation.py +5 -5
- pyedb/grpc/database/primitive/path.py +1 -1
- pyedb/grpc/database/source_excitations.py +156 -0
- pyedb/grpc/database/stackup.py +50 -24
- pyedb/grpc/edb.py +115 -105
- {pyedb-0.48.0.dist-info → pyedb-0.50.0.dist-info}/METADATA +1 -1
- {pyedb-0.48.0.dist-info → pyedb-0.50.0.dist-info}/RECORD +39 -38
- pyedb/extensions/pre_layout_design_toolkit/via_design.py +0 -1151
- {pyedb-0.48.0.dist-info → pyedb-0.50.0.dist-info}/LICENSE +0 -0
- {pyedb-0.48.0.dist-info → pyedb-0.50.0.dist-info}/WHEEL +0 -0
|
@@ -1696,9 +1696,9 @@ class EDBPadstackInstance(Primitive):
|
|
|
1696
1696
|
out = self._edb_padstackinstance.GetPositionAndRotationValue()
|
|
1697
1697
|
if self._edb_padstackinstance.GetComponent():
|
|
1698
1698
|
out2 = self._edb_padstackinstance.GetComponent().GetTransform().TransformPoint(out[1])
|
|
1699
|
-
self._position = [out2.X.ToDouble(), out2.Y.ToDouble()]
|
|
1699
|
+
self._position = [round(out2.X.ToDouble(), 6), round(out2.Y.ToDouble(), 6)]
|
|
1700
1700
|
elif out[0]:
|
|
1701
|
-
self._position = [out[1].X.ToDouble(), out[1].Y.ToDouble()]
|
|
1701
|
+
self._position = [round(out[1].X.ToDouble(), 6), round(out[1].Y.ToDouble(), 6)]
|
|
1702
1702
|
return self._position
|
|
1703
1703
|
|
|
1704
1704
|
@position.setter
|
|
@@ -1724,7 +1724,7 @@ class EDBPadstackInstance(Primitive):
|
|
|
1724
1724
|
out = self._edb_padstackinstance.GetPositionAndRotationValue()
|
|
1725
1725
|
|
|
1726
1726
|
if out[0]:
|
|
1727
|
-
return out[2].ToDouble()
|
|
1727
|
+
return round(out[2].ToDouble(), 6)
|
|
1728
1728
|
|
|
1729
1729
|
@property
|
|
1730
1730
|
def name(self):
|
|
@@ -1894,7 +1894,7 @@ class EDBPadstackInstance(Primitive):
|
|
|
1894
1894
|
Lower elavation of the placement layer.
|
|
1895
1895
|
"""
|
|
1896
1896
|
try:
|
|
1897
|
-
return self._edb_padstackinstance.GetGroup().GetPlacementLayer().Clone().GetLowerElevation()
|
|
1897
|
+
return round(self._edb_padstackinstance.GetGroup().GetPlacementLayer().Clone().GetLowerElevation(), 6)
|
|
1898
1898
|
except AttributeError: # pragma: no cover
|
|
1899
1899
|
return None
|
|
1900
1900
|
|
|
@@ -1908,7 +1908,7 @@ class EDBPadstackInstance(Primitive):
|
|
|
1908
1908
|
Upper elevation of the placement layer.
|
|
1909
1909
|
"""
|
|
1910
1910
|
try:
|
|
1911
|
-
return self._edb_padstackinstance.GetGroup().GetPlacementLayer().Clone().GetUpperElevation()
|
|
1911
|
+
return round(self._edb_padstackinstance.GetGroup().GetPlacementLayer().Clone().GetUpperElevation(), 6)
|
|
1912
1912
|
except AttributeError: # pragma: no cover
|
|
1913
1913
|
return None
|
|
1914
1914
|
|
|
@@ -522,9 +522,9 @@ class EDBArcs(object):
|
|
|
522
522
|
xt, yt = self._app._active_cell.primitive._get_points_for_plot(my_net_points, arc_segments)
|
|
523
523
|
if not xt:
|
|
524
524
|
return []
|
|
525
|
-
x, y = GeometryOperators.orient_polygon(xt, yt, clockwise=True)
|
|
526
|
-
return x, y
|
|
525
|
+
x, y = list(GeometryOperators.orient_polygon(xt, yt, clockwise=True))
|
|
526
|
+
return [x, y]
|
|
527
527
|
except:
|
|
528
528
|
x = []
|
|
529
529
|
y = []
|
|
530
|
-
return x, y
|
|
530
|
+
return [x, y]
|
|
@@ -57,7 +57,7 @@ class Variable:
|
|
|
57
57
|
str
|
|
58
58
|
|
|
59
59
|
"""
|
|
60
|
-
return self.
|
|
60
|
+
return self._var_server.GetVariableValue(self.name)[1].ToString()
|
|
61
61
|
|
|
62
62
|
@property
|
|
63
63
|
def value_object(self):
|
|
@@ -77,11 +77,11 @@ class Variable:
|
|
|
77
77
|
-------
|
|
78
78
|
float
|
|
79
79
|
"""
|
|
80
|
-
return self.
|
|
80
|
+
return self._var_server.GetVariableValue(self.name)[1].ToDouble()
|
|
81
81
|
|
|
82
82
|
@value.setter
|
|
83
83
|
def value(self, value):
|
|
84
|
-
self.
|
|
84
|
+
self._var_server.SetVariableValue(self.name, self._pedb.edb_value(value))
|
|
85
85
|
|
|
86
86
|
@property
|
|
87
87
|
def description(self):
|
|
@@ -20,6 +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
|
from typing import Union
|
|
23
|
+
import warnings
|
|
23
24
|
|
|
24
25
|
from pyedb.dotnet.database.general import convert_py_list_to_net_list
|
|
25
26
|
from pyedb.dotnet.database.geometry.point_data import PointData
|
|
@@ -132,10 +133,22 @@ class PolygonData:
|
|
|
132
133
|
poly = self._edb_object.CreateFromArcs(arcs, flag)
|
|
133
134
|
return PolygonData(self._pedb, poly)
|
|
134
135
|
|
|
135
|
-
def
|
|
136
|
+
def is_inside(self, x: Union[str, float], y: Union[str, float] = None) -> bool:
|
|
136
137
|
"""Determines whether a point is inside the polygon."""
|
|
138
|
+
if isinstance(x, list) and len(x) == 2:
|
|
139
|
+
y = x[1]
|
|
140
|
+
x = x[0]
|
|
137
141
|
return self._edb_object.PointInPolygon(self._pedb.point_data(x, y))
|
|
138
142
|
|
|
143
|
+
def point_in_polygon(self, x: Union[str, float], y: Union[str, float] = None) -> bool:
|
|
144
|
+
"""Determines whether a point is inside the polygon.
|
|
145
|
+
|
|
146
|
+
..deprecated:: 0.48.0
|
|
147
|
+
Use: func:`is_inside` instead.
|
|
148
|
+
"""
|
|
149
|
+
warnings.warn("Use method is_inside instead", DeprecationWarning)
|
|
150
|
+
return self.is_inside(x, y)
|
|
151
|
+
|
|
139
152
|
def get_point(self, index):
|
|
140
153
|
"""Gets the point at the index as a PointData object."""
|
|
141
154
|
edb_object = self._edb_object.GetPoint(index)
|
|
@@ -88,22 +88,22 @@ def get_line_float_value(line):
|
|
|
88
88
|
class MaterialProperties(BaseModel):
|
|
89
89
|
"""Store material properties."""
|
|
90
90
|
|
|
91
|
-
conductivity: Optional[PositiveFloat] =
|
|
92
|
-
dielectric_loss_tangent: Optional[PositiveFloat] =
|
|
93
|
-
magnetic_loss_tangent: Optional[PositiveFloat] =
|
|
94
|
-
mass_density: Optional[PositiveFloat] =
|
|
95
|
-
permittivity: Optional[PositiveFloat] =
|
|
96
|
-
permeability: Optional[PositiveFloat] =
|
|
97
|
-
poisson_ratio: Optional[PositiveFloat] =
|
|
98
|
-
specific_heat: Optional[PositiveFloat] =
|
|
99
|
-
thermal_conductivity: Optional[PositiveFloat] =
|
|
100
|
-
youngs_modulus: Optional[PositiveFloat] =
|
|
101
|
-
thermal_expansion_coefficient: Optional[PositiveFloat] =
|
|
102
|
-
dc_conductivity: Optional[PositiveFloat] =
|
|
103
|
-
dc_permittivity: Optional[PositiveFloat] =
|
|
104
|
-
dielectric_model_frequency: Optional[PositiveFloat] =
|
|
105
|
-
loss_tangent_at_frequency: Optional[PositiveFloat] =
|
|
106
|
-
permittivity_at_frequency: Optional[PositiveFloat] =
|
|
91
|
+
conductivity: Optional[PositiveFloat] = 0.0
|
|
92
|
+
dielectric_loss_tangent: Optional[PositiveFloat] = 0.0
|
|
93
|
+
magnetic_loss_tangent: Optional[PositiveFloat] = 0.0
|
|
94
|
+
mass_density: Optional[PositiveFloat] = 0.0
|
|
95
|
+
permittivity: Optional[PositiveFloat] = 0.0
|
|
96
|
+
permeability: Optional[PositiveFloat] = 0.0
|
|
97
|
+
poisson_ratio: Optional[PositiveFloat] = 0.0
|
|
98
|
+
specific_heat: Optional[PositiveFloat] = 0.0
|
|
99
|
+
thermal_conductivity: Optional[PositiveFloat] = 0.0
|
|
100
|
+
youngs_modulus: Optional[PositiveFloat] = 0.0
|
|
101
|
+
thermal_expansion_coefficient: Optional[PositiveFloat] = 0.0
|
|
102
|
+
dc_conductivity: Optional[PositiveFloat] = 0.0
|
|
103
|
+
dc_permittivity: Optional[PositiveFloat] = 0.0
|
|
104
|
+
dielectric_model_frequency: Optional[PositiveFloat] = 0.0
|
|
105
|
+
loss_tangent_at_frequency: Optional[PositiveFloat] = 0.0
|
|
106
|
+
permittivity_at_frequency: Optional[PositiveFloat] = 0.0
|
|
107
107
|
|
|
108
108
|
|
|
109
109
|
class Material(object):
|
pyedb/dotnet/database/modeler.py
CHANGED
|
@@ -455,9 +455,16 @@ class Modeler(object):
|
|
|
455
455
|
xcoeff = str(xcoeff)
|
|
456
456
|
return xcoeff, ycoeff
|
|
457
457
|
|
|
458
|
+
from pyedb.dotnet.database.edb_data.primitives_data import EdbPolygon
|
|
459
|
+
|
|
460
|
+
if isinstance(selection_polygon, EdbPolygon):
|
|
461
|
+
selection_polygon = selection_polygon._edb_object
|
|
462
|
+
if isinstance(polygon, EdbPolygon):
|
|
463
|
+
polygon = polygon._edb_object
|
|
464
|
+
|
|
458
465
|
selection_polygon_data = selection_polygon.GetPolygonData()
|
|
459
|
-
|
|
460
|
-
bound_center =
|
|
466
|
+
polygon_data = polygon.GetPolygonData()
|
|
467
|
+
bound_center = polygon_data.GetBoundingCircleCenter()
|
|
461
468
|
bound_center2 = selection_polygon_data.GetBoundingCircleCenter()
|
|
462
469
|
center = [bound_center.X.ToDouble(), bound_center.Y.ToDouble()]
|
|
463
470
|
center2 = [bound_center2.X.ToDouble(), bound_center2.Y.ToDouble()]
|
|
@@ -471,7 +478,7 @@ class Modeler(object):
|
|
|
471
478
|
prev_point = None
|
|
472
479
|
while continue_iterate:
|
|
473
480
|
try:
|
|
474
|
-
point =
|
|
481
|
+
point = polygon_data.GetPoint(i)
|
|
475
482
|
if prev_point != point:
|
|
476
483
|
check_inside = selection_polygon_data.PointInPolygon(point)
|
|
477
484
|
if check_inside:
|
|
@@ -481,14 +488,14 @@ class Modeler(object):
|
|
|
481
488
|
point.X.ToString() + "{}*{}".format(xcoeff, offset_name),
|
|
482
489
|
point.Y.ToString() + "{}*{}".format(ycoeff, offset_name),
|
|
483
490
|
)
|
|
484
|
-
|
|
491
|
+
polygon_data.SetPoint(i, new_points)
|
|
485
492
|
prev_point = point
|
|
486
493
|
i += 1
|
|
487
494
|
else:
|
|
488
495
|
continue_iterate = False
|
|
489
496
|
except:
|
|
490
497
|
continue_iterate = False
|
|
491
|
-
polygon.SetPolygonData(
|
|
498
|
+
polygon.SetPolygonData(polygon_data)
|
|
492
499
|
return True
|
|
493
500
|
|
|
494
501
|
def _create_path(
|
|
@@ -622,7 +629,7 @@ class Modeler(object):
|
|
|
622
629
|
|
|
623
630
|
return primitive
|
|
624
631
|
|
|
625
|
-
def create_polygon(self, main_shape, layer_name, voids=[], net_name=""):
|
|
632
|
+
def create_polygon(self, main_shape=None, layer_name="", voids=[], net_name="", points=None):
|
|
626
633
|
"""Create a polygon based on a list of points and voids.
|
|
627
634
|
|
|
628
635
|
Parameters
|
|
@@ -639,13 +646,40 @@ class Modeler(object):
|
|
|
639
646
|
List of shape objects for voids or points that creates the shapes. The default is``[]``.
|
|
640
647
|
net_name : str, optional
|
|
641
648
|
Name of the net. The default is ``""``.
|
|
649
|
+
points : list, optional
|
|
650
|
+
Added for compatibility with grpc.
|
|
642
651
|
|
|
643
652
|
Returns
|
|
644
653
|
-------
|
|
645
654
|
bool, :class:`dotnet.database.edb_data.primitives.Primitive`
|
|
646
655
|
Polygon when successful, ``False`` when failed.
|
|
647
656
|
"""
|
|
657
|
+
from pyedb.dotnet.database.geometry.polygon_data import PolygonData
|
|
658
|
+
|
|
659
|
+
if main_shape:
|
|
660
|
+
warnings.warn(
|
|
661
|
+
"main_shape argument will be deprecated soon with grpc version, use points instead.", DeprecationWarning
|
|
662
|
+
)
|
|
663
|
+
|
|
648
664
|
net = self._pedb.nets.find_or_create_net(net_name)
|
|
665
|
+
if points:
|
|
666
|
+
arcs = []
|
|
667
|
+
if isinstance(points, PolygonData):
|
|
668
|
+
points = points.points
|
|
669
|
+
for _ in range(len(points)):
|
|
670
|
+
arcs.append(
|
|
671
|
+
self._edb.Geometry.ArcData(
|
|
672
|
+
self._pedb.point_data(0, 0),
|
|
673
|
+
self._pedb.point_data(0, 0),
|
|
674
|
+
)
|
|
675
|
+
)
|
|
676
|
+
polygonData = self._edb.Geometry.PolygonData.CreateFromArcs(convert_py_list_to_net_list(arcs), True)
|
|
677
|
+
|
|
678
|
+
for idx, i in enumerate(points):
|
|
679
|
+
pdata_0 = self._pedb.edb_value(i[0])
|
|
680
|
+
pdata_1 = self._pedb.edb_value(i[1])
|
|
681
|
+
new_points = self._edb.Geometry.PointData(pdata_0, pdata_1)
|
|
682
|
+
polygonData.SetPoint(idx, new_points)
|
|
649
683
|
if isinstance(main_shape, list):
|
|
650
684
|
arcs = []
|
|
651
685
|
for _ in range(len(main_shape)):
|
|
@@ -666,9 +700,14 @@ class Modeler(object):
|
|
|
666
700
|
elif isinstance(main_shape, Modeler.Shape):
|
|
667
701
|
polygonData = self.shape_to_polygon_data(main_shape)
|
|
668
702
|
else:
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
703
|
+
if not points:
|
|
704
|
+
polygonData = main_shape
|
|
705
|
+
if isinstance(polygonData, PolygonData):
|
|
706
|
+
if not polygonData.points:
|
|
707
|
+
raise RuntimeError("Failed to create main shape polygon data")
|
|
708
|
+
else:
|
|
709
|
+
if polygonData.IsNull():
|
|
710
|
+
raise RuntimeError("Failed to create main shape polygon data")
|
|
672
711
|
for void in voids:
|
|
673
712
|
if isinstance(void, list):
|
|
674
713
|
void = self.Shape("polygon", points=void)
|
|
@@ -682,6 +721,8 @@ class Modeler(object):
|
|
|
682
721
|
self._logger.error("Failed to create void polygon data")
|
|
683
722
|
return False
|
|
684
723
|
polygonData.AddHole(voidPolygonData)
|
|
724
|
+
if isinstance(polygonData, PolygonData):
|
|
725
|
+
polygonData = polygonData._edb_object
|
|
685
726
|
polygon = self._pedb._edb.Cell.Primitive.Polygon.Create(
|
|
686
727
|
self._active_layout, layer_name, net.net_obj, polygonData
|
|
687
728
|
)
|
|
@@ -629,9 +629,11 @@ class EdbPadstacks(object):
|
|
|
629
629
|
if "PadstackDef" in str(type(pin)):
|
|
630
630
|
padparams = pin.GetData().GetPadParametersValue(layername, self.int_to_pad_type(pad_type))
|
|
631
631
|
else:
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
632
|
+
if not isinstance(pin, EDBPadstackInstance):
|
|
633
|
+
pin = EDBPadstackInstance(pin, self._pedb)
|
|
634
|
+
padparams = self._edb.definition.PadstackDefData(
|
|
635
|
+
pin._edb_object.GetPadstackDef().GetData()
|
|
636
|
+
).GetPadParametersValue(layername, self.int_to_pad_type(pad_type))
|
|
635
637
|
if padparams[2]:
|
|
636
638
|
geometry_type = int(padparams[1])
|
|
637
639
|
parameters = [i.ToString() for i in padparams[2]]
|
|
@@ -646,7 +648,7 @@ class EdbPadstacks(object):
|
|
|
646
648
|
)
|
|
647
649
|
else:
|
|
648
650
|
padparams = self._edb.definition.PadstackDefData(
|
|
649
|
-
pin.GetPadstackDef().GetData()
|
|
651
|
+
pin._edb_object.GetPadstackDef().GetData()
|
|
650
652
|
).GetPolygonalPadParameters(layername, self.int_to_pad_type(pad_type))
|
|
651
653
|
|
|
652
654
|
if padparams[0]:
|
|
@@ -1076,7 +1078,7 @@ class EdbPadstacks(object):
|
|
|
1076
1078
|
return padstackname
|
|
1077
1079
|
|
|
1078
1080
|
def _get_pin_layer_range(self, pin):
|
|
1079
|
-
res, fromlayer, tolayer = pin.GetLayerRange()
|
|
1081
|
+
res, fromlayer, tolayer = pin._edb_object.GetLayerRange()
|
|
1080
1082
|
if res:
|
|
1081
1083
|
return fromlayer, tolayer
|
|
1082
1084
|
else:
|
|
@@ -289,6 +289,34 @@ class AdaptiveSettings(object):
|
|
|
289
289
|
self.adaptive_settings.AdaptiveFrequencyDataList.Add(high_freq_adapt_data)
|
|
290
290
|
return self._parent._update_setup()
|
|
291
291
|
|
|
292
|
+
def add_multi_frequency_adaptive_setup(self, freq_list, max_num_passes=10, max_delta_s=0.02):
|
|
293
|
+
"""Add a setup for frequency data.
|
|
294
|
+
|
|
295
|
+
Parameters
|
|
296
|
+
----------
|
|
297
|
+
low_frequency : str, float
|
|
298
|
+
Frequency with units or float frequency (in Hz).
|
|
299
|
+
high_frequency : str, float
|
|
300
|
+
Frequency with units or float frequency (in Hz).
|
|
301
|
+
max_num_passes : int, optional
|
|
302
|
+
Maximum number of passes. The default is ``10``.
|
|
303
|
+
max_delta_s : float, optional
|
|
304
|
+
Maximum delta S. The default is ``0.02``.
|
|
305
|
+
|
|
306
|
+
Returns
|
|
307
|
+
-------
|
|
308
|
+
bool
|
|
309
|
+
``True`` if method is successful, ``False`` otherwise.
|
|
310
|
+
"""
|
|
311
|
+
self.adaptive_settings.AdaptiveFrequencyDataList.Clear()
|
|
312
|
+
for i in freq_list:
|
|
313
|
+
low_freq_adapt_data = self._parent._pedb.simsetupdata.AdaptiveFrequencyData()
|
|
314
|
+
low_freq_adapt_data.MaxDelta = self._parent._pedb.edb_value(max_delta_s).ToString()
|
|
315
|
+
low_freq_adapt_data.MaxPasses = max_num_passes
|
|
316
|
+
low_freq_adapt_data.AdaptiveFrequency = self._parent._pedb.edb_value(i).ToString()
|
|
317
|
+
self.adaptive_settings.AdaptiveFrequencyDataList.Add(low_freq_adapt_data)
|
|
318
|
+
return self._parent._update_setup()
|
|
319
|
+
|
|
292
320
|
|
|
293
321
|
class DefeatureSettings(object):
|
|
294
322
|
"""Manages EDB methods for defeature settings."""
|
pyedb/dotnet/database/siwave.py
CHANGED
|
@@ -261,21 +261,25 @@ class EdbSiwave(object):
|
|
|
261
261
|
>>> edbapp.siwave.create_circuit_port_on_pin(pins[0], pins[1], 50, "port_name")
|
|
262
262
|
"""
|
|
263
263
|
circuit_port = CircuitPort()
|
|
264
|
-
|
|
265
|
-
|
|
264
|
+
if not isinstance(pos_pin, EDBPadstackInstance):
|
|
265
|
+
pos_pin = EDBPadstackInstance(pos_pin, self._pedb)
|
|
266
|
+
if not isinstance(neg_pin, EDBPadstackInstance):
|
|
267
|
+
neg_pin = EDBPadstackInstance(neg_pin, self._pedb)
|
|
268
|
+
circuit_port.positive_node.net = pos_pin.net_name
|
|
269
|
+
circuit_port.negative_node.net = neg_pin.net_name
|
|
266
270
|
circuit_port.impedance = impedance
|
|
267
271
|
|
|
268
272
|
if not port_name:
|
|
269
273
|
port_name = "Port_{}_{}_{}_{}".format(
|
|
270
|
-
pos_pin.
|
|
271
|
-
pos_pin.
|
|
272
|
-
neg_pin.
|
|
273
|
-
neg_pin.
|
|
274
|
+
pos_pin.component.name,
|
|
275
|
+
pos_pin.net_name,
|
|
276
|
+
neg_pin.component.name,
|
|
277
|
+
neg_pin.net_name,
|
|
274
278
|
)
|
|
275
279
|
circuit_port.name = port_name
|
|
276
|
-
circuit_port.positive_node.component_node = pos_pin.
|
|
280
|
+
circuit_port.positive_node.component_node = pos_pin.component
|
|
277
281
|
circuit_port.positive_node.node_pins = pos_pin
|
|
278
|
-
circuit_port.negative_node.component_node = neg_pin.
|
|
282
|
+
circuit_port.negative_node.component_node = neg_pin.component
|
|
279
283
|
circuit_port.negative_node.node_pins = neg_pin
|
|
280
284
|
return self._create_terminal_on_pins(circuit_port)
|
|
281
285
|
|
|
@@ -386,21 +390,21 @@ class EdbSiwave(object):
|
|
|
386
390
|
"""
|
|
387
391
|
|
|
388
392
|
voltage_source = VoltageSource()
|
|
389
|
-
voltage_source.positive_node.net = pos_pin.
|
|
390
|
-
voltage_source.negative_node.net = neg_pin.
|
|
393
|
+
voltage_source.positive_node.net = pos_pin.net_name
|
|
394
|
+
voltage_source.negative_node.net = neg_pin.net_name
|
|
391
395
|
voltage_source.magnitude = voltage_value
|
|
392
396
|
voltage_source.phase = phase_value
|
|
393
397
|
if not source_name:
|
|
394
398
|
source_name = "VSource_{}_{}_{}_{}".format(
|
|
395
|
-
pos_pin.
|
|
396
|
-
pos_pin.
|
|
397
|
-
neg_pin.
|
|
398
|
-
neg_pin.
|
|
399
|
+
pos_pin.component.name,
|
|
400
|
+
pos_pin.net_name,
|
|
401
|
+
neg_pin.component.name,
|
|
402
|
+
neg_pin.net_name,
|
|
399
403
|
)
|
|
400
404
|
voltage_source.name = source_name
|
|
401
|
-
voltage_source.positive_node.component_node = pos_pin.
|
|
405
|
+
voltage_source.positive_node.component_node = pos_pin.component
|
|
402
406
|
voltage_source.positive_node.node_pins = pos_pin
|
|
403
|
-
voltage_source.negative_node.component_node = neg_pin.
|
|
407
|
+
voltage_source.negative_node.component_node = neg_pin.component
|
|
404
408
|
voltage_source.negative_node.node_pins = neg_pin
|
|
405
409
|
return self._create_terminal_on_pins(voltage_source)
|
|
406
410
|
|
|
@@ -434,21 +438,21 @@ class EdbSiwave(object):
|
|
|
434
438
|
>>> edbapp.siwave.create_current_source_on_pin(pins[0], pins[1], 50, "source_name")
|
|
435
439
|
"""
|
|
436
440
|
current_source = CurrentSource()
|
|
437
|
-
current_source.positive_node.net = pos_pin.
|
|
438
|
-
current_source.negative_node.net = neg_pin.
|
|
441
|
+
current_source.positive_node.net = pos_pin.net_name
|
|
442
|
+
current_source.negative_node.net = neg_pin.net_name
|
|
439
443
|
current_source.magnitude = current_value
|
|
440
444
|
current_source.phase = phase_value
|
|
441
445
|
if not source_name:
|
|
442
446
|
source_name = "ISource_{}_{}_{}_{}".format(
|
|
443
|
-
pos_pin.
|
|
444
|
-
pos_pin.
|
|
445
|
-
neg_pin.
|
|
446
|
-
neg_pin.
|
|
447
|
+
pos_pin.component.name,
|
|
448
|
+
pos_pin.net_name,
|
|
449
|
+
neg_pin.component.name,
|
|
450
|
+
neg_pin.net_name,
|
|
447
451
|
)
|
|
448
452
|
current_source.name = source_name
|
|
449
|
-
current_source.positive_node.component_node = pos_pin.
|
|
453
|
+
current_source.positive_node.component_node = pos_pin.component
|
|
450
454
|
current_source.positive_node.node_pins = pos_pin
|
|
451
|
-
current_source.negative_node.component_node = neg_pin.
|
|
455
|
+
current_source.negative_node.component_node = neg_pin.component
|
|
452
456
|
current_source.negative_node.node_pins = neg_pin
|
|
453
457
|
return self._create_terminal_on_pins(current_source)
|
|
454
458
|
|
|
@@ -480,20 +484,20 @@ class EdbSiwave(object):
|
|
|
480
484
|
>>> edbapp.siwave.create_resistor_on_pin(pins[0], pins[1],50,"res_name")
|
|
481
485
|
"""
|
|
482
486
|
resistor = ResistorSource()
|
|
483
|
-
resistor.positive_node.net = pos_pin.
|
|
484
|
-
resistor.negative_node.net = neg_pin.
|
|
487
|
+
resistor.positive_node.net = pos_pin.net_name
|
|
488
|
+
resistor.negative_node.net = neg_pin.net_name
|
|
485
489
|
resistor.rvalue = rvalue
|
|
486
490
|
if not resistor_name:
|
|
487
491
|
resistor_name = "Res_{}_{}_{}_{}".format(
|
|
488
|
-
pos_pin.
|
|
489
|
-
pos_pin.
|
|
490
|
-
neg_pin.
|
|
491
|
-
neg_pin.
|
|
492
|
+
pos_pin.component.name,
|
|
493
|
+
pos_pin.net_name,
|
|
494
|
+
neg_pin.component.name,
|
|
495
|
+
neg_pin.net_name,
|
|
492
496
|
)
|
|
493
497
|
resistor.name = resistor_name
|
|
494
|
-
resistor.positive_node.component_node = pos_pin.
|
|
498
|
+
resistor.positive_node.component_node = pos_pin.component
|
|
495
499
|
resistor.positive_node.node_pins = pos_pin
|
|
496
|
-
resistor.negative_node.component_node = neg_pin.
|
|
500
|
+
resistor.negative_node.component_node = neg_pin.component
|
|
497
501
|
resistor.negative_node.node_pins = neg_pin
|
|
498
502
|
return self._create_terminal_on_pins(resistor)
|
|
499
503
|
|
pyedb/dotnet/database/stackup.py
CHANGED
|
@@ -885,6 +885,7 @@ class Stackup(LayerCollection):
|
|
|
885
885
|
else:
|
|
886
886
|
new_layer = self._create_nonstackup_layer(layer_name, layer_type)
|
|
887
887
|
self._set_layout_stackup(new_layer, "non_stackup")
|
|
888
|
+
return self.non_stackup_layers[layer_name]
|
|
888
889
|
self.refresh_layer_collection()
|
|
889
890
|
return self.layers[layer_name]
|
|
890
891
|
|
|
@@ -310,7 +310,7 @@ class HfssSimulationSetup(SimulationSetup):
|
|
|
310
310
|
self._update_setup()
|
|
311
311
|
return mesh_operation
|
|
312
312
|
|
|
313
|
-
def set_solution_single_frequency(self, frequency="
|
|
313
|
+
def set_solution_single_frequency(self, frequency="5Ghz", max_num_passes=10, max_delta_s=0.02):
|
|
314
314
|
"""Set single-frequency solution.
|
|
315
315
|
|
|
316
316
|
Parameters
|
|
@@ -331,7 +331,7 @@ class HfssSimulationSetup(SimulationSetup):
|
|
|
331
331
|
self.adaptive_settings.adaptive_settings.AdaptiveFrequencyDataList.Clear()
|
|
332
332
|
return self.adaptive_settings.add_adaptive_frequency_data(frequency, max_num_passes, max_delta_s)
|
|
333
333
|
|
|
334
|
-
def set_solution_multi_frequencies(self, frequencies=("
|
|
334
|
+
def set_solution_multi_frequencies(self, frequencies=("5Ghz", "10Ghz"), max_num_passes=10, max_delta_s="0.02"):
|
|
335
335
|
"""Set multi-frequency solution.
|
|
336
336
|
|
|
337
337
|
Parameters
|
|
@@ -350,13 +350,12 @@ class HfssSimulationSetup(SimulationSetup):
|
|
|
350
350
|
"""
|
|
351
351
|
self.adaptive_settings.adapt_type = "kMultiFrequencies"
|
|
352
352
|
self.adaptive_settings.adaptive_settings.AdaptiveFrequencyDataList.Clear()
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
return False
|
|
353
|
+
if not self.adaptive_settings.add_multi_frequency_adaptive_setup(frequencies, max_num_passes, max_delta_s):
|
|
354
|
+
return False
|
|
356
355
|
return True
|
|
357
356
|
|
|
358
357
|
def set_solution_broadband(
|
|
359
|
-
self, low_frequency="
|
|
358
|
+
self, low_frequency="5Ghz", high_frequency="10Ghz", max_num_passes=10, max_delta_s="0.02"
|
|
360
359
|
):
|
|
361
360
|
"""Set broadband solution.
|
|
362
361
|
|
|
@@ -269,7 +269,9 @@ class SiwaveSimulationSetup(SimulationSetup):
|
|
|
269
269
|
>>> setup1 = edbapp.create_siwave_syz_setup("setup1")
|
|
270
270
|
>>> setup1.add_sweep(name="sw1", frequency_set=["linear count", "1MHz", "100MHz", 10])
|
|
271
271
|
"""
|
|
272
|
-
sweep_data = SimulationSetup.add_sweep(
|
|
272
|
+
sweep_data = SimulationSetup.add_sweep(
|
|
273
|
+
self, name=name, frequency_set=frequency_set, sweep_type=sweep_type, **kwargs
|
|
274
|
+
)
|
|
273
275
|
self._siwave_sweeps_list.append(sweep_data)
|
|
274
276
|
return sweep_data
|
|
275
277
|
|
pyedb/dotnet/edb.py
CHANGED
|
@@ -49,7 +49,6 @@ from pyedb.dotnet.database.components import Components
|
|
|
49
49
|
import pyedb.dotnet.database.dotnet.database
|
|
50
50
|
from pyedb.dotnet.database.dotnet.database import Database
|
|
51
51
|
from pyedb.dotnet.database.edb_data.design_options import EdbDesignOptions
|
|
52
|
-
from pyedb.dotnet.database.edb_data.edbvalue import EdbValue
|
|
53
52
|
from pyedb.dotnet.database.edb_data.ports import (
|
|
54
53
|
BundleWavePort,
|
|
55
54
|
CircuitPort,
|
|
@@ -461,9 +460,9 @@ class Edb(Database):
|
|
|
461
460
|
"""
|
|
462
461
|
all_vars = dict()
|
|
463
462
|
for i, j in self.project_variables.items():
|
|
464
|
-
all_vars[i] = j
|
|
463
|
+
all_vars[i] = j.value
|
|
465
464
|
for i, j in self.design_variables.items():
|
|
466
|
-
all_vars[i] = j
|
|
465
|
+
all_vars[i] = j.value
|
|
467
466
|
return all_vars
|
|
468
467
|
|
|
469
468
|
@property
|
|
@@ -3022,11 +3021,11 @@ class Edb(Database):
|
|
|
3022
3021
|
--------
|
|
3023
3022
|
|
|
3024
3023
|
>>> from pyedb import Edb
|
|
3025
|
-
>>> edb = Edb(edbpath=
|
|
3024
|
+
>>> edb = Edb(edbpath="C:\\temp\\myproject.aedb", edbversion="2023.2")
|
|
3026
3025
|
|
|
3027
3026
|
>>> options_config = {'UNITE_NETS' : 1, 'LAUNCH_Q3D' : 0}
|
|
3028
|
-
>>> edb.write_export3d_option_config_file(r"C
|
|
3029
|
-
>>> edb.export_hfss(r"C
|
|
3027
|
+
>>> edb.write_export3d_option_config_file(r"C:\\temp", options_config)
|
|
3028
|
+
>>> edb.export_hfss(r"C:\\temp")
|
|
3030
3029
|
"""
|
|
3031
3030
|
siwave_s = SiwaveSolve(self.edbpath, aedt_installer_path=self.base_path)
|
|
3032
3031
|
return siwave_s.export_3d_cad("HFSS", path_to_output, net_list, num_cores, aedt_file_name, hidden=hidden)
|
|
@@ -3065,10 +3064,10 @@ class Edb(Database):
|
|
|
3065
3064
|
--------
|
|
3066
3065
|
|
|
3067
3066
|
>>> from pyedb import Edb
|
|
3068
|
-
>>> edb = Edb(edbpath=
|
|
3067
|
+
>>> edb = Edb(edbpath="C:\\temp\\myproject.aedb", edbversion="2021.2")
|
|
3069
3068
|
>>> options_config = {'UNITE_NETS' : 1, 'LAUNCH_Q3D' : 0}
|
|
3070
|
-
>>> edb.write_export3d_option_config_file(
|
|
3071
|
-
>>> edb.export_q3d(
|
|
3069
|
+
>>> edb.write_export3d_option_config_file("C:\\temp", options_config)
|
|
3070
|
+
>>> edb.export_q3d("C:\\temp")
|
|
3072
3071
|
"""
|
|
3073
3072
|
|
|
3074
3073
|
siwave_s = SiwaveSolve(self.edbpath, aedt_installer_path=self.base_path)
|
|
@@ -3116,11 +3115,11 @@ class Edb(Database):
|
|
|
3116
3115
|
|
|
3117
3116
|
>>> from pyedb import Edb
|
|
3118
3117
|
|
|
3119
|
-
>>> edb = Edb(edbpath=
|
|
3118
|
+
>>> edb = Edb(edbpath="C:\\temp\\myproject.aedb", edbversion="2021.2")
|
|
3120
3119
|
|
|
3121
3120
|
>>> options_config = {'UNITE_NETS' : 1, 'LAUNCH_Q3D' : 0}
|
|
3122
|
-
>>> edb.write_export3d_option_config_file(
|
|
3123
|
-
>>> edb.export_maxwell(
|
|
3121
|
+
>>> edb.write_export3d_option_config_file("C:\\temp", options_config)
|
|
3122
|
+
>>> edb.export_maxwell("C:\\temp")
|
|
3124
3123
|
"""
|
|
3125
3124
|
siwave_s = SiwaveSolve(self.edbpath, aedt_installer_path=self.base_path)
|
|
3126
3125
|
return siwave_s.export_3d_cad(
|
|
@@ -3245,10 +3244,13 @@ class Edb(Database):
|
|
|
3245
3244
|
-------
|
|
3246
3245
|
:class:`pyedb.dotnet.database.edb_data.edbvalue.EdbValue`
|
|
3247
3246
|
"""
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3247
|
+
|
|
3248
|
+
for i, j in self.project_variables.items():
|
|
3249
|
+
if i == variable_name:
|
|
3250
|
+
return j
|
|
3251
|
+
for i, j in self.design_variables.items():
|
|
3252
|
+
if i == variable_name:
|
|
3253
|
+
return j
|
|
3252
3254
|
self.logger.info("Variable %s doesn't exists.", variable_name)
|
|
3253
3255
|
return None
|
|
3254
3256
|
|
|
@@ -3758,7 +3760,7 @@ class Edb(Database):
|
|
|
3758
3760
|
elif not name:
|
|
3759
3761
|
name = generate_unique_name("setup")
|
|
3760
3762
|
setup = HfssSimulationSetup(self, name=name)
|
|
3761
|
-
setup.set_solution_single_frequency("
|
|
3763
|
+
setup.set_solution_single_frequency("1Ghz")
|
|
3762
3764
|
return setup
|
|
3763
3765
|
|
|
3764
3766
|
def create_raptorx_setup(self, name=None):
|
|
@@ -3958,7 +3960,7 @@ class Edb(Database):
|
|
|
3958
3960
|
Dictionary with EDB path as key and EDB PolygonData as value defining the zone region.
|
|
3959
3961
|
This dictionary is returned from the command copy_zones():
|
|
3960
3962
|
>>> edb = Edb(edb_file)
|
|
3961
|
-
>>> zone_dict = edb.copy_zones(
|
|
3963
|
+
>>> zone_dict = edb.copy_zones("C:/Temp/test")
|
|
3962
3964
|
|
|
3963
3965
|
common_reference_net : str
|
|
3964
3966
|
the common reference net name. This net name must be provided to provide a valid project.
|
|
@@ -4017,7 +4019,7 @@ class Edb(Database):
|
|
|
4017
4019
|
dictionary terminals with edb name as key and created ports name on clipped signal nets.
|
|
4018
4020
|
Dictionary is generated by the command cutout_multizone_layout:
|
|
4019
4021
|
>>> edb = Edb(edb_file)
|
|
4020
|
-
>>> edb_zones = edb.copy_zones(
|
|
4022
|
+
>>> edb_zones = edb.copy_zones("C:/Temp/test")
|
|
4021
4023
|
>>> defined_ports, terminals_info = edb.cutout_multizone_layout(edb_zones, common_reference_net)
|
|
4022
4024
|
>>> project_connexions = get_connected_ports(terminals_info)
|
|
4023
4025
|
|
|
@@ -4724,6 +4726,6 @@ class Edb(Database):
|
|
|
4724
4726
|
def get_variable_value(self, variable_name):
|
|
4725
4727
|
"""Added to get closer architecture as for grpc."""
|
|
4726
4728
|
if variable_name in self.variables:
|
|
4727
|
-
return self.variables[variable_name]
|
|
4729
|
+
return self.variables[variable_name]
|
|
4728
4730
|
else:
|
|
4729
4731
|
return False
|
|
File without changes
|