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
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
|
pyedb/grpc/database/siwave.py
CHANGED
|
@@ -89,17 +89,38 @@ class Siwave(object):
|
|
|
89
89
|
|
|
90
90
|
@property
|
|
91
91
|
def excitations(self):
|
|
92
|
-
"""Excitation sources in the layout.
|
|
92
|
+
"""Excitation sources in the layout.
|
|
93
|
+
|
|
94
|
+
Examples
|
|
95
|
+
--------
|
|
96
|
+
>>> from pyedb import Edb
|
|
97
|
+
>>> edbapp = Edb("myaedbfolder", edbversion="2021.2")
|
|
98
|
+
>>> excitations = edbapp.siwave.excitations
|
|
99
|
+
"""
|
|
93
100
|
return self._pedb.excitations
|
|
94
101
|
|
|
95
102
|
@property
|
|
96
103
|
def sources(self):
|
|
97
|
-
"""All sources in the layout.
|
|
104
|
+
"""All sources in the layout.
|
|
105
|
+
|
|
106
|
+
Examples
|
|
107
|
+
--------
|
|
108
|
+
>>> from pyedb import Edb
|
|
109
|
+
>>> edbapp = Edb("myaedbfolder", edbversion="2021.2")
|
|
110
|
+
>>> sources = edbapp.siwave.sources
|
|
111
|
+
"""
|
|
98
112
|
return self._pedb.sources
|
|
99
113
|
|
|
100
114
|
@property
|
|
101
115
|
def probes(self):
|
|
102
|
-
"""All probes in the layout.
|
|
116
|
+
"""All probes in the layout.
|
|
117
|
+
|
|
118
|
+
Examples
|
|
119
|
+
--------
|
|
120
|
+
>>> from pyedb import Edb
|
|
121
|
+
>>> edbapp = Edb("myaedbfolder", edbversion="2021.2")
|
|
122
|
+
>>> probes = edbapp.siwave.probes
|
|
123
|
+
"""
|
|
103
124
|
return self._pedb.probes
|
|
104
125
|
|
|
105
126
|
@property
|
|
@@ -110,6 +131,14 @@ class Siwave(object):
|
|
|
110
131
|
-------
|
|
111
132
|
dict
|
|
112
133
|
Dictionary of pin groups with names as keys and pin group objects as values.
|
|
134
|
+
|
|
135
|
+
Examples
|
|
136
|
+
--------
|
|
137
|
+
>>> from pyedb import Edb
|
|
138
|
+
>>> edbapp = Edb("myaedbfolder", edbversion="2021.2")
|
|
139
|
+
>>> pin_groups = edbapp.siwave.pin_groups
|
|
140
|
+
>>> for name, group in pin_groups.items():
|
|
141
|
+
... print(f"Pin group {name} has {len(group.pins)} pins")
|
|
113
142
|
"""
|
|
114
143
|
_pingroups = {}
|
|
115
144
|
for el in self._pedb.layout.pin_groups:
|
|
@@ -516,6 +545,19 @@ class Siwave(object):
|
|
|
516
545
|
-------
|
|
517
546
|
bool
|
|
518
547
|
``True`` if file was created, ``False`` otherwise.
|
|
548
|
+
|
|
549
|
+
Examples
|
|
550
|
+
--------
|
|
551
|
+
>>> from pyedb import Edb
|
|
552
|
+
>>> edbapp = Edb("myaedbfolder", edbversion="2021.2")
|
|
553
|
+
>>> # Create exec file with AC and SYZ options
|
|
554
|
+
>>> success = edbapp.siwave.create_exec_file(add_ac=True, add_syz=True)
|
|
555
|
+
>>> # Create exec file with Touchstone export
|
|
556
|
+
>>> success = edbapp.siwave.create_exec_file(
|
|
557
|
+
... add_ac=True,
|
|
558
|
+
... export_touchstone=True,
|
|
559
|
+
... touchstone_file_path="C:/temp/my_touchstone.s2p"
|
|
560
|
+
... )
|
|
519
561
|
"""
|
|
520
562
|
workdir = os.path.dirname(self._pedb.edbpath)
|
|
521
563
|
file_name = os.path.join(workdir, os.path.splitext(os.path.basename(self._pedb.edbpath))[0] + ".exec")
|
|
@@ -576,6 +618,24 @@ class Siwave(object):
|
|
|
576
618
|
-------
|
|
577
619
|
:class:`pyedb.dotnet.database.edb_data.siwave_simulation_setup_data.SiwaveSYZSimulationSetup`
|
|
578
620
|
Setup object class.
|
|
621
|
+
|
|
622
|
+
Examples
|
|
623
|
+
--------
|
|
624
|
+
>>> from pyedb import Edb
|
|
625
|
+
>>> edbapp = Edb("myaedbfolder", edbversion="2021.2")
|
|
626
|
+
>>> # Add SYZ analysis with linear sweep from 1kHz to 10GHz
|
|
627
|
+
>>> setup = edbapp.siwave.add_siwave_syz_analysis(
|
|
628
|
+
... start_freq=1e3,
|
|
629
|
+
... stop_freq=10e9,
|
|
630
|
+
... distribution="linear"
|
|
631
|
+
... )
|
|
632
|
+
>>> # Add SYZ analysis with decade sweep
|
|
633
|
+
>>> setup = edbapp.siwave.add_siwave_syz_analysis(
|
|
634
|
+
... start_freq=1e3,
|
|
635
|
+
... stop_freq=10e9,
|
|
636
|
+
... distribution="decade_count",
|
|
637
|
+
... step_freq=10 # 10 points per decade
|
|
638
|
+
... )
|
|
579
639
|
"""
|
|
580
640
|
setup = self._pedb.create_siwave_syz_setup()
|
|
581
641
|
start_freq = self._pedb.number_with_units(start_freq, "Hz")
|