pyedb 0.2.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 +17 -0
- pyedb/dotnet/__init__.py +0 -0
- pyedb/dotnet/application/Variables.py +2261 -0
- pyedb/dotnet/application/__init__.py +0 -0
- pyedb/dotnet/clr_module.py +103 -0
- pyedb/dotnet/edb.py +4237 -0
- pyedb/dotnet/edb_core/__init__.py +1 -0
- pyedb/dotnet/edb_core/cell/__init__.py +0 -0
- pyedb/dotnet/edb_core/cell/hierarchy/__init__.py +0 -0
- pyedb/dotnet/edb_core/cell/hierarchy/model.py +66 -0
- pyedb/dotnet/edb_core/components.py +2669 -0
- pyedb/dotnet/edb_core/configuration.py +423 -0
- pyedb/dotnet/edb_core/definition/__init__.py +0 -0
- pyedb/dotnet/edb_core/definition/component_def.py +166 -0
- pyedb/dotnet/edb_core/definition/component_model.py +30 -0
- pyedb/dotnet/edb_core/definition/definition_obj.py +18 -0
- pyedb/dotnet/edb_core/definition/definitions.py +12 -0
- pyedb/dotnet/edb_core/dotnet/__init__.py +0 -0
- pyedb/dotnet/edb_core/dotnet/database.py +1218 -0
- pyedb/dotnet/edb_core/dotnet/layout.py +238 -0
- pyedb/dotnet/edb_core/dotnet/primitive.py +1517 -0
- pyedb/dotnet/edb_core/edb_data/__init__.py +0 -0
- pyedb/dotnet/edb_core/edb_data/components_data.py +938 -0
- pyedb/dotnet/edb_core/edb_data/connectable.py +113 -0
- pyedb/dotnet/edb_core/edb_data/control_file.py +1268 -0
- pyedb/dotnet/edb_core/edb_data/design_options.py +35 -0
- pyedb/dotnet/edb_core/edb_data/edbvalue.py +45 -0
- pyedb/dotnet/edb_core/edb_data/hfss_extent_info.py +330 -0
- pyedb/dotnet/edb_core/edb_data/hfss_simulation_setup_data.py +1607 -0
- pyedb/dotnet/edb_core/edb_data/layer_data.py +576 -0
- pyedb/dotnet/edb_core/edb_data/nets_data.py +281 -0
- pyedb/dotnet/edb_core/edb_data/obj_base.py +19 -0
- pyedb/dotnet/edb_core/edb_data/padstacks_data.py +2080 -0
- pyedb/dotnet/edb_core/edb_data/ports.py +287 -0
- pyedb/dotnet/edb_core/edb_data/primitives_data.py +1397 -0
- pyedb/dotnet/edb_core/edb_data/simulation_configuration.py +2914 -0
- pyedb/dotnet/edb_core/edb_data/simulation_setup.py +716 -0
- pyedb/dotnet/edb_core/edb_data/siwave_simulation_setup_data.py +1205 -0
- pyedb/dotnet/edb_core/edb_data/sources.py +514 -0
- pyedb/dotnet/edb_core/edb_data/terminals.py +632 -0
- pyedb/dotnet/edb_core/edb_data/utilities.py +148 -0
- pyedb/dotnet/edb_core/edb_data/variables.py +91 -0
- pyedb/dotnet/edb_core/general.py +181 -0
- pyedb/dotnet/edb_core/hfss.py +1646 -0
- pyedb/dotnet/edb_core/layout.py +1244 -0
- pyedb/dotnet/edb_core/layout_validation.py +272 -0
- pyedb/dotnet/edb_core/materials.py +939 -0
- pyedb/dotnet/edb_core/net_class.py +335 -0
- pyedb/dotnet/edb_core/nets.py +1215 -0
- pyedb/dotnet/edb_core/padstack.py +1389 -0
- pyedb/dotnet/edb_core/siwave.py +1427 -0
- pyedb/dotnet/edb_core/stackup.py +2703 -0
- pyedb/edb_logger.py +396 -0
- pyedb/generic/__init__.py +0 -0
- pyedb/generic/constants.py +1063 -0
- pyedb/generic/data_handlers.py +320 -0
- pyedb/generic/design_types.py +104 -0
- pyedb/generic/filesystem.py +150 -0
- pyedb/generic/general_methods.py +1535 -0
- pyedb/generic/plot.py +1840 -0
- pyedb/generic/process.py +285 -0
- pyedb/generic/settings.py +224 -0
- pyedb/ipc2581/__init__.py +0 -0
- pyedb/ipc2581/bom/__init__.py +0 -0
- pyedb/ipc2581/bom/bom.py +21 -0
- pyedb/ipc2581/bom/bom_item.py +32 -0
- pyedb/ipc2581/bom/characteristics.py +37 -0
- pyedb/ipc2581/bom/refdes.py +16 -0
- pyedb/ipc2581/content/__init__.py +0 -0
- pyedb/ipc2581/content/color.py +38 -0
- pyedb/ipc2581/content/content.py +55 -0
- pyedb/ipc2581/content/dictionary_color.py +29 -0
- pyedb/ipc2581/content/dictionary_fill.py +28 -0
- pyedb/ipc2581/content/dictionary_line.py +30 -0
- pyedb/ipc2581/content/entry_color.py +13 -0
- pyedb/ipc2581/content/entry_line.py +14 -0
- pyedb/ipc2581/content/fill.py +15 -0
- pyedb/ipc2581/content/layer_ref.py +10 -0
- pyedb/ipc2581/content/standard_geometries_dictionary.py +72 -0
- pyedb/ipc2581/ecad/__init__.py +0 -0
- pyedb/ipc2581/ecad/cad_data/__init__.py +0 -0
- pyedb/ipc2581/ecad/cad_data/assembly_drawing.py +26 -0
- pyedb/ipc2581/ecad/cad_data/cad_data.py +37 -0
- pyedb/ipc2581/ecad/cad_data/component.py +41 -0
- pyedb/ipc2581/ecad/cad_data/drill.py +30 -0
- pyedb/ipc2581/ecad/cad_data/feature.py +54 -0
- pyedb/ipc2581/ecad/cad_data/layer.py +41 -0
- pyedb/ipc2581/ecad/cad_data/layer_feature.py +151 -0
- pyedb/ipc2581/ecad/cad_data/logical_net.py +32 -0
- pyedb/ipc2581/ecad/cad_data/outline.py +25 -0
- pyedb/ipc2581/ecad/cad_data/package.py +104 -0
- pyedb/ipc2581/ecad/cad_data/padstack_def.py +38 -0
- pyedb/ipc2581/ecad/cad_data/padstack_hole_def.py +24 -0
- pyedb/ipc2581/ecad/cad_data/padstack_instance.py +62 -0
- pyedb/ipc2581/ecad/cad_data/padstack_pad_def.py +26 -0
- pyedb/ipc2581/ecad/cad_data/path.py +89 -0
- pyedb/ipc2581/ecad/cad_data/phy_net.py +80 -0
- pyedb/ipc2581/ecad/cad_data/pin.py +31 -0
- pyedb/ipc2581/ecad/cad_data/polygon.py +169 -0
- pyedb/ipc2581/ecad/cad_data/profile.py +40 -0
- pyedb/ipc2581/ecad/cad_data/stackup.py +31 -0
- pyedb/ipc2581/ecad/cad_data/stackup_group.py +42 -0
- pyedb/ipc2581/ecad/cad_data/stackup_layer.py +21 -0
- pyedb/ipc2581/ecad/cad_data/step.py +275 -0
- pyedb/ipc2581/ecad/cad_header.py +33 -0
- pyedb/ipc2581/ecad/ecad.py +19 -0
- pyedb/ipc2581/ecad/spec.py +46 -0
- pyedb/ipc2581/history_record.py +37 -0
- pyedb/ipc2581/ipc2581.py +387 -0
- pyedb/ipc2581/logistic_header.py +25 -0
- pyedb/misc/__init__.py +0 -0
- pyedb/misc/aedtlib_personalib_install.py +14 -0
- pyedb/misc/downloads.py +322 -0
- pyedb/misc/misc.py +67 -0
- pyedb/misc/pyedb.runtimeconfig.json +13 -0
- pyedb/misc/siw_feature_config/__init__.py +0 -0
- pyedb/misc/siw_feature_config/emc/__init__.py +0 -0
- pyedb/misc/siw_feature_config/emc/component_tags.py +46 -0
- pyedb/misc/siw_feature_config/emc/net_tags.py +37 -0
- pyedb/misc/siw_feature_config/emc/tag_library.py +62 -0
- pyedb/misc/siw_feature_config/emc/xml_generic.py +78 -0
- pyedb/misc/siw_feature_config/emc_rule_checker_settings.py +179 -0
- pyedb/misc/utilities.py +27 -0
- pyedb/modeler/geometry_operators.py +2082 -0
- pyedb-0.2.0.dist-info/LICENSE +21 -0
- pyedb-0.2.0.dist-info/METADATA +208 -0
- pyedb-0.2.0.dist-info/RECORD +128 -0
- pyedb-0.2.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,514 @@
|
|
|
1
|
+
from pyedb.generic.constants import NodeType, SourceType
|
|
2
|
+
from pyedb.generic.general_methods import generate_unique_name, pyedb_function_handler
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Node(object):
|
|
6
|
+
"""Provides for handling nodes for Siwave sources."""
|
|
7
|
+
|
|
8
|
+
def __init__(self):
|
|
9
|
+
self._component = None
|
|
10
|
+
self._net = None
|
|
11
|
+
self._node_type = NodeType.Positive
|
|
12
|
+
self._name = ""
|
|
13
|
+
|
|
14
|
+
@property
|
|
15
|
+
def component(self): # pragma: no cover
|
|
16
|
+
"""Component name containing the node."""
|
|
17
|
+
return self._component
|
|
18
|
+
|
|
19
|
+
@component.setter
|
|
20
|
+
def component(self, value): # pragma: no cover
|
|
21
|
+
if isinstance(value, str):
|
|
22
|
+
self._component = value
|
|
23
|
+
|
|
24
|
+
@property
|
|
25
|
+
def net(self): # pragma: no cover
|
|
26
|
+
"""Net of the node."""
|
|
27
|
+
return self._net
|
|
28
|
+
|
|
29
|
+
@net.setter
|
|
30
|
+
def net(self, value): # pragma: no cover
|
|
31
|
+
if isinstance(value, str):
|
|
32
|
+
self._net = value
|
|
33
|
+
|
|
34
|
+
@property
|
|
35
|
+
def node_type(self): # pragma: no cover
|
|
36
|
+
"""Type of the node."""
|
|
37
|
+
return self._node_type
|
|
38
|
+
|
|
39
|
+
@node_type.setter
|
|
40
|
+
def node_type(self, value): # pragma: no cover
|
|
41
|
+
if isinstance(value, int):
|
|
42
|
+
self._node_type = value
|
|
43
|
+
|
|
44
|
+
@property
|
|
45
|
+
def name(self): # pragma: no cover
|
|
46
|
+
"""Name of the node."""
|
|
47
|
+
return self._name
|
|
48
|
+
|
|
49
|
+
@name.setter
|
|
50
|
+
def name(self, value): # pragma: no cover
|
|
51
|
+
if isinstance(value, str):
|
|
52
|
+
self._name = value
|
|
53
|
+
|
|
54
|
+
def _json_format(self): # pragma: no cover
|
|
55
|
+
dict_out = {}
|
|
56
|
+
for k, v in self.__dict__.items():
|
|
57
|
+
dict_out[k[1:]] = v
|
|
58
|
+
return dict_out
|
|
59
|
+
|
|
60
|
+
def _read_json(self, node_dict): # pragma: no cover
|
|
61
|
+
for k, v in node_dict.items():
|
|
62
|
+
self.__setattr__(k, v)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class Source(object):
|
|
66
|
+
"""Provides for handling Siwave sources."""
|
|
67
|
+
|
|
68
|
+
def __init__(self):
|
|
69
|
+
self._name = ""
|
|
70
|
+
self._source_type = SourceType.Vsource
|
|
71
|
+
self._positive_node = PinGroup()
|
|
72
|
+
self._negative_node = PinGroup()
|
|
73
|
+
self._amplitude = 1.0
|
|
74
|
+
self._phase = 0.0
|
|
75
|
+
self._impedance = 1.0
|
|
76
|
+
self._r = 1.0
|
|
77
|
+
self._l = 0.0
|
|
78
|
+
self._c = 0.0
|
|
79
|
+
self._create_physical_resistor = True
|
|
80
|
+
self._positive_node.node_type = int(NodeType.Positive)
|
|
81
|
+
self._positive_node.name = "pos_term"
|
|
82
|
+
self._negative_node.node_type = int(NodeType.Negative)
|
|
83
|
+
self._negative_node.name = "neg_term"
|
|
84
|
+
|
|
85
|
+
@property
|
|
86
|
+
def name(self): # pragma: no cover
|
|
87
|
+
"""Source name."""
|
|
88
|
+
return self._name
|
|
89
|
+
|
|
90
|
+
@name.setter
|
|
91
|
+
def name(self, value): # pragma: no cover
|
|
92
|
+
if isinstance(value, str):
|
|
93
|
+
self._name = value
|
|
94
|
+
|
|
95
|
+
@property
|
|
96
|
+
def source_type(self): # pragma: no cover
|
|
97
|
+
"""Source type."""
|
|
98
|
+
return self._source_type
|
|
99
|
+
|
|
100
|
+
@source_type.setter
|
|
101
|
+
def source_type(self, value): # pragma: no cover
|
|
102
|
+
if isinstance(value, int):
|
|
103
|
+
self._source_type = value
|
|
104
|
+
if value == 3:
|
|
105
|
+
self._impedance = 1e-6
|
|
106
|
+
if value == 4:
|
|
107
|
+
self._impedance = 5e7
|
|
108
|
+
if value == 5:
|
|
109
|
+
self._r = 1.0
|
|
110
|
+
self._l = 0.0
|
|
111
|
+
self._c = 0.0
|
|
112
|
+
|
|
113
|
+
@property
|
|
114
|
+
def positive_node(self): # pragma: no cover
|
|
115
|
+
"""Positive node of the source."""
|
|
116
|
+
return self._positive_node
|
|
117
|
+
|
|
118
|
+
@positive_node.setter
|
|
119
|
+
def positive_node(self, value): # pragma: no cover
|
|
120
|
+
if isinstance(value, (Node, PinGroup)):
|
|
121
|
+
self._positive_node = value
|
|
122
|
+
|
|
123
|
+
@property
|
|
124
|
+
def negative_node(self): # pragma: no cover
|
|
125
|
+
"""Negative node of the source."""
|
|
126
|
+
return self._negative_node
|
|
127
|
+
|
|
128
|
+
@negative_node.setter
|
|
129
|
+
def negative_node(self, value): # pragma: no cover
|
|
130
|
+
if isinstance(value, (Node, PinGroup)):
|
|
131
|
+
self._negative_node = value
|
|
132
|
+
#
|
|
133
|
+
|
|
134
|
+
@property
|
|
135
|
+
def amplitude(self): # pragma: no cover
|
|
136
|
+
"""Amplitude value of the source. Either amperes for current source or volts for
|
|
137
|
+
voltage source."""
|
|
138
|
+
return self._amplitude
|
|
139
|
+
|
|
140
|
+
@amplitude.setter
|
|
141
|
+
def amplitude(self, value): # pragma: no cover
|
|
142
|
+
if isinstance(float(value), float):
|
|
143
|
+
self._amplitude = value
|
|
144
|
+
|
|
145
|
+
@property
|
|
146
|
+
def phase(self): # pragma: no cover
|
|
147
|
+
"""Phase of the source."""
|
|
148
|
+
return self._phase
|
|
149
|
+
|
|
150
|
+
@phase.setter
|
|
151
|
+
def phase(self, value): # pragma: no cover
|
|
152
|
+
if isinstance(float(value), float):
|
|
153
|
+
self._phase = value
|
|
154
|
+
|
|
155
|
+
@property
|
|
156
|
+
def impedance(self): # pragma: no cover
|
|
157
|
+
"""Impedance values of the source."""
|
|
158
|
+
return self._impedance
|
|
159
|
+
|
|
160
|
+
@impedance.setter
|
|
161
|
+
def impedance(self, value): # pragma: no cover
|
|
162
|
+
if isinstance(float(value), float):
|
|
163
|
+
self._impedance = value
|
|
164
|
+
|
|
165
|
+
@property
|
|
166
|
+
def r_value(self):
|
|
167
|
+
return self._r
|
|
168
|
+
|
|
169
|
+
@r_value.setter
|
|
170
|
+
def r_value(self, value):
|
|
171
|
+
if isinstance(float(value), float):
|
|
172
|
+
self._r = value
|
|
173
|
+
|
|
174
|
+
@property
|
|
175
|
+
def l_value(self):
|
|
176
|
+
return self._l
|
|
177
|
+
|
|
178
|
+
@l_value.setter
|
|
179
|
+
def l_value(self, value):
|
|
180
|
+
if isinstance(float(value), float):
|
|
181
|
+
self._l = value
|
|
182
|
+
|
|
183
|
+
@property
|
|
184
|
+
def c_value(self):
|
|
185
|
+
return self._c
|
|
186
|
+
|
|
187
|
+
@c_value.setter
|
|
188
|
+
def c_value(self, value):
|
|
189
|
+
if isinstance(float(value), float):
|
|
190
|
+
self._c = value
|
|
191
|
+
|
|
192
|
+
@property
|
|
193
|
+
def create_physical_resistor(self):
|
|
194
|
+
return self._create_physical_resistor
|
|
195
|
+
|
|
196
|
+
@create_physical_resistor.setter
|
|
197
|
+
def create_physical_resistor(self, value):
|
|
198
|
+
if isinstance(value, bool):
|
|
199
|
+
self._create_physical_resistor = value
|
|
200
|
+
|
|
201
|
+
def _json_format(self): # pragma: no cover
|
|
202
|
+
dict_out = {}
|
|
203
|
+
for k, v in self.__dict__.items():
|
|
204
|
+
if k == "_positive_node" or k == "_negative_node":
|
|
205
|
+
nodes = v._json_format()
|
|
206
|
+
dict_out[k[1:]] = nodes
|
|
207
|
+
else:
|
|
208
|
+
dict_out[k[1:]] = v
|
|
209
|
+
return dict_out
|
|
210
|
+
|
|
211
|
+
def _read_json(self, source_dict): # pragma: no cover
|
|
212
|
+
for k, v in source_dict.items():
|
|
213
|
+
if k == "positive_node":
|
|
214
|
+
self.positive_node._read_json(v)
|
|
215
|
+
elif k == "negative_node":
|
|
216
|
+
self.negative_node._read_json(v)
|
|
217
|
+
else:
|
|
218
|
+
self.__setattr__(k, v)
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
class PinGroup(object):
|
|
222
|
+
"""Manages pin groups."""
|
|
223
|
+
|
|
224
|
+
def __init__(self, name="", edb_pin_group=None, pedb=None):
|
|
225
|
+
self._pedb = pedb
|
|
226
|
+
self._edb_pin_group = edb_pin_group
|
|
227
|
+
self._name = name
|
|
228
|
+
self._component = ""
|
|
229
|
+
self._node_pins = []
|
|
230
|
+
self._net = ""
|
|
231
|
+
self._edb_object = self._edb_pin_group
|
|
232
|
+
|
|
233
|
+
@property
|
|
234
|
+
def _active_layout(self):
|
|
235
|
+
return self._pedb.active_layout
|
|
236
|
+
|
|
237
|
+
@property
|
|
238
|
+
def name(self):
|
|
239
|
+
"""Name."""
|
|
240
|
+
return self._name
|
|
241
|
+
|
|
242
|
+
@name.setter
|
|
243
|
+
def name(self, value):
|
|
244
|
+
self._name = value
|
|
245
|
+
|
|
246
|
+
@property
|
|
247
|
+
def component(self):
|
|
248
|
+
"""Component."""
|
|
249
|
+
return self._component
|
|
250
|
+
|
|
251
|
+
@component.setter
|
|
252
|
+
def component(self, value):
|
|
253
|
+
self._component = value
|
|
254
|
+
|
|
255
|
+
@property
|
|
256
|
+
def node_pins(self):
|
|
257
|
+
"""Node pins."""
|
|
258
|
+
return self._node_pins
|
|
259
|
+
|
|
260
|
+
@node_pins.setter
|
|
261
|
+
def node_pins(self, value):
|
|
262
|
+
self._node_pins = value
|
|
263
|
+
|
|
264
|
+
@property
|
|
265
|
+
def net(self):
|
|
266
|
+
"""Net."""
|
|
267
|
+
return self._net
|
|
268
|
+
|
|
269
|
+
@net.setter
|
|
270
|
+
def net(self, value):
|
|
271
|
+
self._net = value
|
|
272
|
+
|
|
273
|
+
@property
|
|
274
|
+
def net_name(self):
|
|
275
|
+
return self._edb_pin_group.GetNet().GetName()
|
|
276
|
+
|
|
277
|
+
@pyedb_function_handler
|
|
278
|
+
def get_terminal(self, name=None, create_new_terminal=False):
|
|
279
|
+
"""Terminal."""
|
|
280
|
+
|
|
281
|
+
if create_new_terminal:
|
|
282
|
+
term = self._create_terminal(name)
|
|
283
|
+
else:
|
|
284
|
+
from pyedb.dotnet.edb_core.edb_data.terminals import PinGroupTerminal
|
|
285
|
+
|
|
286
|
+
term = PinGroupTerminal(self._pedb, self._edb_pin_group.GetPinGroupTerminal())
|
|
287
|
+
return term if not term.is_null else None
|
|
288
|
+
|
|
289
|
+
@pyedb_function_handler()
|
|
290
|
+
def _create_terminal(self, name=None):
|
|
291
|
+
"""Create a terminal on the pin group.
|
|
292
|
+
|
|
293
|
+
Parameters
|
|
294
|
+
----------
|
|
295
|
+
name : str, optional
|
|
296
|
+
Name of the terminal. The default is ``None``, in which case a name is
|
|
297
|
+
automatically assigned.
|
|
298
|
+
|
|
299
|
+
Returns
|
|
300
|
+
-------
|
|
301
|
+
:class:`pyedb.dotnet.edb_core.edb_data.terminals.PinGroupTerminal`
|
|
302
|
+
"""
|
|
303
|
+
terminal = self.get_terminal()
|
|
304
|
+
if terminal:
|
|
305
|
+
return terminal
|
|
306
|
+
|
|
307
|
+
if not name:
|
|
308
|
+
name = generate_unique_name(self.name)
|
|
309
|
+
|
|
310
|
+
from pyedb.dotnet.edb_core.edb_data.terminals import PinGroupTerminal
|
|
311
|
+
|
|
312
|
+
term = PinGroupTerminal(self._pedb)
|
|
313
|
+
|
|
314
|
+
term = term.create(name, self.net_name, self.name)
|
|
315
|
+
return term
|
|
316
|
+
|
|
317
|
+
@pyedb_function_handler()
|
|
318
|
+
def _json_format(self):
|
|
319
|
+
dict_out = {"component": self.component,
|
|
320
|
+
"name": self.name, "net": self.net,
|
|
321
|
+
"node_type": self.node_type}
|
|
322
|
+
return dict_out
|
|
323
|
+
|
|
324
|
+
@pyedb_function_handler()
|
|
325
|
+
def create_current_source_terminal(self, magnitude=1, phase=0):
|
|
326
|
+
terminal = self._create_terminal()._edb_object
|
|
327
|
+
terminal.SetBoundaryType(self._pedb.edb_api.cell.terminal.BoundaryType.kCurrentSource)
|
|
328
|
+
terminal.SetSourceAmplitude(self._pedb.edb_value(magnitude))
|
|
329
|
+
terminal.SetSourcePhase(self._pedb.edb_api.utility.value(phase))
|
|
330
|
+
return terminal
|
|
331
|
+
|
|
332
|
+
@pyedb_function_handler()
|
|
333
|
+
def create_voltage_source_terminal(self, magnitude=1, phase=0, impedance=0.001):
|
|
334
|
+
terminal = self._create_terminal()._edb_object
|
|
335
|
+
terminal.SetBoundaryType(self._pedb.edb_api.cell.terminal.BoundaryType.kVoltageSource)
|
|
336
|
+
terminal.SetSourceAmplitude(self._pedb.edb_value(magnitude))
|
|
337
|
+
terminal.SetSourcePhase(self._pedb.edb_api.utility.value(phase))
|
|
338
|
+
terminal.SetImpedance(self._pedb.edb_value(impedance))
|
|
339
|
+
return terminal
|
|
340
|
+
|
|
341
|
+
@pyedb_function_handler()
|
|
342
|
+
def create_voltage_probe_terminal(self, impedance=1000000):
|
|
343
|
+
terminal = self._create_terminal()._edb_object
|
|
344
|
+
terminal.SetBoundaryType(self._pedb.edb_api.cell.terminal.BoundaryType.kVoltageProbe)
|
|
345
|
+
terminal.SetImpedance(self._pedb.edb_value(impedance))
|
|
346
|
+
return terminal
|
|
347
|
+
|
|
348
|
+
@pyedb_function_handler()
|
|
349
|
+
def create_port_terminal(self, impedance=50):
|
|
350
|
+
terminal = self._create_terminal()._edb_object
|
|
351
|
+
terminal.SetBoundaryType(self._pedb.edb_api.cell.terminal.BoundaryType.PortBoundary)
|
|
352
|
+
terminal.SetImpedance(self._pedb.edb_value(impedance))
|
|
353
|
+
terminal.SetIsCircuitPort(True)
|
|
354
|
+
return terminal
|
|
355
|
+
|
|
356
|
+
@pyedb_function_handler()
|
|
357
|
+
def delete(self):
|
|
358
|
+
"""Delete active pin group.
|
|
359
|
+
|
|
360
|
+
Returns
|
|
361
|
+
-------
|
|
362
|
+
bool
|
|
363
|
+
|
|
364
|
+
"""
|
|
365
|
+
terminals = self._edb_pin_group.GetPinGroupTerminal()
|
|
366
|
+
self._edb_pin_group.Delete()
|
|
367
|
+
terminals.Delete()
|
|
368
|
+
return True
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
class CircuitPort(Source, object):
|
|
372
|
+
"""Manages a circuit port."""
|
|
373
|
+
|
|
374
|
+
def __init__(self, impedance="50"):
|
|
375
|
+
self._impedance = impedance
|
|
376
|
+
Source.__init__(self)
|
|
377
|
+
self._source_type = SourceType.CircPort
|
|
378
|
+
|
|
379
|
+
@property
|
|
380
|
+
def impedance(self):
|
|
381
|
+
"""Impedance."""
|
|
382
|
+
return self._impedance
|
|
383
|
+
|
|
384
|
+
@impedance.setter
|
|
385
|
+
def impedance(self, value):
|
|
386
|
+
self._impedance = value
|
|
387
|
+
|
|
388
|
+
@property
|
|
389
|
+
def get_type(self):
|
|
390
|
+
"""Get type."""
|
|
391
|
+
return self._source_type
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
class VoltageSource(Source):
|
|
395
|
+
"""Manages a voltage source."""
|
|
396
|
+
|
|
397
|
+
def __init__(self):
|
|
398
|
+
super(VoltageSource, self).__init__()
|
|
399
|
+
self._magnitude = "1V"
|
|
400
|
+
self._phase = "0Deg"
|
|
401
|
+
self._impedance = "0.05"
|
|
402
|
+
self._source_type = SourceType.Vsource
|
|
403
|
+
|
|
404
|
+
@property
|
|
405
|
+
def magnitude(self):
|
|
406
|
+
"""Magnitude."""
|
|
407
|
+
return self._magnitude
|
|
408
|
+
|
|
409
|
+
@magnitude.setter
|
|
410
|
+
def magnitude(self, value):
|
|
411
|
+
self._magnitude = value
|
|
412
|
+
|
|
413
|
+
@property
|
|
414
|
+
def phase(self):
|
|
415
|
+
"""Phase."""
|
|
416
|
+
return self._phase
|
|
417
|
+
|
|
418
|
+
@phase.setter
|
|
419
|
+
def phase(self, value):
|
|
420
|
+
self._phase = value
|
|
421
|
+
|
|
422
|
+
@property
|
|
423
|
+
def impedance(self):
|
|
424
|
+
"""Impedance."""
|
|
425
|
+
return self._impedance
|
|
426
|
+
|
|
427
|
+
@impedance.setter
|
|
428
|
+
def impedance(self, value):
|
|
429
|
+
self._impedance = value
|
|
430
|
+
|
|
431
|
+
@property
|
|
432
|
+
def source_type(self):
|
|
433
|
+
"""Source type."""
|
|
434
|
+
return self._source_type
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
class CurrentSource(Source):
|
|
438
|
+
"""Manages a current source."""
|
|
439
|
+
|
|
440
|
+
def __init__(self):
|
|
441
|
+
super(CurrentSource, self).__init__()
|
|
442
|
+
self._magnitude = "0.1A"
|
|
443
|
+
self._phase = "0Deg"
|
|
444
|
+
self._impedance = "1e7"
|
|
445
|
+
self._source_type = SourceType.Isource
|
|
446
|
+
|
|
447
|
+
@property
|
|
448
|
+
def magnitude(self):
|
|
449
|
+
"""Magnitude."""
|
|
450
|
+
return self._magnitude
|
|
451
|
+
|
|
452
|
+
@magnitude.setter
|
|
453
|
+
def magnitude(self, value):
|
|
454
|
+
self._magnitude = value
|
|
455
|
+
|
|
456
|
+
@property
|
|
457
|
+
def phase(self):
|
|
458
|
+
"""Phase."""
|
|
459
|
+
return self._phase
|
|
460
|
+
|
|
461
|
+
@phase.setter
|
|
462
|
+
def phase(self, value):
|
|
463
|
+
self._phase = value
|
|
464
|
+
|
|
465
|
+
@property
|
|
466
|
+
def impedance(self):
|
|
467
|
+
"""Impedance."""
|
|
468
|
+
return self._impedance
|
|
469
|
+
|
|
470
|
+
@impedance.setter
|
|
471
|
+
def impedance(self, value):
|
|
472
|
+
self._impedance = value
|
|
473
|
+
|
|
474
|
+
@property
|
|
475
|
+
def source_type(self):
|
|
476
|
+
"""Source type."""
|
|
477
|
+
return self._source_type
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
class DCTerminal(Source):
|
|
481
|
+
"""Manages a dc terminal source."""
|
|
482
|
+
|
|
483
|
+
def __init__(self):
|
|
484
|
+
super(DCTerminal, self).__init__()
|
|
485
|
+
|
|
486
|
+
self._source_type = SourceType.DcTerminal
|
|
487
|
+
|
|
488
|
+
@property
|
|
489
|
+
def source_type(self):
|
|
490
|
+
"""Source type."""
|
|
491
|
+
return self._source_type
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
class ResistorSource(Source):
|
|
495
|
+
"""Manages a resistor source."""
|
|
496
|
+
|
|
497
|
+
def __init__(self):
|
|
498
|
+
super(ResistorSource, self).__init__()
|
|
499
|
+
self._rvalue = "50"
|
|
500
|
+
self._source_type = SourceType.Rlc
|
|
501
|
+
|
|
502
|
+
@property
|
|
503
|
+
def rvalue(self):
|
|
504
|
+
"""Resistance value."""
|
|
505
|
+
return self._rvalue
|
|
506
|
+
|
|
507
|
+
@rvalue.setter
|
|
508
|
+
def rvalue(self, value):
|
|
509
|
+
self._rvalue = value
|
|
510
|
+
|
|
511
|
+
@property
|
|
512
|
+
def source_type(self):
|
|
513
|
+
"""Source type."""
|
|
514
|
+
return self._source_type
|