pyedb 0.49.0__py3-none-any.whl → 0.50.1__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/dotnet/database/cell/hierarchy/component.py +6 -6
- pyedb/dotnet/database/components.py +3 -3
- pyedb/dotnet/database/edb_data/padstacks_data.py +13 -0
- pyedb/dotnet/database/edb_data/primitives_data.py +3 -3
- pyedb/dotnet/database/edb_data/variables.py +3 -3
- pyedb/dotnet/database/materials.py +16 -16
- pyedb/dotnet/database/modeler.py +38 -4
- pyedb/dotnet/database/sim_setup_data/data/settings.py +28 -0
- pyedb/dotnet/database/stackup.py +1 -0
- pyedb/dotnet/database/utilities/hfss_simulation_setup.py +5 -6
- 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 +537 -686
- pyedb/grpc/database/control_file.py +458 -149
- pyedb/grpc/database/definition/component_def.py +17 -14
- pyedb/grpc/database/definition/materials.py +60 -60
- pyedb/grpc/database/definition/package_def.py +8 -8
- pyedb/grpc/database/definition/padstack_def.py +31 -33
- pyedb/grpc/database/definitions.py +6 -4
- 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 +399 -397
- pyedb/grpc/database/hierarchy/component.py +60 -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 +144 -44
- pyedb/grpc/database/layout/layout.py +12 -12
- pyedb/grpc/database/layout/voltage_regulator.py +8 -8
- pyedb/grpc/database/layout_validation.py +5 -5
- 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 +139 -122
- pyedb/grpc/database/padstacks.py +174 -190
- pyedb/grpc/database/ports/ports.py +23 -17
- pyedb/grpc/database/primitive/padstack_instance.py +45 -30
- pyedb/grpc/database/primitive/path.py +7 -7
- 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 +166 -214
- pyedb/grpc/database/source_excitations.py +156 -0
- pyedb/grpc/database/stackup.py +415 -316
- 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 +524 -764
- {pyedb-0.49.0.dist-info → pyedb-0.50.1.dist-info}/METADATA +1 -1
- {pyedb-0.49.0.dist-info → pyedb-0.50.1.dist-info}/RECORD +77 -77
- pyedb/extensions/pre_layout_design_toolkit/via_design.py +0 -1151
- pyedb/grpc/database/utility/simulation_configuration.py +0 -3305
- {pyedb-0.49.0.dist-info → pyedb-0.50.1.dist-info}/LICENSE +0 -0
- {pyedb-0.49.0.dist-info → pyedb-0.50.1.dist-info}/WHEEL +0 -0
pyedb/grpc/database/padstacks.py
CHANGED
|
@@ -55,7 +55,7 @@ from pyedb.modeler.geometry_operators import GeometryOperators
|
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
class Padstacks(object):
|
|
58
|
-
"""Manages EDB methods for
|
|
58
|
+
"""Manages EDB methods for padstacks accessible from `Edb.padstacks` property.
|
|
59
59
|
|
|
60
60
|
Examples
|
|
61
61
|
--------
|
|
@@ -65,16 +65,18 @@ class Padstacks(object):
|
|
|
65
65
|
"""
|
|
66
66
|
|
|
67
67
|
def __getitem__(self, name):
|
|
68
|
-
"""Get
|
|
68
|
+
"""Get a padstack definition or instance from the EDB project.
|
|
69
69
|
|
|
70
70
|
Parameters
|
|
71
71
|
----------
|
|
72
72
|
name : str, int
|
|
73
|
+
Name or ID of the padstack definition or instance.
|
|
73
74
|
|
|
74
75
|
Returns
|
|
75
76
|
-------
|
|
76
|
-
:class:`pyedb.dotnet.database.
|
|
77
|
-
|
|
77
|
+
:class:`pyedb.dotnet.database.definition.padstack_def.PadstackDef` or
|
|
78
|
+
:class:`pyedb.dotnet.database.primitive.padstack_instance.PadstackInstance`
|
|
79
|
+
Requested padstack definition or instance. Returns ``None`` if not found.
|
|
78
80
|
"""
|
|
79
81
|
if isinstance(name, int) and name in self.instances:
|
|
80
82
|
return self.instances(name)
|
|
@@ -188,9 +190,8 @@ class Padstacks(object):
|
|
|
188
190
|
|
|
189
191
|
Returns
|
|
190
192
|
-------
|
|
191
|
-
dict[str, :class:`pyedb.
|
|
192
|
-
|
|
193
|
-
|
|
193
|
+
dict[str, :class:`pyedb.grpc.database.definition.padstack_def.PadstackDef`]
|
|
194
|
+
Dictionary of padstack definitions with definition names as keys.
|
|
194
195
|
"""
|
|
195
196
|
if len(self._definitions) == len(self.db.padstack_defs):
|
|
196
197
|
return self._definitions
|
|
@@ -202,13 +203,12 @@ class Padstacks(object):
|
|
|
202
203
|
|
|
203
204
|
@property
|
|
204
205
|
def instances(self):
|
|
205
|
-
"""
|
|
206
|
+
"""All padstack instances (vias and pins) in the layout.
|
|
206
207
|
|
|
207
208
|
Returns
|
|
208
209
|
-------
|
|
209
|
-
dict[int, :class:`
|
|
210
|
-
|
|
211
|
-
|
|
210
|
+
dict[int, :class:`pyedb.grpc.database.primitive.padstack_instance.PadstackInstance`]
|
|
211
|
+
Dictionary of padstack instances with database IDs as keys.
|
|
212
212
|
"""
|
|
213
213
|
pad_stack_inst = self._pedb.layout.padstack_instances
|
|
214
214
|
if len(self._instances) == len(pad_stack_inst):
|
|
@@ -218,13 +218,12 @@ class Padstacks(object):
|
|
|
218
218
|
|
|
219
219
|
@property
|
|
220
220
|
def instances_by_name(self):
|
|
221
|
-
"""
|
|
221
|
+
"""All padstack instances (vias and pins) indexed by name.
|
|
222
222
|
|
|
223
223
|
Returns
|
|
224
224
|
-------
|
|
225
|
-
dict[str, :class:`
|
|
226
|
-
|
|
227
|
-
|
|
225
|
+
dict[str, :class:`pyedb.grpc.database.primitive.padstack_instance.PadstackInstance`]
|
|
226
|
+
Dictionary of padstack instances with names as keys.
|
|
228
227
|
"""
|
|
229
228
|
padstack_instances = {}
|
|
230
229
|
for _, edb_padstack_instance in self.instances.items():
|
|
@@ -233,28 +232,28 @@ class Padstacks(object):
|
|
|
233
232
|
return padstack_instances
|
|
234
233
|
|
|
235
234
|
def find_instance_by_id(self, value: int):
|
|
236
|
-
"""Find a padstack instance by database
|
|
235
|
+
"""Find a padstack instance by database ID.
|
|
237
236
|
|
|
238
237
|
Parameters
|
|
239
238
|
----------
|
|
240
239
|
value : int
|
|
240
|
+
Database ID of the padstack instance.
|
|
241
|
+
|
|
242
|
+
Returns
|
|
243
|
+
-------
|
|
244
|
+
:class:`pyedb.grpc.database.primitive.padstack_instance.PadstackInstance` or None
|
|
245
|
+
Padstack instance if found, otherwise ``None``.
|
|
241
246
|
"""
|
|
242
247
|
return self._pedb.modeler.find_object_by_id(value)
|
|
243
248
|
|
|
244
249
|
@property
|
|
245
250
|
def pins(self):
|
|
246
|
-
"""
|
|
251
|
+
"""All pin instances belonging to components.
|
|
247
252
|
|
|
248
253
|
Returns
|
|
249
254
|
-------
|
|
250
|
-
|
|
251
|
-
Dictionary of
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
Examples
|
|
255
|
-
--------
|
|
256
|
-
>>> edbapp = dotnet.Edb("myproject.aedb")
|
|
257
|
-
>>> pin_net_name = edbapp.pins[424968329].netname
|
|
255
|
+
dict[int, :class:`pyedb.grpc.database.primitive.padstack_instance.PadstackInstance`]
|
|
256
|
+
Dictionary of pin instances with database IDs as keys.
|
|
258
257
|
"""
|
|
259
258
|
pins = {}
|
|
260
259
|
for instancename, instance in self.instances.items():
|
|
@@ -264,18 +263,12 @@ class Padstacks(object):
|
|
|
264
263
|
|
|
265
264
|
@property
|
|
266
265
|
def vias(self):
|
|
267
|
-
"""
|
|
266
|
+
"""All via instances not belonging to components.
|
|
268
267
|
|
|
269
268
|
Returns
|
|
270
269
|
-------
|
|
271
|
-
|
|
272
|
-
Dictionary of
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
Examples
|
|
276
|
-
--------
|
|
277
|
-
>>> edbapp = dotnet.Edb("myproject.aedb")
|
|
278
|
-
>>> pin_net_name = edbapp.pins[424968329].netname
|
|
270
|
+
dict[int, :class:`pyedb.grpc.database.primitive.padstack_instance.PadstackInstance`]
|
|
271
|
+
Dictionary of via instances with database IDs as keys.
|
|
279
272
|
"""
|
|
280
273
|
pnames = list(self.pins.keys())
|
|
281
274
|
vias = {i: j for i, j in self.instances.items() if i not in pnames}
|
|
@@ -412,17 +405,12 @@ class Padstacks(object):
|
|
|
412
405
|
Parameters
|
|
413
406
|
----------
|
|
414
407
|
net_names : str, list
|
|
415
|
-
Names of the nets
|
|
408
|
+
Names of the nets whose padstack instances should be deleted.
|
|
416
409
|
|
|
417
410
|
Returns
|
|
418
411
|
-------
|
|
419
412
|
bool
|
|
420
413
|
``True`` when successful, ``False`` when failed.
|
|
421
|
-
|
|
422
|
-
References
|
|
423
|
-
----------
|
|
424
|
-
|
|
425
|
-
>>> Edb.padstacks.delete_padstack_instances(net_names=["GND"])
|
|
426
414
|
"""
|
|
427
415
|
if not isinstance(net_names, list): # pragma: no cover
|
|
428
416
|
net_names = [net_names]
|
|
@@ -434,23 +422,23 @@ class Padstacks(object):
|
|
|
434
422
|
return True
|
|
435
423
|
|
|
436
424
|
def set_solderball(self, padstackInst, sballLayer_name, isTopPlaced=True, ballDiam=100e-6):
|
|
437
|
-
"""Set solderball for
|
|
425
|
+
"""Set solderball for a padstack instance.
|
|
438
426
|
|
|
439
427
|
Parameters
|
|
440
428
|
----------
|
|
441
|
-
padstackInst :
|
|
442
|
-
Padstack instance
|
|
443
|
-
sballLayer_name : str
|
|
444
|
-
Name of the layer where the solder ball is placed.
|
|
445
|
-
isTopPlaced : bool, optional
|
|
446
|
-
|
|
447
|
-
ballDiam :
|
|
448
|
-
Solder ball diameter
|
|
429
|
+
padstackInst : int or :class:`pyedb.grpc.database.primitive.padstack_instance.PadstackInstance`
|
|
430
|
+
Padstack instance ID or object.
|
|
431
|
+
sballLayer_name : str
|
|
432
|
+
Name of the layer where the solder ball is placed.
|
|
433
|
+
isTopPlaced : bool, optional
|
|
434
|
+
Whether the solder ball is placed on top of the layer stackup. Default is ``True``.
|
|
435
|
+
ballDiam : float, optional
|
|
436
|
+
Solder ball diameter in meters. Default is ``100e-6`` (100 um).
|
|
449
437
|
|
|
450
438
|
Returns
|
|
451
439
|
-------
|
|
452
440
|
bool
|
|
453
|
-
|
|
441
|
+
``True`` when successful, ``False`` when failed.
|
|
454
442
|
"""
|
|
455
443
|
if isinstance(padstackInst, int):
|
|
456
444
|
psdef = self.definitions[self.instances[padstackInst].padstack_definition].edb_padstack
|
|
@@ -511,21 +499,19 @@ class Padstacks(object):
|
|
|
511
499
|
)
|
|
512
500
|
|
|
513
501
|
def get_pin_from_component_and_net(self, refdes=None, netname=None):
|
|
514
|
-
"""Retrieve pins
|
|
502
|
+
"""Retrieve pins by component reference designator and net name.
|
|
515
503
|
|
|
516
504
|
Parameters
|
|
517
505
|
----------
|
|
518
506
|
refdes : str, optional
|
|
519
|
-
|
|
520
|
-
netname : str optional
|
|
521
|
-
|
|
507
|
+
Component reference designator.
|
|
508
|
+
netname : str, optional
|
|
509
|
+
Net name.
|
|
522
510
|
|
|
523
511
|
Returns
|
|
524
512
|
-------
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
``False`` is returned if the net does not belong to the component.
|
|
528
|
-
|
|
513
|
+
list[:class:`pyedb.grpc.database.primitive.padstack_instance.PadstackInstance`]
|
|
514
|
+
List of matching pin instances.
|
|
529
515
|
"""
|
|
530
516
|
pinlist = []
|
|
531
517
|
if refdes:
|
|
@@ -573,21 +559,26 @@ class Padstacks(object):
|
|
|
573
559
|
return self.get_pin_from_component_and_net(refdes=refdes, netname=netname)
|
|
574
560
|
|
|
575
561
|
def get_pad_parameters(self, pin, layername, pad_type="regular_pad"):
|
|
576
|
-
"""Get
|
|
562
|
+
"""Get pad parameters for a pin on a specific layer.
|
|
577
563
|
|
|
578
564
|
Parameters
|
|
579
565
|
----------
|
|
580
|
-
pin :
|
|
581
|
-
|
|
566
|
+
pin : :class:`pyedb.grpc.database.primitive.padstack_instance.PadstackInstance`
|
|
567
|
+
Padstack instance.
|
|
582
568
|
layername : str
|
|
583
|
-
Layer
|
|
584
|
-
pad_type : str
|
|
585
|
-
Pad
|
|
569
|
+
Layer name.
|
|
570
|
+
pad_type : str, optional
|
|
571
|
+
Pad type ("regular_pad", "anti_pad", "thermal_pad"). Default is ``"regular_pad"``.
|
|
586
572
|
|
|
587
573
|
Returns
|
|
588
574
|
-------
|
|
589
575
|
tuple
|
|
590
|
-
|
|
576
|
+
(geometry_type, parameters, offset_x, offset_y, rotation) where:
|
|
577
|
+
- geometry_type : str
|
|
578
|
+
- parameters : list[float] or list[list[float]]
|
|
579
|
+
- offset_x : float
|
|
580
|
+
- offset_y : float
|
|
581
|
+
- rotation : float
|
|
591
582
|
"""
|
|
592
583
|
if pad_type == "regular_pad":
|
|
593
584
|
pad_type = GrpcPadType.REGULAR_PAD
|
|
@@ -620,17 +611,17 @@ class Padstacks(object):
|
|
|
620
611
|
return 0, [0], 0, 0, 0
|
|
621
612
|
|
|
622
613
|
def set_all_antipad_value(self, value):
|
|
623
|
-
"""Set
|
|
614
|
+
"""Set anti-pad value for all padstack definitions.
|
|
624
615
|
|
|
625
616
|
Parameters
|
|
626
617
|
----------
|
|
627
|
-
value : float
|
|
628
|
-
Anti-pad value.
|
|
618
|
+
value : float or str
|
|
619
|
+
Anti-pad value with units (e.g., "0.2mm").
|
|
629
620
|
|
|
630
621
|
Returns
|
|
631
622
|
-------
|
|
632
623
|
bool
|
|
633
|
-
``True`` when successful, ``False``
|
|
624
|
+
``True`` when successful, ``False`` when failed.
|
|
634
625
|
"""
|
|
635
626
|
if self.definitions:
|
|
636
627
|
all_succeed = True
|
|
@@ -671,21 +662,19 @@ class Padstacks(object):
|
|
|
671
662
|
return all_succeed
|
|
672
663
|
|
|
673
664
|
def check_and_fix_via_plating(self, minimum_value_to_replace=0.0, default_plating_ratio=0.2):
|
|
674
|
-
"""Check
|
|
675
|
-
plating ratio.
|
|
665
|
+
"""Check and fix via plating ratios below a minimum value.
|
|
676
666
|
|
|
677
667
|
Parameters
|
|
678
668
|
----------
|
|
679
|
-
minimum_value_to_replace : float
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
Default value to use for plating ratio. The default value is ``0.2``.
|
|
669
|
+
minimum_value_to_replace : float, optional
|
|
670
|
+
Minimum plating ratio threshold. Default is ``0.0``.
|
|
671
|
+
default_plating_ratio : float, optional
|
|
672
|
+
Default plating ratio to apply. Default is ``0.2``.
|
|
684
673
|
|
|
685
674
|
Returns
|
|
686
675
|
-------
|
|
687
676
|
bool
|
|
688
|
-
``True`` when successful, ``False``
|
|
677
|
+
``True`` when successful, ``False`` when failed.
|
|
689
678
|
"""
|
|
690
679
|
for padstack_def in list(self.definitions.values()):
|
|
691
680
|
if padstack_def.hole_plating_ratio <= minimum_value_to_replace:
|
|
@@ -696,18 +685,17 @@ class Padstacks(object):
|
|
|
696
685
|
return True
|
|
697
686
|
|
|
698
687
|
def get_via_instance_from_net(self, net_list=None):
|
|
699
|
-
"""Get
|
|
688
|
+
"""Get via instances by net names.
|
|
700
689
|
|
|
701
690
|
Parameters
|
|
702
691
|
----------
|
|
703
|
-
net_list : str or list
|
|
704
|
-
|
|
705
|
-
return an all vias list.
|
|
692
|
+
net_list : str or list, optional
|
|
693
|
+
Net name(s) for filtering. Returns all vias if ``None``.
|
|
706
694
|
|
|
707
695
|
Returns
|
|
708
696
|
-------
|
|
709
|
-
list
|
|
710
|
-
List of
|
|
697
|
+
list[:class:`pyedb.grpc.database.primitive.padstack_instance.PadstackInstance`]
|
|
698
|
+
List of via instances.
|
|
711
699
|
"""
|
|
712
700
|
if net_list and not isinstance(net_list, list):
|
|
713
701
|
net_list = [net_list]
|
|
@@ -750,61 +738,66 @@ class Padstacks(object):
|
|
|
750
738
|
anti_pad_y_size="600um",
|
|
751
739
|
hole_range="upper_pad_to_lower_pad",
|
|
752
740
|
):
|
|
753
|
-
"""Create a padstack.
|
|
741
|
+
"""Create a padstack definition.
|
|
754
742
|
|
|
755
743
|
Parameters
|
|
756
744
|
----------
|
|
757
745
|
padstackname : str, optional
|
|
758
|
-
Name of the padstack.
|
|
746
|
+
Name of the padstack definition.
|
|
759
747
|
holediam : str, optional
|
|
760
|
-
|
|
748
|
+
Hole diameter with units. Default is ``"300um"``.
|
|
761
749
|
paddiam : str, optional
|
|
762
|
-
|
|
750
|
+
Pad diameter with units. Default is ``"400um"``.
|
|
763
751
|
antipaddiam : str, optional
|
|
764
|
-
|
|
752
|
+
Anti-pad diameter with units. Default is ``"600um"``.
|
|
765
753
|
pad_shape : str, optional
|
|
766
|
-
|
|
754
|
+
Pad geometry type ("Circle", "Rectangle", "Polygon"). Default is ``"Circle"``.
|
|
767
755
|
antipad_shape : str, optional
|
|
768
|
-
|
|
769
|
-
``"Bullet"``.
|
|
756
|
+
Anti-pad geometry type ("Circle", "Rectangle", "Bullet", "Polygon"). Default is ``"Circle"``.
|
|
770
757
|
x_size : str, optional
|
|
771
|
-
|
|
758
|
+
X-size for rectangular/bullet shapes. Default is ``"600um"``.
|
|
772
759
|
y_size : str, optional
|
|
773
|
-
|
|
774
|
-
corner_radius :
|
|
775
|
-
|
|
760
|
+
Y-size for rectangular/bullet shapes. Default is ``"600um"``.
|
|
761
|
+
corner_radius : str, optional
|
|
762
|
+
Corner radius for bullet shapes. Default is ``"300um"``.
|
|
776
763
|
offset_x : str, optional
|
|
777
|
-
X
|
|
764
|
+
X-offset for anti-pad. Default is ``"0.0"``.
|
|
778
765
|
offset_y : str, optional
|
|
779
|
-
Y
|
|
766
|
+
Y-offset for anti-pad. Default is ``"0.0"``.
|
|
780
767
|
rotation : str, optional
|
|
781
|
-
|
|
768
|
+
Rotation for anti-pad in degrees. Default is ``"0.0"``.
|
|
782
769
|
has_hole : bool, optional
|
|
783
|
-
Whether
|
|
770
|
+
Whether the padstack has a hole. Default is ``True``.
|
|
784
771
|
pad_offset_x : str, optional
|
|
785
|
-
|
|
772
|
+
X-offset for pad. Default is ``"0.0"``.
|
|
786
773
|
pad_offset_y : str, optional
|
|
787
|
-
|
|
774
|
+
Y-offset for pad. Default is ``"0.0"``.
|
|
788
775
|
pad_rotation : str, optional
|
|
789
|
-
|
|
776
|
+
Rotation for pad in degrees. Default is ``"0.0"``.
|
|
777
|
+
pad_polygon : list or :class:`ansys.edb.core.geometry.PolygonData`, optional
|
|
778
|
+
Polygon points for custom pad shape.
|
|
779
|
+
antipad_polygon : list or :class:`ansys.edb.core.geometry.PolygonData`, optional
|
|
780
|
+
Polygon points for custom anti-pad shape.
|
|
781
|
+
polygon_hole : list or :class:`ansys.edb.core.geometry.PolygonData`, optional
|
|
782
|
+
Polygon points for custom hole shape.
|
|
790
783
|
start_layer : str, optional
|
|
791
|
-
|
|
784
|
+
Starting layer name.
|
|
792
785
|
stop_layer : str, optional
|
|
793
|
-
|
|
786
|
+
Ending layer name.
|
|
794
787
|
add_default_layer : bool, optional
|
|
795
|
-
|
|
788
|
+
Whether to add "Default" layer. Default is ``False``.
|
|
796
789
|
anti_pad_x_size : str, optional
|
|
797
|
-
|
|
790
|
+
Anti-pad X-size. Default is ``"600um"``.
|
|
798
791
|
anti_pad_y_size : str, optional
|
|
799
|
-
|
|
792
|
+
Anti-pad Y-size. Default is ``"600um"``.
|
|
800
793
|
hole_range : str, optional
|
|
801
|
-
|
|
802
|
-
|
|
794
|
+
Hole range type ("through", "begin_on_upper_pad", "end_on_lower_pad", "upper_pad_to_lower_pad").
|
|
795
|
+
Default is ``"upper_pad_to_lower_pad"``.
|
|
803
796
|
|
|
804
797
|
Returns
|
|
805
798
|
-------
|
|
806
799
|
str
|
|
807
|
-
Name of the padstack
|
|
800
|
+
Name of the created padstack definition.
|
|
808
801
|
"""
|
|
809
802
|
holediam = GrpcValue(holediam)
|
|
810
803
|
paddiam = GrpcValue(paddiam)
|
|
@@ -949,19 +942,19 @@ class Padstacks(object):
|
|
|
949
942
|
return False
|
|
950
943
|
|
|
951
944
|
def duplicate(self, target_padstack_name, new_padstack_name=""):
|
|
952
|
-
"""Duplicate a padstack.
|
|
945
|
+
"""Duplicate a padstack definition.
|
|
953
946
|
|
|
954
947
|
Parameters
|
|
955
948
|
----------
|
|
956
949
|
target_padstack_name : str
|
|
957
|
-
Name of the padstack to
|
|
950
|
+
Name of the padstack definition to duplicate.
|
|
958
951
|
new_padstack_name : str, optional
|
|
959
|
-
Name
|
|
952
|
+
Name for the new padstack definition.
|
|
960
953
|
|
|
961
954
|
Returns
|
|
962
955
|
-------
|
|
963
956
|
str
|
|
964
|
-
Name of the new padstack.
|
|
957
|
+
Name of the new padstack definition.
|
|
965
958
|
"""
|
|
966
959
|
new_padstack_definition_data = GrpcPadstackDefData(self.definitions[target_padstack_name].data.msg)
|
|
967
960
|
if not new_padstack_name:
|
|
@@ -982,33 +975,33 @@ class Padstacks(object):
|
|
|
982
975
|
solderlayer=None,
|
|
983
976
|
is_pin=False,
|
|
984
977
|
):
|
|
985
|
-
"""Place a
|
|
978
|
+
"""Place a padstack instance.
|
|
986
979
|
|
|
987
980
|
Parameters
|
|
988
981
|
----------
|
|
989
|
-
position : list
|
|
990
|
-
|
|
982
|
+
position : list[float, float]
|
|
983
|
+
[x, y] position for placement.
|
|
991
984
|
definition_name : str
|
|
992
|
-
|
|
985
|
+
Padstack definition name.
|
|
993
986
|
net_name : str, optional
|
|
994
|
-
|
|
987
|
+
Net name. Default is ``""``.
|
|
995
988
|
via_name : str, optional
|
|
996
|
-
|
|
989
|
+
Instance name. Default is ``""``.
|
|
997
990
|
rotation : float, optional
|
|
998
|
-
Rotation
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
The default is ``None``.
|
|
991
|
+
Rotation in degrees. Default is ``0.0``.
|
|
992
|
+
fromlayer : str, optional
|
|
993
|
+
Starting layer name.
|
|
994
|
+
tolayer : str, optional
|
|
995
|
+
Ending layer name.
|
|
996
|
+
solderlayer : str, optional
|
|
997
|
+
Solder ball layer name.
|
|
1006
998
|
is_pin : bool, optional
|
|
1007
|
-
Whether
|
|
999
|
+
Whether the instance is a pin. Default is ``False``.
|
|
1008
1000
|
|
|
1009
1001
|
Returns
|
|
1010
1002
|
-------
|
|
1011
|
-
:class:`
|
|
1003
|
+
:class:`pyedb.grpc.database.primitive.padstack_instance.PadstackInstance` or bool
|
|
1004
|
+
Created padstack instance or ``False`` if failed.
|
|
1012
1005
|
"""
|
|
1013
1006
|
padstack_def = None
|
|
1014
1007
|
for pad in list(self.definitions.keys()):
|
|
@@ -1060,19 +1053,19 @@ class Padstacks(object):
|
|
|
1060
1053
|
return False
|
|
1061
1054
|
|
|
1062
1055
|
def remove_pads_from_padstack(self, padstack_name, layer_name=None):
|
|
1063
|
-
"""Remove
|
|
1056
|
+
"""Remove pads from a padstack definition on specified layers.
|
|
1064
1057
|
|
|
1065
1058
|
Parameters
|
|
1066
1059
|
----------
|
|
1067
1060
|
padstack_name : str
|
|
1068
|
-
|
|
1069
|
-
layer_name : str, optional
|
|
1070
|
-
Layer name
|
|
1061
|
+
Padstack definition name.
|
|
1062
|
+
layer_name : str or list, optional
|
|
1063
|
+
Layer name(s). Applies to all layers if ``None``.
|
|
1071
1064
|
|
|
1072
1065
|
Returns
|
|
1073
1066
|
-------
|
|
1074
1067
|
bool
|
|
1075
|
-
``True``
|
|
1068
|
+
``True`` when successful, ``False`` when failed.
|
|
1076
1069
|
"""
|
|
1077
1070
|
pad_type = GrpcPadType.REGULAR_PAD
|
|
1078
1071
|
pad_geo = GrpcPadGeometryType.PADGEOMTYPE_CIRCLE
|
|
@@ -1111,40 +1104,39 @@ class Padstacks(object):
|
|
|
1111
1104
|
antipad_y_offset=0,
|
|
1112
1105
|
antipad_rotation=0,
|
|
1113
1106
|
):
|
|
1114
|
-
"""Set pad and
|
|
1107
|
+
"""Set pad and anti-pad properties for a padstack definition.
|
|
1115
1108
|
|
|
1116
1109
|
Parameters
|
|
1117
1110
|
----------
|
|
1118
1111
|
padstack_name : str
|
|
1119
|
-
|
|
1120
|
-
layer_name : str, optional
|
|
1121
|
-
|
|
1112
|
+
Padstack definition name.
|
|
1113
|
+
layer_name : str or list, optional
|
|
1114
|
+
Layer name(s). Applies to all layers if ``None``.
|
|
1122
1115
|
pad_shape : str, optional
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
Rotation of the pad. The default is ``"0"``.
|
|
1116
|
+
Pad geometry type ("Circle", "Square", "Rectangle", "Oval", "Bullet"). Default is ``"Circle"``.
|
|
1117
|
+
pad_params : float or list, optional
|
|
1118
|
+
Pad dimension(s). Default is ``0``.
|
|
1119
|
+
pad_x_offset : float, optional
|
|
1120
|
+
Pad X-offset. Default is ``0``.
|
|
1121
|
+
pad_y_offset : float, optional
|
|
1122
|
+
Pad Y-offset. Default is ``0``.
|
|
1123
|
+
pad_rotation : float, optional
|
|
1124
|
+
Pad rotation in degrees. Default is ``0``.
|
|
1133
1125
|
antipad_shape : str, optional
|
|
1134
|
-
|
|
1135
|
-
antipad_params :
|
|
1136
|
-
|
|
1137
|
-
antipad_x_offset :
|
|
1138
|
-
X
|
|
1139
|
-
antipad_y_offset :
|
|
1140
|
-
Y
|
|
1141
|
-
antipad_rotation :
|
|
1142
|
-
|
|
1126
|
+
Anti-pad geometry type ("Circle", "Square", "Rectangle", "Oval", "Bullet"). Default is ``"Circle"``.
|
|
1127
|
+
antipad_params : float or list, optional
|
|
1128
|
+
Anti-pad dimension(s). Default is ``0``.
|
|
1129
|
+
antipad_x_offset : float, optional
|
|
1130
|
+
Anti-pad X-offset. Default is ``0``.
|
|
1131
|
+
antipad_y_offset : float, optional
|
|
1132
|
+
Anti-pad Y-offset. Default is ``0``.
|
|
1133
|
+
antipad_rotation : float, optional
|
|
1134
|
+
Anti-pad rotation in degrees. Default is ``0``.
|
|
1143
1135
|
|
|
1144
1136
|
Returns
|
|
1145
1137
|
-------
|
|
1146
1138
|
bool
|
|
1147
|
-
``True``
|
|
1139
|
+
``True`` when successful, ``False`` when failed.
|
|
1148
1140
|
"""
|
|
1149
1141
|
shape_dict = {
|
|
1150
1142
|
"Circle": GrpcPadGeometryType.PADGEOMTYPE_CIRCLE,
|
|
@@ -1204,26 +1196,28 @@ class Padstacks(object):
|
|
|
1204
1196
|
component_reference_designator=None,
|
|
1205
1197
|
component_pin=None,
|
|
1206
1198
|
):
|
|
1207
|
-
"""Get padstack instances by
|
|
1199
|
+
"""Get padstack instances by search criteria.
|
|
1208
1200
|
|
|
1209
1201
|
Parameters
|
|
1210
1202
|
----------
|
|
1211
1203
|
name : str, optional
|
|
1212
|
-
|
|
1204
|
+
Instance name.
|
|
1213
1205
|
pid : int, optional
|
|
1214
|
-
|
|
1215
|
-
definition_name : str
|
|
1216
|
-
|
|
1217
|
-
net_name : str, optional
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1206
|
+
Database ID.
|
|
1207
|
+
definition_name : str or list, optional
|
|
1208
|
+
Padstack definition name(s).
|
|
1209
|
+
net_name : str or list, optional
|
|
1210
|
+
Net name(s).
|
|
1211
|
+
component_reference_designator : str or list, optional
|
|
1212
|
+
Component reference designator(s).
|
|
1213
|
+
component_pin : str or list, optional
|
|
1214
|
+
Component pin number(s).
|
|
1215
|
+
|
|
1221
1216
|
Returns
|
|
1222
1217
|
-------
|
|
1223
|
-
list
|
|
1224
|
-
List of
|
|
1218
|
+
list[:class:`pyedb.grpc.database.primitive.padstack_instance.PadstackInstance`]
|
|
1219
|
+
List of matching padstack instances.
|
|
1225
1220
|
"""
|
|
1226
|
-
|
|
1227
1221
|
instances_by_id = self.instances
|
|
1228
1222
|
if pid:
|
|
1229
1223
|
return instances_by_id[pid]
|
|
@@ -1255,35 +1249,25 @@ class Padstacks(object):
|
|
|
1255
1249
|
def get_reference_pins(
|
|
1256
1250
|
self, positive_pin, reference_net="gnd", search_radius=5e-3, max_limit=0, component_only=True
|
|
1257
1251
|
):
|
|
1258
|
-
"""
|
|
1252
|
+
"""Find reference pins near a specified pin.
|
|
1259
1253
|
|
|
1260
1254
|
Parameters
|
|
1261
1255
|
----------
|
|
1262
|
-
positive_pin :
|
|
1263
|
-
|
|
1256
|
+
positive_pin : :class:`pyedb.grpc.database.primitive.padstack_instance.PadstackInstance`
|
|
1257
|
+
Target pin.
|
|
1264
1258
|
reference_net : str, optional
|
|
1265
|
-
Reference net.
|
|
1259
|
+
Reference net name. Default is ``"gnd"``.
|
|
1266
1260
|
search_radius : float, optional
|
|
1267
|
-
Search radius
|
|
1261
|
+
Search radius in meters. Default is ``5e-3`` (5 mm).
|
|
1268
1262
|
max_limit : int, optional
|
|
1269
|
-
Maximum
|
|
1270
|
-
case no limit is applied. The maximum limit value occurs on the nearest
|
|
1271
|
-
reference pins from the positive one that is found.
|
|
1263
|
+
Maximum number of pins to return. Default is ``0`` (no limit).
|
|
1272
1264
|
component_only : bool, optional
|
|
1273
|
-
Whether to
|
|
1274
|
-
default is ``True``. When ``False``, the search is extended to the entire layout.
|
|
1265
|
+
Whether to search only in component pins. Default is ``True``.
|
|
1275
1266
|
|
|
1276
1267
|
Returns
|
|
1277
1268
|
-------
|
|
1278
|
-
list
|
|
1279
|
-
List of
|
|
1280
|
-
|
|
1281
|
-
Examples
|
|
1282
|
-
--------
|
|
1283
|
-
>>> edbapp = Edb("target_path")
|
|
1284
|
-
>>> pin = edbapp.components.instances["J5"].pins["19"]
|
|
1285
|
-
>>> reference_pins = edbapp.padstacks.get_reference_pins(positive_pin=pin, reference_net="GND",
|
|
1286
|
-
>>> search_radius=5e-3, max_limit=0, component_only=True)
|
|
1269
|
+
list[:class:`pyedb.grpc.database.primitive.padstack_instance.PadstackInstance`]
|
|
1270
|
+
List of reference pins.
|
|
1287
1271
|
"""
|
|
1288
1272
|
pinlist = []
|
|
1289
1273
|
if not positive_pin:
|