pyedb 0.50.0__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/hierarchy/component.py +3 -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 +13 -0
- 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 +604 -652
- pyedb/grpc/database/control_file.py +597 -155
- pyedb/grpc/database/definition/component_def.py +17 -14
- pyedb/grpc/database/definition/materials.py +27 -27
- pyedb/grpc/database/definition/package_def.py +8 -8
- pyedb/grpc/database/definition/padstack_def.py +31 -33
- pyedb/grpc/database/definitions.py +36 -2
- 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 +412 -395
- pyedb/grpc/database/hierarchy/component.py +67 -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 +26 -23
- pyedb/grpc/database/layout/layout.py +12 -12
- pyedb/grpc/database/layout/voltage_regulator.py +8 -8
- pyedb/grpc/database/layout_validation.py +58 -7
- 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 +362 -116
- pyedb/grpc/database/padstacks.py +259 -178
- pyedb/grpc/database/ports/ports.py +23 -17
- pyedb/grpc/database/primitive/padstack_instance.py +45 -30
- pyedb/grpc/database/primitive/path.py +6 -6
- 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 +226 -214
- pyedb/grpc/database/source_excitations.py +307 -40
- pyedb/grpc/database/stackup.py +461 -283
- 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 +542 -739
- pyedb/grpc/edb_init.py +50 -3
- {pyedb-0.50.0.dist-info → pyedb-0.51.2.dist-info}/METADATA +1 -1
- {pyedb-0.50.0.dist-info → pyedb-0.51.2.dist-info}/RECORD +74 -75
- pyedb/grpc/database/utility/simulation_configuration.py +0 -3305
- {pyedb-0.50.0.dist-info → pyedb-0.51.2.dist-info}/LICENSE +0 -0
- {pyedb-0.50.0.dist-info → pyedb-0.51.2.dist-info}/WHEEL +0 -0
|
@@ -304,20 +304,24 @@ class LayoutValidation:
|
|
|
304
304
|
|
|
305
305
|
def illegal_rlc_values(self, fix=False):
|
|
306
306
|
"""Find and fix RLC illegal values."""
|
|
307
|
-
inductors = self._pedb.components.inductors
|
|
308
307
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
308
|
+
for name, objs in {
|
|
309
|
+
"inductors": self._pedb.components.inductors,
|
|
310
|
+
"resistors": self._pedb.components.resistors,
|
|
311
|
+
"capacitors": self._pedb.components.capacitors,
|
|
312
|
+
}.items():
|
|
313
|
+
temp = []
|
|
314
|
+
for k, v in objs.items():
|
|
315
|
+
componentProperty = v.edbcomponent.GetComponentProperty()
|
|
316
|
+
model = componentProperty.GetModel().Clone()
|
|
317
|
+
pinpairs = model.PinPairs
|
|
318
|
+
|
|
319
|
+
if not len(list(pinpairs)): # pragma: no cover
|
|
320
|
+
temp.append(k)
|
|
321
|
+
if fix:
|
|
322
|
+
v.rlc_values = [0, 1, 0]
|
|
323
|
+
|
|
324
|
+
self._pedb._logger.info(f"Found {len(temp)} {name} have no value.")
|
|
321
325
|
return
|
|
322
326
|
|
|
323
327
|
def padstacks_no_name(self, fix=False):
|
pyedb/dotnet/database/modeler.py
CHANGED
pyedb/dotnet/edb.py
CHANGED
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
This module is implicitly loaded in HFSS 3D Layout when launched.
|
|
26
26
|
|
|
27
27
|
"""
|
|
28
|
+
from datetime import datetime
|
|
28
29
|
from itertools import combinations
|
|
29
30
|
import os
|
|
30
31
|
from pathlib import Path
|
|
@@ -91,6 +92,7 @@ from pyedb.dotnet.database.utilities.siwave_simulation_setup import (
|
|
|
91
92
|
SiwaveDCSimulationSetup,
|
|
92
93
|
SiwaveSimulationSetup,
|
|
93
94
|
)
|
|
95
|
+
from pyedb.edb_logger import pyedb_logger
|
|
94
96
|
from pyedb.generic.constants import AEDT_UNITS, SolverType, unit_converter
|
|
95
97
|
from pyedb.generic.general_methods import (
|
|
96
98
|
generate_unique_name,
|
|
@@ -195,6 +197,10 @@ class Edb(Database):
|
|
|
195
197
|
layer_filter: str = None,
|
|
196
198
|
remove_existing_aedt: bool = False,
|
|
197
199
|
):
|
|
200
|
+
self._logger = pyedb_logger
|
|
201
|
+
now = datetime.now()
|
|
202
|
+
self.logger.info(f"Star initializing Edb {now.time()}")
|
|
203
|
+
|
|
198
204
|
if isinstance(edbpath, Path):
|
|
199
205
|
edbpath = str(edbpath)
|
|
200
206
|
|
|
@@ -290,7 +296,7 @@ class Edb(Database):
|
|
|
290
296
|
self._logger.add_file_logger(self.log_name, "Edb")
|
|
291
297
|
self.open_edb()
|
|
292
298
|
if self.active_cell:
|
|
293
|
-
self.logger.info("EDB initialized.")
|
|
299
|
+
self.logger.info(f"EDB initialized.Time lapse {datetime.now() - now}")
|
|
294
300
|
else:
|
|
295
301
|
raise AttributeError("Failed to initialize DLLs.")
|
|
296
302
|
|
pyedb/generic/design_types.py
CHANGED
|
@@ -37,79 +37,200 @@ def Edb(
|
|
|
37
37
|
):
|
|
38
38
|
"""Provides the EDB application interface.
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
40
|
+
This module inherits all objects that belong to EDB.
|
|
41
|
+
|
|
42
|
+
Parameters
|
|
43
|
+
----------
|
|
44
|
+
edbpath : str, optional
|
|
45
|
+
Full path to the ``aedb`` folder. The variable can also contain
|
|
46
|
+
the path to a layout to import. Allowed formats are BRD,
|
|
47
|
+
XML (IPC2581), GDS, and DXF. The default is ``None``.
|
|
48
|
+
For GDS import, the Ansys control file (also XML) should have the same
|
|
49
|
+
name as the GDS file. Only the file extension differs.
|
|
50
|
+
cellname : str, optional
|
|
51
|
+
Name of the cell to select. The default is ``None``.
|
|
52
|
+
isreadonly : bool, optional
|
|
53
|
+
Whether to open EBD in read-only mode when it is
|
|
54
|
+
owned by HFSS 3D Layout. The default is ``False``.
|
|
55
|
+
edbversion : str, optional
|
|
56
|
+
Version of EDB to use. The default is ``"2021.2"``.
|
|
57
|
+
isaedtowned : bool, optional
|
|
58
|
+
Whether to launch EDB from HFSS 3D Layout. The
|
|
59
|
+
default is ``False``.
|
|
60
|
+
oproject : optional
|
|
61
|
+
Reference to the AEDT project object.
|
|
62
|
+
student_version : bool, optional
|
|
63
|
+
Whether to open the AEDT student version. The default is ``False.``
|
|
64
|
+
technology_file : str, optional
|
|
65
|
+
Full path to technology file to be converted to xml before importing or xml. Supported by GDS format only.
|
|
66
|
+
grpc : bool, optional
|
|
67
|
+
Whether to enable gRPC. Default value is ``False``.
|
|
68
|
+
|
|
69
|
+
Returns
|
|
70
|
+
-------
|
|
71
|
+
:class:`Edb <pyedb.dotnet.edb.Edb>` or :class:`Edb <pyedb.grpc.edb.Edb>`
|
|
72
|
+
|
|
73
|
+
Note
|
|
74
|
+
----
|
|
75
|
+
PyEDB gRPC will be released starting ANSYS release 2025R2. For legacy purpose, the gRPC will not be activated by
|
|
76
|
+
default. However, PyEDB gRPC will be the lon term supported version. The legacy PyEDB .NET will be deprecated
|
|
77
|
+
and at some point all new features will only be implemented in PyEDB gRPC. We highly encourage users moving to
|
|
78
|
+
gRPC starting release 2025R2, we tried keeping gRPC version backward compatible with legace .NET as much as
|
|
79
|
+
possible and only minor adjustments are required to be compatible.
|
|
80
|
+
|
|
81
|
+
Examples
|
|
82
|
+
--------
|
|
83
|
+
1. Creating and Opening an EDB Database
|
|
84
84
|
|
|
85
85
|
>>> from pyedb import Edb
|
|
86
|
-
>>> app = Edb()
|
|
87
86
|
|
|
88
|
-
|
|
87
|
+
# Create a new EDB instance
|
|
88
|
+
>>> edb = Edb()
|
|
89
|
+
|
|
90
|
+
# Open an existing AEDB database
|
|
91
|
+
>>> edb = Edb(edbpath="my_project.aedb")
|
|
92
|
+
|
|
93
|
+
# Import a board file (BRD, XML, GDS, etc.)
|
|
94
|
+
>>> edb = Edb(edbpath="my_board.brd")
|
|
95
|
+
|
|
96
|
+
2. Cutout Operation
|
|
97
|
+
|
|
98
|
+
# Simple cutout with signal and reference nets
|
|
99
|
+
>>> edb.cutout(
|
|
100
|
+
>>> signal_list=["PCIe", "USB"],
|
|
101
|
+
>>> reference_list=["GND"]
|
|
102
|
+
>>> )
|
|
103
|
+
|
|
104
|
+
# Advanced cutout with custom parameters
|
|
105
|
+
>>> edb.cutout(
|
|
106
|
+
>>> signal_list=["DDR"],
|
|
107
|
+
>>> reference_list=["GND"],
|
|
108
|
+
>>> extent_type="ConvexHull",
|
|
109
|
+
>>> expansion_size=0.002,
|
|
110
|
+
>>> use_round_corner=True,
|
|
111
|
+
>>> output_aedb_path="cutout.aedb",
|
|
112
|
+
>>> remove_single_pin_components=True
|
|
113
|
+
>>> )
|
|
114
|
+
|
|
115
|
+
3. Exporting Designs
|
|
116
|
+
|
|
117
|
+
# Export to IPC2581 format
|
|
118
|
+
>>> edb.export_to_ipc2581("output.xml", units="millimeter")
|
|
119
|
+
|
|
120
|
+
# Export to HFSS project
|
|
121
|
+
>>> edb.export_hfss("hfss_output")
|
|
122
|
+
|
|
123
|
+
# Export to Q3D project
|
|
124
|
+
>>> edb.export_q3d("q3d_output", net_list=["PowerNet"])
|
|
125
|
+
|
|
126
|
+
# Export to Maxwell project
|
|
127
|
+
>>> edb.export_maxwell("maxwell_output")
|
|
128
|
+
|
|
129
|
+
4. Simulation Setup
|
|
130
|
+
|
|
131
|
+
# Create SIwave SYZ setup
|
|
132
|
+
>>> syz_setup = edb.create_siwave_syz_setup(
|
|
133
|
+
>>> name="GHz_Setup",
|
|
134
|
+
>>> start_freq="1GHz",
|
|
135
|
+
>>> stop_freq="10GHz"
|
|
136
|
+
>>> )
|
|
137
|
+
|
|
138
|
+
# Create SIwave DC setup
|
|
139
|
+
>>> dc_setup = edb.create_siwave_dc_setup(
|
|
140
|
+
>>> name="DC_Analysis",
|
|
141
|
+
>>> use_dc_point=True
|
|
142
|
+
>>> )
|
|
143
|
+
|
|
144
|
+
# Solve with SIwave
|
|
145
|
+
>>> edb.solve_siwave()
|
|
146
|
+
|
|
147
|
+
5. Database Management
|
|
148
|
+
|
|
149
|
+
# Save database
|
|
150
|
+
>>> edb.save()
|
|
151
|
+
|
|
152
|
+
# Save as new database
|
|
153
|
+
>>> edb.save_as("new_project.aedb")
|
|
154
|
+
|
|
155
|
+
# Close database
|
|
156
|
+
>>> edb.close()
|
|
157
|
+
|
|
158
|
+
6. Stackup and Material Operations
|
|
159
|
+
|
|
160
|
+
# Access stackup layers
|
|
161
|
+
>>> for layer_name, layer in edb.stackup.layers.items():
|
|
162
|
+
>>> print(f"Layer: {layer_name}, Thickness: {layer.thickness}")
|
|
163
|
+
|
|
164
|
+
# Add new material
|
|
165
|
+
>>> edb.materials.add_material("MyMaterial", permittivity=4.3, loss_tangent=0.02)
|
|
166
|
+
|
|
167
|
+
# Change layer thickness
|
|
168
|
+
>>> edb.stackup["TopLayer"].thickness = "0.035mm"
|
|
169
|
+
|
|
170
|
+
7. Port Creation
|
|
171
|
+
|
|
172
|
+
# Create wave port between two pins
|
|
173
|
+
>>> wave_port = edb.source_excitation.create_port(
|
|
174
|
+
>>> positive_terminal=pin1,
|
|
175
|
+
>>> negative_terminal=pin2,
|
|
176
|
+
>>> port_type="Wave"
|
|
177
|
+
>>> )
|
|
178
|
+
|
|
179
|
+
# Create lumped port
|
|
180
|
+
>>> lumped_port = edb.source_excitation.create_port(
|
|
181
|
+
>>> positive_terminal=via_terminal,
|
|
182
|
+
>>> port_type="Lumped"
|
|
183
|
+
>>> )
|
|
184
|
+
|
|
185
|
+
8. Component Management
|
|
186
|
+
|
|
187
|
+
# Delete components by type
|
|
188
|
+
>>> edb.components.delete_component(["R1", "C2"])
|
|
189
|
+
|
|
190
|
+
# Set component properties
|
|
191
|
+
>>> edb.components["U1"].set_property("Value", "10nH")
|
|
192
|
+
|
|
193
|
+
9. Parametrization
|
|
194
|
+
|
|
195
|
+
# Auto-parametrize design elements
|
|
196
|
+
>>> params = edb.auto_parametrize_design(
|
|
197
|
+
>>> traces=True,
|
|
198
|
+
>>> pads=True,
|
|
199
|
+
>>> antipads=True,
|
|
200
|
+
>>> use_relative_variables=True
|
|
201
|
+
>>> )
|
|
202
|
+
>>> print("Created parameters:", params)
|
|
89
203
|
|
|
90
|
-
|
|
91
|
-
>>> app['s1'].tofloat
|
|
92
|
-
>>> 0.00025
|
|
93
|
-
>>> app['s1'].tostring
|
|
94
|
-
>>> "0.25mm"
|
|
204
|
+
10. Design Statistics
|
|
95
205
|
|
|
96
|
-
|
|
206
|
+
# Get layout statistics with area calculation
|
|
207
|
+
>>> stats = edb.get_statistics(compute_area=True)
|
|
208
|
+
>>> print(f"Total nets: {stats.net_count}")
|
|
209
|
+
>>> print(f"Total components: {stats.component_count}")
|
|
97
210
|
|
|
98
|
-
|
|
99
|
-
>>> app['s2'].value
|
|
100
|
-
>>> 1.9999999999999998e-05
|
|
101
|
-
>>> app['s2'].description
|
|
102
|
-
>>> 'Spacing between traces'
|
|
211
|
+
11. Layout Validation
|
|
103
212
|
|
|
213
|
+
# Run DRC check
|
|
214
|
+
>>> drc_errors = edb.layout_validation.run_drc()
|
|
215
|
+
>>> print(f"Found {len(drc_errors)} DRC violations")
|
|
104
216
|
|
|
105
|
-
|
|
217
|
+
12. Differential Pairs
|
|
106
218
|
|
|
107
|
-
|
|
219
|
+
# Create differential pair
|
|
220
|
+
>>> edb.differential_pairs.create(
|
|
221
|
+
>>> positive_net="USB_P",
|
|
222
|
+
>>> negative_net="USB_N",
|
|
223
|
+
>>> name="USB_DP"
|
|
224
|
+
>>> )
|
|
108
225
|
|
|
109
|
-
|
|
110
|
-
The XML control file resides in the same directory as the GDS file: (myfile.xml).
|
|
226
|
+
13. Workflow Automation
|
|
111
227
|
|
|
112
|
-
|
|
228
|
+
# Define and run workflow
|
|
229
|
+
>>> workflow = edb.workflow
|
|
230
|
+
>>> workflow.add_task("Import", file_path="input.brd")
|
|
231
|
+
>>> workflow.add_task("Cutout", signal_nets=["PCIe"])
|
|
232
|
+
>>> workflow.add_task("Export", format="IPC2581")
|
|
233
|
+
>>> workflow.run()
|
|
113
234
|
|
|
114
235
|
"""
|
|
115
236
|
|