pyedb 0.15.dev0__py3-none-any.whl → 0.17.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.

Files changed (42) hide show
  1. pyedb/__init__.py +1 -1
  2. pyedb/configuration/cfg_common.py +1 -3
  3. pyedb/configuration/cfg_components.py +49 -5
  4. pyedb/configuration/cfg_data.py +3 -6
  5. pyedb/configuration/cfg_package_definition.py +3 -5
  6. pyedb/configuration/cfg_setup.py +214 -176
  7. pyedb/configuration/cfg_stackup.py +4 -4
  8. pyedb/configuration/configuration.py +9 -5
  9. pyedb/dotnet/edb.py +64 -44
  10. pyedb/dotnet/edb_core/cell/__init__.py +0 -0
  11. pyedb/dotnet/edb_core/cell/hierarchy/component.py +12 -17
  12. pyedb/dotnet/edb_core/cell/hierarchy/hierarchy_obj.py +50 -0
  13. pyedb/dotnet/edb_core/cell/layout.py +0 -6
  14. pyedb/dotnet/edb_core/cell/voltage_regulator.py +143 -0
  15. pyedb/dotnet/edb_core/components.py +2 -2
  16. pyedb/dotnet/edb_core/dotnet/primitive.py +129 -3
  17. pyedb/dotnet/edb_core/edb_data/hfss_pi_simulation_setup_data.py +0 -460
  18. pyedb/dotnet/edb_core/edb_data/primitives_data.py +38 -38
  19. pyedb/dotnet/edb_core/edb_data/raptor_x_simulation_setup_data.py +1 -1
  20. pyedb/dotnet/edb_core/layout.py +25 -1
  21. pyedb/dotnet/edb_core/layout_validation.py +26 -0
  22. pyedb/dotnet/edb_core/nets.py +1 -1
  23. pyedb/dotnet/edb_core/sim_setup_data/data/mesh_operation.py +63 -49
  24. pyedb/dotnet/edb_core/sim_setup_data/data/settings.py +1 -1
  25. pyedb/dotnet/edb_core/sim_setup_data/data/sim_setup_info.py +81 -0
  26. pyedb/dotnet/edb_core/sim_setup_data/data/simulation_settings.py +424 -0
  27. pyedb/dotnet/edb_core/sim_setup_data/data/sweep_data.py +131 -96
  28. pyedb/dotnet/edb_core/siwave.py +63 -0
  29. pyedb/dotnet/edb_core/utilities/hfss_simulation_setup.py +469 -0
  30. pyedb/dotnet/edb_core/utilities/simulation_setup.py +112 -773
  31. pyedb/dotnet/edb_core/utilities/siwave_simulation_setup.py +369 -0
  32. pyedb/misc/siw_feature_config/xtalk_scan/fd_xtalk_scan_config.py +91 -0
  33. pyedb/misc/siw_feature_config/xtalk_scan/impedance_scan_config.py +70 -0
  34. pyedb/misc/siw_feature_config/xtalk_scan/net.py +69 -0
  35. pyedb/misc/siw_feature_config/xtalk_scan/pins.py +60 -0
  36. pyedb/misc/siw_feature_config/xtalk_scan/scan_config.py +88 -0
  37. pyedb/misc/siw_feature_config/xtalk_scan/td_xtalk_config.py +104 -0
  38. pyedb/workflow.py +32 -0
  39. {pyedb-0.15.dev0.dist-info → pyedb-0.17.0.dist-info}/METADATA +1 -1
  40. {pyedb-0.15.dev0.dist-info → pyedb-0.17.0.dist-info}/RECORD +42 -28
  41. {pyedb-0.15.dev0.dist-info → pyedb-0.17.0.dist-info}/LICENSE +0 -0
  42. {pyedb-0.15.dev0.dist-info → pyedb-0.17.0.dist-info}/WHEEL +0 -0
@@ -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
- edb_sweep_data : :class:`Ansys.Ansoft.Edb.Utility.SIWDCIRSimulationSettings`, optional
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, sim_setup, frequency_sweep=None, name=None, edb_sweep_data=None):
37
- self._sim_setup = sim_setup
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 edb_sweep_data:
40
- self._edb_sweep_data = edb_sweep_data
41
- self._name = self._edb_sweep_data.Name
42
+ if edb_object is not None:
43
+ self._edb_object = edb_object
44
+ self._name = self._edb_object.Name
42
45
  else:
