pyedb 0.52.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_common.py +12 -15
- pyedb/configuration/cfg_data.py +2 -2
- pyedb/configuration/cfg_modeler.py +163 -234
- pyedb/configuration/cfg_ports_sources.py +6 -8
- pyedb/configuration/cfg_stackup.py +62 -249
- pyedb/configuration/configuration.py +272 -170
- 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 +33 -27
- 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 +47 -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 +17 -15
- 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 +19 -5
- pyedb/dotnet/database/stackup.py +80 -137
- pyedb/dotnet/database/utilities/heatsink.py +4 -4
- pyedb/dotnet/database/utilities/obj_base.py +1 -1
- pyedb/dotnet/database/utilities/simulation_setup.py +1 -1
- pyedb/dotnet/database/utilities/siwave_cpa_simulation_setup.py +894 -0
- pyedb/dotnet/database/utilities/siwave_simulation_setup.py +15 -0
- pyedb/dotnet/database/utilities/value.py +116 -0
- pyedb/dotnet/edb.py +58 -45
- pyedb/generic/design_types.py +39 -1
- pyedb/generic/grpc_warnings.py +5 -0
- pyedb/grpc/__init__.py +0 -0
- pyedb/grpc/database/components.py +155 -98
- pyedb/grpc/database/control_file.py +240 -193
- 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/definitions.py +7 -5
- 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 +156 -131
- 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_cpa_simulation_setup.py +961 -0
- pyedb/grpc/database/simulation_setup/siwave_simulation_setup.py +17 -1
- pyedb/grpc/database/siwave.py +44 -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 +129 -45
- pyedb/grpc/edb_init.py +0 -7
- pyedb/siwave_core/cpa/simulation_setup_data_model.py +132 -0
- pyedb/siwave_core/product_properties.py +198 -0
- {pyedb-0.52.0.dist-info → pyedb-0.54.0.dist-info}/METADATA +15 -13
- {pyedb-0.52.0.dist-info → pyedb-0.54.0.dist-info}/RECORD +97 -89
- {pyedb-0.52.0.dist-info → pyedb-0.54.0.dist-info}/WHEEL +1 -1
- {pyedb-0.52.0.dist-info → pyedb-0.54.0.dist-info/licenses}/LICENSE +0 -0
|
@@ -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():
|
|
@@ -1597,9 +1597,15 @@ class Components(object):
|
|
|
1597
1597
|
>>> edbapp.components.create(pins, "A1New")
|
|
1598
1598
|
|
|
1599
1599
|
"""
|
|
1600
|
-
_pins = [
|
|
1601
|
-
|
|
1602
|
-
|
|
1600
|
+
_pins = []
|
|
1601
|
+
for p in pins:
|
|
1602
|
+
if isinstance(p, EDBPadstackInstance):
|
|
1603
|
+
_pins.append(p._edb_object)
|
|
1604
|
+
elif isinstance(p, str):
|
|
1605
|
+
_pins.append(self._pedb.padstacks.instances_by_name[p]._edb_object)
|
|
1606
|
+
else:
|
|
1607
|
+
_pins.append(p)
|
|
1608
|
+
pins = _pins
|
|
1603
1609
|
if not component_name:
|
|
1604
1610
|
component_name = generate_unique_name("Comp_")
|
|
1605
1611
|
if component_part_name:
|
|
@@ -1608,7 +1614,7 @@ class Components(object):
|
|
|
1608
1614
|
compdef = self._getComponentDefinition(component_name, pins)
|
|
1609
1615
|
if not compdef:
|
|
1610
1616
|
return False
|
|
1611
|
-
new_cmp = self._pedb.
|
|
1617
|
+
new_cmp = self._pedb.core.cell.hierarchy.component.Create(
|
|
1612
1618
|
self._active_layout, component_name, compdef.GetName()
|
|
1613
1619
|
)
|
|
1614
1620
|
|
|
@@ -2047,7 +2053,7 @@ class Components(object):
|
|
|
2047
2053
|
>>> edbapp.components.set_solder_ball("A1")
|
|
2048
2054
|
|
|
2049
2055
|
"""
|
|
2050
|
-
if not isinstance(component, self._pedb.
|
|
2056
|
+
if not isinstance(component, self._pedb.core.cell.hierarchy.component):
|
|
2051
2057
|
edb_cmp = self.get_component_by_name(component)._edb_object
|
|
2052
2058
|
cmp = self.instances[component]
|
|
2053
2059
|
else: # pragma: no cover
|
|
@@ -2382,7 +2388,7 @@ class Components(object):
|
|
|
2382
2388
|
reference_designator : str
|
|
2383
2389
|
Reference designator of the component.
|
|
2384
2390
|
"""
|
|
2385
|
-
obj = self._pedb.
|
|
2391
|
+
obj = self._pedb.core.cell.hierarchy.component.FindByName(self._active_layout, reference_designator)
|
|
2386
2392
|
return EDBComponent(self._pedb, obj)
|
|
2387
2393
|
|
|
2388
2394
|
def get_pin_from_component(self, component, netName=None, pinName=None, net_name=None, pin_name=None):
|
|
@@ -2421,8 +2427,8 @@ class Components(object):
|
|
|
2421
2427
|
|
|
2422
2428
|
"""
|
|
2423
2429
|
warnings.warn("Use new property :func:`edb.padstacks.get_instances` instead.", DeprecationWarning)
|
|
2424
|
-
if not isinstance(component, self._pedb.
|
|
2425
|
-
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)
|
|
2426
2432
|
if pinName:
|
|
2427
2433
|
warnings.warn("Use argument `pin_name` instead of `pinName`", DeprecationWarning)
|
|
2428
2434
|
if netName:
|
|
@@ -2484,7 +2490,7 @@ class Components(object):
|
|
|
2484
2490
|
if isinstance(pin, EDBPadstackInstance):
|
|
2485
2491
|
pin = pin._edb_padstackinstance
|
|
2486
2492
|
val = String("")
|
|
2487
|
-
_, name = pin.GetProductProperty(self._edb.
|
|
2493
|
+
_, name = pin.GetProductProperty(self._edb.core.ProductId.Designer, 11, val)
|
|
2488
2494
|
name = str(name).strip("'")
|
|
2489
2495
|
return name
|
|
2490
2496
|
|
|
@@ -2760,8 +2766,8 @@ class Components(object):
|
|
|
2760
2766
|
elif pars:
|
|
2761
2767
|
delta_pins.append(1.5 * pars[0])
|
|
2762
2768
|
w = min(pars[0], w)
|
|
2763
|
-
elif pad.polygon_data.
|
|
2764
|
-
bbox = pad.polygon_data.
|
|
2769
|
+
elif pad.polygon_data.core: # pragma: no cover
|
|
2770
|
+
bbox = pad.polygon_data.core.GetBBox()
|
|
2765
2771
|
lower = [bbox.Item1.X.ToDouble(), bbox.Item1.Y.ToDouble()]
|
|
2766
2772
|
upper = [bbox.Item2.X.ToDouble(), bbox.Item2.Y.ToDouble()]
|
|
2767
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()
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
import os
|
|
25
25
|
import re
|
|
26
26
|
import sys
|
|
27
|
+
import warnings
|
|
27
28
|
|
|
28
29
|
from pyedb import __version__
|
|
29
30
|
from pyedb.dotnet.database.general import convert_py_list_to_net_list
|
|
@@ -34,7 +35,7 @@ from pyedb.generic.general_methods import (
|
|
|
34
35
|
is_linux,
|
|
35
36
|
settings,
|
|
36
37
|
)
|
|
37
|
-
from pyedb.
|
|
38
|
+
from pyedb.generic.grpc_warnings import GRPC_GENERAL_WARNING
|
|
38
39
|
|
|
39
40
|
|
|
40
41
|
class HierarchyDotNet:
|
|
@@ -51,8 +52,8 @@ class HierarchyDotNet:
|
|
|
51
52
|
|
|
52
53
|
def __init__(self, app):
|
|
53
54
|
self._app = app
|
|
54
|
-
self.
|
|
55
|
-
self._hierarchy = self.
|
|
55
|
+
self.core = self._app._edb
|
|
56
|
+
self._hierarchy = self.core.Cell.Hierarchy
|
|
56
57
|
|
|
57
58
|
@property
|
|
58
59
|
def api_class(self): # pragma: no cover
|
|
@@ -89,8 +90,8 @@ class PolygonDataDotNet: # pragma: no cover
|
|
|
89
90
|
|
|
90
91
|
def __init__(self, pedb, api_object=None):
|
|
91
92
|
self._pedb = pedb
|
|
92
|
-
self.dotnetobj = pedb.
|
|
93
|
-
self.
|
|
93
|
+
self.dotnetobj = pedb.core.geometry.api_class.PolygonData
|
|
94
|
+
self.core = api_object
|
|
94
95
|
self._edb_object = api_object
|
|
95
96
|
|
|
96
97
|
@property
|
|
@@ -101,7 +102,7 @@ class PolygonDataDotNet: # pragma: no cover
|
|
|
101
102
|
@property
|
|
102
103
|
def arcs(self): # pragma: no cover
|
|
103
104
|
"""List of Edb.Geometry.ArcData."""
|
|
104
|
-
return list(self.
|
|
105
|
+
return list(self.core.GetArcData())
|
|
105
106
|
|
|
106
107
|
def add_point(self, x, y, incremental=False):
|
|
107
108
|
"""Add a point at the end of the point list of the polygon.
|
|
@@ -127,7 +128,7 @@ class PolygonDataDotNet: # pragma: no cover
|
|
|
127
128
|
last_point = self.get_points()[-1]
|
|
128
129
|
x = "({})+({})".format(x, last_point[0].ToString())
|
|
129
130
|
y = "({})+({})".format(y, last_point[1].ToString())
|
|
130
|
-
return self.
|
|
131
|
+
return self.core.AddPoint(GeometryDotNet(self._pedb).point_data(x, y))
|
|
131
132
|
|
|
132
133
|
def get_bbox_of_boxes(self, points):
|
|
133
134
|
"""Get the EDB .NET API ``Edb.Geometry.GetBBoxOfBoxes`` database.
|
|
@@ -160,9 +161,7 @@ class PolygonDataDotNet: # pragma: no cover
|
|
|
160
161
|
from pyedb.dotnet.clr_module import Tuple
|
|
161
162
|
|
|
162
163
|
if isinstance(points, (tuple, list)):
|
|
163
|
-
points = Tuple[self._pedb.
|
|
164
|
-
points[0], points[1]
|
|
165
|
-
)
|
|
164
|
+
points = Tuple[self._pedb.core.Geometry.PointData, self._pedb.core.Geometry.PointData](points[0], points[1])
|
|
166
165
|
return self.dotnetobj.CreateFromBBox(points)
|
|
167
166
|
|
|
168
167
|
def create_from_arcs(self, arcs, flag):
|
|
@@ -210,7 +209,7 @@ class NetDotNet:
|
|
|
210
209
|
def __init__(self, app, net_obj=None):
|
|
211
210
|
self.net = app._edb.Cell.Net
|
|
212
211
|
|
|
213
|
-
self.
|
|
212
|
+
self.core = app._edb
|
|
214
213
|
self._app = app
|
|
215
214
|
self.net_obj = net_obj
|
|
216
215
|
|
|
@@ -281,7 +280,7 @@ class NetClassDotNet:
|
|
|
281
280
|
def __init__(self, app, api_object=None):
|
|
282
281
|
self.cell_net_class = app._edb.Cell.NetClass
|
|
283
282
|
self.api_object = api_object
|
|
284
|
-
self.
|
|
283
|
+
self.core = app._edb
|
|
285
284
|
self._app = app
|
|
286
285
|
|
|
287
286
|
@property
|
|
@@ -317,7 +316,7 @@ class NetClassDotNet:
|
|
|
317
316
|
object
|
|
318
317
|
"""
|
|
319
318
|
if self.api_object:
|
|
320
|
-
edb_api_net = self.
|
|
319
|
+
edb_api_net = self.core.Cell.Net.FindByName(self._app.active_layout, name)
|
|
321
320
|
return self.api_object.AddNet(edb_api_net)
|
|
322
321
|
|
|
323
322
|
def delete(self): # pragma: no cover
|
|
@@ -377,8 +376,8 @@ class DifferentialPairDotNet(NetClassDotNet):
|
|
|
377
376
|
return DifferentialPairDotNet(self._app, self.cell_diff_pair.Create(self._app.active_layout, name))
|
|
378
377
|
|
|
379
378
|
def _api_set_differential_pair(self, net_name_p, net_name_n):
|
|
380
|
-
edb_api_net_p = self.
|
|
381
|
-
edb_api_net_n = self.
|
|
379
|
+
edb_api_net_p = self.core.Cell.Net.FindByName(self._app.active_layout, net_name_p)
|
|
380
|
+
edb_api_net_n = self.core.Cell.Net.FindByName(self._app.active_layout, net_name_n)
|
|
382
381
|
self.api_object.SetDifferentialPair(edb_api_net_p, edb_api_net_n)
|
|
383
382
|
|
|
384
383
|
@property
|
|
@@ -414,8 +413,8 @@ class CellClassDotNet:
|
|
|
414
413
|
|
|
415
414
|
def __init__(self, app, active_cell=None):
|
|
416
415
|
self._app = app
|
|
417
|
-
self.
|
|
418
|
-
self._cell = self.
|
|
416
|
+
self.core = app._edb
|
|
417
|
+
self._cell = self.core.Cell
|
|
419
418
|
self._active_cell = active_cell
|
|
420
419
|
|
|
421
420
|
@property
|
|
@@ -517,7 +516,7 @@ class UtilityDotNet:
|
|
|
517
516
|
def __init__(self, app):
|
|
518
517
|
self._app = app
|
|
519
518
|
self.utility = app._edb.Utility
|
|
520
|
-
self.
|
|
519
|
+
self.core = app._edb
|
|
521
520
|
self.active_db = app._db
|
|
522
521
|
self.active_cell = app._active_cell
|
|
523
522
|
|
|
@@ -565,7 +564,7 @@ class GeometryDotNet:
|
|
|
565
564
|
def __init__(self, app):
|
|
566
565
|
self._app = app
|
|
567
566
|
self.geometry = self._app._edb.Geometry
|
|
568
|
-
self.
|
|
567
|
+
self.core = self._app._edb
|
|
569
568
|
|
|
570
569
|
@property
|
|
571
570
|
def api_class(self):
|
|
@@ -646,29 +645,29 @@ class CellDotNet:
|
|
|
646
645
|
return super().__getattribute__(key)
|
|
647
646
|
except AttributeError:
|
|
648
647
|
try:
|
|
649
|
-
return getattr(self.
|
|
648
|
+
return getattr(self.core, key)
|
|
650
649
|
except AttributeError:
|
|
651
650
|
raise AttributeError("Attribute not present")
|
|
652
651
|
|
|
653
652
|
def __init__(self, app):
|
|
654
653
|
self._app = app
|
|
655
|
-
self.
|
|
654
|
+
self.core = app._edb
|
|
656
655
|
|
|
657
656
|
@property
|
|
658
657
|
def api_class(self):
|
|
659
658
|
"""Return Ansys.Ansoft.Edb class object."""
|
|
660
|
-
return self.
|
|
659
|
+
return self.core
|
|
661
660
|
|
|
662
661
|
@property
|
|
663
662
|
def definition(self):
|
|
664
663
|
"""Edb Dotnet Api Definition."""
|
|
665
664
|
|
|
666
|
-
return self.
|
|
665
|
+
return self.core.Definition
|
|
667
666
|
|
|
668
667
|
@property
|
|
669
668
|
def database(self):
|
|
670
669
|
"""Edb Dotnet Api Database."""
|
|
671
|
-
return self.
|
|
670
|
+
return self.core.Database
|
|
672
671
|
|
|
673
672
|
@property
|
|
674
673
|
def cell(self):
|
|
@@ -703,13 +702,10 @@ class EdbDotNet(object):
|
|
|
703
702
|
"""Edb Dot Net Class."""
|
|
704
703
|
|
|
705
704
|
def __init__(self, edbversion, student_version=False):
|
|
706
|
-
|
|
707
|
-
try:
|
|
708
|
-
edbversion = "20{}.{}".format(list_installed_ansysem()[0][-3:-1], list_installed_ansysem()[0][-1:])
|
|
709
|
-
self._logger.info("Edb version " + edbversion)
|
|
710
|
-
except IndexError:
|
|
711
|
-
raise Exception("No ANSYSEM_ROOTxxx is found.")
|
|
705
|
+
self._logger.info(f"Edb version {edbversion}")
|
|
712
706
|
self.edbversion = edbversion
|
|
707
|
+
if float(self.edbversion) >= 2025.2:
|
|
708
|
+
warnings.warn(GRPC_GENERAL_WARNING, UserWarning)
|
|
713
709
|
self.student_version = student_version
|
|
714
710
|
"""Initialize DLLs."""
|
|
715
711
|
from pyedb.dotnet.clr_module import _clr, edb_initialized
|
|
@@ -793,6 +789,19 @@ class EdbDotNet(object):
|
|
|
793
789
|
def edb_api(self):
|
|
794
790
|
"""Edb Dotnet Api class.
|
|
795
791
|
|
|
792
|
+
.. deprecated:: 0.54.0
|
|
793
|
+
Use :func:core` instead.
|
|
794
|
+
Returns
|
|
795
|
+
-------
|
|
796
|
+
:class:`pyedb.dotnet.database.dotnet.database.CellDotNet`
|
|
797
|
+
"""
|
|
798
|
+
warnings.warn("`edb_api` is deprecated, use `core` instead.", DeprecationWarning)
|
|
799
|
+
return CellDotNet(self)
|
|
800
|
+
|
|
801
|
+
@property
|
|
802
|
+
def core(self):
|
|
803
|
+
"""Edb Dotnet Api class.
|
|
804
|
+
|
|
796
805
|
Returns
|
|
797
806
|
-------
|
|
798
807
|
:class:`pyedb.dotnet.database.dotnet.database.CellDotNet`
|
|
@@ -802,12 +811,12 @@ class EdbDotNet(object):
|
|
|
802
811
|
@property
|
|
803
812
|
def database(self):
|
|
804
813
|
"""Edb Dotnet Api Database."""
|
|
805
|
-
return self.
|
|
814
|
+
return self.core.database
|
|
806
815
|
|
|
807
816
|
@property
|
|
808
817
|
def definition(self):
|
|
809
818
|
"""Edb Dotnet Api Database `Edb.Definition`."""
|
|
810
|
-
return self.
|
|
819
|
+
return self.core.Definition
|
|
811
820
|
|
|
812
821
|
|
|
813
822
|
class Database(EdbDotNet):
|
|
@@ -841,7 +850,7 @@ class Database(EdbDotNet):
|
|
|
841
850
|
flag : bool
|
|
842
851
|
Whether if Edb is run as standalone or embedded in AEDT.
|
|
843
852
|
"""
|
|
844
|
-
self.
|
|
853
|
+
self.core.database.SetRunAsStandAlone(flag)
|
|
845
854
|
|
|
846
855
|
def create(self, db_path):
|
|
847
856
|
"""Create a Database at the specified file location.
|
|
@@ -855,7 +864,7 @@ class Database(EdbDotNet):
|
|
|
855
864
|
-------
|
|
856
865
|
Database
|
|
857
866
|
"""
|
|
858
|
-
self._db = self.
|
|
867
|
+
self._db = self.core.database.Create(db_path)
|
|
859
868
|
return self._db
|
|
860
869
|
|
|
861
870
|
def open(self, db_path, read_only):
|
|
@@ -873,7 +882,7 @@ class Database(EdbDotNet):
|
|
|
873
882
|
Database or None
|
|
874
883
|
The opened Database object, or None if not found.
|
|
875
884
|
"""
|
|
876
|
-
self._db = self.
|
|
885
|
+
self._db = self.core.database.Open(
|
|
877
886
|
db_path,
|
|
878
887
|
read_only,
|
|
879
888
|
)
|
|
@@ -889,7 +898,7 @@ class Database(EdbDotNet):
|
|
|
889
898
|
db_path : str
|
|
890
899
|
Path to top-level database folder.
|
|
891
900
|
"""
|
|
892
|
-
return self.
|
|
901
|
+
return self.core.database.Delete(db_path)
|
|
893
902
|
|
|
894
903
|
def save(self):
|
|
895
904
|
"""Save any changes into a file."""
|
|
@@ -968,7 +977,7 @@ class Database(EdbDotNet):
|
|
|
968
977
|
Database
|
|
969
978
|
The Database or Null on failure.
|
|
970
979
|
"""
|
|
971
|
-
self.
|
|
980
|
+
self.core.database.FindById(db_id)
|
|
972
981
|
|
|
973
982
|
def save_as(self, path, version=""):
|
|
974
983
|
"""Save this Database to a new location and older EDB version.
|
|
@@ -1228,5 +1237,5 @@ class Database(EdbDotNet):
|
|
|
1228
1237
|
from pyedb.dotnet.clr_module import Convert
|
|
1229
1238
|
|
|
1230
1239
|
hdl = Convert.ToUInt64(hdb)
|
|
1231
|
-
self._db = self.
|
|
1240
|
+
self._db = self.core.database.Attach(hdl)
|
|
1232
1241
|
return self._db
|