pyedb 0.53.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.

Files changed (119) hide show
  1. pyedb/__init__.py +1 -8
  2. pyedb/configuration/cfg_boundaries.py +69 -151
  3. pyedb/configuration/cfg_components.py +201 -460
  4. pyedb/configuration/cfg_data.py +4 -2
  5. pyedb/configuration/cfg_general.py +13 -36
  6. pyedb/configuration/cfg_modeler.py +2 -1
  7. pyedb/configuration/cfg_nets.py +21 -35
  8. pyedb/configuration/cfg_operations.py +22 -151
  9. pyedb/configuration/cfg_package_definition.py +56 -112
  10. pyedb/configuration/cfg_padstacks.py +292 -688
  11. pyedb/configuration/cfg_pin_groups.py +32 -79
  12. pyedb/configuration/cfg_ports_sources.py +20 -9
  13. pyedb/configuration/cfg_s_parameter_models.py +67 -172
  14. pyedb/configuration/cfg_setup.py +102 -295
  15. pyedb/configuration/configuration.py +66 -6
  16. pyedb/dotnet/database/cell/connectable.py +38 -9
  17. pyedb/dotnet/database/cell/hierarchy/component.py +28 -28
  18. pyedb/dotnet/database/cell/hierarchy/model.py +1 -1
  19. pyedb/dotnet/database/cell/layout.py +64 -3
  20. pyedb/dotnet/database/cell/layout_obj.py +3 -3
  21. pyedb/dotnet/database/cell/primitive/path.py +6 -8
  22. pyedb/dotnet/database/cell/primitive/primitive.py +10 -31
  23. pyedb/dotnet/database/cell/terminal/edge_terminal.py +2 -2
  24. pyedb/dotnet/database/cell/terminal/padstack_instance_terminal.py +1 -1
  25. pyedb/dotnet/database/cell/terminal/pingroup_terminal.py +1 -1
  26. pyedb/dotnet/database/cell/terminal/point_terminal.py +1 -1
  27. pyedb/dotnet/database/cell/terminal/terminal.py +26 -28
  28. pyedb/dotnet/database/cell/voltage_regulator.py +0 -21
  29. pyedb/dotnet/database/components.py +99 -91
  30. pyedb/dotnet/database/definition/component_def.py +4 -4
  31. pyedb/dotnet/database/definition/component_model.py +1 -1
  32. pyedb/dotnet/database/definition/package_def.py +2 -3
  33. pyedb/dotnet/database/dotnet/database.py +27 -218
  34. pyedb/dotnet/database/dotnet/primitive.py +16 -16
  35. pyedb/dotnet/database/edb_data/control_file.py +5 -5
  36. pyedb/dotnet/database/edb_data/hfss_extent_info.py +6 -6
  37. pyedb/dotnet/database/edb_data/layer_data.py +35 -35
  38. pyedb/dotnet/database/edb_data/padstacks_data.py +65 -90
  39. pyedb/dotnet/database/edb_data/primitives_data.py +5 -5
  40. pyedb/dotnet/database/edb_data/sources.py +6 -6
  41. pyedb/dotnet/database/edb_data/variables.py +8 -4
  42. pyedb/dotnet/database/geometry/point_data.py +14 -10
  43. pyedb/dotnet/database/geometry/polygon_data.py +3 -5
  44. pyedb/dotnet/database/hfss.py +50 -52
  45. pyedb/dotnet/database/layout_validation.py +14 -11
  46. pyedb/dotnet/database/materials.py +10 -11
  47. pyedb/dotnet/database/modeler.py +104 -101
  48. pyedb/dotnet/database/nets.py +20 -23
  49. pyedb/dotnet/database/padstack.py +156 -84
  50. pyedb/dotnet/database/sim_setup_data/data/settings.py +24 -0
  51. pyedb/dotnet/database/sim_setup_data/io/siwave.py +26 -1
  52. pyedb/dotnet/database/siwave.py +47 -47
  53. pyedb/dotnet/database/stackup.py +152 -87
  54. pyedb/dotnet/database/utilities/heatsink.py +4 -4
  55. pyedb/dotnet/database/utilities/obj_base.py +3 -3
  56. pyedb/dotnet/database/utilities/simulation_setup.py +2 -2
  57. pyedb/dotnet/database/utilities/value.py +116 -0
  58. pyedb/dotnet/edb.py +248 -170
  59. pyedb/edb_logger.py +12 -27
  60. pyedb/extensions/via_design_backend.py +6 -3
  61. pyedb/generic/design_types.py +68 -21
  62. pyedb/generic/general_methods.py +0 -120
  63. pyedb/generic/process.py +44 -108
  64. pyedb/generic/settings.py +75 -19
  65. pyedb/grpc/__init__.py +0 -0
  66. pyedb/grpc/database/components.py +55 -17
  67. pyedb/grpc/database/control_file.py +5 -5
  68. pyedb/grpc/database/definition/materials.py +24 -31
  69. pyedb/grpc/database/definition/package_def.py +18 -18
  70. pyedb/grpc/database/definition/padstack_def.py +104 -51
  71. pyedb/grpc/database/geometry/arc_data.py +7 -5
  72. pyedb/grpc/database/geometry/point_3d_data.py +8 -7
  73. pyedb/grpc/database/geometry/polygon_data.py +4 -3
  74. pyedb/grpc/database/hierarchy/component.py +43 -38
  75. pyedb/grpc/database/hierarchy/pin_pair_model.py +15 -14
  76. pyedb/grpc/database/hierarchy/pingroup.py +9 -9
  77. pyedb/grpc/database/layers/stackup_layer.py +45 -44
  78. pyedb/grpc/database/layout/layout.py +17 -13
  79. pyedb/grpc/database/layout/voltage_regulator.py +7 -7
  80. pyedb/grpc/database/layout_validation.py +16 -15
  81. pyedb/grpc/database/modeler.py +60 -58
  82. pyedb/grpc/database/net/net.py +15 -14
  83. pyedb/grpc/database/nets.py +112 -31
  84. pyedb/grpc/database/padstacks.py +303 -190
  85. pyedb/grpc/database/ports/ports.py +5 -6
  86. pyedb/grpc/database/primitive/bondwire.py +8 -7
  87. pyedb/grpc/database/primitive/circle.py +4 -4
  88. pyedb/grpc/database/primitive/padstack_instance.py +191 -23
  89. pyedb/grpc/database/primitive/path.py +7 -7
  90. pyedb/grpc/database/primitive/polygon.py +3 -3
  91. pyedb/grpc/database/primitive/primitive.py +13 -17
  92. pyedb/grpc/database/primitive/rectangle.py +13 -13
  93. pyedb/grpc/database/simulation_setup/hfss_general_settings.py +1 -1
  94. pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +10 -0
  95. pyedb/grpc/database/simulation_setup/siwave_simulation_setup.py +17 -1
  96. pyedb/grpc/database/siwave.py +31 -25
  97. pyedb/grpc/database/source_excitations.py +335 -233
  98. pyedb/grpc/database/stackup.py +165 -148
  99. pyedb/grpc/database/terminal/bundle_terminal.py +18 -8
  100. pyedb/grpc/database/terminal/edge_terminal.py +10 -0
  101. pyedb/grpc/database/terminal/padstack_instance_terminal.py +16 -5
  102. pyedb/grpc/database/terminal/pingroup_terminal.py +12 -11
  103. pyedb/grpc/database/terminal/point_terminal.py +4 -3
  104. pyedb/grpc/database/terminal/terminal.py +9 -9
  105. pyedb/grpc/database/utility/value.py +109 -0
  106. pyedb/grpc/database/utility/xml_control_file.py +5 -5
  107. pyedb/grpc/edb.py +130 -63
  108. pyedb/grpc/edb_init.py +3 -10
  109. pyedb/grpc/rpc_session.py +10 -10
  110. pyedb/libraries/common.py +366 -0
  111. pyedb/libraries/rf_libraries/base_functions.py +1358 -0
  112. pyedb/libraries/rf_libraries/planar_antennas.py +628 -0
  113. pyedb/misc/decorators.py +61 -0
  114. pyedb/misc/misc.py +0 -13
  115. pyedb/siwave.py +2 -2
  116. {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/METADATA +2 -3
  117. {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/RECORD +119 -112
  118. {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/WHEEL +0 -0
  119. {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/licenses/LICENSE +0 -0
@@ -125,7 +125,7 @@ class Components(object):
125
125
 
126
126
  @property
127
127
  def _edb(self):
128
- return self._pedb.edb_api
128
+ return self._pedb.core
129
129
 
130
130
  def _get_edb_value(self, value):
131
131
  return self._pedb.edb_value(value)
@@ -148,7 +148,7 @@ class Components(object):
148
148
 
149
149
  @property
150
150
  def _db(self):
151
- return self._pedb.active_db
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.component_defs)}
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.edb_api.cell.hierarchy.component):
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.edb_api.cell.hierarchy.component)):
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.cell.terminal.BoundaryType.kVoltageSource)
713
- negative_pin_group_term.SetBoundaryType(self._edb.cell.terminal.BoundaryType.kVoltageSource)
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.cell.terminal.BoundaryType.kCurrentSource)
730
- negative_pin_group_term.SetBoundaryType(self._edb.cell.terminal.BoundaryType.kCurrentSource)
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
- self._logger.error("No pins found during port creation. Port is not defined.")
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
- self._logger.error("No reference pins found during port creation. Port is not defined.")
819
- return False
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].name}".replace("-", "_")
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].primitive_object, term_name=port_name)
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].primitive_object, term_name=port_name + "_ref")
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.utility.value(impedance))
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.cell.terminal.BoundaryType.PecBoundary)
860
- ref_term.SetBoundaryType(self._edb.cell.terminal.BoundaryType.PecBoundary)
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 isinstance(pins, List):
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.name == pin]
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.cell.terminal.PadstackInstanceTerminal.Create(
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.definition.ComponentType.Other
1227
- or component_type == self._edb.definition.ComponentType.IC
1228
- or component_type == self._edb.definition.ComponentType.IO
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.definition.ComponentType.Other
1277
- or component_type == self._edb.definition.ComponentType.IC
1278
- or component_type == self._edb.definition.ComponentType.IO
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.edb_api.cell.terminal.PadstackInstanceTerminal.Create(
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.edb_api.cell.terminal.PadstackInstanceTerminal.Create(
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.edb_api.cell.terminal.BoundaryType.PecBoundary)
1341
- neg_pin_term.SetBoundaryType(self._pedb.edb_api.cell.terminal.BoundaryType.PecBoundary)
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.edb_api.cell.terminal.BoundaryType.PortBoundary)
1344
- neg_pin_term.SetBoundaryType(self._pedb.edb_api.cell.terminal.BoundaryType.PortBoundary)
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.edb_api.cell.terminal.PadstackInstanceTerminal.Create(
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.edb_api.cell.terminal.PadstackInstanceTerminal.Create(
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.edb_api.cell.terminal.BoundaryType.RlcBoundary)
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.edb_api.cell.terminal.BoundaryType.RlcBoundary)
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.utility.Rlc()
1426
+ rlc = self._edb.Utility.Rlc()
1419
1427
  if rlc_values[0]:
1420
1428
  rlc.REnabled = True
1421
- rlc.R = self._edb.utility.value(rlc_values[0])
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.utility.value(rlc_values[1])
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.utility.value(rlc_values[2])
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.cell.terminal.PinGroupTerminal.Create(
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.cell.layer_type_set.SignalLayerSet)
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.edb_api.definition.ComponentDef.FindByName(self._db, name)
1499
+ componentDefinition = self._pedb.core.Definition.ComponentDef.FindByName(self._db, name)
1492
1500
  if componentDefinition.IsNull():
1493
- componentDefinition = self._pedb.edb_api.definition.ComponentDef.Create(self._db, name, None)
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.edb_api.definition.ComponentDefPin.Create(
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.edb_api.cell.hierarchy.component.Create(
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.definition.ComponentType.Other)
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.cell.layer.FindByName(self._layout.layer_collection, new_cmp_layer_name)
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.utility.utility.Rlc()
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.definition.ComponentType.Resistor)
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.definition.ComponentType.Capacitor)
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.definition.ComponentType.Inductor)
1664
+ new_cmp.SetComponentType(self._edb.Definition.ComponentType.Inductor)
1657
1665
  else:
