pyedb 0.37.0__py3-none-any.whl → 0.39.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/common/nets.py +53 -139
- pyedb/configuration/cfg_common.py +1 -1
- pyedb/configuration/cfg_components.py +229 -201
- pyedb/configuration/cfg_data.py +3 -1
- pyedb/configuration/cfg_general.py +4 -2
- pyedb/configuration/cfg_modeler.py +7 -7
- pyedb/configuration/cfg_package_definition.py +1 -1
- pyedb/configuration/cfg_padstacks.py +346 -290
- pyedb/configuration/cfg_ports_sources.py +243 -65
- pyedb/configuration/configuration.py +23 -3
- pyedb/dotnet/{application → database}/Variables.py +21 -21
- pyedb/dotnet/{edb_core → database}/cell/connectable.py +5 -5
- pyedb/dotnet/{edb_core → database}/cell/hierarchy/component.py +11 -11
- pyedb/dotnet/{edb_core → database}/cell/hierarchy/hierarchy_obj.py +1 -1
- pyedb/dotnet/{edb_core → database}/cell/hierarchy/model.py +1 -1
- pyedb/dotnet/{edb_core → database}/cell/layout.py +19 -19
- pyedb/dotnet/{edb_core → database}/cell/layout_obj.py +3 -3
- pyedb/dotnet/{edb_core → database}/cell/primitive/bondwire.py +1 -1
- pyedb/dotnet/{edb_core → database}/cell/primitive/path.py +4 -4
- pyedb/dotnet/{edb_core → database}/cell/primitive/primitive.py +14 -14
- pyedb/dotnet/{edb_core → database}/cell/terminal/bundle_terminal.py +2 -2
- pyedb/dotnet/{edb_core → database}/cell/terminal/edge_terminal.py +4 -4
- pyedb/dotnet/{edb_core → database}/cell/terminal/padstack_instance_terminal.py +2 -2
- pyedb/dotnet/{edb_core → database}/cell/terminal/pingroup_terminal.py +2 -2
- pyedb/dotnet/{edb_core → database}/cell/terminal/point_terminal.py +2 -2
- pyedb/dotnet/{edb_core → database}/cell/terminal/terminal.py +11 -11
- pyedb/dotnet/{edb_core → database}/cell/voltage_regulator.py +2 -2
- pyedb/dotnet/{edb_core → database}/components.py +101 -124
- pyedb/dotnet/{edb_core → database}/definition/component_def.py +5 -5
- pyedb/dotnet/{edb_core → database}/definition/component_model.py +1 -1
- pyedb/dotnet/{edb_core → database}/definition/definition_obj.py +1 -1
- pyedb/dotnet/{edb_core → database}/definition/definitions.py +2 -2
- pyedb/dotnet/{edb_core → database}/definition/package_def.py +4 -4
- pyedb/dotnet/{edb_core → database}/dotnet/database.py +8 -8
- pyedb/dotnet/{edb_core → database}/dotnet/primitive.py +9 -9
- pyedb/dotnet/{edb_core → database}/edb_data/control_file.py +12 -12
- pyedb/dotnet/{edb_core → database}/edb_data/hfss_extent_info.py +7 -7
- pyedb/dotnet/{edb_core → database}/edb_data/nets_data.py +10 -13
- pyedb/dotnet/{edb_core → database}/edb_data/padstacks_data.py +60 -73
- pyedb/dotnet/{edb_core → database}/edb_data/ports.py +4 -4
- pyedb/dotnet/{edb_core → database}/edb_data/primitives_data.py +5 -5
- pyedb/dotnet/{edb_core → database}/edb_data/raptor_x_simulation_setup_data.py +4 -4
- pyedb/dotnet/{edb_core → database}/edb_data/simulation_configuration.py +10 -10
- pyedb/dotnet/{edb_core → database}/edb_data/sources.py +4 -4
- pyedb/dotnet/{edb_core → database}/edb_data/variables.py +1 -1
- pyedb/dotnet/{edb_core → database}/geometry/polygon_data.py +4 -4
- pyedb/dotnet/{edb_core → database}/hfss.py +8 -8
- pyedb/dotnet/{edb_core → database}/layout_obj_instance.py +1 -1
- pyedb/dotnet/{edb_core → database}/layout_validation.py +2 -2
- pyedb/dotnet/{edb_core → database}/materials.py +23 -8
- pyedb/dotnet/{edb_core → database}/modeler.py +27 -27
- pyedb/dotnet/{edb_core → database}/net_class.py +8 -8
- pyedb/dotnet/{edb_core → database}/nets.py +12 -12
- pyedb/dotnet/{edb_core → database}/padstack.py +17 -16
- pyedb/dotnet/{edb_core → database}/sim_setup_data/data/mesh_operation.py +1 -1
- pyedb/dotnet/{edb_core → database}/sim_setup_data/data/settings.py +18 -3
- pyedb/dotnet/{edb_core → database}/sim_setup_data/data/sim_setup_info.py +2 -2
- pyedb/dotnet/{edb_core → database}/sim_setup_data/data/simulation_settings.py +1 -1
- pyedb/dotnet/{edb_core → database}/sim_setup_data/data/siw_dc_ir_settings.py +1 -1
- pyedb/dotnet/{edb_core → database}/sim_setup_data/data/sweep_data.py +4 -4
- pyedb/dotnet/{edb_core → database}/siwave.py +10 -10
- pyedb/dotnet/{edb_core → database}/stackup.py +12 -12
- pyedb/dotnet/{edb_core → database}/utilities/hfss_simulation_setup.py +15 -15
- pyedb/dotnet/{edb_core → database}/utilities/obj_base.py +1 -1
- pyedb/dotnet/{edb_core → database}/utilities/simulation_setup.py +4 -3
- pyedb/dotnet/{edb_core → database}/utilities/siwave_simulation_setup.py +6 -6
- pyedb/dotnet/edb.py +118 -113
- pyedb/extensions/pre_layout_design_toolkit/via_design.py +1151 -0
- pyedb/generic/design_types.py +26 -19
- pyedb/generic/general_methods.py +1 -1
- pyedb/generic/plot.py +0 -2
- pyedb/grpc/database/__init__.py +1 -0
- pyedb/grpc/database/components.py +2354 -0
- pyedb/grpc/database/control_file.py +1277 -0
- pyedb/grpc/database/definition/component_def.py +218 -0
- pyedb/grpc/database/definition/component_model.py +39 -0
- pyedb/grpc/database/definition/component_pin.py +32 -0
- pyedb/grpc/database/definition/materials.py +1207 -0
- pyedb/grpc/database/definition/n_port_component_model.py +34 -0
- pyedb/grpc/database/definition/package_def.py +227 -0
- pyedb/grpc/database/definition/padstack_def.py +842 -0
- pyedb/grpc/database/definitions.py +70 -0
- pyedb/grpc/database/general.py +43 -0
- pyedb/grpc/database/geometry/__init__.py +0 -0
- pyedb/grpc/database/geometry/arc_data.py +93 -0
- pyedb/grpc/database/geometry/point_3d_data.py +79 -0
- pyedb/grpc/database/geometry/point_data.py +30 -0
- pyedb/grpc/database/geometry/polygon_data.py +133 -0
- pyedb/grpc/database/hfss.py +1279 -0
- pyedb/grpc/database/hierarchy/__init__.py +0 -0
- pyedb/grpc/database/hierarchy/component.py +1301 -0
- pyedb/grpc/database/hierarchy/model.py +31 -0
- pyedb/grpc/database/hierarchy/netlist_model.py +30 -0
- pyedb/grpc/database/hierarchy/pin_pair_model.py +128 -0
- pyedb/grpc/database/hierarchy/pingroup.py +245 -0
- pyedb/grpc/database/hierarchy/s_parameter_model.py +33 -0
- pyedb/grpc/database/hierarchy/spice_model.py +48 -0
- pyedb/grpc/database/layers/__init__.py +0 -0
- pyedb/grpc/database/layers/layer.py +57 -0
- pyedb/grpc/database/layers/stackup_layer.py +410 -0
- pyedb/grpc/database/layout/__init__.py +0 -0
- pyedb/grpc/database/layout/cell.py +30 -0
- pyedb/grpc/database/layout/layout.py +196 -0
- pyedb/grpc/database/layout/voltage_regulator.py +149 -0
- pyedb/grpc/database/layout_validation.py +319 -0
- pyedb/grpc/database/modeler.py +1468 -0
- pyedb/grpc/database/net/__init__.py +0 -0
- pyedb/grpc/database/net/differential_pair.py +138 -0
- pyedb/grpc/database/net/extended_net.py +340 -0
- pyedb/grpc/database/net/net.py +198 -0
- pyedb/grpc/database/net/net_class.py +93 -0
- pyedb/grpc/database/nets.py +633 -0
- pyedb/grpc/database/padstacks.py +1500 -0
- pyedb/grpc/database/ports/__init__.py +0 -0
- pyedb/grpc/database/ports/ports.py +396 -0
- pyedb/grpc/database/primitive/__init__.py +3 -0
- pyedb/grpc/database/primitive/bondwire.py +181 -0
- pyedb/grpc/database/primitive/circle.py +75 -0
- pyedb/grpc/database/primitive/padstack_instance.py +1116 -0
- pyedb/grpc/database/primitive/path.py +346 -0
- pyedb/grpc/database/primitive/polygon.py +276 -0
- pyedb/grpc/database/primitive/primitive.py +739 -0
- pyedb/grpc/database/primitive/rectangle.py +146 -0
- pyedb/grpc/database/simulation_setup/__init__.py +0 -0
- pyedb/grpc/database/simulation_setup/adaptive_frequency.py +33 -0
- pyedb/grpc/database/simulation_setup/hfss_advanced_meshing_settings.py +32 -0
- pyedb/grpc/database/simulation_setup/hfss_advanced_settings.py +59 -0
- pyedb/grpc/database/simulation_setup/hfss_dcr_settings.py +35 -0
- pyedb/grpc/database/simulation_setup/hfss_general_settings.py +61 -0
- pyedb/grpc/database/simulation_setup/hfss_settings_options.py +78 -0
- pyedb/grpc/database/simulation_setup/hfss_simulation_settings.py +118 -0
- pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +355 -0
- pyedb/grpc/database/simulation_setup/hfss_solver_settings.py +34 -0
- pyedb/grpc/database/simulation_setup/mesh_operation.py +34 -0
- pyedb/grpc/database/simulation_setup/raptor_x_advanced_settings.py +34 -0
- pyedb/grpc/database/simulation_setup/raptor_x_general_settings.py +33 -0
- pyedb/grpc/database/simulation_setup/raptor_x_simulation_settings.py +64 -0
- pyedb/grpc/database/simulation_setup/raptor_x_simulation_setup.py +125 -0
- pyedb/grpc/database/simulation_setup/siwave_dcir_simulation_setup.py +34 -0
- pyedb/grpc/database/simulation_setup/siwave_simulation_setup.py +119 -0
- pyedb/grpc/database/simulation_setup/sweep_data.py +32 -0
- pyedb/grpc/database/siwave.py +1023 -0
- pyedb/grpc/database/source_excitations.py +2572 -0
- pyedb/grpc/database/stackup.py +2574 -0
- pyedb/grpc/database/terminal/__init__.py +0 -0
- pyedb/grpc/database/terminal/bundle_terminal.py +218 -0
- pyedb/grpc/database/terminal/edge_terminal.py +51 -0
- pyedb/grpc/database/terminal/padstack_instance_terminal.py +171 -0
- pyedb/grpc/database/terminal/pingroup_terminal.py +162 -0
- pyedb/grpc/database/terminal/point_terminal.py +99 -0
- pyedb/grpc/database/terminal/terminal.py +470 -0
- pyedb/grpc/database/utility/__init__.py +3 -0
- pyedb/grpc/database/utility/constants.py +25 -0
- pyedb/grpc/database/utility/heat_sink.py +124 -0
- pyedb/grpc/database/utility/hfss_extent_info.py +448 -0
- pyedb/grpc/database/utility/layout_statistics.py +277 -0
- pyedb/grpc/database/utility/rlc.py +80 -0
- pyedb/grpc/database/utility/simulation_configuration.py +3305 -0
- pyedb/grpc/database/utility/sources.py +388 -0
- pyedb/grpc/database/utility/sweep_data_distribution.py +83 -0
- pyedb/grpc/database/utility/xml_control_file.py +1277 -0
- pyedb/grpc/edb.py +4151 -0
- pyedb/grpc/edb_init.py +481 -0
- pyedb/grpc/rpc_session.py +177 -0
- pyedb/ipc2581/ecad/cad_data/assembly_drawing.py +3 -2
- pyedb/ipc2581/ecad/cad_data/feature.py +4 -3
- pyedb/ipc2581/ecad/cad_data/layer_feature.py +32 -20
- pyedb/ipc2581/ecad/cad_data/outline.py +3 -2
- pyedb/ipc2581/ecad/cad_data/package.py +4 -3
- pyedb/ipc2581/ecad/cad_data/path.py +82 -31
- pyedb/ipc2581/ecad/cad_data/polygon.py +122 -60
- pyedb/ipc2581/ecad/cad_data/profile.py +13 -12
- pyedb/ipc2581/ecad/cad_data/step.py +52 -20
- pyedb/ipc2581/ipc2581.py +47 -49
- pyedb/modeler/geometry_operators.py +1 -1
- {pyedb-0.37.0.dist-info → pyedb-0.39.0.dist-info}/METADATA +9 -6
- pyedb-0.39.0.dist-info/RECORD +288 -0
- pyedb-0.37.0.dist-info/RECORD +0 -194
- /pyedb/dotnet/{edb_core → database}/__init__.py +0 -0
- /pyedb/dotnet/{application → database/cell}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core/cell → database/cell/hierarchy}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core → database}/cell/hierarchy/netlist_model.py +0 -0
- /pyedb/dotnet/{edb_core → database}/cell/hierarchy/pin_pair_model.py +0 -0
- /pyedb/dotnet/{edb_core → database}/cell/hierarchy/s_parameter_model.py +0 -0
- /pyedb/dotnet/{edb_core → database}/cell/hierarchy/spice_model.py +0 -0
- /pyedb/dotnet/{edb_core → database}/cell/primitive/__init__.py +0 -0
- /pyedb/dotnet/{edb_core/cell/hierarchy → database/cell/terminal}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core/cell/terminal → database/definition}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core/definition → database/dotnet}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core/dotnet → database/edb_data}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core → database}/edb_data/design_options.py +0 -0
- /pyedb/dotnet/{edb_core → database}/edb_data/edbvalue.py +0 -0
- /pyedb/dotnet/{edb_core → database}/edb_data/layer_data.py +0 -0
- /pyedb/dotnet/{edb_core → database}/edb_data/utilities.py +0 -0
- /pyedb/dotnet/{edb_core → database}/general.py +0 -0
- /pyedb/dotnet/{edb_core/edb_data → database/geometry}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core → database}/geometry/point_data.py +0 -0
- /pyedb/dotnet/{edb_core → database}/sim_setup_data/__init__.py +0 -0
- /pyedb/dotnet/{edb_core → database}/sim_setup_data/data/__init__.py +0 -0
- /pyedb/dotnet/{edb_core → database}/sim_setup_data/data/adaptive_frequency_data.py +0 -0
- /pyedb/dotnet/{edb_core/geometry → database/sim_setup_data/io}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core → database}/sim_setup_data/io/siwave.py +0 -0
- /pyedb/dotnet/{edb_core → database}/utilities/__init__.py +0 -0
- /pyedb/dotnet/{edb_core → database}/utilities/heatsink.py +0 -0
- /pyedb/{dotnet/edb_core/sim_setup_data/io → grpc/database/definition}/__init__.py +0 -0
- {pyedb-0.37.0.dist-info → pyedb-0.39.0.dist-info}/LICENSE +0 -0
- {pyedb-0.37.0.dist-info → pyedb-0.39.0.dist-info}/WHEEL +0 -0
|
@@ -19,11 +19,14 @@
|
|
|
19
19
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
# SOFTWARE.
|
|
22
|
+
import os
|
|
23
|
+
|
|
24
|
+
import numpy as np
|
|
22
25
|
|
|
23
26
|
from pyedb.configuration.cfg_common import CfgBase
|
|
24
|
-
from pyedb.dotnet.
|
|
25
|
-
from pyedb.dotnet.
|
|
26
|
-
from pyedb.dotnet.
|
|
27
|
+
from pyedb.dotnet.database.edb_data.ports import WavePort
|
|
28
|
+
from pyedb.dotnet.database.general import convert_py_list_to_net_list
|
|
29
|
+
from pyedb.dotnet.database.geometry.point_data import PointData
|
|
27
30
|
|
|
28
31
|
|
|
29
32
|
class CfgTerminalInfo(CfgBase):
|
|
@@ -31,11 +34,25 @@ class CfgTerminalInfo(CfgBase):
|
|
|
31
34
|
|
|
32
35
|
def __init__(self, pedb, **kwargs):
|
|
33
36
|
self._pedb = pedb
|
|
34
|
-
|
|
37
|
+
if "pin" in kwargs:
|
|
38
|
+
self.type = "pin"
|
|
39
|
+
elif "net" in kwargs:
|
|
40
|
+
self.type = "net"
|
|
41
|
+
elif "pin_group" in kwargs:
|
|
42
|
+
self.type = "pin_group"
|
|
43
|
+
elif "nearest_pin" in kwargs:
|
|
44
|
+
self.type = "nearest_pin"
|
|
45
|
+
elif "coordinates" in kwargs:
|
|
46
|
+
self.type = "coordinates"
|
|
47
|
+
else: # pragma no cover
|
|
48
|
+
raise RuntimeError
|
|
35
49
|
self.value = kwargs[self.type]
|
|
36
|
-
self.
|
|
37
|
-
|
|
38
|
-
self.
|
|
50
|
+
self.reference_designator = kwargs.get("reference_designator")
|
|
51
|
+
|
|
52
|
+
self.contact_type = kwargs.get("contact_type", "default") # options are full, center, quad, inline
|
|
53
|
+
contact_radius = "0.1mm" if kwargs.get("contact_radius") is None else kwargs.get("contact_radius")
|
|
54
|
+
self.contact_radius = self._pedb.edb_value(contact_radius).ToDouble()
|
|
55
|
+
self.num_of_contact = kwargs.get("num_of_contact", 4)
|
|
39
56
|
|
|
40
57
|
def export_properties(self):
|
|
41
58
|
return {self.type: self.value}
|
|
@@ -208,6 +225,16 @@ class CfgPorts:
|
|
|
208
225
|
return ports
|
|
209
226
|
|
|
210
227
|
|
|
228
|
+
class CfgProbes:
|
|
229
|
+
def __init__(self, pedb, data):
|
|
230
|
+
self._pedb = pedb
|
|
231
|
+
self.probes = [CfgProbe(self._pedb, **probe) for probe in data]
|
|
232
|
+
|
|
233
|
+
def apply(self):
|
|
234
|
+
for probe in self.probes:
|
|
235
|
+
probe.api.set_parameters_to_edb()
|
|
236
|
+
|
|
237
|
+
|
|
211
238
|
class CfgCircuitElement(CfgBase):
|
|
212
239
|
def __init__(self, pedb, **kwargs):
|
|
213
240
|
self._pedb = pedb
|
|
@@ -215,12 +242,15 @@ class CfgCircuitElement(CfgBase):
|
|
|
215
242
|
self.type = kwargs["type"]
|
|
216
243
|
self.reference_designator = kwargs.get("reference_designator", None)
|
|
217
244
|
self.distributed = kwargs.get("distributed", False)
|
|
245
|
+
self._elem_num = 1
|
|
218
246
|
|
|
219
247
|
pos = kwargs["positive_terminal"] # {"pin" : "A1"}
|
|
220
248
|
if list(pos.keys())[0] == "coordinates":
|
|
221
249
|
self.positive_terminal_info = CfgCoordianteTerminalInfo(self._pedb, **pos)
|
|
222
250
|
else:
|
|
223
251
|
self.positive_terminal_info = CfgTerminalInfo(self._pedb, **pos)
|
|
252
|
+
if not self.positive_terminal_info.reference_designator:
|
|
253
|
+
self.positive_terminal_info.reference_designator = self.reference_designator
|
|
224
254
|
|
|
225
255
|
neg = kwargs.get("negative_terminal", {})
|
|
226
256
|
if len(neg) == 0:
|
|
@@ -231,49 +261,83 @@ class CfgCircuitElement(CfgBase):
|
|
|
231
261
|
self.negative_terminal_info = CfgNearestPinTerminalInfo(self._pedb, **neg)
|
|
232
262
|
else:
|
|
233
263
|
self.negative_terminal_info = CfgTerminalInfo(self._pedb, **neg)
|
|
264
|
+
if not self.negative_terminal_info.reference_designator:
|
|
265
|
+
self.negative_terminal_info.reference_designator = self.positive_terminal_info.reference_designator
|
|
234
266
|
|
|
235
|
-
def
|
|
267
|
+
def create_terminals(self):
|
|
236
268
|
"""Create step 1. Collect positive and negative terminals."""
|
|
237
269
|
|
|
270
|
+
# Collect all positive terminals
|
|
238
271
|
pos_type, pos_value = self.positive_terminal_info.type, self.positive_terminal_info.value
|
|
239
272
|
pos_objs = dict()
|
|
240
273
|
pos_coor_terminal = dict()
|
|
241
274
|
if self.type == "coax":
|
|
242
|
-
pins = self._get_pins(pos_type, pos_value)
|
|
243
|
-
pins = {f"{self.name}_{self.reference_designator}": i for _, i in pins.items()}
|
|
275
|
+
pins = self._get_pins(pos_type, pos_value, self.positive_terminal_info.reference_designator)
|
|
276
|
+
pins = {f"{self.name}_{self.positive_terminal_info.reference_designator}": i for _, i in pins.items()}
|
|
244
277
|
pos_objs.update(pins)
|
|
245
278
|
elif pos_type == "coordinates":
|
|
246
279
|
layer = self.positive_terminal_info.layer
|
|
247
280
|
point = [self.positive_terminal_info.point_x, self.positive_terminal_info.point_y]
|
|
248
281
|
net_name = self.positive_terminal_info.net
|
|
282
|
+
if net_name not in self._pedb.nets:
|
|
283
|
+
self._pedb.nets.find_or_create_net(net_name)
|
|
249
284
|
pos_coor_terminal[self.name] = self._pedb.get_point_terminal(self.name, net_name, point, layer)
|
|
250
285
|
|
|
286
|
+
elif pos_type == "pin":
|
|
287
|
+
pins = {
|
|
288
|
+
pos_value: self._pedb.components.instances[self.positive_terminal_info.reference_designator].pins[
|
|
289
|
+
pos_value
|
|
290
|
+
]
|
|
291
|
+
}
|
|
292
|
+
if self.positive_terminal_info.contact_type in ["quad", "inline"]:
|
|
293
|
+
for _, pin in pins.items():
|
|
294
|
+
contact_type = self.positive_terminal_info.contact_type
|
|
295
|
+
radius = self.positive_terminal_info.contact_radius
|
|
296
|
+
num_of_contact = self.positive_terminal_info.num_of_contact
|
|
297
|
+
virtual_pins = self._create_virtual_pins_on_pin(pin, contact_type, radius, num_of_contact)
|
|
298
|
+
pos_objs.update(virtual_pins)
|
|
299
|
+
self._elem_num = len(pos_objs)
|
|
300
|
+
else:
|
|
301
|
+
pos_objs.update(pins)
|
|
251
302
|
elif pos_type == "pin_group":
|
|
303
|
+
pins = self._get_pins(pos_type, pos_value, self.positive_terminal_info.reference_designator)
|
|
252
304
|
if self.distributed:
|
|
253
|
-
pins = self._get_pins(pos_type, pos_value)
|
|
254
305
|
pos_objs.update(pins)
|
|
255
306
|
self._elem_num = len(pos_objs)
|
|
307
|
+
elif self.positive_terminal_info.contact_type in ["quad", "inline"]:
|
|
308
|
+
for _, pin in pins.items():
|
|
309
|
+
contact_type = self.positive_terminal_info.contact_type
|
|
310
|
+
radius = self.positive_terminal_info.contact_radius
|
|
311
|
+
num_of_contact = self.positive_terminal_info.num_of_contact
|
|
312
|
+
virtual_pins = self._create_virtual_pins_on_pin(pin, contact_type, radius, num_of_contact)
|
|
313
|
+
pos_objs.update(virtual_pins)
|
|
314
|
+
self._elem_num = len(pos_objs)
|
|
256
315
|
else:
|
|
257
316
|
pos_objs[pos_value] = self._pedb.siwave.pin_groups[pos_value]
|
|
258
317
|
elif pos_type == "net":
|
|
318
|
+
pins = self._get_pins(pos_type, pos_value, self.positive_terminal_info.reference_designator)
|
|
259
319
|
if self.distributed:
|
|
260
|
-
pins = self._get_pins(pos_type, pos_value)
|
|
261
320
|
pos_objs.update(pins)
|
|
262
321
|
self._elem_num = len(pos_objs)
|
|
322
|
+
elif self.positive_terminal_info.contact_type in ["quad", "inline"]:
|
|
323
|
+
for _, pin in pins.items():
|
|
324
|
+
contact_type = self.positive_terminal_info.contact_type
|
|
325
|
+
radius = self.positive_terminal_info.contact_radius
|
|
326
|
+
num_of_contact = self.positive_terminal_info.num_of_contact
|
|
327
|
+
virtual_pins = self._create_virtual_pins_on_pin(pin, contact_type, radius, num_of_contact)
|
|
328
|
+
pos_objs.update(virtual_pins)
|
|
329
|
+
self._elem_num = len(pos_objs)
|
|
263
330
|
else:
|
|
264
|
-
pins = self._get_pins(pos_type, pos_value)
|
|
265
331
|
# create pin group
|
|
266
|
-
neg_obj = self._create_pin_group(pins)
|
|
332
|
+
neg_obj = self._create_pin_group(pins, self.positive_terminal_info.reference_designator)
|
|
267
333
|
pos_objs.update(neg_obj)
|
|
268
|
-
elif pos_type == "pin":
|
|
269
|
-
pins = {pos_value: self._pedb.components.instances[self.reference_designator].pins[pos_value]}
|
|
270
|
-
pos_objs.update(pins)
|
|
271
334
|
else:
|
|
272
335
|
raise Exception(f"Wrong positive terminal type {pos_type}.")
|
|
273
336
|
|
|
274
337
|
self.pos_terminals = {i: j.create_terminal(i) for i, j in pos_objs.items()}
|
|
275
338
|
self.pos_terminals.update(pos_coor_terminal)
|
|
276
339
|
|
|
340
|
+
# Collect all negative terminals
|
|
277
341
|
self.neg_terminal = None
|
|
278
342
|
if self.negative_terminal_info:
|
|
279
343
|
neg_type, neg_value = self.negative_terminal_info.type, self.negative_terminal_info.value
|
|
@@ -282,6 +346,8 @@ class CfgCircuitElement(CfgBase):
|
|
|
282
346
|
layer = self.negative_terminal_info.layer
|
|
283
347
|
point = [self.negative_terminal_info.point_x, self.negative_terminal_info.point_y]
|
|
284
348
|
net_name = self.negative_terminal_info.net
|
|
349
|
+
if net_name not in self._pedb.nets:
|
|
350
|
+
self._pedb.nets.find_or_create_net(net_name)
|
|
285
351
|
self.neg_terminal = self._pedb.get_point_terminal(self.name + "_ref", net_name, point, layer)
|
|
286
352
|
elif neg_type == "nearest_pin":
|
|
287
353
|
ref_net = neg_value.get("reference_net", "GND")
|
|
@@ -297,13 +363,17 @@ class CfgCircuitElement(CfgBase):
|
|
|
297
363
|
neg_obj = {neg_value: self._pedb.siwave.pin_groups[neg_value]}
|
|
298
364
|
elif neg_type == "net":
|
|
299
365
|
# Get pins
|
|
300
|
-
pins = self._get_pins(
|
|
366
|
+
pins = self._get_pins(
|
|
367
|
+
neg_type, neg_value, self.negative_terminal_info.reference_designator
|
|
368
|
+
) # terminal type pin or net
|
|
301
369
|
# create pin group
|
|
302
|
-
neg_obj = self._create_pin_group(pins, True)
|
|
370
|
+
neg_obj = self._create_pin_group(pins, self.negative_terminal_info.reference_designator, True)
|
|
303
371
|
elif neg_type == "pin":
|
|
304
|
-
terminal_name = f"{self.reference_designator}_{neg_value}"
|
|
372
|
+
terminal_name = f"{self.negative_terminal_info.reference_designator}_{neg_value}"
|
|
305
373
|
neg_obj = {
|
|
306
|
-
terminal_name: self._pedb.components.instances[
|
|
374
|
+
terminal_name: self._pedb.components.instances[
|
|
375
|
+
self.negative_terminal_info.reference_designator
|
|
376
|
+
].pins[neg_value]
|
|
307
377
|
}
|
|
308
378
|
else:
|
|
309
379
|
raise Exception(f"Wrong negative terminal type {neg_type}.")
|
|
@@ -311,11 +381,11 @@ class CfgCircuitElement(CfgBase):
|
|
|
311
381
|
j.create_terminal(i) if not j.terminal else j.terminal for i, j in neg_obj.items()
|
|
312
382
|
][0]
|
|
313
383
|
|
|
314
|
-
def _get_pins(self, terminal_type, terminal_value):
|
|
384
|
+
def _get_pins(self, terminal_type, terminal_value, reference_designator):
|
|
315
385
|
terminal_value = terminal_value if isinstance(terminal_value, list) else [terminal_value]
|
|
316
386
|
|
|
317
387
|
def get_pin_obj(pin_name):
|
|
318
|
-
return {pin_name: self._pedb.components.instances[
|
|
388
|
+
return {pin_name: self._pedb.components.instances[reference_designator].pins[pin_name]}
|
|
319
389
|
|
|
320
390
|
pins = dict()
|
|
321
391
|
if terminal_type == "pin":
|
|
@@ -323,20 +393,83 @@ class CfgCircuitElement(CfgBase):
|
|
|
323
393
|
pins.update(get_pin_obj(i))
|
|
324
394
|
else:
|
|
325
395
|
if terminal_type == "net":
|
|
326
|
-
temp = self._pedb.components.get_pins(
|
|
396
|
+
temp = self._pedb.components.get_pins(reference_designator, terminal_value[0])
|
|
327
397
|
elif terminal_type == "pin_group":
|
|
328
398
|
pin_group = self._pedb.siwave.pin_groups[terminal_value[0]]
|
|
329
399
|
temp = pin_group.pins
|
|
330
|
-
pins.update({f"{
|
|
400
|
+
pins.update({f"{reference_designator}_{terminal_value[0]}_{i}": j for i, j in temp.items()})
|
|
331
401
|
return pins
|
|
332
402
|
|
|
333
|
-
def
|
|
403
|
+
def _create_virtual_pins_on_pin(self, pin, contact_type, radius, num_of_contact=4):
|
|
404
|
+
component = pin.component
|
|
405
|
+
placement_layer = component.placement_layer
|
|
406
|
+
pos_x, pos_y = pin.position
|
|
407
|
+
comp_rotation = self._pedb.edb_value(component.rotation).ToDouble() % 3.141592653589793
|
|
408
|
+
|
|
409
|
+
pad = pin.definition.pad_by_layer[placement_layer]
|
|
410
|
+
if pad.shape.lower() in ["rectangle", "oval"]:
|
|
411
|
+
width, height = pad.parameters_values[0:2]
|
|
412
|
+
elif pad.shape.lower() == "nogeometry":
|
|
413
|
+
polygon_data = pad.polygon_data
|
|
414
|
+
if polygon_data:
|
|
415
|
+
p1, p2 = polygon_data.bounding_box
|
|
416
|
+
width = p2[0] - p1[0]
|
|
417
|
+
height = p2[1] - p1[1]
|
|
418
|
+
else:
|
|
419
|
+
raise AttributeError(f"Unsupported pad shape {pad.shape.lower()}")
|
|
420
|
+
else: # pragma no cover
|
|
421
|
+
raise AttributeError(f"Unsupported pad shape {pad.shape.lower()}")
|
|
422
|
+
|
|
423
|
+
positions = []
|
|
424
|
+
if contact_type.lower() == "inline":
|
|
425
|
+
if width > height:
|
|
426
|
+
offset = (width - radius * 2) / (num_of_contact - 1)
|
|
427
|
+
else:
|
|
428
|
+
offset = (height - radius * 2) / (num_of_contact - 1)
|
|
429
|
+
|
|
430
|
+
start_pos = (num_of_contact - 1) / 2
|
|
431
|
+
offset = [offset * i for i in np.arange(start_pos * -1, start_pos + 1)]
|
|
432
|
+
|
|
433
|
+
if (width > height and comp_rotation == 0) or (width < height and comp_rotation != 0):
|
|
434
|
+
positions.extend(list(zip(offset, [0] * num_of_contact)))
|
|
435
|
+
else:
|
|
436
|
+
positions.extend(list(zip([0] * num_of_contact, offset)))
|
|
437
|
+
else: # quad
|
|
438
|
+
x_offset = width / 2 - radius if comp_rotation == 0 else height / 2 - radius
|
|
439
|
+
y_offset = height / 2 - radius if comp_rotation == 0 else width / 2 - radius
|
|
440
|
+
|
|
441
|
+
for x, y in [[1, 1], [-1, 1], [1, -1], [-1, -1]]:
|
|
442
|
+
positions.append([x_offset * x, y_offset * y])
|
|
443
|
+
|
|
444
|
+
pdef_name = f"{self.name}_{pin.pin_number}"
|
|
445
|
+
self._pedb.padstacks.create(padstackname=pdef_name, has_hole=False, paddiam=radius * 2, antipaddiam=0)
|
|
446
|
+
instances = {}
|
|
447
|
+
for idx, xy in enumerate(positions):
|
|
448
|
+
x = xy[0] + pos_x
|
|
449
|
+
y = xy[1] + pos_y
|
|
450
|
+
pin_name = f"{pdef_name}_{idx}"
|
|
451
|
+
p_inst = self._pedb.padstacks.place(
|
|
452
|
+
position=[x, y],
|
|
453
|
+
definition_name=pdef_name,
|
|
454
|
+
net_name=pin.net_name,
|
|
455
|
+
via_name=pin_name,
|
|
456
|
+
fromlayer=placement_layer,
|
|
457
|
+
tolayer=placement_layer,
|
|
458
|
+
is_pin=True,
|
|
459
|
+
)
|
|
460
|
+
instances[pin_name] = p_inst
|
|
461
|
+
self._pedb.components.create(
|
|
462
|
+
pins=list(instances.values()),
|
|
463
|
+
)
|
|
464
|
+
return instances
|
|
465
|
+
|
|
466
|
+
def _create_pin_group(self, pins, reference_designator, is_ref=False):
|
|
334
467
|
if is_ref:
|
|
335
|
-
pg_name = f"pg_{self.name}_{
|
|
468
|
+
pg_name = f"pg_{self.name}_{reference_designator}_ref"
|
|
336
469
|
else:
|
|
337
|
-
pg_name = f"pg_{self.name}_{
|
|
470
|
+
pg_name = f"pg_{self.name}_{reference_designator}"
|
|
338
471
|
pin_names = [i.component_pin for i in pins.values()]
|
|
339
|
-
name, temp = self._pedb.siwave.create_pin_group(
|
|
472
|
+
name, temp = self._pedb.siwave.create_pin_group(reference_designator, pin_names, pg_name)
|
|
340
473
|
return {name: temp}
|
|
341
474
|
|
|
342
475
|
|
|
@@ -350,7 +483,7 @@ class CfgPort(CfgCircuitElement):
|
|
|
350
483
|
|
|
351
484
|
def set_parameters_to_edb(self):
|
|
352
485
|
"""Create port."""
|
|
353
|
-
self.
|
|
486
|
+
self.create_terminals()
|
|
354
487
|
is_circuit_port = True if self.type == "circuit" else False
|
|
355
488
|
circuit_elements = []
|
|
356
489
|
for name, j in self.pos_terminals.items():
|
|
@@ -382,56 +515,66 @@ class CfgSource(CfgCircuitElement):
|
|
|
382
515
|
super().__init__(pedb, **kwargs)
|
|
383
516
|
|
|
384
517
|
self.magnitude = kwargs.get("magnitude", 0.001)
|
|
385
|
-
self.equipotential = kwargs.get("equipotential", False)
|
|
386
518
|
|
|
387
519
|
def set_parameters_to_edb(self):
|
|
388
520
|
"""Create sources."""
|
|
389
|
-
self.
|
|
521
|
+
self.create_terminals()
|
|
390
522
|
# is_circuit_port = True if self.type == "circuit" else False
|
|
391
523
|
circuit_elements = []
|
|
392
|
-
|
|
524
|
+
create_xxx_source = (
|
|
525
|
+
self._pedb.create_current_source if self.type == "current" else self._pedb.create_voltage_source
|
|
526
|
+
)
|
|
393
527
|
for name, j in self.pos_terminals.items():
|
|
394
528
|
if isinstance(self.neg_terminal, dict):
|
|
395
|
-
elem =
|
|
529
|
+
elem = create_xxx_source(j, self.neg_terminal[name])
|
|
396
530
|
else:
|
|
397
|
-
elem =
|
|
398
|
-
if
|
|
531
|
+
elem = create_xxx_source(j, self.neg_terminal)
|
|
532
|
+
if self._elem_num == 1:
|
|
399
533
|
elem.name = self.name
|
|
400
534
|
elem.magnitude = self.magnitude
|
|
401
535
|
else:
|
|
402
|
-
elem.name =
|
|
536
|
+
elem.name = name
|
|
403
537
|
elem.magnitude = self.magnitude / self._elem_num
|
|
538
|
+
elem = self._pedb.terminals[elem.name]
|
|
404
539
|
circuit_elements.append(elem)
|
|
405
|
-
for terminal in circuit_elements:
|
|
406
|
-
if self.equipotential:
|
|
407
|
-
terms = [terminal, terminal.ref_terminal] if terminal.ref_terminal else [terminal]
|
|
408
|
-
for t in terms:
|
|
409
|
-
if not t.is_reference_terminal:
|
|
410
|
-
radius = self.positive_terminal_info.contact_radius
|
|
411
|
-
num_of_contact = self.positive_terminal_info.num_of_contact
|
|
412
|
-
inline = self.positive_terminal_info.inline
|
|
413
|
-
else:
|
|
414
|
-
radius = self.negative_terminal_info.contact_radius
|
|
415
|
-
num_of_contact = self.negative_terminal_info.num_of_contact
|
|
416
|
-
inline = self.negative_terminal_info.inline
|
|
417
|
-
|
|
418
|
-
pads = []
|
|
419
|
-
if t.terminal_type == "PadstackInstanceTerminal":
|
|
420
|
-
pads.append(t.reference_object)
|
|
421
|
-
elif t.terminal_type == "PinGroupTerminal":
|
|
422
|
-
name = t._edb_object.GetPinGroup().GetName()
|
|
423
|
-
pg = self._pedb.siwave.pin_groups[name]
|
|
424
|
-
pads.extend([i for _, i in pg.pins.items()])
|
|
425
|
-
elif t.terminal_type == "PointTerminal" and radius:
|
|
426
|
-
temp = [i for i in self._pedb.layout.terminals if i.name == t.name][0]
|
|
427
|
-
if radius is not None:
|
|
428
|
-
prim = self._pedb.modeler.create_circle(
|
|
429
|
-
temp.layer.name, temp.location[0], temp.location[1], radius, temp.net_name
|
|
430
|
-
)
|
|
431
|
-
prim.dcir_equipotential_region = True
|
|
432
540
|
|
|
541
|
+
for terminal in circuit_elements:
|
|
542
|
+
# Get reference terminal
|
|
543
|
+
terms = [terminal, terminal.ref_terminal] if terminal.ref_terminal else [terminal]
|
|
544
|
+
for t in terms:
|
|
545
|
+
if not t.is_reference_terminal:
|
|
546
|
+
radius = self.positive_terminal_info.contact_radius
|
|
547
|
+
contact_type = self.positive_terminal_info.contact_type
|
|
548
|
+
else:
|
|
549
|
+
radius = self.negative_terminal_info.contact_radius
|
|
550
|
+
contact_type = self.negative_terminal_info.contact_type
|
|
551
|
+
if t.terminal_type == "PointTerminal":
|
|
552
|
+
temp = [i for i in self._pedb.layout.terminals if i.name == t.name][0]
|
|
553
|
+
prim = self._pedb.modeler.create_circle(
|
|
554
|
+
temp.layer.name, temp.location[0], temp.location[1], radius, temp.net_name
|
|
555
|
+
)
|
|
556
|
+
prim.dcir_equipotential_region = True
|
|
557
|
+
continue
|
|
558
|
+
elif contact_type.lower() == "default":
|
|
559
|
+
continue
|
|
560
|
+
elif t.terminal_type == "PadstackInstanceTerminal":
|
|
561
|
+
if contact_type.lower() in ["full", "quad", "inline"]:
|
|
562
|
+
t.padstack_instance._set_equipotential()
|
|
563
|
+
elif contact_type.lower() == "center":
|
|
564
|
+
t.padstack_instance._set_equipotential(contact_radius=radius)
|
|
565
|
+
elif t.terminal_type == "PinGroupTerminal":
|
|
566
|
+
name = t._edb_object.GetPinGroup().GetName()
|
|
567
|
+
pg = self._pedb.siwave.pin_groups[name]
|
|
568
|
+
pads = [i for _, i in pg.pins.items()]
|
|
433
569
|
for i in pads:
|
|
434
|
-
|
|
570
|
+
if contact_type.lower() in ["full", "quad", "inline"]:
|
|
571
|
+
i._set_equipotential()
|
|
572
|
+
elif contact_type.lower() == "center":
|
|
573
|
+
i._set_equipotential(contact_radius=radius)
|
|
574
|
+
elif t.is_reference_terminal:
|
|
575
|
+
continue
|
|
576
|
+
else:
|
|
577
|
+
raise AttributeError("Unsupported terminal type.")
|
|
435
578
|
|
|
436
579
|
return circuit_elements
|
|
437
580
|
|
|
@@ -446,6 +589,41 @@ class CfgSource(CfgCircuitElement):
|
|
|
446
589
|
}
|
|
447
590
|
|
|
448
591
|
|
|
592
|
+
class CfgProbe(CfgCircuitElement):
|
|
593
|
+
class Common:
|
|
594
|
+
def __init__(self, parent):
|
|
595
|
+
self.parent = parent
|
|
596
|
+
self.pedb = parent._pedb
|
|
597
|
+
|
|
598
|
+
def set_parameters_to_edb(self):
|
|
599
|
+
self.parent.create_terminals()
|
|
600
|
+
circuit_elements = []
|
|
601
|
+
for name, j in self.parent.pos_terminals.items():
|
|
602
|
+
if isinstance(self.parent.neg_terminal, dict):
|
|
603
|
+
elem = self.pedb.create_voltage_probe(j, self.parent.neg_terminal[name])
|
|
604
|
+
else:
|
|
605
|
+
elem = self.pedb.create_voltage_probe(j, self.parent.neg_terminal)
|
|
606
|
+
elem.name = self.parent.name
|
|
607
|
+
circuit_elements.append(elem)
|
|
608
|
+
return circuit_elements
|
|
609
|
+
|
|
610
|
+
class Grpc(Common):
|
|
611
|
+
def __init__(self, parent):
|
|
612
|
+
super().__init__(parent)
|
|
613
|
+
|
|
614
|
+
class DotNet(Grpc):
|
|
615
|
+
def __init__(self, parent):
|
|
616
|
+
super().__init__(parent)
|
|
617
|
+
|
|
618
|
+
def __init__(self, pedb, **kwargs):
|
|
619
|
+
kwargs["type"] = "probe"
|
|
620
|
+
super().__init__(pedb, **kwargs)
|
|
621
|
+
if os.environ["PYEDB_USE_DOTNET"] == "0":
|
|
622
|
+
self.api = self.Grpc(self)
|
|
623
|
+
else:
|
|
624
|
+
self.api = self.DotNet(self)
|
|
625
|
+
|
|
626
|
+
|
|
449
627
|
class CfgWavePort:
|
|
450
628
|
def __init__(self, pedb, **kwargs):
|
|
451
629
|
self._pedb = pedb
|
|
@@ -27,7 +27,7 @@ from pathlib import Path
|
|
|
27
27
|
import toml
|
|
28
28
|
|
|
29
29
|
from pyedb.configuration.cfg_data import CfgData
|
|
30
|
-
from pyedb.dotnet.
|
|
30
|
+
from pyedb.dotnet.database.definition.package_def import PackageDef
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
class Configuration:
|
|
@@ -140,13 +140,30 @@ class Configuration:
|
|
|
140
140
|
temp = []
|
|
141
141
|
for _, pdef in pedb_defs.items():
|
|
142
142
|
cfg_def = CfgPadstackDefinition(self._pedb, pdef)
|
|
143
|
-
cfg_def.retrieve_parameters_from_edb()
|
|
143
|
+
cfg_def.api.retrieve_parameters_from_edb()
|
|
144
144
|
temp.append(cfg_def)
|
|
145
145
|
self.cfg_data.stackup.apply()
|
|
146
146
|
for cfg_pdef in temp:
|
|
147
|
-
cfg_pdef.set_parameters_to_edb()
|
|
147
|
+
cfg_pdef.api.set_parameters_to_edb()
|
|
148
148
|
else:
|
|
149
|
+
temp_pdef_data = {}
|
|
150
|
+
for pdef_name, pdef in self._pedb.padstacks.definitions.items():
|
|
151
|
+
pdef_data = pdef._padstack_def_data
|
|
152
|
+
for lyr_name in list(pdef_data.GetLayerNames()):
|
|
153
|
+
result = pdef_data.GetPadParametersValue(lyr_name, self._pedb._edb.Definition.PadType.RegularPad)
|
|
154
|
+
flag, pad_shape, params, offset_x, offset_y, rotation = result
|
|
155
|
+
if flag is False:
|
|
156
|
+
result = pdef_data.GetPolygonalPadParameters(
|
|
157
|
+
lyr_name, self._pedb._edb.Definition.PadType.RegularPad
|
|
158
|
+
)
|
|
159
|
+
flag, polygon_data, offset_x, offset_y, rotation = result
|
|
160
|
+
if flag:
|
|
161
|
+
temp_pdef_data[pdef_name] = pdef_data
|
|
162
|
+
break
|
|
149
163
|
self.cfg_data.stackup.apply()
|
|
164
|
+
for pdef_name, pdef_data in temp_pdef_data.items():
|
|
165
|
+
pdef = self._pedb.padstacks.definitions[pdef_name]
|
|
166
|
+
pdef._padstack_def_data = pdef_data
|
|
150
167
|
|
|
151
168
|
# Configure padstacks
|
|
152
169
|
if self.cfg_data.padstacks:
|
|
@@ -171,6 +188,9 @@ class Configuration:
|
|
|
171
188
|
# Configure ports
|
|
172
189
|
self.cfg_data.ports.apply()
|
|
173
190
|
|
|
191
|
+
# Configure probes
|
|
192
|
+
self.cfg_data.probes.apply()
|
|
193
|
+
|
|
174
194
|
return True
|
|
175
195
|
|
|
176
196
|
def _load_stackup(self):
|
|
@@ -368,7 +368,7 @@ class VariableManager(object):
|
|
|
368
368
|
This class provides access to all variables or a subset of the
|
|
369
369
|
variables. Manipulation of the numerical or string definitions of
|
|
370
370
|
variable values is provided in the
|
|
371
|
-
:class:`pyedb.dotnet.
|
|
371
|
+
:class:`pyedb.dotnet.database.Variables.Variable` class.
|
|
372
372
|
|
|
373
373
|
Parameters
|
|
374
374
|
----------
|
|
@@ -410,7 +410,7 @@ class VariableManager(object):
|
|
|
410
410
|
|
|
411
411
|
See Also
|
|
412
412
|
--------
|
|
413
|
-
pyedb.dotnet.
|
|
413
|
+
pyedb.dotnet.database.Variables.Variable
|
|
414
414
|
|
|
415
415
|
Examples
|
|
416
416
|
--------
|
|
@@ -434,23 +434,23 @@ class VariableManager(object):
|
|
|
434
434
|
Get a dictionary of all project and design variables.
|
|
435
435
|
|
|
436
436
|
>>> v.variables
|
|
437
|
-
{'Var1': <pyedb.dotnet.
|
|
438
|
-
'Var2': <pyedb.dotnet.
|
|
439
|
-
'Var3': <pyedb.dotnet.
|
|
440
|
-
'$PrjVar1': <pyedb.dotnet.
|
|
437
|
+
{'Var1': <pyedb.dotnet.database.Variables.Variable at 0x2661f34c448>,
|
|
438
|
+
'Var2': <pyedb.dotnet.database.Variables.Variable at 0x2661f34c308>,
|
|
439
|
+
'Var3': <pyedb.dotnet.database.Variables.Expression at 0x2661f34cb48>,
|
|
440
|
+
'$PrjVar1': <pyedb.dotnet.database.Variables.Expression at 0x2661f34cc48>}
|
|
441
441
|
|
|
442
442
|
Get a dictionary of only the design variables.
|
|
443
443
|
|
|
444
444
|
>>> v.design_variables
|
|
445
|
-
{'Var1': <pyedb.dotnet.
|
|
446
|
-
'Var2': <pyedb.dotnet.
|
|
447
|
-
'Var3': <pyedb.dotnet.
|
|
445
|
+
{'Var1': <pyedb.dotnet.database.Variables.Variable at 0x2661f339508>,
|
|
446
|
+
'Var2': <pyedb.dotnet.database.Variables.Variable at 0x2661f3415c8>,
|
|
447
|
+
'Var3': <pyedb.dotnet.database.Variables.Expression at 0x2661f341808>}
|
|
448
448
|
|
|
449
449
|
Get a dictionary of only the independent design variables.
|
|
450
450
|
|
|
451
451
|
>>> v.independent_design_variables
|
|
452
|
-
{'Var1': <pyedb.dotnet.
|
|
453
|
-
'Var2': <pyedb.dotnet.
|
|
452
|
+
{'Var1': <pyedb.dotnet.database.Variables.Variable at 0x2661f335d08>,
|
|
453
|
+
'Var2': <pyedb.dotnet.database.Variables.Variable at 0x2661f3557c8>}
|
|
454
454
|
|
|
455
455
|
"""
|
|
456
456
|
|
|
@@ -1287,7 +1287,7 @@ class Variable(object):
|
|
|
1287
1287
|
Examples
|
|
1288
1288
|
--------
|
|
1289
1289
|
|
|
1290
|
-
>>> from pyedb.dotnet.
|
|
1290
|
+
>>> from pyedb.dotnet.database.Variables import Variable
|
|
1291
1291
|
|
|
1292
1292
|
Define a variable using a string value consistent with the AEDT properties.
|
|
1293
1293
|
|
|
@@ -1719,7 +1719,7 @@ class Variable(object):
|
|
|
1719
1719
|
|
|
1720
1720
|
Examples
|
|
1721
1721
|
--------
|
|
1722
|
-
>>> from pyedb.dotnet.
|
|
1722
|
+
>>> from pyedb.dotnet.database.Variables import Variable
|
|
1723
1723
|
|
|
1724
1724
|
>>> v = Variable("10W")
|
|
1725
1725
|
>>> assert v.numeric_value == 10
|
|
@@ -1752,7 +1752,7 @@ class Variable(object):
|
|
|
1752
1752
|
|
|
1753
1753
|
Examples
|
|
1754
1754
|
--------
|
|
1755
|
-
>>> from pyedb.dotnet.
|
|
1755
|
+
>>> from pyedb.dotnet.database.Variables import Variable
|
|
1756
1756
|
|
|
1757
1757
|
>>> v = Variable("10W")
|
|
1758
1758
|
>>> assert v.format("f") == '10.000000W'
|
|
@@ -1777,7 +1777,7 @@ class Variable(object):
|
|
|
1777
1777
|
|
|
1778
1778
|
Examples
|
|
1779
1779
|
--------
|
|
1780
|
-
>>> from pyedb.dotnet.
|
|
1780
|
+
>>> from pyedb.dotnet.database.Variables import Variable
|
|
1781
1781
|
|
|
1782
1782
|
Multiply ``'Length1'`` by unitless ``'None'``` to obtain ``'Length'``.
|
|
1783
1783
|
A numerical value is also considered to be unitless.
|
|
@@ -1827,7 +1827,7 @@ class Variable(object):
|
|
|
1827
1827
|
|
|
1828
1828
|
Parameters
|
|
1829
1829
|
----------
|
|
1830
|
-
other : class:`pyedb.dotnet.
|
|
1830
|
+
other : class:`pyedb.dotnet.database.Variables.Variable`
|
|
1831
1831
|
Object to be multiplied.
|
|
1832
1832
|
|
|
1833
1833
|
Returns
|
|
@@ -1837,7 +1837,7 @@ class Variable(object):
|
|
|
1837
1837
|
|
|
1838
1838
|
Examples
|
|
1839
1839
|
--------
|
|
1840
|
-
>>> from pyedb.dotnet.
|
|
1840
|
+
>>> from pyedb.dotnet.database.Variables import Variable
|
|
1841
1841
|
>>> import ansys.aedt.core.generic.constants
|
|
1842
1842
|
>>> v1 = Variable("3mA")
|
|
1843
1843
|
>>> v2 = Variable("10A")
|
|
@@ -1867,7 +1867,7 @@ class Variable(object):
|
|
|
1867
1867
|
|
|
1868
1868
|
Parameters
|
|
1869
1869
|
----------
|
|
1870
|
-
other : class:`pyedb.dotnet.
|
|
1870
|
+
other : class:`pyedb.dotnet.database.Variables.Variable`
|
|
1871
1871
|
Object to be subtracted.
|
|
1872
1872
|
|
|
1873
1873
|
Returns
|
|
@@ -1879,7 +1879,7 @@ class Variable(object):
|
|
|
1879
1879
|
--------
|
|
1880
1880
|
|
|
1881
1881
|
>>> import ansys.aedt.core.generic.constants
|
|
1882
|
-
>>> from pyedb.dotnet.
|
|
1882
|
+
>>> from pyedb.dotnet.database.Variables import Variable
|
|
1883
1883
|
>>> v3 = Variable("3mA")
|
|
1884
1884
|
>>> v4 = Variable("10A")
|
|
1885
1885
|
>>> result_2 = v3 - v4
|
|
@@ -1923,7 +1923,7 @@ class Variable(object):
|
|
|
1923
1923
|
Divide a variable with units ``"W"`` by a variable with units ``"V"`` and automatically
|
|
1924
1924
|
resolve the new units to ``"A"``.
|
|
1925
1925
|
|
|
1926
|
-
>>> from pyedb.dotnet.
|
|
1926
|
+
>>> from pyedb.dotnet.database.Variables import Variable
|
|
1927
1927
|
>>> import ansys.aedt.core.generic.constants
|
|
1928
1928
|
>>> v1 = Variable("10W")
|
|
1929
1929
|
>>> v2 = Variable("40V")
|
|
@@ -1967,7 +1967,7 @@ class Variable(object):
|
|
|
1967
1967
|
the result is in ``"Hz"``.
|
|
1968
1968
|
|
|
1969
1969
|
>>> import ansys.aedt.core.generic.constants
|
|
1970
|
-
>>> from pyedb.dotnet.
|
|
1970
|
+
>>> from pyedb.dotnet.database.Variables import Variable
|
|
1971
1971
|
>>> v = Variable("1s")
|
|
1972
1972
|
>>> result = 3.0 / v
|
|
1973
1973
|
>>> assert result.numeric_value == 3.0
|