pyedb 0.53.0__py3-none-any.whl → 0.55.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 -8
- pyedb/configuration/cfg_boundaries.py +69 -151
- pyedb/configuration/cfg_components.py +201 -460
- pyedb/configuration/cfg_data.py +4 -2
- pyedb/configuration/cfg_general.py +13 -36
- pyedb/configuration/cfg_modeler.py +2 -1
- pyedb/configuration/cfg_nets.py +21 -35
- pyedb/configuration/cfg_operations.py +22 -151
- pyedb/configuration/cfg_package_definition.py +56 -112
- pyedb/configuration/cfg_padstacks.py +292 -688
- pyedb/configuration/cfg_pin_groups.py +32 -79
- pyedb/configuration/cfg_ports_sources.py +20 -9
- pyedb/configuration/cfg_s_parameter_models.py +67 -172
- pyedb/configuration/cfg_setup.py +102 -295
- pyedb/configuration/configuration.py +66 -6
- pyedb/dotnet/database/cell/connectable.py +38 -9
- pyedb/dotnet/database/cell/hierarchy/component.py +28 -28
- pyedb/dotnet/database/cell/hierarchy/model.py +1 -1
- pyedb/dotnet/database/cell/layout.py +64 -3
- pyedb/dotnet/database/cell/layout_obj.py +3 -3
- pyedb/dotnet/database/cell/primitive/path.py +6 -8
- pyedb/dotnet/database/cell/primitive/primitive.py +10 -31
- pyedb/dotnet/database/cell/terminal/edge_terminal.py +2 -2
- pyedb/dotnet/database/cell/terminal/padstack_instance_terminal.py +1 -1
- 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 +26 -28
- pyedb/dotnet/database/cell/voltage_regulator.py +0 -21
- pyedb/dotnet/database/components.py +99 -91
- pyedb/dotnet/database/definition/component_def.py +4 -4
- pyedb/dotnet/database/definition/component_model.py +1 -1
- pyedb/dotnet/database/definition/package_def.py +2 -3
- pyedb/dotnet/database/dotnet/database.py +27 -218
- pyedb/dotnet/database/dotnet/primitive.py +16 -16
- pyedb/dotnet/database/edb_data/control_file.py +5 -5
- pyedb/dotnet/database/edb_data/hfss_extent_info.py +6 -6
- pyedb/dotnet/database/edb_data/layer_data.py +35 -35
- pyedb/dotnet/database/edb_data/padstacks_data.py +65 -90
- pyedb/dotnet/database/edb_data/primitives_data.py +5 -5
- pyedb/dotnet/database/edb_data/sources.py +6 -6
- pyedb/dotnet/database/edb_data/variables.py +8 -4
- pyedb/dotnet/database/geometry/point_data.py +14 -10
- pyedb/dotnet/database/geometry/polygon_data.py +3 -5
- pyedb/dotnet/database/hfss.py +50 -52
- pyedb/dotnet/database/layout_validation.py +14 -11
- pyedb/dotnet/database/materials.py +10 -11
- pyedb/dotnet/database/modeler.py +104 -101
- pyedb/dotnet/database/nets.py +20 -23
- pyedb/dotnet/database/padstack.py +156 -84
- 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 +47 -47
- pyedb/dotnet/database/stackup.py +152 -87
- pyedb/dotnet/database/utilities/heatsink.py +4 -4
- pyedb/dotnet/database/utilities/obj_base.py +3 -3
- pyedb/dotnet/database/utilities/simulation_setup.py +2 -2
- pyedb/dotnet/database/utilities/value.py +116 -0
- pyedb/dotnet/edb.py +248 -170
- pyedb/edb_logger.py +12 -27
- pyedb/extensions/via_design_backend.py +6 -3
- pyedb/generic/design_types.py +68 -21
- pyedb/generic/general_methods.py +0 -120
- pyedb/generic/process.py +44 -108
- pyedb/generic/settings.py +75 -19
- pyedb/grpc/__init__.py +0 -0
- pyedb/grpc/database/components.py +55 -17
- pyedb/grpc/database/control_file.py +5 -5
- pyedb/grpc/database/definition/materials.py +24 -31
- pyedb/grpc/database/definition/package_def.py +18 -18
- pyedb/grpc/database/definition/padstack_def.py +104 -51
- 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 +4 -3
- 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 +17 -13
- pyedb/grpc/database/layout/voltage_regulator.py +7 -7
- pyedb/grpc/database/layout_validation.py +16 -15
- pyedb/grpc/database/modeler.py +60 -58
- pyedb/grpc/database/net/net.py +15 -14
- pyedb/grpc/database/nets.py +112 -31
- pyedb/grpc/database/padstacks.py +303 -190
- 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 +191 -23
- 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_simulation_setup.py +17 -1
- pyedb/grpc/database/siwave.py +31 -25
- pyedb/grpc/database/source_excitations.py +335 -233
- pyedb/grpc/database/stackup.py +165 -148
- pyedb/grpc/database/terminal/bundle_terminal.py +18 -8
- pyedb/grpc/database/terminal/edge_terminal.py +10 -0
- pyedb/grpc/database/terminal/padstack_instance_terminal.py +16 -5
- pyedb/grpc/database/terminal/pingroup_terminal.py +12 -11
- 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/database/utility/xml_control_file.py +5 -5
- pyedb/grpc/edb.py +130 -63
- pyedb/grpc/edb_init.py +3 -10
- pyedb/grpc/rpc_session.py +10 -10
- pyedb/libraries/common.py +366 -0
- pyedb/libraries/rf_libraries/base_functions.py +1358 -0
- pyedb/libraries/rf_libraries/planar_antennas.py +628 -0
- pyedb/misc/decorators.py +61 -0
- pyedb/misc/misc.py +0 -13
- pyedb/siwave.py +2 -2
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/METADATA +2 -3
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/RECORD +119 -112
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/WHEEL +0 -0
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -25,7 +25,8 @@ from __future__ import absolute_import
|
|
|
25
25
|
from ansys.edb.core.layer.layer import LayerType as GrpcLayerType
|
|
26
26
|
from ansys.edb.core.layer.stackup_layer import RoughnessRegion as GrpcRoughnessRegion
|
|
27
27
|
from ansys.edb.core.layer.stackup_layer import StackupLayer as GrpcStackupLayer
|
|
28
|
-
|
|
28
|
+
|
|
29
|
+
from pyedb.grpc.database.utility.value import Value
|
|
29
30
|
|
|
30
31
|
|
|
31
32
|
class StackupLayer(GrpcStackupLayer):
|
|
@@ -133,8 +134,8 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
133
134
|
self._edb_object = GrpcStackupLayer.create(
|
|
134
135
|
self._name,
|
|
135
136
|
layer_type,
|
|
136
|
-
|
|
137
|
-
|
|
137
|
+
Value(0),
|
|
138
|
+
Value(0),
|
|
138
139
|
"copper",
|
|
139
140
|
)
|
|
140
141
|
|
|
@@ -147,12 +148,12 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
147
148
|
float
|
|
148
149
|
Lower elevation.
|
|
149
150
|
"""
|
|
150
|
-
return
|
|
151
|
+
return Value(super().lower_elevation, self._pedb.active_cell)
|
|
151
152
|
|
|
152
153
|
@lower_elevation.setter
|
|
153
154
|
def lower_elevation(self, value):
|
|
154
155
|
if self._pedb.stackup.mode == "overlapping":
|
|
155
|
-
super(StackupLayer, self.__class__).lower_elevation.__set__(self,
|
|
156
|
+
super(StackupLayer, self.__class__).lower_elevation.__set__(self, Value(value))
|
|
156
157
|
|
|
157
158
|
@property
|
|
158
159
|
def fill_material(self) -> str:
|
|
@@ -180,7 +181,7 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
180
181
|
float
|
|
181
182
|
Upper elevation.
|
|
182
183
|
"""
|
|
183
|
-
return
|
|
184
|
+
return Value(super().upper_elevation, self._pedb.active_cell)
|
|
184
185
|
|
|
185
186
|
@property
|
|
186
187
|
def is_negative(self) -> bool:
|
|
@@ -303,11 +304,11 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
303
304
|
float
|
|
304
305
|
Layer thickness.
|
|
305
306
|
"""
|
|
306
|
-
return
|
|
307
|
+
return Value(super().thickness, self._pedb.active_cell)
|
|
307
308
|
|
|
308
309
|
@thickness.setter
|
|
309
310
|
def thickness(self, value):
|
|
310
|
-
super(StackupLayer, self.__class__).thickness.__set__(self,
|
|
311
|
+
super(StackupLayer, self.__class__).thickness.__set__(self, Value(value))
|
|
311
312
|
|
|
312
313
|
@property
|
|
313
314
|
def etch_factor(self) -> float:
|
|
@@ -318,7 +319,7 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
318
319
|
float
|
|
319
320
|
Etching factor value.
|
|
320
321
|
"""
|
|
321
|
-
return super().etch_factor.
|
|
322
|
+
return Value(super().etch_factor, self._pedb.active_cell)
|
|
322
323
|
|
|
323
324
|
@etch_factor.setter
|
|
324
325
|
def etch_factor(self, value):
|
|
@@ -326,7 +327,7 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
326
327
|
self.etch_factor_enabled = False
|
|
327
328
|
else:
|
|
328
329
|
self.etch_factor_enabled = True
|
|
329
|
-
super(StackupLayer, self.__class__).etch_factor.__set__(self,
|
|
330
|
+
super(StackupLayer, self.__class__).etch_factor.__set__(self, Value(value))
|
|
330
331
|
|
|
331
332
|
@property
|
|
332
333
|
def top_hallhuray_nodule_radius(self) -> float:
|
|
@@ -340,7 +341,7 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
340
341
|
try:
|
|
341
342
|
top_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.TOP)
|
|
342
343
|
if len(top_roughness_model) == 2:
|
|
343
|
-
return top_roughness_model[0].
|
|
344
|
+
return Value(top_roughness_model[0], self._pedb.active_cell)
|
|
344
345
|
else:
|
|
345
346
|
return 0.0
|
|
346
347
|
except:
|
|
@@ -351,7 +352,7 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
351
352
|
try:
|
|
352
353
|
top_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.TOP)
|
|
353
354
|
if len(top_roughness_model) == 2:
|
|
354
|
-
top_roughness_model[0] =
|
|
355
|
+
top_roughness_model[0] = Value(value)
|
|
355
356
|
self.set_roughness_model(top_roughness_model, GrpcRoughnessRegion.TOP)
|
|
356
357
|
except:
|
|
357
358
|
pass
|
|
@@ -368,7 +369,7 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
368
369
|
try:
|
|
369
370
|
top_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.TOP)
|
|
370
371
|
if len(top_roughness_model) == 2:
|
|
371
|
-
return top_roughness_model[1].
|
|
372
|
+
return Value(top_roughness_model[1], self._pedb.active_cell)
|
|
372
373
|
else:
|
|
373
374
|
return 0.0
|
|
374
375
|
except:
|
|
@@ -379,7 +380,7 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
379
380
|
try:
|
|
380
381
|
top_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.TOP)
|
|
381
382
|
if len(top_roughness_model) == 2:
|
|
382
|
-
top_roughness_model[1] =
|
|
383
|
+
top_roughness_model[1] = Value(value)
|
|
383
384
|
self.set_roughness_model(top_roughness_model, GrpcRoughnessRegion.TOP)
|
|
384
385
|
except:
|
|
385
386
|
pass
|
|
@@ -396,7 +397,7 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
396
397
|
try:
|
|
397
398
|
bottom_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.BOTTOM)
|
|
398
399
|
if len(bottom_roughness_model) == 2:
|
|
399
|
-
return
|
|
400
|
+
return Value(bottom_roughness_model[0], self._pedb.active_cell)
|
|
400
401
|
else:
|
|
401
402
|
return 0.0
|
|
402
403
|
except:
|
|
@@ -407,7 +408,7 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
407
408
|
try:
|
|
408
409
|
bottom_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.BOTTOM)
|
|
409
410
|
if len(bottom_roughness_model) == 2:
|
|
410
|
-
bottom_roughness_model[0] =
|
|
411
|
+
bottom_roughness_model[0] = Value(value)
|
|
411
412
|
self.set_roughness_model(bottom_roughness_model, GrpcRoughnessRegion.BOTTOM)
|
|
412
413
|
except:
|
|
413
414
|
pass
|
|
@@ -424,7 +425,7 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
424
425
|
try:
|
|
425
426
|
bottom_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.BOTTOM)
|
|
426
427
|
if len(bottom_roughness_model) == 2:
|
|
427
|
-
return bottom_roughness_model[1].
|
|
428
|
+
return Value(bottom_roughness_model[1], self._pedb.active_cell)
|
|
428
429
|
else:
|
|
429
430
|
return 0.0
|
|
430
431
|
except:
|
|
@@ -435,7 +436,7 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
435
436
|
try:
|
|
436
437
|
bottom_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.BOTTOM)
|
|
437
438
|
if len(bottom_roughness_model) == 2:
|
|
438
|
-
bottom_roughness_model[1] =
|
|
439
|
+
bottom_roughness_model[1] = Value(value)
|
|
439
440
|
self.set_roughness_model(bottom_roughness_model, GrpcRoughnessRegion.BOTTOM)
|
|
440
441
|
except:
|
|
441
442
|
pass
|
|
@@ -453,17 +454,17 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
453
454
|
try:
|
|
454
455
|
side_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.SIDE)
|
|
455
456
|
if len(side_roughness_model) == 2:
|
|
456
|
-
return
|
|
457
|
-
return 0.0
|
|
457
|
+
return Value(side_roughness_model[0], self._pedb.active_cell)
|
|
458
|
+
return Value(0.0)
|
|
458
459
|
except:
|
|
459
|
-
return 0.0
|
|
460
|
+
return Value(0.0)
|
|
460
461
|
|
|
461
462
|
@side_hallhuray_nodule_radius.setter
|
|
462
463
|
def side_hallhuray_nodule_radius(self, value):
|
|
463
464
|
try:
|
|
464
465
|
side_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.SIDE)
|
|
465
466
|
if len(side_roughness_model) == 2:
|
|
466
|
-
side_roughness_model[0] =
|
|
467
|
+
side_roughness_model[0] = Value(value)
|
|
467
468
|
self.set_roughness_model(side_roughness_model, GrpcRoughnessRegion.SIDE)
|
|
468
469
|
except:
|
|
469
470
|
pass
|
|
@@ -480,7 +481,7 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
480
481
|
try:
|
|
481
482
|
side_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.SIDE)
|
|
482
483
|
if len(side_roughness_model) == 2:
|
|
483
|
-
return side_roughness_model[1].
|
|
484
|
+
return Value(side_roughness_model[1], self._pedb.active_cell)
|
|
484
485
|
return 0.0
|
|
485
486
|
except:
|
|
486
487
|
return 0.0
|
|
@@ -490,7 +491,7 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
490
491
|
try:
|
|
491
492
|
side_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.SIDE)
|
|
492
493
|
if len(side_roughness_model) == 2:
|
|
493
|
-
side_roughness_model[1] =
|
|
494
|
+
side_roughness_model[1] = Value(value)
|
|
494
495
|
self.set_roughness_model(side_roughness_model, GrpcRoughnessRegion.SIDE)
|
|
495
496
|
except:
|
|
496
497
|
pass
|
|
@@ -506,19 +507,19 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
506
507
|
"""
|
|
507
508
|
try:
|
|
508
509
|
top_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.TOP)
|
|
509
|
-
if isinstance(top_roughness_model,
|
|
510
|
-
return top_roughness_model.
|
|
510
|
+
if isinstance(top_roughness_model, Value):
|
|
511
|
+
return Value(top_roughness_model, self._pedb.active_cell)
|
|
511
512
|
else:
|
|
512
|
-
return 0.0
|
|
513
|
+
return Value(0.0)
|
|
513
514
|
except:
|
|
514
|
-
return 0.0
|
|
515
|
+
return Value(0.0)
|
|
515
516
|
|
|
516
517
|
@top_groisse_roughness.setter
|
|
517
518
|
def top_groisse_roughness(self, value):
|
|
518
519
|
try:
|
|
519
520
|
top_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.TOP)
|
|
520
|
-
if isinstance(top_roughness_model,
|
|
521
|
-
top_roughness_model =
|
|
521
|
+
if isinstance(top_roughness_model, Value):
|
|
522
|
+
top_roughness_model = Value(value)
|
|
522
523
|
self.set_roughness_model(top_roughness_model, GrpcRoughnessRegion.TOP)
|
|
523
524
|
except:
|
|
524
525
|
pass
|
|
@@ -534,19 +535,19 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
534
535
|
"""
|
|
535
536
|
try:
|
|
536
537
|
bottom_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.BOTTOM)
|
|
537
|
-
if isinstance(bottom_roughness_model,
|
|
538
|
-
return bottom_roughness_model.
|
|
538
|
+
if isinstance(bottom_roughness_model, Value):
|
|
539
|
+
return Value(bottom_roughness_model, self._pedb.active_cell)
|
|
539
540
|
else:
|
|
540
|
-
return 0.0
|
|
541
|
+
return Value(0.0)
|
|
541
542
|
except:
|
|
542
|
-
return 0.0
|
|
543
|
+
return Value(0.0)
|
|
543
544
|
|
|
544
545
|
@bottom_groisse_roughness.setter
|
|
545
546
|
def bottom_groisse_roughness(self, value):
|
|
546
547
|
try:
|
|
547
548
|
bottom_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.BOTTOM)
|
|
548
|
-
if isinstance(bottom_roughness_model,
|
|
549
|
-
bottom_roughness_model =
|
|
549
|
+
if isinstance(bottom_roughness_model, Value):
|
|
550
|
+
bottom_roughness_model = Value(value)
|
|
550
551
|
self.set_roughness_model(bottom_roughness_model, GrpcRoughnessRegion.BOTTOM)
|
|
551
552
|
except:
|
|
552
553
|
pass
|
|
@@ -562,19 +563,19 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
562
563
|
"""
|
|
563
564
|
try:
|
|
564
565
|
side_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.SIDE)
|
|
565
|
-
if isinstance(side_roughness_model,
|
|
566
|
-
return side_roughness_model.
|
|
566
|
+
if isinstance(side_roughness_model, Value):
|
|
567
|
+
return Value(side_roughness_model, self._pedb.active_cell)
|
|
567
568
|
else:
|
|
568
|
-
return 0.0
|
|
569
|
+
return Value(0.0)
|
|
569
570
|
except:
|
|
570
|
-
return 0.0
|
|
571
|
+
return Value(0.0)
|
|
571
572
|
|
|
572
573
|
@side_groisse_roughness.setter
|
|
573
574
|
def side_groisse_roughness(self, value):
|
|
574
575
|
try:
|
|
575
576
|
side_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.BOTTOM)
|
|
576
|
-
if isinstance(side_roughness_model,
|
|
577
|
-
side_roughness_model =
|
|
577
|
+
if isinstance(side_roughness_model, Value):
|
|
578
|
+
side_roughness_model = Value(value)
|
|
578
579
|
self.set_roughness_model(side_roughness_model, GrpcRoughnessRegion.BOTTOM)
|
|
579
580
|
except Exception as e:
|
|
580
581
|
self._pedb.logger.error(e)
|
|
@@ -619,9 +620,9 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
619
620
|
self.roughness_enabled = True
|
|
620
621
|
for r in regions:
|
|
621
622
|
if model_type == "huray":
|
|
622
|
-
model = (
|
|
623
|
+
model = (Value(huray_radius), Value(huray_surface_ratio))
|
|
623
624
|
else:
|
|
624
|
-
model =
|
|
625
|
+
model = Value(groisse_roughness)
|
|
625
626
|
self.set_roughness_model(model, r)
|
|
626
627
|
if [
|
|
627
628
|
self.get_roughness_model(GrpcRoughnessRegion.TOP),
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"""
|
|
24
24
|
This module contains these classes: `EdbLayout` and `Shape`.
|
|
25
25
|
"""
|
|
26
|
-
from typing import Union
|
|
26
|
+
from typing import Dict, Union
|
|
27
27
|
|
|
28
28
|
from ansys.edb.core.layout.layout import Layout as GrpcLayout
|
|
29
29
|
import ansys.edb.core.primitive.bondwire
|
|
@@ -62,6 +62,8 @@ class Layout(GrpcLayout):
|
|
|
62
62
|
def __init__(self, pedb):
|
|
63
63
|
super().__init__(pedb.active_cell._Cell__stub.GetLayout(pedb.active_cell.msg))
|
|
64
64
|
self._pedb = pedb
|
|
65
|
+
self.__primitives = []
|
|
66
|
+
self.__padstack_instances = {}
|
|
65
67
|
|
|
66
68
|
@property
|
|
67
69
|
def cell(self):
|
|
@@ -73,21 +75,22 @@ class Layout(GrpcLayout):
|
|
|
73
75
|
|
|
74
76
|
@property
|
|
75
77
|
def primitives(self) -> list[any]:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
primitives = super().primitives
|
|
79
|
+
self.__primitives = []
|
|
80
|
+
for prim in primitives:
|
|
78
81
|
if isinstance(prim, ansys.edb.core.primitive.path.Path):
|
|
79
|
-
|
|
82
|
+
self.__primitives.append(Path(self._pedb, prim))
|
|
80
83
|
elif isinstance(prim, ansys.edb.core.primitive.polygon.Polygon):
|
|
81
|
-
|
|
84
|
+
self.__primitives.append(Polygon(self._pedb, prim))
|
|
82
85
|
elif isinstance(prim, ansys.edb.core.primitive.padstack_instance.PadstackInstance):
|
|
83
|
-
|
|
86
|
+
self.__primitives.append(PadstackInstance(self._pedb, prim))
|
|
84
87
|
elif isinstance(prim, ansys.edb.core.primitive.rectangle.Rectangle):
|
|
85
|
-
|
|
88
|
+
self.__primitives.append(Rectangle(self._pedb, prim))
|
|
86
89
|
elif isinstance(prim, ansys.edb.core.primitive.circle.Circle):
|
|
87
|
-
|
|
90
|
+
self.__primitives.append(Circle(self._pedb, prim))
|
|
88
91
|
elif isinstance(prim, ansys.edb.core.primitive.bondwire.Bondwire):
|
|
89
|
-
|
|
90
|
-
return
|
|
92
|
+
self.__primitives.append(Bondwire(self._pedb, prim))
|
|
93
|
+
return self.__primitives
|
|
91
94
|
|
|
92
95
|
@property
|
|
93
96
|
def terminals(self) -> list[any]:
|
|
@@ -195,11 +198,12 @@ class Layout(GrpcLayout):
|
|
|
195
198
|
return [DifferentialPair(self._pedb, i) for i in self._pedb.active_cell.layout.differential_pairs]
|
|
196
199
|
|
|
197
200
|
@property
|
|
198
|
-
def padstack_instances(self) ->
|
|
201
|
+
def padstack_instances(self) -> Dict[int, PadstackInstance]:
|
|
199
202
|
"""Get all padstack instances in a list."""
|
|
200
|
-
|
|
203
|
+
pad_stack_inst = super().padstack_instances
|
|
204
|
+
self.__padstack_instances = {i.edb_uid: PadstackInstance(self._pedb, i) for i in pad_stack_inst}
|
|
205
|
+
return self.__padstack_instances
|
|
201
206
|
|
|
202
|
-
#
|
|
203
207
|
@property
|
|
204
208
|
def voltage_regulators(self) -> list[VoltageRegulator]:
|
|
205
209
|
"""Voltage regulators.
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
from ansys.edb.core.layout.voltage_regulator import (
|
|
24
24
|
VoltageRegulator as GrpcVoltageRegulator,
|
|
25
25
|
)
|
|
26
|
-
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
27
26
|
|
|
28
27
|
from pyedb.grpc.database.primitive.padstack_instance import PadstackInstance
|
|
28
|
+
from pyedb.grpc.database.utility.value import Value
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
class VoltageRegulator(GrpcVoltageRegulator):
|
|
@@ -70,11 +70,11 @@ class VoltageRegulator(GrpcVoltageRegulator):
|
|
|
70
70
|
float
|
|
71
71
|
Current value.
|
|
72
72
|
"""
|
|
73
|
-
return self.load_regulator_current
|
|
73
|
+
return Value(self.load_regulator_current)
|
|
74
74
|
|
|
75
75
|
@load_regulator_current.setter
|
|
76
76
|
def load_regulator_current(self, value):
|
|
77
|
-
self.load_regulation_percent =
|
|
77
|
+
self.load_regulation_percent = Value(value)
|
|
78
78
|
|
|
79
79
|
@property
|
|
80
80
|
def load_regulation_percent(self) -> float:
|
|
@@ -85,11 +85,11 @@ class VoltageRegulator(GrpcVoltageRegulator):
|
|
|
85
85
|
float
|
|
86
86
|
Percent value.
|
|
87
87
|
"""
|
|
88
|
-
return self.load_regulation_percent
|
|
88
|
+
return Value(self.load_regulation_percent)
|
|
89
89
|
|
|
90
90
|
@load_regulation_percent.setter
|
|
91
91
|
def load_regulation_percent(self, value):
|
|
92
|
-
self.load_regulation_percent =
|
|
92
|
+
self.load_regulation_percent = Value(value)
|
|
93
93
|
|
|
94
94
|
@property
|
|
95
95
|
def negative_remote_sense_pin(self) -> PadstackInstance:
|
|
@@ -142,8 +142,8 @@ class VoltageRegulator(GrpcVoltageRegulator):
|
|
|
142
142
|
float
|
|
143
143
|
Voltage value.
|
|
144
144
|
"""
|
|
145
|
-
return self.voltage
|
|
145
|
+
return Value(self.voltage)
|
|
146
146
|
|
|
147
147
|
@voltage.setter
|
|
148
148
|
def voltage(self, value):
|
|
149
|
-
self.voltage =
|
|
149
|
+
self.voltage = Value(value)
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
23
|
import re
|
|
24
|
+
from typing import Any, List, Optional, Union
|
|
24
25
|
|
|
25
26
|
from ansys.edb.core.database import ProductIdType as GrpcProductIdType
|
|
26
27
|
|
|
@@ -33,11 +34,11 @@ from pyedb.grpc.database.primitive.padstack_instance import PadstackInstance
|
|
|
33
34
|
class LayoutValidation:
|
|
34
35
|
"""Manages all layout validation capabilities"""
|
|
35
36
|
|
|
36
|
-
def __init__(self, pedb):
|
|
37
|
+
def __init__(self, pedb: Any) -> None:
|
|
37
38
|
self._pedb = pedb
|
|
38
39
|
self._layout_instance = self._pedb.layout_instance
|
|
39
40
|
|
|
40
|
-
def dc_shorts(self, net_list=None, fix=False) ->
|
|
41
|
+
def dc_shorts(self, net_list: Optional[Union[str, List[str]]] = None, fix: bool = False) -> List[List[str]]:
|
|
41
42
|
"""Find DC shorts on layout.
|
|
42
43
|
|
|
43
44
|
Parameters
|
|
@@ -127,12 +128,12 @@ class LayoutValidation:
|
|
|
127
128
|
|
|
128
129
|
def disjoint_nets(
|
|
129
130
|
self,
|
|
130
|
-
net_list=None,
|
|
131
|
-
keep_only_main_net=False,
|
|
132
|
-
clean_disjoints_less_than=0.0,
|
|
133
|
-
order_by_area=False,
|
|
134
|
-
keep_disjoint_pins=False,
|
|
135
|
-
) ->
|
|
131
|
+
net_list: Optional[Union[str, List[str]]] = None,
|
|
132
|
+
keep_only_main_net: bool = False,
|
|
133
|
+
clean_disjoints_less_than: float = 0.0,
|
|
134
|
+
order_by_area: bool = False,
|
|
135
|
+
keep_disjoint_pins: bool = False,
|
|
136
|
+
) -> List[str]:
|
|
136
137
|
"""Find and fix disjoint nets from a given netlist.
|
|
137
138
|
|
|
138
139
|
Parameters
|
|
@@ -274,7 +275,7 @@ class LayoutValidation:
|
|
|
274
275
|
|
|
275
276
|
return new_nets
|
|
276
277
|
|
|
277
|
-
def fix_self_intersections(self, net_list=None) -> bool:
|
|
278
|
+
def fix_self_intersections(self, net_list: Optional[Union[str, List[str]]] = None) -> bool:
|
|
278
279
|
"""Find and fix self intersections from a given netlist.
|
|
279
280
|
|
|
280
281
|
Parameters
|
|
@@ -309,7 +310,7 @@ class LayoutValidation:
|
|
|
309
310
|
self._pedb.logger.info("Self-intersection not found.")
|
|
310
311
|
return True
|
|
311
312
|
|
|
312
|
-
def illegal_net_names(self, fix=False):
|
|
313
|
+
def illegal_net_names(self, fix: bool = False) -> None:
|
|
313
314
|
"""Find and fix illegal net names.
|
|
314
315
|
|
|
315
316
|
Examples
|
|
@@ -333,10 +334,10 @@ class LayoutValidation:
|
|
|
333
334
|
new_name = re.sub(pattern, "_", net)
|
|
334
335
|
val.name = new_name
|
|
335
336
|
|
|
336
|
-
self._pedb.
|
|
337
|
+
self._pedb.logger.info("Found {} illegal net names.".format(len(renamed_nets)))
|
|
337
338
|
return
|
|
338
339
|
|
|
339
|
-
def illegal_rlc_values(self, fix=False) ->
|
|
340
|
+
def illegal_rlc_values(self, fix: bool = False) -> List[str]:
|
|
340
341
|
"""Find and fix RLC illegal values.
|
|
341
342
|
|
|
342
343
|
Examples
|
|
@@ -357,10 +358,10 @@ class LayoutValidation:
|
|
|
357
358
|
temp.append(k)
|
|
358
359
|
if fix:
|
|
359
360
|
v.rlc_values = [0, 1, 0]
|
|
360
|
-
self._pedb.
|
|
361
|
+
self._pedb.logger.info(f"Found {len(temp)} inductors have no value.")
|
|
361
362
|
return temp
|
|
362
363
|
|
|
363
|
-
def padstacks_no_name(self, fix=False):
|
|
364
|
+
def padstacks_no_name(self, fix: bool = False) -> None:
|
|
364
365
|
"""Identify and fix padstacks without names.
|
|
365
366
|
|
|
366
367
|
Examples
|
|
@@ -388,4 +389,4 @@ class LayoutValidation:
|
|
|
388
389
|
obj.set_product_property(
|
|
389
390
|
GrpcProductIdType.DESIGNER, 11, f"{obj.component.name}-{obj.component_pin}"
|
|
390
391
|
)
|
|
391
|
-
self._pedb.
|
|
392
|
+
self._pedb.logger.info(f"Found {counts}/{len(pds)} padstacks have no name.")
|