pyedb 0.53.0__py3-none-any.whl → 0.55.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 -8
- pyedb/configuration/cfg_boundaries.py +69 -151
- pyedb/configuration/cfg_components.py +201 -460
- pyedb/configuration/cfg_data.py +4 -2
- pyedb/configuration/cfg_general.py +13 -36
- pyedb/configuration/cfg_modeler.py +2 -1
- pyedb/configuration/cfg_nets.py +21 -35
- pyedb/configuration/cfg_operations.py +22 -151
- pyedb/configuration/cfg_package_definition.py +56 -112
- pyedb/configuration/cfg_padstacks.py +292 -688
- pyedb/configuration/cfg_pin_groups.py +32 -79
- pyedb/configuration/cfg_ports_sources.py +20 -9
- pyedb/configuration/cfg_s_parameter_models.py +67 -172
- pyedb/configuration/cfg_setup.py +102 -295
- pyedb/configuration/configuration.py +66 -6
- pyedb/dotnet/database/cell/connectable.py +38 -9
- pyedb/dotnet/database/cell/hierarchy/component.py +28 -28
- pyedb/dotnet/database/cell/hierarchy/model.py +1 -1
- pyedb/dotnet/database/cell/layout.py +64 -3
- pyedb/dotnet/database/cell/layout_obj.py +3 -3
- pyedb/dotnet/database/cell/primitive/path.py +6 -8
- pyedb/dotnet/database/cell/primitive/primitive.py +10 -31
- pyedb/dotnet/database/cell/terminal/edge_terminal.py +2 -2
- pyedb/dotnet/database/cell/terminal/padstack_instance_terminal.py +1 -1
- pyedb/dotnet/database/cell/terminal/pingroup_terminal.py +1 -1
- pyedb/dotnet/database/cell/terminal/point_terminal.py +1 -1
- pyedb/dotnet/database/cell/terminal/terminal.py +26 -28
- pyedb/dotnet/database/cell/voltage_regulator.py +0 -21
- pyedb/dotnet/database/components.py +99 -91
- pyedb/dotnet/database/definition/component_def.py +4 -4
- pyedb/dotnet/database/definition/component_model.py +1 -1
- pyedb/dotnet/database/definition/package_def.py +2 -3
- pyedb/dotnet/database/dotnet/database.py +27 -218
- pyedb/dotnet/database/dotnet/primitive.py +16 -16
- pyedb/dotnet/database/edb_data/control_file.py +5 -5
- pyedb/dotnet/database/edb_data/hfss_extent_info.py +6 -6
- pyedb/dotnet/database/edb_data/layer_data.py +35 -35
- pyedb/dotnet/database/edb_data/padstacks_data.py +65 -90
- pyedb/dotnet/database/edb_data/primitives_data.py +5 -5
- pyedb/dotnet/database/edb_data/sources.py +6 -6
- pyedb/dotnet/database/edb_data/variables.py +8 -4
- pyedb/dotnet/database/geometry/point_data.py +14 -10
- pyedb/dotnet/database/geometry/polygon_data.py +3 -5
- pyedb/dotnet/database/hfss.py +50 -52
- pyedb/dotnet/database/layout_validation.py +14 -11
- pyedb/dotnet/database/materials.py +10 -11
- pyedb/dotnet/database/modeler.py +104 -101
- pyedb/dotnet/database/nets.py +20 -23
- pyedb/dotnet/database/padstack.py +156 -84
- pyedb/dotnet/database/sim_setup_data/data/settings.py +24 -0
- pyedb/dotnet/database/sim_setup_data/io/siwave.py +26 -1
- pyedb/dotnet/database/siwave.py +47 -47
- pyedb/dotnet/database/stackup.py +152 -87
- pyedb/dotnet/database/utilities/heatsink.py +4 -4
- pyedb/dotnet/database/utilities/obj_base.py +3 -3
- pyedb/dotnet/database/utilities/simulation_setup.py +2 -2
- pyedb/dotnet/database/utilities/value.py +116 -0
- pyedb/dotnet/edb.py +248 -170
- pyedb/edb_logger.py +12 -27
- pyedb/extensions/via_design_backend.py +6 -3
- pyedb/generic/design_types.py +68 -21
- pyedb/generic/general_methods.py +0 -120
- pyedb/generic/process.py +44 -108
- pyedb/generic/settings.py +75 -19
- pyedb/grpc/__init__.py +0 -0
- pyedb/grpc/database/components.py +55 -17
- pyedb/grpc/database/control_file.py +5 -5
- pyedb/grpc/database/definition/materials.py +24 -31
- pyedb/grpc/database/definition/package_def.py +18 -18
- pyedb/grpc/database/definition/padstack_def.py +104 -51
- pyedb/grpc/database/geometry/arc_data.py +7 -5
- pyedb/grpc/database/geometry/point_3d_data.py +8 -7
- pyedb/grpc/database/geometry/polygon_data.py +4 -3
- pyedb/grpc/database/hierarchy/component.py +43 -38
- pyedb/grpc/database/hierarchy/pin_pair_model.py +15 -14
- pyedb/grpc/database/hierarchy/pingroup.py +9 -9
- pyedb/grpc/database/layers/stackup_layer.py +45 -44
- pyedb/grpc/database/layout/layout.py +17 -13
- pyedb/grpc/database/layout/voltage_regulator.py +7 -7
- pyedb/grpc/database/layout_validation.py +16 -15
- pyedb/grpc/database/modeler.py +60 -58
- pyedb/grpc/database/net/net.py +15 -14
- pyedb/grpc/database/nets.py +112 -31
- pyedb/grpc/database/padstacks.py +303 -190
- pyedb/grpc/database/ports/ports.py +5 -6
- pyedb/grpc/database/primitive/bondwire.py +8 -7
- pyedb/grpc/database/primitive/circle.py +4 -4
- pyedb/grpc/database/primitive/padstack_instance.py +191 -23
- pyedb/grpc/database/primitive/path.py +7 -7
- pyedb/grpc/database/primitive/polygon.py +3 -3
- pyedb/grpc/database/primitive/primitive.py +13 -17
- pyedb/grpc/database/primitive/rectangle.py +13 -13
- pyedb/grpc/database/simulation_setup/hfss_general_settings.py +1 -1
- pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +10 -0
- pyedb/grpc/database/simulation_setup/siwave_simulation_setup.py +17 -1
- pyedb/grpc/database/siwave.py +31 -25
- pyedb/grpc/database/source_excitations.py +335 -233
- pyedb/grpc/database/stackup.py +165 -148
- pyedb/grpc/database/terminal/bundle_terminal.py +18 -8
- pyedb/grpc/database/terminal/edge_terminal.py +10 -0
- pyedb/grpc/database/terminal/padstack_instance_terminal.py +16 -5
- pyedb/grpc/database/terminal/pingroup_terminal.py +12 -11
- pyedb/grpc/database/terminal/point_terminal.py +4 -3
- pyedb/grpc/database/terminal/terminal.py +9 -9
- pyedb/grpc/database/utility/value.py +109 -0
- pyedb/grpc/database/utility/xml_control_file.py +5 -5
- pyedb/grpc/edb.py +130 -63
- pyedb/grpc/edb_init.py +3 -10
- pyedb/grpc/rpc_session.py +10 -10
- pyedb/libraries/common.py +366 -0
- pyedb/libraries/rf_libraries/base_functions.py +1358 -0
- pyedb/libraries/rf_libraries/planar_antennas.py +628 -0
- pyedb/misc/decorators.py +61 -0
- pyedb/misc/misc.py +0 -13
- pyedb/siwave.py +2 -2
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/METADATA +2 -3
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/RECORD +119 -112
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/WHEEL +0 -0
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/licenses/LICENSE +0 -0
pyedb/configuration/cfg_setup.py
CHANGED
|
@@ -31,108 +31,34 @@ class CfgSetup:
|
|
|
31
31
|
|
|
32
32
|
"""
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
discrete_sweep = False
|
|
52
|
-
if freq_string:
|
|
53
|
-
for _sweep in freq_string:
|
|
54
|
-
_sw = _sweep.split(" ")
|
|
55
|
-
edb_setup.add_sweep(
|
|
56
|
-
name=i["name"],
|
|
57
|
-
distribution=_sw[0],
|
|
58
|
-
start_freq=_sw[1],
|
|
59
|
-
stop_freq=_sw[2],
|
|
60
|
-
step=_sw[3],
|
|
61
|
-
discrete=discrete_sweep,
|
|
62
|
-
)
|
|
63
|
-
else:
|
|
64
|
-
edb_setup.add_sweep(i["name"], frequency_set=f_set, discrete=discrete_sweep)
|
|
65
|
-
|
|
66
|
-
class DotNet(Grpc):
|
|
67
|
-
def __init__(self, parent):
|
|
68
|
-
super().__init__(parent)
|
|
69
|
-
|
|
70
|
-
@staticmethod
|
|
71
|
-
def set_frequency_string(sweep, freq_string):
|
|
72
|
-
sweep.frequency_string = freq_string
|
|
73
|
-
|
|
74
|
-
def apply_freq_sweep(self, edb_setup):
|
|
75
|
-
for i in self.parent.parent.freq_sweep:
|
|
76
|
-
f_set = []
|
|
77
|
-
freq_string = []
|
|
78
|
-
for f in i.get("frequencies", []):
|
|
79
|
-
if isinstance(f, dict):
|
|
80
|
-
increment = f.get("increment", f.get("points", f.get("samples", f.get("step"))))
|
|
81
|
-
f_set.append([f["distribution"], f["start"], f["stop"], increment])
|
|
82
|
-
else:
|
|
83
|
-
freq_string.append(f)
|
|
84
|
-
sweep = edb_setup.add_sweep(i["name"], frequency_set=f_set, sweep_type=i["type"])
|
|
85
|
-
if len(freq_string) > 0:
|
|
86
|
-
self.parent.api.set_frequency_string(sweep, freq_string)
|
|
87
|
-
|
|
88
|
-
@property
|
|
89
|
-
def pyedb_obj(self):
|
|
90
|
-
return self.parent.pyedb_obj
|
|
91
|
-
|
|
92
|
-
def __init__(self, parent):
|
|
93
|
-
self.parent = parent
|
|
94
|
-
self.pedb = parent.pedb
|
|
95
|
-
if self.pedb.grpc:
|
|
96
|
-
self.api = self.Grpc(self)
|
|
97
|
-
else:
|
|
98
|
-
self.api = self.DotNet(self)
|
|
99
|
-
|
|
100
|
-
def _retrieve_parameters_from_edb_common(self):
|
|
101
|
-
self.parent.name = self.pyedb_obj.name
|
|
102
|
-
self.parent.type = self.pyedb_obj.type
|
|
103
|
-
|
|
104
|
-
def _apply_freq_sweep(self, edb_setup):
|
|
105
|
-
self.api.apply_freq_sweep(edb_setup)
|
|
106
|
-
|
|
107
|
-
class Grpc(Common):
|
|
108
|
-
def __init__(self, parent):
|
|
109
|
-
super().__init__(parent)
|
|
110
|
-
|
|
111
|
-
def set_parameters_to_edb(self):
|
|
112
|
-
pass
|
|
113
|
-
|
|
114
|
-
def retrieve_parameters_from_edb(self):
|
|
115
|
-
pass
|
|
116
|
-
|
|
117
|
-
class DotNet(Grpc):
|
|
118
|
-
def __init__(self, parent):
|
|
119
|
-
super().__init__(parent)
|
|
34
|
+
@staticmethod
|
|
35
|
+
def set_frequency_string(sweep, freq_string):
|
|
36
|
+
sweep.frequency_string = freq_string
|
|
37
|
+
|
|
38
|
+
def apply_freq_sweep(self, edb_setup):
|
|
39
|
+
for i in self.freq_sweep:
|
|
40
|
+
f_set = []
|
|
41
|
+
freq_string = []
|
|
42
|
+
for f in i.get("frequencies", []):
|
|
43
|
+
if isinstance(f, dict):
|
|
44
|
+
increment = f.get("increment", f.get("points", f.get("samples", f.get("step"))))
|
|
45
|
+
f_set.append([f["distribution"], f["start"], f["stop"], increment])
|
|
46
|
+
else:
|
|
47
|
+
freq_string.append(f)
|
|
48
|
+
sweep = edb_setup.add_sweep(i["name"], frequency_set=f_set, sweep_type=i["type"])
|
|
49
|
+
if len(freq_string) > 0:
|
|
50
|
+
self.set_frequency_string(sweep, freq_string)
|
|
120
51
|
|
|
121
52
|
def __init__(self, pedb, pedb_obj, **kwargs):
|
|
122
53
|
self.pedb = pedb
|
|
123
54
|
self.pyedb_obj = pedb_obj
|
|
124
|
-
self.name = kwargs
|
|
55
|
+
self.name = kwargs["name"]
|
|
125
56
|
self.type = ""
|
|
126
57
|
|
|
127
58
|
self.freq_sweep = []
|
|
128
59
|
|
|
129
60
|
self.freq_sweep = kwargs.get("freq_sweep", [])
|
|
130
61
|
|
|
131
|
-
if self.pedb.grpc:
|
|
132
|
-
self.api = self.Grpc(self)
|
|
133
|
-
else:
|
|
134
|
-
self.api = self.DotNet(self)
|
|
135
|
-
|
|
136
62
|
def _to_dict_setup(self):
|
|
137
63
|
return {
|
|
138
64
|
"name": self.name,
|
|
@@ -141,30 +67,21 @@ class CfgSetup:
|
|
|
141
67
|
|
|
142
68
|
|
|
143
69
|
class CfgSIwaveACSetup(CfgSetup):
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
edb_setup = self.
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
def retrieve_parameters_from_edb(self):
|
|
160
|
-
self._retrieve_parameters_from_edb_common()
|
|
161
|
-
self.parent.use_si_settings = self.pyedb_obj.use_si_settings
|
|
162
|
-
self.parent.si_slider_position = self.pyedb_obj.si_slider_position
|
|
163
|
-
self.parent.pi_slider_position = self.pyedb_obj.pi_slider_position
|
|
164
|
-
|
|
165
|
-
class DotNet(Grpc):
|
|
166
|
-
def __init__(self, parent):
|
|
167
|
-
super().__init__(parent)
|
|
70
|
+
def set_parameters_to_edb(self):
|
|
71
|
+
if self.name in self.pedb.setups:
|
|
72
|
+
raise "Setup {} already existing. Editing it.".format(self.name)
|
|
73
|
+
|
|
74
|
+
edb_setup = self.pedb.create_siwave_syz_setup(name=self.name)
|
|
75
|
+
if self.si_slider_position is not None:
|
|
76
|
+
edb_setup.si_slider_position = self.si_slider_position
|
|
77
|
+
else:
|
|
78
|
+
edb_setup.pi_slider_position = self.pi_slider_position
|
|
79
|
+
self.apply_freq_sweep(edb_setup)
|
|
80
|
+
|
|
81
|
+
def retrieve_parameters_from_edb(self):
|
|
82
|
+
self.use_si_settings = self.pyedb_obj.use_si_settings
|
|
83
|
+
self.si_slider_position = self.pyedb_obj.si_slider_position
|
|
84
|
+
self.pi_slider_position = self.pyedb_obj.pi_slider_position
|
|
168
85
|
|
|
169
86
|
def __init__(self, pedb, pyedb_obj, **kwargs):
|
|
170
87
|
super().__init__(pedb, pyedb_obj, **kwargs)
|
|
@@ -186,35 +103,17 @@ class CfgSIwaveACSetup(CfgSetup):
|
|
|
186
103
|
|
|
187
104
|
|
|
188
105
|
class CfgSIwaveDCSetup(CfgSetup):
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
106
|
+
def retrieve_parameters_from_edb(self):
|
|
107
|
+
self.dc_slider_position = self.pyedb_obj.dc_settings.dc_slider_position
|
|
108
|
+
dc_ir_settings = dict()
|
|
109
|
+
dc_ir_settings["export_dc_thermal_data"] = self.pyedb_obj.dc_ir_settings.export_dc_thermal_data
|
|
110
|
+
self.dc_ir_settings = dc_ir_settings
|
|
192
111
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
edb_setup.settings.export_dc_thermal_data = self.parent.dc_ir_settings.get("export_dc_thermal_data", False)
|
|
199
|
-
|
|
200
|
-
def retrieve_parameters_from_edb(self):
|
|
201
|
-
self._retrieve_parameters_from_edb_common()
|
|
202
|
-
self.parent.dc_slider_position = self.pyedb_obj.dc_settings.dc_slider_position
|
|
203
|
-
dc_ir_settings = dict()
|
|
204
|
-
dc_ir_settings["export_dc_thermal_data"] = self.pyedb_obj.dc_ir_settings.export_dc_thermal_data
|
|
205
|
-
self.parent.dc_ir_settings = dc_ir_settings
|
|
206
|
-
|
|
207
|
-
class DotNet(Grpc):
|
|
208
|
-
def __init__(self, parent):
|
|
209
|
-
super().__init__(parent)
|
|
210
|
-
|
|
211
|
-
def set_parameters_to_edb(self):
|
|
212
|
-
edb_setup = self.pedb.create_siwave_dc_setup(
|
|
213
|
-
name=self.parent.name, dc_slider_position=self.parent.dc_slider_position
|
|
214
|
-
)
|
|
215
|
-
edb_setup.dc_settings.dc_slider_position = self.parent.dc_slider_position
|
|
216
|
-
dc_ir_settings = self.parent.dc_ir_settings
|
|
217
|
-
edb_setup.dc_ir_settings.export_dc_thermal_data = dc_ir_settings.get("export_dc_thermal_data", False)
|
|
112
|
+
def set_parameters_to_edb(self):
|
|
113
|
+
edb_setup = self.pedb.create_siwave_dc_setup(name=self.name, dc_slider_position=self.dc_slider_position)
|
|
114
|
+
edb_setup.dc_settings.dc_slider_position = self.dc_slider_position
|
|
115
|
+
dc_ir_settings = self.dc_ir_settings
|
|
116
|
+
edb_setup.dc_ir_settings.export_dc_thermal_data = dc_ir_settings.get("export_dc_thermal_data", False)
|
|
218
117
|
|
|
219
118
|
def __init__(self, pedb, pyedb_obj, **kwargs):
|
|
220
119
|
super().__init__(pedb, pyedb_obj, **kwargs)
|
|
@@ -229,107 +128,49 @@ class CfgSIwaveDCSetup(CfgSetup):
|
|
|
229
128
|
|
|
230
129
|
|
|
231
130
|
class CfgHFSSSetup(CfgSetup):
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
131
|
+
def set_parameters_to_edb(self):
|
|
132
|
+
if self.name in self.pedb.setups:
|
|
133
|
+
raise "Setup {} already existing. Editing it.".format(self.name)
|
|
134
|
+
|
|
135
|
+
edb_setup = self.pedb.create_hfss_setup(self.name)
|
|
136
|
+
edb_setup.set_solution_single_frequency(self.f_adapt, self.max_num_passes, self.max_mag_delta_s)
|
|
137
|
+
|
|
138
|
+
self.apply_freq_sweep(edb_setup)
|
|
139
|
+
|
|
140
|
+
for i in self.mesh_operations:
|
|
141
|
+
edb_setup.add_length_mesh_operation(
|
|
142
|
+
name=i["name"],
|
|
143
|
+
max_elements=i.get("max_elements", 1000),
|
|
144
|
+
max_length=i.get("max_length", "1mm"),
|
|
145
|
+
restrict_length=i.get("restrict_length", True),
|
|
146
|
+
refine_inside=i.get("refine_inside", False),
|
|
147
|
+
# mesh_region=i.get(mesh_region),
|
|
148
|
+
net_layer_list=i.get("nets_layers_list", {}),
|
|
243
149
|
)
|
|
244
150
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
for setup_name, sweeps in setup_sweeps.items():
|
|
267
|
-
sw_name = sweeps[0].name
|
|
268
|
-
sw_type = sweeps[0].type.name.lower().split("_")[0]
|
|
269
|
-
freq_strings = [f.frequency_string for f in sweeps]
|
|
270
|
-
self.parent.freq_sweep.append({"name": sw_name, "type": sw_type, "frequencies": freq_strings})
|
|
271
|
-
|
|
272
|
-
self.parent.mesh_operations = []
|
|
273
|
-
from ansys.edb.core.simulation_setup.mesh_operation import (
|
|
274
|
-
LengthMeshOperation as GrpcLengthMeshOperation,
|
|
151
|
+
def retrieve_parameters_from_edb(self):
|
|
152
|
+
adaptive_frequency_data_list = list(self.pyedb_obj.adaptive_settings.adaptive_frequency_data_list)[0]
|
|
153
|
+
self.f_adapt = adaptive_frequency_data_list.adaptive_frequency
|
|
154
|
+
self.max_num_passes = adaptive_frequency_data_list.max_passes
|
|
155
|
+
self.max_mag_delta_s = adaptive_frequency_data_list.max_delta
|
|
156
|
+
self.freq_sweep = []
|
|
157
|
+
for name, sw in self.pyedb_obj.sweeps.items():
|
|
158
|
+
self.freq_sweep.append({"name": name, "type": sw.type, "frequencies": sw.frequency_string})
|
|
159
|
+
|
|
160
|
+
self.mesh_operations = []
|
|
161
|
+
for name, mop in self.pyedb_obj.mesh_operations.items():
|
|
162
|
+
self.mesh_operations.append(
|
|
163
|
+
{
|
|
164
|
+
"name": name,
|
|
165
|
+
"type": mop.type,
|
|
166
|
+
"max_elements": mop.max_elements,
|
|
167
|
+
"max_length": mop.max_length,
|
|
168
|
+
"restrict_length": mop.restrict_length,
|
|
169
|
+
"refine_inside": mop.refine_inside,
|
|
170
|
+
"nets_layers_list": mop.nets_layers_list,
|
|
171
|
+
}
|
|
275
172
|
)
|
|
276
173
|
|
|
277
|
-
for mesh_op in self.pyedb_obj.mesh_operations:
|
|
278
|
-
if isinstance(mesh_op, GrpcLengthMeshOperation):
|
|
279
|
-
mop_type = "length"
|
|
280
|
-
else:
|
|
281
|
-
mop_type = "skin"
|
|
282
|
-
self.parent.mesh_operations.append(
|
|
283
|
-
{
|
|
284
|
-
"name": mesh_op.name,
|
|
285
|
-
"type": mop_type,
|
|
286
|
-
"max_elements": mesh_op.max_elements,
|
|
287
|
-
"max_length": mesh_op.max_length,
|
|
288
|
-
"restrict_length": mesh_op.restrict_max_length,
|
|
289
|
-
"refine_inside": mesh_op.refine_inside,
|
|
290
|
-
"nets_layers_list": mesh_op.net_layer_info,
|
|
291
|
-
}
|
|
292
|
-
)
|
|
293
|
-
|
|
294
|
-
@staticmethod
|
|
295
|
-
def sort_sweep_data(sweep_data):
|
|
296
|
-
"""grpc sweep data contains all sweeps for each setup, we need to sort thwm by setup"""
|
|
297
|
-
setups = {}
|
|
298
|
-
for sweep in sweep_data:
|
|
299
|
-
if sweep.name not in setups:
|
|
300
|
-
setups[sweep.name] = [sweep]
|
|
301
|
-
else:
|
|
302
|
-
setups[sweep.name].append(sweep)
|
|
303
|
-
return setups
|
|
304
|
-
|
|
305
|
-
class DotNet(Grpc):
|
|
306
|
-
def __init__(self, parent):
|
|
307
|
-
super().__init__(parent)
|
|
308
|
-
|
|
309
|
-
def retrieve_parameters_from_edb(self):
|
|
310
|
-
self._retrieve_parameters_from_edb_common()
|
|
311
|
-
adaptive_frequency_data_list = list(self.pyedb_obj.adaptive_settings.adaptive_frequency_data_list)[0]
|
|
312
|
-
self.parent.f_adapt = adaptive_frequency_data_list.adaptive_frequency
|
|
313
|
-
self.parent.max_num_passes = adaptive_frequency_data_list.max_passes
|
|
314
|
-
self.parent.max_mag_delta_s = adaptive_frequency_data_list.max_delta
|
|
315
|
-
self.parent.freq_sweep = []
|
|
316
|
-
for name, sw in self.pyedb_obj.sweeps.items():
|
|
317
|
-
self.parent.freq_sweep.append({"name": name, "type": sw.type, "frequencies": sw.frequency_string})
|
|
318
|
-
|
|
319
|
-
self.parent.mesh_operations = []
|
|
320
|
-
for name, mop in self.pyedb_obj.mesh_operations.items():
|
|
321
|
-
self.parent.mesh_operations.append(
|
|
322
|
-
{
|
|
323
|
-
"name": name,
|
|
324
|
-
"type": mop.type,
|
|
325
|
-
"max_elements": mop.max_elements,
|
|
326
|
-
"max_length": mop.max_length,
|
|
327
|
-
"restrict_length": mop.restrict_length,
|
|
328
|
-
"refine_inside": mop.refine_inside,
|
|
329
|
-
"nets_layers_list": mop.nets_layers_list,
|
|
330
|
-
}
|
|
331
|
-
)
|
|
332
|
-
|
|
333
174
|
def __init__(self, pedb, pyedb_obj, **kwargs):
|
|
334
175
|
super().__init__(pedb, pyedb_obj, **kwargs)
|
|
335
176
|
self.type = "hfss"
|
|
@@ -354,70 +195,36 @@ class CfgHFSSSetup(CfgSetup):
|
|
|
354
195
|
|
|
355
196
|
|
|
356
197
|
class CfgSetups:
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
self.parent.setups.append(siwave_dc)
|
|
373
|
-
elif setup.type.name.lower() == "si_wave":
|
|
374
|
-
siwave_ac = CfgSIwaveACSetup(self._pedb, setup)
|
|
375
|
-
siwave_ac.api.retrieve_parameters_from_edb()
|
|
376
|
-
self.parent.setups.append(siwave_ac)
|
|
377
|
-
elif setup.type.name.lower() == "raptor_x":
|
|
378
|
-
pass
|
|
379
|
-
|
|
380
|
-
class DotNet(Grpc):
|
|
381
|
-
def __init__(self, parent):
|
|
382
|
-
super().__init__(parent)
|
|
383
|
-
|
|
384
|
-
def retrieve_parameters_from_edb(self):
|
|
385
|
-
self.parent.setups = []
|
|
386
|
-
for _, setup in self._pedb.setups.items():
|
|
387
|
-
if setup.type == "hfss":
|
|
388
|
-
hfss = CfgHFSSSetup(self._pedb, setup)
|
|
389
|
-
hfss.api.retrieve_parameters_from_edb()
|
|
390
|
-
self.parent.setups.append(hfss)
|
|
391
|
-
elif setup.type == "siwave_dc":
|
|
392
|
-
siwave_dc = CfgSIwaveDCSetup(self._pedb, setup)
|
|
393
|
-
siwave_dc.api.retrieve_parameters_from_edb()
|
|
394
|
-
self.parent.setups.append(siwave_dc)
|
|
395
|
-
elif setup.type == "siwave_ac":
|
|
396
|
-
siwave_ac = CfgSIwaveACSetup(self._pedb, setup)
|
|
397
|
-
siwave_ac.api.retrieve_parameters_from_edb()
|
|
398
|
-
self.parent.setups.append(siwave_ac)
|
|
198
|
+
def retrieve_parameters_from_edb(self):
|
|
199
|
+
self.setups = []
|
|
200
|
+
for _, setup in self._pedb.setups.items():
|
|
201
|
+
if setup.type == "hfss":
|
|
202
|
+
hfss = CfgHFSSSetup(self._pedb, setup, name=setup.name)
|
|
203
|
+
hfss.retrieve_parameters_from_edb()
|
|
204
|
+
self.setups.append(hfss)
|
|
205
|
+
elif setup.type == "siwave_dc":
|
|
206
|
+
siwave_dc = CfgSIwaveDCSetup(self._pedb, setup, name=setup.name)
|
|
207
|
+
siwave_dc.retrieve_parameters_from_edb()
|
|
208
|
+
self.setups.append(siwave_dc)
|
|
209
|
+
elif setup.type == "siwave_ac":
|
|
210
|
+
siwave_ac = CfgSIwaveACSetup(self._pedb, setup, name=setup.name)
|
|
211
|
+
siwave_ac.retrieve_parameters_from_edb()
|
|
212
|
+
self.setups.append(siwave_ac)
|
|
399
213
|
|
|
400
214
|
def __init__(self, pedb, setups_data):
|
|
401
|
-
self.
|
|
215
|
+
self._pedb = pedb
|
|
402
216
|
self.setups = []
|
|
403
|
-
if self.pedb.grpc:
|
|
404
|
-
self.api = self.Grpc(self)
|
|
405
|
-
else:
|
|
406
|
-
self.api = self.DotNet(self)
|
|
407
217
|
for stp in setups_data:
|
|
408
218
|
if stp["type"].lower() == "hfss":
|
|
409
|
-
self.setups.append(CfgHFSSSetup(self.
|
|
219
|
+
self.setups.append(CfgHFSSSetup(self._pedb, None, **stp))
|
|
410
220
|
elif stp["type"].lower() in ["siwave_ac", "siwave_syz"]:
|
|
411
|
-
self.setups.append(CfgSIwaveACSetup(self.
|
|
221
|
+
self.setups.append(CfgSIwaveACSetup(self._pedb, None, **stp))
|
|
412
222
|
elif stp["type"].lower() == "siwave_dc":
|
|
413
|
-
self.setups.append(CfgSIwaveDCSetup(self.
|
|
223
|
+
self.setups.append(CfgSIwaveDCSetup(self._pedb, None, **stp))
|
|
414
224
|
|
|
415
225
|
def apply(self):
|
|
416
226
|
for s in self.setups:
|
|
417
|
-
s.
|
|
227
|
+
s.set_parameters_to_edb()
|
|
418
228
|
|
|
419
229
|
def to_dict(self):
|
|
420
230
|
return [i.to_dict() for i in self.setups]
|
|
421
|
-
|
|
422
|
-
def retrieve_parameters_from_edb(self):
|
|
423
|
-
self.api.retrieve_parameters_from_edb()
|
|
@@ -147,7 +147,7 @@ class Configuration:
|
|
|
147
147
|
self.__apply_with_logging("Applying modeler", self.apply_modeler)
|
|
148
148
|
self.__apply_with_logging("Placing ports", self.cfg_data.ports.apply)
|
|
149
149
|
self.__apply_with_logging("Placing probes", self.cfg_data.probes.apply)
|
|
150
|
-
self.__apply_with_logging("Applying operations", self.
|
|
150
|
+
self.__apply_with_logging("Applying operations", self.apply_operations)
|
|
151
151
|
|
|
152
152
|
return True
|
|
153
153
|
|
|
@@ -187,7 +187,7 @@ class Configuration:
|
|
|
187
187
|
pdef.SetData(pdata)
|
|
188
188
|
pdef = self._pedb.pedb_class.database.edb_data.padstacks_data.EDBPadstack(pdef, self._pedb.padstacks)
|
|
189
189
|
p.pyedb_obj = pdef
|
|
190
|
-
p.
|
|
190
|
+
p.set_parameters_to_edb()
|
|
191
191
|
|
|
192
192
|
if modeler.padstack_instances:
|
|
193
193
|
for p in modeler.padstack_instances:
|
|
@@ -199,7 +199,7 @@ class Configuration:
|
|
|
199
199
|
rotation=p.rotation if p.rotation is not None else 0,
|
|
200
200
|
)
|
|
201
201
|
p.pyedb_obj = p_inst
|
|
202
|
-
p.
|
|
202
|
+
p.set_parameters_to_edb()
|
|
203
203
|
|
|
204
204
|
if modeler.planes:
|
|
205
205
|
for p in modeler.planes:
|
|
@@ -244,7 +244,7 @@ class Configuration:
|
|
|
244
244
|
component_part_name=c.definition,
|
|
245
245
|
)
|
|
246
246
|
c.pyedb_obj = obj
|
|
247
|
-
c.
|
|
247
|
+
c.set_parameters_to_edb()
|
|
248
248
|
|
|
249
249
|
primitives = self._pedb.layout.find_primitive(**modeler.primitives_to_delete)
|
|
250
250
|
for i in primitives:
|
|
@@ -261,6 +261,7 @@ class Configuration:
|
|
|
261
261
|
|
|
262
262
|
def get_variables(self):
|
|
263
263
|
"""Retrieve variables from database."""
|
|
264
|
+
self.cfg_data.variables.variables = []
|
|
264
265
|
for name, obj in self._pedb.design_variables.items():
|
|
265
266
|
self.cfg_data.variables.add_variable(name, obj.value_string, obj.description)
|
|
266
267
|
for name, obj in self._pedb.project_variables.items():
|
|
@@ -417,12 +418,13 @@ class Configuration:
|
|
|
417
418
|
self.get_variables()
|
|
418
419
|
self.get_materials()
|
|
419
420
|
self.get_stackup()
|
|
421
|
+
self.get_operations()
|
|
420
422
|
|
|
421
423
|
data = {}
|
|
422
424
|
if kwargs.get("general", False):
|
|
423
425
|
data["general"] = self.cfg_data.general.get_data_from_db()
|
|
424
426
|
if kwargs.get("variables", False):
|
|
425
|
-
data
|
|
427
|
+
data.update(self.cfg_data.variables.model_dump(exclude_none=True))
|
|
426
428
|
if kwargs.get("stackup", False):
|
|
427
429
|
data["stackup"] = self.cfg_data.stackup.model_dump(exclude_none=True)
|
|
428
430
|
if kwargs.get("package_definitions", False):
|
|
@@ -452,7 +454,7 @@ class Configuration:
|
|
|
452
454
|
if kwargs.get("pin_groups", False):
|
|
453
455
|
data["pin_groups"] = self.cfg_data.pin_groups.get_data_from_db()
|
|
454
456
|
if kwargs.get("operations", False):
|
|
455
|
-
data["operations"] = self.cfg_data.operations.
|
|
457
|
+
data["operations"] = self.cfg_data.operations.model_dump()
|
|
456
458
|
if kwargs.get("padstacks", False):
|
|
457
459
|
self.cfg_data.padstacks.retrieve_parameters_from_edb()
|
|
458
460
|
definitions = []
|
|
@@ -470,6 +472,64 @@ class Configuration:
|
|
|
470
472
|
|
|
471
473
|
return data
|
|
472
474
|
|
|
475
|
+
def apply_operations(self):
|
|
476
|
+
"""Apply operations to the current design."""
|
|
477
|
+
op_cutout = self.cfg_data.operations.cutout
|
|
478
|
+
if op_cutout:
|
|
479
|
+
cutout_params = op_cutout.model_dump()
|
|
480
|
+
auto_identify_nets = cutout_params.pop("auto_identify_nets")
|
|
481
|
+
if auto_identify_nets["enabled"]:
|
|
482
|
+
reference_list = cutout_params.get("reference_list", [])
|
|
483
|
+
if auto_identify_nets:
|
|
484
|
+
self._pedb.nets.generate_extended_nets(
|
|
485
|
+
auto_identify_nets["resistor_below"],
|
|
486
|
+
auto_identify_nets["inductor_below"],
|
|
487
|
+
auto_identify_nets["capacitor_above"],
|
|
488
|
+
auto_identify_nets.get("exception_list", []),
|
|
489
|
+
)
|
|
490
|
+
signal_nets = []
|
|
491
|
+
for i in self._pedb.terminals.values():
|
|
492
|
+
if i.net_name in reference_list:
|
|
493
|
+
continue
|
|
494
|
+
|
|
495
|
+
extended_net = i.net.extended_net
|
|
496
|
+
if extended_net:
|
|
497
|
+
temp = [i2 for i2 in extended_net.nets.keys() if i2 not in reference_list]
|
|
498
|
+
temp = [i2 for i2 in temp if i2 not in signal_nets]
|
|
499
|
+
signal_nets.extend(temp)
|
|
500
|
+
else:
|
|
501
|
+
signal_nets.append(i.net_name)
|
|
502
|
+
|
|
503
|
+
cutout_params["signal_list"] = signal_nets
|
|
504
|
+
polygon_points = self._pedb.cutout(**cutout_params)
|
|
505
|
+
if "pyedb_cutout" not in self._pedb.stackup.all_layers:
|
|
506
|
+
self._pedb.stackup.add_document_layer(name="pyedb_cutout")
|
|
507
|
+
self._pedb.modeler.create_polygon(polygon_points, layer_name="pyedb_cutout", net_name="pyedb_cutout")
|
|
508
|
+
|
|
509
|
+
def get_operations(self):
|
|
510
|
+
if "pyedb_cutout" not in self._pedb.stackup.all_layers:
|
|
511
|
+
return
|
|
512
|
+
|
|
513
|
+
polygons = self._pedb.layout.find_primitive(layer_name="pyedb_cutout")
|
|
514
|
+
if polygons:
|
|
515
|
+
poly = polygons[0]
|
|
516
|
+
custom_extent = poly.polygon_data.points
|
|
517
|
+
net_names = []
|
|
518
|
+
for name, obj in self._pedb.nets.nets.items():
|
|
519
|
+
if obj.primitives:
|
|
520
|
+
if obj.primitives[0].layer.name == "pyedb_cutout":
|
|
521
|
+
continue
|
|
522
|
+
else:
|
|
523
|
+
net_names.append(name)
|
|
524
|
+
reference_list = []
|
|
525
|
+
signal_list = net_names
|
|
526
|
+
|
|
527
|
+
self.cfg_data.operations.add_cutout(
|
|
528
|
+
custom_extent=custom_extent,
|
|
529
|
+
reference_list=reference_list,
|
|
530
|
+
signal_list=signal_list,
|
|
531
|
+
)
|
|
532
|
+
|
|
473
533
|
def export(
|
|
474
534
|
self,
|
|
475
535
|
file_path,
|
|
@@ -55,10 +55,11 @@ class Connectable(LayoutObj):
|
|
|
55
55
|
-------
|
|
56
56
|
str
|
|
57
57
|
"""
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
net = self._edb_object.GetNet()
|
|
59
|
+
if net.IsNull():
|
|
60
|
+
return ""
|
|
61
|
+
else:
|
|
62
|
+
return net.GetName()
|
|
62
63
|
|
|
63
64
|
@net_name.setter
|
|
64
65
|
def net_name(self, name):
|
|
@@ -76,10 +77,38 @@ class Connectable(LayoutObj):
|
|
|
76
77
|
-------
|
|
77
78
|
:class:`dotnet.database.edb_data.nets_data.EDBComponent`
|
|
78
79
|
"""
|
|
79
|
-
|
|
80
|
+
return self._pedb.layout.find_component_by_name(self.component_name) if self.component_name else ""
|
|
81
|
+
|
|
82
|
+
@component.setter
|
|
83
|
+
def component(self, value):
|
|
84
|
+
self._edb_object.SetGroup(self._pedb.components.instances[value]._edb_object)
|
|
80
85
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
86
|
+
@property
|
|
87
|
+
def component_name(self):
|
|
88
|
+
"""Get the name of the component connected to this object."""
|
|
89
|
+
comp = self._edb_object.GetComponent()
|
|
90
|
+
if comp.IsNull():
|
|
91
|
+
return ""
|
|
84
92
|
else:
|
|
85
|
-
return
|
|
93
|
+
return comp.GetName()
|
|
94
|
+
|
|
95
|
+
def get_connected_objects(self):
|
|
96
|
+
"""Get connected objects.
|
|
97
|
+
|
|
98
|
+
Returns
|
|
99
|
+
-------
|
|
100
|
+
list
|
|
101
|
+
"""
|
|
102
|
+
return self._pedb.get_connected_objects(self._layout_obj_instance)
|
|
103
|
+
|
|
104
|
+
def get_connected_object_id_set(self):
|
|
105
|
+
"""Produce a list of all geometries physically connected to a given layout object.
|
|
106
|
+
|
|
107
|
+
Returns
|
|
108
|
+
-------
|
|
109
|
+
list
|
|
110
|
+
Found connected objects IDs with Layout object.
|
|
111
|
+
"""
|
|
112
|
+
layoutInst = self._edb_object.GetLayout().GetLayoutInstance()
|
|
113
|
+
layoutObjInst = layoutInst.GetLayoutObjInstance(self._edb_object, None) # 2nd arg was []
|
|
114
|
+
return [loi.GetLayoutObj().GetId() for loi in layoutInst.GetConnectedObjects(layoutObjInst).Items]
|