pyedb 0.2.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 +17 -0
- pyedb/dotnet/__init__.py +0 -0
- pyedb/dotnet/application/Variables.py +2261 -0
- pyedb/dotnet/application/__init__.py +0 -0
- pyedb/dotnet/clr_module.py +103 -0
- pyedb/dotnet/edb.py +4237 -0
- pyedb/dotnet/edb_core/__init__.py +1 -0
- pyedb/dotnet/edb_core/cell/__init__.py +0 -0
- pyedb/dotnet/edb_core/cell/hierarchy/__init__.py +0 -0
- pyedb/dotnet/edb_core/cell/hierarchy/model.py +66 -0
- pyedb/dotnet/edb_core/components.py +2669 -0
- pyedb/dotnet/edb_core/configuration.py +423 -0
- pyedb/dotnet/edb_core/definition/__init__.py +0 -0
- pyedb/dotnet/edb_core/definition/component_def.py +166 -0
- pyedb/dotnet/edb_core/definition/component_model.py +30 -0
- pyedb/dotnet/edb_core/definition/definition_obj.py +18 -0
- pyedb/dotnet/edb_core/definition/definitions.py +12 -0
- pyedb/dotnet/edb_core/dotnet/__init__.py +0 -0
- pyedb/dotnet/edb_core/dotnet/database.py +1218 -0
- pyedb/dotnet/edb_core/dotnet/layout.py +238 -0
- pyedb/dotnet/edb_core/dotnet/primitive.py +1517 -0
- pyedb/dotnet/edb_core/edb_data/__init__.py +0 -0
- pyedb/dotnet/edb_core/edb_data/components_data.py +938 -0
- pyedb/dotnet/edb_core/edb_data/connectable.py +113 -0
- pyedb/dotnet/edb_core/edb_data/control_file.py +1268 -0
- pyedb/dotnet/edb_core/edb_data/design_options.py +35 -0
- pyedb/dotnet/edb_core/edb_data/edbvalue.py +45 -0
- pyedb/dotnet/edb_core/edb_data/hfss_extent_info.py +330 -0
- pyedb/dotnet/edb_core/edb_data/hfss_simulation_setup_data.py +1607 -0
- pyedb/dotnet/edb_core/edb_data/layer_data.py +576 -0
- pyedb/dotnet/edb_core/edb_data/nets_data.py +281 -0
- pyedb/dotnet/edb_core/edb_data/obj_base.py +19 -0
- pyedb/dotnet/edb_core/edb_data/padstacks_data.py +2080 -0
- pyedb/dotnet/edb_core/edb_data/ports.py +287 -0
- pyedb/dotnet/edb_core/edb_data/primitives_data.py +1397 -0
- pyedb/dotnet/edb_core/edb_data/simulation_configuration.py +2914 -0
- pyedb/dotnet/edb_core/edb_data/simulation_setup.py +716 -0
- pyedb/dotnet/edb_core/edb_data/siwave_simulation_setup_data.py +1205 -0
- pyedb/dotnet/edb_core/edb_data/sources.py +514 -0
- pyedb/dotnet/edb_core/edb_data/terminals.py +632 -0
- pyedb/dotnet/edb_core/edb_data/utilities.py +148 -0
- pyedb/dotnet/edb_core/edb_data/variables.py +91 -0
- pyedb/dotnet/edb_core/general.py +181 -0
- pyedb/dotnet/edb_core/hfss.py +1646 -0
- pyedb/dotnet/edb_core/layout.py +1244 -0
- pyedb/dotnet/edb_core/layout_validation.py +272 -0
- pyedb/dotnet/edb_core/materials.py +939 -0
- pyedb/dotnet/edb_core/net_class.py +335 -0
- pyedb/dotnet/edb_core/nets.py +1215 -0
- pyedb/dotnet/edb_core/padstack.py +1389 -0
- pyedb/dotnet/edb_core/siwave.py +1427 -0
- pyedb/dotnet/edb_core/stackup.py +2703 -0
- pyedb/edb_logger.py +396 -0
- pyedb/generic/__init__.py +0 -0
- pyedb/generic/constants.py +1063 -0
- pyedb/generic/data_handlers.py +320 -0
- pyedb/generic/design_types.py +104 -0
- pyedb/generic/filesystem.py +150 -0
- pyedb/generic/general_methods.py +1535 -0
- pyedb/generic/plot.py +1840 -0
- pyedb/generic/process.py +285 -0
- pyedb/generic/settings.py +224 -0
- pyedb/ipc2581/__init__.py +0 -0
- pyedb/ipc2581/bom/__init__.py +0 -0
- pyedb/ipc2581/bom/bom.py +21 -0
- pyedb/ipc2581/bom/bom_item.py +32 -0
- pyedb/ipc2581/bom/characteristics.py +37 -0
- pyedb/ipc2581/bom/refdes.py +16 -0
- pyedb/ipc2581/content/__init__.py +0 -0
- pyedb/ipc2581/content/color.py +38 -0
- pyedb/ipc2581/content/content.py +55 -0
- pyedb/ipc2581/content/dictionary_color.py +29 -0
- pyedb/ipc2581/content/dictionary_fill.py +28 -0
- pyedb/ipc2581/content/dictionary_line.py +30 -0
- pyedb/ipc2581/content/entry_color.py +13 -0
- pyedb/ipc2581/content/entry_line.py +14 -0
- pyedb/ipc2581/content/fill.py +15 -0
- pyedb/ipc2581/content/layer_ref.py +10 -0
- pyedb/ipc2581/content/standard_geometries_dictionary.py +72 -0
- pyedb/ipc2581/ecad/__init__.py +0 -0
- pyedb/ipc2581/ecad/cad_data/__init__.py +0 -0
- pyedb/ipc2581/ecad/cad_data/assembly_drawing.py +26 -0
- pyedb/ipc2581/ecad/cad_data/cad_data.py +37 -0
- pyedb/ipc2581/ecad/cad_data/component.py +41 -0
- pyedb/ipc2581/ecad/cad_data/drill.py +30 -0
- pyedb/ipc2581/ecad/cad_data/feature.py +54 -0
- pyedb/ipc2581/ecad/cad_data/layer.py +41 -0
- pyedb/ipc2581/ecad/cad_data/layer_feature.py +151 -0
- pyedb/ipc2581/ecad/cad_data/logical_net.py +32 -0
- pyedb/ipc2581/ecad/cad_data/outline.py +25 -0
- pyedb/ipc2581/ecad/cad_data/package.py +104 -0
- pyedb/ipc2581/ecad/cad_data/padstack_def.py +38 -0
- pyedb/ipc2581/ecad/cad_data/padstack_hole_def.py +24 -0
- pyedb/ipc2581/ecad/cad_data/padstack_instance.py +62 -0
- pyedb/ipc2581/ecad/cad_data/padstack_pad_def.py +26 -0
- pyedb/ipc2581/ecad/cad_data/path.py +89 -0
- pyedb/ipc2581/ecad/cad_data/phy_net.py +80 -0
- pyedb/ipc2581/ecad/cad_data/pin.py +31 -0
- pyedb/ipc2581/ecad/cad_data/polygon.py +169 -0
- pyedb/ipc2581/ecad/cad_data/profile.py +40 -0
- pyedb/ipc2581/ecad/cad_data/stackup.py +31 -0
- pyedb/ipc2581/ecad/cad_data/stackup_group.py +42 -0
- pyedb/ipc2581/ecad/cad_data/stackup_layer.py +21 -0
- pyedb/ipc2581/ecad/cad_data/step.py +275 -0
- pyedb/ipc2581/ecad/cad_header.py +33 -0
- pyedb/ipc2581/ecad/ecad.py +19 -0
- pyedb/ipc2581/ecad/spec.py +46 -0
- pyedb/ipc2581/history_record.py +37 -0
- pyedb/ipc2581/ipc2581.py +387 -0
- pyedb/ipc2581/logistic_header.py +25 -0
- pyedb/misc/__init__.py +0 -0
- pyedb/misc/aedtlib_personalib_install.py +14 -0
- pyedb/misc/downloads.py +322 -0
- pyedb/misc/misc.py +67 -0
- pyedb/misc/pyedb.runtimeconfig.json +13 -0
- pyedb/misc/siw_feature_config/__init__.py +0 -0
- pyedb/misc/siw_feature_config/emc/__init__.py +0 -0
- pyedb/misc/siw_feature_config/emc/component_tags.py +46 -0
- pyedb/misc/siw_feature_config/emc/net_tags.py +37 -0
- pyedb/misc/siw_feature_config/emc/tag_library.py +62 -0
- pyedb/misc/siw_feature_config/emc/xml_generic.py +78 -0
- pyedb/misc/siw_feature_config/emc_rule_checker_settings.py +179 -0
- pyedb/misc/utilities.py +27 -0
- pyedb/modeler/geometry_operators.py +2082 -0
- pyedb-0.2.0.dist-info/LICENSE +21 -0
- pyedb-0.2.0.dist-info/METADATA +208 -0
- pyedb-0.2.0.dist-info/RECORD +128 -0
- pyedb-0.2.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
from pyedb.dotnet.edb_core.dotnet.database import (
|
|
2
|
+
DifferentialPairDotNet,
|
|
3
|
+
ExtendedNetDotNet,
|
|
4
|
+
NetClassDotNet,
|
|
5
|
+
NetDotNet,
|
|
6
|
+
)
|
|
7
|
+
from pyedb.dotnet.edb_core.edb_data.padstacks_data import EDBPadstackInstance
|
|
8
|
+
from pyedb.dotnet.edb_core.edb_data.primitives_data import cast
|
|
9
|
+
from pyedb.generic.general_methods import pyedb_function_handler
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class EDBNetsData(NetDotNet):
|
|
13
|
+
"""Manages EDB functionalities for a primitives.
|
|
14
|
+
It Inherits EDB Object properties.
|
|
15
|
+
|
|
16
|
+
Examples
|
|
17
|
+
--------
|
|
18
|
+
>>> from pyedb import Edb
|
|
19
|
+
>>> edb = Edb(myedb, edbversion="2021.2")
|
|
20
|
+
>>> edb_net = edb.nets.nets["GND"]
|
|
21
|
+
>>> edb_net.name # Class Property
|
|
22
|
+
>>> edb_net.name # EDB Object Property
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
def __getattr__(self, key):
|
|
26
|
+
try:
|
|
27
|
+
return self[key]
|
|
28
|
+
except:
|
|
29
|
+
try:
|
|
30
|
+
return getattr(self.net_object, key)
|
|
31
|
+
except AttributeError:
|
|
32
|
+
raise AttributeError("Attribute not present")
|
|
33
|
+
|
|
34
|
+
def __init__(self, raw_net, core_app):
|
|
35
|
+
self._app = core_app
|
|
36
|
+
self._core_components = core_app.components
|
|
37
|
+
self._core_primitive = core_app.modeler
|
|
38
|
+
self.net_object = raw_net
|
|
39
|
+
NetDotNet.__init__(self, self._app, raw_net)
|
|
40
|
+
|
|
41
|
+
@property
|
|
42
|
+
def primitives(self):
|
|
43
|
+
"""Return the list of primitives that belongs to the net.
|
|
44
|
+
|
|
45
|
+
Returns
|
|
46
|
+
-------
|
|
47
|
+
list of :class:`pyedb.dotnet.edb_core.edb_data.primitives_data.EDBPrimitives`
|
|
48
|
+
"""
|
|
49
|
+
return [cast(i, self._app) for i in self.net_object.Primitives]
|
|
50
|
+
|
|
51
|
+
@property
|
|
52
|
+
def padstack_instances(self):
|
|
53
|
+
"""Return the list of primitives that belongs to the net.
|
|
54
|
+
|
|
55
|
+
Returns
|
|
56
|
+
-------
|
|
57
|
+
list of :class:`pyedb.dotnet.edb_core.edb_data.padstacks_data.EDBPadstackInstance`"""
|
|
58
|
+
name = self.name
|
|
59
|
+
return [
|
|
60
|
+
EDBPadstackInstance(i, self._app) for i in self.net_object.PadstackInstances if i.GetNet().GetName() == name
|
|
61
|
+
]
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def components(self):
|
|
65
|
+
"""Return the list of components that touch the net.
|
|
66
|
+
|
|
67
|
+
Returns
|
|
68
|
+
-------
|
|
69
|
+
dict[str, :class:`pyedb.dotnet.edb_core.edb_data.components_data.EDBComponent`]
|
|
70
|
+
"""
|
|
71
|
+
comps = {}
|
|
72
|
+
for p in self.padstack_instances:
|
|
73
|
+
comp = p.component
|
|
74
|
+
if comp:
|
|
75
|
+
if not comp.refdes in comps:
|
|
76
|
+
comps[comp.refdes] = comp
|
|
77
|
+
return comps
|
|
78
|
+
|
|
79
|
+
@pyedb_function_handler()
|
|
80
|
+
def find_dc_short(self, fix=False):
|
|
81
|
+
"""Find DC-shorted nets.
|
|
82
|
+
|
|
83
|
+
Parameters
|
|
84
|
+
----------
|
|
85
|
+
fix : bool, optional
|
|
86
|
+
If `True`, rename all the nets. (default)
|
|
87
|
+
If `False`, only report dc shorts.
|
|
88
|
+
|
|
89
|
+
Returns
|
|
90
|
+
-------
|
|
91
|
+
List[List[str, str]]
|
|
92
|
+
[[net name, net name]].
|
|
93
|
+
"""
|
|
94
|
+
return self._app.layout_validation.dc_shorts(self.name, fix)
|
|
95
|
+
|
|
96
|
+
@pyedb_function_handler()
|
|
97
|
+
def plot(
|
|
98
|
+
self,
|
|
99
|
+
layers=None,
|
|
100
|
+
show_legend=True,
|
|
101
|
+
save_plot=None,
|
|
102
|
+
outline=None,
|
|
103
|
+
size=(2000, 1000),
|
|
104
|
+
):
|
|
105
|
+
"""Plot a net to Matplotlib 2D chart.
|
|
106
|
+
|
|
107
|
+
Parameters
|
|
108
|
+
----------
|
|
109
|
+
layers : str, list, optional
|
|
110
|
+
Name of the layers to include in the plot. If `None` all the signal layers will be considered.
|
|
111
|
+
show_legend : bool, optional
|
|
112
|
+
If `True` the legend is shown in the plot. (default)
|
|
113
|
+
If `False` the legend is not shown.
|
|
114
|
+
save_plot : str, optional
|
|
115
|
+
If `None` the plot will be shown.
|
|
116
|
+
If a file path is specified the plot will be saved to such file.
|
|
117
|
+
outline : list, optional
|
|
118
|
+
List of points of the outline to plot.
|
|
119
|
+
size : tuple, optional
|
|
120
|
+
Image size in pixel (width, height).
|
|
121
|
+
"""
|
|
122
|
+
|
|
123
|
+
self._app.nets.plot(
|
|
124
|
+
self.name,
|
|
125
|
+
layers=layers,
|
|
126
|
+
show_legend=show_legend,
|
|
127
|
+
save_plot=save_plot,
|
|
128
|
+
outline=outline,
|
|
129
|
+
size=size,
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
@pyedb_function_handler()
|
|
133
|
+
def get_smallest_trace_width(self):
|
|
134
|
+
"""Retrieve the smallest trace width from paths.
|
|
135
|
+
|
|
136
|
+
Returns
|
|
137
|
+
-------
|
|
138
|
+
float
|
|
139
|
+
Trace smallest width.
|
|
140
|
+
"""
|
|
141
|
+
current_value = 1e10
|
|
142
|
+
for prim in self.net_object.Primitives:
|
|
143
|
+
if "GetWidth" in dir(prim):
|
|
144
|
+
width = prim.GetWidth()
|
|
145
|
+
if width < current_value:
|
|
146
|
+
current_value = width
|
|
147
|
+
return current_value
|
|
148
|
+
|
|
149
|
+
@property
|
|
150
|
+
def extended_net(self):
|
|
151
|
+
"""Get extended net and associated components.
|
|
152
|
+
|
|
153
|
+
Returns
|
|
154
|
+
-------
|
|
155
|
+
:class:` :class:`pyedb.dotnet.edb_core.edb_data.nets_data.EDBExtendedNetData`
|
|
156
|
+
|
|
157
|
+
Examples
|
|
158
|
+
--------
|
|
159
|
+
>>> from pyedb import Edb
|
|
160
|
+
>>> app = Edb()
|
|
161
|
+
>>> app.nets["BST_V3P3_S5"].extended_net
|
|
162
|
+
"""
|
|
163
|
+
api_extended_net = self._api_get_extended_net
|
|
164
|
+
obj = EDBExtendedNetData(self._app, api_extended_net)
|
|
165
|
+
|
|
166
|
+
if not obj.is_null:
|
|
167
|
+
return obj
|
|
168
|
+
else: # pragma: no cover
|
|
169
|
+
return
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
class EDBNetClassData(NetClassDotNet):
|
|
173
|
+
"""Manages EDB functionalities for a primitives.
|
|
174
|
+
It inherits EDB Object properties.
|
|
175
|
+
|
|
176
|
+
Examples
|
|
177
|
+
--------
|
|
178
|
+
>>> from pyedb import Edb
|
|
179
|
+
>>> edb = Edb(myedb, edbversion="2021.2")
|
|
180
|
+
>>> edb.net_classes
|
|
181
|
+
"""
|
|
182
|
+
|
|
183
|
+
def __init__(self, core_app, raw_extended_net=None):
|
|
184
|
+
super().__init__(core_app, raw_extended_net)
|
|
185
|
+
self._app = core_app
|
|
186
|
+
self._core_components = core_app.components
|
|
187
|
+
self._core_primitive = core_app.modeler
|
|
188
|
+
self._core_nets = core_app.nets
|
|
189
|
+
|
|
190
|
+
@property
|
|
191
|
+
def nets(self):
|
|
192
|
+
"""Get nets belong to this net class."""
|
|
193
|
+
return {name: self._core_nets[name] for name in self.api_nets}
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
class EDBExtendedNetData(ExtendedNetDotNet):
|
|
197
|
+
"""Manages EDB functionalities for a primitives.
|
|
198
|
+
It Inherits EDB Object properties.
|
|
199
|
+
|
|
200
|
+
Examples
|
|
201
|
+
--------
|
|
202
|
+
>>> from pyedb import Edb
|
|
203
|
+
>>> edb = Edb(myedb, edbversion="2021.2")
|
|
204
|
+
>>> edb_extended_net = edb.nets.extended_nets["GND"]
|
|
205
|
+
>>> edb_extended_net.name # Class Property
|
|
206
|
+
"""
|
|
207
|
+
|
|
208
|
+
def __init__(self, core_app, raw_extended_net=None):
|
|
209
|
+
self._app = core_app
|
|
210
|
+
self._core_components = core_app.components
|
|
211
|
+
self._core_primitive = core_app.modeler
|
|
212
|
+
self._core_nets = core_app.nets
|
|
213
|
+
ExtendedNetDotNet.__init__(self, self._app, raw_extended_net)
|
|
214
|
+
|
|
215
|
+
@property
|
|
216
|
+
def nets(self):
|
|
217
|
+
"""Nets dictionary."""
|
|
218
|
+
return {name: self._core_nets[name] for name in self.api_nets}
|
|
219
|
+
|
|
220
|
+
@property
|
|
221
|
+
def components(self):
|
|
222
|
+
"""Dictionary of components."""
|
|
223
|
+
comps = {}
|
|
224
|
+
for _, obj in self.nets.items():
|
|
225
|
+
comps.update(obj.components)
|
|
226
|
+
return comps
|
|
227
|
+
|
|
228
|
+
@property
|
|
229
|
+
def rlc(self):
|
|
230
|
+
"""Dictionary of rlc components."""
|
|
231
|
+
return {
|
|
232
|
+
name: comp for name, comp in self.components.items() if comp.type in ["Inductor", "Resistor", "Capacitor"]
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
@property
|
|
236
|
+
def serial_rlc(self):
|
|
237
|
+
"""Dictionary of series components."""
|
|
238
|
+
comps_common = {}
|
|
239
|
+
nets = self.nets
|
|
240
|
+
for net in nets:
|
|
241
|
+
comps_common.update(
|
|
242
|
+
{
|
|
243
|
+
i: v
|
|
244
|
+
for i, v in self._app._nets[net].components.items()
|
|
245
|
+
if list(set(v.nets).intersection(nets)) != [net] and v.type in ["Resistor", "Inductor", "Capacitor"]
|
|
246
|
+
}
|
|
247
|
+
)
|
|
248
|
+
return comps_common
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
class EDBDifferentialPairData(DifferentialPairDotNet):
|
|
252
|
+
"""Manages EDB functionalities for a primitive.
|
|
253
|
+
It inherits EDB object properties.
|
|
254
|
+
|
|
255
|
+
Examples
|
|
256
|
+
--------
|
|
257
|
+
>>> from pyedb import Edb
|
|
258
|
+
>>> edb = Edb(myedb, edbversion="2021.2")
|
|
259
|
+
>>> diff_pair = edb.differential_pairs["DQ4"]
|
|
260
|
+
>>> diff_pair.positive_net
|
|
261
|
+
>>> diff_pair.negative_net
|
|
262
|
+
"""
|
|
263
|
+
|
|
264
|
+
def __init__(self, core_app, api_object=None):
|
|
265
|
+
self._app = core_app
|
|
266
|
+
self._core_components = core_app.components
|
|
267
|
+
self._core_primitive = core_app.modeler
|
|
268
|
+
self._core_nets = core_app.nets
|
|
269
|
+
DifferentialPairDotNet.__init__(self, self._app, api_object)
|
|
270
|
+
|
|
271
|
+
@property
|
|
272
|
+
def positive_net(self):
|
|
273
|
+
# type: ()->EDBNetsData
|
|
274
|
+
"""Positive Net."""
|
|
275
|
+
return EDBNetsData(self.api_positive_net, self._app)
|
|
276
|
+
|
|
277
|
+
@property
|
|
278
|
+
def negative_net(self):
|
|
279
|
+
# type: ()->EDBNetsData
|
|
280
|
+
"""Negative Net."""
|
|
281
|
+
return EDBNetsData(self.api_negative_net, self._app)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
class ObjBase(object):
|
|
2
|
+
"""Manages EDB functionalities for a base object."""
|
|
3
|
+
|
|
4
|
+
def __init__(self, pedb, edb_object):
|
|
5
|
+
self._pedb = pedb
|
|
6
|
+
self._edb_object = edb_object
|
|
7
|
+
|
|
8
|
+
@property
|
|
9
|
+
def is_null(self):
|
|
10
|
+
"""Flag indicating if this object is null."""
|
|
11
|
+
return self._edb_object.IsNull()
|
|
12
|
+
|
|
13
|
+
@property
|
|
14
|
+
def type(self):
|
|
15
|
+
"""Type of the edb object."""
|
|
16
|
+
try:
|
|
17
|
+
return self._edb_object.GetType()
|
|
18
|
+
except AttributeError: # pragma: no cover
|
|
19
|
+
return None
|