43
- if not name:
44
- self._name = generate_unique_name("sweep")
45
- else:
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._sim_setup.delete_frequency_sweep(self)
62
- self._sim_setup._add_frequency_sweep(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._edb_sweep_data.Name
59
+ return self._edb_object.Name
69
60
 
70
61
  @name.setter
71
62
  def name(self, value):
72
- self._edb_sweep_data.Name = value
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._edb_sweep_data.Frequencies)
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._edb_sweep_data.AdaptiveSampling
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._edb_sweep_data.AdvDCExtrapolation
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._edb_sweep_data.ComputeDCPoint
96
+ return self._edb_object.ComputeDCPoint
111
97
 
112
98
  @compute_dc_point.setter
113
99
  def compute_dc_point(self, value):
114
- self._edb_sweep_data.ComputeDCPoint = value
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._edb_sweep_data.AutoSMatOnlySolve
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._edb_sweep_data.EnforceCausality
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._edb_sweep_data.EnforceDCAndCausality
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._edb_sweep_data.EnforcePassivity
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._edb_sweep_data.FreqSweepType.ToString()
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._edb_sweep_data.InterpUseFullBasis
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._edb_sweep_data.InterpUsePortImpedance
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._edb_sweep_data.InterpUsePropConst
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._edb_sweep_data.InterpUseSMatrix
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._edb_sweep_data.MaxSolutions
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._edb_sweep_data.MinFreqSMatOnlySolve
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._edb_sweep_data.MinSolvedFreq
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._edb_sweep_data.PassivityTolerance
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._edb_sweep_data.RelativeSError
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._edb_sweep_data.SaveFields
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._edb_sweep_data.SaveRadFieldsOnly
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._edb_sweep_data.UseQ3DForDC
317
+ return self._edb_object.UseQ3DForDC
299
318
 
300
319
  @adaptive_sampling.setter
301
320
  def adaptive_sampling(self, value):
302
- self._edb_sweep_data.AdaptiveSampling = value
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._edb_sweep_data.AdvDCExtrapolation = value
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._edb_sweep_data.AutoSMatOnlySolve = value
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._edb_sweep_data.EnforceCausality = value
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._edb_sweep_data.EnforceDCAndCausality = value
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._edb_sweep_data.EnforcePassivity = value
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._edb_sweep_data.InterpUseFullBasis = value
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._edb_sweep_data.InterpUsePortImpedance = value
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._edb_sweep_data.InterpUsePropConst = value
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._edb_sweep_data.InterpUseSMatrix = value
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._edb_sweep_data.MaxSolutions = value
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._edb_sweep_data.MinFreqSMatOnlySolve = value
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._edb_sweep_data.MinSolvedFreq = value
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._edb_sweep_data.PassivityTolerance = value
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._edb_sweep_data.RelativeSError = value
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._edb_sweep_data.SaveFields = value
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._edb_sweep_data.SaveRadFieldsOnly = value
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._edb_sweep_data.UseQ3DForDC = value
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
- self._edb_sweep_data.SetFrequencies(freq_sweep_string)
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
- self._edb_sweep_data.Frequencies = self._edb_sweep_data.SetFrequencies(start, stop, step)
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
- start = self._sim_setup._pedb.arg_to_dim(start, "Hz")
445
- stop = self._sim_setup._pedb.arg_to_dim(stop, "Hz")
446
- self._edb_sweep_data.Frequencies = self._edb_sweep_data.SetFrequencies(start, stop, count)
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
- start = self._sim_setup._pedb.arg_to_dim(start, "Hz")
467
- stop = self._sim_setup._pedb.arg_to_dim(stop, "Hz")
468
- self._edb_sweep_data.Frequencies = self._edb_sweep_data.SetLogFrequencies(start, stop, samples)
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._edb_sweep_data.SetFrequencies(i[1], i[2], i[3])))
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._edb_sweep_data.SetFrequencies(i[1], i[2], i[3])))
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._edb_sweep_data.SetLogFrequencies(i[1], i[2], i[3])))
513
+ temp.extend(list(self._edb_object.SetLogFrequencies(i[1], i[2], i[3])))
503
514
  else:
504
515
  return False
505
- self._edb_sweep_data.Frequencies.Clear()
516
+ self._edb_object.Frequencies.Clear()
506
517
  for i in temp:
