pyedb 0.52.0__py3-none-any.whl → 0.54.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 +12 -15
- pyedb/configuration/cfg_data.py +2 -2
- pyedb/configuration/cfg_modeler.py +163 -234
- pyedb/configuration/cfg_ports_sources.py +6 -8
- pyedb/configuration/cfg_stackup.py +62 -249
- pyedb/configuration/configuration.py +272 -170
- pyedb/dotnet/database/cell/hierarchy/model.py +1 -1
- pyedb/dotnet/database/cell/layout.py +1 -1
- pyedb/dotnet/database/cell/layout_obj.py +3 -3
- pyedb/dotnet/database/cell/primitive/path.py +1 -1
- pyedb/dotnet/database/cell/primitive/primitive.py +8 -8
- pyedb/dotnet/database/cell/terminal/pingroup_terminal.py +1 -1
- pyedb/dotnet/database/cell/terminal/point_terminal.py +1 -1
- pyedb/dotnet/database/cell/terminal/terminal.py +24 -26
- pyedb/dotnet/database/components.py +33 -27
- pyedb/dotnet/database/definition/component_def.py +3 -3
- pyedb/dotnet/database/definition/component_model.py +1 -1
- pyedb/dotnet/database/definition/package_def.py +1 -1
- pyedb/dotnet/database/dotnet/database.py +47 -38
- pyedb/dotnet/database/dotnet/primitive.py +16 -16
- pyedb/dotnet/database/edb_data/hfss_extent_info.py +6 -6
- pyedb/dotnet/database/edb_data/layer_data.py +17 -15
- pyedb/dotnet/database/edb_data/padstacks_data.py +12 -12
- pyedb/dotnet/database/edb_data/primitives_data.py +3 -3
- pyedb/dotnet/database/edb_data/sources.py +6 -6
- pyedb/dotnet/database/edb_data/variables.py +7 -3
- pyedb/dotnet/database/geometry/point_data.py +1 -1
- pyedb/dotnet/database/geometry/polygon_data.py +2 -4
- pyedb/dotnet/database/hfss.py +7 -7
- pyedb/dotnet/database/materials.py +2 -2
- pyedb/dotnet/database/modeler.py +8 -11
- pyedb/dotnet/database/nets.py +1 -1
- pyedb/dotnet/database/padstack.py +72 -1
- pyedb/dotnet/database/sim_setup_data/data/settings.py +24 -0
- pyedb/dotnet/database/sim_setup_data/io/siwave.py +26 -1
- pyedb/dotnet/database/siwave.py +19 -5
- pyedb/dotnet/database/stackup.py +80 -137
- pyedb/dotnet/database/utilities/heatsink.py +4 -4
- pyedb/dotnet/database/utilities/obj_base.py +1 -1
- pyedb/dotnet/database/utilities/simulation_setup.py +1 -1
- pyedb/dotnet/database/utilities/siwave_cpa_simulation_setup.py +894 -0
- pyedb/dotnet/database/utilities/siwave_simulation_setup.py +15 -0
- pyedb/dotnet/database/utilities/value.py +116 -0
- pyedb/dotnet/edb.py +58 -45
- pyedb/generic/design_types.py +39 -1
- pyedb/generic/grpc_warnings.py +5 -0
- pyedb/grpc/__init__.py +0 -0
- pyedb/grpc/database/components.py +155 -98
- pyedb/grpc/database/control_file.py +240 -193
- pyedb/grpc/database/definition/materials.py +23 -30
- pyedb/grpc/database/definition/package_def.py +15 -15
- pyedb/grpc/database/definition/padstack_def.py +51 -51
- pyedb/grpc/database/definitions.py +7 -5
- pyedb/grpc/database/geometry/arc_data.py +7 -5
- pyedb/grpc/database/geometry/point_3d_data.py +8 -7
- pyedb/grpc/database/geometry/polygon_data.py +3 -2
- pyedb/grpc/database/hierarchy/component.py +43 -38
- pyedb/grpc/database/hierarchy/pin_pair_model.py +15 -14
- pyedb/grpc/database/hierarchy/pingroup.py +9 -9
- pyedb/grpc/database/layers/stackup_layer.py +45 -44
- pyedb/grpc/database/layout/layout.py +9 -8
- pyedb/grpc/database/layout/voltage_regulator.py +7 -7
- pyedb/grpc/database/layout_validation.py +13 -12
- pyedb/grpc/database/modeler.py +156 -131
- pyedb/grpc/database/nets.py +42 -31
- pyedb/grpc/database/padstacks.py +270 -175
- pyedb/grpc/database/ports/ports.py +5 -6
- pyedb/grpc/database/primitive/bondwire.py +8 -7
- pyedb/grpc/database/primitive/circle.py +4 -4
- pyedb/grpc/database/primitive/padstack_instance.py +18 -18
- pyedb/grpc/database/primitive/path.py +7 -7
- pyedb/grpc/database/primitive/polygon.py +3 -3
- pyedb/grpc/database/primitive/primitive.py +13 -17
- pyedb/grpc/database/primitive/rectangle.py +13 -13
- pyedb/grpc/database/simulation_setup/hfss_general_settings.py +1 -1
- pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +10 -0
- pyedb/grpc/database/simulation_setup/siwave_cpa_simulation_setup.py +961 -0
- pyedb/grpc/database/simulation_setup/siwave_simulation_setup.py +17 -1
- pyedb/grpc/database/siwave.py +44 -24
- pyedb/grpc/database/source_excitations.py +333 -229
- pyedb/grpc/database/stackup.py +164 -147
- pyedb/grpc/database/terminal/bundle_terminal.py +17 -7
- pyedb/grpc/database/terminal/edge_terminal.py +10 -0
- pyedb/grpc/database/terminal/padstack_instance_terminal.py +15 -4
- pyedb/grpc/database/terminal/pingroup_terminal.py +11 -10
- pyedb/grpc/database/terminal/point_terminal.py +4 -3
- pyedb/grpc/database/terminal/terminal.py +9 -9
- pyedb/grpc/database/utility/value.py +109 -0
- pyedb/grpc/edb.py +129 -45
- pyedb/grpc/edb_init.py +0 -7
- pyedb/siwave_core/cpa/simulation_setup_data_model.py +132 -0
- pyedb/siwave_core/product_properties.py +198 -0
- {pyedb-0.52.0.dist-info → pyedb-0.54.0.dist-info}/METADATA +15 -13
- {pyedb-0.52.0.dist-info → pyedb-0.54.0.dist-info}/RECORD +97 -89
- {pyedb-0.52.0.dist-info → pyedb-0.54.0.dist-info}/WHEEL +1 -1
- {pyedb-0.52.0.dist-info → pyedb-0.54.0.dist-info/licenses}/LICENSE +0 -0
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
23
|
from ansys.edb.core.geometry.point3d_data import Point3DData as GrpcPoint3DData
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
from pyedb.grpc.database.utility.value import Value
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
class Point3DData(GrpcPoint3DData):
|
|
@@ -40,11 +41,11 @@ class Point3DData(GrpcPoint3DData):
|
|
|
40
41
|
X position value.
|
|
41
42
|
|
|
42
43
|
"""
|
|
43
|
-
return self.x
|
|
44
|
+
return Value(self.x)
|
|
44
45
|
|
|
45
46
|
@x.setter
|
|
46
47
|
def x(self, value):
|
|
47
|
-
self.x =
|
|
48
|
+
self.x = Value(value)
|
|
48
49
|
|
|
49
50
|
@property
|
|
50
51
|
def y(self) -> float:
|
|
@@ -56,11 +57,11 @@ class Point3DData(GrpcPoint3DData):
|
|
|
56
57
|
Y position value.
|
|
57
58
|
|
|
58
59
|
"""
|
|
59
|
-
return self.y
|
|
60
|
+
return Value(self.y)
|
|
60
61
|
|
|
61
62
|
@y.setter
|
|
62
63
|
def y(self, value):
|
|
63
|
-
self.y =
|
|
64
|
+
self.y = Value(value)
|
|
64
65
|
|
|
65
66
|
@property
|
|
66
67
|
def z(self) -> float:
|
|
@@ -72,8 +73,8 @@ class Point3DData(GrpcPoint3DData):
|
|
|
72
73
|
Z position value.
|
|
73
74
|
|
|
74
75
|
"""
|
|
75
|
-
return self.z
|
|
76
|
+
return Value(self.z)
|
|
76
77
|
|
|
77
78
|
@z.setter
|
|
78
79
|
def z(self, value):
|
|
79
|
-
self.z =
|
|
80
|
+
self.z = Value(value)
|
|
@@ -25,6 +25,7 @@ from ansys.edb.core.geometry.point_data import PointData as GrpcPointData
|
|
|
25
25
|
from ansys.edb.core.geometry.polygon_data import PolygonData as GrpcPolygonData
|
|
26
26
|
|
|
27
27
|
from pyedb.grpc.database.geometry.arc_data import ArcData
|
|
28
|
+
from pyedb.grpc.database.utility.value import Value
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
class PolygonData(GrpcPolygonData):
|
|
@@ -65,7 +66,7 @@ class PolygonData(GrpcPolygonData):
|
|
|
65
66
|
X upper right corner, Y upper right corner].
|
|
66
67
|
"""
|
|
67
68
|
bbox = self.bbox()
|
|
68
|
-
return [bbox[0].x
|
|
69
|
+
return [Value(bbox[0].x), Value(bbox[0].y), Value(bbox[1].x), Value(bbox[1].y)]
|
|
69
70
|
|
|
70
71
|
@property
|
|
71
72
|
def arcs(self) -> list[ArcData]:
|
|
@@ -86,7 +87,7 @@ class PolygonData(GrpcPolygonData):
|
|
|
86
87
|
-------
|
|
87
88
|
list[list[float]]
|
|
88
89
|
"""
|
|
89
|
-
return [[i.x
|
|
90
|
+
return [[Value(i.x), Value(i.y)] for i in list(self.points)]
|
|
90
91
|
|
|
91
92
|
def create_from_points(self, points, closed=True):
|
|
92
93
|
list_of_point_data = []
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
import logging
|
|
24
24
|
import re
|
|
25
|
-
from typing import Optional, Union
|
|
25
|
+
from typing import List, Optional, Union
|
|
26
26
|
import warnings
|
|
27
27
|
|
|
28
28
|
from ansys.edb.core.definition.component_model import (
|
|
@@ -49,7 +49,6 @@ from ansys.edb.core.terminal.padstack_instance_terminal import (
|
|
|
49
49
|
PadstackInstanceTerminal as GrpcPadstackInstanceTerminal,
|
|
50
50
|
)
|
|
51
51
|
from ansys.edb.core.utility.rlc import Rlc as GrpcRlc
|
|
52
|
-
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
53
52
|
|
|
54
53
|
from pyedb.grpc.database.hierarchy.pin_pair_model import PinPairModel
|
|
55
54
|
from pyedb.grpc.database.hierarchy.s_parameter_model import SparamModel
|
|
@@ -59,6 +58,7 @@ from pyedb.grpc.database.primitive.padstack_instance import PadstackInstance
|
|
|
59
58
|
from pyedb.grpc.database.terminal.padstack_instance_terminal import (
|
|
60
59
|
PadstackInstanceTerminal,
|
|
61
60
|
)
|
|
61
|
+
from pyedb.grpc.database.utility.value import Value
|
|
62
62
|
|
|
63
63
|
try:
|
|
64
64
|
import numpy as np
|
|
@@ -274,7 +274,7 @@ class Component(GrpcComponentGroup):
|
|
|
274
274
|
@is_mcad.setter
|
|
275
275
|
def is_mcad(self, value):
|
|
276
276
|
if isinstance(value, bool):
|
|
277
|
-
super(Component, self.__class__).is_mcad.__set__(self,
|
|
277
|
+
super(Component, self.__class__).is_mcad.__set__(self, Value(value))
|
|
278
278
|
|
|
279
279
|
@property
|
|
280
280
|
def is_mcad_3d_comp(self) -> bool:
|
|
@@ -290,7 +290,7 @@ class Component(GrpcComponentGroup):
|
|
|
290
290
|
@is_mcad_3d_comp.setter
|
|
291
291
|
def is_mcad_3d_comp(self, value):
|
|
292
292
|
if isinstance(value, bool):
|
|
293
|
-
super(Component, self.__class__).is_mcad_3d_comp.__set__(self,
|
|
293
|
+
super(Component, self.__class__).is_mcad_3d_comp.__set__(self, Value(value))
|
|
294
294
|
|
|
295
295
|
@property
|
|
296
296
|
def is_mcad_hfss(self) -> bool:
|
|
@@ -306,7 +306,7 @@ class Component(GrpcComponentGroup):
|
|
|
306
306
|
@is_mcad_hfss.setter
|
|
307
307
|
def is_mcad_hfss(self, value):
|
|
308
308
|
if isinstance(value, bool):
|
|
309
|
-
super(Component, self.__class__).is_mcad_hfss.__set__(self,
|
|
309
|
+
super(Component, self.__class__).is_mcad_hfss.__set__(self, Value(value))
|
|
310
310
|
|
|
311
311
|
@property
|
|
312
312
|
def is_mcad_stride(self) -> bool:
|
|
@@ -322,15 +322,17 @@ class Component(GrpcComponentGroup):
|
|
|
322
322
|
@is_mcad_stride.setter
|
|
323
323
|
def is_mcad_stride(self, value):
|
|
324
324
|
if isinstance(value, bool):
|
|
325
|
-
super(Component, self.__class__).is_mcad_stride.__set__(self,
|
|
325
|
+
super(Component, self.__class__).is_mcad_stride.__set__(self, Value(value))
|
|
326
326
|
|
|
327
|
-
def create_package_def(self, name=None) -> bool:
|
|
327
|
+
def create_package_def(self, name=None, component_part_name=None) -> bool:
|
|
328
328
|
"""Create a package definition and assign it to the component.
|
|
329
329
|
|
|
330
330
|
Parameters
|
|
331
331
|
----------
|
|
332
332
|
name: str, optional
|
|
333
333
|
Name of the package definition
|
|
334
|
+
component_part_name : str, optional
|
|
335
|
+
Part name of the component.
|
|
334
336
|
|
|
335
337
|
Returns
|
|
336
338
|
-------
|
|
@@ -340,7 +342,10 @@ class Component(GrpcComponentGroup):
|
|
|
340
342
|
if not name:
|
|
341
343
|
name = f"{self.refdes}_{self.part_name}"
|
|
342
344
|
if name not in [package.name for package in self._pedb.package_defs]:
|
|
345
|
+
self._pedb.definitions.add_package_def(name, component_part_name=component_part_name)
|
|
346
|
+
|
|
343
347
|
self.package_def = name
|
|
348
|
+
|
|
344
349
|
return True
|
|
345
350
|
else:
|
|
346
351
|
logging.error(f"Package definition {name} already exists")
|
|
@@ -415,16 +420,16 @@ class Component(GrpcComponentGroup):
|
|
|
415
420
|
Balls height value.
|
|
416
421
|
"""
|
|
417
422
|
try:
|
|
418
|
-
return self.component_property.solder_ball_property.height
|
|
423
|
+
return Value(self.component_property.solder_ball_property.height)
|
|
419
424
|
except:
|
|
420
|
-
return 0.0
|
|
425
|
+
return Value(0.0)
|
|
421
426
|
|
|
422
427
|
@solder_ball_height.setter
|
|
423
428
|
def solder_ball_height(self, value):
|
|
424
429
|
if not self.component_property.solder_ball_property.is_null:
|
|
425
430
|
cmp_property = self.component_property
|
|
426
431
|
solder_ball_prop = cmp_property.solder_ball_property
|
|
427
|
-
solder_ball_prop.height =
|
|
432
|
+
solder_ball_prop.height = Value(value)
|
|
428
433
|
cmp_property.solder_ball_property = solder_ball_prop
|
|
429
434
|
self.component_property = cmp_property
|
|
430
435
|
|
|
@@ -465,7 +470,7 @@ class Component(GrpcComponentGroup):
|
|
|
465
470
|
self.component_property = cmp_property
|
|
466
471
|
|
|
467
472
|
@property
|
|
468
|
-
def solder_ball_diameter(self) -> float:
|
|
473
|
+
def solder_ball_diameter(self) -> Union[tuple[float, float], None]:
|
|
469
474
|
"""Solder ball diameter.
|
|
470
475
|
|
|
471
476
|
Returns
|
|
@@ -475,7 +480,7 @@ class Component(GrpcComponentGroup):
|
|
|
475
480
|
"""
|
|
476
481
|
if not self.component_property.solder_ball_property.is_null:
|
|
477
482
|
diameter, mid_diameter = self.component_property.solder_ball_property.get_diameter()
|
|
478
|
-
return diameter
|
|
483
|
+
return Value(diameter), Value(mid_diameter)
|
|
479
484
|
|
|
480
485
|
@solder_ball_diameter.setter
|
|
481
486
|
def solder_ball_diameter(self, value):
|
|
@@ -484,14 +489,14 @@ class Component(GrpcComponentGroup):
|
|
|
484
489
|
mid_diameter = diameter
|
|
485
490
|
if isinstance(value, tuple) or isinstance(value, list):
|
|
486
491
|
if len(value) == 2:
|
|
487
|
-
diameter =
|
|
488
|
-
mid_diameter =
|
|
492
|
+
diameter = Value(value[0])
|
|
493
|
+
mid_diameter = Value(value[1])
|
|
489
494
|
elif len(value) == 1:
|
|
490
|
-
diameter =
|
|
491
|
-
mid_diameter =
|
|
495
|
+
diameter = Value(value[0])
|
|
496
|
+
mid_diameter = Value(value[0])
|
|
492
497
|
if isinstance(value, str) or isinstance(value, float):
|
|
493
|
-
diameter =
|
|
494
|
-
mid_diameter =
|
|
498
|
+
diameter = Value(value)
|
|
499
|
+
mid_diameter = Value(value)
|
|
495
500
|
cmp_property = self.component_property
|
|
496
501
|
solder_ball_prop = cmp_property.solder_ball_property
|
|
497
502
|
solder_ball_prop.set_diameter(diameter, mid_diameter)
|
|
@@ -540,7 +545,7 @@ class Component(GrpcComponentGroup):
|
|
|
540
545
|
return _model_type
|
|
541
546
|
|
|
542
547
|
@property
|
|
543
|
-
def rlc_values(self) ->
|
|
548
|
+
def rlc_values(self) -> Union[List[list[float]], List[float]]:
|
|
544
549
|
"""Get component rlc values.
|
|
545
550
|
|
|
546
551
|
Returns
|
|
@@ -548,11 +553,11 @@ class Component(GrpcComponentGroup):
|
|
|
548
553
|
list[list[Rvalue(float), Lvalue(float), Cvalue(float)]].
|
|
549
554
|
"""
|
|
550
555
|
if not len(self._rlc):
|
|
551
|
-
return [
|
|
556
|
+
return [0.0, 0.0, 0.0]
|
|
552
557
|
elif len(self._rlc) == 1:
|
|
553
|
-
return [self._rlc[0].r
|
|
558
|
+
return [Value(self._rlc[0].r), Value(self._rlc[0].l), Value(self._rlc[0].c)]
|
|
554
559
|
else:
|
|
555
|
-
return [[rlc.r
|
|
560
|
+
return [[Value(rlc.r), Value(rlc.l), Value(rlc.c)] for rlc in self._rlc]
|
|
556
561
|
|
|
557
562
|
@rlc_values.setter
|
|
558
563
|
def rlc_values(self, value):
|
|
@@ -566,17 +571,17 @@ class Component(GrpcComponentGroup):
|
|
|
566
571
|
_rlc = []
|
|
567
572
|
for rlc in self._rlc:
|
|
568
573
|
if value[0]:
|
|
569
|
-
rlc.r =
|
|
574
|
+
rlc.r = Value(value[0])
|
|
570
575
|
rlc.r_enabled = True
|
|
571
576
|
else:
|
|
572
577
|
rlc.r_enabled = False
|
|
573
578
|
if value[1]:
|
|
574
|
-
rlc.l =
|
|
579
|
+
rlc.l = Value(value[1])
|
|
575
580
|
rlc.l_enabled = True
|
|
576
581
|
else:
|
|
577
582
|
rlc.l_enabled = False
|
|
578
583
|
if value[2]:
|
|
579
|
-
rlc.c =
|
|
584
|
+
rlc.c = Value(value[2])
|
|
580
585
|
rlc.c_enabled = True
|
|
581
586
|
else:
|
|
582
587
|
rlc.c_enabled = False
|
|
@@ -621,7 +626,7 @@ class Component(GrpcComponentGroup):
|
|
|
621
626
|
"""
|
|
622
627
|
cmp_type = self.component_type
|
|
623
628
|
if 0 < cmp_type.value < 4:
|
|
624
|
-
result = [rlc.r
|
|
629
|
+
result = [Value(rlc.r) for rlc in self._rlc]
|
|
625
630
|
if len(result) == 1:
|
|
626
631
|
return result[0]
|
|
627
632
|
else:
|
|
@@ -634,7 +639,7 @@ class Component(GrpcComponentGroup):
|
|
|
634
639
|
model = PinPairModel(self._pedb, GrpcPinPairModel.create())
|
|
635
640
|
for rlc in self._rlc:
|
|
636
641
|
rlc.r_enabled = True
|
|
637
|
-
rlc.r =
|
|
642
|
+
rlc.r = Value(value)
|
|
638
643
|
_rlc.append(rlc)
|
|
639
644
|
for ind in range(len(self._pin_pairs)):
|
|
640
645
|
model.set_rlc(self._pin_pairs[ind], _rlc[ind])
|
|
@@ -653,7 +658,7 @@ class Component(GrpcComponentGroup):
|
|
|
653
658
|
"""
|
|
654
659
|
cmp_type = self.component_type
|
|
655
660
|
if 0 < cmp_type.value < 4:
|
|
656
|
-
result = [rlc.c
|
|
661
|
+
result = [Value(rlc.c) for rlc in self._rlc]
|
|
657
662
|
if len(result) == 1:
|
|
658
663
|
return result[0]
|
|
659
664
|
else:
|
|
@@ -667,7 +672,7 @@ class Component(GrpcComponentGroup):
|
|
|
667
672
|
model = PinPairModel(self._pedb, GrpcPinPairModel.create())
|
|
668
673
|
for rlc in self._rlc:
|
|
669
674
|
rlc.c_enabled = True
|
|
670
|
-
rlc.c =
|
|
675
|
+
rlc.c = Value(value)
|
|
671
676
|
_rlc.append(rlc)
|
|
672
677
|
for ind in range(len(self._pin_pairs)):
|
|
673
678
|
model.set_rlc(self._pin_pairs[ind], _rlc[ind])
|
|
@@ -686,7 +691,7 @@ class Component(GrpcComponentGroup):
|
|
|
686
691
|
"""
|
|
687
692
|
cmp_type = self.component_type
|
|
688
693
|
if 0 < cmp_type.value < 4:
|
|
689
|
-
result = [rlc.l
|
|
694
|
+
result = [Value(rlc.l) for rlc in self._rlc]
|
|
690
695
|
if len(result) == 1:
|
|
691
696
|
return result[0]
|
|
692
697
|
else:
|
|
@@ -700,7 +705,7 @@ class Component(GrpcComponentGroup):
|
|
|
700
705
|
model = PinPairModel(self._pedb, GrpcPinPairModel.create())
|
|
701
706
|
for rlc in self._rlc:
|
|
702
707
|
rlc.l_enabled = True
|
|
703
|
-
rlc.l =
|
|
708
|
+
rlc.l = Value(value)
|
|
704
709
|
_rlc.append(rlc)
|
|
705
710
|
for ind in range(len(self._pin_pairs)):
|
|
706
711
|
model.set_rlc(self._pin_pairs[ind], _rlc[ind])
|
|
@@ -757,12 +762,12 @@ class Component(GrpcComponentGroup):
|
|
|
757
762
|
[x, y].
|
|
758
763
|
|
|
759
764
|
"""
|
|
760
|
-
return [pt
|
|
765
|
+
return [Value(pt) for pt in super().location]
|
|
761
766
|
|
|
762
767
|
@location.setter
|
|
763
768
|
def location(self, value):
|
|
764
769
|
if isinstance(value, list):
|
|
765
|
-
_location = [
|
|
770
|
+
_location = [Value(val) for val in value]
|
|
766
771
|
super(Component, self.__class__).location.__set__(self, _location)
|
|
767
772
|
|
|
768
773
|
@property
|
|
@@ -779,7 +784,7 @@ class Component(GrpcComponentGroup):
|
|
|
779
784
|
bbox = self.component_instance.get_bbox().points
|
|
780
785
|
pt1 = bbox[0]
|
|
781
786
|
pt2 = bbox[2]
|
|
782
|
-
return [pt1.x
|
|
787
|
+
return [Value(pt1.x), Value(pt1.y), Value(pt2.x), Value(pt2.y)]
|
|
783
788
|
|
|
784
789
|
@property
|
|
785
790
|
def rotation(self) -> float:
|
|
@@ -790,7 +795,7 @@ class Component(GrpcComponentGroup):
|
|
|
790
795
|
float
|
|
791
796
|
Rotation value.
|
|
792
797
|
"""
|
|
793
|
-
return self.transform.rotation
|
|
798
|
+
return Value(self.transform.rotation)
|
|
794
799
|
|
|
795
800
|
@property
|
|
796
801
|
def pinlist(self) -> list[PadstackInstance]:
|
|
@@ -1172,7 +1177,7 @@ class Component(GrpcComponentGroup):
|
|
|
1172
1177
|
res = 0 if res is None else res
|
|
1173
1178
|
ind = 0 if ind is None else ind
|
|
1174
1179
|
cap = 0 if cap is None else cap
|
|
1175
|
-
res, ind, cap =
|
|
1180
|
+
res, ind, cap = Value(res), Value(ind), Value(cap)
|
|
1176
1181
|
model = PinPairModel(self._pedb, self._edb_model)
|
|
1177
1182
|
pin_names = list(self.pins.keys())
|
|
1178
1183
|
for idx, i in enumerate(np.arange(len(pin_names) // 2)):
|
|
@@ -1299,13 +1304,13 @@ class ICDieProperty:
|
|
|
1299
1304
|
Die height.
|
|
1300
1305
|
|
|
1301
1306
|
"""
|
|
1302
|
-
return self._die_property.height
|
|
1307
|
+
return Value(self._die_property.height)
|
|
1303
1308
|
|
|
1304
1309
|
@height.setter
|
|
1305
1310
|
def height(self, value):
|
|
1306
1311
|
component_property = self._component.component_property
|
|
1307
1312
|
die_property = component_property.die_property
|
|
1308
|
-
die_property.height =
|
|
1313
|
+
die_property.height = Value(value)
|
|
1309
1314
|
component_property.die_property = die_property
|
|
1310
1315
|
self._component.component_property = component_property
|
|
1311
1316
|
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
|
|
24
24
|
# from ansys.edb.core.hierarchy.pin_pair_model import PinPairModel
|
|
25
25
|
from ansys.edb.core.hierarchy.pin_pair_model import PinPairModel as GrpcPinPairModel
|
|
26
|
-
|
|
26
|
+
|
|
27
|
+
from pyedb.grpc.database.utility.value import Value
|
|
27
28
|
|
|
28
29
|
|
|
29
30
|
class PinPairModel(GrpcPinPairModel):
|
|
@@ -57,9 +58,9 @@ class PinPairModel(GrpcPinPairModel):
|
|
|
57
58
|
|
|
58
59
|
@rlc_enable.setter
|
|
59
60
|
def rlc_enable(self, value):
|
|
60
|
-
self.rlc.r_enabled =
|
|
61
|
-
self.rlc.l_enabled =
|
|
62
|
-
self.rlc.c_enabled =
|
|
61
|
+
self.rlc.r_enabled = Value(value[0])
|
|
62
|
+
self.rlc.l_enabled = Value(value[1])
|
|
63
|
+
self.rlc.c_enabled = Value(value[2])
|
|
63
64
|
|
|
64
65
|
@property
|
|
65
66
|
def resistance(self) -> float:
|
|
@@ -71,11 +72,11 @@ class PinPairModel(GrpcPinPairModel):
|
|
|
71
72
|
Resistance value.
|
|
72
73
|
|
|
73
74
|
"""
|
|
74
|
-
return self.rlc.r
|
|
75
|
+
return Value(self.rlc.r)
|
|
75
76
|
|
|
76
77
|
@resistance.setter
|
|
77
78
|
def resistance(self, value):
|
|
78
|
-
self.rlc.r =
|
|
79
|
+
self.rlc.r = Value(value)
|
|
79
80
|
|
|
80
81
|
@property
|
|
81
82
|
def inductance(self) -> float:
|
|
@@ -87,11 +88,11 @@ class PinPairModel(GrpcPinPairModel):
|
|
|
87
88
|
Inductance value.
|
|
88
89
|
|
|
89
90
|
"""
|
|
90
|
-
return self.rlc.l
|
|
91
|
+
return Value(self.rlc.l)
|
|
91
92
|
|
|
92
93
|
@inductance.setter
|
|
93
94
|
def inductance(self, value):
|
|
94
|
-
self.rlc.l =
|
|
95
|
+
self.rlc.l = Value(value)
|
|
95
96
|
|
|
96
97
|
@property
|
|
97
98
|
def capacitance(self) -> float:
|
|
@@ -103,11 +104,11 @@ class PinPairModel(GrpcPinPairModel):
|
|
|
103
104
|
Capacitance value.
|
|
104
105
|
|
|
105
106
|
"""
|
|
106
|
-
return self.rlc.c
|
|
107
|
+
return Value(self.rlc.c)
|
|
107
108
|
|
|
108
109
|
@capacitance.setter
|
|
109
110
|
def capacitance(self, value):
|
|
110
|
-
self.rlc.c =
|
|
111
|
+
self.rlc.c = Value(value)
|
|
111
112
|
|
|
112
113
|
@property
|
|
113
114
|
def rlc_values(self) -> list[float]:
|
|
@@ -119,10 +120,10 @@ class PinPairModel(GrpcPinPairModel):
|
|
|
119
120
|
[R value, L value, C value].
|
|
120
121
|
|
|
121
122
|
"""
|
|
122
|
-
return [self.rlc.r
|
|
123
|
+
return [Value(self.rlc.r), Value(self.rlc.l), Value(self.rlc.c)]
|
|
123
124
|
|
|
124
125
|
@rlc_values.setter
|
|
125
126
|
def rlc_values(self, values): # pragma: no cover
|
|
126
|
-
self.rlc.r =
|
|
127
|
-
self.rlc.l =
|
|
128
|
-
self.rlc.c =
|
|
127
|
+
self.rlc.r = Value(values[0])
|
|
128
|
+
self.rlc.l = Value(values[1])
|
|
129
|
+
self.rlc.c = Value(values[2])
|
|
@@ -25,13 +25,13 @@ from typing import Union
|
|
|
25
25
|
|
|
26
26
|
from ansys.edb.core.hierarchy.pin_group import PinGroup as GrpcPinGroup
|
|
27
27
|
from ansys.edb.core.terminal.terminal import BoundaryType as GrpcBoundaryType
|
|
28
|
-
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
29
28
|
|
|
30
29
|
from pyedb.generic.general_methods import generate_unique_name
|
|
31
30
|
from pyedb.grpc.database.hierarchy.component import Component
|
|
32
31
|
from pyedb.grpc.database.net.net import Net
|
|
33
32
|
from pyedb.grpc.database.primitive.padstack_instance import PadstackInstance
|
|
34
33
|
from pyedb.grpc.database.terminal.pingroup_terminal import PinGroupTerminal
|
|
34
|
+
from pyedb.grpc.database.utility.value import Value
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
class PinGroup(GrpcPinGroup):
|
|
@@ -168,9 +168,9 @@ class PinGroup(GrpcPinGroup):
|
|
|
168
168
|
"""
|
|
169
169
|
terminal = self.create_terminal()
|
|
170
170
|
terminal.boundary_type = GrpcBoundaryType.CURRENT_SOURCE
|
|
171
|
-
terminal.source_amplitude =
|
|
172
|
-
terminal.source_phase =
|
|
173
|
-
terminal.impedance =
|
|
171
|
+
terminal.source_amplitude = Value(magnitude)
|
|
172
|
+
terminal.source_phase = Value(phase)
|
|
173
|
+
terminal.impedance = Value(impedance)
|
|
174
174
|
return terminal
|
|
175
175
|
|
|
176
176
|
def create_voltage_source_terminal(self, magnitude=1, phase=0, impedance=0.001) -> PinGroupTerminal:
|
|
@@ -193,9 +193,9 @@ class PinGroup(GrpcPinGroup):
|
|
|
193
193
|
"""
|
|
194
194
|
terminal = self.create_terminal()
|
|
195
195
|
terminal.boundary_type = GrpcBoundaryType.VOLTAGE_SOURCE
|
|
196
|
-
terminal.source_amplitude =
|
|
197
|
-
terminal.source_phase =
|
|
198
|
-
terminal.impedance =
|
|
196
|
+
terminal.source_amplitude = Value(magnitude)
|
|
197
|
+
terminal.source_phase = Value(phase)
|
|
198
|
+
terminal.impedance = Value(impedance)
|
|
199
199
|
return terminal
|
|
200
200
|
|
|
201
201
|
def create_voltage_probe_terminal(self, impedance=1e6) -> PinGroupTerminal:
|
|
@@ -214,7 +214,7 @@ class PinGroup(GrpcPinGroup):
|
|
|
214
214
|
"""
|
|
215
215
|
terminal = self.create_terminal()
|
|
216
216
|
terminal.boundary_type = GrpcBoundaryType.VOLTAGE_PROBE
|
|
217
|
-
terminal.impedance =
|
|
217
|
+
terminal.impedance = Value(impedance)
|
|
218
218
|
return terminal
|
|
219
219
|
|
|
220
220
|
def create_port_terminal(self, impedance=50) -> PinGroupTerminal:
|
|
@@ -233,7 +233,7 @@ class PinGroup(GrpcPinGroup):
|
|
|
233
233
|
"""
|
|
234
234
|
terminal = self.create_terminal()
|
|
235
235
|
terminal.boundary_type = GrpcBoundaryType.PORT
|
|
236
|
-
terminal.impedance =
|
|
236
|
+
terminal.impedance = Value(impedance)
|
|
237
237
|
terminal.is_circuit_port = True
|
|
238
238
|
return terminal
|
|
239
239
|
|