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,22 +20,31 @@
20
20
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  # SOFTWARE.
22
22
 
23
+ from enum import Enum
24
+
23
25
  from System import Tuple
24
26
 
25
27
  from pyedb.dotnet.edb_core.general import convert_py_list_to_net_list
26
28
 
27
29
 
30
+ class MeshOpType(Enum):
31
+ kMeshSetupBase = "base"
32
+ kMeshSetupLength = "length"
33
+ kMeshSetupSkinDepth = "skin_depth"
34
+ kNumMeshOpTypes = "num_mesh_op_types"
35
+
36
+
28
37
  class MeshOperation(object):
29
38
  """Mesh Operation Class."""
30
39
 
31
- def __init__(self, parent, mesh_operation):
40
+ def __init__(self, parent, edb_object):
32
41
  self._parent = parent
33
- self.mesh_operation = mesh_operation
42
+ self._edb_object = edb_object
34
43
  self._mesh_op_mapping = {
35
- "kMeshSetupBase": mesh_operation.TMeshOpType.kMeshSetupBase,
36
- "kMeshSetupLength": mesh_operation.TMeshOpType.kMeshSetupLength,
37
- "kMeshSetupSkinDepth": mesh_operation.TMeshOpType.kMeshSetupSkinDepth,
38
- "kNumMeshOpTypes": mesh_operation.TMeshOpType.kNumMeshOpTypes,
44
+ "kMeshSetupBase": self._edb_object.TMeshOpType.kMeshSetupBase,
45
+ "kMeshSetupLength": self._edb_object.TMeshOpType.kMeshSetupLength,
46
+ "kMeshSetupSkinDepth": self._edb_object.TMeshOpType.kMeshSetupSkinDepth,
47
+ "kNumMeshOpTypes": self._edb_object.TMeshOpType.kNumMeshOpTypes,
39
48
  }
40
49
 
41
50
  @property
@@ -47,7 +56,7 @@ class MeshOperation(object):
47
56
  bool
48
57
  ``True`` if mesh operation is used, ``False`` otherwise.
49
58
  """
50
- return self.mesh_operation.Enabled
59
+ return self._edb_object.Enabled
51
60
 
52
61
  @property
53
62
  def mesh_operation_type(self):
@@ -60,9 +69,14 @@ class MeshOperation(object):
60
69
 
61
70
  Returns
62
71
  -------
63
- int
72
+ str
64
73
  """
65
- return self.mesh_operation.MeshOpType.ToString()
74
+ return self._edb_object.MeshOpType.ToString()
75
+
76
+ @property
77
+ def type(self):
78
+ mop_type = self.mesh_operation_type
79
+ return MeshOpType[mop_type].value
66
80
 
67
81
  @property
68
82
  def mesh_region(self):
@@ -73,7 +87,7 @@ class MeshOperation(object):
73
87
  str
74
88
  Name of the mesh region.
75
89
  """
76
- return self.mesh_operation.MeshRegion
90
+ return self._edb_object.MeshRegion
77
91
 
78
92
  @property
79
93
  def name(self):
@@ -83,7 +97,7 @@ class MeshOperation(object):
83
97
  -------
84
98
  str
85
99
  """
86
- return self.mesh_operation.Name
100
+ return self._edb_object.Name
87
101
 
88
102
  @property
89
103
  def nets_layers_list(self):
@@ -99,7 +113,18 @@ class MeshOperation(object):
99
113
  Third element is represents whether if the mesh operation is enabled or disabled.
100
114
 
101
115
  """
102
- return self.mesh_operation.NetsLayersList
116
+ nets_layers = {}
117
+ for i in list(self._edb_object.NetsLayersList):
118
+ net = i.Item1
119
+ layer = i.Item2
120
+ flag = i.Item3
121
+ if not flag:
122
+ continue
123
+ if net not in nets_layers:
124
+ nets_layers[net] = [layer]
125
+ else:
126
+ nets_layers[net].append(layer)
127
+ return nets_layers
103
128
 
104
129
  @nets_layers_list.setter
105
130
  def nets_layers_list(self, values):
@@ -107,7 +132,7 @@ class MeshOperation(object):
107
132
  for net, layers in values.items():
108
133
  for layer in layers:
109
134
  temp.append(Tuple[str, str, bool](net, layer, True))
110
- self.mesh_operation.NetsLayersList = convert_py_list_to_net_list(temp)
135
+ self._edb_object.NetsLayersList = convert_py_list_to_net_list(temp)
111
136
 
112
137
  @property
113
138
  def refine_inside(self):
@@ -119,27 +144,23 @@ class MeshOperation(object):
119
144
  ``True`` if refine inside objects is used, ``False`` otherwise.
120
145
 
121
146
  """
