pyedb 0.15.dev0__py3-none-any.whl → 0.16.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 -1
- pyedb/configuration/cfg_common.py +1 -3
- pyedb/configuration/cfg_components.py +4 -6
- pyedb/configuration/cfg_data.py +3 -6
- pyedb/configuration/cfg_package_definition.py +3 -5
- pyedb/configuration/cfg_setup.py +214 -176
- pyedb/configuration/cfg_stackup.py +4 -4
- pyedb/configuration/configuration.py +7 -5
- pyedb/dotnet/edb.py +24 -10
- pyedb/dotnet/edb_core/cell/__init__.py +0 -0
- pyedb/dotnet/edb_core/cell/voltage_regulator.py +148 -0
- pyedb/dotnet/edb_core/layout.py +4 -1
- pyedb/dotnet/edb_core/sim_setup_data/data/mesh_operation.py +63 -49
- pyedb/dotnet/edb_core/sim_setup_data/data/settings.py +1 -1
- pyedb/dotnet/edb_core/sim_setup_data/data/sim_setup_info.py +81 -0
- pyedb/dotnet/edb_core/sim_setup_data/data/simulation_settings.py +67 -0
- pyedb/dotnet/edb_core/sim_setup_data/data/sweep_data.py +131 -96
- pyedb/dotnet/edb_core/siwave.py +49 -0
- pyedb/dotnet/edb_core/utilities/hfss_simulation_setup.py +386 -0
- pyedb/dotnet/edb_core/utilities/simulation_setup.py +106 -770
- pyedb/dotnet/edb_core/utilities/siwave_simulation_setup.py +369 -0
- {pyedb-0.15.dev0.dist-info → pyedb-0.16.0.dist-info}/METADATA +1 -1
- {pyedb-0.15.dev0.dist-info → pyedb-0.16.0.dist-info}/RECORD +25 -19
- {pyedb-0.15.dev0.dist-info → pyedb-0.16.0.dist-info}/LICENSE +0 -0
- {pyedb-0.15.dev0.dist-info → pyedb-0.16.0.dist-info}/WHEEL +0 -0
|
@@ -21,59 +21,29 @@
|
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
23
|
|
|
24
|
+
from enum import Enum
|
|
24
25
|
import warnings
|
|
25
26
|
|
|
26
|
-
from pyedb.dotnet.edb_core.
|
|
27
|
-
convert_netdict_to_pydict,
|
|
28
|
-
convert_pydict_to_netdict,
|
|
29
|
-
)
|
|
30
|
-
from pyedb.dotnet.edb_core.sim_setup_data.data.mesh_operation import (
|
|
31
|
-
MeshOperationLength,
|
|
32
|
-
MeshOperationSkinDepth,
|
|
33
|
-
)
|
|
34
|
-
from pyedb.dotnet.edb_core.sim_setup_data.data.settings import (
|
|
35
|
-
AdaptiveSettings,
|
|
36
|
-
AdvancedMeshSettings,
|
|
37
|
-
CurveApproxSettings,
|
|
38
|
-
DcrSettings,
|
|
39
|
-
DefeatureSettings,
|
|
40
|
-
HfssPortSettings,
|
|
41
|
-
HfssSolverSettings,
|
|
42
|
-
ViaSettings,
|
|
43
|
-
)
|
|
44
|
-
from pyedb.dotnet.edb_core.sim_setup_data.data.siw_dc_ir_settings import (
|
|
45
|
-
SiwaveDCIRSettings,
|
|
46
|
-
)
|
|
27
|
+
from pyedb.dotnet.edb_core.sim_setup_data.data.sim_setup_info import SimSetupInfo
|
|
47
28
|
from pyedb.dotnet.edb_core.sim_setup_data.data.sweep_data import SweepData
|
|
48
|
-
from pyedb.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
try:
|
|
67
|
-
pv = int(v)
|
|
68
|
-
except ValueError:
|
|
69
|
-
try:
|
|
70
|
-
pv = float(v)
|
|
71
|
-
except ValueError:
|
|
72
|
-
if isinstance(v, str) and v[0] == v[-1] == "'":
|
|
73
|
-
pv = v[1:-1]
|
|
74
|
-
else:
|
|
75
|
-
pv = v
|
|
76
|
-
return pv
|
|
29
|
+
from pyedb.generic.general_methods import generate_unique_name
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class SimulationSetupType(Enum):
|
|
33
|
+
kHFSS = "hfss"
|
|
34
|
+
kPEM = None
|
|
35
|
+
kSIwave = "siwave_ac"
|
|
36
|
+
kLNA = "lna"
|
|
37
|
+
kTransient = "transient"
|
|
38
|
+
kQEye = "quick_eye"
|
|
39
|
+
kVEye = "verif_eye"
|
|
40
|
+
kAMI = "ami"
|
|
41
|
+
kAnalysisOption = "analysis_option"
|
|
42
|
+
kSIwaveDCIR = "siwave_dc"
|
|
43
|
+
kSIwaveEMI = "siwave_emi"
|
|
44
|
+
kHFSSPI = "hfss_pi"
|
|
45
|
+
kDDRwizard = "ddrwizard"
|
|
46
|
+
kQ3D = "q3d"
|
|
77
47
|
|
|
78
48
|
|
|
79
49
|
class AdaptiveType(object):
|
|
@@ -97,7 +67,8 @@ class SimulationSetup(object):
|
|
|
97
67
|
self._pedb = pedb
|
|
98
68
|
self._edb_object = edb_object
|
|
99
69
|
self._setup_type = ""
|
|
100
|
-
self.
|
|
70
|
+
self._simulation_setup_builder = None
|
|
71
|
+
self._simulation_setup_type = {
|
|
101
72
|
"kHFSS": self._pedb.simsetupdata.HFSSSimulationSettings,
|
|
102
73
|
"kPEM": None,
|
|
103
74
|
"kSIwave": self._pedb.simsetupdata.SIwave.SIWSimulationSettings,
|
|
@@ -116,7 +87,7 @@ class SimulationSetup(object):
|
|
|
116
87
|
}
|
|
117
88
|
|
|
118
89
|
if float(self._pedb.edbversion) >= 2024.2:
|
|
119
|
-
self.
|
|
90
|
+
self._simulation_setup_type.update(
|
|
120
91
|
{
|
|
121
92
|
"kRaptorX": self._pedb.simsetupdata.RaptorX.RaptorXSimulationSettings,
|
|
122
93
|
"kHFSSPI": self._pedb.simsetupdata.HFSSPISimulationSettings,
|
|
@@ -127,14 +98,29 @@ class SimulationSetup(object):
|
|
|
127
98
|
|
|
128
99
|
self._sweep_list = {}
|
|
129
100
|
|
|
130
|
-
|
|
101
|
+
@property
|
|
102
|
+
def sim_setup_info(self):
|
|
103
|
+
return SimSetupInfo(self._pedb, sim_setup=self, edb_object=self._edb_object.GetSimSetupInfo())
|
|
104
|
+
|
|
105
|
+
@sim_setup_info.setter
|
|
106
|
+
def sim_setup_info(self, sim_setup_info):
|
|
107
|
+
self._edb_object = self._simulation_setup_builder(sim_setup_info._edb_object)
|
|
108
|
+
|
|
109
|
+
@property
|
|
110
|
+
def setup_type(self):
|
|
111
|
+
return self.sim_setup_info.sim_setup_type
|
|
112
|
+
|
|
113
|
+
@property
|
|
114
|
+
def type(self):
|
|
115
|
+
return SimulationSetupType[self.setup_type].value
|
|
116
|
+
|
|
117
|
+
def _create(self, name=None, simulation_setup_type=""):
|
|
131
118
|
"""Create a simulation setup."""
|
|
132
119
|
if not name:
|
|
133
120
|
name = generate_unique_name(self.setup_type)
|
|
134
121
|
self._name = name
|
|
135
122
|
|
|
136
|
-
|
|
137
|
-
edb_setup_info = self._pedb.simsetupdata.SimSetupInfo[setup_type]()
|
|
123
|
+
edb_setup_info = self._pedb.simsetupdata.SimSetupInfo[self._simulation_setup_type[simulation_setup_type]]()
|
|
138
124
|
edb_setup_info.Name = name
|
|
139
125
|
if (
|
|
140
126
|
edb_setup_info.get_SimSetupType().ToString() == "kRaptorX"
|
|
@@ -169,17 +155,19 @@ class SimulationSetup(object):
|
|
|
169
155
|
if int(version[0]) == 2024 and int(version[1]) == 2 or int(version[0]) > 2024:
|
|
170
156
|
setup_type_mapping["kRaptorX"] = utility.RaptorXSimulationSetup
|
|
171
157
|
setup_type_mapping["kHFSSPI"] = utility.HFSSPISimulationSetup
|
|
172
|
-
|
|
158
|
+
sim_setup_type = self.sim_setup_info.sim_setup_type
|
|
159
|
+
setup_utility = setup_type_mapping[sim_setup_type.ToString()]
|
|
173
160
|
return setup_utility(edb_setup_info)
|
|
174
161
|
|
|
162
|
+
@property
|
|
163
|
+
def mesh_operations(self):
|
|
164
|
+
return {}
|
|
165
|
+
|
|
175
166
|
def _update_setup(self):
|
|
176
167
|
"""Update setup in EDB."""
|
|
177
|
-
|
|
178
|
-
mesh_operations = self.get_sim_setup_info.SimulationSettings.MeshOperations
|
|
179
|
-
mesh_operations.Clear()
|
|
180
|
-
for mop in self.mesh_operations.values():
|
|
181
|
-
mesh_operations.Add(mop.mesh_operation)
|
|
168
|
+
# Update sweep
|
|
182
169
|
|
|
170
|
+
# Replace setup
|
|
183
171
|
if self._name in self._pedb.setups:
|
|
184
172
|
self._pedb.layout.cell.DeleteSimulationSetup(self._name)
|
|
185
173
|
if not self._pedb.layout.cell.AddSimulationSetup(self._edb_object):
|
|
@@ -231,15 +219,65 @@ class SimulationSetup(object):
|
|
|
231
219
|
|
|
232
220
|
@property
|
|
233
221
|
def frequency_sweeps(self):
|
|
222
|
+
warnings.warn("Use new property :func:`sweeps` instead.", DeprecationWarning)
|
|
223
|
+
return self.sweeps
|
|
224
|
+
|
|
225
|
+
@property
|
|
226
|
+
def sweeps(self):
|
|
234
227
|
"""List of frequency sweeps."""
|
|
235
228
|
temp = {}
|
|
236
229
|
if self.setup_type in ("kRaptorX", "kHFSSPI"):
|
|
237
230
|
sweep_data_list = self._edb_setup_info.SweepDataList
|
|
231
|
+
for i in list(sweep_data_list):
|
|
232
|
+
temp[i.Name] = SweepData(self, None, i.Name, i)
|
|
233
|
+
return temp
|
|
238
234
|
else:
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
235
|
+
return {i.name: i for i in self.sim_setup_info.sweep_data_list}
|
|
236
|
+
|
|
237
|
+
def add_sweep(self, name, frequency_set: list = None, **kwargs):
|
|
238
|
+
"""Add frequency sweep.
|
|
239
|
+
|
|
240
|
+
Parameters
|
|
241
|
+
----------
|
|
242
|
+
name : str, optional
|
|
243
|
+
Name of the frequency sweep. The default is ``None``.
|
|
244
|
+
frequency_set : list, optional
|
|
245
|
+
List of frequency points. The default is ``None``.
|
|
246
|
+
|
|
247
|
+
Returns
|
|
248
|
+
-------
|
|
249
|
+
|
|
250
|
+
Examples
|
|
251
|
+
--------
|
|
252
|
+
>>> setup1 = edbapp.create_siwave_syz_setup("setup1")
|
|
253
|
+
>>> setup1.add_sweep(name="sw1", frequency_set=["linear count", "1MHz", "100MHz", 10])
|
|
254
|
+
"""
|
|
255
|
+
name = generate_unique_name("sweep") if not name else name
|
|
256
|
+
if name in self.sweeps:
|
|
257
|
+
raise ValueError("Sweep {} already exists.".format(name))
|
|
258
|
+
|
|
259
|
+
sweep_data = SweepData(self._pedb, name=name, sim_setup=self)
|
|
260
|
+
for k, v in kwargs.items():
|
|
261
|
+
if k in dir(sweep_data):
|
|
262
|
+
setattr(sweep_data, k, v)
|
|
263
|
+
|
|
264
|
+
if frequency_set is None:
|
|
265
|
+
sweep_type = "linear_scale"
|
|
266
|
+
start, stop, increment = "50MHz", "5GHz", "50MHz"
|
|
267
|
+
sweep_data.add(sweep_type, start, stop, increment)
|
|
268
|
+
elif len(frequency_set) == 0:
|
|
269
|
+
pass
|
|
270
|
+
else:
|
|
271
|
+
if not isinstance(frequency_set[0], list):
|
|
272
|
+
frequency_set = [frequency_set]
|
|
273
|
+
for fs in frequency_set:
|
|
274
|
+
sweep_data.add(*fs)
|
|
275
|
+
|
|
276
|
+
ss_info = self.sim_setup_info
|
|
277
|
+
ss_info.add_sweep_data(sweep_data)
|
|
278
|
+
self.sim_setup_info = ss_info
|
|
279
|
+
self._update_setup()
|
|
280
|
+
return sweep_data
|
|
243
281
|
|
|
244
282
|
def _add_frequency_sweep(self, sweep_data):
|
|
245
283
|
"""Add a frequency sweep.
|
|
@@ -248,6 +286,7 @@ class SimulationSetup(object):
|
|
|
248
286
|
----------
|
|
249
287
|
sweep_data: SweepData
|
|
250
288
|
"""
|
|
289
|
+
warnings.warn("Use new property :func:`add_sweep_data` instead.", DeprecationWarning)
|
|
251
290
|
self._sweep_list[sweep_data.name] = sweep_data
|
|
252
291
|
if self.setup_type in ["kRaptorX", "kHFSSPI"]:
|
|
253
292
|
edb_setup_info = self._edb_setup_info
|
|
@@ -304,708 +343,5 @@ class SimulationSetup(object):
|
|
|
304
343
|
... ["linear scale", "0.1GHz", "10GHz", "0.1GHz"],
|
|
305
344
|
... ])
|
|
306
345
|
"""
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
if not frequency_sweep:
|
|
311
|
-
frequency_sweep = [["linear scale", "0.1GHz", "10GHz", "0.1GHz"]]
|
|
312
|
-
elif not isinstance(frequency_sweep[0], list):
|
|
313
|
-
frequency_sweep = [frequency_sweep]
|
|
314
|
-
|
|
315
|
-
if not name:
|
|
316
|
-
name = generate_unique_name("sweep")
|
|
317
|
-
sweep = SweepData(self, frequency_sweep, name)
|
|
318
|
-
self._add_frequency_sweep(sweep)
|
|
319
|
-
self._update_setup()
|
|
320
|
-
return sweep
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
class HfssSimulationSetup(SimulationSetup):
|
|
324
|
-
"""Manages EDB methods for HFSS simulation setup."""
|
|
325
|
-
|
|
326
|
-
def __init__(self, pedb, edb_object=None):
|
|
327
|
-
super().__init__(pedb, edb_object)
|
|
328
|
-
self._setup_type = "kHFSS"
|
|
329
|
-
self._mesh_operations = {}
|
|
330
|
-
|
|
331
|
-
def create(self, name=None):
|
|
332
|
-
"""Create an HFSS setup."""
|
|
333
|
-
self._name = name
|
|
334
|
-
self._create(name)
|
|
335
|
-
return self
|
|
336
|
-
|
|
337
|
-
@property
|
|
338
|
-
def get_sim_setup_info(self):
|
|
339
|
-
"""Get simulation setup information."""
|
|
340
|
-
return self._edb_object.GetSimSetupInfo()
|
|
341
|
-
|
|
342
|
-
@property
|
|
343
|
-
def solver_slider_type(self):
|
|
344
|
-
"""Solver slider type.
|
|
345
|
-
Options are:
|
|
346
|
-
1 - ``kFast``.
|
|
347
|
-
2 - ``kMedium``.
|
|
348
|
-
3 - ``kAccurate``.
|
|
349
|
-
4 - ``kNumSliderTypes``.
|
|
350
|
-
|
|
351
|
-
Returns
|
|
352
|
-
-------
|
|
353
|
-
str
|
|
354
|
-
"""
|
|
355
|
-
return self.get_sim_setup_info.SimulationSettings.TSolveSliderType.ToString()
|
|
356
|
-
|
|
357
|
-
@solver_slider_type.setter
|
|
358
|
-
def solver_slider_type(self, value):
|
|
359
|
-
"""Set solver slider type."""
|
|
360
|
-
solver_types = {
|
|
361
|
-
"kFast": self.get_sim_setup_info.SimulationSettings.TSolveSliderType.k25DViaWirebond,
|
|
362
|
-
"kMedium": self.get_sim_setup_info.SimulationSettings.TSolveSliderType.k25DViaRibbon,
|
|
363
|
-
"kAccurate": self.get_sim_setup_info.SimulationSettings.TSolveSliderType.k25DViaMesh,
|
|
364
|
-
"kNumSliderTypes": self.get_sim_setup_info.SimulationSettings.TSolveSliderType.k25DViaField,
|
|
365
|
-
}
|
|
366
|
-
self.get_sim_setup_info.SimulationSettings.TSolveSliderType = solver_types[value]
|
|
367
|
-
self._update_setup()
|
|
368
|
-
|
|
369
|
-
@property
|
|
370
|
-
def is_auto_setup(self):
|
|
371
|
-
"""Flag indicating if automatic setup is enabled."""
|
|
372
|
-
return self.get_sim_setup_info.SimulationSettings.IsAutoSetup
|
|
373
|
-
|
|
374
|
-
@is_auto_setup.setter
|
|
375
|
-
def is_auto_setup(self, value):
|
|
376
|
-
self.get_sim_setup_info.SimulationSettings.IsAutoSetup = value
|
|
377
|
-
self._update_setup()
|
|
378
|
-
|
|
379
|
-
@property
|
|
380
|
-
def hfss_solver_settings(self):
|
|
381
|
-
"""Manages EDB methods for HFSS solver settings.
|
|
382
|
-
|
|
383
|
-
Returns
|
|
384
|
-
-------
|
|
385
|
-
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.HfssSolverSettings`
|
|
386
|
-
|
|
387
|
-
"""
|
|
388
|
-
return HfssSolverSettings(self)
|
|
389
|
-
|
|
390
|
-
@property
|
|
391
|
-
def adaptive_settings(self):
|
|
392
|
-
"""Adaptive Settings Class.
|
|
393
|
-
|
|
394
|
-
Returns
|
|
395
|
-
-------
|
|
396
|
-
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.AdaptiveSettings`
|
|
397
|
-
|
|
398
|
-
"""
|
|
399
|
-
return AdaptiveSettings(self)
|
|
400
|
-
|
|
401
|
-
@property
|
|
402
|
-
def defeature_settings(self):
|
|
403
|
-
"""Defeature settings Class.
|
|
404
|
-
|
|
405
|
-
Returns
|
|
406
|
-
-------
|
|
407
|
-
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.DefeatureSettings`
|
|
408
|
-
|
|
409
|
-
"""
|
|
410
|
-
return DefeatureSettings(self)
|
|
411
|
-
|
|
412
|
-
@property
|
|
413
|
-
def via_settings(self):
|
|
414
|
-
"""Via settings Class.
|
|
415
|
-
|
|
416
|
-
Returns
|
|
417
|
-
-------
|
|
418
|
-
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.ViaSettings`
|
|
419
|
-
|
|
420
|
-
"""
|
|
421
|
-
return ViaSettings(self)
|
|
422
|
-
|
|
423
|
-
@property
|
|
424
|
-
def advanced_mesh_settings(self):
|
|
425
|
-
"""Advanced mesh settings Class.
|
|
426
|
-
|
|
427
|
-
Returns
|
|
428
|
-
-------
|
|
429
|
-
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.AdvancedMeshSettings`
|
|
430
|
-
|
|
431
|
-
"""
|
|
432
|
-
return AdvancedMeshSettings(self)
|
|
433
|
-
|
|
434
|
-
@property
|
|
435
|
-
def curve_approx_settings(self):
|
|
436
|
-
"""Curve approximation settings Class.
|
|
437
|
-
|
|
438
|
-
Returns
|
|
439
|
-
-------
|
|
440
|
-
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.CurveApproxSettings`
|
|
441
|
-
|
|
442
|
-
"""
|
|
443
|
-
return CurveApproxSettings(self)
|
|
444
|
-
|
|
445
|
-
@property
|
|
446
|
-
def dcr_settings(self):
|
|
447
|
-
"""Dcr settings Class.
|
|
448
|
-
|
|
449
|
-
Returns
|
|
450
|
-
-------
|
|
451
|
-
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.DcrSettings`
|
|
452
|
-
|
|
453
|
-
"""
|
|
454
|
-
return DcrSettings(self)
|
|
455
|
-
|
|
456
|
-
@property
|
|
457
|
-
def hfss_port_settings(self):
|
|
458
|
-
"""HFSS port settings Class.
|
|
459
|
-
|
|
460
|
-
Returns
|
|
461
|
-
-------
|
|
462
|
-
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.HfssPortSettings`
|
|
463
|
-
|
|
464
|
-
"""
|
|
465
|
-
return HfssPortSettings(self)
|
|
466
|
-
|
|
467
|
-
@property
|
|
468
|
-
def mesh_operations(self):
|
|
469
|
-
"""Mesh operations settings Class.
|
|
470
|
-
|
|
471
|
-
Returns
|
|
472
|
-
-------
|
|
473
|
-
List of :class:`dotnet.edb_core.edb_data.hfss_simulation_setup_data.MeshOperation`
|
|
474
|
-
|
|
475
|
-
"""
|
|
476
|
-
if self._mesh_operations:
|
|
477
|
-
return self._mesh_operations
|
|
478
|
-
settings = self.get_sim_setup_info.SimulationSettings.MeshOperations
|
|
479
|
-
self._mesh_operations = {}
|
|
480
|
-
for i in list(settings):
|
|
481
|
-
if i.MeshOpType == i.TMeshOpType.kMeshSetupLength:
|
|
482
|
-
self._mesh_operations[i.Name] = MeshOperationLength(self, i)
|
|
483
|
-
elif i.MeshOpType == i.TMeshOpType.kMeshSetupSkinDepth:
|
|
484
|
-
self._mesh_operations[i.Name] = MeshOperationSkinDepth(self, i)
|
|
485
|
-
elif i.MeshOpType == i.TMeshOpType.kMeshSetupBase:
|
|
486
|
-
self._mesh_operations[i.Name] = MeshOperationSkinDepth(self, i)
|
|
487
|
-
|
|
488
|
-
return self._mesh_operations
|
|
489
|
-
|
|
490
|
-
def add_length_mesh_operation(
|
|
491
|
-
self,
|
|
492
|
-
net_layer_list,
|
|
493
|
-
name=None,
|
|
494
|
-
max_elements=1000,
|
|
495
|
-
max_length="1mm",
|
|
496
|
-
restrict_elements=True,
|
|
497
|
-
restrict_length=True,
|
|
498
|
-
refine_inside=False,
|
|
499
|
-
mesh_region=None,
|
|
500
|
-
):
|
|
501
|
-
"""Add a mesh operation to the setup.
|
|
502
|
-
|
|
503
|
-
Parameters
|
|
504
|
-
----------
|
|
505
|
-
net_layer_list : dict
|
|
506
|
-
Dictionary containing nets and layers on which enable Mesh operation. Example ``{"A0_N": ["TOP", "PWR"]}``.
|
|
507
|
-
name : str, optional
|
|
508
|
-
Mesh operation name.
|
|
509
|
-
max_elements : int, optional
|
|
510
|
-
Maximum number of elements. Default is ``1000``.
|
|
511
|
-
max_length : str, optional
|
|
512
|
-
Maximum length of elements. Default is ``1mm``.
|
|
513
|
-
restrict_elements : bool, optional
|
|
514
|
-
Whether to restrict number of elements. Default is ``True``.
|
|
515
|
-
restrict_length : bool, optional
|
|
516
|
-
Whether to restrict length of elements. Default is ``True``.
|
|
517
|
-
mesh_region : str, optional
|
|
518
|
-
Mesh region name.
|
|
519
|
-
refine_inside : bool, optional
|
|
520
|
-
Whether to refine inside or not. Default is ``False``.
|
|
521
|
-
|
|
522
|
-
Returns
|
|
523
|
-
-------
|
|
524
|
-
:class:`dotnet.edb_core.edb_data.hfss_simulation_setup_data.LengthMeshOperation`
|
|
525
|
-
"""
|
|
526
|
-
if not name:
|
|
527
|
-
name = generate_unique_name("skin")
|
|
528
|
-
mesh_operation = MeshOperationLength(self, self._pedb.simsetupdata.LengthMeshOperation())
|
|
529
|
-
mesh_operation.mesh_region = mesh_region
|
|
530
|
-
mesh_operation.name = name
|
|
531
|
-
mesh_operation.nets_layers_list = net_layer_list
|
|
532
|
-
mesh_operation.refine_inside = refine_inside
|
|
533
|
-
mesh_operation.max_elements = str(max_elements)
|
|
534
|
-
mesh_operation.max_length = max_length
|
|
535
|
-
mesh_operation.restrict_length = restrict_length
|
|
536
|
-
mesh_operation.restrict_max_elements = restrict_elements
|
|
537
|
-
self.mesh_operations[name] = mesh_operation
|
|
538
|
-
return mesh_operation if self._update_setup() else False
|
|
539
|
-
|
|
540
|
-
def add_skin_depth_mesh_operation(
|
|
541
|
-
self,
|
|
542
|
-
net_layer_list,
|
|
543
|
-
name=None,
|
|
544
|
-
max_elements=1000,
|
|
545
|
-
skin_depth="1um",
|
|
546
|
-
restrict_elements=True,
|
|
547
|
-
surface_triangle_length="1mm",
|
|
548
|
-
number_of_layers=2,
|
|
549
|
-
refine_inside=False,
|
|
550
|
-
mesh_region=None,
|
|
551
|
-
):
|
|
552
|
-
"""Add a mesh operation to the setup.
|
|
553
|
-
|
|
554
|
-
Parameters
|
|
555
|
-
----------
|
|
556
|
-
net_layer_list : dict
|
|
557
|
-
Dictionary containing nets and layers on which enable Mesh operation. Example ``{"A0_N": ["TOP", "PWR"]}``.
|
|
558
|
-
name : str, optional
|
|
559
|
-
Mesh operation name.
|
|
560
|
-
max_elements : int, optional
|
|
561
|
-
Maximum number of elements. Default is ``1000``.
|
|
562
|
-
skin_depth : str, optional
|
|
563
|
-
Skin Depth. Default is ``1um``.
|
|
564
|
-
restrict_elements : bool, optional
|
|
565
|
-
Whether to restrict number of elements. Default is ``True``.
|
|
566
|
-
surface_triangle_length : bool, optional
|
|
567
|
-
Surface Triangle length. Default is ``1mm``.
|
|
568
|
-
number_of_layers : int, str, optional
|
|
569
|
-
Number of layers. Default is ``2``.
|
|
570
|
-
mesh_region : str, optional
|
|
571
|
-
Mesh region name.
|
|
572
|
-
refine_inside : bool, optional
|
|
573
|
-
Whether to refine inside or not. Default is ``False``.
|
|
574
|
-
|
|
575
|
-
Returns
|
|
576
|
-
-------
|
|
577
|
-
:class:`dotnet.edb_core.edb_data.hfss_simulation_setup_data.LengthMeshOperation`
|
|
578
|
-
"""
|
|
579
|
-
if not name:
|
|
580
|
-
name = generate_unique_name("length")
|
|
581
|
-
mesh_operation = MeshOperationSkinDepth(self, self._pedb.simsetupdata.SkinDepthMeshOperation())
|
|
582
|
-
mesh_operation.mesh_region = mesh_region
|
|
583
|
-
mesh_operation.name = name
|
|
584
|
-
mesh_operation.nets_layers_list = net_layer_list
|
|
585
|
-
mesh_operation.refine_inside = refine_inside
|
|
586
|
-
mesh_operation.max_elements = max_elements
|
|
587
|
-
mesh_operation.skin_depth = skin_depth
|
|
588
|
-
mesh_operation.number_of_layer_elements = number_of_layers
|
|
589
|
-
mesh_operation.surface_triangle_length = surface_triangle_length
|
|
590
|
-
mesh_operation.restrict_max_elements = restrict_elements
|
|
591
|
-
self.mesh_operations[name] = mesh_operation
|
|
592
|
-
return mesh_operation if self._update_setup() else False
|
|
593
|
-
|
|
594
|
-
def add_frequency_sweep(self, name=None, frequency_sweep=None):
|
|
595
|
-
"""Add frequency sweep.
|
|
596
|
-
|
|
597
|
-
Parameters
|
|
598
|
-
----------
|
|
599
|
-
name : str, optional
|
|
600
|
-
Name of the frequency sweep.
|
|
601
|
-
frequency_sweep : list, optional
|
|
602
|
-
List of frequency points.
|
|
603
|
-
|
|
604
|
-
Returns
|
|
605
|
-
-------
|
|
606
|
-
:class:`pyedb.dotnet.edb_core.edb_data.simulation_setup.EdbFrequencySweep`
|
|
607
|
-
|
|
608
|
-
Examples
|
|
609
|
-
--------
|
|
610
|
-
>>> setup1 = edbapp.create_hfss_setup("setup1")
|
|
611
|
-
>>> setup1.add_frequency_sweep(frequency_sweep=[
|
|
612
|
-
... ["linear count", "0", "1kHz", 1],
|
|
613
|
-
... ["log scale", "1kHz", "0.1GHz", 10],
|
|
614
|
-
... ["linear scale", "0.1GHz", "10GHz", "0.1GHz"],
|
|
615
|
-
... ])
|
|
616
|
-
"""
|
|
617
|
-
if name in self.frequency_sweeps:
|
|
618
|
-
return False
|
|
619
|
-
if not name:
|
|
620
|
-
name = generate_unique_name("sweep")
|
|
621
|
-
return SweepData(self, frequency_sweep, name)
|
|
622
|
-
|
|
623
|
-
def set_solution_single_frequency(self, frequency="5GHz", max_num_passes=10, max_delta_s=0.02):
|
|
624
|
-
"""Set single-frequency solution.
|
|
625
|
-
|
|
626
|
-
Parameters
|
|
627
|
-
----------
|
|
628
|
-
frequency : str, float, optional
|
|
629
|
-
Adaptive frequency. The default is ``5GHz``.
|
|
630
|
-
max_num_passes : int, optional
|
|
631
|
-
Maximum number of passes. The default is ``10``.
|
|
632
|
-
max_delta_s : float, optional
|
|
633
|
-
Maximum delta S. The default is ``0.02``.
|
|
634
|
-
|
|
635
|
-
Returns
|
|
636
|
-
-------
|
|
637
|
-
bool
|
|
638
|
-
|
|
639
|
-
"""
|
|
640
|
-
self.adaptive_settings.adapt_type = "kSingle"
|
|
641
|
-
self.adaptive_settings.adaptive_settings.AdaptiveFrequencyDataList.Clear()
|
|
642
|
-
return self.adaptive_settings.add_adaptive_frequency_data(frequency, max_num_passes, max_delta_s)
|
|
643
|
-
|
|
644
|
-
def set_solution_multi_frequencies(self, frequencies=("5GHz", "10GHz"), max_num_passes=10, max_delta_s="0.02"):
|
|
645
|
-
"""Set multi-frequency solution.
|
|
646
|
-
|
|
647
|
-
Parameters
|
|
648
|
-
----------
|
|
649
|
-
frequencies : list, tuple, optional
|
|
650
|
-
List or tuple of adaptive frequencies. The default is ``5GHz``.
|
|
651
|
-
max_num_passes : int, optional
|
|
652
|
-
Maximum number of passes. Default is ``10``.
|
|
653
|
-
max_delta_s : float, optional
|
|
654
|
-
Maximum delta S. The default is ``0.02``.
|
|
655
|
-
|
|
656
|
-
Returns
|
|
657
|
-
-------
|
|
658
|
-
bool
|
|
659
|
-
|
|
660
|
-
"""
|
|
661
|
-
self.adaptive_settings.adapt_type = "kMultiFrequencies"
|
|
662
|
-
self.adaptive_settings.adaptive_settings.AdaptiveFrequencyDataList.Clear()
|
|
663
|
-
for i in frequencies:
|
|
664
|
-
if not self.adaptive_settings.add_adaptive_frequency_data(i, max_num_passes, max_delta_s):
|
|
665
|
-
return False
|
|
666
|
-
return True
|
|
667
|
-
|
|
668
|
-
def set_solution_broadband(
|
|
669
|
-
self, low_frequency="5GHz", high_frequency="10GHz", max_num_passes=10, max_delta_s="0.02"
|
|
670
|
-
):
|
|
671
|
-
"""Set broadband solution.
|
|
672
|
-
|
|
673
|
-
Parameters
|
|
674
|
-
----------
|
|
675
|
-
low_frequency : str, float, optional
|
|
676
|
-
Low frequency. The default is ``5GHz``.
|
|
677
|
-
high_frequency : str, float, optional
|
|
678
|
-
High frequency. The default is ``10GHz``.
|
|
679
|
-
max_num_passes : int, optional
|
|
680
|
-
Maximum number of passes. The default is ``10``.
|
|
681
|
-
max_delta_s : float, optional
|
|
682
|
-
Maximum Delta S. Default is ``0.02``.
|
|
683
|
-
|
|
684
|
-
Returns
|
|
685
|
-
-------
|
|
686
|
-
bool
|
|
687
|
-
"""
|
|
688
|
-
self.adaptive_settings.adapt_type = "kBroadband"
|
|
689
|
-
self.adaptive_settings.adaptive_settings.AdaptiveFrequencyDataList.Clear()
|
|
690
|
-
if not self.adaptive_settings.add_broadband_adaptive_frequency_data(
|
|
691
|
-
low_frequency, high_frequency, max_num_passes, max_delta_s
|
|
692
|
-
): # pragma no cover
|
|
693
|
-
return False
|
|
694
|
-
return True
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
class SiwaveSYZSimulationSetup(SimulationSetup):
|
|
698
|
-
"""Manages EDB methods for SIwave simulation setup.
|
|
699
|
-
|
|
700
|
-
Parameters
|
|
701
|
-
----------
|
|
702
|
-
pedb : :class:`pyedb.dotnet.edb.Edb`
|
|
703
|
-
Inherited AEDT object.
|
|
704
|
-
edb_setup : :class:`Ansys.Ansoft.Edb.Utility.SIWaveSimulationSetup`
|
|
705
|
-
Edb object.
|
|
706
|
-
"""
|
|
707
|
-
|
|
708
|
-
def __init__(self, pedb, edb_setup=None):
|
|
709
|
-
super().__init__(pedb, edb_setup)
|
|
710
|
-
self._edb = self._pedb
|
|
711
|
-
self._setup_type = "kSIwave"
|
|
712
|
-
self._sim_setup_info = None
|
|
713
|
-
|
|
714
|
-
def create(self, name=None):
|
|
715
|
-
"""Create a SIwave SYZ setup.
|
|
716
|
-
|
|
717
|
-
Returns
|
|
718
|
-
-------
|
|
719
|
-
:class:`SiwaveDCSimulationSetup`
|
|
720
|
-
"""
|
|
721
|
-
self._name = name
|
|
722
|
-
self._create(name)
|
|
723
|
-
self.si_slider_position = 1
|
|
724
|
-
|
|
725
|
-
return self
|
|
726
|
-
|
|
727
|
-
def get_configurations(self):
|
|
728
|
-
"""Get SIwave SYZ simulation settings.
|
|
729
|
-
|
|
730
|
-
Returns
|
|
731
|
-
-------
|
|
732
|
-
dict
|
|
733
|
-
Dictionary of SIwave SYZ simulation settings.
|
|
734
|
-
"""
|
|
735
|
-
return {
|
|
736
|
-
"pi_slider_position": self.pi_slider_position,
|
|
737
|
-
"si_slider_position": self.si_slider_position,
|
|
738
|
-
"use_custom_settings": self.use_si_settings,
|
|
739
|
-
"use_si_settings": self.use_si_settings,
|
|
740
|
-
"advanced_settings": self.advanced_settings.get_configurations(),
|
|
741
|
-
}
|
|
742
|
-
|
|
743
|
-
@property
|
|
744
|
-
def advanced_settings(self):
|
|
745
|
-
"""SIwave advanced settings."""
|
|
746
|
-
return AdvancedSettings(self)
|
|
747
|
-
|
|
748
|
-
@property
|
|
749
|
-
def get_sim_setup_info(self):
|
|
750
|
-
"""Get simulation information from the setup."""
|
|
751
|
-
if self._sim_setup_info:
|
|
752
|
-
return self._sim_setup_info
|
|
753
|
-
|
|
754
|
-
edb_setup = self._edb_object
|
|
755
|
-
edb_sim_setup_info = self._pedb.simsetupdata.SimSetupInfo[self._setup_type_mapping[self._setup_type]]()
|
|
756
|
-
edb_sim_setup_info.Name = edb_setup.GetName()
|
|
757
|
-
|
|
758
|
-
string = edb_setup.ToString().replace("\t", "").split("\r\n")
|
|
759
|
-
|
|
760
|
-
if is_linux:
|
|
761
|
-
string = string[0].split("\n")
|
|
762
|
-
keys = [i.split("=")[0] for i in string if len(i.split("=")) == 2 and "SourceTermsToGround" not in i]
|
|
763
|
-
values = [i.split("=")[1] for i in string if len(i.split("=")) == 2 and "SourceTermsToGround" not in i]
|
|
764
|
-
for val in string:
|
|
765
|
-
if "SourceTermsToGround()" in val:
|
|
766
|
-
break
|
|
767
|
-
elif "SourceTermsToGround" in val:
|
|
768
|
-
sources = {}
|
|
769
|
-
val = val.replace("SourceTermsToGround(", "").replace(")", "").split(",")
|
|
770
|
-
for v in val:
|
|
771
|
-
source = v.split("=")
|
|
772
|
-
sources[source[0]] = int(source[1].replace("'", ""))
|
|
773
|
-
edb_sim_setup_info.SimulationSettings.DCIRSettings.SourceTermsToGround = convert_pydict_to_netdict(
|
|
774
|
-
sources
|
|
775
|
-
)
|
|
776
|
-
break
|
|
777
|
-
for k in keys:
|
|
778
|
-
value = _parse_value(values[keys.index(k)])
|
|
779
|
-
setter = None
|
|
780
|
-
if k in dir(edb_sim_setup_info.SimulationSettings):
|
|
781
|
-
setter = edb_sim_setup_info.SimulationSettings
|
|
782
|
-
elif k in dir(edb_sim_setup_info.SimulationSettings.AdvancedSettings):
|
|
783
|
-
setter = edb_sim_setup_info.SimulationSettings.AdvancedSettings
|
|
784
|
-
|
|
785
|
-
elif k in dir(edb_sim_setup_info.SimulationSettings.DCAdvancedSettings):
|
|
786
|
-
setter = edb_sim_setup_info.SimulationSettings.DCAdvancedSettings
|
|
787
|
-
elif "DCIRSettings" in dir(edb_sim_setup_info.SimulationSettings) and k in dir(
|
|
788
|
-
edb_sim_setup_info.SimulationSettings.DCIRSettings
|
|
789
|
-
):
|
|
790
|
-
setter = edb_sim_setup_info.SimulationSettings.DCIRSettings
|
|
791
|
-
elif k in dir(edb_sim_setup_info.SimulationSettings.DCSettings):
|
|
792
|
-
setter = edb_sim_setup_info.SimulationSettings.DCSettings
|
|
793
|
-
elif k in dir(edb_sim_setup_info.SimulationSettings.AdvancedSettings):
|
|
794
|
-
setter = edb_sim_setup_info.SimulationSettings.AdvancedSettings
|
|
795
|
-
if setter:
|
|
796
|
-
try:
|
|
797
|
-
setter.__setattr__(k, value)
|
|
798
|
-
except TypeError:
|
|
799
|
-
try:
|
|
800
|
-
setter.__setattr__(k, str(value))
|
|
801
|
-
except:
|
|
802
|
-
pass
|
|
803
|
-
|
|
804
|
-
return edb_sim_setup_info
|
|
805
|
-
|
|
806
|
-
def set_pi_slider(self, value):
|
|
807
|
-
"""Set SIwave PI simulation accuracy level.
|
|
808
|
-
Options are:
|
|
809
|
-
- ``0``: Optimal speed
|
|
810
|
-
- ``1``: Balanced
|
|
811
|
-
- ``2``: Optimal accuracy
|
|
812
|
-
|
|
813
|
-
.. deprecated:: 0.7.5
|
|
814
|
-
Use :property:`pi_slider_position` property instead.
|
|
815
|
-
|
|
816
|
-
"""
|
|
817
|
-
warnings.warn("`set_pi_slider` is deprecated. Use `pi_slider_position` property instead.", DeprecationWarning)
|
|
818
|
-
self.pi_slider_position = value
|
|
819
|
-
|
|
820
|
-
def set_si_slider(self, value):
|
|
821
|
-
"""Set SIwave SI simulation accuracy level.
|
|
822
|
-
|
|
823
|
-
Options are:
|
|
824
|
-
- ``0``: Optimal speed;
|
|
825
|
-
- ``1``: Balanced;
|
|
826
|
-
- ``2``: Optimal accuracy```.
|
|
827
|
-
"""
|
|
828
|
-
self.use_si_settings = True
|
|
829
|
-
self.use_custom_settings = False
|
|
830
|
-
self.si_slider_position = value
|
|
831
|
-
self.advanced_settings.set_si_slider(value)
|
|
832
|
-
|
|
833
|
-
@property
|
|
834
|
-
def pi_slider_position(self):
|
|
835
|
-
"""PI solider position. Values are from ``1`` to ``3``."""
|
|
836
|
-
return self.get_sim_setup_info.SimulationSettings.PISliderPos
|
|
837
|
-
|
|
838
|
-
@pi_slider_position.setter
|
|
839
|
-
def pi_slider_position(self, value):
|
|
840
|
-
edb_setup_info = self.get_sim_setup_info
|
|
841
|
-
edb_setup_info.SimulationSettings.PISliderPos = value
|
|
842
|
-
self._edb_object = self._set_edb_setup_info(edb_setup_info)
|
|
843
|
-
self._update_setup()
|
|
844
|
-
|
|
845
|
-
self.use_si_settings = False
|
|
846
|
-
self.use_custom_settings = False
|
|
847
|
-
self.advanced_settings.set_pi_slider(value)
|
|
848
|
-
|
|
849
|
-
@property
|
|
850
|
-
def si_slider_position(self):
|
|
851
|
-
"""SI slider position. Values are from ``1`` to ``3``."""
|
|
852
|
-
return self.get_sim_setup_info.SimulationSettings.SISliderPos
|
|
853
|
-
|
|
854
|
-
@si_slider_position.setter
|
|
855
|
-
def si_slider_position(self, value):
|
|
856
|
-
edb_setup_info = self.get_sim_setup_info
|
|
857
|
-
edb_setup_info.SimulationSettings.SISliderPos = value
|
|
858
|
-
self._edb_object = self._set_edb_setup_info(edb_setup_info)
|
|
859
|
-
self._update_setup()
|
|
860
|
-
|
|
861
|
-
self.use_si_settings = True
|
|
862
|
-
self.use_custom_settings = False
|
|
863
|
-
self.advanced_settings.set_si_slider(value)
|
|
864
|
-
|
|
865
|
-
@property
|
|
866
|
-
def use_custom_settings(self):
|
|
867
|
-
"""Custom settings to use.
|
|
868
|
-
|
|
869
|
-
Returns
|
|
870
|
-
-------
|
|
871
|
-
bool
|
|
872
|
-
"""
|
|
873
|
-
return self.get_sim_setup_info.SimulationSettings.UseCustomSettings
|
|
874
|
-
|
|
875
|
-
@use_custom_settings.setter
|
|
876
|
-
def use_custom_settings(self, value):
|
|
877
|
-
edb_setup_info = self.get_sim_setup_info
|
|
878
|
-
edb_setup_info.SimulationSettings.UseCustomSettings = value
|
|
879
|
-
self._edb_object = self._set_edb_setup_info(edb_setup_info)
|
|
880
|
-
self._update_setup()
|
|
881
|
-
|
|
882
|
-
@property
|
|
883
|
-
def use_si_settings(self):
|
|
884
|
-
"""Whether to use SI Settings.
|
|
885
|
-
|
|
886
|
-
Returns
|
|
887
|
-
-------
|
|
888
|
-
bool
|
|
889
|
-
"""
|
|
890
|
-
return self.get_sim_setup_info.SimulationSettings.UseSISettings
|
|
891
|
-
|
|
892
|
-
@use_si_settings.setter
|
|
893
|
-
def use_si_settings(self, value):
|
|
894
|
-
edb_setup_info = self.get_sim_setup_info
|
|
895
|
-
edb_setup_info.SimulationSettings.UseSISettings = value
|
|
896
|
-
self._edb_object = self._set_edb_setup_info(edb_setup_info)
|
|
897
|
-
self._update_setup()
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
class SiwaveDCSimulationSetup(SiwaveSYZSimulationSetup):
|
|
901
|
-
"""Manages EDB methods for SIwave DC simulation setup.
|
|
902
|
-
|
|
903
|
-
Parameters
|
|
904
|
-
----------
|
|
905
|
-
pedb : :class:`pyedb.dotnet.edb.Edb`
|
|
906
|
-
Inherited AEDT object.
|
|
907
|
-
edb_setup : Ansys.Ansoft.Edb.Utility.SIWDCIRSimulationSettings
|
|
908
|
-
EDB object. The default is ``None``.
|
|
909
|
-
"""
|
|
910
|
-
|
|
911
|
-
def __init__(self, pedb, edb_object=None):
|
|
912
|
-
super().__init__(pedb, edb_object)
|
|
913
|
-
self._setup_type = "kSIwaveDCIR"
|
|
914
|
-
self._edb = pedb
|
|
915
|
-
self._mesh_operations = {}
|
|
916
|
-
|
|
917
|
-
def create(self, name=None):
|
|
918
|
-
"""Create a SIwave DCIR setup.
|
|
919
|
-
|
|
920
|
-
Returns
|
|
921
|
-
-------
|
|
922
|
-
:class:`SiwaveDCSimulationSetup`
|
|
923
|
-
"""
|
|
924
|
-
self._name = name
|
|
925
|
-
self._create(name)
|
|
926
|
-
self.set_dc_slider(1)
|
|
927
|
-
return self
|
|
928
|
-
|
|
929
|
-
@property
|
|
930
|
-
def dc_ir_settings(self):
|
|
931
|
-
"""DC IR settings."""
|
|
932
|
-
return SiwaveDCIRSettings(self)
|
|
933
|
-
|
|
934
|
-
def get_configurations(self):
|
|
935
|
-
"""Get SIwave DC simulation settings.
|
|
936
|
-
|
|
937
|
-
Returns
|
|
938
|
-
-------
|
|
939
|
-
dict
|
|
940
|
-
Dictionary of SIwave DC simulation settings.
|
|
941
|
-
"""
|
|
942
|
-
return {
|
|
943
|
-
"dc_settings": self.dc_settings.get_configurations(),
|
|
944
|
-
"dc_advanced_settings": self.dc_advanced_settings.get_configurations(),
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
def set_dc_slider(self, value):
|
|
948
|
-
"""Set DC simulation accuracy level.
|
|
949
|
-
|
|
950
|
-
Options are:
|
|
951
|
-
|
|
952
|
-
- ``0``: Optimal speed
|
|
953
|
-
- ``1``: Balanced
|
|
954
|
-
- ``2``: Optimal accuracy
|
|
955
|
-
"""
|
|
956
|
-
self.use_custom_settings = False
|
|
957
|
-
self.dc_settings.dc_slider_position = value
|
|
958
|
-
self.dc_advanced_settings.set_dc_slider(value)
|
|
959
|
-
|
|
960
|
-
@property
|
|
961
|
-
def dc_settings(self):
|
|
962
|
-
"""SIwave DC setting."""
|
|
963
|
-
return DCSettings(self)
|
|
964
|
-
|
|
965
|
-
@property
|
|
966
|
-
def dc_advanced_settings(self):
|
|
967
|
-
"""Siwave DC advanced settings.
|
|
968
|
-
|
|
969
|
-
Returns
|
|
970
|
-
-------
|
|
971
|
-
:class:`pyedb.dotnet.edb_core.edb_data.siwave_simulation_setup_data.SiwaveDCAdvancedSettings`
|
|
972
|
-
"""
|
|
973
|
-
return DCAdvancedSettings(self)
|
|
974
|
-
|
|
975
|
-
@property
|
|
976
|
-
def source_terms_to_ground(self):
|
|
977
|
-
"""Dictionary of grounded terminals.
|
|
978
|
-
|
|
979
|
-
Returns
|
|
980
|
-
-------
|
|
981
|
-
Dictionary
|
|
982
|
-
{str, int}, keys is source name, value int 0 unspecified, 1 negative node, 2 positive one.
|
|
983
|
-
|
|
984
|
-
"""
|
|
985
|
-
return convert_netdict_to_pydict(self.get_sim_setup_info.SimulationSettings.DCIRSettings.SourceTermsToGround)
|
|
986
|
-
|
|
987
|
-
def add_source_terminal_to_ground(self, source_name, terminal=0):
|
|
988
|
-
"""Add a source terminal to ground.
|
|
989
|
-
|
|
990
|
-
Parameters
|
|
991
|
-
----------
|
|
992
|
-
source_name : str,
|
|
993
|
-
Source name.
|
|
994
|
-
terminal : int, optional
|
|
995
|
-
Terminal to assign. Options are:
|
|
996
|
-
|
|
997
|
-
- 0=Unspecified
|
|
998
|
-
- 1=Negative node
|
|
999
|
-
- 2=Positive none
|
|
1000
|
-
|
|
1001
|
-
Returns
|
|
1002
|
-
-------
|
|
1003
|
-
bool
|
|
1004
|
-
|
|
1005
|
-
"""
|
|
1006
|
-
terminals = self.source_terms_to_ground
|
|
1007
|
-
terminals[source_name] = terminal
|
|
1008
|
-
self.get_sim_setup_info.SimulationSettings.DCIRSettings.SourceTermsToGround = convert_pydict_to_netdict(
|
|
1009
|
-
terminals
|
|
1010
|
-
)
|
|
1011
|
-
return self._update_setup()
|
|
346
|
+
warnings.warn("`create_component_from_pins` is deprecated. Use `add_sweep` method instead.", DeprecationWarning)
|
|
347
|
+
return self.add_sweep(name, frequency_sweep)
|