1658
- new_cmp.SetComponentType(self._edb.definition.ComponentType.Resistor)
1666
+ new_cmp.SetComponentType(self._edb.Definition.ComponentType.Resistor)
1659
1667
 
1660
- pin_pair = self._edb.utility.utility.PinPair(pins[0].GetName(), pins[1].GetName())
1661
- rlc_model = self._edb.cell.hierarchy._hierarchy.PinPairModel()
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.cell.hierarchy._hierarchy.RLCComponentProperty()
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.cell.hierarchy._hierarchy.SPICEModel()
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.definition.NPortComponentModel.FindByName(edbComponentDef, nPortModelName)
1791
+ nPortModel = self._edb.Definition.NPortComponentModel.FindByName(edbComponentDef, nPortModelName)
1784
1792
  if nPortModel.IsNull():
1785
- nPortModel = self._edb.definition.NPortComponentModel.Create(nPortModelName)
1793
+ nPortModel = self._edb.Definition.NPortComponentModel.Create(nPortModelName)
1786
1794
  nPortModel.SetReferenceFile(modelpath)
1787
1795
  edbComponentDef.AddComponentModel(nPortModel)
1788
1796
 
1789
- sParameterMod = self._edb.cell.hierarchy._hierarchy.SParameterModel()
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.cell.hierarchy.pin_group.GetUniqueName(self._active_layout)
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.cell.hierarchy.pin_group.GetUniqueName(
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.cell.hierarchy.pin_group.GetUniqueName(self._active_layout, group_name)
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.cell.hierarchy.pin_group.Create,
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._logger.info("Deleted {} components".format(len(deleted_comps)))
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.edb_api.cell.hierarchy.component):
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._get_edb_value(val).ToDouble()) for val in pad_params[1]])
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._edb.utility.Value(sball_height).ToDouble(), 9)
2079
+ sball_height = round(self._pedb.edb_value(sball_height).ToDouble(), 9)
2072
2080
  else:
