pyedb 0.50.1__py3-none-any.whl → 0.52.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_ports_sources.py +79 -239
- pyedb/configuration/configuration.py +213 -340
- pyedb/dotnet/clr_module.py +9 -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 +8 -2
- pyedb/dotnet/database/layout_validation.py +20 -26
- pyedb/dotnet/database/modeler.py +0 -1
- pyedb/dotnet/database/stackup.py +4 -3
- pyedb/dotnet/edb.py +42 -2
- pyedb/generic/design_types.py +183 -62
- pyedb/grpc/database/__init__.py +0 -1
- pyedb/grpc/database/components.py +110 -0
- pyedb/grpc/database/control_file.py +150 -17
- pyedb/grpc/database/definition/materials.py +7 -7
- pyedb/grpc/database/definitions.py +36 -2
- pyedb/grpc/database/hfss.py +15 -0
- pyedb/grpc/database/hierarchy/component.py +10 -2
- pyedb/grpc/database/hierarchy/pin_pair_model.py +1 -1
- pyedb/grpc/database/layout_validation.py +58 -7
- pyedb/grpc/database/net/differential_pair.py +2 -1
- pyedb/grpc/database/nets.py +233 -4
- pyedb/grpc/database/padstacks.py +97 -0
- pyedb/grpc/database/primitive/padstack_instance.py +1 -1
- pyedb/grpc/database/primitive/polygon.py +1 -1
- pyedb/grpc/database/siwave.py +63 -3
- pyedb/grpc/database/source_excitations.py +317 -50
- pyedb/grpc/database/stackup.py +107 -2
- pyedb/grpc/database/terminal/point_terminal.py +2 -2
- pyedb/grpc/database/terminal/terminal.py +1 -1
- pyedb/grpc/edb.py +190 -224
- pyedb/grpc/edb_init.py +54 -5
- {pyedb-0.50.1.dist-info → pyedb-0.52.0.dist-info}/METADATA +4 -4
- {pyedb-0.50.1.dist-info → pyedb-0.52.0.dist-info}/RECORD +37 -37
- {pyedb-0.50.1.dist-info → pyedb-0.52.0.dist-info}/LICENSE +0 -0
- {pyedb-0.50.1.dist-info → pyedb-0.52.0.dist-info}/WHEEL +0 -0
pyedb/grpc/database/nets.py
CHANGED
|
@@ -36,11 +36,120 @@ from pyedb.misc.utilities import compute_arc_points
|
|
|
36
36
|
class Nets(CommonNets):
|
|
37
37
|
"""Manages EDB methods for nets management accessible from `Edb.nets` property.
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
Examples
|
|
40
|
+
--------
|
|
41
41
|
>>> from pyedb import Edb
|
|
42
|
-
|
|
43
|
-
>>>
|
|
42
|
+
|
|
43
|
+
>>> # Initialize EDB session
|
|
44
|
+
>>> edbapp = Edb(edbversion="2025.2")
|
|
45
|
+
|
|
46
|
+
>>> # Access Nets class
|
|
47
|
+
>>> nets = edbapp.nets
|
|
48
|
+
|
|
49
|
+
>>> # =================
|
|
50
|
+
>>> # Property examples
|
|
51
|
+
>>> # =================
|
|
52
|
+
|
|
53
|
+
>>> # Get all nets dictionary
|
|
54
|
+
>>> all_nets = nets.nets
|
|
55
|
+
>>> print("All nets:", list(all_nets.keys()))
|
|
56
|
+
|
|
57
|
+
>>> # Get net names list
|
|
58
|
+
>>> net_names = nets.netlist
|
|
59
|
+
>>> print("Net names:", net_names)
|
|
60
|
+
|
|
61
|
+
>>> # Get signal nets
|
|
62
|
+
>>> signal_nets = nets.signal
|
|
63
|
+
>>> print("Signal nets:", list(signal_nets.keys()))
|
|
64
|
+
|
|
65
|
+
>>> # Get power/ground nets
|
|
66
|
+
>>> power_nets = nets.power
|
|
67
|
+
>>> print("Power nets:", list(power_nets.keys()))
|
|
68
|
+
|
|
69
|
+
>>> # Get nets by components
|
|
70
|
+
>>> nets_by_comps = nets.nets_by_components
|
|
71
|
+
>>> print("Nets by components:", nets_by_comps)
|
|
72
|
+
|
|
73
|
+
>>> # Get components by nets
|
|
74
|
+
>>> comps_by_nets = nets.components_by_nets
|
|
75
|
+
>>> print("Components by nets:", comps_by_nets)
|
|
76
|
+
|
|
77
|
+
>>> # ===============
|
|
78
|
+
>>> # Method examples
|
|
79
|
+
>>> # ===============
|
|
80
|
+
|
|
81
|
+
>>> # Get net by name
|
|
82
|
+
>>> net_obj = nets["GND"]
|
|
83
|
+
>>> print(f"Net object: {net_obj.name}")
|
|
84
|
+
|
|
85
|
+
>>> # Check net existence
|
|
86
|
+
>>> if "PCIe_RX" in nets:
|
|
87
|
+
>>> print("PCIe_RX exists")
|
|
88
|
+
|
|
89
|
+
>>> # Identify eligible power nets
|
|
90
|
+
>>> eligible_pwr = nets.eligible_power_nets(threshold=0.25)
|
|
91
|
+
>>> print("Eligible power nets:", [net.name for net in eligible_pwr])
|
|
92
|
+
|
|
93
|
+
>>> # Generate extended nets (deprecated)
|
|
94
|
+
>>> nets.generate_extended_nets(
|
|
95
|
+
>>> resistor_below=5,
|
|
96
|
+
>>>inductor_below=0.5,
|
|
97
|
+
>>> capacitor_above=0.1
|
|
98
|
+
>>> )
|
|
99
|
+
|
|
100
|
+
>>> # Classify nets
|
|
101
|
+
>>> nets.classify_nets(
|
|
102
|
+
>>> power_nets=["VDD_CPU", "VDD_MEM"],
|
|
103
|
+
>>> signal_nets=["PCIe_TX", "ETH_RX"]
|
|
104
|
+
>>> )
|
|
105
|
+
|
|
106
|
+
>>> # Check power/ground status
|
|
107
|
+
>>> is_power = nets.is_power_gound_net(["VDD_CPU", "PCIe_TX"])
|
|
108
|
+
>>> print("Is power net:", is_power)
|
|
109
|
+
|
|
110
|
+
>>> # Get DC-connected nets
|
|
111
|
+
>>> dc_connected = nets.get_dcconnected_net_list(
|
|
112
|
+
>>> ground_nets=["GND"],
|
|
113
|
+
>>> res_value=0.002
|
|
114
|
+
>>> )
|
|
115
|
+
print("DC-connected nets:", dc_connected)
|
|
116
|
+
|
|
117
|
+
>>> # Get power tree
|
|
118
|
+
>>> comp_list, columns, net_group = nets.get_powertree(
|
|
119
|
+
>>> power_net_name="VDD_CPU",
|
|
120
|
+
>>> ground_nets=["GND"]
|
|
121
|
+
>>> )
|
|
122
|
+
>>> print("Power tree components:", comp_list)
|
|
123
|
+
|
|
124
|
+
>>> # Find net by name
|
|
125
|
+
>>> found_net = nets.get_net_by_name("PCIe_TX")
|
|
126
|
+
>>> print(f"Found net: {found_net.name}")
|
|
127
|
+
|
|
128
|
+
>>> # Delete nets
|
|
129
|
+
>>> deleted = nets.delete(["Unused_Net", "Test_Net"])
|
|
130
|
+
>>> print("Deleted nets:", deleted)
|
|
131
|
+
|
|
132
|
+
>>> # Find or create net
|
|
133
|
+
>>> new_net = nets.find_or_create_net(net_name="New_Net")
|
|
134
|
+
>>> print(f"Created net: {new_net.name}")
|
|
135
|
+
|
|
136
|
+
>>> # Check net-component association
|
|
137
|
+
>>> in_component = nets.is_net_in_component("U1", "VDD_CPU")
|
|
138
|
+
>>> print("Net in component:", in_component)
|
|
139
|
+
|
|
140
|
+
>>> # Find and fix disjoint nets (deprecated)
|
|
141
|
+
>>> fixed_nets = nets.find_and_fix_disjoint_nets(
|
|
142
|
+
>>> net_list=["PCIe_TX"],
|
|
143
|
+
>>> clean_disjoints_less_than=1e-6
|
|
144
|
+
>>> )
|
|
145
|
+
>>> print("Fixed nets:", fixed_nets)
|
|
146
|
+
|
|
147
|
+
>>> # Merge net polygons
|
|
148
|
+
>>> merged = nets.merge_nets_polygons(["VDD_CPU", "VDD_MEM"])
|
|
149
|
+
>>> print("Polygons merged:", merged)
|
|
150
|
+
|
|
151
|
+
# Close EDB session
|
|
152
|
+
>>> edbapp.close()
|
|
44
153
|
"""
|
|
45
154
|
|
|
46
155
|
def __getitem__(self, name):
|
|
@@ -55,6 +164,11 @@ class Nets(CommonNets):
|
|
|
55
164
|
-------
|
|
56
165
|
pyedb.grpc.database.net.net.Net
|
|
57
166
|
Net object if found, otherwise None.
|
|
167
|
+
|
|
168
|
+
Examples
|
|
169
|
+
--------
|
|
170
|
+
>>> gnd_net = edb_nets["GND"]
|
|
171
|
+
>>> print(gnd_net.name)
|
|
58
172
|
"""
|
|
59
173
|
return Net(self._pedb, Net.find_by_name(self._active_layout, name))
|
|
60
174
|
|
|
@@ -70,6 +184,11 @@ class Nets(CommonNets):
|
|
|
70
184
|
-------
|
|
71
185
|
bool
|
|
72
186
|
True if the net exists, False otherwise.
|
|
187
|
+
|
|
188
|
+
Examples
|
|
189
|
+
--------
|
|
190
|
+
>>> if "PCIe_RX" in edb_nets:
|
|
191
|
+
>>> print("Net exists")
|
|
73
192
|
"""
|
|
74
193
|
return name in self.nets
|
|
75
194
|
|
|
@@ -117,6 +236,12 @@ class Nets(CommonNets):
|
|
|
117
236
|
-------
|
|
118
237
|
dict[str, pyedb.grpc.database.net.net.Net]
|
|
119
238
|
Dictionary of net names to Net objects.
|
|
239
|
+
|
|
240
|
+
Examples
|
|
241
|
+
--------
|
|
242
|
+
>>> all_nets = edb_nets.nets
|
|
243
|
+
>>> for net_name, net_obj in all_nets.items():
|
|
244
|
+
... print(net_name, net_obj.is_power_ground)
|
|
120
245
|
"""
|
|
121
246
|
return {i.name: i for i in self._pedb.layout.nets}
|
|
122
247
|
|
|
@@ -128,6 +253,11 @@ class Nets(CommonNets):
|
|
|
128
253
|
-------
|
|
129
254
|
list[str]
|
|
130
255
|
Names of all nets in the layout.
|
|
256
|
+
|
|
257
|
+
Examples
|
|
258
|
+
--------
|
|
259
|
+
>>> net_names = edb_nets.netlist
|
|
260
|
+
>>> print("Total nets:", len(net_names))
|
|
131
261
|
"""
|
|
132
262
|
return list(self.nets.keys())
|
|
133
263
|
|
|
@@ -139,6 +269,11 @@ class Nets(CommonNets):
|
|
|
139
269
|
-------
|
|
140
270
|
dict[str, pyedb.grpc.database.net.net.Net]
|
|
141
271
|
Dictionary of signal net names to Net objects.
|
|
272
|
+
|
|
273
|
+
Examples
|
|
274
|
+
--------
|
|
275
|
+
>>> signal_nets = edb_nets.signal
|
|
276
|
+
>>> print("Signal nets:", list(signal_nets.keys()))
|
|
142
277
|
"""
|
|
143
278
|
nets = {}
|
|
144
279
|
for net, value in self.nets.items():
|
|
@@ -154,6 +289,11 @@ class Nets(CommonNets):
|
|
|
154
289
|
-------
|
|
155
290
|
dict[str, pyedb.grpc.database.net.net.Net]
|
|
156
291
|
Dictionary of power/ground net names to Net objects.
|
|
292
|
+
|
|
293
|
+
Examples
|
|
294
|
+
--------
|
|
295
|
+
>>> power_nets = edb_nets.power
|
|
296
|
+
>>> print("Power nets:", list(power_nets.keys()))
|
|
157
297
|
"""
|
|
158
298
|
nets = {}
|
|
159
299
|
for net, value in self.nets.items():
|
|
@@ -176,6 +316,11 @@ class Nets(CommonNets):
|
|
|
176
316
|
-------
|
|
177
317
|
list[pyedb.grpc.database.net.net.Net]
|
|
178
318
|
List of nets eligible as power/ground nets.
|
|
319
|
+
|
|
320
|
+
Examples
|
|
321
|
+
--------
|
|
322
|
+
>>> eligible_pwr = edb_nets.eligible_power_nets(threshold=0.25)
|
|
323
|
+
>>> print([net.name for net in eligible_pwr])
|
|
179
324
|
"""
|
|
180
325
|
pwr_gnd_nets = []
|
|
181
326
|
for net in self._layout.nets[:]:
|
|
@@ -205,6 +350,11 @@ class Nets(CommonNets):
|
|
|
205
350
|
-------
|
|
206
351
|
dict[str, list[str]]
|
|
207
352
|
Dictionary mapping component names to list of net names.
|
|
353
|
+
|
|
354
|
+
Examples
|
|
355
|
+
--------
|
|
356
|
+
>>> nets_by_comps = edb_nets.nets_by_components
|
|
357
|
+
>>> print("U1 nets:", nets_by_comps.get("U1", []))
|
|
208
358
|
"""
|
|
209
359
|
for comp, i in self._pedb.components.instances.items():
|
|
210
360
|
self._nets_by_comp_dict[comp] = i.nets
|
|
@@ -218,6 +368,11 @@ class Nets(CommonNets):
|
|
|
218
368
|
-------
|
|
219
369
|
dict[str, list[str]]
|
|
220
370
|
Dictionary mapping net names to list of component names.
|
|
371
|
+
|
|
372
|
+
Examples
|
|
373
|
+
--------
|
|
374
|
+
>>> comps_by_nets = edb_nets.components_by_nets
|
|
375
|
+
>>> print("Components on GND:", comps_by_nets.get("GND", []))
|
|
221
376
|
"""
|
|
222
377
|
for comp, i in self._pedb.components.instances.items():
|
|
223
378
|
for n in i.nets:
|
|
@@ -260,6 +415,14 @@ class Nets(CommonNets):
|
|
|
260
415
|
-------
|
|
261
416
|
list
|
|
262
417
|
List of generated extended nets.
|
|
418
|
+
|
|
419
|
+
Examples
|
|
420
|
+
--------
|
|
421
|
+
>>> edb_nets.generate_extended_nets(
|
|
422
|
+
... resistor_below=5,
|
|
423
|
+
... inductor_below=0.5,
|
|
424
|
+
... capacitor_above=0.1
|
|
425
|
+
... )
|
|
263
426
|
"""
|
|
264
427
|
warnings.warn("Use new method :func:`edb.extended_nets.generate_extended_nets` instead.", DeprecationWarning)
|
|
265
428
|
self._pedb.extended_nets.generate_extended_nets(
|
|
@@ -315,6 +478,13 @@ class Nets(CommonNets):
|
|
|
315
478
|
-------
|
|
316
479
|
bool
|
|
317
480
|
True if successful, False otherwise.
|
|
481
|
+
|
|
482
|
+
Examples
|
|
483
|
+
--------
|
|
484
|
+
>>> edb_nets.classify_nets(
|
|
485
|
+
... power_nets=["VDD_CPU", "VDD_MEM"],
|
|
486
|
+
... signal_nets=["PCIe_TX", "ETH_RX"]
|
|
487
|
+
... )
|
|
318
488
|
"""
|
|
319
489
|
if isinstance(power_nets, str):
|
|
320
490
|
power_nets = []
|
|
@@ -344,6 +514,11 @@ class Nets(CommonNets):
|
|
|
344
514
|
-------
|
|
345
515
|
bool
|
|
346
516
|
True if any net is power/ground, False otherwise.
|
|
517
|
+
|
|
518
|
+
Examples
|
|
519
|
+
--------
|
|
520
|
+
>>> is_power = edb_nets.is_power_gound_net(["VDD_CPU", "PCIe_TX"])
|
|
521
|
+
>>> print("Contains power net:", is_power)
|
|
347
522
|
"""
|
|
348
523
|
if isinstance(netname_list, str):
|
|
349
524
|
netname_list = [netname_list]
|
|
@@ -367,6 +542,15 @@ class Nets(CommonNets):
|
|
|
367
542
|
-------
|
|
368
543
|
list[set]
|
|
369
544
|
List of sets of connected nets.
|
|
545
|
+
|
|
546
|
+
Examples
|
|
547
|
+
--------
|
|
548
|
+
>>> dc_connected = edb_nets.get_dcconnected_net_list(
|
|
549
|
+
... ground_nets=["GND"],
|
|
550
|
+
... res_value=0.002
|
|
551
|
+
... )
|
|
552
|
+
>>> for net_group in dc_connected:
|
|
553
|
+
... print("Connected nets:", net_group)
|
|
370
554
|
"""
|
|
371
555
|
temp_list = []
|
|
372
556
|
for _, comp_obj in self._pedb.components.inductors.items():
|
|
@@ -416,6 +600,14 @@ class Nets(CommonNets):
|
|
|
416
600
|
-------
|
|
417
601
|
tuple
|
|
418
602
|
(component_list, component_list_columns, net_group)
|
|
603
|
+
|
|
604
|
+
Examples
|
|
605
|
+
--------
|
|
606
|
+
>>> comp_list, columns, net_group = edb_nets.get_powertree(
|
|
607
|
+
... power_net_name="VDD_CPU",
|
|
608
|
+
... ground_nets=["GND"]
|
|
609
|
+
... )
|
|
610
|
+
>>> print("Power tree components:", comp_list)
|
|
419
611
|
"""
|
|
420
612
|
flag_in_ng = False
|
|
421
613
|
net_group = []
|
|
@@ -474,6 +666,12 @@ class Nets(CommonNets):
|
|
|
474
666
|
-------
|
|
475
667
|
pyedb.grpc.database.net.net.Net
|
|
476
668
|
Net object if found, otherwise None.
|
|
669
|
+
|
|
670
|
+
Examples
|
|
671
|
+
--------
|
|
672
|
+
>>> found_net = edb_nets.get_net_by_name("PCIe_TX")
|
|
673
|
+
>>> if found_net:
|
|
674
|
+
... print("Net found:", found_net.name)
|
|
477
675
|
"""
|
|
478
676
|
edb_net = Net.find_by_name(self._active_layout, net_name)
|
|
479
677
|
if edb_net is not None:
|
|
@@ -528,6 +726,20 @@ class Nets(CommonNets):
|
|
|
528
726
|
-------
|
|
529
727
|
pyedb.grpc.database.net.net.Net | list[pyedb.grpc.database.net.net.Net]
|
|
530
728
|
Net object or list of matching net objects.
|
|
729
|
+
|
|
730
|
+
Examples
|
|
731
|
+
--------
|
|
732
|
+
>>> # Create new net
|
|
733
|
+
>>> new_net = edb_nets.find_or_create_net(net_name="New_Net")
|
|
734
|
+
>>>
|
|
735
|
+
>>> # Find existing net
|
|
736
|
+
>>> existing_net = edb_nets.find_or_create_net(net_name="GND")
|
|
737
|
+
>>>
|
|
738
|
+
>>> # Find nets starting with "VDD"
|
|
739
|
+
>>> vdd_nets = edb_nets.find_or_create_net(start_with="VDD")
|
|
740
|
+
>>>
|
|
741
|
+
>>> # Find nets ending with "_P"
|
|
742
|
+
>>> pos_nets = edb_nets.find_or_create_net(end_with="_P")
|
|
531
743
|
"""
|
|
532
744
|
if not net_name and not start_with and not contain and not end_with:
|
|
533
745
|
net_name = generate_unique_name("NET_")
|
|
@@ -591,6 +803,11 @@ class Nets(CommonNets):
|
|
|
591
803
|
-------
|
|
592
804
|
bool
|
|
593
805
|
True if the net is found in the component, False otherwise.
|
|
806
|
+
|
|
807
|
+
Examples
|
|
808
|
+
--------
|
|
809
|
+
>>> in_component = edb_nets.is_net_in_component("U1", "VDD_CPU")
|
|
810
|
+
>>> print("Net in component:", in_component)
|
|
594
811
|
"""
|
|
595
812
|
if component_name not in self._pedb.components.instances:
|
|
596
813
|
return False
|
|
@@ -625,6 +842,13 @@ class Nets(CommonNets):
|
|
|
625
842
|
|
|
626
843
|
New nets created.
|
|
627
844
|
|
|
845
|
+
Examples
|
|
846
|
+
--------
|
|
847
|
+
>>> fixed_nets = edb_nets.find_and_fix_disjoint_nets(
|
|
848
|
+
... net_list=["PCIe_TX"],
|
|
849
|
+
... clean_disjoints_less_than=1e-6
|
|
850
|
+
... )
|
|
851
|
+
>>> print("Fixed nets:", fixed_nets)
|
|
628
852
|
"""
|
|
629
853
|
|
|
630
854
|
warnings.warn("Use new function :func:`edb.layout_validation.disjoint_nets` instead.", DeprecationWarning)
|
|
@@ -644,6 +868,11 @@ class Nets(CommonNets):
|
|
|
644
868
|
-------
|
|
645
869
|
bool
|
|
646
870
|
True if successful, False otherwise.
|
|
871
|
+
|
|
872
|
+
Examples
|
|
873
|
+
--------
|
|
874
|
+
>>> merged = edb_nets.merge_nets_polygons(["VDD_CPU", "VDD_MEM"])
|
|
875
|
+
>>> print("Merge successful:", merged)
|
|
647
876
|
"""
|
|
648
877
|
if isinstance(net_names_list, str):
|
|
649
878
|
net_names_list = [net_names_list]
|
pyedb/grpc/database/padstacks.py
CHANGED
|
@@ -130,6 +130,11 @@ class Padstacks(object):
|
|
|
130
130
|
-------
|
|
131
131
|
object
|
|
132
132
|
EDB.PadType enumerator value.
|
|
133
|
+
|
|
134
|
+
Examples
|
|
135
|
+
--------
|
|
136
|
+
>>> pad_type = edb_padstacks.int_to_pad_type(0) # Returns REGULAR_PAD
|
|
137
|
+
>>> pad_type = edb_padstacks.int_to_pad_type(1) # Returns ANTI_PAD
|
|
133
138
|
"""
|
|
134
139
|
|
|
135
140
|
if val == 0:
|
|
@@ -156,6 +161,11 @@ class Padstacks(object):
|
|
|
156
161
|
-------
|
|
157
162
|
object
|
|
158
163
|
EDB.PadGeometryType enumerator value.
|
|
164
|
+
|
|
165
|
+
Examples
|
|
166
|
+
--------
|
|
167
|
+
>>> geom_type = edb_padstacks.int_to_geometry_type(1) # Returns CIRCLE
|
|
168
|
+
>>> geom_type = edb_padstacks.int_to_geometry_type(2) # Returns SQUARE
|
|
159
169
|
"""
|
|
160
170
|
if val == 0:
|
|
161
171
|
return GrpcPadGeometryType.PADGEOMTYPE_NO_GEOMETRY
|
|
@@ -192,6 +202,12 @@ class Padstacks(object):
|
|
|
192
202
|
-------
|
|
193
203
|
dict[str, :class:`pyedb.grpc.database.definition.padstack_def.PadstackDef`]
|
|
194
204
|
Dictionary of padstack definitions with definition names as keys.
|
|
205
|
+
|
|
206
|
+
Examples
|
|
207
|
+
--------
|
|
208
|
+
>>> all_definitions = edb_padstacks.definitions
|
|
209
|
+
>>> for name, definition in all_definitions.items():
|
|
210
|
+
... print(f"Padstack: {name}")
|
|
195
211
|
"""
|
|
196
212
|
if len(self._definitions) == len(self.db.padstack_defs):
|
|
197
213
|
return self._definitions
|
|
@@ -209,6 +225,12 @@ class Padstacks(object):
|
|
|
209
225
|
-------
|
|
210
226
|
dict[int, :class:`pyedb.grpc.database.primitive.padstack_instance.PadstackInstance`]
|
|
211
227
|
Dictionary of padstack instances with database IDs as keys.
|
|
228
|
+
|
|
229
|
+
Examples
|
|
230
|
+
--------
|
|
231
|
+
>>> all_instances = edb_padstacks.instances
|
|
232
|
+
>>> for id, instance in all_instances.items():
|
|
233
|
+
... print(f"Instance {id}: {instance.name}")
|
|
212
234
|
"""
|
|
213
235
|
pad_stack_inst = self._pedb.layout.padstack_instances
|
|
214
236
|
if len(self._instances) == len(pad_stack_inst):
|
|
@@ -224,6 +246,12 @@ class Padstacks(object):
|
|
|
224
246
|
-------
|
|
225
247
|
dict[str, :class:`pyedb.grpc.database.primitive.padstack_instance.PadstackInstance`]
|
|
226
248
|
Dictionary of padstack instances with names as keys.
|
|
249
|
+
|
|
250
|
+
Examples
|
|
251
|
+
--------
|
|
252
|
+
>>> named_instances = edb_padstacks.instances_by_name
|
|
253
|
+
>>> for name, instance in named_instances.items():
|
|
254
|
+
... print(f"Instance named {name}")
|
|
227
255
|
"""
|
|
228
256
|
padstack_instances = {}
|
|
229
257
|
for _, edb_padstack_instance in self.instances.items():
|
|
@@ -243,6 +271,12 @@ class Padstacks(object):
|
|
|
243
271
|
-------
|
|
244
272
|
:class:`pyedb.grpc.database.primitive.padstack_instance.PadstackInstance` or None
|
|
245
273
|
Padstack instance if found, otherwise ``None``.
|
|
274
|
+
|
|
275
|
+
Examples
|
|
276
|
+
--------
|
|
277
|
+
>>> via = edb_padstacks.find_instance_by_id(123)
|
|
278
|
+
>>> if via:
|
|
279
|
+
... print(f"Found via: {via.name}")
|
|
246
280
|
"""
|
|
247
281
|
return self._pedb.modeler.find_object_by_id(value)
|
|
248
282
|
|
|
@@ -254,6 +288,12 @@ class Padstacks(object):
|
|
|
254
288
|
-------
|
|
255
289
|
dict[int, :class:`pyedb.grpc.database.primitive.padstack_instance.PadstackInstance`]
|
|
256
290
|
Dictionary of pin instances with database IDs as keys.
|
|
291
|
+
|
|
292
|
+
Examples
|
|
293
|
+
--------
|
|
294
|
+
>>> all_pins = edb_padstacks.pins
|
|
295
|
+
>>> for pin_id, pin in all_pins.items():
|
|
296
|
+
... print(f"Pin {pin_id} belongs to {pin.component.refdes}")
|
|
257
297
|
"""
|
|
258
298
|
pins = {}
|
|
259
299
|
for instancename, instance in self.instances.items():
|
|
@@ -269,6 +309,12 @@ class Padstacks(object):
|
|
|
269
309
|
-------
|
|
270
310
|
dict[int, :class:`pyedb.grpc.database.primitive.padstack_instance.PadstackInstance`]
|
|
271
311
|
Dictionary of via instances with database IDs as keys.
|
|
312
|
+
|
|
313
|
+
Examples
|
|
314
|
+
--------
|
|
315
|
+
>>> all_vias = edb_padstacks.vias
|
|
316
|
+
>>> for via_id, via in all_vias.items():
|
|
317
|
+
... print(f"Via {via_id} on net {via.net_name}")
|
|
272
318
|
"""
|
|
273
319
|
pnames = list(self.pins.keys())
|
|
274
320
|
vias = {i: j for i, j in self.instances.items() if i not in pnames}
|
|
@@ -285,6 +331,11 @@ class Padstacks(object):
|
|
|
285
331
|
-------
|
|
286
332
|
list
|
|
287
333
|
List of all layout pin groups.
|
|
334
|
+
|
|
335
|
+
Examples
|
|
336
|
+
--------
|
|
337
|
+
>>> groups = edb_padstacks.pingroups # Deprecated
|
|
338
|
+
>>> groups = edb_padstacks._layout.pin_groups # New way
|
|
288
339
|
"""
|
|
289
340
|
warnings.warn(
|
|
290
341
|
"`pingroups` is deprecated and is now located here " "`pyedb.grpc.core.layout.pin_groups` instead.",
|
|
@@ -328,6 +379,15 @@ class Padstacks(object):
|
|
|
328
379
|
-------
|
|
329
380
|
str
|
|
330
381
|
Name of the padstack if the operation is successful.
|
|
382
|
+
|
|
383
|
+
Examples
|
|
384
|
+
--------
|
|
385
|
+
>>> via_name = edb_padstacks.create_circular_padstack(
|
|
386
|
+
... padstackname="VIA1",
|
|
387
|
+
... holediam="200um",
|
|
388
|
+
... paddiam="400um",
|
|
389
|
+
... antipaddiam="600um"
|
|
390
|
+
... )
|
|
331
391
|
"""
|
|
332
392
|
|
|
333
393
|
padstack_def = PadstackDef.create(self._pedb.db, padstackname)
|
|
@@ -411,6 +471,11 @@ class Padstacks(object):
|
|
|
411
471
|
-------
|
|
412
472
|
bool
|
|
413
473
|
``True`` when successful, ``False`` when failed.
|
|
474
|
+
|
|
475
|
+
Examples
|
|
476
|
+
--------
|
|
477
|
+
>>> success = edb_padstacks.delete_padstack_instances("GND")
|
|
478
|
+
>>> success = edb_padstacks.delete_padstack_instances(["GND", "PWR"])
|
|
414
479
|
"""
|
|
415
480
|
if not isinstance(net_names, list): # pragma: no cover
|
|
416
481
|
net_names = [net_names]
|
|
@@ -439,6 +504,11 @@ class Padstacks(object):
|
|
|
439
504
|
-------
|
|
440
505
|
bool
|
|
441
506
|
``True`` when successful, ``False`` when failed.
|
|
507
|
+
|
|
508
|
+
Examples
|
|
509
|
+
--------
|
|
510
|
+
>>> via_id = 123
|
|
511
|
+
>>> success = edb_padstacks.set_solderball(via_id, "SolderBall_Top", True, 150e-6)
|
|
442
512
|
"""
|
|
443
513
|
if isinstance(padstackInst, int):
|
|
444
514
|
psdef = self.definitions[self.instances[padstackInst].padstack_definition].edb_padstack
|
|
@@ -512,6 +582,11 @@ class Padstacks(object):
|
|
|
512
582
|
-------
|
|
513
583
|
list[:class:`pyedb.grpc.database.primitive.padstack_instance.PadstackInstance`]
|
|
514
584
|
List of matching pin instances.
|
|
585
|
+
|
|
586
|
+
Examples
|
|
587
|
+
--------
|
|
588
|
+
>>> pins = edb_padstacks.get_pin_from_component_and_net(refdes="U1", netname="VCC")
|
|
589
|
+
>>> pins = edb_padstacks.get_pin_from_component_and_net(netname="GND") # All GND pins
|
|
515
590
|
"""
|
|
516
591
|
pinlist = []
|
|
517
592
|
if refdes:
|
|
@@ -551,6 +626,10 @@ class Padstacks(object):
|
|
|
551
626
|
Dictionary of pins if the operation is successful.
|
|
552
627
|
``False`` is returned if the net does not belong to the component.
|
|
553
628
|
|
|
629
|
+
Examples
|
|
630
|
+
--------
|
|
631
|
+
>>> pins = edb_padstacks.get_pinlist_from_component_and_net(refdes="U1", netname="CLK") # Deprecated
|
|
632
|
+
>>> pins = edb_padstacks.get_pin_from_component_and_net(refdes="U1", netname="CLK") # New way
|
|
554
633
|
"""
|
|
555
634
|
warnings.warn(
|
|
556
635
|
"`get_pinlist_from_component_and_net` is deprecated use `get_pin_from_component_and_net` instead.",
|
|
@@ -579,6 +658,11 @@ class Padstacks(object):
|
|
|
579
658
|
- offset_x : float
|
|
580
659
|
- offset_y : float
|
|
581
660
|
- rotation : float
|
|
661
|
+
|
|
662
|
+
Examples
|
|
663
|
+
--------
|
|
664
|
+
>>> via = edb_padstacks.instances[123]
|
|
665
|
+
>>> geom_type, params, x, y, rot = edb_padstacks.get_pad_parameters(via, "TOP", "regular_pad")
|
|
582
666
|
"""
|
|
583
667
|
if pad_type == "regular_pad":
|
|
584
668
|
pad_type = GrpcPadType.REGULAR_PAD
|
|
@@ -622,6 +706,10 @@ class Padstacks(object):
|
|
|
622
706
|
-------
|
|
623
707
|
bool
|
|
624
708
|
``True`` when successful, ``False`` when failed.
|
|
709
|
+
|
|
710
|
+
Examples
|
|
711
|
+
--------
|
|
712
|
+
>>> success = edb_padstacks.set_all_antipad_value("0.3mm")
|
|
625
713
|
"""
|
|
626
714
|
if self.definitions:
|
|
627
715
|
all_succeed = True
|
|
@@ -675,6 +763,10 @@ class Padstacks(object):
|
|
|
675
763
|
-------
|
|
676
764
|
bool
|
|
677
765
|
``True`` when successful, ``False`` when failed.
|
|
766
|
+
|
|
767
|
+
Examples
|
|
768
|
+
--------
|
|
769
|
+
>>> success = edb_padstacks.check_and_fix_via_plating(minimum_value_to_replace=0.1)
|
|
678
770
|
"""
|
|
679
771
|
for padstack_def in list(self.definitions.values()):
|
|
680
772
|
if padstack_def.hole_plating_ratio <= minimum_value_to_replace:
|
|
@@ -696,6 +788,11 @@ class Padstacks(object):
|
|
|
696
788
|
-------
|
|
697
789
|
list[:class:`pyedb.grpc.database.primitive.padstack_instance.PadstackInstance`]
|
|
698
790
|
List of via instances.
|
|
791
|
+
|
|
792
|
+
Examples
|
|
793
|
+
--------
|
|
794
|
+
>>> vias = edb_padstacks.get_via_instance_from_net("GND")
|
|
795
|
+
>>> vias = edb_padstacks.get_via_instance_from_net(["GND", "PWR"])
|
|
699
796
|
"""
|
|
700
797
|
if net_list and not isinstance(net_list, list):
|
|
701
798
|
net_list = [net_list]
|
|
@@ -1095,7 +1095,7 @@ class PadstackInstance(GrpcPadstackInstance):
|
|
|
1095
1095
|
|
|
1096
1096
|
def get_reference_pins(
|
|
1097
1097
|
self, reference_net="GND", search_radius=5e-3, max_limit=0, component_only=True
|
|
1098
|
-
) -> list[
|
|
1098
|
+
) -> list[any]:
|
|
1099
1099
|
"""Search for reference pins using given criteria.
|
|
1100
1100
|
|
|
1101
1101
|
Parameters
|
|
@@ -59,7 +59,7 @@ class Polygon(GrpcPolygon, Primitive):
|
|
|
59
59
|
"""
|
|
60
60
|
return self.polygon_data.has_self_intersections()
|
|
61
61
|
|
|
62
|
-
def fix_self_intersections(self) -> list[
|
|
62
|
+
def fix_self_intersections(self) -> list[any]:
|
|
63
63
|
"""Remove self intersections if they exist.
|
|
64
64
|
|
|
65
65
|
Returns
|