pyedb 0.13.dev0__py3-none-any.whl → 0.15.dev0__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 +0 -5
- pyedb/configuration/cfg_components.py +0 -2
- pyedb/configuration/cfg_operations.py +0 -2
- pyedb/configuration/cfg_package_definition.py +0 -2
- pyedb/configuration/cfg_ports_sources.py +14 -11
- pyedb/configuration/cfg_stackup.py +0 -7
- pyedb/configuration/configuration.py +0 -6
- pyedb/dotnet/application/Variables.py +4 -40
- pyedb/dotnet/edb.py +27 -82
- pyedb/dotnet/edb_core/{edb_data/components_data.py → cell/hierarchy/component.py} +13 -133
- pyedb/dotnet/edb_core/cell/hierarchy/model.py +0 -3
- pyedb/dotnet/edb_core/cell/hierarchy/netlist_model.py +30 -0
- pyedb/dotnet/edb_core/cell/hierarchy/pin_pair_model.py +105 -0
- pyedb/dotnet/edb_core/cell/hierarchy/s_parameter_model.py +34 -0
- pyedb/dotnet/edb_core/cell/hierarchy/spice_model.py +34 -0
- pyedb/dotnet/edb_core/cell/layout.py +137 -0
- pyedb/dotnet/edb_core/cell/layout_obj.py +2 -4
- pyedb/dotnet/edb_core/cell/primitive.py +199 -1
- pyedb/dotnet/edb_core/cell/terminal/bundle_terminal.py +52 -0
- pyedb/dotnet/edb_core/cell/terminal/edge_terminal.py +50 -0
- pyedb/dotnet/edb_core/cell/terminal/padstack_instance_terminal.py +88 -0
- pyedb/dotnet/edb_core/cell/terminal/pingroup_terminal.py +59 -0
- pyedb/dotnet/edb_core/cell/terminal/point_terminal.py +73 -0
- pyedb/dotnet/edb_core/{edb_data/terminals.py → cell/terminal/terminal.py} +33 -242
- pyedb/dotnet/edb_core/components.py +10 -56
- pyedb/dotnet/edb_core/definition/component_def.py +1 -8
- pyedb/dotnet/edb_core/definition/component_model.py +0 -2
- pyedb/dotnet/edb_core/definition/definitions.py +0 -2
- pyedb/dotnet/edb_core/definition/package_def.py +7 -5
- pyedb/dotnet/edb_core/edb_data/control_file.py +0 -3
- pyedb/dotnet/edb_core/edb_data/hfss_extent_info.py +0 -5
- pyedb/dotnet/edb_core/edb_data/hfss_pi_simulation_setup_data.py +4 -9
- pyedb/dotnet/edb_core/edb_data/layer_data.py +0 -7
- pyedb/dotnet/edb_core/edb_data/nets_data.py +2 -5
- pyedb/dotnet/edb_core/edb_data/padstacks_data.py +11 -29
- pyedb/dotnet/edb_core/edb_data/ports.py +4 -4
- pyedb/dotnet/edb_core/edb_data/primitives_data.py +3 -26
- pyedb/dotnet/edb_core/edb_data/raptor_x_simulation_setup_data.py +13 -20
- pyedb/dotnet/edb_core/edb_data/simulation_configuration.py +3 -11
- pyedb/dotnet/edb_core/edb_data/sources.py +12 -17
- pyedb/dotnet/edb_core/general.py +1 -6
- pyedb/dotnet/edb_core/geometry/polygon_data.py +0 -3
- pyedb/dotnet/edb_core/hfss.py +1 -33
- pyedb/dotnet/edb_core/layout.py +0 -35
- pyedb/dotnet/edb_core/layout_validation.py +1 -3
- pyedb/dotnet/edb_core/materials.py +1 -22
- pyedb/dotnet/edb_core/net_class.py +0 -8
- pyedb/dotnet/edb_core/nets.py +4 -29
- pyedb/dotnet/edb_core/padstack.py +76 -30
- pyedb/dotnet/edb_core/sim_setup_data/data/adaptive_frequency_data.py +72 -0
- pyedb/dotnet/edb_core/sim_setup_data/data/mesh_operation.py +287 -0
- pyedb/dotnet/edb_core/{edb_data/hfss_simulation_setup_data.py → sim_setup_data/data/settings.py} +174 -878
- pyedb/dotnet/edb_core/sim_setup_data/data/sweep_data.py +509 -0
- pyedb/dotnet/edb_core/sim_setup_data/io/__init__.py +0 -0
- pyedb/dotnet/edb_core/{edb_data/siwave_simulation_setup_data.py → sim_setup_data/io/siwave.py} +0 -341
- pyedb/dotnet/edb_core/siwave.py +5 -33
- pyedb/dotnet/edb_core/stackup.py +4 -51
- pyedb/dotnet/edb_core/utilities/simulation_setup.py +613 -366
- pyedb/generic/data_handlers.py +1 -9
- pyedb/generic/general_methods.py +3 -53
- pyedb/generic/plot.py +1 -2
- pyedb/ipc2581/ecad/cad_data/layer_feature.py +1 -7
- pyedb/ipc2581/ecad/cad_data/package.py +1 -4
- pyedb/ipc2581/ecad/cad_data/path.py +1 -3
- pyedb/ipc2581/ecad/cad_data/polygon.py +1 -6
- pyedb/ipc2581/ecad/cad_data/step.py +1 -10
- pyedb/ipc2581/ipc2581.py +8 -15
- pyedb/modeler/geometry_operators.py +164 -67
- pyedb/siwave.py +25 -32
- {pyedb-0.13.dev0.dist-info → pyedb-0.15.dev0.dist-info}/METADATA +2 -2
- {pyedb-0.13.dev0.dist-info → pyedb-0.15.dev0.dist-info}/RECORD +75 -61
- /pyedb/dotnet/edb_core/cell/{__init__.py → terminal/__init__.py} +0 -0
- {pyedb-0.13.dev0.dist-info → pyedb-0.15.dev0.dist-info}/LICENSE +0 -0
- {pyedb-0.13.dev0.dist-info → pyedb-0.15.dev0.dist-info}/WHEEL +0 -0
|
@@ -25,6 +25,10 @@ import re
|
|
|
25
25
|
import warnings
|
|
26
26
|
|
|
27
27
|
from pyedb.dotnet.edb_core.cell.hierarchy.model import PinPairModel, SPICEModel
|
|
28
|
+
from pyedb.dotnet.edb_core.cell.hierarchy.netlist_model import NetlistModel
|
|
29
|
+
from pyedb.dotnet.edb_core.cell.hierarchy.pin_pair_model import PinPair
|
|
30
|
+
from pyedb.dotnet.edb_core.cell.hierarchy.s_parameter_model import SparamModel
|
|
31
|
+
from pyedb.dotnet.edb_core.cell.hierarchy.spice_model import SpiceModel
|
|
28
32
|
from pyedb.dotnet.edb_core.definition.package_def import PackageDef
|
|
29
33
|
from pyedb.dotnet.edb_core.edb_data.padstacks_data import EDBPadstackInstance
|
|
30
34
|
from pyedb.generic.general_methods import is_ironpython
|
|
@@ -37,10 +41,7 @@ if not is_ironpython:
|
|
|
37
41
|
"The NumPy module is required to run some functionalities of EDB.\n"
|
|
38
42
|
"Install with \n\npip install numpy\n\nRequires CPython."
|
|
39
43
|
)
|
|
40
|
-
from pyedb.generic.general_methods import
|
|
41
|
-
get_filename_without_extension,
|
|
42
|
-
pyedb_function_handler,
|
|
43
|
-
)
|
|
44
|
+
from pyedb.generic.general_methods import get_filename_without_extension
|
|
44
45
|
|
|
45
46
|
|
|
46
47
|
class EDBComponent(object):
|
|
@@ -55,121 +56,6 @@ class EDBComponent(object):
|
|
|
55
56
|
|
|
56
57
|
"""
|
|
57
58
|
|
|
58
|
-
class _PinPair(object): # pragma: no cover
|
|
59
|
-
def __init__(self, pcomp, edb_comp, edb_comp_prop, edb_model, edb_pin_pair):
|
|
60
|
-
self._pedb_comp = pcomp
|
|
61
|
-
self._edb_comp = edb_comp
|
|
62
|
-
self._edb_comp_prop = edb_comp_prop
|
|
63
|
-
self._edb_model = edb_model
|
|
64
|
-
self._edb_pin_pair = edb_pin_pair
|
|
65
|
-
|
|
66
|
-
def _edb_value(self, value):
|
|
67
|
-
return self._pedb_comp._get_edb_value(value) # pragma: no cover
|
|
68
|
-
|
|
69
|
-
@property
|
|
70
|
-
def is_parallel(self):
|
|
71
|
-
return self._pin_pair_rlc.IsParallel # pragma: no cover
|
|
72
|
-
|
|
73
|
-
@is_parallel.setter
|
|
74
|
-
def is_parallel(self, value):
|
|
75
|
-
rlc = self._pin_pair_rlc
|
|
76
|
-
rlc.IsParallel = value
|
|
77
|
-
self._set_comp_prop() # pragma: no cover
|
|
78
|
-
|
|
79
|
-
@property
|
|
80
|
-
def _pin_pair_rlc(self):
|
|
81
|
-
return self._edb_model.GetPinPairRlc(self._edb_pin_pair)
|
|
82
|
-
|
|
83
|
-
@property
|
|
84
|
-
def rlc_enable(self):
|
|
85
|
-
rlc = self._pin_pair_rlc
|
|
86
|
-
return [rlc.REnabled, rlc.LEnabled, rlc.CEnabled]
|
|
87
|
-
|
|
88
|
-
@rlc_enable.setter
|
|
89
|
-
def rlc_enable(self, value):
|
|
90
|
-
rlc = self._pin_pair_rlc
|
|
91
|
-
rlc.REnabled = value[0]
|
|
92
|
-
rlc.LEnabled = value[1]
|
|
93
|
-
rlc.CEnabled = value[2]
|
|
94
|
-
self._set_comp_prop() # pragma: no cover
|
|
95
|
-
|
|
96
|
-
@property
|
|
97
|
-
def resistance(self):
|
|
98
|
-
return self._pin_pair_rlc.R.ToDouble() # pragma: no cover
|
|
99
|
-
|
|
100
|
-
@resistance.setter
|
|
101
|
-
def resistance(self, value):
|
|
102
|
-
self._pin_pair_rlc.R = value
|
|
103
|
-
self._set_comp_prop(self._pin_pair_rlc) # pragma: no cover
|
|
104
|
-
|
|
105
|
-
@property
|
|
106
|
-
def inductance(self):
|
|
107
|
-
return self._pin_pair_rlc.L.ToDouble() # pragma: no cover
|
|
108
|
-
|
|
109
|
-
@inductance.setter
|
|
110
|
-
def inductance(self, value):
|
|
111
|
-
self._pin_pair_rlc.L = value
|
|
112
|
-
self._set_comp_prop(self._pin_pair_rlc) # pragma: no cover
|
|
113
|
-
|
|
114
|
-
@property
|
|
115
|
-
def capacitance(self):
|
|
116
|
-
return self._pin_pair_rlc.C.ToDouble() # pragma: no cover
|
|
117
|
-
|
|
118
|
-
@capacitance.setter
|
|
119
|
-
def capacitance(self, value):
|
|
120
|
-
self._pin_pair_rlc.C = value
|
|
121
|
-
self._set_comp_prop(self._pin_pair_rlc) # pragma: no cover
|
|
122
|
-
|
|
123
|
-
@property
|
|
124
|
-
def rlc_values(self): # pragma: no cover
|
|
125
|
-
rlc = self._pin_pair_rlc
|
|
126
|
-
return [rlc.R.ToDouble(), rlc.L.ToDouble(), rlc.C.ToDouble()]
|
|
127
|
-
|
|
128
|
-
@rlc_values.setter
|
|
129
|
-
def rlc_values(self, values): # pragma: no cover
|
|
130
|
-
rlc = self._pin_pair_rlc
|
|
131
|
-
rlc.R = self._edb_value(values[0])
|
|
132
|
-
rlc.L = self._edb_value(values[1])
|
|
133
|
-
rlc.C = self._edb_value(values[2])
|
|
134
|
-
self._set_comp_prop() # pragma: no cover
|
|
135
|
-
|
|
136
|
-
def _set_comp_prop(self): # pragma: no cover
|
|
137
|
-
self._edb_model.SetPinPairRlc(self._edb_pin_pair, self._pin_pair_rlc)
|
|
138
|
-
self._edb_comp_prop.SetModel(self._edb_model)
|
|
139
|
-
self._edb_comp.SetComponentProperty(self._edb_comp_prop)
|
|
140
|
-
|
|
141
|
-
class _SpiceModel(object): # pragma: no cover
|
|
142
|
-
def __init__(self, edb_model):
|
|
143
|
-
self._edb_model = edb_model
|
|
144
|
-
|
|
145
|
-
@property
|
|
146
|
-
def file_path(self):
|
|
147
|
-
return self._edb_model.GetSPICEFilePath()
|
|
148
|
-
|
|
149
|
-
@property
|
|
150
|
-
def name(self):
|
|
151
|
-
return self._edb_model.GetSPICEName()
|
|
152
|
-
|
|
153
|
-
class _SparamModel(object): # pragma: no cover
|
|
154
|
-
def __init__(self, edb_model):
|
|
155
|
-
self._edb_model = edb_model
|
|
156
|
-
|
|
157
|
-
@property
|
|
158
|
-
def name(self):
|
|
159
|
-
return self._edb_model.GetComponentModelName()
|
|
160
|
-
|
|
161
|
-
@property
|
|
162
|
-
def reference_net(self):
|
|
163
|
-
return self._edb_model.GetReferenceNet()
|
|
164
|
-
|
|
165
|
-
class _NetlistModel(object): # pragma: no cover
|
|
166
|
-
def __init__(self, edb_model):
|
|
167
|
-
self._edb_model = edb_model
|
|
168
|
-
|
|
169
|
-
@property
|
|
170
|
-
def netlist(self):
|
|
171
|
-
return self._edb_model.GetNetlist()
|
|
172
|
-
|
|
173
59
|
def __init__(self, pedb, cmp):
|
|
174
60
|
self._pedb = pedb
|
|
175
61
|
self.edbcomponent = cmp
|
|
@@ -211,7 +97,7 @@ class EDBComponent(object):
|
|
|
211
97
|
edb_comp_prop = self.component_property
|
|
212
98
|
edb_model = self._edb_model
|
|
213
99
|
return [
|
|
214
|
-
|
|
100
|
+
PinPair(self, self.edbcomponent, edb_comp_prop, edb_model, pin_pair)
|
|
215
101
|
for pin_pair in list(edb_model.PinPairs)
|
|
216
102
|
]
|
|
217
103
|
|
|
@@ -250,14 +136,15 @@ class EDBComponent(object):
|
|
|
250
136
|
comp_prop.SetPackageDef(package_def._edb_object)
|
|
251
137
|
self.edbcomponent.SetComponentProperty(comp_prop)
|
|
252
138
|
|
|
253
|
-
|
|
254
|
-
def create_package_def(self, name=""):
|
|
139
|
+
def create_package_def(self, name="", component_part_name=None):
|
|
255
140
|
"""Create a package definition and assign it to the component.
|
|
256
141
|
|
|
257
142
|
Parameters
|
|
258
143
|
----------
|
|
259
144
|
name: str, optional
|
|
260
145
|
Name of the package definition
|
|
146
|
+
component_part_name : str, optional
|
|
147
|
+
Part name of the component.
|
|
261
148
|
|
|
262
149
|
Returns
|
|
263
150
|
-------
|
|
@@ -267,7 +154,7 @@ class EDBComponent(object):
|
|
|
267
154
|
if not name:
|
|
268
155
|
name = "{}_{}".format(self.refdes, self.part_name)
|
|
269
156
|
if name not in self._pedb.definitions.package:
|
|
270
|
-
self._pedb.definitions.add_package_def(name)
|
|
157
|
+
self._pedb.definitions.add_package_def(name, component_part_name=component_part_name)
|
|
271
158
|
self.package_def = name
|
|
272
159
|
|
|
273
160
|
from pyedb.dotnet.edb_core.dotnet.database import PolygonDataDotNet
|
|
@@ -313,7 +200,7 @@ class EDBComponent(object):
|
|
|
313
200
|
if not self.model_type == "SPICEModel":
|
|
314
201
|
return None
|
|
315
202
|
else:
|
|
316
|
-
return
|
|
203
|
+
return SpiceModel(self._edb_model)
|
|
317
204
|
|
|
318
205
|
@property
|
|
319
206
|
def s_param_model(self):
|
|
@@ -321,7 +208,7 @@ class EDBComponent(object):
|
|
|
321
208
|
if not self.model_type == "SParameterModel":
|
|
322
209
|
return None
|
|
323
210
|
else:
|
|
324
|
-
return
|
|
211
|
+
return SparamModel(self._edb_model)
|
|
325
212
|
|
|
326
213
|
@property
|
|
327
214
|
def netlist_model(self):
|
|
@@ -329,7 +216,7 @@ class EDBComponent(object):
|
|
|
329
216
|
if not self.model_type == "NetlistModel":
|
|
330
217
|
return None
|
|
331
218
|
else:
|
|
332
|
-
return
|
|
219
|
+
return NetlistModel(self._edb_model)
|
|
333
220
|
|
|
334
221
|
@property
|
|
335
222
|
def solder_ball_height(self):
|
|
@@ -913,11 +800,9 @@ class EDBComponent(object):
|
|
|
913
800
|
"""
|
|
914
801
|
return int(self.edbcomponent.GetPlacementLayer().GetTopBottomAssociation())
|
|
915
802
|
|
|
916
|
-
@pyedb_function_handler()
|
|
917
803
|
def _get_edb_value(self, value):
|
|
918
804
|
return self._pedb.edb_value(value)
|
|
919
805
|
|
|
920
|
-
@pyedb_function_handler()
|
|
921
806
|
def _set_model(self, model): # pragma: no cover
|
|
922
807
|
comp_prop = self.component_property
|
|
923
808
|
comp_prop.SetModel(model)
|
|
@@ -926,7 +811,6 @@ class EDBComponent(object):
|
|
|
926
811
|
return False
|
|
927
812
|
return True
|
|
928
813
|
|
|
929
|
-
@pyedb_function_handler()
|
|
930
814
|
def assign_spice_model(self, file_path, name=None, sub_circuit_name=None):
|
|
931
815
|
"""Assign Spice model to this component.
|
|
932
816
|
|
|
@@ -966,7 +850,6 @@ class EDBComponent(object):
|
|
|
966
850
|
return False
|
|
967
851
|
return self._set_model(model)
|
|
968
852
|
|
|
969
|
-
@pyedb_function_handler()
|
|
970
853
|
def assign_s_param_model(self, file_path, name=None, reference_net=None):
|
|
971
854
|
"""Assign S-parameter to this component.
|
|
972
855
|
|
|
@@ -997,7 +880,6 @@ class EDBComponent(object):
|
|
|
997
880
|
model.SetReferenceNet(reference_net)
|
|
998
881
|
return self._set_model(model)
|
|
999
882
|
|
|
1000
|
-
@pyedb_function_handler()
|
|
1001
883
|
def use_s_parameter_model(self, name, reference_net=None):
|
|
1002
884
|
"""Use S-parameter model on the component.
|
|
1003
885
|
|
|
@@ -1026,7 +908,6 @@ class EDBComponent(object):
|
|
|
1026
908
|
model.SetReferenceNet(reference_net)
|
|
1027
909
|
return self._set_model(model)
|
|
1028
910
|
|
|
1029
|
-
@pyedb_function_handler()
|
|
1030
911
|
def assign_rlc_model(self, res=None, ind=None, cap=None, is_parallel=False):
|
|
1031
912
|
"""Assign RLC to this component.
|
|
1032
913
|
|
|
@@ -1061,7 +942,6 @@ class EDBComponent(object):
|
|
|
1061
942
|
model.SetPinPairRlc(pin_pair, rlc)
|
|
1062
943
|
return self._set_model(model)
|
|
1063
944
|
|
|
1064
|
-
@pyedb_function_handler()
|
|
1065
945
|
def create_clearance_on_component(self, extra_soldermask_clearance=1e-4):
|
|
1066
946
|
"""Create a Clearance on Soldermask layer by drawing a rectangle.
|
|
1067
947
|
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
23
|
from pyedb.dotnet.edb_core.utilities.obj_base import ObjBase
|
|
24
|
-
from pyedb.generic.general_methods import pyedb_function_handler
|
|
25
24
|
|
|
26
25
|
|
|
27
26
|
class Model(ObjBase):
|
|
@@ -48,7 +47,6 @@ class PinPairModel(Model):
|
|
|
48
47
|
"""List of pin pair definitions."""
|
|
49
48
|
return list(self._edb_object.PinPairs)
|
|
50
49
|
|
|
51
|
-
@pyedb_function_handler
|
|
52
50
|
def delete_pin_pair_rlc(self, pin_pair):
|
|
53
51
|
"""Delete a pin pair definition.
|
|
54
52
|
|
|
@@ -62,7 +60,6 @@ class PinPairModel(Model):
|
|
|
62
60
|
"""
|
|
63
61
|
return self._edb_object.DeletePinPairRlc(pin_pair)
|
|
64
62
|
|
|
65
|
-
@pyedb_function_handler
|
|
66
63
|
def _set_pin_pair_rlc(self, pin_pair, pin_par_rlc):
|
|
67
64
|
"""Set resistance, inductance, capacitance to a pin pair definition.
|
|
68
65
|
|
|
@@ -0,0 +1,30 @@
|
|
|
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 NetlistModel(object): # pragma: no cover
|
|
25
|
+
def __init__(self, edb_model):
|
|
26
|
+
self._edb_model = edb_model
|
|
27
|
+
|
|
28
|
+
@property
|
|
29
|
+
def netlist(self):
|
|
30
|
+
return self._edb_model.GetNetlist()
|
|
@@ -0,0 +1,105 @@
|
|
|
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 PinPair(object): # pragma: no cover
|
|
25
|
+
def __init__(self, pcomp, edb_comp, edb_comp_prop, edb_model, edb_pin_pair):
|
|
26
|
+
self._pedb_comp = pcomp
|
|
27
|
+
self._edb_comp = edb_comp
|
|
28
|
+
self._edb_comp_prop = edb_comp_prop
|
|
29
|
+
self._edb_model = edb_model
|
|
30
|
+
self._edb_pin_pair = edb_pin_pair
|
|
31
|
+
|
|
32
|
+
def _edb_value(self, value):
|
|
33
|
+
return self._pedb_comp._get_edb_value(value) # pragma: no cover
|
|
34
|
+
|
|
35
|
+
@property
|
|
36
|
+
def is_parallel(self):
|
|
37
|
+
return self._pin_pair_rlc.IsParallel # pragma: no cover
|
|
38
|
+
|
|
39
|
+
@is_parallel.setter
|
|
40
|
+
def is_parallel(self, value):
|
|
41
|
+
rlc = self._pin_pair_rlc
|
|
42
|
+
rlc.IsParallel = value
|
|
43
|
+
self._set_comp_prop() # pragma: no cover
|
|
44
|
+
|
|
45
|
+
@property
|
|
46
|
+
def _pin_pair_rlc(self):
|
|
47
|
+
return self._edb_model.GetPinPairRlc(self._edb_pin_pair)
|
|
48
|
+
|
|
49
|
+
@property
|
|
50
|
+
def rlc_enable(self):
|
|
51
|
+
rlc = self._pin_pair_rlc
|
|
52
|
+
return [rlc.REnabled, rlc.LEnabled, rlc.CEnabled]
|
|
53
|
+
|
|
54
|
+
@rlc_enable.setter
|
|
55
|
+
def rlc_enable(self, value):
|
|
56
|
+
rlc = self._pin_pair_rlc
|
|
57
|
+
rlc.REnabled = value[0]
|
|
58
|
+
rlc.LEnabled = value[1]
|
|
59
|
+
rlc.CEnabled = value[2]
|
|
60
|
+
self._set_comp_prop() # pragma: no cover
|
|
61
|
+
|
|
62
|
+
@property
|
|
63
|
+
def resistance(self):
|
|
64
|
+
return self._pin_pair_rlc.R.ToDouble() # pragma: no cover
|
|
65
|
+
|
|
66
|
+
@resistance.setter
|
|
67
|
+
def resistance(self, value):
|
|
68
|
+
self._pin_pair_rlc.R = value
|
|
69
|
+
self._set_comp_prop(self._pin_pair_rlc) # pragma: no cover
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def inductance(self):
|
|
73
|
+
return self._pin_pair_rlc.L.ToDouble() # pragma: no cover
|
|
74
|
+
|
|
75
|
+
@inductance.setter
|
|
76
|
+
def inductance(self, value):
|
|
77
|
+
self._pin_pair_rlc.L = value
|
|
78
|
+
self._set_comp_prop(self._pin_pair_rlc) # pragma: no cover
|
|
79
|
+
|
|
80
|
+
@property
|
|
81
|
+
def capacitance(self):
|
|
82
|
+
return self._pin_pair_rlc.C.ToDouble() # pragma: no cover
|
|
83
|
+
|
|
84
|
+
@capacitance.setter
|
|
85
|
+
def capacitance(self, value):
|
|
86
|
+
self._pin_pair_rlc.C = value
|
|
87
|
+
self._set_comp_prop(self._pin_pair_rlc) # pragma: no cover
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
def rlc_values(self): # pragma: no cover
|
|
91
|
+
rlc = self._pin_pair_rlc
|
|
92
|
+
return [rlc.R.ToDouble(), rlc.L.ToDouble(), rlc.C.ToDouble()]
|
|
93
|
+
|
|
94
|
+
@rlc_values.setter
|
|
95
|
+
def rlc_values(self, values): # pragma: no cover
|
|
96
|
+
rlc = self._pin_pair_rlc
|
|
97
|
+
rlc.R = self._edb_value(values[0])
|
|
98
|
+
rlc.L = self._edb_value(values[1])
|
|
99
|
+
rlc.C = self._edb_value(values[2])
|
|
100
|
+
self._set_comp_prop() # pragma: no cover
|
|
101
|
+
|
|
102
|
+
def _set_comp_prop(self): # pragma: no cover
|
|
103
|
+
self._edb_model.SetPinPairRlc(self._edb_pin_pair, self._pin_pair_rlc)
|
|
104
|
+
self._edb_comp_prop.SetModel(self._edb_model)
|
|
105
|
+
self._edb_comp.SetComponentProperty(self._edb_comp_prop)
|
|
@@ -0,0 +1,34 @@
|
|
|
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 SparamModel(object): # pragma: no cover
|
|
25
|
+
def __init__(self, edb_model):
|
|
26
|
+
self._edb_model = edb_model
|
|
27
|
+
|
|
28
|
+
@property
|
|
29
|
+
def name(self):
|
|
30
|
+
return self._edb_model.GetComponentModelName()
|
|
31
|
+
|
|
32
|
+
@property
|
|
33
|
+
def reference_net(self):
|
|
34
|
+
return self._edb_model.GetReferenceNet()
|
|
@@ -0,0 +1,34 @@
|
|
|
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 SpiceModel(object): # pragma: no cover
|
|
25
|
+
def __init__(self, edb_model):
|
|
26
|
+
self._edb_model = edb_model
|
|
27
|
+
|
|
28
|
+
@property
|
|
29
|
+
def file_path(self):
|
|
30
|
+
return self._edb_model.GetSPICEFilePath()
|
|
31
|
+
|
|
32
|
+
@property
|
|
33
|
+
def name(self):
|
|
34
|
+
return self._edb_model.GetSPICEName()
|
|
@@ -0,0 +1,137 @@
|
|
|
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
|
+
This module contains these classes: `EdbLayout` and `Shape`.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
from pyedb.dotnet.edb_core.cell.primitive import Bondwire
|
|
28
|
+
from pyedb.dotnet.edb_core.edb_data.nets_data import EDBNetsData
|
|
29
|
+
from pyedb.dotnet.edb_core.layout import EdbLayout
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class Layout(EdbLayout):
|
|
33
|
+
def __init__(self, pedb, edb_object):
|
|
34
|
+
super().__init__(pedb)
|
|
35
|
+
self._edb_object = edb_object
|
|
36
|
+
|
|
37
|
+
@property
|
|
38
|
+
def nets(self):
|
|
39
|
+
"""Nets.
|
|
40
|
+
|
|
41
|
+
Returns
|
|
42
|
+
-------
|
|
43
|
+
dict[str, :class:`pyedb.dotnet.edb_core.edb_data.nets_data.EDBNetsData`]
|
|
44
|
+
Dictionary of nets.
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
temp = {}
|
|
48
|
+
for net in self._edb_object.Nets:
|
|
49
|
+
n = EDBNetsData(net, self._pedb)
|
|
50
|
+
temp[n.name] = n
|
|
51
|
+
return temp
|
|
52
|
+
|
|
53
|
+
@property
|
|
54
|
+
def bondwires(self):
|
|
55
|
+
"""Bondwires.
|
|
56
|
+
|
|
57
|
+
Returns
|
|
58
|
+
-------
|
|
59
|
+
list :
|
|
60
|
+
List of bondwires.
|
|
61
|
+
"""
|
|
62
|
+
return [
|
|
63
|
+
Bondwire(self._pedb, i)
|
|
64
|
+
for i in self._edb_object.Primitives
|
|
65
|
+
if i.GetPrimitiveType().ToString() == "Bondwire"
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
def create_bondwire(
|
|
69
|
+
self,
|
|
70
|
+
definition_name,
|
|
71
|
+
placement_layer,
|
|
72
|
+
width,
|
|
73
|
+
material,
|
|
74
|
+
start_layer_name,
|
|
75
|
+
start_x,
|
|
76
|
+
start_y,
|
|
77
|
+
end_layer_name,
|
|
78
|
+
end_x,
|
|
79
|
+
end_y,
|
|
80
|
+
net,
|
|
81
|
+
bondwire_type="jedec4",
|
|
82
|
+
):
|
|
83
|
+
"""Create a bondwire object.
|
|
84
|
+
|
|
85
|
+
Parameters
|
|
86
|
+
----------
|
|
87
|
+
layout : :class:`Layout <ansys.edb.layout.Layout>`
|
|
88
|
+
Layout this bondwire will be in.
|
|
89
|
+
bondwire_type : :class:`BondwireType`
|
|
90
|
+
Type of bondwire: kAPDBondWire or kJDECBondWire types.
|
|
91
|
+
definition_name : str
|
|
92
|
+
Bondwire definition name.
|
|
93
|
+
placement_layer : str
|
|
94
|
+
Layer name this bondwire will be on.
|
|
95
|
+
width : :class:`Value <ansys.edb.utility.Value>`
|
|
96
|
+
Bondwire width.
|
|
97
|
+
material : str
|
|
98
|
+
Bondwire material name.
|
|
99
|
+
start_context : :class:`CellInstance <ansys.edb.hierarchy.CellInstance>`
|
|
100
|
+
Start context: None means top level.
|
|
101
|
+
start_layer_name : str
|
|
102
|
+
Name of start layer.
|
|
103
|
+
start_x : :class:`Value <ansys.edb.utility.Value>`
|
|
104
|
+
X value of start point.
|
|
105
|
+
start_y : :class:`Value <ansys.edb.utility.Value>`
|
|
106
|
+
Y value of start point.
|
|
107
|
+
end_context : :class:`CellInstance <ansys.edb.hierarchy.CellInstance>`
|
|
108
|
+
End context: None means top level.
|
|
109
|
+
end_layer_name : str
|
|
110
|
+
Name of end layer.
|
|
111
|
+
end_x : :class:`Value <ansys.edb.utility.Value>`
|
|
112
|
+
X value of end point.
|
|
113
|
+
end_y : :class:`Value <ansys.edb.utility.Value>`
|
|
114
|
+
Y value of end point.
|
|
115
|
+
net : str or :class:`Net <ansys.edb.net.Net>` or None
|
|
116
|
+
Net of the Bondwire.
|
|
117
|
+
|
|
118
|
+
Returns
|
|
119
|
+
-------
|
|
120
|
+
:class:`pyedb.dotnet.edb_core.dotnet.primitive.BondwireDotNet`
|
|
121
|
+
Bondwire object created.
|
|
122
|
+
"""
|
|
123
|
+
return Bondwire(
|
|
124
|
+
pedb=self._pedb,
|
|
125
|
+
bondwire_type=bondwire_type,
|
|
126
|
+
definition_name=definition_name,
|
|
127
|
+
placement_layer=placement_layer,
|
|
128
|
+
width=self._pedb.edb_value(width),
|
|
129
|
+
material=material,
|
|
130
|
+
start_layer_name=start_layer_name,
|
|
131
|
+
start_x=self._pedb.edb_value(start_x),
|
|
132
|
+
start_y=self._pedb.edb_value(start_y),
|
|
133
|
+
end_layer_name=end_layer_name,
|
|
134
|
+
end_x=self._pedb.edb_value(end_x),
|
|
135
|
+
end_y=self._pedb.edb_value(end_y),
|
|
136
|
+
net=self.nets[net]._edb_object,
|
|
137
|
+
)
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
23
|
from pyedb.dotnet.edb_core.utilities.obj_base import ObjBase
|
|
24
|
-
from pyedb.generic.general_methods import pyedb_function_handler
|
|
25
24
|
|
|
26
25
|
|
|
27
26
|
class LayoutObjInstance:
|
|
@@ -42,7 +41,7 @@ class LayoutObj(ObjBase):
|
|
|
42
41
|
try:
|
|
43
42
|
return getattr(self._edb_object, key)
|
|
44
43
|
except AttributeError:
|
|
45
|
-
raise AttributeError("Attribute not present")
|
|
44
|
+
raise AttributeError(f"Attribute '{key}' not present")
|
|
46
45
|
|
|
47
46
|
def __init__(self, pedb, edb_object):
|
|
48
47
|
super().__init__(pedb, edb_object)
|
|
@@ -87,7 +86,6 @@ class LayoutObj(ObjBase):
|
|
|
87
86
|
"""
|
|
88
87
|
return self._edb_object.GetId()
|
|
89
88
|
|
|
90
|
-
@pyedb_function_handler()
|
|
91
89
|
def delete(self):
|
|
92
90
|
"""Delete this primitive."""
|
|
93
91
|
self._edb_object.Delete()
|
|
@@ -126,7 +124,7 @@ class Connectable(LayoutObj):
|
|
|
126
124
|
-------
|
|
127
125
|
:class:`dotnet.edb_core.edb_data.nets_data.EDBComponent`
|
|
128
126
|
"""
|
|
129
|
-
from pyedb.dotnet.edb_core.
|
|
127
|
+
from pyedb.dotnet.edb_core.cell.hierarchy.component import EDBComponent
|
|
130
128
|
|
|
131
129
|
edb_comp = self._edb_object.GetComponent()
|
|
132
130
|
if edb_comp.IsNull():
|