pyedb 0.50.0__py3-none-any.whl → 0.51.2__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_ports_sources.py +79 -239
- pyedb/configuration/configuration.py +27 -0
- pyedb/dotnet/clr_module.py +9 -3
- pyedb/dotnet/database/cell/hierarchy/component.py +3 -3
- pyedb/dotnet/database/cell/layout.py +10 -1
- pyedb/dotnet/database/dotnet/database.py +0 -2
- pyedb/dotnet/database/edb_data/padstacks_data.py +13 -0
- pyedb/dotnet/database/layout_validation.py +17 -13
- pyedb/dotnet/database/modeler.py +0 -1
- pyedb/dotnet/edb.py +7 -1
- pyedb/generic/design_types.py +183 -62
- pyedb/grpc/database/components.py +604 -652
- pyedb/grpc/database/control_file.py +597 -155
- pyedb/grpc/database/definition/component_def.py +17 -14
- pyedb/grpc/database/definition/materials.py +27 -27
- pyedb/grpc/database/definition/package_def.py +8 -8
- pyedb/grpc/database/definition/padstack_def.py +31 -33
- pyedb/grpc/database/definitions.py +36 -2
- pyedb/grpc/database/geometry/arc_data.py +5 -5
- pyedb/grpc/database/geometry/point_3d_data.py +3 -3
- pyedb/grpc/database/geometry/polygon_data.py +5 -5
- pyedb/grpc/database/hfss.py +412 -395
- pyedb/grpc/database/hierarchy/component.py +67 -58
- pyedb/grpc/database/hierarchy/pin_pair_model.py +6 -6
- pyedb/grpc/database/hierarchy/pingroup.py +13 -11
- pyedb/grpc/database/hierarchy/s_parameter_model.py +1 -1
- pyedb/grpc/database/hierarchy/spice_model.py +1 -1
- pyedb/grpc/database/layers/layer.py +2 -2
- pyedb/grpc/database/layers/stackup_layer.py +26 -23
- pyedb/grpc/database/layout/layout.py +12 -12
- pyedb/grpc/database/layout/voltage_regulator.py +8 -8
- pyedb/grpc/database/layout_validation.py +58 -7
- pyedb/grpc/database/modeler.py +248 -245
- pyedb/grpc/database/net/differential_pair.py +4 -4
- pyedb/grpc/database/net/extended_net.py +7 -8
- pyedb/grpc/database/net/net.py +57 -46
- pyedb/grpc/database/nets.py +362 -116
- pyedb/grpc/database/padstacks.py +259 -178
- pyedb/grpc/database/ports/ports.py +23 -17
- pyedb/grpc/database/primitive/padstack_instance.py +45 -30
- pyedb/grpc/database/primitive/path.py +6 -6
- pyedb/grpc/database/primitive/polygon.py +9 -9
- pyedb/grpc/database/primitive/primitive.py +21 -21
- pyedb/grpc/database/primitive/rectangle.py +1 -1
- pyedb/grpc/database/simulation_setup/hfss_advanced_settings.py +1 -1
- pyedb/grpc/database/simulation_setup/hfss_general_settings.py +1 -1
- pyedb/grpc/database/simulation_setup/hfss_settings_options.py +1 -1
- pyedb/grpc/database/simulation_setup/hfss_simulation_settings.py +6 -6
- pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +2 -2
- pyedb/grpc/database/simulation_setup/raptor_x_simulation_settings.py +2 -2
- pyedb/grpc/database/simulation_setup/raptor_x_simulation_setup.py +1 -1
- pyedb/grpc/database/simulation_setup/siwave_simulation_setup.py +3 -3
- pyedb/grpc/database/siwave.py +226 -214
- pyedb/grpc/database/source_excitations.py +307 -40
- pyedb/grpc/database/stackup.py +461 -283
- pyedb/grpc/database/terminal/bundle_terminal.py +12 -12
- pyedb/grpc/database/terminal/edge_terminal.py +6 -5
- pyedb/grpc/database/terminal/padstack_instance_terminal.py +13 -13
- pyedb/grpc/database/terminal/pingroup_terminal.py +12 -12
- pyedb/grpc/database/terminal/point_terminal.py +6 -6
- pyedb/grpc/database/terminal/terminal.py +26 -26
- pyedb/grpc/database/utility/heat_sink.py +5 -5
- pyedb/grpc/database/utility/hfss_extent_info.py +21 -21
- pyedb/grpc/database/utility/layout_statistics.py +13 -13
- pyedb/grpc/database/utility/rlc.py +3 -3
- pyedb/grpc/database/utility/sources.py +1 -1
- pyedb/grpc/database/utility/sweep_data_distribution.py +1 -1
- pyedb/grpc/edb.py +542 -739
- pyedb/grpc/edb_init.py +50 -3
- {pyedb-0.50.0.dist-info → pyedb-0.51.2.dist-info}/METADATA +1 -1
- {pyedb-0.50.0.dist-info → pyedb-0.51.2.dist-info}/RECORD +74 -75
- pyedb/grpc/database/utility/simulation_configuration.py +0 -3305
- {pyedb-0.50.0.dist-info → pyedb-0.51.2.dist-info}/LICENSE +0 -0
- {pyedb-0.50.0.dist-info → pyedb-0.51.2.dist-info}/WHEEL +0 -0
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
import logging
|
|
24
24
|
import re
|
|
25
|
-
from typing import Optional
|
|
25
|
+
from typing import Optional, Union
|
|
26
26
|
import warnings
|
|
27
27
|
|
|
28
28
|
from ansys.edb.core.definition.component_model import (
|
|
@@ -117,7 +117,7 @@ class Component(GrpcComponentGroup):
|
|
|
117
117
|
return self._comp_instance
|
|
118
118
|
|
|
119
119
|
@property
|
|
120
|
-
def is_enabled(self):
|
|
120
|
+
def is_enabled(self) -> bool:
|
|
121
121
|
"""Component enable.
|
|
122
122
|
|
|
123
123
|
Returns
|
|
@@ -132,7 +132,7 @@ class Component(GrpcComponentGroup):
|
|
|
132
132
|
self.enabled = value
|
|
133
133
|
|
|
134
134
|
@property
|
|
135
|
-
def ic_die_properties(self):
|
|
135
|
+
def ic_die_properties(self) -> any:
|
|
136
136
|
"""IC Die property.
|
|
137
137
|
|
|
138
138
|
returns
|
|
@@ -145,7 +145,7 @@ class Component(GrpcComponentGroup):
|
|
|
145
145
|
return None
|
|
146
146
|
|
|
147
147
|
@property
|
|
148
|
-
def _active_layout(self):
|
|
148
|
+
def _active_layout(self):
|
|
149
149
|
"""Active layout.
|
|
150
150
|
|
|
151
151
|
Returns
|
|
@@ -155,7 +155,7 @@ class Component(GrpcComponentGroup):
|
|
|
155
155
|
return self._pedb.active_layout
|
|
156
156
|
|
|
157
157
|
@property
|
|
158
|
-
def _edb_model(self):
|
|
158
|
+
def _edb_model(self):
|
|
159
159
|
"""Component model.
|
|
160
160
|
|
|
161
161
|
Returns
|
|
@@ -167,7 +167,7 @@ class Component(GrpcComponentGroup):
|
|
|
167
167
|
return comp_prop.model
|
|
168
168
|
|
|
169
169
|
@property # pragma: no cover
|
|
170
|
-
def _pin_pairs(self):
|
|
170
|
+
def _pin_pairs(self) -> PinPairModel:
|
|
171
171
|
"""Pins pairs.
|
|
172
172
|
|
|
173
173
|
Returns
|
|
@@ -200,7 +200,7 @@ class Component(GrpcComponentGroup):
|
|
|
200
200
|
return [self._edb_model.rlc(pin_pair) for pin_pair in self._edb_model.pin_pairs()]
|
|
201
201
|
|
|
202
202
|
@property
|
|
203
|
-
def model(self):
|
|
203
|
+
def model(self) -> Union[SparamModel, SpiceModel]:
|
|
204
204
|
"""Component model.
|
|
205
205
|
|
|
206
206
|
Returns
|
|
@@ -261,7 +261,7 @@ class Component(GrpcComponentGroup):
|
|
|
261
261
|
self.component_property = comp_prop
|
|
262
262
|
|
|
263
263
|
@property
|
|
264
|
-
def is_mcad(self):
|
|
264
|
+
def is_mcad(self) -> bool:
|
|
265
265
|
"""MCad component.
|
|
266
266
|
|
|
267
267
|
Returns
|
|
@@ -277,7 +277,7 @@ class Component(GrpcComponentGroup):
|
|
|
277
277
|
super(Component, self.__class__).is_mcad.__set__(self, GrpcValue(value))
|
|
278
278
|
|
|
279
279
|
@property
|
|
280
|
-
def is_mcad_3d_comp(self):
|
|
280
|
+
def is_mcad_3d_comp(self) -> bool:
|
|
281
281
|
"""Mcad 3D component.
|
|
282
282
|
|
|
283
283
|
Returns
|
|
@@ -293,7 +293,7 @@ class Component(GrpcComponentGroup):
|
|
|
293
293
|
super(Component, self.__class__).is_mcad_3d_comp.__set__(self, GrpcValue(value))
|
|
294
294
|
|
|
295
295
|
@property
|
|
296
|
-
def is_mcad_hfss(self):
|
|
296
|
+
def is_mcad_hfss(self) -> bool:
|
|
297
297
|
"""MCad HFSS.
|
|
298
298
|
|
|
299
299
|
Returns
|
|
@@ -309,7 +309,7 @@ class Component(GrpcComponentGroup):
|
|
|
309
309
|
super(Component, self.__class__).is_mcad_hfss.__set__(self, GrpcValue(value))
|
|
310
310
|
|
|
311
311
|
@property
|
|
312
|
-
def is_mcad_stride(self):
|
|
312
|
+
def is_mcad_stride(self) -> bool:
|
|
313
313
|
"""MCar stride.
|
|
314
314
|
|
|
315
315
|
Returns
|
|
@@ -324,15 +324,13 @@ class Component(GrpcComponentGroup):
|
|
|
324
324
|
if isinstance(value, bool):
|
|
325
325
|
super(Component, self.__class__).is_mcad_stride.__set__(self, GrpcValue(value))
|
|
326
326
|
|
|
327
|
-
def create_package_def(self, name=
|
|
327
|
+
def create_package_def(self, 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.
|
|
336
334
|
|
|
337
335
|
Returns
|
|
338
336
|
-------
|
|
@@ -349,7 +347,7 @@ class Component(GrpcComponentGroup):
|
|
|
349
347
|
return False
|
|
350
348
|
|
|
351
349
|
@property
|
|
352
|
-
def enabled(self):
|
|
350
|
+
def enabled(self) -> bool:
|
|
353
351
|
"""Component active mode.
|
|
354
352
|
|
|
355
353
|
Returns
|
|
@@ -369,7 +367,7 @@ class Component(GrpcComponentGroup):
|
|
|
369
367
|
self.component_property = cmp_prop
|
|
370
368
|
|
|
371
369
|
@property
|
|
372
|
-
def spice_model(self):
|
|
370
|
+
def spice_model(self) -> SpiceModel:
|
|
373
371
|
"""Assigned Spice model.
|
|
374
372
|
|
|
375
373
|
Returns
|
|
@@ -379,10 +377,10 @@ class Component(GrpcComponentGroup):
|
|
|
379
377
|
if not self.model_type == "SPICEModel":
|
|
380
378
|
return None
|
|
381
379
|
else:
|
|
382
|
-
return SpiceModel(self._edb_model
|
|
380
|
+
return SpiceModel(edb_object=self._edb_model)
|
|
383
381
|
|
|
384
382
|
@property
|
|
385
|
-
def s_param_model(self):
|
|
383
|
+
def s_param_model(self) -> SparamModel:
|
|
386
384
|
"""Assigned S-parameter model.
|
|
387
385
|
|
|
388
386
|
Returns
|
|
@@ -392,10 +390,10 @@ class Component(GrpcComponentGroup):
|
|
|
392
390
|
if not self.model_type == "SParameterModel":
|
|
393
391
|
return None
|
|
394
392
|
else:
|
|
395
|
-
return
|
|
393
|
+
return SparamModel(edb_object=self._edb_model)
|
|
396
394
|
|
|
397
395
|
@property
|
|
398
|
-
def netlist_model(self):
|
|
396
|
+
def netlist_model(self) -> GrpcNetlistModel:
|
|
399
397
|
"""Assigned netlist model.
|
|
400
398
|
|
|
401
399
|
Returns
|
|
@@ -408,7 +406,7 @@ class Component(GrpcComponentGroup):
|
|
|
408
406
|
return GrpcNetlistModel(self._edb_model)
|
|
409
407
|
|
|
410
408
|
@property
|
|
411
|
-
def solder_ball_height(self):
|
|
409
|
+
def solder_ball_height(self) -> float:
|
|
412
410
|
"""Solder ball height if available.
|
|
413
411
|
|
|
414
412
|
Returns
|
|
@@ -419,7 +417,7 @@ class Component(GrpcComponentGroup):
|
|
|
419
417
|
try:
|
|
420
418
|
return self.component_property.solder_ball_property.height.value
|
|
421
419
|
except:
|
|
422
|
-
return
|
|
420
|
+
return 0.0
|
|
423
421
|
|
|
424
422
|
@solder_ball_height.setter
|
|
425
423
|
def solder_ball_height(self, value):
|
|
@@ -431,7 +429,7 @@ class Component(GrpcComponentGroup):
|
|
|
431
429
|
self.component_property = cmp_property
|
|
432
430
|
|
|
433
431
|
@property
|
|
434
|
-
def solder_ball_shape(self):
|
|
432
|
+
def solder_ball_shape(self) -> str:
|
|
435
433
|
"""Solder ball shape.
|
|
436
434
|
|
|
437
435
|
Returns
|
|
@@ -467,7 +465,7 @@ class Component(GrpcComponentGroup):
|
|
|
467
465
|
self.component_property = cmp_property
|
|
468
466
|
|
|
469
467
|
@property
|
|
470
|
-
def solder_ball_diameter(self):
|
|
468
|
+
def solder_ball_diameter(self) -> float:
|
|
471
469
|
"""Solder ball diameter.
|
|
472
470
|
|
|
473
471
|
Returns
|
|
@@ -508,7 +506,7 @@ class Component(GrpcComponentGroup):
|
|
|
508
506
|
return solder_placement.value
|
|
509
507
|
|
|
510
508
|
@property
|
|
511
|
-
def refdes(self):
|
|
509
|
+
def refdes(self) -> str:
|
|
512
510
|
"""Reference Designator Name.
|
|
513
511
|
|
|
514
512
|
Returns
|
|
@@ -523,7 +521,7 @@ class Component(GrpcComponentGroup):
|
|
|
523
521
|
self.name = name
|
|
524
522
|
|
|
525
523
|
@property
|
|
526
|
-
def model_type(self):
|
|
524
|
+
def model_type(self) -> str:
|
|
527
525
|
"""Retrieve assigned model type.
|
|
528
526
|
|
|
529
527
|
Returns
|
|
@@ -542,12 +540,12 @@ class Component(GrpcComponentGroup):
|
|
|
542
540
|
return _model_type
|
|
543
541
|
|
|
544
542
|
@property
|
|
545
|
-
def rlc_values(self):
|
|
543
|
+
def rlc_values(self) -> list[list[float]]:
|
|
546
544
|
"""Get component rlc values.
|
|
547
545
|
|
|
548
546
|
Returns
|
|
549
547
|
-------
|
|
550
|
-
|
|
548
|
+
list[list[Rvalue(float), Lvalue(float), Cvalue(float)]].
|
|
551
549
|
"""
|
|
552
550
|
if not len(self._rlc):
|
|
553
551
|
return [None, None, None]
|
|
@@ -589,7 +587,7 @@ class Component(GrpcComponentGroup):
|
|
|
589
587
|
self.component_property = comp_property
|
|
590
588
|
|
|
591
589
|
@property
|
|
592
|
-
def value(self):
|
|
590
|
+
def value(self) -> float:
|
|
593
591
|
"""Retrieve discrete component value.
|
|
594
592
|
|
|
595
593
|
Returns
|
|
@@ -613,7 +611,7 @@ class Component(GrpcComponentGroup):
|
|
|
613
611
|
self.cap_value = value
|
|
614
612
|
|
|
615
613
|
@property
|
|
616
|
-
def res_value(self):
|
|
614
|
+
def res_value(self) -> float:
|
|
617
615
|
"""Resistance value.
|
|
618
616
|
|
|
619
617
|
Returns
|
|
@@ -645,7 +643,7 @@ class Component(GrpcComponentGroup):
|
|
|
645
643
|
self.component_property = comp_prop
|
|
646
644
|
|
|
647
645
|
@property
|
|
648
|
-
def cap_value(self):
|
|
646
|
+
def cap_value(self) -> float:
|
|
649
647
|
"""Capacitance Value.
|
|
650
648
|
|
|
651
649
|
Returns
|
|
@@ -696,7 +694,7 @@ class Component(GrpcComponentGroup):
|
|
|
696
694
|
return None
|
|
697
695
|
|
|
698
696
|
@ind_value.setter
|
|
699
|
-
def ind_value(self, value)
|
|
697
|
+
def ind_value(self, value) -> float:
|
|
700
698
|
if value:
|
|
701
699
|
_rlc = []
|
|
702
700
|
model = PinPairModel(self._pedb, GrpcPinPairModel.create())
|
|
@@ -711,7 +709,7 @@ class Component(GrpcComponentGroup):
|
|
|
711
709
|
self.component_property = comp_prop
|
|
712
710
|
|
|
713
711
|
@property
|
|
714
|
-
def is_parallel_rlc(self):
|
|
712
|
+
def is_parallel_rlc(self) -> bool:
|
|
715
713
|
"""Define if model is Parallel or Series.
|
|
716
714
|
|
|
717
715
|
Returns
|
|
@@ -739,7 +737,7 @@ class Component(GrpcComponentGroup):
|
|
|
739
737
|
self.component_property = comp_property
|
|
740
738
|
|
|
741
739
|
@property
|
|
742
|
-
def center(self):
|
|
740
|
+
def center(self) -> list[float, float]:
|
|
743
741
|
"""Compute the component center.
|
|
744
742
|
|
|
745
743
|
Returns
|
|
@@ -768,7 +766,7 @@ class Component(GrpcComponentGroup):
|
|
|
768
766
|
super(Component, self.__class__).location.__set__(self, _location)
|
|
769
767
|
|
|
770
768
|
@property
|
|
771
|
-
def bounding_box(self):
|
|
769
|
+
def bounding_box(self) -> list[float]:
|
|
772
770
|
"""Component's bounding box.
|
|
773
771
|
|
|
774
772
|
Returns
|
|
@@ -784,7 +782,7 @@ class Component(GrpcComponentGroup):
|
|
|
784
782
|
return [pt1.x.value, pt1.y.value, pt2.x.value, pt2.y.value]
|
|
785
783
|
|
|
786
784
|
@property
|
|
787
|
-
def rotation(self):
|
|
785
|
+
def rotation(self) -> float:
|
|
788
786
|
"""Compute the component rotation in radian.
|
|
789
787
|
|
|
790
788
|
Returns
|
|
@@ -795,7 +793,7 @@ class Component(GrpcComponentGroup):
|
|
|
795
793
|
return self.transform.rotation.value
|
|
796
794
|
|
|
797
795
|
@property
|
|
798
|
-
def pinlist(self):
|
|
796
|
+
def pinlist(self) -> list[PadstackInstance]:
|
|
799
797
|
"""Pins of the component.
|
|
800
798
|
|
|
801
799
|
Returns
|
|
@@ -821,7 +819,7 @@ class Component(GrpcComponentGroup):
|
|
|
821
819
|
return list(set(nets))
|
|
822
820
|
|
|
823
821
|
@property
|
|
824
|
-
def pins(self):
|
|
822
|
+
def pins(self) -> dict[str, PadstackInstance]:
|
|
825
823
|
"""Component pins.
|
|
826
824
|
|
|
827
825
|
Returns
|
|
@@ -838,7 +836,7 @@ class Component(GrpcComponentGroup):
|
|
|
838
836
|
return _pins
|
|
839
837
|
|
|
840
838
|
@property
|
|
841
|
-
def type(self):
|
|
839
|
+
def type(self) -> str:
|
|
842
840
|
"""Component type.
|
|
843
841
|
|
|
844
842
|
Returns
|
|
@@ -876,18 +874,26 @@ class Component(GrpcComponentGroup):
|
|
|
876
874
|
return
|
|
877
875
|
|
|
878
876
|
@property
|
|
879
|
-
def numpins(self):
|
|
877
|
+
def numpins(self) -> int:
|
|
880
878
|
"""Number of Pins of Component.
|
|
881
879
|
|
|
880
|
+
..deprecated:: 0.51.0
|
|
881
|
+
Use: func:`num_pins` instead.
|
|
882
882
|
Returns
|
|
883
883
|
-------
|
|
884
884
|
int
|
|
885
885
|
Component pins number.
|
|
886
886
|
"""
|
|
887
|
-
|
|
887
|
+
|
|
888
|
+
warnings.warn("Use num_pins instead.", DeprecationWarning)
|
|
889
|
+
try:
|
|
890
|
+
return self.num_pins
|
|
891
|
+
except Exception as e:
|
|
892
|
+
self._pedb.logger.error(f"{e}")
|
|
893
|
+
return 0
|
|
888
894
|
|
|
889
895
|
@property
|
|
890
|
-
def partname(self)
|
|
896
|
+
def partname(self) -> str:
|
|
891
897
|
"""Component part name.
|
|
892
898
|
|
|
893
899
|
Returns
|
|
@@ -903,7 +909,7 @@ class Component(GrpcComponentGroup):
|
|
|
903
909
|
self.part_name = name
|
|
904
910
|
|
|
905
911
|
@property
|
|
906
|
-
def part_name(self):
|
|
912
|
+
def part_name(self) -> str:
|
|
907
913
|
"""Component part name.
|
|
908
914
|
|
|
909
915
|
Returns
|
|
@@ -919,7 +925,7 @@ class Component(GrpcComponentGroup):
|
|
|
919
925
|
self.component_def.name = name
|
|
920
926
|
|
|
921
927
|
@property
|
|
922
|
-
def placement_layer(self):
|
|
928
|
+
def placement_layer(self) -> str:
|
|
923
929
|
"""Placement layern name.
|
|
924
930
|
|
|
925
931
|
Returns
|
|
@@ -930,7 +936,7 @@ class Component(GrpcComponentGroup):
|
|
|
930
936
|
return super().placement_layer.name
|
|
931
937
|
|
|
932
938
|
@property
|
|
933
|
-
def layer(self):
|
|
939
|
+
def layer(self) -> StackupLayer:
|
|
934
940
|
"""Placement layern object.
|
|
935
941
|
|
|
936
942
|
Returns
|
|
@@ -941,7 +947,7 @@ class Component(GrpcComponentGroup):
|
|
|
941
947
|
return StackupLayer(self._pedb, super().placement_layer)
|
|
942
948
|
|
|
943
949
|
@property
|
|
944
|
-
def is_top_mounted(self):
|
|
950
|
+
def is_top_mounted(self) -> bool:
|
|
945
951
|
"""Check if a component is mounted on top or bottom of the layout.
|
|
946
952
|
|
|
947
953
|
Returns
|
|
@@ -955,7 +961,7 @@ class Component(GrpcComponentGroup):
|
|
|
955
961
|
return False
|
|
956
962
|
|
|
957
963
|
@property
|
|
958
|
-
def lower_elevation(self):
|
|
964
|
+
def lower_elevation(self) -> float:
|
|
959
965
|
"""Lower elevation of the placement layer.
|
|
960
966
|
|
|
961
967
|
Returns
|
|
@@ -966,7 +972,7 @@ class Component(GrpcComponentGroup):
|
|
|
966
972
|
return self.layer.lower_elevation
|
|
967
973
|
|
|
968
974
|
@property
|
|
969
|
-
def upper_elevation(self):
|
|
975
|
+
def upper_elevation(self) -> float:
|
|
970
976
|
"""Upper elevation of the placement layer.
|
|
971
977
|
|
|
972
978
|
Returns
|
|
@@ -978,7 +984,7 @@ class Component(GrpcComponentGroup):
|
|
|
978
984
|
return self.layer.upper_elevation
|
|
979
985
|
|
|
980
986
|
@property
|
|
981
|
-
def top_bottom_association(self):
|
|
987
|
+
def top_bottom_association(self) -> int:
|
|
982
988
|
"""Top/bottom association of the placement layer.
|
|
983
989
|
|
|
984
990
|
Returns
|
|
@@ -1015,7 +1021,7 @@ class Component(GrpcComponentGroup):
|
|
|
1015
1021
|
name: Optional[str] = None,
|
|
1016
1022
|
sub_circuit_name: Optional[str] = None,
|
|
1017
1023
|
terminal_pairs: Optional[list] = None,
|
|
1018
|
-
):
|
|
1024
|
+
) -> SpiceModel:
|
|
1019
1025
|
"""Assign Spice model to this component.
|
|
1020
1026
|
|
|
1021
1027
|
Parameters
|
|
@@ -1064,7 +1070,7 @@ class Component(GrpcComponentGroup):
|
|
|
1064
1070
|
else:
|
|
1065
1071
|
return False
|
|
1066
1072
|
|
|
1067
|
-
def assign_s_param_model(self, file_path, name=None, reference_net=None):
|
|
1073
|
+
def assign_s_param_model(self, file_path, name=None, reference_net=None) -> GrpcNPortComponentModel:
|
|
1068
1074
|
"""Assign S-parameter to this component.
|
|
1069
1075
|
|
|
1070
1076
|
Parameters
|
|
@@ -1074,6 +1080,9 @@ class Component(GrpcComponentGroup):
|
|
|
1074
1080
|
name : str, optional
|
|
1075
1081
|
Name of the S-parameter model.
|
|
1076
1082
|
|
|
1083
|
+
reference_net : str, optional
|
|
1084
|
+
Reference net.
|
|
1085
|
+
|
|
1077
1086
|
Returns
|
|
1078
1087
|
-------
|
|
1079
1088
|
:class:`NPortComponentModel <ansys.edb.core.definition.component_model.ComponentModel>`
|
|
@@ -1100,7 +1109,7 @@ class Component(GrpcComponentGroup):
|
|
|
1100
1109
|
model = GrpcSParameterModel.create(name=name, ref_net=reference_net)
|
|
1101
1110
|
return self._set_model(model)
|
|
1102
1111
|
|
|
1103
|
-
def use_s_parameter_model(self, name, reference_net=None):
|
|
1112
|
+
def use_s_parameter_model(self, name, reference_net=None) -> bool:
|
|
1104
1113
|
"""Use S-parameter model on the component.
|
|
1105
1114
|
|
|
1106
1115
|
Parameters
|
|
@@ -1134,7 +1143,7 @@ class Component(GrpcComponentGroup):
|
|
|
1134
1143
|
return self._set_model(s_param_model)
|
|
1135
1144
|
return False
|
|
1136
1145
|
|
|
1137
|
-
def assign_rlc_model(self, res=None, ind=None, cap=None, is_parallel=False):
|
|
1146
|
+
def assign_rlc_model(self, res=None, ind=None, cap=None, is_parallel=False) -> PinPairModel:
|
|
1138
1147
|
"""Assign RLC to this component.
|
|
1139
1148
|
|
|
1140
1149
|
Parameters
|
|
@@ -1180,7 +1189,7 @@ class Component(GrpcComponentGroup):
|
|
|
1180
1189
|
model.set_rlc(("1", "2"), rlc)
|
|
1181
1190
|
return self._set_model(model)
|
|
1182
1191
|
|
|
1183
|
-
def create_clearance_on_component(self, extra_soldermask_clearance=1e-4):
|
|
1192
|
+
def create_clearance_on_component(self, extra_soldermask_clearance=1e-4) -> bool:
|
|
1184
1193
|
"""Create a Clearance on Soldermask layer by drawing a rectangle.
|
|
1185
1194
|
|
|
1186
1195
|
Parameters
|
|
@@ -1229,7 +1238,7 @@ class ICDieProperty:
|
|
|
1229
1238
|
self._die_property = self._component.component_property.die_property
|
|
1230
1239
|
|
|
1231
1240
|
@property
|
|
1232
|
-
def die_orientation(self):
|
|
1241
|
+
def die_orientation(self) -> str:
|
|
1233
1242
|
"""Die orientation.
|
|
1234
1243
|
|
|
1235
1244
|
Returns
|
|
@@ -1254,7 +1263,7 @@ class ICDieProperty:
|
|
|
1254
1263
|
self._component.component_property = component_property
|
|
1255
1264
|
|
|
1256
1265
|
@property
|
|
1257
|
-
def die_type(self):
|
|
1266
|
+
def die_type(self) -> str:
|
|
1258
1267
|
"""Die type.
|
|
1259
1268
|
|
|
1260
1269
|
Returns
|
|
@@ -1281,7 +1290,7 @@ class ICDieProperty:
|
|
|
1281
1290
|
self._component.component_property = component_property
|
|
1282
1291
|
|
|
1283
1292
|
@property
|
|
1284
|
-
def height(self):
|
|
1293
|
+
def height(self) -> float:
|
|
1285
1294
|
"""Die height.
|
|
1286
1295
|
|
|
1287
1296
|
Returns
|
|
@@ -1301,7 +1310,7 @@ class ICDieProperty:
|
|
|
1301
1310
|
self._component.component_property = component_property
|
|
1302
1311
|
|
|
1303
1312
|
@property
|
|
1304
|
-
def is_null(self):
|
|
1313
|
+
def is_null(self) -> bool:
|
|
1305
1314
|
"""Test is die is null.
|
|
1306
1315
|
|
|
1307
1316
|
Returns
|
|
@@ -34,7 +34,7 @@ class PinPairModel(GrpcPinPairModel):
|
|
|
34
34
|
super().__init__(edb_object.msg)
|
|
35
35
|
|
|
36
36
|
@property
|
|
37
|
-
def rlc(self):
|
|
37
|
+
def rlc(self) -> tuple[str, str]:
|
|
38
38
|
"""Rlc mdodel.
|
|
39
39
|
|
|
40
40
|
Returns
|
|
@@ -45,7 +45,7 @@ class PinPairModel(GrpcPinPairModel):
|
|
|
45
45
|
return super().rlc(self.pin_pairs()[0])
|
|
46
46
|
|
|
47
47
|
@property
|
|
48
|
-
def rlc_enable(self):
|
|
48
|
+
def rlc_enable(self) -> list[bool]:
|
|
49
49
|
"""Enable model.
|
|
50
50
|
|
|
51
51
|
Returns
|
|
@@ -62,7 +62,7 @@ class PinPairModel(GrpcPinPairModel):
|
|
|
62
62
|
self.rlc.c_enabled = GrpcValue(value[2])
|
|
63
63
|
|
|
64
64
|
@property
|
|
65
|
-
def resistance(self):
|
|
65
|
+
def resistance(self) -> float:
|
|
66
66
|
"""Resistance.
|
|
67
67
|
|
|
68
68
|
Returns
|
|
@@ -78,7 +78,7 @@ class PinPairModel(GrpcPinPairModel):
|
|
|
78
78
|
self.rlc.r = GrpcValue(value)
|
|
79
79
|
|
|
80
80
|
@property
|
|
81
|
-
def inductance(self):
|
|
81
|
+
def inductance(self) -> float:
|
|
82
82
|
"""Inductance.
|
|
83
83
|
|
|
84
84
|
Returns
|
|
@@ -94,7 +94,7 @@ class PinPairModel(GrpcPinPairModel):
|
|
|
94
94
|
self.rlc.l = GrpcValue(value)
|
|
95
95
|
|
|
96
96
|
@property
|
|
97
|
-
def capacitance(self):
|
|
97
|
+
def capacitance(self) -> float:
|
|
98
98
|
"""Capacitance.
|
|
99
99
|
|
|
100
100
|
Returns
|
|
@@ -110,7 +110,7 @@ class PinPairModel(GrpcPinPairModel):
|
|
|
110
110
|
self.rlc.c = GrpcValue(value)
|
|
111
111
|
|
|
112
112
|
@property
|
|
113
|
-
def rlc_values(self)
|
|
113
|
+
def rlc_values(self) -> list[float]:
|
|
114
114
|
"""Rlc value.
|
|
115
115
|
|
|
116
116
|
Returns
|
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
23
|
|
|
24
|
+
from typing import Union
|
|
25
|
+
|
|
24
26
|
from ansys.edb.core.hierarchy.pin_group import PinGroup as GrpcPinGroup
|
|
25
27
|
from ansys.edb.core.terminal.terminal import BoundaryType as GrpcBoundaryType
|
|
26
28
|
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
@@ -53,7 +55,7 @@ class PinGroup(GrpcPinGroup):
|
|
|
53
55
|
return self._pedb.active_layout
|
|
54
56
|
|
|
55
57
|
@property
|
|
56
|
-
def component(self):
|
|
58
|
+
def component(self) -> Component:
|
|
57
59
|
"""Component.
|
|
58
60
|
|
|
59
61
|
Return
|
|
@@ -69,7 +71,7 @@ class PinGroup(GrpcPinGroup):
|
|
|
69
71
|
super(PinGroup, self.__class__).component.__set__(self, value)
|
|
70
72
|
|
|
71
73
|
@property
|
|
72
|
-
def pins(self):
|
|
74
|
+
def pins(self) -> dict[str, PadstackInstance]:
|
|
73
75
|
"""Pin group pins.
|
|
74
76
|
|
|
75
77
|
Returns
|
|
@@ -79,7 +81,7 @@ class PinGroup(GrpcPinGroup):
|
|
|
79
81
|
return {i.name: PadstackInstance(self._pedb, i) for i in super().pins}
|
|
80
82
|
|
|
81
83
|
@property
|
|
82
|
-
def net(self):
|
|
84
|
+
def net(self) -> Net:
|
|
83
85
|
"""Net.
|
|
84
86
|
|
|
85
87
|
Returns
|
|
@@ -94,7 +96,7 @@ class PinGroup(GrpcPinGroup):
|
|
|
94
96
|
super(PinGroup, self.__class__).net.__set__(self, value)
|
|
95
97
|
|
|
96
98
|
@property
|
|
97
|
-
def net_name(self):
|
|
99
|
+
def net_name(self) -> str:
|
|
98
100
|
"""Net name.
|
|
99
101
|
|
|
100
102
|
Returns
|
|
@@ -106,7 +108,7 @@ class PinGroup(GrpcPinGroup):
|
|
|
106
108
|
return self.net.name
|
|
107
109
|
|
|
108
110
|
@property
|
|
109
|
-
def terminal(self):
|
|
111
|
+
def terminal(self) -> Union[PinGroupTerminal, None]:
|
|
110
112
|
"""Terminal."""
|
|
111
113
|
term = self.pin_group_terminal
|
|
112
114
|
if not term.is_null:
|
|
@@ -115,7 +117,7 @@ class PinGroup(GrpcPinGroup):
|
|
|
115
117
|
else:
|
|
116
118
|
return None
|
|
117
119
|
|
|
118
|
-
def create_terminal(self, name=None):
|
|
120
|
+
def create_terminal(self, name=None) -> PinGroupTerminal:
|
|
119
121
|
"""Create a terminal.
|
|
120
122
|
|
|
121
123
|
Parameters
|
|
@@ -136,7 +138,7 @@ class PinGroup(GrpcPinGroup):
|
|
|
136
138
|
)
|
|
137
139
|
return PinGroupTerminal(self._pedb, term)
|
|
138
140
|
|
|
139
|
-
def _json_format(self):
|
|
141
|
+
def _json_format(self) -> dict[str, any]:
|
|
140
142
|
"""Format json.
|
|
141
143
|
|
|
142
144
|
Returns
|
|
@@ -146,7 +148,7 @@ class PinGroup(GrpcPinGroup):
|
|
|
146
148
|
dict_out = {"component": self.component, "name": self.name, "net": self.net, "node_type": self.node_type}
|
|
147
149
|
return dict_out
|
|
148
150
|
|
|
149
|
-
def create_current_source_terminal(self, magnitude=1.0, phase=0, impedance=1e6):
|
|
151
|
+
def create_current_source_terminal(self, magnitude=1.0, phase=0, impedance=1e6) -> PinGroupTerminal:
|
|
150
152
|
"""Create current source terminal.
|
|
151
153
|
|
|
152
154
|
Parameters
|
|
@@ -171,7 +173,7 @@ class PinGroup(GrpcPinGroup):
|
|
|
171
173
|
terminal.impedance = GrpcValue(impedance)
|
|
172
174
|
return terminal
|
|
173
175
|
|
|
174
|
-
def create_voltage_source_terminal(self, magnitude=1, phase=0, impedance=0.001):
|
|
176
|
+
def create_voltage_source_terminal(self, magnitude=1, phase=0, impedance=0.001) -> PinGroupTerminal:
|
|
175
177
|
"""Create voltage source terminal.
|
|
176
178
|
|
|
177
179
|
Parameters
|
|
@@ -196,7 +198,7 @@ class PinGroup(GrpcPinGroup):
|
|
|
196
198
|
terminal.impedance = GrpcValue(impedance)
|
|
197
199
|
return terminal
|
|
198
200
|
|
|
199
|
-
def create_voltage_probe_terminal(self, impedance=1e6):
|
|
201
|
+
def create_voltage_probe_terminal(self, impedance=1e6) -> PinGroupTerminal:
|
|
200
202
|
"""Create voltage probe terminal.
|
|
201
203
|
|
|
202
204
|
Parameters
|
|
@@ -215,7 +217,7 @@ class PinGroup(GrpcPinGroup):
|
|
|
215
217
|
terminal.impedance = GrpcValue(impedance)
|
|
216
218
|
return terminal
|
|
217
219
|
|
|
218
|
-
def create_port_terminal(self, impedance=50):
|
|
220
|
+
def create_port_terminal(self, impedance=50) -> PinGroupTerminal:
|
|
219
221
|
"""Create port terminal.
|
|
220
222
|
|
|
221
223
|
Parameters
|
|
@@ -29,5 +29,5 @@ class SparamModel(GrpcSParameterModel): # pragma: no cover
|
|
|
29
29
|
"""Manage :class:`SParameterModel <ansys.edb.core.hierarchy.sparameter_model.SParameterModel>`"""
|
|
30
30
|
|
|
31
31
|
def __init__(self, edb_object):
|
|
32
|
-
super().__init__(
|
|
32
|
+
super().__init__(edb_object.msg)
|
|
33
33
|
self._edb_model = edb_object
|
|
@@ -28,7 +28,7 @@ class SpiceModel(GrpcSpiceModel): # pragma: no cover
|
|
|
28
28
|
|
|
29
29
|
def __init__(self, edb_object=None, name=None, file_path=None, sub_circuit=None):
|
|
30
30
|
if edb_object:
|
|
31
|
-
super().__init__(edb_object)
|
|
31
|
+
super().__init__(edb_object.msg)
|
|
32
32
|
elif name and file_path:
|
|
33
33
|
if not sub_circuit:
|
|
34
34
|
sub_circuit = name
|
|
@@ -53,7 +53,7 @@ class Layer(GrpcLayer):
|
|
|
53
53
|
self._pedb.logger.error(f"{k} is not a valid layer attribute")
|
|
54
54
|
|
|
55
55
|
@property
|
|
56
|
-
def properties(self):
|
|
56
|
+
def properties(self) -> dict[str, str]:
|
|
57
57
|
from ansys.edb.core.layer.stackup_layer import StackupLayer as GrpcStackupLayer
|
|
58
58
|
|
|
59
59
|
from pyedb.grpc.database.stackup import StackupLayer
|
|
@@ -77,7 +77,7 @@ class Layer(GrpcLayer):
|
|
|
77
77
|
self.color = color
|
|
78
78
|
|
|
79
79
|
@property
|
|
80
|
-
def type(self):
|
|
80
|
+
def type(self) -> str:
|
|
81
81
|
return super().type.name.lower().split("_")[0]
|
|
82
82
|
|
|
83
83
|
@property
|