122
- return self.mesh_operation.RefineInside
147
+ return self._edb_object.RefineInside
123
148
 
124
149
  @enabled.setter
125
150
  def enabled(self, value):
126
- self.mesh_operation.Enabled = value
127
- self._parent._update_setup()
151
+ self._edb_object.Enabled = value
128
152
 
129
153
  @mesh_region.setter
130
154
  def mesh_region(self, value):
131
- self.mesh_operation.MeshRegion = value
132
- self._parent._update_setup()
155
+ self._edb_object.MeshRegion = value
133
156
 
134
157
  @name.setter
135
158
  def name(self, value):
136
- self.mesh_operation.Name = value
137
- self._parent._update_setup()
159
+ self._edb_object.Name = value
138
160
 
139
161
  @refine_inside.setter
140
162
  def refine_inside(self, value):
141
- self.mesh_operation.RefineInside = value
142
- self._parent._update_setup()
163
+ self._edb_object.RefineInside = value
143
164
 
144
165
  @property
145
166
  def max_elements(self):
@@ -149,7 +170,7 @@ class MeshOperation(object):
149
170
  -------
150
171
  str
151
172
  """
152
- return self.mesh_operation.MaxElems
173
+ return int(self._edb_object.MaxElems)
153
174
 
154
175
  @property
155
176
  def restrict_max_elements(self):
@@ -159,12 +180,11 @@ class MeshOperation(object):
159
180
  -------
160
181
  bool
161
182
  """
162
- return self.mesh_operation.RestrictMaxElem
183
+ return self._edb_object.RestrictMaxElem
163
184
 
164
185
  @max_elements.setter
165
186
  def max_elements(self, value):
166
- self.mesh_operation.MaxElems = str(value)
167
- self._parent._update_setup()
187
+ self._edb_object.MaxElems = str(value)
168
188
 
169
189
  @restrict_max_elements.setter
170
190
  def restrict_max_elements(self, value):
@@ -174,11 +194,10 @@ class MeshOperation(object):
174
194
  -------
175
195
  bool
176
196
  """
177
- self.mesh_operation.RestrictMaxElem = value
178
- self._parent._update_setup()
197
+ self._edb_object.RestrictMaxElem = value
179
198
 
180
199
 
181
- class MeshOperationLength(MeshOperation, object):
200
+ class LengthMeshOperation(MeshOperation, object):
182
201
  """Mesh operation Length class.
183
202
  This class is accessible from Hfss Setup in EDB and add_length_mesh_operation method.
184
203
 
@@ -188,8 +207,8 @@ class MeshOperationLength(MeshOperation, object):
188
207
  >>> mop.max_elements = 3000
189
208
  """
190
209
 
191
- def __init__(self, parent, mesh_operation):
192
- MeshOperation.__init__(self, parent, mesh_operation)
210
+ def __init__(self, parent, edb_object):
211
+ MeshOperation.__init__(self, parent, edb_object)
193
212
 
194
213
  @property
195
214
  def max_length(self):
@@ -199,7 +218,7 @@ class MeshOperationLength(MeshOperation, object):
199
218
  -------
200
219
  str
201
220
  """
202
- return self.mesh_operation.MaxLength
221
+ return self._edb_object.MaxLength
203
222
 
204
223
  @property
205
224
  def restrict_length(self):
@@ -209,12 +228,11 @@ class MeshOperationLength(MeshOperation, object):
209
228
  -------
210
229
  bool
211
230
  """
212
- return self.mesh_operation.RestrictLength
231
+ return self._edb_object.RestrictLength
213
232
 
214
233
  @max_length.setter
215
234
  def max_length(self, value):
216
- self.mesh_operation.MaxLength = value
217
- self._parent._update_setup()
235
+ self._edb_object.MaxLength = value
218
236
 
219
237
  @restrict_length.setter
220
238
  def restrict_length(self, value):
@@ -224,11 +242,10 @@ class MeshOperationLength(MeshOperation, object):
224
242
  -------
225
243
  bool
226
244
  """
227
- self.mesh_operation.RestrictLength = value
228
- self._parent._update_setup()
245
+ self._edb_object.RestrictLength = value
229
246
 
230
247
 
231
- class MeshOperationSkinDepth(MeshOperation, object):
248
+ class SkinDepthMeshOperation(MeshOperation, object):
232
249
  """Mesh operation Skin Depth class.
233
250
  This class is accessible from Hfss Setup in EDB and assign_skin_depth_mesh_operation method.
234
251
 
@@ -238,8 +255,8 @@ class MeshOperationSkinDepth(MeshOperation, object):
238
255
  >>> mop.max_elements = 3000
239
256
  """
240
257
 
