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
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class BaseSimulationSettings:
|
|
25
|
+
def __init__(self, pedb, sim_setup, edb_object):
|
|
26
|
+
self._pedb = pedb
|
|
27
|
+
self.sim_setup = sim_setup
|
|
28
|
+
self._edb_object = edb_object
|
|
29
|
+
self.t_sim_setup_type = {
|
|
30
|
+
"kHFSS": self._pedb.simsetupdata.HFSSSimulationSettings,
|
|
31
|
+
"kPEM": None,
|
|
32
|
+
"kSIwave": self._pedb.simsetupdata.SIwave.SIWSimulationSettings,
|
|
33
|
+
"kLNA": None,
|
|
34
|
+
"kTransient": None,
|
|
35
|
+
"kQEye": None,
|
|
36
|
+
"kVEye": None,
|
|
37
|
+
"kAMI": None,
|
|
38
|
+
"kAnalysisOption": None,
|
|
39
|
+
"kSIwaveDCIR": self._pedb.simsetupdata.SIwave.SIWDCIRSimulationSettings,
|
|
40
|
+
"kSIwaveEMI": None,
|
|
41
|
+
"kHFSSPI": None,
|
|
42
|
+
"kDDRwizard": None,
|
|
43
|
+
"kQ3D": None,
|
|
44
|
+
"kNumSetupTypes": None,
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@property
|
|
48
|
+
def enabled(self):
|
|
49
|
+
return self._edb_object.Enabled
|
|
50
|
+
|
|
51
|
+
@enabled.setter
|
|
52
|
+
def enabled(self, value):
|
|
53
|
+
self._edb_object.Enabled = value
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class SimulationSettings(BaseSimulationSettings):
|
|
57
|
+
def __init__(self, pedb, sim_setup, edb_object):
|
|
58
|
+
super().__init__(pedb, sim_setup, edb_object)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class HFSSSimulationSettings(SimulationSettings):
|
|
62
|
+
def __init__(self, pedb, sim_setup, edb_object):
|
|
63
|
+
super().__init__(pedb, sim_setup, edb_object)
|
|
64
|
+
|
|
65
|
+
@property
|
|
66
|
+
def mesh_operations(self):
|
|
67
|
+
return self._edb_object.MeshOperations
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
|
+
import warnings
|
|
24
|
+
|
|
23
25
|
|
|
24
26
|
class SweepData(object):
|
|
25
27
|
"""Manages EDB methods for a frequency sweep.
|
|
@@ -29,58 +31,42 @@ class SweepData(object):
|
|
|
29
31
|
sim_setup : :class:`pyedb.dotnet.edb_core.edb_data.siwave_simulation_setup_data.SiwaveSYZSimulationSetup`
|
|
30
32
|
name : str, optional
|
|
31
33
|
Name of the frequency sweep.
|
|
32
|
-
|
|
34
|
+
edb_object : :class:`Ansys.Ansoft.Edb.Utility.SIWDCIRSimulationSettings`, optional
|
|
33
35
|
EDB object. The default is ``None``.
|
|
34
36
|
"""
|
|
35
37
|
|
|
36
|
-
def __init__(self,
|
|
37
|
-
self.
|
|
38
|
+
def __init__(self, pedb, edb_object=None, name: str = None, sim_setup=None):
|
|
39
|
+
self._pedb = pedb
|
|
40
|
+
self.sim_setup = sim_setup
|
|
38
41
|
|
|
39
|
-
if
|
|
40
|
-
self.
|
|
41
|
-
self._name = self.
|
|
42
|
+
if edb_object is not None:
|
|
43
|
+
self._edb_object = edb_object
|
|
44
|
+
self._name = self._edb_object.Name
|
|
42
45
|
else:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
self._name = name
|
|
47
|
-
self._edb_sweep_data = self._pedb.simsetupdata.SweepData(self._name)
|
|
48
|
-
self.set_frequencies(frequency_sweep)
|
|
49
|
-
|
|
50
|
-
@property
|
|
51
|
-
def _edb_object(self):
|
|
52
|
-
return self._edb_sweep_data
|
|
53
|
-
|
|
54
|
-
@property
|
|
55
|
-
def _pedb(self):
|
|
56
|
-
"""EDB."""
|
|
57
|
-
return self._sim_setup._pedb
|
|
46
|
+
self._name = name
|
|
47
|
+
self._edb_object = self._pedb.simsetupdata.SweepData(self._name)
|
|
48
|
+
self.clear()
|
|
58
49
|
|
|
59
50
|
def _update_sweep(self):
|
|
60
51
|
"""Update the sweep."""
|
|
61
|
-
self.
|
|
62
|
-
self.
|
|
52
|
+
self.sim_setup.delete_frequency_sweep(self)
|
|
53
|
+
self.sim_setup._add_frequency_sweep(self)
|
|
63
54
|
return
|
|
64
55
|
|
|
65
56
|
@property
|
|
66
57
|
def name(self):
|
|
67
58
|
"""Name of the sweep."""
|
|
68
|
-
return self.
|
|
59
|
+
return self._edb_object.Name
|
|
69
60
|
|
|
70
61
|
@name.setter
|
|
71
62
|
def name(self, value):
|
|
72
|
-
self.
|
|
63
|
+
self._edb_object.Name = value
|
|
73
64
|
self._update_sweep()
|
|
74
65
|
|
|
75
|
-
@property
|
|
76
|
-
def sweep_type(self):
|
|
77
|
-
"""Sweep type."""
|
|
78
|
-
return
|
|
79
|
-
|
|
80
66
|
@property
|
|
81
67
|
def frequencies(self):
|
|
82
68
|
"""List of frequency points."""
|
|
83
|
-
return list(self.
|
|
69
|
+
return [float(i) for i in list(self._edb_object.Frequencies)]
|
|
84
70
|
|
|
85
71
|
@property
|
|
86
72
|
def adaptive_sampling(self):
|
|
@@ -91,7 +77,7 @@ class SweepData(object):
|
|
|
91
77
|
bool
|
|
92
78
|
``True`` if adaptive sampling is used, ``False`` otherwise.
|
|
93
79
|
"""
|
|
94
|
-
return self.
|
|
80
|
+
return self._edb_object.AdaptiveSampling
|
|
95
81
|
|
|
96
82
|
@property
|
|
97
83
|
def adv_dc_extrapolation(self):
|
|
@@ -102,22 +88,22 @@ class SweepData(object):
|
|
|
102
88
|
bool
|
|
103
89
|
``True`` if advanced DC Extrapolation is used, ``False`` otherwise.
|
|
104
90
|
"""
|
|
105
|
-
return self.
|
|
91
|
+
return self._edb_object.AdvDCExtrapolation
|
|
106
92
|
|
|
107
93
|
@property
|
|
108
94
|
def compute_dc_point(self):
|
|
109
95
|
"""Flag indicating if computing the exact DC point is turned on."""
|
|
110
|
-
return self.
|
|
96
|
+
return self._edb_object.ComputeDCPoint
|
|
111
97
|
|
|
112
98
|
@compute_dc_point.setter
|
|
113
99
|
def compute_dc_point(self, value):
|
|
114
|
-
self.
|
|
100
|
+
self._edb_object.ComputeDCPoint = value
|
|
115
101
|
self._update_sweep()
|
|
116
102
|
|
|
117
103
|
@property
|
|
118
104
|
def auto_s_mat_only_solve(self):
|
|
119
105
|
"""Flag indicating if Auto SMatrix only solve is turned on."""
|
|
120
|
-
return self.
|
|
106
|
+
return self._edb_object.AutoSMatOnlySolve
|
|
121
107
|
|
|
122
108
|
@property
|
|
123
109
|
def enforce_causality(self):
|
|
@@ -128,7 +114,7 @@ class SweepData(object):
|
|
|
128
114
|
bool
|
|
129
115
|
``True`` if enforce causality is used, ``False`` otherwise.
|
|
130
116
|
"""
|
|
131
|
-
return self.
|
|
117
|
+
return self._edb_object.EnforceCausality
|
|
132
118
|
|
|
133
119
|
@property
|
|
134
120
|
def enforce_dc_and_causality(self):
|
|
@@ -139,7 +125,7 @@ class SweepData(object):
|
|
|
139
125
|
bool
|
|
140
126
|
``True`` if enforce dc point and causality is used, ``False`` otherwise.
|
|
141
127
|
"""
|
|
142
|
-
return self.
|
|
128
|
+
return self._edb_object.EnforceDCAndCausality
|
|
143
129
|
|
|
144
130
|
@property
|
|
145
131
|
def enforce_passivity(self):
|
|
@@ -150,7 +136,7 @@ class SweepData(object):
|
|
|
150
136
|
bool
|
|
151
137
|
``True`` if enforce passivity is used, ``False`` otherwise.
|
|
152
138
|
"""
|
|
153
|
-
return self.
|
|
139
|
+
return self._edb_object.EnforcePassivity
|
|
154
140
|
|
|
155
141
|
@property
|
|
156
142
|
def freq_sweep_type(self):
|
|
@@ -166,7 +152,40 @@ class SweepData(object):
|
|
|
166
152
|
str
|
|
167
153
|
Sweep type.
|
|
168
154
|
"""
|
|
169
|
-
return self.
|
|
155
|
+
return self._edb_object.FreqSweepType.ToString()
|
|
156
|
+
|
|
157
|
+
@freq_sweep_type.setter
|
|
158
|
+
def freq_sweep_type(self, value):
|
|
159
|
+
edb_freq_sweep_type = self._edb_object.TFreqSweepType
|
|
160
|
+
if value in [0, "kInterpolatingSweep"]:
|
|
161
|
+
self._edb_object.FreqSweepType = edb_freq_sweep_type.kInterpolatingSweep
|
|
162
|
+
elif value in [1, "kDiscreteSweep"]:
|
|
163
|
+
self._edb_object.FreqSweepType = edb_freq_sweep_type.kDiscreteSweep
|
|
164
|
+
elif value in [2, "kBroadbandFastSweep"]:
|
|
165
|
+
self._edb_object.FreqSweepType = edb_freq_sweep_type.kBroadbandFastSweep
|
|
166
|
+
elif value in [3, "kNumSweepTypes"]:
|
|
167
|
+
self._edb_object.FreqSweepType = edb_freq_sweep_type.kNumSweepTypes
|
|
168
|
+
self._edb_object.FreqSweepType.ToString()
|
|
169
|
+
|
|
170
|
+
@property
|
|
171
|
+
def type(self):
|
|
172
|
+
"""Sweep type."""
|
|
173
|
+
sw_type = self.freq_sweep_type
|
|
174
|
+
if sw_type == "kInterpolatingSweep":
|
|
175
|
+
return "interpolation"
|
|
176
|
+
elif sw_type == "kDiscreteSweep":
|
|
177
|
+
return "discrete"
|
|
178
|
+
elif sw_type == "kBroadbandFastSweep":
|
|
179
|
+
return "broadband"
|
|
180
|
+
|
|
181
|
+
@type.setter
|
|
182
|
+
def type(self, value):
|
|
183
|
+
if value == "interpolation":
|
|
184
|
+
self.freq_sweep_type = "kInterpolatingSweep"
|
|
185
|
+
elif value == "discrete":
|
|
186
|
+
self.freq_sweep_type = "kDiscreteSweep"
|
|
187
|
+
elif value == "broadband":
|
|
188
|
+
self.freq_sweep_type = "kBroadbandFastSweep"
|
|
170
189
|
|
|
171
190
|
@property
|
|
172
191
|
def interpolation_use_full_basis(self):
|
|
@@ -177,7 +196,7 @@ class SweepData(object):
|
|
|
177
196
|
bool
|
|
178
197
|
``True`` if full basis interpolation is used, ``False`` otherwise.
|
|
179
198
|
"""
|
|
180
|
-
return self.
|
|
199
|
+
return self._edb_object.InterpUseFullBasis
|
|
181
200
|
|
|
182
201
|
@property
|
|
183
202
|
def interpolation_use_port_impedance(self):
|
|
@@ -188,7 +207,7 @@ class SweepData(object):
|
|
|
188
207
|
bool
|
|
189
208
|
``True`` if port impedance is used, ``False`` otherwise.
|
|
190
209
|
"""
|
|
191
|
-
return self.
|
|
210
|
+
return self._edb_object.InterpUsePortImpedance
|
|
192
211
|
|
|
193
212
|
@property
|
|
194
213
|
def interpolation_use_prop_const(self):
|
|
@@ -199,7 +218,7 @@ class SweepData(object):
|
|
|
199
218
|
bool
|
|
200
219
|
``True`` if propagation constants are used, ``False`` otherwise.
|
|
201
220
|
"""
|
|
202
|
-
return self.
|
|
221
|
+
return self._edb_object.InterpUsePropConst
|
|
203
222
|
|
|
204
223
|
@property
|
|
205
224
|
def interpolation_use_s_matrix(self):
|
|
@@ -210,7 +229,7 @@ class SweepData(object):
|
|
|
210
229
|
bool
|
|
211
230
|
``True`` if S matrix are used, ``False`` otherwise.
|
|
212
231
|
"""
|
|
213
|
-
return self.
|
|
232
|
+
return self._edb_object.InterpUseSMatrix
|
|
214
233
|
|
|
215
234
|
@property
|
|
216
235
|
def max_solutions(self):
|
|
@@ -220,7 +239,7 @@ class SweepData(object):
|
|
|
220
239
|
-------
|
|
221
240
|
int
|
|
222
241
|
"""
|
|
223
|
-
return self.
|
|
242
|
+
return self._edb_object.MaxSolutions
|
|
224
243
|
|
|
225
244
|
@property
|
|
226
245
|
def min_freq_s_mat_only_solve(self):
|
|
@@ -231,7 +250,7 @@ class SweepData(object):
|
|
|
231
250
|
str
|
|
232
251
|
Frequency with units.
|
|
233
252
|
"""
|
|
234
|
-
return self.
|
|
253
|
+
return self._edb_object.MinFreqSMatOnlySolve
|
|
235
254
|
|
|
236
255
|
@property
|
|
237
256
|
def min_solved_freq(self):
|
|
@@ -242,7 +261,7 @@ class SweepData(object):
|
|
|
242
261
|
str
|
|
243
262
|
Frequency with units.
|
|
244
263
|
"""
|
|
245
|
-
return self.
|
|
264
|
+
return self._edb_object.MinSolvedFreq
|
|
246
265
|
|
|
247
266
|
@property
|
|
248
267
|
def passivity_tolerance(self):
|
|
@@ -252,7 +271,7 @@ class SweepData(object):
|
|
|
252
271
|
-------
|
|
253
272
|
float
|
|
254
273
|
"""
|
|
255
|
-
return self.
|
|
274
|
+
return self._edb_object.PassivityTolerance
|
|
256
275
|
|
|
257
276
|
@property
|
|
258
277
|
def relative_s_error(self):
|
|
@@ -262,7 +281,7 @@ class SweepData(object):
|
|
|
262
281
|
-------
|
|
263
282
|
float
|
|
264
283
|
"""
|
|
265
|
-
return self.
|
|
284
|
+
return self._edb_object.RelativeSError
|
|
266
285
|
|
|
267
286
|
@property
|
|
268
287
|
def save_fields(self):
|
|
@@ -273,7 +292,7 @@ class SweepData(object):
|
|
|
273
292
|
bool
|
|
274
293
|
``True`` if save fields is enabled, ``False`` otherwise.
|
|
275
294
|
"""
|
|
276
|
-
return self.
|
|
295
|
+
return self._edb_object.SaveFields
|
|
277
296
|
|
|
278
297
|
@property
|
|
279
298
|
def save_rad_fields_only(self):
|
|
@@ -284,7 +303,7 @@ class SweepData(object):
|
|
|
284
303
|
bool
|
|
285
304
|
``True`` if save radiated field only is used, ``False`` otherwise.
|
|
286
305
|
"""
|
|
287
|
-
return self.
|
|
306
|
+
return self._edb_object.SaveRadFieldsOnly
|
|
288
307
|
|
|
289
308
|
@property
|
|
290
309
|
def use_q3d_for_dc(self):
|
|
@@ -295,113 +314,101 @@ class SweepData(object):
|
|
|
295
314
|
bool
|
|
296
315
|
``True`` if Q3d for DC point is used, ``False`` otherwise.
|
|
297
316
|
"""
|
|
298
|
-
return self.
|
|
317
|
+
return self._edb_object.UseQ3DForDC
|
|
299
318
|
|
|
300
319
|
@adaptive_sampling.setter
|
|
301
320
|
def adaptive_sampling(self, value):
|
|
302
|
-
self.
|
|
321
|
+
self._edb_object.AdaptiveSampling = value
|
|
303
322
|
self._update_sweep()
|
|
304
323
|
|
|
305
324
|
@adv_dc_extrapolation.setter
|
|
306
325
|
def adv_dc_extrapolation(self, value):
|
|
307
|
-
self.
|
|
326
|
+
self._edb_object.AdvDCExtrapolation = value
|
|
308
327
|
self._update_sweep()
|
|
309
328
|
|
|
310
329
|
@auto_s_mat_only_solve.setter
|
|
311
330
|
def auto_s_mat_only_solve(self, value):
|
|
312
|
-
self.
|
|
331
|
+
self._edb_object.AutoSMatOnlySolve = value
|
|
313
332
|
self._update_sweep()
|
|
314
333
|
|
|
315
334
|
@enforce_causality.setter
|
|
316
335
|
def enforce_causality(self, value):
|
|
317
|
-
self.
|
|
336
|
+
self._edb_object.EnforceCausality = value
|
|
318
337
|
self._update_sweep()
|
|
319
338
|
|
|
320
339
|
@enforce_dc_and_causality.setter
|
|
321
340
|
def enforce_dc_and_causality(self, value):
|
|
322
|
-
self.
|
|
341
|
+
self._edb_object.EnforceDCAndCausality = value
|
|
323
342
|
self._update_sweep()
|
|
324
343
|
|
|
325
344
|
@enforce_passivity.setter
|
|
326
345
|
def enforce_passivity(self, value):
|
|
327
|
-
self.
|
|
346
|
+
self._edb_object.EnforcePassivity = value
|
|
328
347
|
self._update_sweep()
|
|
329
348
|
|
|
330
|
-
@freq_sweep_type.setter
|
|
331
|
-
def freq_sweep_type(self, value):
|
|
332
|
-
edb_freq_sweep_type = self._edb_sweep_data.TFreqSweepType
|
|
333
|
-
if value in [0, "kInterpolatingSweep"]:
|
|
334
|
-
self._edb_sweep_data.FreqSweepType = edb_freq_sweep_type.kInterpolatingSweep
|
|
335
|
-
elif value in [1, "kDiscreteSweep"]:
|
|
336
|
-
self._edb_sweep_data.FreqSweepType = edb_freq_sweep_type.kDiscreteSweep
|
|
337
|
-
elif value in [2, "kBroadbandFastSweep"]:
|
|
338
|
-
self._edb_sweep_data.FreqSweepType = edb_freq_sweep_type.kBroadbandFastSweep
|
|
339
|
-
elif value in [3, "kNumSweepTypes"]:
|
|
340
|
-
self._edb_sweep_data.FreqSweepType = edb_freq_sweep_type.kNumSweepTypes
|
|
341
|
-
self._edb_sweep_data.FreqSweepType.ToString()
|
|
342
|
-
|
|
343
349
|
@interpolation_use_full_basis.setter
|
|
344
350
|
def interpolation_use_full_basis(self, value):
|
|
345
|
-
self.
|
|
351
|
+
self._edb_object.InterpUseFullBasis = value
|
|
346
352
|
self._update_sweep()
|
|
347
353
|
|
|
348
354
|
@interpolation_use_port_impedance.setter
|
|
349
355
|
def interpolation_use_port_impedance(self, value):
|
|
350
|
-
self.
|
|
356
|
+
self._edb_object.InterpUsePortImpedance = value
|
|
351
357
|
self._update_sweep()
|
|
352
358
|
|
|
353
359
|
@interpolation_use_prop_const.setter
|
|
354
360
|
def interpolation_use_prop_const(self, value):
|
|
355
|
-
self.
|
|
361
|
+
self._edb_object.InterpUsePropConst = value
|
|
356
362
|
self._update_sweep()
|
|
357
363
|
|
|
358
364
|
@interpolation_use_s_matrix.setter
|
|
359
365
|
def interpolation_use_s_matrix(self, value):
|
|
360
|
-
self.
|
|
366
|
+
self._edb_object.InterpUseSMatrix = value
|
|
361
367
|
self._update_sweep()
|
|
362
368
|
|
|
363
369
|
@max_solutions.setter
|
|
364
370
|
def max_solutions(self, value):
|
|
365
|
-
self.
|
|
371
|
+
self._edb_object.MaxSolutions = value
|
|
366
372
|
self._update_sweep()
|
|
367
373
|
|
|
368
374
|
@min_freq_s_mat_only_solve.setter
|
|
369
375
|
def min_freq_s_mat_only_solve(self, value):
|
|
370
|
-
self.
|
|
376
|
+
self._edb_object.MinFreqSMatOnlySolve = value
|
|
371
377
|
self._update_sweep()
|
|
372
378
|
|
|
373
379
|
@min_solved_freq.setter
|
|
374
380
|
def min_solved_freq(self, value):
|
|
375
|
-
self.
|
|
381
|
+
self._edb_object.MinSolvedFreq = value
|
|
376
382
|
self._update_sweep()
|
|
377
383
|
|
|
378
384
|
@passivity_tolerance.setter
|
|
379
385
|
def passivity_tolerance(self, value):
|
|
380
|
-
self.
|
|
386
|
+
self._edb_object.PassivityTolerance = value
|
|
381
387
|
self._update_sweep()
|
|
382
388
|
|
|
383
389
|
@relative_s_error.setter
|
|
384
390
|
def relative_s_error(self, value):
|
|
385
|
-
self.
|
|
391
|
+
self._edb_object.RelativeSError = value
|
|
386
392
|
self._update_sweep()
|
|
387
393
|
|
|
388
394
|
@save_fields.setter
|
|
389
395
|
def save_fields(self, value):
|
|
390
|
-
self.
|
|
396
|
+
self._edb_object.SaveFields = value
|
|
391
397
|
self._update_sweep()
|
|
392
398
|
|
|
393
399
|
@save_rad_fields_only.setter
|
|
394
400
|
def save_rad_fields_only(self, value):
|
|
395
|
-
self.
|
|
401
|
+
self._edb_object.SaveRadFieldsOnly = value
|
|
396
402
|
self._update_sweep()
|
|
397
403
|
|
|
398
404
|
@use_q3d_for_dc.setter
|
|
399
405
|
def use_q3d_for_dc(self, value):
|
|
400
|
-
self.
|
|
406
|
+
self._edb_object.UseQ3DForDC = value
|
|
401
407
|
self._update_sweep()
|
|
402
408
|
|
|
403
409
|
def _set_frequencies(self, freq_sweep_string="Linear Step: 0GHz to 20GHz, step=0.05GHz"):
|
|
404
|
-
|
|
410
|
+
warnings.warn("Use new property :func:`add` instead.", DeprecationWarning)
|
|
411
|
+
self._edb_object.SetFrequencies(freq_sweep_string)
|
|
405
412
|
self._update_sweep()
|
|
406
413
|
|
|
407
414
|
def set_frequencies_linear_scale(self, start="0.1GHz", stop="20GHz", step="50MHz"):
|
|
@@ -421,7 +428,8 @@ class SweepData(object):
|
|
|
421
428
|
bool
|
|
422
429
|
``True`` if correctly executed, ``False`` otherwise.
|
|
423
430
|
"""
|
|
424
|
-
|
|
431
|
+
warnings.warn("Use new property :func:`add` instead.", DeprecationWarning)
|
|
432
|
+
self._edb_object.Frequencies = self._edb_object.SetFrequencies(start, stop, step)
|
|
425
433
|
return self._update_sweep()
|
|
426
434
|
|
|
427
435
|
def set_frequencies_linear_count(self, start="1kHz", stop="0.1GHz", count=10):
|
|
@@ -441,9 +449,10 @@ class SweepData(object):
|
|
|
441
449
|
bool
|
|
442
450
|
``True`` if correctly executed, ``False`` otherwise.
|
|
443
451
|
"""
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
452
|
+
warnings.warn("Use new property :func:`add` instead.", DeprecationWarning)
|
|
453
|
+
start = self.sim_setup._pedb.arg_to_dim(start, "Hz")
|
|
454
|
+
stop = self.sim_setup._pedb.arg_to_dim(stop, "Hz")
|
|
455
|
+
self._edb_object.Frequencies = self._edb_object.SetFrequencies(start, stop, count)
|
|
447
456
|
return self._update_sweep()
|
|
448
457
|
|
|
449
458
|
def set_frequencies_log_scale(self, start="1kHz", stop="0.1GHz", samples=10):
|
|
@@ -463,9 +472,10 @@ class SweepData(object):
|
|
|
463
472
|
bool
|
|
464
473
|
``True`` if correctly executed, ``False`` otherwise.
|
|
465
474
|
"""
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
475
|
+
warnings.warn("Use new property :func:`add` instead.", DeprecationWarning)
|
|
476
|
+
start = self.sim_setup._pedb.arg_to_dim(start, "Hz")
|
|
477
|
+
stop = self.sim_setup._pedb.arg_to_dim(stop, "Hz")
|
|
478
|
+
self._edb_object.Frequencies = self._edb_object.SetLogFrequencies(start, stop, samples)
|
|
469
479
|
return self._update_sweep()
|
|
470
480
|
|
|
471
481
|
def set_frequencies(self, frequency_list=None, update=True):
|
|
@@ -484,6 +494,7 @@ class SweepData(object):
|
|
|
484
494
|
bool
|
|
485
495
|
``True`` if correctly executed, ``False`` otherwise.
|
|
486
496
|
"""
|
|
497
|
+
warnings.warn("Use new property :func:`add` instead.", DeprecationWarning)
|
|
487
498
|
if not frequency_list:
|
|
488
499
|
frequency_list = [
|
|
489
500
|
["linear count", "0", "1kHz", 1],
|
|
@@ -495,15 +506,39 @@ class SweepData(object):
|
|
|
495
506
|
frequency_list = [frequency_list]
|
|
496
507
|
for i in frequency_list:
|
|
497
508
|
if i[0] == "linear count":
|
|
498
|
-
temp.extend(list(self.
|
|
509
|
+
temp.extend(list(self._edb_object.SetFrequencies(i[1], i[2], i[3])))
|
|
499
510
|
elif i[0] == "linear scale":
|
|
500
|
-
temp.extend(list(self.
|
|
511
|
+
temp.extend(list(self._edb_object.SetFrequencies(i[1], i[2], i[3])))
|
|
501
512
|
elif i[0] == "log scale":
|
|
502
|
-
temp.extend(list(self.
|
|
513
|
+
temp.extend(list(self._edb_object.SetLogFrequencies(i[1], i[2], i[3])))
|
|
503
514
|
else:
|
|
504
515
|
return False
|
|
505
|
-
self.
|
|
516
|
+
self._edb_object.Frequencies.Clear()
|
|
506
517
|
for i in temp:
|
|
507
|
-
self.
|
|
518
|
+
self._edb_object.Frequencies.Add(i)
|
|
508
519
|
if update:
|
|
509
520
|
return self._update_sweep()
|
|
521
|
+
|
|
522
|
+
def add(self, sweep_type, start, stop, increment):
|
|
523
|
+
sweep_type = sweep_type.replace(" ", "_")
|
|
524
|
+
start = start.upper().replace("Z", "z") if isinstance(start, str) else str(start)
|
|
525
|
+
stop = stop.upper().replace("Z", "z") if isinstance(stop, str) else str(stop)
|
|
526
|
+
increment = increment.upper().replace("Z", "z") if isinstance(increment, str) else int(increment)
|
|
527
|
+
if sweep_type in ["linear_count", "linear_scale"]:
|
|
528
|
+
freqs = list(self._edb_object.SetFrequencies(start, stop, increment))
|
|
529
|
+
elif sweep_type == "log_scale":
|
|
530
|
+
freqs = list(self._edb_object.SetLogFrequencies(start, stop, increment))
|
|
531
|
+
else:
|
|
532
|
+
raise ValueError("sweep_type must be either 'linear_count', 'linear_scale' or 'log_scale")
|
|
533
|
+
return self.add_frequencies(freqs)
|
|
534
|
+
|
|
535
|
+
def add_frequencies(self, frequencies):
|
|
536
|
+
if not isinstance(frequencies, list):
|
|
537
|
+
frequencies = [frequencies]
|
|
538
|
+
for i in frequencies:
|
|
539
|
+
i = self._pedb.edb_value(i).ToString()
|
|
540
|
+
self._edb_object.Frequencies.Add(i)
|
|
541
|
+
return list(self._edb_object.Frequencies)
|
|
542
|
+
|
|
543
|
+
def clear(self):
|
|
544
|
+
self._edb_object.Frequencies.Clear()
|
pyedb/dotnet/edb_core/siwave.py
CHANGED
|
@@ -113,6 +113,11 @@ class EdbSiwave(object):
|
|
|
113
113
|
"""Get all probes."""
|
|
114
114
|
return self._pedb.probes
|
|
115
115
|
|
|
116
|
+
@property
|
|
117
|
+
def voltage_regulator_modules(self):
|
|
118
|
+
"""Get all voltage regulator modules"""
|
|
119
|
+
return self._pedb.voltage_regulator_modules
|
|
120
|
+
|
|
116
121
|
@property
|
|
117
122
|
def pin_groups(self):
|
|
118
123
|
"""All Layout Pin groups.
|
|
@@ -1429,6 +1434,50 @@ class EdbSiwave(object):
|
|
|
1429
1434
|
n_terminal = self._pedb.get_point_terminal(name + "_ref", negative_net_name, negative_location, negative_layer)
|
|
1430
1435
|
return self._pedb.create_voltage_probe(p_terminal, n_terminal)
|
|
1431
1436
|
|
|
1437
|
+
def create_vrm_module(
|
|
1438
|
+
self,
|
|
1439
|
+
name=None,
|
|
1440
|
+
is_active=True,
|
|
1441
|
+
voltage="3V",
|
|
1442
|
+
positive_sensor_pin=None,
|
|
1443
|
+
negative_sensor_pin=None,
|
|
1444
|
+
load_regulation_current="1A",
|
|
1445
|
+
load_regulation_percent=0.1,
|
|
1446
|
+
):
|
|
1447
|
+
"""Create a voltage regulator module.
|
|
1448
|
+
|
|
1449
|
+
Parameters
|
|
1450
|
+
----------
|
|
1451
|
+
name : str
|
|
1452
|
+
Name of the voltage regulator.
|
|
1453
|
+
is_active : bool optional
|
|
1454
|
+
Set the voltage regulator active or not. Default value is ``True``.
|
|
1455
|
+
voltage ; str, float
|
|
1456
|
+
Set the voltage value.
|
|
1457
|
+
positive_sensor_pin : int, .class pyedb.dotnet.edb_core.edb_data.padstacks_data.EDBPadstackInstance
|
|
1458
|
+
defining the positive sensor pin.
|
|
1459
|
+
negative_sensor_pin : int, .class pyedb.dotnet.edb_core.edb_data.padstacks_data.EDBPadstackInstance
|
|
1460
|
+
defining the negative sensor pin.
|
|
1461
|
+
load_regulation_current : str or float
|
|
1462
|
+
definition the load regulation current value.
|
|
1463
|
+
load_regulation_percent : float
|
|
1464
|
+
definition the load regulation percent value.
|
|
1465
|
+
"""
|
|
1466
|
+
from pyedb.dotnet.edb_core.cell.voltage_regulator import VoltageRegulator
|
|
1467
|
+
|
|
1468
|
+
voltage = self._pedb.edb_value(voltage)
|
|
1469
|
+
load_regulation_current = self._pedb.edb_value(load_regulation_current)
|
|
1470
|
+
load_regulation_percent = self._pedb.edb_value(load_regulation_percent)
|
|
1471
|
+
edb_vrm = self._edb_object = self._pedb._edb.Cell.VoltageRegulator.Create(
|
|
1472
|
+
self._pedb.active_layout, name, is_active, voltage, load_regulation_current, load_regulation_percent
|
|
1473
|
+
)
|
|
1474
|
+
vrm = VoltageRegulator(self._pedb, edb_vrm)
|
|
1475
|
+
if positive_sensor_pin:
|
|
1476
|
+
vrm.positive_remote_sense_pin = positive_sensor_pin
|
|
1477
|
+
if negative_sensor_pin:
|
|
1478
|
+
vrm.negative_remote_sense_pin = negative_sensor_pin
|
|
1479
|
+
return vrm
|
|
1480
|
+
|
|
1432
1481
|
@property
|
|
1433
1482
|
def icepak_use_minimal_comp_defaults(self):
|
|
1434
1483
|
"""Icepak default setting. If "True", only resistor are active in Icepak simulation.
|