pyedb 0.50.1__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/layout.py +10 -1
- pyedb/dotnet/database/dotnet/database.py +0 -2
- 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 +110 -0
- pyedb/grpc/database/control_file.py +150 -17
- 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/layout_validation.py +58 -7
- 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 +307 -40
- 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 +134 -81
- pyedb/grpc/edb_init.py +50 -3
- {pyedb-0.50.1.dist-info → pyedb-0.51.2.dist-info}/METADATA +1 -1
- {pyedb-0.50.1.dist-info → pyedb-0.51.2.dist-info}/RECORD +31 -31
- {pyedb-0.50.1.dist-info → pyedb-0.51.2.dist-info}/LICENSE +0 -0
- {pyedb-0.50.1.dist-info → pyedb-0.51.2.dist-info}/WHEEL +0 -0
|
@@ -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
|
|
@@ -877,12 +877,20 @@ class Component(GrpcComponentGroup):
|
|
|
877
877
|
def numpins(self) -> int:
|
|
878
878
|
"""Number of Pins of Component.
|
|
879
879
|
|
|
880
|
+
..deprecated:: 0.51.0
|
|
881
|
+
Use: func:`num_pins` instead.
|
|
880
882
|
Returns
|
|
881
883
|
-------
|
|
882
884
|
int
|
|
883
885
|
Component pins number.
|
|
884
886
|
"""
|
|
885
|
-
|
|
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
|
|
886
894
|
|
|
887
895
|
@property
|
|
888
896
|
def partname(self) -> str:
|
|
@@ -55,10 +55,12 @@ class LayoutValidation:
|
|
|
55
55
|
|
|
56
56
|
Examples
|
|
57
57
|
--------
|
|
58
|
-
|
|
59
58
|
>>> edb = Edb("edb_file")
|
|
60
|
-
>>>
|
|
61
|
-
|
|
59
|
+
>>> # Find shorts without fixing
|
|
60
|
+
>>> shorts = edb.layout_validation.dc_shorts()
|
|
61
|
+
>>>
|
|
62
|
+
>>> # Find and fix shorts on specific nets
|
|
63
|
+
>>> fixed_shorts = edb.layout_validation.dc_shorts(net_list=["GND", "VCC"], fix=True)
|
|
62
64
|
"""
|
|
63
65
|
if not net_list:
|
|
64
66
|
net_list = list(self._pedb.nets.nets.keys())
|
|
@@ -154,8 +156,17 @@ class LayoutValidation:
|
|
|
154
156
|
|
|
155
157
|
Examples
|
|
156
158
|
--------
|
|
157
|
-
|
|
158
|
-
>>>
|
|
159
|
+
>>> edb = Edb("edb_file")
|
|
160
|
+
>>> # Find disjoint nets on all nets
|
|
161
|
+
>>> new_nets = edb.layout_validation.disjoint_nets()
|
|
162
|
+
>>>
|
|
163
|
+
>>> # Clean disjoints on specific nets with advanced options
|
|
164
|
+
>>> cleaned = edb.layout_validation.disjoint_nets(
|
|
165
|
+
... net_list=["GND"],
|
|
166
|
+
... keep_only_main_net=True,
|
|
167
|
+
... clean_disjoints_less_than=1e-6,
|
|
168
|
+
... order_by_area=True
|
|
169
|
+
... ))
|
|
159
170
|
"""
|
|
160
171
|
timer_start = self._pedb.logger.reset_timer()
|
|
161
172
|
|
|
@@ -274,6 +285,15 @@ class LayoutValidation:
|
|
|
274
285
|
Returns
|
|
275
286
|
-------
|
|
276
287
|
bool
|
|
288
|
+
|
|
289
|
+
Examples
|
|
290
|
+
--------
|
|
291
|
+
>>> edb = Edb("edb_file")
|
|
292
|
+
>>> # Fix self-intersections on all nets
|
|
293
|
+
>>> edb.layout_validation.fix_self_intersections()
|
|
294
|
+
>>>
|
|
295
|
+
>>> # Fix self-intersections on specific nets
|
|
296
|
+
>>> edb.layout_validation.fix_self_intersections(net_list=["RF_line"])
|
|
277
297
|
"""
|
|
278
298
|
if not net_list:
|
|
279
299
|
net_list = list(self._pedb.nets.nets.keys())
|
|
@@ -290,7 +310,17 @@ class LayoutValidation:
|
|
|
290
310
|
return True
|
|
291
311
|
|
|
292
312
|
def illegal_net_names(self, fix=False):
|
|
293
|
-
"""Find and fix illegal net names.
|
|
313
|
+
"""Find and fix illegal net names.
|
|
314
|
+
|
|
315
|
+
Examples
|
|
316
|
+
--------
|
|
317
|
+
>>> edb = Edb("edb_file")
|
|
318
|
+
>>> # Identify illegal net names
|
|
319
|
+
>>> edb.layout_validation.illegal_net_names()
|
|
320
|
+
>>>
|
|
321
|
+
>>> # Find and automatically fix illegal names
|
|
322
|
+
>>> edb.layout_validation.illegal_net_names(fix=True)
|
|
323
|
+
"""
|
|
294
324
|
pattern = r"[\(\)\\\/:;*?<>\'\"|`~$]"
|
|
295
325
|
|
|
296
326
|
nets = self._pedb.nets.nets
|
|
@@ -307,7 +337,17 @@ class LayoutValidation:
|
|
|
307
337
|
return
|
|
308
338
|
|
|
309
339
|
def illegal_rlc_values(self, fix=False) -> list[str]:
|
|
310
|
-
"""Find and fix RLC illegal values.
|
|
340
|
+
"""Find and fix RLC illegal values.
|
|
341
|
+
|
|
342
|
+
Examples
|
|
343
|
+
--------
|
|
344
|
+
>>> edb = Edb("edb_file")
|
|
345
|
+
>>> # Identify components with illegal RLC values
|
|
346
|
+
>>> bad_components = edb.layout_validation.illegal_rlc_values()
|
|
347
|
+
>>>
|
|
348
|
+
>>> # Automatically fix invalid inductor values
|
|
349
|
+
>>> edb.layout_validation.illegal_rlc_values(fix=True)
|
|
350
|
+
"""
|
|
311
351
|
inductors = self._pedb.components.inductors
|
|
312
352
|
|
|
313
353
|
temp = []
|
|
@@ -321,6 +361,17 @@ class LayoutValidation:
|
|
|
321
361
|
return temp
|
|
322
362
|
|
|
323
363
|
def padstacks_no_name(self, fix=False):
|
|
364
|
+
"""Identify and fix padstacks without names.
|
|
365
|
+
|
|
366
|
+
Examples
|
|
367
|
+
--------
|
|
368
|
+
>>> edb = Edb("edb_file")
|
|
369
|
+
>>> # Report unnamed padstacks
|
|
370
|
+
>>> edb.layout_validation.padstacks_no_name()
|
|
371
|
+
>>>
|
|
372
|
+
>>> # Automatically assign names to unnamed padstacks
|
|
373
|
+
>>> edb.layout_validation.padstacks_no_name(fix=True)
|
|
374
|
+
"""
|
|
324
375
|
pds = self._pedb.layout.padstack_instances
|
|
325
376
|
counts = 0
|
|
326
377
|
via_count = 1
|
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]
|