241
- def __init__(self, parent, mesh_operation):
242
- MeshOperation.__init__(self, parent, mesh_operation)
258
+ def __init__(self, parent, edb_object):
259
+ MeshOperation.__init__(self, parent, edb_object)
243
260
 
244
261
  @property
245
262
  def skin_depth(self):
@@ -249,12 +266,11 @@ class MeshOperationSkinDepth(MeshOperation, object):
249
266
  -------
250
267
  str
251
268
  """
252
- return self.mesh_operation.SkinDepth
269
+ return self._edb_object.SkinDepth
253
270
 
254
271
  @skin_depth.setter
255
272
  def skin_depth(self, value):
256
- self.mesh_operation.SkinDepth = value
257
- self._parent._update_setup()
273
+ self._edb_object.SkinDepth = value
258
274
 
259
275
  @property
260
276
  def surface_triangle_length(self):
@@ -264,12 +280,11 @@ class MeshOperationSkinDepth(MeshOperation, object):
264
280
  -------
265
281
  str
266
282
  """
267
- return self.mesh_operation.SurfTriLength
283
+ return self._edb_object.SurfTriLength
268
284
 
269
285
  @surface_triangle_length.setter
270
286
  def surface_triangle_length(self, value):
271
- self.mesh_operation.SurfTriLength = value
272
- self._parent._update_setup()
287
+ self._edb_object.SurfTriLength = value
273
288
 
274
289
  @property
275
290
  def number_of_layer_elements(self):
@@ -279,9 +294,8 @@ class MeshOperationSkinDepth(MeshOperation, object):
279
294
  -------
280
295
  str
281
296
  """
282
- return self.mesh_operation.NumLayers
297
+ return self._edb_object.NumLayers
283
298
 
284
299
  @number_of_layer_elements.setter
285
300
  def number_of_layer_elements(self, value):
286
- self.mesh_operation.NumLayers = str(value)
287
- self._parent._update_setup()
301
+ self._edb_object.NumLayers = str(value)
@@ -45,7 +45,7 @@ class AdaptiveSettings(object):
45
45
  -------
46
46
  :class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.AdaptiveSettings`
47
47
  """
48
- return self._parent.get_sim_setup_info.SimulationSettings.AdaptiveSettings
48
+ return self._parent.sim_setup_info.simulation_settings.AdaptiveSettings
49
49
 
50
50
  @property
51
51
  def adaptive_frequency_data_list(self):
@@ -0,0 +1,81 @@
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
+ from pyedb.dotnet.edb_core.sim_setup_data.data.sweep_data import SweepData
24
+
25
+
26
+ class SimSetupInfo:
27
+ def __init__(
28
+ self,
29
+ pedb,
30
+ sim_setup,
31
+ edb_object=None,
32
+ setup_type: str = None,
33
+ name: str = None,
34
+ ):
35
+ self._pedb = pedb
36
+ self.sim_setup = sim_setup
37
+ simulation_setup_type = {
38
+ "kHFSS": self._pedb.simsetupdata.HFSSSimulationSettings,
39
+ "kPEM": None,
40
+ "kSIwave": self._pedb.simsetupdata.SIwave.SIWSimulationSettings,
41
+ "kLNA": None,
42
+ "kTransient": None,
43
+ "kQEye": None,
44
+ "kVEye": None,
45
+ "kAMI": None,
46
+ "kAnalysisOption": None,
47
+ "kSIwaveDCIR": self._pedb.simsetupdata.SIwave.SIWDCIRSimulationSettings,
48
+ "kSIwaveEMI": None,
49
+ "kHFSSPI": self._pedb.simsetupdata.HFSSPISimulationSettings,
50
+ "kDDRwizard": None,
51
+ "kQ3D": None,
52
+ "kNumSetupTypes": None,
53
+ }
54
+
55
+ if edb_object is None:
56
+ self._edb_object = self._pedb.simsetupdata.SimSetupInfo[simulation_setup_type[setup_type]]()
57
+ self._edb_object.Name = name
58
+ else:
59
+ self._edb_object = edb_object
60
+
61
+ @property
62
+ def position(self):
63
+ return self._edb_object.Position
64
+
65
+ @property
66
+ def sim_setup_type(self):
67
+ return self._edb_object.SimSetupType
68
+
69
+ @property
70
+ def simulation_settings(self):
71
+ return self._edb_object.SimulationSettings
72
+
73
+ @property
74
+ def sweep_data_list(self):
75
+ return [
76
+ SweepData(self._pedb, edb_object=i, sim_setup=self.sim_setup) for i in list(self._edb_object.SweepDataList)
77
+ ]
78
+
79
+ def add_sweep_data(self, sweep_data):
80
+ sweep_data.sim_setup = self.sim_setup
81
+ self._edb_object.SweepDataList.Add(sweep_data._edb_object)