507
- self._edb_sweep_data.Frequencies.Add(i)
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()
@@ -43,6 +43,7 @@ from pyedb.dotnet.edb_core.edb_data.sources import (
43
43
  from pyedb.dotnet.edb_core.general import convert_py_list_to_net_list
44
44
  from pyedb.generic.constants import SolverType, SweepType
45
45
  from pyedb.generic.general_methods import _retry_ntimes, generate_unique_name
46
+ from pyedb.misc.siw_feature_config.xtalk_scan.scan_config import SiwaveScanConfig
46
47
  from pyedb.modeler.geometry_operators import GeometryOperators
47
48
 
48
49
 
@@ -113,6 +114,11 @@ class EdbSiwave(object):
113
114
  """Get all probes."""
114
115
  return self._pedb.probes
115
116
 
117
+ @property
118
+ def voltage_regulator_modules(self):
119
+ """Get all voltage regulator modules"""
120
+ return self._pedb.voltage_regulator_modules
121
+
116
122
  @property
117
123
  def pin_groups(self):
118
124
  """All Layout Pin groups.
@@ -1429,6 +1435,50 @@ class EdbSiwave(object):
1429
1435
  n_terminal = self._pedb.get_point_terminal(name + "_ref", negative_net_name, negative_location, negative_layer)
1430
1436
  return self._pedb.create_voltage_probe(p_terminal, n_terminal)
1431
1437
 
1438
+ def create_vrm_module(
1439
+ self,
1440
+ name=None,
1441
+ is_active=True,
1442
+ voltage="3V",
1443
+ positive_sensor_pin=None,
1444
+ negative_sensor_pin=None,
1445
+ load_regulation_current="1A",
1446
+ load_regulation_percent=0.1,
1447
+ ):
1448
+ """Create a voltage regulator module.
1449
+
1450
+ Parameters
1451
+ ----------
1452
+ name : str
1453
+ Name of the voltage regulator.
1454
+ is_active : bool optional
1455
+ Set the voltage regulator active or not. Default value is ``True``.
1456
+ voltage ; str, float
1457
+ Set the voltage value.
1458
+ positive_sensor_pin : int, .class pyedb.dotnet.edb_core.edb_data.padstacks_data.EDBPadstackInstance
1459
+ defining the positive sensor pin.
1460
+ negative_sensor_pin : int, .class pyedb.dotnet.edb_core.edb_data.padstacks_data.EDBPadstackInstance
1461
+ defining the negative sensor pin.
1462
+ load_regulation_current : str or float
1463
+ definition the load regulation current value.
1464
+ load_regulation_percent : float
1465
+ definition the load regulation percent value.
1466
+ """
1467
+ from pyedb.dotnet.edb_core.cell.voltage_regulator import VoltageRegulator
1468
+
1469
+ voltage = self._pedb.edb_value(voltage)
1470
+ load_regulation_current = self._pedb.edb_value(load_regulation_current)
1471
+ load_regulation_percent = self._pedb.edb_value(load_regulation_percent)
1472
+ edb_vrm = self._edb_object = self._pedb._edb.Cell.VoltageRegulator.Create(
1473
+ self._pedb.active_layout, name, is_active, voltage, load_regulation_current, load_regulation_percent
1474
+ )
1475
+ vrm = VoltageRegulator(self._pedb, edb_vrm)
1476
+ if positive_sensor_pin:
1477
+ vrm.positive_remote_sense_pin = positive_sensor_pin
1478
+ if negative_sensor_pin:
1479
+ vrm.negative_remote_sense_pin = negative_sensor_pin
1480
+ return vrm
1481
+
1432
1482
  @property
1433
1483
  def icepak_use_minimal_comp_defaults(self):
1434
1484
  """Icepak default setting. If "True", only resistor are active in Icepak simulation.
@@ -1439,6 +1489,19 @@ class EdbSiwave(object):
1439
1489
  _, value = cell.GetProductProperty(siwave_id, 422, "")
1440
1490
  return bool(value)
1441
1491
 
1492
+ def create_impedance_crosstalk_scan(self, scan_type="impedance"):
1493
+ """Create Siwave crosstalk scan object
1494
+
1495
+ Parameters
1496
+ ----------
1497
+ scan_type : str
1498
+ Scan type to be analyzed. 3 options are available, ``impedance`` for frequency impedance scan,
1499
+ ``frequency_xtalk`` for frequency domain crosstalk and ``time_xtalk`` for time domain crosstalk.
1500
+ Default value is ``frequency``.
1501
+
1502
+ """
1503
+ return SiwaveScanConfig(self._pedb, scan_type)
1504
+
1442
1505
  @icepak_use_minimal_comp_defaults.setter
1443
1506
  def icepak_use_minimal_comp_defaults(self, value):
1444
1507
  value = "True" if bool(value) else ""