2073
- sball_height = round(self._edb.utility.Value(sball_diam).ToDouble(), 9) / 2
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.definition.SolderballShape.Cylinder
2087
+ sball_shape = self._edb.Definition.SolderballShape.Cylinder
2080
2088
  else:
2081
- sball_shape = self._edb.definition.SolderballShape.Spheroid
2089
+ sball_shape = self._edb.Definition.SolderballShape.Spheroid
2082
2090
 
2083
2091
  cmp_property = edb_cmp.GetComponentProperty().Clone()
2084
- if cmp_type == self._edb.definition.ComponentType.IC:
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.definition.DieType.FlipChip)
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.definition.DieOrientation.ChipUp)
2096
+ ic_die_prop.SetOrientation(self._edb.Definition.DieOrientation.ChipUp)
2089
2097
  else:
2090
- ic_die_prop.SetOrientation(self._edb.definition.DieOrientation.ChipDown)
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.cell.hierarchy._hierarchy.RLCComponentProperty()
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.utility.utility.Rlc()
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.utility.utility.PinPair(from_pin.name, to_pin.name)
2176
- rlc_model = self._edb.cell.hierarchy._hierarchy.PinPairModel()
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.definition.ComponentDef.Create(self._db, part_name, footprint_cell)
2321
+ comp_def = self._edb.Definition.ComponentDef.Create(self._db, part_name, footprint_cell)
2314
2322
  for pin in pinlist:
