pyedb 0.54.0__py3-none-any.whl → 0.55.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 -8
- pyedb/configuration/cfg_boundaries.py +69 -151
- pyedb/configuration/cfg_components.py +201 -460
- pyedb/configuration/cfg_data.py +4 -2
- pyedb/configuration/cfg_general.py +13 -36
- pyedb/configuration/cfg_modeler.py +2 -1
- pyedb/configuration/cfg_nets.py +21 -35
- pyedb/configuration/cfg_operations.py +22 -151
- pyedb/configuration/cfg_package_definition.py +56 -112
- pyedb/configuration/cfg_padstacks.py +292 -688
- pyedb/configuration/cfg_pin_groups.py +32 -79
- pyedb/configuration/cfg_ports_sources.py +19 -6
- pyedb/configuration/cfg_s_parameter_models.py +67 -172
- pyedb/configuration/cfg_setup.py +102 -295
- pyedb/configuration/configuration.py +64 -5
- pyedb/dotnet/database/cell/connectable.py +38 -9
- pyedb/dotnet/database/cell/hierarchy/component.py +28 -28
- pyedb/dotnet/database/cell/hierarchy/model.py +1 -1
- pyedb/dotnet/database/cell/layout.py +63 -2
- pyedb/dotnet/database/cell/layout_obj.py +2 -2
- pyedb/dotnet/database/cell/primitive/path.py +6 -8
- pyedb/dotnet/database/cell/primitive/primitive.py +3 -24
- pyedb/dotnet/database/cell/terminal/edge_terminal.py +2 -2
- pyedb/dotnet/database/cell/terminal/padstack_instance_terminal.py +1 -1
- 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 -24
- pyedb/dotnet/database/cell/voltage_regulator.py +0 -21
- pyedb/dotnet/database/components.py +96 -88
- pyedb/dotnet/database/definition/component_def.py +4 -4
- pyedb/dotnet/database/definition/component_model.py +1 -1
- pyedb/dotnet/database/definition/package_def.py +2 -3
- pyedb/dotnet/database/dotnet/database.py +3 -199
- pyedb/dotnet/database/dotnet/primitive.py +3 -3
- pyedb/dotnet/database/edb_data/control_file.py +5 -5
- pyedb/dotnet/database/edb_data/hfss_extent_info.py +6 -6
- pyedb/dotnet/database/edb_data/layer_data.py +23 -23
- pyedb/dotnet/database/edb_data/padstacks_data.py +63 -88
- pyedb/dotnet/database/edb_data/primitives_data.py +5 -5
- pyedb/dotnet/database/edb_data/sources.py +6 -6
- pyedb/dotnet/database/edb_data/variables.py +1 -1
- pyedb/dotnet/database/geometry/point_data.py +14 -10
- pyedb/dotnet/database/geometry/polygon_data.py +3 -3
- pyedb/dotnet/database/hfss.py +46 -48
- pyedb/dotnet/database/layout_validation.py +14 -11
- pyedb/dotnet/database/materials.py +10 -11
- pyedb/dotnet/database/modeler.py +97 -91
- pyedb/dotnet/database/nets.py +19 -22
- pyedb/dotnet/database/padstack.py +84 -83
- pyedb/dotnet/database/siwave.py +42 -42
- pyedb/dotnet/database/stackup.py +140 -72
- pyedb/dotnet/database/utilities/heatsink.py +4 -4
- pyedb/dotnet/database/utilities/obj_base.py +2 -2
- pyedb/dotnet/database/utilities/simulation_setup.py +2 -2
- pyedb/dotnet/database/utilities/value.py +16 -16
- pyedb/dotnet/edb.py +228 -150
- pyedb/edb_logger.py +12 -27
- pyedb/extensions/via_design_backend.py +6 -3
- pyedb/generic/design_types.py +67 -29
- pyedb/generic/general_methods.py +0 -120
- pyedb/generic/process.py +44 -108
- pyedb/generic/settings.py +75 -19
- pyedb/grpc/database/components.py +2 -0
- pyedb/grpc/database/control_file.py +5 -5
- pyedb/grpc/database/definition/materials.py +1 -1
- pyedb/grpc/database/definition/package_def.py +3 -3
- pyedb/grpc/database/definition/padstack_def.py +53 -0
- pyedb/grpc/database/geometry/polygon_data.py +1 -1
- pyedb/grpc/database/layout/layout.py +8 -5
- pyedb/grpc/database/layout_validation.py +3 -3
- pyedb/grpc/database/modeler.py +9 -4
- pyedb/grpc/database/net/net.py +15 -14
- pyedb/grpc/database/nets.py +70 -0
- pyedb/grpc/database/padstacks.py +35 -17
- pyedb/grpc/database/primitive/padstack_instance.py +175 -7
- pyedb/grpc/database/siwave.py +1 -1
- pyedb/grpc/database/source_excitations.py +2 -4
- pyedb/grpc/database/stackup.py +1 -1
- pyedb/grpc/database/terminal/bundle_terminal.py +1 -1
- pyedb/grpc/database/terminal/padstack_instance_terminal.py +1 -1
- pyedb/grpc/database/terminal/pingroup_terminal.py +1 -1
- pyedb/grpc/database/utility/xml_control_file.py +5 -5
- pyedb/grpc/edb.py +73 -27
- pyedb/grpc/edb_init.py +3 -3
- pyedb/grpc/rpc_session.py +10 -10
- pyedb/libraries/common.py +366 -0
- pyedb/libraries/rf_libraries/base_functions.py +1358 -0
- pyedb/libraries/rf_libraries/planar_antennas.py +628 -0
- pyedb/misc/decorators.py +61 -0
- pyedb/misc/misc.py +0 -13
- pyedb/siwave.py +2 -2
- {pyedb-0.54.0.dist-info → pyedb-0.55.0.dist-info}/METADATA +1 -2
- {pyedb-0.54.0.dist-info → pyedb-0.55.0.dist-info}/RECORD +95 -91
- {pyedb-0.54.0.dist-info → pyedb-0.55.0.dist-info}/WHEEL +0 -0
- {pyedb-0.54.0.dist-info → pyedb-0.55.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -148,7 +148,7 @@ class Components(object):
|
|
|
148
148
|
|
|
149
149
|
@property
|
|
150
150
|
def _db(self):
|
|
151
|
-
return self._pedb.
|
|
151
|
+
return self._pedb._db
|
|
152
152
|
|
|
153
153
|
@property
|
|
154
154
|
def components(self):
|
|
@@ -199,7 +199,7 @@ class Components(object):
|
|
|
199
199
|
Returns
|
|
200
200
|
-------
|
|
201
201
|
dict of :class:`EDBComponentDef`"""
|
|
202
|
-
return {l.GetName(): EDBComponentDef(self._pedb, l) for l in list(self._pedb.
|
|
202
|
+
return {l.GetName(): EDBComponentDef(self._pedb, l) for l in list(self._pedb.active_db.ComponentDefs)}
|
|
203
203
|
|
|
204
204
|
@property
|
|
205
205
|
def nport_comp_definition(self):
|
|
@@ -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.core.
|
|
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.core.
|
|
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()
|
|
@@ -709,8 +709,8 @@ class Components(object):
|
|
|
709
709
|
positive_pin_group,
|
|
710
710
|
)
|
|
711
711
|
negative_pin_group_term = self._create_pin_group_terminal(negative_pin_group, isref=True)
|
|
712
|
-
positive_pin_group_term.SetBoundaryType(self._edb.
|
|
713
|
-
negative_pin_group_term.SetBoundaryType(self._edb.
|
|
712
|
+
positive_pin_group_term.SetBoundaryType(self._edb.Cell.Terminal.BoundaryType.kVoltageSource)
|
|
713
|
+
negative_pin_group_term.SetBoundaryType(self._edb.Cell.Terminal.BoundaryType.kVoltageSource)
|
|
714
714
|
term_name = source.name
|
|
715
715
|
positive_pin_group_term.SetName(term_name)
|
|
716
716
|
negative_pin_group_term.SetName("{}_ref".format(term_name))
|
|
@@ -726,8 +726,8 @@ class Components(object):
|
|
|
726
726
|
positive_pin_group,
|
|
727
727
|
)
|
|
728
728
|
negative_pin_group_term = self._create_pin_group_terminal(negative_pin_group, isref=True)
|
|
729
|
-
positive_pin_group_term.SetBoundaryType(self._edb.
|
|
730
|
-
negative_pin_group_term.SetBoundaryType(self._edb.
|
|
729
|
+
positive_pin_group_term.SetBoundaryType(self._edb.Cell.Terminal.BoundaryType.kCurrentSource)
|
|
730
|
+
negative_pin_group_term.SetBoundaryType(self._edb.Cell.Terminal.BoundaryType.kCurrentSource)
|
|
731
731
|
term_name = source.name
|
|
732
732
|
positive_pin_group_term.SetName(term_name)
|
|
733
733
|
negative_pin_group_term.SetName("{}_ref".format(term_name))
|
|
@@ -810,17 +810,21 @@ class Components(object):
|
|
|
810
810
|
elif isinstance(refdes, self._pedb._edb.Cell.Hierarchy.Component):
|
|
811
811
|
refdes = EDBComponent(self._pedb, refdes)
|
|
812
812
|
pins = self._get_pins_for_ports(pins, refdes)
|
|
813
|
-
if not pins:
|
|
814
|
-
|
|
815
|
-
return False
|
|
813
|
+
if not pins: # pragma: no cover
|
|
814
|
+
raise RuntimeError("No pins found during port creation. Port is not defined.")
|
|
816
815
|
reference_pins = self._get_pins_for_ports(reference_pins, refdes)
|
|
817
816
|
if not reference_pins:
|
|
818
|
-
|
|
819
|
-
|
|
817
|
+
raise RuntimeError("No reference pins found during port creation. Port is not defined.")
|
|
818
|
+
if not pins:
|
|
819
|
+
raise RuntimeWarning("No pins found during port creation. Port is not defined.")
|
|
820
|
+
if reference_pins:
|
|
821
|
+
reference_pins = self._get_pins_for_ports(reference_pins, refdes)
|
|
822
|
+
if not reference_pins:
|
|
823
|
+
raise RuntimeWarning("No reference pins found during port creation. Port is not defined.")
|
|
820
824
|
if refdes and any(refdes.rlc_values):
|
|
821
825
|
return self.deactivate_rlc_component(component=refdes, create_circuit_port=True)
|
|
822
826
|
if not port_name:
|
|
823
|
-
port_name = f"Port_{pins[0].net_name}_{pins[0].
|
|
827
|
+
port_name = f"Port_{pins[0].net_name}_{pins[0].aedt_name}".replace("-", "_")
|
|
824
828
|
|
|
825
829
|
if len(pins) > 1 or pingroup_on_single_pin:
|
|
826
830
|
if pec_boundary:
|
|
@@ -833,7 +837,7 @@ class Components(object):
|
|
|
833
837
|
pin_group = self.create_pingroup_from_pins(pins, group_name)
|
|
834
838
|
term = self._create_pin_group_terminal(pingroup=pin_group, term_name=port_name)
|
|
835
839
|
else:
|
|
836
|
-
term = self._create_terminal(pins[0].
|
|
840
|
+
term = self._create_terminal(pins[0]._edb_object, term_name=port_name)
|
|
837
841
|
term.SetIsCircuitPort(True)
|
|
838
842
|
|
|
839
843
|
if len(reference_pins) > 1 or pingroup_on_single_pin:
|
|
@@ -848,16 +852,16 @@ class Components(object):
|
|
|
848
852
|
ref_pin_group = self.create_pingroup_from_pins(reference_pins, ref_group_name)
|
|
849
853
|
ref_term = self._create_pin_group_terminal(pingroup=ref_pin_group, term_name=port_name + "_ref")
|
|
850
854
|
else:
|
|
851
|
-
ref_term = self._create_terminal(reference_pins[0].
|
|
855
|
+
ref_term = self._create_terminal(reference_pins[0]._edb_object, term_name=port_name + "_ref")
|
|
852
856
|
ref_term.SetIsCircuitPort(True)
|
|
853
857
|
|
|
854
|
-
term.SetImpedance(self._edb.
|
|
858
|
+
term.SetImpedance(self._edb.Utility.Value(impedance))
|
|
855
859
|
term.SetReferenceTerminal(ref_term)
|
|
856
860
|
if pec_boundary:
|
|
857
861
|
term.SetIsCircuitPort(False)
|
|
858
862
|
ref_term.SetIsCircuitPort(False)
|
|
859
|
-
term.SetBoundaryType(self._edb.
|
|
860
|
-
ref_term.SetBoundaryType(self._edb.
|
|
863
|
+
term.SetBoundaryType(self._edb.Cell.Terminal.BoundaryType.PecBoundary)
|
|
864
|
+
ref_term.SetBoundaryType(self._edb.Cell.Terminal.BoundaryType.PecBoundary)
|
|
861
865
|
self._logger.info(
|
|
862
866
|
f"PEC boundary created between pin {pins[0].name} and reference pin {reference_pins[0].name}"
|
|
863
867
|
)
|
|
@@ -867,7 +871,9 @@ class Components(object):
|
|
|
867
871
|
def _get_pins_for_ports(
|
|
868
872
|
self, pins: Union[int, str, EDBPadstackInstance, List[Union[int, str, EDBPadstackInstance]]], comp: EDBComponent
|
|
869
873
|
) -> List[EDBPadstackInstance]:
|
|
870
|
-
if not
|
|
874
|
+
if not pins:
|
|
875
|
+
raise ValueError("No pins provided for port creation.")
|
|
876
|
+
elif not isinstance(pins, List):
|
|
871
877
|
pins = [pins]
|
|
872
878
|
result = []
|
|
873
879
|
for pin in pins:
|
|
@@ -877,13 +883,15 @@ class Components(object):
|
|
|
877
883
|
if comp and pin in comp.pins:
|
|
878
884
|
result.append(comp.pins[pin])
|
|
879
885
|
else:
|
|
880
|
-
p = [pp for pp in list(self._padstack.instances.values()) if pp.
|
|
886
|
+
p = [pp for pp in list(self._padstack.instances.values()) if pp.aedt_name == pin]
|
|
881
887
|
if p:
|
|
882
888
|
result.append(p[0])
|
|
883
889
|
elif isinstance(pin, EDBPadstackInstance):
|
|
884
890
|
result.append(pin)
|
|
885
891
|
elif isinstance(pin, self._edb.Cell.Primitive.PadstackInstance):
|
|
886
892
|
result.append(EDBPadstackInstance(pin, self._pedb))
|
|
893
|
+
if not result:
|
|
894
|
+
raise ValueError(f"Failed to find pins for port creation: {pins} on component {comp.name}.")
|
|
887
895
|
return result
|
|
888
896
|
|
|
889
897
|
def create_port_on_component(
|
|
@@ -1155,7 +1163,7 @@ class Components(object):
|
|
|
1155
1163
|
for term in list(self._pedb.active_layout.Terminals):
|
|
1156
1164
|
if term.GetName() == term_name:
|
|
1157
1165
|
return term
|
|
1158
|
-
term = self._edb.
|
|
1166
|
+
term = self._edb.Cell.Terminal.PadstackInstanceTerminal.Create(
|
|
1159
1167
|
pin.GetLayout(), pin.GetNet(), term_name, pin, from_layer
|
|
1160
1168
|
)
|
|
1161
1169
|
return term
|
|
@@ -1223,9 +1231,9 @@ class Components(object):
|
|
|
1223
1231
|
return False
|
|
1224
1232
|
component_type = component.edbcomponent.GetComponentType()
|
|
1225
1233
|
if (
|
|
1226
|
-
component_type == self._edb.
|
|
1227
|
-
or component_type == self._edb.
|
|
1228
|
-
or component_type == self._edb.
|
|
1234
|
+
component_type == self._edb.Definition.ComponentType.Other
|
|
1235
|
+
or component_type == self._edb.Definition.ComponentType.IC
|
|
1236
|
+
or component_type == self._edb.Definition.ComponentType.IO
|
|
1229
1237
|
):
|
|
1230
1238
|
self._logger.info("Component %s passed to deactivate is not an RLC.", component.refdes)
|
|
1231
1239
|
return False
|
|
@@ -1273,9 +1281,9 @@ class Components(object):
|
|
|
1273
1281
|
return False
|
|
1274
1282
|
component_type = component.edbcomponent.GetComponentType()
|
|
1275
1283
|
if (
|
|
1276
|
-
component_type == self._edb.
|
|
1277
|
-
or component_type == self._edb.
|
|
1278
|
-
or component_type == self._edb.
|
|
1284
|
+
component_type == self._edb.Definition.ComponentType.Other
|
|
1285
|
+
or component_type == self._edb.Definition.ComponentType.IC
|
|
1286
|
+
or component_type == self._edb.Definition.ComponentType.IO
|
|
1279
1287
|
):
|
|
1280
1288
|
self._logger.info("Component %s passed to deactivate is not an RLC.", component.refdes)
|
|
1281
1289
|
return False
|
|
@@ -1316,7 +1324,7 @@ class Components(object):
|
|
|
1316
1324
|
pins = self.get_pin_from_component(component.refdes)
|
|
1317
1325
|
if len(pins) == 2: # pragma: no cover
|
|
1318
1326
|
pin_layers = self._padstack._get_pin_layer_range(pins[0])
|
|
1319
|
-
pos_pin_term = self._pedb.core.
|
|
1327
|
+
pos_pin_term = self._pedb.core.Cell.Terminal.PadstackInstanceTerminal.Create(
|
|
1320
1328
|
self._active_layout,
|
|
1321
1329
|
pins[0].net._edb_object,
|
|
1322
1330
|
f"{component.refdes}_{pins[0]._edb_object.GetName()}",
|
|
@@ -1326,7 +1334,7 @@ class Components(object):
|
|
|
1326
1334
|
)
|
|
1327
1335
|
if not pos_pin_term: # pragma: no cover
|
|
1328
1336
|
return False
|
|
1329
|
-
neg_pin_term = self._pedb.core.
|
|
1337
|
+
neg_pin_term = self._pedb.core.Cell.Terminal.PadstackInstanceTerminal.Create(
|
|
1330
1338
|
self._active_layout,
|
|
1331
1339
|
pins[1].net._edb_object,
|
|
1332
1340
|
f"{component.refdes}_{pins[1]._edb_object.GetName()}_ref",
|
|
@@ -1337,11 +1345,11 @@ class Components(object):
|
|
|
1337
1345
|
if not neg_pin_term: # pragma: no cover
|
|
1338
1346
|
return False
|
|
1339
1347
|
if pec_boundary:
|
|
1340
|
-
pos_pin_term.SetBoundaryType(self._pedb.core.
|
|
1341
|
-
neg_pin_term.SetBoundaryType(self._pedb.core.
|
|
1348
|
+
pos_pin_term.SetBoundaryType(self._pedb.core.Cell.Terminal.BoundaryType.PecBoundary)
|
|
1349
|
+
neg_pin_term.SetBoundaryType(self._pedb.core.Cell.Terminal.BoundaryType.PecBoundary)
|
|
1342
1350
|
else:
|
|
1343
|
-
pos_pin_term.SetBoundaryType(self._pedb.core.
|
|
1344
|
-
neg_pin_term.SetBoundaryType(self._pedb.core.
|
|
1351
|
+
pos_pin_term.SetBoundaryType(self._pedb.core.Cell.Terminal.BoundaryType.PortBoundary)
|
|
1352
|
+
neg_pin_term.SetBoundaryType(self._pedb.core.Cell.Terminal.BoundaryType.PortBoundary)
|
|
1345
1353
|
pos_pin_term.SetName(component.refdes)
|
|
1346
1354
|
pos_pin_term.SetReferenceTerminal(neg_pin_term)
|
|
1347
1355
|
if circuit_ports and not pec_boundary:
|
|
@@ -1382,7 +1390,7 @@ class Components(object):
|
|
|
1382
1390
|
pins = self.get_pin_from_component(component.refdes)
|
|
1383
1391
|
if len(pins) == 2: # pragma: no cover
|
|
1384
1392
|
pin_layer = self._padstack._get_pin_layer_range(pins[0])[0]
|
|
1385
|
-
pos_pin_term = self._pedb.core.
|
|
1393
|
+
pos_pin_term = self._pedb.core.Cell.Terminal.PadstackInstanceTerminal.Create(
|
|
1386
1394
|
self._active_layout,
|
|
1387
1395
|
pins[0]._edb_object.GetNet(),
|
|
1388
1396
|
f"{component.refdes}_{pins[0]._edb_object.GetName()}",
|
|
@@ -1392,7 +1400,7 @@ class Components(object):
|
|
|
1392
1400
|
)
|
|
1393
1401
|
if not pos_pin_term: # pragma: no cover
|
|
1394
1402
|
return False
|
|
1395
|
-
neg_pin_term = self._pedb.core.
|
|
1403
|
+
neg_pin_term = self._pedb.core.Cell.Terminal.PadstackInstanceTerminal.Create(
|
|
1396
1404
|
self._active_layout,
|
|
1397
1405
|
pins[1]._edb_object.GetNet(),
|
|
1398
1406
|
f"{component.refdes}_{pins[1]._edb_object.GetName()}_ref",
|
|
@@ -1402,29 +1410,29 @@ class Components(object):
|
|
|
1402
1410
|
)
|
|
1403
1411
|
if not neg_pin_term: # pragma: no cover
|
|
1404
1412
|
return False
|
|
1405
|
-
pos_pin_term.SetBoundaryType(self._pedb.core.
|
|
1413
|
+
pos_pin_term.SetBoundaryType(self._pedb.core.Cell.Terminal.BoundaryType.RlcBoundary)
|
|
1406
1414
|
if not circuit_type:
|
|
1407
1415
|
pos_pin_term.SetIsCircuitPort(False)
|
|
1408
1416
|
else:
|
|
1409
1417
|
pos_pin_term.SetIsCircuitPort(True)
|
|
1410
1418
|
pos_pin_term.SetName(component.refdes)
|
|
1411
|
-
neg_pin_term.SetBoundaryType(self._pedb.core.
|
|
1419
|
+
neg_pin_term.SetBoundaryType(self._pedb.core.Cell.Terminal.BoundaryType.RlcBoundary)
|
|
1412
1420
|
if not circuit_type:
|
|
1413
1421
|
neg_pin_term.SetIsCircuitPort(False)
|
|
1414
1422
|
else:
|
|
1415
1423
|
neg_pin_term.SetIsCircuitPort(True)
|
|
1416
1424
|
pos_pin_term.SetReferenceTerminal(neg_pin_term)
|
|
1417
1425
|
rlc_values = component.rlc_values
|
|
1418
|
-
rlc = self._edb.
|
|
1426
|
+
rlc = self._edb.Utility.Rlc()
|
|
1419
1427
|
if rlc_values[0]:
|
|
1420
1428
|
rlc.REnabled = True
|
|
1421
|
-
rlc.R = self._edb.
|
|
1429
|
+
rlc.R = self._edb.Utility.Value(rlc_values[0])
|
|
1422
1430
|
if rlc_values[1]:
|
|
1423
1431
|
rlc.LEnabled = True
|
|
1424
|
-
rlc.L = self._edb.
|
|
1432
|
+
rlc.L = self._edb.Utility.Value(rlc_values[1])
|
|
1425
1433
|
if rlc_values[2]:
|
|
1426
1434
|
rlc.CEnabled = True
|
|
1427
|
-
rlc.C = self._edb.
|
|
1435
|
+
rlc.C = self._edb.Utility.Value(rlc_values[2])
|
|
1428
1436
|
rlc.is_parallel = component.is_parallel_rlc
|
|
1429
1437
|
pos_pin_term.SetRlcBoundaryParameters(rlc)
|
|
1430
1438
|
self._logger.info("Component {} has been replaced by port".format(component.refdes))
|
|
@@ -1457,7 +1465,7 @@ class Components(object):
|
|
|
1457
1465
|
for t in list(self._pedb.active_layout.Terminals):
|
|
1458
1466
|
if t.GetName() == term_name:
|
|
1459
1467
|
return t
|
|
1460
|
-
pingroup_term = self._edb.
|
|
1468
|
+
pingroup_term = self._edb.Cell.Terminal.PinGroupTerminal.Create(
|
|
1461
1469
|
self._active_layout, pingroup.GetNet(), term_name, pingroup, isref
|
|
1462
1470
|
)
|
|
1463
1471
|
if term_type == "circuit":
|
|
@@ -1481,16 +1489,16 @@ class Components(object):
|
|
|
1481
1489
|
|
|
1482
1490
|
|
|
1483
1491
|
"""
|
|
1484
|
-
signal_layers = cmp.GetLayout().GetLayerCollection().Layers(self._edb.
|
|
1492
|
+
signal_layers = cmp.GetLayout().GetLayerCollection().Layers(self._edb.Cell.layer_type_set.SignalLayerSet)
|
|
1485
1493
|
if cmp.GetPlacementLayer() == signal_layers[0]:
|
|
1486
1494
|
return True
|
|
1487
1495
|
else:
|
|
1488
1496
|
return False
|
|
1489
1497
|
|
|
1490
1498
|
def _getComponentDefinition(self, name, pins):
|
|
1491
|
-
componentDefinition = self._pedb.core.
|
|
1499
|
+
componentDefinition = self._pedb.core.Definition.ComponentDef.FindByName(self._db, name)
|
|
1492
1500
|
if componentDefinition.IsNull():
|
|
1493
|
-
componentDefinition = self._pedb.core.
|
|
1501
|
+
componentDefinition = self._pedb.core.Definition.ComponentDef.Create(self._db, name, None)
|
|
1494
1502
|
if componentDefinition.IsNull():
|
|
1495
1503
|
self._logger.error("Failed to create component definition {}".format(name))
|
|
1496
1504
|
return None
|
|
@@ -1499,7 +1507,7 @@ class Components(object):
|
|
|
1499
1507
|
if not pin.GetName():
|
|
1500
1508
|
pin.SetName(str(ind))
|
|
1501
1509
|
ind += 1
|
|
1502
|
-
componentDefinitionPin = self._pedb.core.
|
|
1510
|
+
componentDefinitionPin = self._pedb.core.Definition.ComponentDefPin.Create(
|
|
1503
1511
|
componentDefinition, pin.GetName()
|
|
1504
1512
|
)
|
|
1505
1513
|
if componentDefinitionPin.IsNull():
|
|
@@ -1614,7 +1622,7 @@ class Components(object):
|
|
|
1614
1622
|
compdef = self._getComponentDefinition(component_name, pins)
|
|
1615
1623
|
if not compdef:
|
|
1616
1624
|
return False
|
|
1617
|
-
new_cmp = self._pedb.core.
|
|
1625
|
+
new_cmp = self._pedb.core.Cell.Hierarchy.Component.Create(
|
|
1618
1626
|
self._active_layout, component_name, compdef.GetName()
|
|
1619
1627
|
)
|
|
1620
1628
|
|
|
@@ -1622,16 +1630,16 @@ class Components(object):
|
|
|
1622
1630
|
for pin in pins:
|
|
1623
1631
|
pin.SetIsLayoutPin(True)
|
|
1624
1632
|
new_cmp.AddMember(pin)
|
|
1625
|
-
new_cmp.SetComponentType(self._edb.
|
|
1633
|
+
new_cmp.SetComponentType(self._edb.Definition.ComponentType.Other)
|
|
1626
1634
|
if not placement_layer:
|
|
1627
1635
|
new_cmp_layer_name = pins[0].GetPadstackDef().GetData().GetLayerNames()[0]
|
|
1628
1636
|
else:
|
|
1629
1637
|
new_cmp_layer_name = placement_layer
|
|
1630
|
-
new_cmp_placement_layer = self._edb.
|
|
1638
|
+
new_cmp_placement_layer = self._edb.Cell.Layer.FindByName(self._layout.layer_collection, new_cmp_layer_name)
|
|
1631
1639
|
new_cmp.SetPlacementLayer(new_cmp_placement_layer)
|
|
1632
1640
|
|
|
1633
1641
|
if is_rlc and len(pins) == 2:
|
|
1634
|
-
rlc = self._edb.
|
|
1642
|
+
rlc = self._edb.Utility.Rlc()
|
|
1635
1643
|
rlc.IsParallel = is_parallel
|
|
1636
1644
|
if r_value is None:
|
|
1637
1645
|
rlc.REnabled = False
|
|
@@ -1649,18 +1657,18 @@ class Components(object):
|
|
|
1649
1657
|
rlc.CEnabled = True
|
|
1650
1658
|
rlc.C = self._get_edb_value(c_value)
|
|
1651
1659
|
if rlc.REnabled and not rlc.CEnabled and not rlc.CEnabled:
|
|
1652
|
-
new_cmp.SetComponentType(self._edb.
|
|
1660
|
+
new_cmp.SetComponentType(self._edb.Definition.ComponentType.Resistor)
|
|
1653
1661
|
elif rlc.CEnabled and not rlc.REnabled and not rlc.LEnabled:
|
|
1654
|
-
new_cmp.SetComponentType(self._edb.
|
|
1662
|
+
new_cmp.SetComponentType(self._edb.Definition.ComponentType.Capacitor)
|
|
1655
1663
|
elif rlc.LEnabled and not rlc.REnabled and not rlc.CEnabled:
|
|
1656
|
-
new_cmp.SetComponentType(self._edb.
|
|
1664
|
+
new_cmp.SetComponentType(self._edb.Definition.ComponentType.Inductor)
|
|
1657
1665
|
else:
|
|
1658
|
-
new_cmp.SetComponentType(self._edb.
|
|
1666
|
+
new_cmp.SetComponentType(self._edb.Definition.ComponentType.Resistor)
|
|
1659
1667
|
|
|
1660
|
-
pin_pair = self._edb.
|
|
1661
|
-
rlc_model = self._edb.
|
|
1668
|
+
pin_pair = self._edb.Utility.PinPair(pins[0].GetName(), pins[1].GetName())
|
|
1669
|
+
rlc_model = self._edb.Cell.Hierarchy.PinPairModel()
|
|
1662
1670
|
rlc_model.SetPinPairRlc(pin_pair, rlc)
|
|
1663
|
-
edb_rlc_component_property = self._edb.
|
|
1671
|
+
edb_rlc_component_property = self._edb.Cell.Hierarchy.RLCComponentProperty()
|
|
1664
1672
|
if not edb_rlc_component_property.SetModel(rlc_model) or not new_cmp.SetComponentProperty(
|
|
1665
1673
|
edb_rlc_component_property
|
|
1666
1674
|
):
|
|
@@ -1761,7 +1769,7 @@ class Components(object):
|
|
|
1761
1769
|
pinNames.remove(pinNames[0])
|
|
1762
1770
|
break
|
|
1763
1771
|
if len(pinNames) == pinNumber:
|
|
1764
|
-
spiceMod = self._edb.
|
|
1772
|
+
spiceMod = self._edb.Cell.Hierarchy.SPICEModel()
|
|
1765
1773
|
spiceMod.SetModelPath(modelpath)
|
|
1766
1774
|
spiceMod.SetModelName(modelname)
|
|
1767
1775
|
terminal = 1
|
|
@@ -1780,13 +1788,13 @@ class Components(object):
|
|
|
1780
1788
|
elif model_type == "Touchstone": # pragma: no cover
|
|
1781
1789
|
nPortModelName = modelname
|
|
1782
1790
|
edbComponentDef = edbComponent.GetComponentDef()
|
|
1783
|
-
nPortModel = self._edb.
|
|
1791
|
+
nPortModel = self._edb.Definition.NPortComponentModel.FindByName(edbComponentDef, nPortModelName)
|
|
1784
1792
|
if nPortModel.IsNull():
|
|
1785
|
-
nPortModel = self._edb.
|
|
1793
|
+
nPortModel = self._edb.Definition.NPortComponentModel.Create(nPortModelName)
|
|
1786
1794
|
nPortModel.SetReferenceFile(modelpath)
|
|
1787
1795
|
edbComponentDef.AddComponentModel(nPortModel)
|
|
1788
1796
|
|
|
1789
|
-
sParameterMod = self._edb.
|
|
1797
|
+
sParameterMod = self._edb.Cell.Hierarchy.SParameterModel()
|
|
1790
1798
|
sParameterMod.SetComponentModelName(nPortModelName)
|
|
1791
1799
|
gndnets = list(filter(lambda x: "gnd" in x.lower(), componentNets))
|
|
1792
1800
|
if len(gndnets) > 0: # pragma: no cover
|
|
@@ -1831,7 +1839,7 @@ class Components(object):
|
|
|
1831
1839
|
if _pins:
|
|
1832
1840
|
pins = _pins
|
|
1833
1841
|
if group_name is None:
|
|
1834
|
-
group_name = self._edb.
|
|
1842
|
+
group_name = self._edb.Cell.Hierarchy.PinGroup.GetUniqueName(self._active_layout)
|
|
1835
1843
|
for pin in pins:
|
|
1836
1844
|
pin.SetIsLayoutPin(True)
|
|
1837
1845
|
forbiden_car = "-><"
|
|
@@ -1845,18 +1853,18 @@ class Components(object):
|
|
|
1845
1853
|
if p.GetName() in pnames:
|
|
1846
1854
|
continue
|
|
1847
1855
|
else:
|
|
1848
|
-
group_name = self._edb.
|
|
1856
|
+
group_name = self._edb.Cell.Hierarchy.PinGroup.GetUniqueName(
|
|
1849
1857
|
self._active_layout, group_name
|
|
1850
1858
|
)
|
|
1851
1859
|
pin_group_exists = False
|
|
1852
1860
|
else:
|
|
1853
|
-
group_name = self._edb.
|
|
1861
|
+
group_name = self._edb.Cell.Hierarchy.PinGroup.GetUniqueName(self._active_layout, group_name)
|
|
1854
1862
|
pin_group_exists = False
|
|
1855
1863
|
if pin_group_exists:
|
|
1856
1864
|
return pgroup
|
|
1857
1865
|
pingroup = _retry_ntimes(
|
|
1858
1866
|
10,
|
|
1859
|
-
self._edb.
|
|
1867
|
+
self._edb.Cell.Hierarchy.PinGroup.Create,
|
|
1860
1868
|
self._active_layout,
|
|
1861
1869
|
group_name,
|
|
1862
1870
|
convert_py_list_to_net_list(pins),
|
|
@@ -1904,7 +1912,7 @@ class Components(object):
|
|
|
1904
1912
|
deleted_comps.append(comp)
|
|
1905
1913
|
if not deactivate_only:
|
|
1906
1914
|
self.refresh_components()
|
|
1907
|
-
self._pedb.
|
|
1915
|
+
self._pedb.logger.info("Deleted {} components".format(len(deleted_comps)))
|
|
1908
1916
|
|
|
1909
1917
|
return deleted_comps
|
|
1910
1918
|
|
|
@@ -2053,7 +2061,7 @@ class Components(object):
|
|
|
2053
2061
|
>>> edbapp.components.set_solder_ball("A1")
|
|
2054
2062
|
|
|
2055
2063
|
"""
|
|
2056
|
-
if not isinstance(component, self._pedb.core.
|
|
2064
|
+
if not isinstance(component, self._pedb.core.Cell.Hierarchy.Component):
|
|
2057
2065
|
edb_cmp = self.get_component_by_name(component)._edb_object
|
|
2058
2066
|
cmp = self.instances[component]
|
|
2059
2067
|
else: # pragma: no cover
|
|
@@ -2065,29 +2073,29 @@ class Components(object):
|
|
|
2065
2073
|
pin1 = list(cmp.pins.values())[0].pin
|
|
2066
2074
|
pin_layers = pin1.GetPadstackDef().GetData().GetLayerNames()
|
|
2067
2075
|
pad_params = self._padstack.get_pad_parameters(pin=pin1, layername=pin_layers[0], pad_type=0)
|
|
2068
|
-
_sb_diam = min([abs(self.
|
|
2076
|
+
_sb_diam = min([abs(self._pedb.edb_value(val).ToDouble()) for val in pad_params[1]])
|
|
2069
2077
|
sball_diam = 0.8 * _sb_diam
|
|
2070
2078
|
if sball_height:
|
|
2071
|
-
sball_height = round(self.
|
|
2079
|
+
sball_height = round(self._pedb.edb_value(sball_height).ToDouble(), 9)
|
|
2072
2080
|
else:
|
|
2073
|
-
sball_height = round(self.
|
|
2081
|
+
sball_height = round(self._pedb.edb_value(sball_diam).ToDouble(), 9) / 2
|
|
2074
2082
|
|
|
2075
2083
|
if not sball_mid_diam:
|
|
2076
2084
|
sball_mid_diam = sball_diam
|
|
2077
2085
|
|
|
2078
2086
|
if shape.lower() == "cylinder":
|
|
2079
|
-
sball_shape = self._edb.
|
|
2087
|
+
sball_shape = self._edb.Definition.SolderballShape.Cylinder
|
|
2080
2088
|
else:
|
|
2081
|
-
sball_shape = self._edb.
|
|
2089
|
+
sball_shape = self._edb.Definition.SolderballShape.Spheroid
|
|
2082
2090
|
|
|
2083
2091
|
cmp_property = edb_cmp.GetComponentProperty().Clone()
|
|
2084
|
-
if cmp_type == self._edb.
|
|
2092
|
+
if cmp_type == self._edb.Definition.ComponentType.IC:
|
|
2085
2093
|
ic_die_prop = cmp_property.GetDieProperty().Clone()
|
|
2086
|
-
ic_die_prop.SetType(self._edb.
|
|
2094
|
+
ic_die_prop.SetType(self._edb.Definition.DieType.FlipChip)
|
|
2087
2095
|
if chip_orientation.lower() == "chip_up":
|
|
2088
|
-
ic_die_prop.SetOrientation(self._edb.
|
|
2096
|
+
ic_die_prop.SetOrientation(self._edb.Definition.DieOrientation.ChipUp)
|
|
2089
2097
|
else:
|
|
2090
|
-
ic_die_prop.SetOrientation(self._edb.
|
|
2098
|
+
ic_die_prop.SetOrientation(self._edb.Definition.DieOrientation.ChipDown)
|
|
2091
2099
|
cmp_property.SetDieProperty(ic_die_prop)
|
|
2092
2100
|
|
|
2093
2101
|
solder_ball_prop = cmp_property.GetSolderBallProperty().Clone()
|
|
@@ -2149,13 +2157,13 @@ class Components(object):
|
|
|
2149
2157
|
self._logger.info("No parameters passed, component %s is disabled.", componentname)
|
|
2150
2158
|
return True
|
|
2151
2159
|
edb_component = self.get_component_by_name(componentname)._edb_object
|
|
2152
|
-
edb_rlc_component_property = self._edb.
|
|
2160
|
+
edb_rlc_component_property = self._edb.Cell.Hierarchy.RLCComponentProperty()
|
|
2153
2161
|
component_pins = self.get_pin_from_component(componentname)
|
|
2154
2162
|
pin_number = len(component_pins)
|
|
2155
2163
|
if pin_number == 2:
|
|
2156
2164
|
from_pin = component_pins[0]
|
|
2157
2165
|
to_pin = component_pins[1]
|
|
2158
|
-
rlc = self._edb.
|
|
2166
|
+
rlc = self._edb.Utility.Rlc()
|
|
2159
2167
|
rlc.IsParallel = isparallel
|
|
2160
2168
|
if res_value is not None:
|
|
2161
2169
|
rlc.REnabled = True
|
|
@@ -2172,8 +2180,8 @@ class Components(object):
|
|
|
2172
2180
|
rlc.C = self._get_edb_value(cap_value)
|
|
2173
2181
|
else:
|
|
2174
2182
|
rlc.CEnabled = False
|
|
2175
|
-
pin_pair = self._edb.
|
|
2176
|
-
rlc_model = self._edb.
|
|
2183
|
+
pin_pair = self._edb.Utility.PinPair(from_pin.name, to_pin.name)
|
|
2184
|
+
rlc_model = self._edb.Cell.Hierarchy.PinPairModel()
|
|
2177
2185
|
rlc_model.SetPinPairRlc(pin_pair, rlc)
|
|
2178
2186
|
if not edb_rlc_component_property.SetModel(rlc_model) or not edb_component.SetComponentProperty(
|
|
2179
2187
|
edb_rlc_component_property
|
|
@@ -2310,9 +2318,9 @@ class Components(object):
|
|
|
2310
2318
|
pinlist = self.get_pin_from_component(refdes)
|
|
2311
2319
|
if not part_name in self.definitions:
|
|
2312
2320
|
footprint_cell = self.definitions[comp.partname]._edb_object.GetFootprintCell()
|
|
2313
|
-
comp_def = self._edb.
|
|
2321
|
+
comp_def = self._edb.Definition.ComponentDef.Create(self._db, part_name, footprint_cell)
|
|
2314
2322
|
for pin in pinlist:
|
|
2315
|
-
self._edb.
|
|
2323
|
+
self._edb.Definition.ComponentDefPin.Create(comp_def, pin._edb_object.GetName())
|
|
2316
2324
|
|
|
2317
2325
|
p_layer = comp.placement_layer
|
|
2318
2326
|
refdes_temp = comp.refdes + "_temp"
|
|
@@ -2388,7 +2396,7 @@ class Components(object):
|
|
|
2388
2396
|
reference_designator : str
|
|
2389
2397
|
Reference designator of the component.
|
|
2390
2398
|
"""
|
|
2391
|
-
obj = self._pedb.core.
|
|
2399
|
+
obj = self._pedb.core.Cell.Hierarchy.Component.FindByName(self._active_layout, reference_designator)
|
|
2392
2400
|
return EDBComponent(self._pedb, obj)
|
|
2393
2401
|
|
|
2394
2402
|
def get_pin_from_component(self, component, netName=None, pinName=None, net_name=None, pin_name=None):
|
|
@@ -2427,8 +2435,8 @@ class Components(object):
|
|
|
2427
2435
|
|
|
2428
2436
|
"""
|
|
2429
2437
|
warnings.warn("Use new property :func:`edb.padstacks.get_instances` instead.", DeprecationWarning)
|
|
2430
|
-
if not isinstance(component, self._pedb.core.
|
|
2431
|
-
component = self._pedb.core.
|
|
2438
|
+
if not isinstance(component, self._pedb.core.Cell.Hierarchy.Component):
|
|
2439
|
+
component = self._pedb.core.Cell.Hierarchy.Component.FindByName(self._active_layout, component)
|
|
2432
2440
|
if pinName:
|
|
2433
2441
|
warnings.warn("Use argument `pin_name` instead of `pinName`", DeprecationWarning)
|
|
2434
2442
|
if netName:
|
|
@@ -2490,7 +2498,7 @@ class Components(object):
|
|
|
2490
2498
|
if isinstance(pin, EDBPadstackInstance):
|
|
2491
2499
|
pin = pin._edb_padstackinstance
|
|
2492
2500
|
val = String("")
|
|
2493
|
-
_, name = pin.GetProductProperty(self._edb.
|
|
2501
|
+
_, name = pin.GetProductProperty(self._edb.ProductId.Designer, 11, val)
|
|
2494
2502
|
name = str(name).strip("'")
|
|
2495
2503
|
return name
|
|
2496
2504
|
|
|
@@ -2552,7 +2560,7 @@ class Components(object):
|
|
|
2552
2560
|
transformed_pt_pos = pt_pos
|
|
2553
2561
|
else:
|
|
2554
2562
|
transformed_pt_pos = pin.GetComponent().GetTransform().TransformPoint(pt_pos)
|
|
2555
|
-
pin_xy = self._edb.
|
|
2563
|
+
pin_xy = self._edb.Geometry.PointData(
|
|
2556
2564
|
self._get_edb_value(str(transformed_pt_pos.X.ToDouble())),
|
|
2557
2565
|
self._get_edb_value(str(transformed_pt_pos.Y.ToDouble())),
|
|
2558
2566
|
)
|
|
@@ -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.core.
|
|
91
|
+
for l in self._pedb.core.Cell.Hierarchy.Component.FindByComponentDef(
|
|
92
92
|
self._pedb.active_layout, self.part_name
|
|
93
93
|
)
|
|
94
94
|
]
|
|
@@ -187,16 +187,16 @@ class EDBComponentDef(ObjBase):
|
|
|
187
187
|
|
|
188
188
|
from pyedb.dotnet.database.definition.component_model import NPortComponentModel
|
|
189
189
|
|
|
190
|
-
edb_object = self._pedb.
|
|
190
|
+
edb_object = self._pedb.core.Definition.NPortComponentModel.Create(name)
|
|
191
191
|
n_port_comp_model = NPortComponentModel(self._pedb, edb_object)
|
|
192
192
|
n_port_comp_model.reference_file = fpath
|
|
193
193
|
|
|
194
194
|
self._add_component_model(n_port_comp_model)
|
|
195
195
|
|
|
196
196
|
def create(self, name):
|
|
197
|
-
cell_type = self._pedb.core.
|
|
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.core.
|
|
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.core.
|
|
31
|
+
self._model_type_mapping = {"PinPairModel": self._pedb.core.Cell}
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
class NPortComponentModel(ComponentModel):
|
|
@@ -23,7 +23,6 @@ import warnings
|
|
|
23
23
|
|
|
24
24
|
from pyedb.dotnet.database.geometry.polygon_data import PolygonData
|
|
25
25
|
from pyedb.dotnet.database.utilities.obj_base import ObjBase
|
|
26
|
-
from pyedb.edb_logger import pyedb_logger
|
|
27
26
|
|
|
28
27
|
|
|
29
28
|
class PackageDef(ObjBase):
|
|
@@ -62,7 +61,7 @@ class PackageDef(ObjBase):
|
|
|
62
61
|
edb_object: object
|
|
63
62
|
EDB PackageDef Object
|
|
64
63
|
"""
|
|
65
|
-
edb_object = self._pedb.core.
|
|
64
|
+
edb_object = self._pedb.core.Definition.PackageDef.Create(self._pedb.active_db, name)
|
|
66
65
|
if component_part_name:
|
|
67
66
|
x_pt1, y_pt1, x_pt2, y_pt2 = list(
|
|
68
67
|
self._pedb.components.definitions[component_part_name].components.values()
|
|
@@ -73,7 +72,7 @@ class PackageDef(ObjBase):
|
|
|
73
72
|
else:
|
|
74
73
|
bbox = extent_bounding_box
|
|
75
74
|
if bbox is None:
|
|
76
|
-
|
|
75
|
+
self._pedb.logger.warning(
|
|
77
76
|
"Package creation uses bounding box but it cannot be inferred. "
|
|
78
77
|
"Please set argument 'component_part_name' or 'extent_bounding_box'."
|
|
79
78
|
)
|