pyedb 0.53.0__py3-none-any.whl → 0.54.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/configuration/cfg_ports_sources.py +6 -8
- pyedb/configuration/configuration.py +2 -1
- pyedb/dotnet/database/cell/hierarchy/model.py +1 -1
- pyedb/dotnet/database/cell/layout.py +1 -1
- pyedb/dotnet/database/cell/layout_obj.py +3 -3
- pyedb/dotnet/database/cell/primitive/path.py +1 -1
- pyedb/dotnet/database/cell/primitive/primitive.py +8 -8
- pyedb/dotnet/database/cell/terminal/pingroup_terminal.py +1 -1
- pyedb/dotnet/database/cell/terminal/point_terminal.py +1 -1
- pyedb/dotnet/database/cell/terminal/terminal.py +24 -26
- pyedb/dotnet/database/components.py +24 -24
- pyedb/dotnet/database/definition/component_def.py +3 -3
- pyedb/dotnet/database/definition/component_model.py +1 -1
- pyedb/dotnet/database/definition/package_def.py +1 -1
- pyedb/dotnet/database/dotnet/database.py +43 -38
- pyedb/dotnet/database/dotnet/primitive.py +16 -16
- pyedb/dotnet/database/edb_data/hfss_extent_info.py +6 -6
- pyedb/dotnet/database/edb_data/layer_data.py +14 -14
- pyedb/dotnet/database/edb_data/padstacks_data.py +12 -12
- pyedb/dotnet/database/edb_data/primitives_data.py +3 -3
- pyedb/dotnet/database/edb_data/sources.py +6 -6
- pyedb/dotnet/database/edb_data/variables.py +7 -3
- pyedb/dotnet/database/geometry/point_data.py +1 -1
- pyedb/dotnet/database/geometry/polygon_data.py +2 -4
- pyedb/dotnet/database/hfss.py +7 -7
- pyedb/dotnet/database/materials.py +2 -2
- pyedb/dotnet/database/modeler.py +8 -11
- pyedb/dotnet/database/nets.py +1 -1
- pyedb/dotnet/database/padstack.py +72 -1
- pyedb/dotnet/database/sim_setup_data/data/settings.py +24 -0
- pyedb/dotnet/database/sim_setup_data/io/siwave.py +26 -1
- pyedb/dotnet/database/siwave.py +5 -5
- pyedb/dotnet/database/stackup.py +74 -77
- pyedb/dotnet/database/utilities/heatsink.py +4 -4
- pyedb/dotnet/database/utilities/obj_base.py +1 -1
- pyedb/dotnet/database/utilities/value.py +116 -0
- pyedb/dotnet/edb.py +43 -43
- pyedb/generic/design_types.py +12 -3
- pyedb/grpc/__init__.py +0 -0
- pyedb/grpc/database/components.py +53 -17
- pyedb/grpc/database/definition/materials.py +23 -30
- pyedb/grpc/database/definition/package_def.py +15 -15
- pyedb/grpc/database/definition/padstack_def.py +51 -51
- pyedb/grpc/database/geometry/arc_data.py +7 -5
- pyedb/grpc/database/geometry/point_3d_data.py +8 -7
- pyedb/grpc/database/geometry/polygon_data.py +3 -2
- pyedb/grpc/database/hierarchy/component.py +43 -38
- pyedb/grpc/database/hierarchy/pin_pair_model.py +15 -14
- pyedb/grpc/database/hierarchy/pingroup.py +9 -9
- pyedb/grpc/database/layers/stackup_layer.py +45 -44
- pyedb/grpc/database/layout/layout.py +9 -8
- pyedb/grpc/database/layout/voltage_regulator.py +7 -7
- pyedb/grpc/database/layout_validation.py +13 -12
- pyedb/grpc/database/modeler.py +51 -54
- pyedb/grpc/database/nets.py +42 -31
- pyedb/grpc/database/padstacks.py +270 -175
- pyedb/grpc/database/ports/ports.py +5 -6
- pyedb/grpc/database/primitive/bondwire.py +8 -7
- pyedb/grpc/database/primitive/circle.py +4 -4
- pyedb/grpc/database/primitive/padstack_instance.py +18 -18
- pyedb/grpc/database/primitive/path.py +7 -7
- pyedb/grpc/database/primitive/polygon.py +3 -3
- pyedb/grpc/database/primitive/primitive.py +13 -17
- pyedb/grpc/database/primitive/rectangle.py +13 -13
- pyedb/grpc/database/simulation_setup/hfss_general_settings.py +1 -1
- pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +10 -0
- pyedb/grpc/database/simulation_setup/siwave_simulation_setup.py +17 -1
- pyedb/grpc/database/siwave.py +30 -24
- pyedb/grpc/database/source_excitations.py +333 -229
- pyedb/grpc/database/stackup.py +164 -147
- pyedb/grpc/database/terminal/bundle_terminal.py +17 -7
- pyedb/grpc/database/terminal/edge_terminal.py +10 -0
- pyedb/grpc/database/terminal/padstack_instance_terminal.py +15 -4
- pyedb/grpc/database/terminal/pingroup_terminal.py +11 -10
- pyedb/grpc/database/terminal/point_terminal.py +4 -3
- pyedb/grpc/database/terminal/terminal.py +9 -9
- pyedb/grpc/database/utility/value.py +109 -0
- pyedb/grpc/edb.py +59 -38
- pyedb/grpc/edb_init.py +0 -7
- {pyedb-0.53.0.dist-info → pyedb-0.54.0.dist-info}/METADATA +3 -3
- {pyedb-0.53.0.dist-info → pyedb-0.54.0.dist-info}/RECORD +84 -81
- {pyedb-0.53.0.dist-info → pyedb-0.54.0.dist-info}/WHEEL +0 -0
- {pyedb-0.53.0.dist-info → pyedb-0.54.0.dist-info}/licenses/LICENSE +0 -0
pyedb/__init__.py
CHANGED
|
@@ -58,7 +58,7 @@ class CfgTerminalInfo(CfgBase):
|
|
|
58
58
|
self.contact_type = kwargs.get("contact_type", "default") # options are full, center, quad, inline
|
|
59
59
|
contact_radius = "0.1mm" if kwargs.get("contact_radius") is None else kwargs.get("contact_radius")
|
|
60
60
|
|
|
61
|
-
self.contact_radius = self._pedb.
|
|
61
|
+
self.contact_radius = self._pedb.value(contact_radius)
|
|
62
62
|
self.num_of_contact = kwargs.get("num_of_contact", 4)
|
|
63
63
|
self.contact_expansion = kwargs.get("contact_expansion", 1)
|
|
64
64
|
|
|
@@ -678,11 +678,9 @@ class CfgEdgePort:
|
|
|
678
678
|
def set_parameters_to_edb(self):
|
|
679
679
|
point_on_edge = PointData(self._pedb, x=self.point_on_edge[0], y=self.point_on_edge[1])
|
|
680
680
|
primitive = self._pedb.layout.primitives_by_aedt_name[self.primitive_name]
|
|
681
|
-
pos_edge = self._pedb.
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
pos_edge = convert_py_list_to_net_list(pos_edge, self._pedb.edb_api.cell.terminal.Edge)
|
|
685
|
-
edge_term = self._pedb.edb_api.cell.terminal.EdgeTerminal.Create(
|
|
681
|
+
pos_edge = self._pedb.core.cell.terminal.PrimitiveEdge.Create(primitive._edb_object, point_on_edge._edb_object)
|
|
682
|
+
pos_edge = convert_py_list_to_net_list(pos_edge, self._pedb.core.cell.terminal.Edge)
|
|
683
|
+
edge_term = self._pedb.core.cell.terminal.EdgeTerminal.Create(
|
|
686
684
|
primitive._edb_object.GetLayout(),
|
|
687
685
|
primitive._edb_object.GetNet(),
|
|
688
686
|
self.name,
|
|
@@ -755,9 +753,9 @@ class CfgDiffWavePort:
|
|
|
755
753
|
pos_term = self.positive_port.set_parameters_to_edb()
|
|
756
754
|
neg_term = self.negative_port.set_parameters_to_edb()
|
|
757
755
|
edb_list = convert_py_list_to_net_list(
|
|
758
|
-
[pos_term._edb_object, neg_term._edb_object], self._pedb.
|
|
756
|
+
[pos_term._edb_object, neg_term._edb_object], self._pedb.core.cell.terminal.Terminal
|
|
759
757
|
)
|
|
760
|
-
_edb_boundle_terminal = self._pedb.
|
|
758
|
+
_edb_boundle_terminal = self._pedb.core.cell.terminal.BundleTerminal.Create(edb_list)
|
|
761
759
|
_edb_boundle_terminal.SetName(self.name)
|
|
762
760
|
pos, neg = list(_edb_boundle_terminal.GetTerminals())
|
|
763
761
|
pos.SetName(self.name + ":T1")
|
|
@@ -261,6 +261,7 @@ class Configuration:
|
|
|
261
261
|
|
|
262
262
|
def get_variables(self):
|
|
263
263
|
"""Retrieve variables from database."""
|
|
264
|
+
self.cfg_data.variables.variables = []
|
|
264
265
|
for name, obj in self._pedb.design_variables.items():
|
|
265
266
|
self.cfg_data.variables.add_variable(name, obj.value_string, obj.description)
|
|
266
267
|
for name, obj in self._pedb.project_variables.items():
|
|
@@ -422,7 +423,7 @@ class Configuration:
|
|
|
422
423
|
if kwargs.get("general", False):
|
|
423
424
|
data["general"] = self.cfg_data.general.get_data_from_db()
|
|
424
425
|
if kwargs.get("variables", False):
|
|
425
|
-
data
|
|
426
|
+
data.update(self.cfg_data.variables.model_dump(exclude_none=True))
|
|
426
427
|
if kwargs.get("stackup", False):
|
|
427
428
|
data["stackup"] = self.cfg_data.stackup.model_dump(exclude_none=True)
|
|
428
429
|
if kwargs.get("package_definitions", False):
|
|
@@ -28,7 +28,7 @@ class Model(ObjBase):
|
|
|
28
28
|
|
|
29
29
|
def __init__(self, pedb, edb_object):
|
|
30
30
|
super().__init__(pedb, edb_object)
|
|
31
|
-
self._model_type_mapping = {"PinPairModel": self._pedb.
|
|
31
|
+
self._model_type_mapping = {"PinPairModel": self._pedb.core.cell}
|
|
32
32
|
|
|
33
33
|
@property
|
|
34
34
|
def model_type(self):
|
|
@@ -102,7 +102,7 @@ class Layout(ObjBase):
|
|
|
102
102
|
|
|
103
103
|
@property
|
|
104
104
|
def _edb(self):
|
|
105
|
-
return self._pedb.
|
|
105
|
+
return self._pedb.core
|
|
106
106
|
|
|
107
107
|
def expanded_extent(self, nets, extent, expansion_factor, expansion_unitless, use_round_corner, num_increments):
|
|
108
108
|
"""Get an expanded polygon for the Nets collection.
|
|
@@ -38,7 +38,7 @@ class LayoutObj(ObjBase):
|
|
|
38
38
|
-------
|
|
39
39
|
Ansys.Ansoft.Edb
|
|
40
40
|
"""
|
|
41
|
-
return self._pedb.
|
|
41
|
+
return self._pedb.core
|
|
42
42
|
|
|
43
43
|
@property
|
|
44
44
|
def _layout_obj_instance(self):
|
|
@@ -48,12 +48,12 @@ class LayoutObj(ObjBase):
|
|
|
48
48
|
|
|
49
49
|
@property
|
|
50
50
|
def _edb_properties(self):
|
|
51
|
-
p = self._edb_object.GetProductSolverOption(self._edb.
|
|
51
|
+
p = self._edb_object.GetProductSolverOption(self._edb.core.ProductId.Designer, "HFSS")
|
|
52
52
|
return p
|
|
53
53
|
|
|
54
54
|
@_edb_properties.setter
|
|
55
55
|
def _edb_properties(self, value):
|
|
56
|
-
self._edb_object.SetProductSolverOption(self._edb.
|
|
56
|
+
self._edb_object.SetProductSolverOption(self._edb.core.ProductId.Designer, "HFSS", value)
|
|
57
57
|
|
|
58
58
|
@property
|
|
59
59
|
def _obj_type(self):
|
|
@@ -155,7 +155,7 @@ class Path(Primitive):
|
|
|
155
155
|
width = self.width
|
|
156
156
|
corner_style = self.corner_style
|
|
157
157
|
end_cap_style = self.get_end_cap_style()
|
|
158
|
-
cloned_path = self._app.
|
|
158
|
+
cloned_path = self._app.core.cell.primitive.path.create(
|
|
159
159
|
self._app.active_layout,
|
|
160
160
|
self.layer_name,
|
|
161
161
|
self.net,
|
|
@@ -264,10 +264,10 @@ class Primitive(Connectable):
|
|
|
264
264
|
"""
|
|
265
265
|
bbox = self.polygon_data._edb_object.GetBBox()
|
|
266
266
|
return [
|
|
267
|
-
round(bbox.Item1.X.ToDouble(),
|
|
268
|
-
round(bbox.Item1.Y.ToDouble(),
|
|
269
|
-
round(bbox.Item2.X.ToDouble(),
|
|
270
|
-
round(bbox.Item2.Y.ToDouble(),
|
|
267
|
+
round(bbox.Item1.X.ToDouble(), 9),
|
|
268
|
+
round(bbox.Item1.Y.ToDouble(), 9),
|
|
269
|
+
round(bbox.Item2.X.ToDouble(), 9),
|
|
270
|
+
round(bbox.Item2.Y.ToDouble(), 9),
|
|
271
271
|
]
|
|
272
272
|
|
|
273
273
|
def convert_to_polygon(self):
|
|
@@ -336,7 +336,7 @@ class Primitive(Connectable):
|
|
|
336
336
|
list of float
|
|
337
337
|
"""
|
|
338
338
|
if isinstance(point, (list, tuple)):
|
|
339
|
-
point = self._app.
|
|
339
|
+
point = self._app.core.geometry.point_data(self._app.edb_value(point[0]), self._app.edb_value(point[1]))
|
|
340
340
|
|
|
341
341
|
p0 = self.polygon_data._edb_object.GetClosestPoint(point)
|
|
342
342
|
return [p0.X.ToDouble(), p0.Y.ToDouble()]
|
|
@@ -540,7 +540,7 @@ class Primitive(Connectable):
|
|
|
540
540
|
-------
|
|
541
541
|
list of float
|
|
542
542
|
"""
|
|
543
|
-
if isinstance(point, self._app.
|
|
543
|
+
if isinstance(point, self._app.core.geometry.geometry.PointData):
|
|
544
544
|
point = [point.X.ToDouble(), point.Y.ToDouble()]
|
|
545
545
|
dist = 1e12
|
|
546
546
|
out = None
|
|
@@ -821,7 +821,7 @@ class Primitive(Connectable):
|
|
|
821
821
|
r"$end 'EM properties'\n"
|
|
822
822
|
)
|
|
823
823
|
|
|
824
|
-
pid = self._pedb.
|
|
824
|
+
pid = self._pedb.core.ProductId.Designer
|
|
825
825
|
_, p = self._edb_object.GetProductProperty(pid, 18, "")
|
|
826
826
|
if p:
|
|
827
827
|
return p
|
|
@@ -831,7 +831,7 @@ class Primitive(Connectable):
|
|
|
831
831
|
@_em_properties.setter
|
|
832
832
|
def _em_properties(self, em_prop):
|
|
833
833
|
"""Set EM properties"""
|
|
834
|
-
pid = self._pedb.
|
|
834
|
+
pid = self._pedb.core.ProductId.Designer
|
|
835
835
|
self._edb_object.SetProductProperty(pid, 18, em_prop)
|
|
836
836
|
|
|
837
837
|
@property
|
|
@@ -48,7 +48,7 @@ class PinGroupTerminal(Terminal):
|
|
|
48
48
|
:class:`pyedb.dotnet.database.edb_data.terminals.PinGroupTerminal`
|
|
49
49
|
"""
|
|
50
50
|
net_obj = self._pedb.layout.find_net_by_name(net_name)
|
|
51
|
-
term = self._pedb.
|
|
51
|
+
term = self._pedb.core.cell.terminal.PinGroupTerminal.Create(
|
|
52
52
|
self._pedb.active_layout,
|
|
53
53
|
net_obj._edb_object,
|
|
54
54
|
name,
|
|
@@ -50,7 +50,7 @@ class PointTerminal(Terminal):
|
|
|
50
50
|
-------
|
|
51
51
|
:class:`pyedb.dotnet.database.edb_data.terminals.PointTerminal`
|
|
52
52
|
"""
|
|
53
|
-
terminal = self._pedb.
|
|
53
|
+
terminal = self._pedb.core.cell.terminal.PointTerminal.Create(
|
|
54
54
|
self._pedb.active_layout,
|
|
55
55
|
self._pedb.layout.find_net_by_name(net)._edb_object,
|
|
56
56
|
name,
|
|
@@ -34,26 +34,26 @@ class Terminal(Connectable):
|
|
|
34
34
|
self._reference_object = None
|
|
35
35
|
|
|
36
36
|
self._boundary_type_mapping = {
|
|
37
|
-
"InvalidBoundary": self._pedb.
|
|
38
|
-
"PortBoundary": self._pedb.
|
|
39
|
-
"PecBoundary": self._pedb.
|
|
40
|
-
"RlcBoundary": self._pedb.
|
|
41
|
-
"kCurrentSource": self._pedb.
|
|
42
|
-
"kVoltageSource": self._pedb.
|
|
43
|
-
"kNexximGround": self._pedb.
|
|
44
|
-
"kNexximPort": self._pedb.
|
|
45
|
-
"kDcTerminal": self._pedb.
|
|
46
|
-
"kVoltageProbe": self._pedb.
|
|
37
|
+
"InvalidBoundary": self._pedb.core.cell.terminal.BoundaryType.InvalidBoundary,
|
|
38
|
+
"PortBoundary": self._pedb.core.cell.terminal.BoundaryType.PortBoundary,
|
|
39
|
+
"PecBoundary": self._pedb.core.cell.terminal.BoundaryType.PecBoundary,
|
|
40
|
+
"RlcBoundary": self._pedb.core.cell.terminal.BoundaryType.RlcBoundary,
|
|
41
|
+
"kCurrentSource": self._pedb.core.cell.terminal.BoundaryType.kCurrentSource,
|
|
42
|
+
"kVoltageSource": self._pedb.core.cell.terminal.BoundaryType.kVoltageSource,
|
|
43
|
+
"kNexximGround": self._pedb.core.cell.terminal.BoundaryType.kNexximGround,
|
|
44
|
+
"kNexximPort": self._pedb.core.cell.terminal.BoundaryType.kNexximPort,
|
|
45
|
+
"kDcTerminal": self._pedb.core.cell.terminal.BoundaryType.kDcTerminal,
|
|
46
|
+
"kVoltageProbe": self._pedb.core.cell.terminal.BoundaryType.kVoltageProbe,
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
self._terminal_type_mapping = {
|
|
50
|
-
"InvalidTerminal": self._pedb.
|
|
51
|
-
"EdgeTerminal": self._pedb.
|
|
52
|
-
"PointTerminal": self._pedb.
|
|
53
|
-
"TerminalInstanceTerminal": self._pedb.
|
|
54
|
-
"PadstackInstanceTerminal": self._pedb.
|
|
55
|
-
"BundleTerminal": self._pedb.
|
|
56
|
-
"PinGroupTerminal": self._pedb.
|
|
50
|
+
"InvalidTerminal": self._pedb.core.cell.terminal.TerminalType.InvalidTerminal,
|
|
51
|
+
"EdgeTerminal": self._pedb.core.cell.terminal.TerminalType.EdgeTerminal,
|
|
52
|
+
"PointTerminal": self._pedb.core.cell.terminal.TerminalType.PointTerminal,
|
|
53
|
+
"TerminalInstanceTerminal": self._pedb.core.cell.terminal.TerminalType.TerminalInstanceTerminal,
|
|
54
|
+
"PadstackInstanceTerminal": self._pedb.core.cell.terminal.TerminalType.PadstackInstanceTerminal,
|
|
55
|
+
"BundleTerminal": self._pedb.core.cell.terminal.TerminalType.BundleTerminal,
|
|
56
|
+
"PinGroupTerminal": self._pedb.core.cell.terminal.TerminalType.PinGroupTerminal,
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
@property
|
|
@@ -240,10 +240,10 @@ class Terminal(Connectable):
|
|
|
240
240
|
if not self._reference_object:
|
|
241
241
|
term = self._edb_object
|
|
242
242
|
|
|
243
|
-
if self.terminal_type == self._pedb.
|
|
243
|
+
if self.terminal_type == self._pedb.core.cell.terminal.TerminalType.EdgeTerminal:
|
|
244
244
|
edges = self._edb_object.GetEdges()
|
|
245
245
|
edgeType = edges[0].GetEdgeType()
|
|
246
|
-
if edgeType == self._pedb.
|
|
246
|
+
if edgeType == self._pedb.core.cell.terminal.EdgeType.PadEdge:
|
|
247
247
|
self._reference_object = self.get_pad_edge_terminal_reference_pin()
|
|
248
248
|
else:
|
|
249
249
|
self._reference_object = self.get_edge_terminal_reference_primitive()
|
|
@@ -304,16 +304,14 @@ class Terminal(Connectable):
|
|
|
304
304
|
"""
|
|
305
305
|
|
|
306
306
|
refTerm = self._edb_object.GetReferenceTerminal()
|
|
307
|
-
if self._edb_object.GetTerminalType() == self._pedb.
|
|
307
|
+
if self._edb_object.GetTerminalType() == self._pedb.core.cell.terminal.TerminalType.PinGroupTerminal:
|
|
308
308
|
padStackInstance = self._edb_object.GetPinGroup().GetPins()[0]
|
|
309
309
|
pingroup = refTerm.GetPinGroup()
|
|
310
310
|
refPinList = pingroup.GetPins()
|
|
311
311
|
return self._get_closest_pin(padStackInstance, refPinList, gnd_net_name_preference)
|
|
312
|
-
elif (
|
|
313
|
-
self._edb_object.GetTerminalType() == self._pedb.edb_api.cell.terminal.TerminalType.PadstackInstanceTerminal
|
|
314
|
-
):
|
|
312
|
+
elif self._edb_object.GetTerminalType() == self._pedb.core.cell.terminal.TerminalType.PadstackInstanceTerminal:
|
|
315
313
|
_, padStackInstance, _ = self._edb_object.GetParameters()
|
|
316
|
-
if refTerm.GetTerminalType() == self._pedb.
|
|
314
|
+
if refTerm.GetTerminalType() == self._pedb.core.cell.terminal.TerminalType.PinGroupTerminal:
|
|
317
315
|
pingroup = refTerm.GetPinGroup()
|
|
318
316
|
refPinList = pingroup.GetPins()
|
|
319
317
|
return self._get_closest_pin(padStackInstance, refPinList, gnd_net_name_preference)
|
|
@@ -339,7 +337,7 @@ class Terminal(Connectable):
|
|
|
339
337
|
_, _, point_data = edges[0].GetParameters()
|
|
340
338
|
X = point_data.X
|
|
341
339
|
Y = point_data.Y
|
|
342
|
-
shape_pd = self._pedb.
|
|
340
|
+
shape_pd = self._pedb.core.geometry.point_data(X, Y)
|
|
343
341
|
layer_name = ref_layer.GetName()
|
|
344
342
|
for primitive in self._pedb.layout.primitives:
|
|
345
343
|
if primitive.GetLayer().GetName() == layer_name or not layer_name:
|
|
@@ -361,7 +359,7 @@ class Terminal(Connectable):
|
|
|
361
359
|
_, point_data, layer = ref_term.GetParameters()
|
|
362
360
|
X = point_data.X
|
|
363
361
|
Y = point_data.Y
|
|
364
|
-
shape_pd = self._pedb.
|
|
362
|
+
shape_pd = self._pedb.core.geometry.point_data(X, Y)
|
|
365
363
|
layer_name = layer.GetName()
|
|
366
364
|
for primitive in self._pedb.layout.primitives:
|
|
367
365
|
if primitive.GetLayer().GetName() == layer_name:
|
|
@@ -125,7 +125,7 @@ class Components(object):
|
|
|
125
125
|
|
|
126
126
|
@property
|
|
127
127
|
def _edb(self):
|
|
128
|
-
return self._pedb.
|
|
128
|
+
return self._pedb.core
|
|
129
129
|
|
|
130
130
|
def _get_edb_value(self, value):
|
|
131
131
|
return self._pedb.edb_value(value)
|
|
@@ -496,7 +496,7 @@ class Components(object):
|
|
|
496
496
|
return cmp_list
|
|
497
497
|
|
|
498
498
|
def _get_edb_pin_from_pin_name(self, cmp, pin):
|
|
499
|
-
if not isinstance(cmp, self._pedb.
|
|
499
|
+
if not isinstance(cmp, self._pedb.core.cell.hierarchy.component):
|
|
500
500
|
return False
|
|
501
501
|
if not isinstance(pin, str):
|
|
502
502
|
pin = pin.GetName()
|
|
@@ -619,7 +619,7 @@ class Components(object):
|
|
|
619
619
|
|
|
620
620
|
"""
|
|
621
621
|
if cmp is not None:
|
|
622
|
-
if not (isinstance(cmp, self._pedb.
|
|
622
|
+
if not (isinstance(cmp, self._pedb.core.cell.hierarchy.component)):
|
|
623
623
|
cmp = self.get_component_by_name(cmp)
|
|
624
624
|
cmp_prop = cmp.GetComponentProperty().Clone()
|
|
625
625
|
return cmp_prop.GetSolderBallProperty().GetHeight()
|
|
@@ -1316,7 +1316,7 @@ class Components(object):
|
|
|
1316
1316
|
pins = self.get_pin_from_component(component.refdes)
|
|
1317
1317
|
if len(pins) == 2: # pragma: no cover
|
|
1318
1318
|
pin_layers = self._padstack._get_pin_layer_range(pins[0])
|
|
1319
|
-
pos_pin_term = self._pedb.
|
|
1319
|
+
pos_pin_term = self._pedb.core.cell.terminal.PadstackInstanceTerminal.Create(
|
|
1320
1320
|
self._active_layout,
|
|
1321
1321
|
pins[0].net._edb_object,
|
|
1322
1322
|
f"{component.refdes}_{pins[0]._edb_object.GetName()}",
|
|
@@ -1326,7 +1326,7 @@ class Components(object):
|
|
|
1326
1326
|
)
|
|
1327
1327
|
if not pos_pin_term: # pragma: no cover
|
|
1328
1328
|
return False
|
|
1329
|
-
neg_pin_term = self._pedb.
|
|
1329
|
+
neg_pin_term = self._pedb.core.cell.terminal.PadstackInstanceTerminal.Create(
|
|
1330
1330
|
self._active_layout,
|
|
1331
1331
|
pins[1].net._edb_object,
|
|
1332
1332
|
f"{component.refdes}_{pins[1]._edb_object.GetName()}_ref",
|
|
@@ -1337,11 +1337,11 @@ class Components(object):
|
|
|
1337
1337
|
if not neg_pin_term: # pragma: no cover
|
|
1338
1338
|
return False
|
|
1339
1339
|
if pec_boundary:
|
|
1340
|
-
pos_pin_term.SetBoundaryType(self._pedb.
|
|
1341
|
-
neg_pin_term.SetBoundaryType(self._pedb.
|
|
1340
|
+
pos_pin_term.SetBoundaryType(self._pedb.core.cell.terminal.BoundaryType.PecBoundary)
|
|
1341
|
+
neg_pin_term.SetBoundaryType(self._pedb.core.cell.terminal.BoundaryType.PecBoundary)
|
|
1342
1342
|
else:
|
|
1343
|
-
pos_pin_term.SetBoundaryType(self._pedb.
|
|
1344
|
-
neg_pin_term.SetBoundaryType(self._pedb.
|
|
1343
|
+
pos_pin_term.SetBoundaryType(self._pedb.core.cell.terminal.BoundaryType.PortBoundary)
|
|
1344
|
+
neg_pin_term.SetBoundaryType(self._pedb.core.cell.terminal.BoundaryType.PortBoundary)
|
|
1345
1345
|
pos_pin_term.SetName(component.refdes)
|
|
1346
1346
|
pos_pin_term.SetReferenceTerminal(neg_pin_term)
|
|
1347
1347
|
if circuit_ports and not pec_boundary:
|
|
@@ -1382,7 +1382,7 @@ class Components(object):
|
|
|
1382
1382
|
pins = self.get_pin_from_component(component.refdes)
|
|
1383
1383
|
if len(pins) == 2: # pragma: no cover
|
|
1384
1384
|
pin_layer = self._padstack._get_pin_layer_range(pins[0])[0]
|
|
1385
|
-
pos_pin_term = self._pedb.
|
|
1385
|
+
pos_pin_term = self._pedb.core.cell.terminal.PadstackInstanceTerminal.Create(
|
|
1386
1386
|
self._active_layout,
|
|
1387
1387
|
pins[0]._edb_object.GetNet(),
|
|
1388
1388
|
f"{component.refdes}_{pins[0]._edb_object.GetName()}",
|
|
@@ -1392,7 +1392,7 @@ class Components(object):
|
|
|
1392
1392
|
)
|
|
1393
1393
|
if not pos_pin_term: # pragma: no cover
|
|
1394
1394
|
return False
|
|
1395
|
-
neg_pin_term = self._pedb.
|
|
1395
|
+
neg_pin_term = self._pedb.core.cell.terminal.PadstackInstanceTerminal.Create(
|
|
1396
1396
|
self._active_layout,
|
|
1397
1397
|
pins[1]._edb_object.GetNet(),
|
|
1398
1398
|
f"{component.refdes}_{pins[1]._edb_object.GetName()}_ref",
|
|
@@ -1402,13 +1402,13 @@ class Components(object):
|
|
|
1402
1402
|
)
|
|
1403
1403
|
if not neg_pin_term: # pragma: no cover
|
|
1404
1404
|
return False
|
|
1405
|
-
pos_pin_term.SetBoundaryType(self._pedb.
|
|
1405
|
+
pos_pin_term.SetBoundaryType(self._pedb.core.cell.terminal.BoundaryType.RlcBoundary)
|
|
1406
1406
|
if not circuit_type:
|
|
1407
1407
|
pos_pin_term.SetIsCircuitPort(False)
|
|
1408
1408
|
else:
|
|
1409
1409
|
pos_pin_term.SetIsCircuitPort(True)
|
|
1410
1410
|
pos_pin_term.SetName(component.refdes)
|
|
1411
|
-
neg_pin_term.SetBoundaryType(self._pedb.
|
|
1411
|
+
neg_pin_term.SetBoundaryType(self._pedb.core.cell.terminal.BoundaryType.RlcBoundary)
|
|
1412
1412
|
if not circuit_type:
|
|
1413
1413
|
neg_pin_term.SetIsCircuitPort(False)
|
|
1414
1414
|
else:
|
|
@@ -1488,9 +1488,9 @@ class Components(object):
|
|
|
1488
1488
|
return False
|
|
1489
1489
|
|
|
1490
1490
|
def _getComponentDefinition(self, name, pins):
|
|
1491
|
-
componentDefinition = self._pedb.
|
|
1491
|
+
componentDefinition = self._pedb.core.definition.ComponentDef.FindByName(self._db, name)
|
|
1492
1492
|
if componentDefinition.IsNull():
|
|
1493
|
-
componentDefinition = self._pedb.
|
|
1493
|
+
componentDefinition = self._pedb.core.definition.ComponentDef.Create(self._db, name, None)
|
|
1494
1494
|
if componentDefinition.IsNull():
|
|
1495
1495
|
self._logger.error("Failed to create component definition {}".format(name))
|
|
1496
1496
|
return None
|
|
@@ -1499,7 +1499,7 @@ class Components(object):
|
|
|
1499
1499
|
if not pin.GetName():
|
|
1500
1500
|
pin.SetName(str(ind))
|
|
1501
1501
|
ind += 1
|
|
1502
|
-
componentDefinitionPin = self._pedb.
|
|
1502
|
+
componentDefinitionPin = self._pedb.core.definition.ComponentDefPin.Create(
|
|
1503
1503
|
componentDefinition, pin.GetName()
|
|
1504
1504
|
)
|
|
1505
1505
|
if componentDefinitionPin.IsNull():
|
|
@@ -1614,7 +1614,7 @@ class Components(object):
|
|
|
1614
1614
|
compdef = self._getComponentDefinition(component_name, pins)
|
|
1615
1615
|
if not compdef:
|
|
1616
1616
|
return False
|
|
1617
|
-
new_cmp = self._pedb.
|
|
1617
|
+
new_cmp = self._pedb.core.cell.hierarchy.component.Create(
|
|
1618
1618
|
self._active_layout, component_name, compdef.GetName()
|
|
1619
1619
|
)
|
|
1620
1620
|
|
|
@@ -2053,7 +2053,7 @@ class Components(object):
|
|
|
2053
2053
|
>>> edbapp.components.set_solder_ball("A1")
|
|
2054
2054
|
|
|
2055
2055
|
"""
|
|
2056
|
-
if not isinstance(component, self._pedb.
|
|
2056
|
+
if not isinstance(component, self._pedb.core.cell.hierarchy.component):
|
|
2057
2057
|
edb_cmp = self.get_component_by_name(component)._edb_object
|
|
2058
2058
|
cmp = self.instances[component]
|
|
2059
2059
|
else: # pragma: no cover
|
|
@@ -2388,7 +2388,7 @@ class Components(object):
|
|
|
2388
2388
|
reference_designator : str
|
|
2389
2389
|
Reference designator of the component.
|
|
2390
2390
|
"""
|
|
2391
|
-
obj = self._pedb.
|
|
2391
|
+
obj = self._pedb.core.cell.hierarchy.component.FindByName(self._active_layout, reference_designator)
|
|
2392
2392
|
return EDBComponent(self._pedb, obj)
|
|
2393
2393
|
|
|
2394
2394
|
def get_pin_from_component(self, component, netName=None, pinName=None, net_name=None, pin_name=None):
|
|
@@ -2427,8 +2427,8 @@ class Components(object):
|
|
|
2427
2427
|
|
|
2428
2428
|
"""
|
|
2429
2429
|
warnings.warn("Use new property :func:`edb.padstacks.get_instances` instead.", DeprecationWarning)
|
|
2430
|
-
if not isinstance(component, self._pedb.
|
|
2431
|
-
component = self._pedb.
|
|
2430
|
+
if not isinstance(component, self._pedb.core.cell.hierarchy.component):
|
|
2431
|
+
component = self._pedb.core.cell.hierarchy.component.FindByName(self._active_layout, component)
|
|
2432
2432
|
if pinName:
|
|
2433
2433
|
warnings.warn("Use argument `pin_name` instead of `pinName`", DeprecationWarning)
|
|
2434
2434
|
if netName:
|
|
@@ -2490,7 +2490,7 @@ class Components(object):
|
|
|
2490
2490
|
if isinstance(pin, EDBPadstackInstance):
|
|
2491
2491
|
pin = pin._edb_padstackinstance
|
|
2492
2492
|
val = String("")
|
|
2493
|
-
_, name = pin.GetProductProperty(self._edb.
|
|
2493
|
+
_, name = pin.GetProductProperty(self._edb.core.ProductId.Designer, 11, val)
|
|
2494
2494
|
name = str(name).strip("'")
|
|
2495
2495
|
return name
|
|
2496
2496
|
|
|
@@ -2766,8 +2766,8 @@ class Components(object):
|
|
|
2766
2766
|
elif pars:
|
|
2767
2767
|
delta_pins.append(1.5 * pars[0])
|
|
2768
2768
|
w = min(pars[0], w)
|
|
2769
|
-
elif pad.polygon_data.
|
|
2770
|
-
bbox = pad.polygon_data.
|
|
2769
|
+
elif pad.polygon_data.core: # pragma: no cover
|
|
2770
|
+
bbox = pad.polygon_data.core.GetBBox()
|
|
2771
2771
|
lower = [bbox.Item1.X.ToDouble(), bbox.Item1.Y.ToDouble()]
|
|
2772
2772
|
upper = [bbox.Item2.X.ToDouble(), bbox.Item2.Y.ToDouble()]
|
|
2773
2773
|
pars = [abs(lower[0] - upper[0]), abs(lower[1] - upper[1])]
|
|
@@ -88,7 +88,7 @@ class EDBComponentDef(ObjBase):
|
|
|
88
88
|
|
|
89
89
|
comp_list = [
|
|
90
90
|
EDBComponent(self._pedb, l)
|
|
91
|
-
for l in self._pedb.
|
|
91
|
+
for l in self._pedb.core.cell.hierarchy.component.FindByComponentDef(
|
|
92
92
|
self._pedb.active_layout, self.part_name
|
|
93
93
|
)
|
|
94
94
|
]
|
|
@@ -194,9 +194,9 @@ class EDBComponentDef(ObjBase):
|
|
|
194
194
|
self._add_component_model(n_port_comp_model)
|
|
195
195
|
|
|
196
196
|
def create(self, name):
|
|
197
|
-
cell_type = self._pedb.
|
|
197
|
+
cell_type = self._pedb.core.cell.CellType.FootprintCell
|
|
198
198
|
footprint_cell = self._pedb._active_cell.cell.Create(self._pedb.active_db, cell_type, name)
|
|
199
|
-
edb_object = self._pedb.
|
|
199
|
+
edb_object = self._pedb.core.definition.ComponentDef.Create(self._pedb.active_db, name, footprint_cell)
|
|
200
200
|
return EDBComponentDef(self._pedb, edb_object)
|
|
201
201
|
|
|
202
202
|
def get_properties(self):
|
|
@@ -28,7 +28,7 @@ class ComponentModel(ObjBase):
|
|
|
28
28
|
|
|
29
29
|
def __init__(self, pedb, edb_object):
|
|
30
30
|
super().__init__(pedb, edb_object)
|
|
31
|
-
self._model_type_mapping = {"PinPairModel": self._pedb.
|
|
31
|
+
self._model_type_mapping = {"PinPairModel": self._pedb.core.cell}
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
class NPortComponentModel(ComponentModel):
|
|
@@ -62,7 +62,7 @@ class PackageDef(ObjBase):
|
|
|
62
62
|
edb_object: object
|
|
63
63
|
EDB PackageDef Object
|
|
64
64
|
"""
|
|
65
|
-
edb_object = self._pedb.
|
|
65
|
+
edb_object = self._pedb.core.definition.PackageDef.Create(self._pedb.active_db, name)
|
|
66
66
|
if component_part_name:
|
|
67
67
|
x_pt1, y_pt1, x_pt2, y_pt2 = list(
|
|
68
68
|
self._pedb.components.definitions[component_part_name].components.values()
|