2315
- self._edb.definition.ComponentDefPin.Create(comp_def, pin._edb_object.GetName())
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.edb_api.cell.hierarchy.component.FindByName(self._active_layout, reference_designator)
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.edb_api.cell.hierarchy.component):
2431
- component = self._pedb.edb_api.cell.hierarchy.component.FindByName(self._active_layout, component)
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.edb_api.ProductId.Designer, 11, val)
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.geometry.point_data(
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
  )
@@ -2766,8 +2774,8 @@ class Components(object):
2766
2774
  elif pars:
2767
2775
  delta_pins.append(1.5 * pars[0])
2768
2776
  w = min(pars[0], w)
2769
- elif pad.polygon_data.edb_api: # pragma: no cover
2770
- bbox = pad.polygon_data.edb_api.GetBBox()
2777
+ elif pad.polygon_data.core: # pragma: no cover
2778
+ bbox = pad.polygon_data.core.GetBBox()
2771
2779
  lower = [bbox.Item1.X.ToDouble(), bbox.Item1.Y.ToDouble()]
2772
2780
  upper = [bbox.Item2.X.ToDouble(), bbox.Item2.Y.ToDouble()]
2773
2781
  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.edb_api.cell.hierarchy.component.FindByComponentDef(
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.definition.NPortComponentModel.Create(name)
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.edb_api.cell.CellType.FootprintCell
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.edb_api.definition.ComponentDef.Create(self._pedb.active_db, name, footprint_cell)
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.edb_api.cell}
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.edb_api.definition.PackageDef.Create(self._pedb.active_db, name)
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
- pyedb_logger.warning(
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
  )