pyedb 0.54.0__py3-none-any.whl → 0.56.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 (105) 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 +19 -6
  13. pyedb/configuration/cfg_s_parameter_models.py +67 -172
  14. pyedb/configuration/cfg_setup.py +102 -295
  15. pyedb/configuration/configuration.py +64 -5
  16. pyedb/dotnet/database/Variables.py +26 -19
  17. pyedb/dotnet/database/cell/connectable.py +38 -9
  18. pyedb/dotnet/database/cell/hierarchy/component.py +28 -28
  19. pyedb/dotnet/database/cell/hierarchy/model.py +1 -1
  20. pyedb/dotnet/database/cell/layout.py +63 -2
  21. pyedb/dotnet/database/cell/layout_obj.py +2 -2
  22. pyedb/dotnet/database/cell/primitive/path.py +6 -8
  23. pyedb/dotnet/database/cell/primitive/primitive.py +3 -24
  24. pyedb/dotnet/database/cell/terminal/edge_terminal.py +2 -2
  25. pyedb/dotnet/database/cell/terminal/padstack_instance_terminal.py +1 -1
  26. pyedb/dotnet/database/cell/terminal/pingroup_terminal.py +1 -1
  27. pyedb/dotnet/database/cell/terminal/point_terminal.py +1 -1
  28. pyedb/dotnet/database/cell/terminal/terminal.py +24 -24
  29. pyedb/dotnet/database/cell/voltage_regulator.py +0 -21
  30. pyedb/dotnet/database/components.py +137 -124
  31. pyedb/dotnet/database/definition/component_def.py +4 -4
  32. pyedb/dotnet/database/definition/component_model.py +1 -1
  33. pyedb/dotnet/database/definition/package_def.py +2 -3
  34. pyedb/dotnet/database/dotnet/database.py +3 -199
  35. pyedb/dotnet/database/dotnet/primitive.py +3 -3
  36. pyedb/dotnet/database/edb_data/control_file.py +5 -5
  37. pyedb/dotnet/database/edb_data/hfss_extent_info.py +6 -6
  38. pyedb/dotnet/database/edb_data/layer_data.py +23 -23
  39. pyedb/dotnet/database/edb_data/padstacks_data.py +63 -88
  40. pyedb/dotnet/database/edb_data/primitives_data.py +5 -5
  41. pyedb/dotnet/database/edb_data/sources.py +6 -6
  42. pyedb/dotnet/database/edb_data/variables.py +1 -1
  43. pyedb/dotnet/database/geometry/point_data.py +14 -10
  44. pyedb/dotnet/database/geometry/polygon_data.py +3 -3
  45. pyedb/dotnet/database/hfss.py +46 -48
  46. pyedb/dotnet/database/layout_validation.py +14 -11
  47. pyedb/dotnet/database/materials.py +10 -11
  48. pyedb/dotnet/database/modeler.py +97 -91
  49. pyedb/dotnet/database/nets.py +19 -22
  50. pyedb/dotnet/database/padstack.py +171 -83
  51. pyedb/dotnet/database/siwave.py +42 -42
  52. pyedb/dotnet/database/stackup.py +140 -72
  53. pyedb/dotnet/database/utilities/heatsink.py +4 -4
  54. pyedb/dotnet/database/utilities/obj_base.py +2 -2
  55. pyedb/dotnet/database/utilities/simulation_setup.py +2 -2
  56. pyedb/dotnet/database/utilities/value.py +16 -16
  57. pyedb/dotnet/edb.py +230 -152
  58. pyedb/edb_logger.py +12 -27
  59. pyedb/extensions/create_cell_array.py +394 -0
  60. pyedb/extensions/via_design_backend.py +6 -3
  61. pyedb/generic/data_handlers.py +6 -7
  62. pyedb/generic/design_types.py +81 -30
  63. pyedb/generic/filesystem.py +5 -2
  64. pyedb/generic/general_methods.py +2 -122
  65. pyedb/generic/process.py +44 -108
  66. pyedb/generic/settings.py +79 -19
  67. pyedb/grpc/database/components.py +26 -4
  68. pyedb/grpc/database/control_file.py +5 -5
  69. pyedb/grpc/database/definition/materials.py +1 -1
  70. pyedb/grpc/database/definition/package_def.py +3 -3
  71. pyedb/grpc/database/definition/padstack_def.py +53 -0
  72. pyedb/grpc/database/geometry/polygon_data.py +1 -1
  73. pyedb/grpc/database/layout/layout.py +81 -5
  74. pyedb/grpc/database/layout_validation.py +5 -5
  75. pyedb/grpc/database/modeler.py +24 -16
  76. pyedb/grpc/database/net/net.py +15 -14
  77. pyedb/grpc/database/nets.py +70 -0
  78. pyedb/grpc/database/padstacks.py +122 -17
  79. pyedb/grpc/database/primitive/padstack_instance.py +175 -7
  80. pyedb/grpc/database/primitive/polygon.py +2 -2
  81. pyedb/grpc/database/simulation_setup/siwave_cpa_simulation_setup.py +3 -2
  82. pyedb/grpc/database/siwave.py +1 -1
  83. pyedb/grpc/database/source_excitations.py +12 -5
  84. pyedb/grpc/database/stackup.py +1 -1
  85. pyedb/grpc/database/terminal/bundle_terminal.py +1 -1
  86. pyedb/grpc/database/terminal/padstack_instance_terminal.py +1 -1
  87. pyedb/grpc/database/terminal/pingroup_terminal.py +1 -1
  88. pyedb/grpc/database/utility/value.py +1 -0
  89. pyedb/grpc/database/utility/xml_control_file.py +5 -5
  90. pyedb/grpc/edb.py +80 -30
  91. pyedb/grpc/edb_init.py +3 -3
  92. pyedb/grpc/rpc_session.py +14 -13
  93. pyedb/libraries/common.py +366 -0
  94. pyedb/libraries/rf_libraries/base_functions.py +1358 -0
  95. pyedb/libraries/rf_libraries/planar_antennas.py +628 -0
  96. pyedb/misc/decorators.py +61 -0
  97. pyedb/misc/misc.py +0 -13
  98. pyedb/modeler/geometry_operators.py +6 -6
  99. pyedb/siwave.py +6 -8
  100. pyedb/siwave_core/__init__.py +0 -0
  101. pyedb/siwave_core/cpa/__init__.py +0 -0
  102. {pyedb-0.54.0.dist-info → pyedb-0.56.0.dist-info}/METADATA +1 -2
  103. {pyedb-0.54.0.dist-info → pyedb-0.56.0.dist-info}/RECORD +105 -98
  104. {pyedb-0.54.0.dist-info → pyedb-0.56.0.dist-info}/WHEEL +0 -0
  105. {pyedb-0.54.0.dist-info → pyedb-0.56.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.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.core.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.core.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(
@@ -994,12 +1002,6 @@ class Components(object):
994
1002
  ]
995
1003
  pin_layers = cmp_pins[0].GetPadstackDef().GetData().GetLayerNames()
996
1004
  if port_type == SourceType.CoaxPort:
997
- if not solder_balls_height:
998
- solder_balls_height = self.instances[component.GetName()].solder_ball_height
999
- if not solder_balls_size:
1000
- solder_balls_size = self.instances[component.GetName()].solder_ball_diameter[0]
1001
- if not solder_balls_mid_size:
1002
- solder_balls_mid_size = self.instances[component.GetName()].solder_ball_diameter[1]
1003
1005
  if not ref_pins:
1004
1006
  self._logger.error(
1005
1007
  "No reference pins found on component. You might consider"
@@ -1008,40 +1010,51 @@ class Components(object):
1008
1010
  )
1009
1011
  return False
1010
1012
  pad_params = self._padstack.get_pad_parameters(pin=cmp_pins[0], layername=pin_layers[0], pad_type=0)
1011
- if not pad_params[0] == 7:
1012
- if not solder_balls_size: # pragma no cover
1013
- sball_diam = min([self._pedb.edb_value(val).ToDouble() for val in pad_params[1]])
1014
- sball_mid_diam = sball_diam
1013
+
1014
+ # If at least one of the solderball arguments is not None, calculate the rest and set solderballs
1015
+ if not (not solder_balls_height and not solder_balls_size and not solder_balls_mid_size):
1016
+ if not solder_balls_height:
1017
+ solder_balls_height = self.instances[component.GetName()].solder_ball_height
1018
+ if not solder_balls_size:
1019
+ solder_balls_size = self.instances[component.GetName()].solder_ball_diameter[0]
1020
+ if not solder_balls_mid_size:
1021
+ solder_balls_mid_size = self.instances[component.GetName()].solder_ball_diameter[1]
1022
+
1023
+ if not pad_params[0] == 7:
1024
+ if not solder_balls_size: # pragma no cover
1025
+ sball_diam = min([self._pedb.edb_value(val).ToDouble() for val in pad_params[1]])
1026
+ sball_mid_diam = sball_diam
1027
+ else: # pragma no cover
1028
+ sball_diam = solder_balls_size
1029
+ if solder_balls_mid_size:
1030
+ sball_mid_diam = solder_balls_mid_size
1031
+ else:
1032
+ sball_mid_diam = solder_balls_size
1033
+ if not solder_balls_height: # pragma no cover
1034
+ solder_balls_height = 2 * sball_diam / 3
1015
1035
  else: # pragma no cover
1016
- sball_diam = solder_balls_size
1036
+ if not solder_balls_size:
1037
+ bbox = pad_params[1]
1038
+ sball_diam = min([abs(bbox[2] - bbox[0]), abs(bbox[3] - bbox[1])]) * 0.8
1039
+ else:
1040
+ sball_diam = solder_balls_size
1041
+ if not solder_balls_height:
1042
+ solder_balls_height = 2 * sball_diam / 3
1017
1043
  if solder_balls_mid_size:
1018
1044
  sball_mid_diam = solder_balls_mid_size
1019
1045
  else:
1020
- sball_mid_diam = solder_balls_size
1021
- if not solder_balls_height: # pragma no cover
1022
- solder_balls_height = 2 * sball_diam / 3
1023
- else: # pragma no cover
1024
- if not solder_balls_size:
1025
- bbox = pad_params[1]
1026
- sball_diam = min([abs(bbox[2] - bbox[0]), abs(bbox[3] - bbox[1])]) * 0.8
1027
- else:
1028
- sball_diam = solder_balls_size
1029
- if not solder_balls_height:
1030
- solder_balls_height = 2 * sball_diam / 3
1031
- if solder_balls_mid_size:
1032
- sball_mid_diam = solder_balls_mid_size
1033
- else:
1034
- sball_mid_diam = sball_diam
1035
- sball_shape = "Cylinder"
1036
- if not sball_diam == sball_mid_diam:
1037
- sball_shape = "Spheroid"
1038
- self.set_solder_ball(
1039
- component=component,
1040
- sball_height=solder_balls_height,
1041
- sball_diam=sball_diam,
1042
- sball_mid_diam=sball_mid_diam,
1043
- shape=sball_shape,
1044
- )
1046
+ sball_mid_diam = sball_diam
1047
+ sball_shape = "Cylinder"
1048
+ if not sball_diam == sball_mid_diam:
1049
+ sball_shape = "Spheroid"
1050
+ self.set_solder_ball(
1051
+ component=component,
1052
+ sball_height=solder_balls_height,
1053
+ sball_diam=sball_diam,
1054
+ sball_mid_diam=sball_mid_diam,
1055
+ shape=sball_shape,
1056
+ )
1057
+
1045
1058
  for pin in cmp_pins:
1046
1059
  self._padstack.create_coax_port(padstackinstance=pin, name=port_name)
1047
1060
 
@@ -1155,7 +1168,7 @@ class Components(object):
1155
1168
  for term in list(self._pedb.active_layout.Terminals):
1156
1169
  if term.GetName() == term_name:
1157
1170
  return term
1158
- term = self._edb.cell.terminal.PadstackInstanceTerminal.Create(
1171
+ term = self._edb.Cell.Terminal.PadstackInstanceTerminal.Create(
1159
1172
  pin.GetLayout(), pin.GetNet(), term_name, pin, from_layer
1160
1173
  )
1161
1174
  return term
@@ -1223,9 +1236,9 @@ class Components(object):
1223
1236
  return False
1224
1237
  component_type = component.edbcomponent.GetComponentType()
1225
1238
  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
1239
+ component_type == self._edb.Definition.ComponentType.Other
1240
+ or component_type == self._edb.Definition.ComponentType.IC
1241
+ or component_type == self._edb.Definition.ComponentType.IO
1229
1242
  ):
1230
1243
  self._logger.info("Component %s passed to deactivate is not an RLC.", component.refdes)
1231
1244
  return False
@@ -1273,9 +1286,9 @@ class Components(object):
1273
1286
  return False
1274
1287
  component_type = component.edbcomponent.GetComponentType()
1275
1288
  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
1289
+ component_type == self._edb.Definition.ComponentType.Other
1290
+ or component_type == self._edb.Definition.ComponentType.IC
1291
+ or component_type == self._edb.Definition.ComponentType.IO
1279
1292
  ):
1280
1293
  self._logger.info("Component %s passed to deactivate is not an RLC.", component.refdes)
1281
1294
  return False
@@ -1316,7 +1329,7 @@ class Components(object):
1316
1329
  pins = self.get_pin_from_component(component.refdes)
1317
1330
  if len(pins) == 2: # pragma: no cover
1318
1331
  pin_layers = self._padstack._get_pin_layer_range(pins[0])
1319
- pos_pin_term = self._pedb.core.cell.terminal.PadstackInstanceTerminal.Create(
1332
+ pos_pin_term = self._pedb.core.Cell.Terminal.PadstackInstanceTerminal.Create(
1320
1333
  self._active_layout,
1321
1334
  pins[0].net._edb_object,
1322
1335
  f"{component.refdes}_{pins[0]._edb_object.GetName()}",
@@ -1326,7 +1339,7 @@ class Components(object):
1326
1339
  )
1327
1340
  if not pos_pin_term: # pragma: no cover
1328
1341
  return False
1329
- neg_pin_term = self._pedb.core.cell.terminal.PadstackInstanceTerminal.Create(
1342
+ neg_pin_term = self._pedb.core.Cell.Terminal.PadstackInstanceTerminal.Create(
1330
1343
  self._active_layout,
1331
1344
  pins[1].net._edb_object,
1332
1345
  f"{component.refdes}_{pins[1]._edb_object.GetName()}_ref",
@@ -1337,11 +1350,11 @@ class Components(object):
1337
1350
  if not neg_pin_term: # pragma: no cover
1338
1351
  return False
1339
1352
  if pec_boundary:
1340
- pos_pin_term.SetBoundaryType(self._pedb.core.cell.terminal.BoundaryType.PecBoundary)
1341
- neg_pin_term.SetBoundaryType(self._pedb.core.cell.terminal.BoundaryType.PecBoundary)
1353
+ pos_pin_term.SetBoundaryType(self._pedb.core.Cell.Terminal.BoundaryType.PecBoundary)
1354
+ neg_pin_term.SetBoundaryType(self._pedb.core.Cell.Terminal.BoundaryType.PecBoundary)
1342
1355
  else:
1343
- pos_pin_term.SetBoundaryType(self._pedb.core.cell.terminal.BoundaryType.PortBoundary)
1344
- neg_pin_term.SetBoundaryType(self._pedb.core.cell.terminal.BoundaryType.PortBoundary)
1356
+ pos_pin_term.SetBoundaryType(self._pedb.core.Cell.Terminal.BoundaryType.PortBoundary)
1357
+ neg_pin_term.SetBoundaryType(self._pedb.core.Cell.Terminal.BoundaryType.PortBoundary)
1345
1358
  pos_pin_term.SetName(component.refdes)
1346
1359
  pos_pin_term.SetReferenceTerminal(neg_pin_term)
1347
1360
  if circuit_ports and not pec_boundary:
@@ -1382,7 +1395,7 @@ class Components(object):
1382
1395
  pins = self.get_pin_from_component(component.refdes)
1383
1396
  if len(pins) == 2: # pragma: no cover
1384
1397
  pin_layer = self._padstack._get_pin_layer_range(pins[0])[0]
1385
- pos_pin_term = self._pedb.core.cell.terminal.PadstackInstanceTerminal.Create(
1398
+ pos_pin_term = self._pedb.core.Cell.Terminal.PadstackInstanceTerminal.Create(
1386
1399
  self._active_layout,
1387
1400
  pins[0]._edb_object.GetNet(),
1388
1401
  f"{component.refdes}_{pins[0]._edb_object.GetName()}",
@@ -1392,7 +1405,7 @@ class Components(object):
1392
1405
  )
1393
1406
  if not pos_pin_term: # pragma: no cover
1394
1407
  return False
1395
- neg_pin_term = self._pedb.core.cell.terminal.PadstackInstanceTerminal.Create(
1408
+ neg_pin_term = self._pedb.core.Cell.Terminal.PadstackInstanceTerminal.Create(
1396
1409
  self._active_layout,
1397
1410
  pins[1]._edb_object.GetNet(),
1398
1411
  f"{component.refdes}_{pins[1]._edb_object.GetName()}_ref",
@@ -1402,29 +1415,29 @@ class Components(object):
1402
1415
  )
1403
1416
  if not neg_pin_term: # pragma: no cover
1404
1417
  return False
1405
- pos_pin_term.SetBoundaryType(self._pedb.core.cell.terminal.BoundaryType.RlcBoundary)
1418
+ pos_pin_term.SetBoundaryType(self._pedb.core.Cell.Terminal.BoundaryType.RlcBoundary)
1406
1419
  if not circuit_type:
1407
1420
  pos_pin_term.SetIsCircuitPort(False)
1408
1421
  else:
1409
1422
  pos_pin_term.SetIsCircuitPort(True)
1410
1423
  pos_pin_term.SetName(component.refdes)
1411
- neg_pin_term.SetBoundaryType(self._pedb.core.cell.terminal.BoundaryType.RlcBoundary)
1424
+ neg_pin_term.SetBoundaryType(self._pedb.core.Cell.Terminal.BoundaryType.RlcBoundary)
1412
1425
  if not circuit_type:
1413
1426
  neg_pin_term.SetIsCircuitPort(False)
1414
1427
  else:
1415
1428
  neg_pin_term.SetIsCircuitPort(True)
1416
1429
  pos_pin_term.SetReferenceTerminal(neg_pin_term)
1417
1430
  rlc_values = component.rlc_values
1418
- rlc = self._edb.utility.Rlc()
1431
+ rlc = self._edb.Utility.Rlc()
1419
1432
  if rlc_values[0]:
1420
1433
  rlc.REnabled = True
1421
- rlc.R = self._edb.utility.value(rlc_values[0])
1434
+ rlc.R = self._edb.Utility.Value(rlc_values[0])
1422
1435
  if rlc_values[1]:
1423
1436
  rlc.LEnabled = True
1424
- rlc.L = self._edb.utility.value(rlc_values[1])
1437
+ rlc.L = self._edb.Utility.Value(rlc_values[1])
1425
1438
  if rlc_values[2]:
1426
1439
  rlc.CEnabled = True
1427
- rlc.C = self._edb.utility.value(rlc_values[2])
1440
+ rlc.C = self._edb.Utility.Value(rlc_values[2])
1428
1441
  rlc.is_parallel = component.is_parallel_rlc
1429
1442
  pos_pin_term.SetRlcBoundaryParameters(rlc)
1430
1443
  self._logger.info("Component {} has been replaced by port".format(component.refdes))
@@ -1457,7 +1470,7 @@ class Components(object):
1457
1470
  for t in list(self._pedb.active_layout.Terminals):
1458
1471
  if t.GetName() == term_name:
1459
1472
  return t
1460
- pingroup_term = self._edb.cell.terminal.PinGroupTerminal.Create(
1473
+ pingroup_term = self._edb.Cell.Terminal.PinGroupTerminal.Create(
1461
1474
  self._active_layout, pingroup.GetNet(), term_name, pingroup, isref
1462
1475
  )
1463
1476
  if term_type == "circuit":
@@ -1481,16 +1494,16 @@ class Components(object):
1481
1494
 
1482
1495
 
1483
1496
  """
1484
- signal_layers = cmp.GetLayout().GetLayerCollection().Layers(self._edb.cell.layer_type_set.SignalLayerSet)
1497
+ signal_layers = cmp.GetLayout().GetLayerCollection().Layers(self._edb.Cell.layer_type_set.SignalLayerSet)
1485
1498
  if cmp.GetPlacementLayer() == signal_layers[0]:
1486
1499
  return True
1487
1500
  else:
1488
1501
  return False
1489
1502
 
1490
1503
  def _getComponentDefinition(self, name, pins):
1491
- componentDefinition = self._pedb.core.definition.ComponentDef.FindByName(self._db, name)
1504
+ componentDefinition = self._pedb.core.Definition.ComponentDef.FindByName(self._db, name)
1492
1505
  if componentDefinition.IsNull():
1493
- componentDefinition = self._pedb.core.definition.ComponentDef.Create(self._db, name, None)
1506
+ componentDefinition = self._pedb.core.Definition.ComponentDef.Create(self._db, name, None)
1494
1507
  if componentDefinition.IsNull():
1495
1508
  self._logger.error("Failed to create component definition {}".format(name))
1496
1509
  return None
@@ -1499,7 +1512,7 @@ class Components(object):
1499
1512
  if not pin.GetName():
1500
1513
  pin.SetName(str(ind))
1501
1514
  ind += 1
1502
- componentDefinitionPin = self._pedb.core.definition.ComponentDefPin.Create(
1515
+ componentDefinitionPin = self._pedb.core.Definition.ComponentDefPin.Create(
1503
1516
  componentDefinition, pin.GetName()
1504
1517
  )
1505
1518
  if componentDefinitionPin.IsNull():
@@ -1614,7 +1627,7 @@ class Components(object):
1614
1627
  compdef = self._getComponentDefinition(component_name, pins)
1615
1628
  if not compdef:
1616
1629
  return False
1617
- new_cmp = self._pedb.core.cell.hierarchy.component.Create(
1630
+ new_cmp = self._pedb.core.Cell.Hierarchy.Component.Create(
1618
1631
  self._active_layout, component_name, compdef.GetName()
1619
1632
  )
1620
1633
 
@@ -1622,16 +1635,16 @@ class Components(object):
1622
1635
  for pin in pins:
1623
1636
  pin.SetIsLayoutPin(True)
1624
1637
  new_cmp.AddMember(pin)
1625
- new_cmp.SetComponentType(self._edb.definition.ComponentType.Other)
1638
+ new_cmp.SetComponentType(self._edb.Definition.ComponentType.Other)
1626
1639
  if not placement_layer:
1627
1640
  new_cmp_layer_name = pins[0].GetPadstackDef().GetData().GetLayerNames()[0]
1628
1641
  else:
1629
1642
  new_cmp_layer_name = placement_layer
1630
- new_cmp_placement_layer = self._edb.cell.layer.FindByName(self._layout.layer_collection, new_cmp_layer_name)
1643
+ new_cmp_placement_layer = self._edb.Cell.Layer.FindByName(self._layout.layer_collection, new_cmp_layer_name)
1631
1644
  new_cmp.SetPlacementLayer(new_cmp_placement_layer)
1632
1645
 
1633
1646
  if is_rlc and len(pins) == 2:
1634
- rlc = self._edb.utility.utility.Rlc()
1647
+ rlc = self._edb.Utility.Rlc()
1635
1648
  rlc.IsParallel = is_parallel
1636
1649
  if r_value is None:
1637
1650
  rlc.REnabled = False
@@ -1649,18 +1662,18 @@ class Components(object):
1649
1662
  rlc.CEnabled = True
1650
1663
  rlc.C = self._get_edb_value(c_value)
1651
1664
  if rlc.REnabled and not rlc.CEnabled and not rlc.CEnabled:
1652
- new_cmp.SetComponentType(self._edb.definition.ComponentType.Resistor)
1665
+ new_cmp.SetComponentType(self._edb.Definition.ComponentType.Resistor)
1653
1666
  elif rlc.CEnabled and not rlc.REnabled and not rlc.LEnabled:
1654
- new_cmp.SetComponentType(self._edb.definition.ComponentType.Capacitor)
1667
+ new_cmp.SetComponentType(self._edb.Definition.ComponentType.Capacitor)
1655
1668
  elif rlc.LEnabled and not rlc.REnabled and not rlc.CEnabled:
1656
- new_cmp.SetComponentType(self._edb.definition.ComponentType.Inductor)
1669
+ new_cmp.SetComponentType(self._edb.Definition.ComponentType.Inductor)
1657
1670
  else:
1658
- new_cmp.SetComponentType(self._edb.definition.ComponentType.Resistor)
1671
+ new_cmp.SetComponentType(self._edb.Definition.ComponentType.Resistor)
1659
1672
 
1660
- pin_pair = self._edb.utility.utility.PinPair(pins[0].GetName(), pins[1].GetName())
1661
- rlc_model = self._edb.cell.hierarchy._hierarchy.PinPairModel()
1673
+ pin_pair = self._edb.Utility.PinPair(pins[0].GetName(), pins[1].GetName())
1674
+ rlc_model = self._edb.Cell.Hierarchy.PinPairModel()
1662
1675
  rlc_model.SetPinPairRlc(pin_pair, rlc)
1663
- edb_rlc_component_property = self._edb.cell.hierarchy._hierarchy.RLCComponentProperty()
1676
+ edb_rlc_component_property = self._edb.Cell.Hierarchy.RLCComponentProperty()
1664
1677
  if not edb_rlc_component_property.SetModel(rlc_model) or not new_cmp.SetComponentProperty(
1665
1678
  edb_rlc_component_property
1666
1679
  ):
@@ -1761,7 +1774,7 @@ class Components(object):
1761
1774
  pinNames.remove(pinNames[0])
1762
1775
  break
1763
1776
  if len(pinNames) == pinNumber:
1764
- spiceMod = self._edb.cell.hierarchy._hierarchy.SPICEModel()
1777
+ spiceMod = self._edb.Cell.Hierarchy.SPICEModel()
1765
1778
  spiceMod.SetModelPath(modelpath)
1766
1779
  spiceMod.SetModelName(modelname)
1767
1780
  terminal = 1
@@ -1780,13 +1793,13 @@ class Components(object):
1780
1793
  elif model_type == "Touchstone": # pragma: no cover
1781
1794
  nPortModelName = modelname
1782
1795
  edbComponentDef = edbComponent.GetComponentDef()
1783
- nPortModel = self._edb.definition.NPortComponentModel.FindByName(edbComponentDef, nPortModelName)
1796
+ nPortModel = self._edb.Definition.NPortComponentModel.FindByName(edbComponentDef, nPortModelName)
1784
1797
  if nPortModel.IsNull():
1785
- nPortModel = self._edb.definition.NPortComponentModel.Create(nPortModelName)
1798
+ nPortModel = self._edb.Definition.NPortComponentModel.Create(nPortModelName)
1786
1799
  nPortModel.SetReferenceFile(modelpath)
1787
1800
  edbComponentDef.AddComponentModel(nPortModel)
1788
1801
 
1789
- sParameterMod = self._edb.cell.hierarchy._hierarchy.SParameterModel()
1802
+ sParameterMod = self._edb.Cell.Hierarchy.SParameterModel()
1790
1803
  sParameterMod.SetComponentModelName(nPortModelName)
1791
1804
  gndnets = list(filter(lambda x: "gnd" in x.lower(), componentNets))
1792
1805
  if len(gndnets) > 0: # pragma: no cover
@@ -1831,7 +1844,7 @@ class Components(object):
1831
1844
  if _pins:
1832
1845
  pins = _pins
1833
1846
  if group_name is None:
1834
- group_name = self._edb.cell.hierarchy.pin_group.GetUniqueName(self._active_layout)
1847
+ group_name = self._edb.Cell.Hierarchy.PinGroup.GetUniqueName(self._active_layout)
1835
1848
  for pin in pins:
1836
1849
  pin.SetIsLayoutPin(True)
1837
1850
  forbiden_car = "-><"
@@ -1845,18 +1858,18 @@ class Components(object):
1845
1858
  if p.GetName() in pnames:
1846
1859
  continue
1847
1860
  else:
1848
- group_name = self._edb.cell.hierarchy.pin_group.GetUniqueName(
1861
+ group_name = self._edb.Cell.Hierarchy.PinGroup.GetUniqueName(
1849
1862
  self._active_layout, group_name
1850
1863
  )
1851
1864
  pin_group_exists = False
1852
1865
  else:
1853
- group_name = self._edb.cell.hierarchy.pin_group.GetUniqueName(self._active_layout, group_name)
1866
+ group_name = self._edb.Cell.Hierarchy.PinGroup.GetUniqueName(self._active_layout, group_name)
1854
1867
  pin_group_exists = False
1855
1868
  if pin_group_exists:
1856
1869
  return pgroup
1857
1870
  pingroup = _retry_ntimes(
1858
1871
  10,
1859
- self._edb.cell.hierarchy.pin_group.Create,
1872
+ self._edb.Cell.Hierarchy.PinGroup.Create,
1860
1873
  self._active_layout,
1861
1874
  group_name,
1862
1875
  convert_py_list_to_net_list(pins),
@@ -1904,7 +1917,7 @@ class Components(object):
1904
1917
  deleted_comps.append(comp)
1905
1918
  if not deactivate_only:
1906
1919
  self.refresh_components()
1907
- self._pedb._logger.info("Deleted {} components".format(len(deleted_comps)))
1920
+ self._pedb.logger.info("Deleted {} components".format(len(deleted_comps)))
1908
1921
 
1909
1922
  return deleted_comps
1910
1923
 
@@ -2053,7 +2066,7 @@ class Components(object):
2053
2066
  >>> edbapp.components.set_solder_ball("A1")
2054
2067
 
2055
2068
  """
2056
- if not isinstance(component, self._pedb.core.cell.hierarchy.component):
2069
+ if not isinstance(component, self._pedb.core.Cell.Hierarchy.Component):
2057
2070
  edb_cmp = self.get_component_by_name(component)._edb_object
2058
2071
  cmp = self.instances[component]
2059
2072
  else: # pragma: no cover
@@ -2065,29 +2078,29 @@ class Components(object):
2065
2078
  pin1 = list(cmp.pins.values())[0].pin
2066
2079
  pin_layers = pin1.GetPadstackDef().GetData().GetLayerNames()
2067
2080
  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]])
2081
+ _sb_diam = min([abs(self._pedb.edb_value(val).ToDouble()) for val in pad_params[1]])
2069
2082
  sball_diam = 0.8 * _sb_diam
2070
2083
  if sball_height:
2071
- sball_height = round(self._edb.utility.Value(sball_height).ToDouble(), 9)
2084
+ sball_height = round(self._pedb.edb_value(sball_height).ToDouble(), 9)
2072
2085
  else:
2073
- sball_height = round(self._edb.utility.Value(sball_diam).ToDouble(), 9) / 2
2086
+ sball_height = round(self._pedb.edb_value(sball_diam).ToDouble(), 9) / 2
2074
2087
 
2075
2088
  if not sball_mid_diam:
2076
2089
  sball_mid_diam = sball_diam
2077
2090
 
2078
2091
  if shape.lower() == "cylinder":
2079
- sball_shape = self._edb.definition.SolderballShape.Cylinder
2092
+ sball_shape = self._edb.Definition.SolderballShape.Cylinder
2080
2093
  else:
2081
- sball_shape = self._edb.definition.SolderballShape.Spheroid
2094
+ sball_shape = self._edb.Definition.SolderballShape.Spheroid
2082
2095
 
2083
2096
  cmp_property = edb_cmp.GetComponentProperty().Clone()
2084
- if cmp_type == self._edb.definition.ComponentType.IC:
2097
+ if cmp_type == self._edb.Definition.ComponentType.IC:
2085
2098
  ic_die_prop = cmp_property.GetDieProperty().Clone()
2086
- ic_die_prop.SetType(self._edb.definition.DieType.FlipChip)
2099
+ ic_die_prop.SetType(self._edb.Definition.DieType.FlipChip)
2087
2100
  if chip_orientation.lower() == "chip_up":
2088
- ic_die_prop.SetOrientation(self._edb.definition.DieOrientation.ChipUp)
2101
+ ic_die_prop.SetOrientation(self._edb.Definition.DieOrientation.ChipUp)
2089
2102
  else:
2090
- ic_die_prop.SetOrientation(self._edb.definition.DieOrientation.ChipDown)
2103
+ ic_die_prop.SetOrientation(self._edb.Definition.DieOrientation.ChipDown)
2091
2104
  cmp_property.SetDieProperty(ic_die_prop)
2092
2105
 
2093
2106
  solder_ball_prop = cmp_property.GetSolderBallProperty().Clone()
@@ -2149,13 +2162,13 @@ class Components(object):
2149
2162
  self._logger.info("No parameters passed, component %s is disabled.", componentname)
2150
2163
  return True
2151
2164
  edb_component = self.get_component_by_name(componentname)._edb_object
2152
- edb_rlc_component_property = self._edb.cell.hierarchy._hierarchy.RLCComponentProperty()
2165
+ edb_rlc_component_property = self._edb.Cell.Hierarchy.RLCComponentProperty()
2153
2166
  component_pins = self.get_pin_from_component(componentname)
2154
2167
  pin_number = len(component_pins)
2155
2168
  if pin_number == 2:
2156
2169
  from_pin = component_pins[0]
2157
2170
  to_pin = component_pins[1]
2158
- rlc = self._edb.utility.utility.Rlc()
2171
+ rlc = self._edb.Utility.Rlc()
2159
2172
  rlc.IsParallel = isparallel
2160
2173
  if res_value is not None:
2161
2174
  rlc.REnabled = True
@@ -2172,8 +2185,8 @@ class Components(object):
2172
2185
  rlc.C = self._get_edb_value(cap_value)
2173
2186
  else:
2174
2187
  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()
2188
+ pin_pair = self._edb.Utility.PinPair(from_pin.name, to_pin.name)
2189
+ rlc_model = self._edb.Cell.Hierarchy.PinPairModel()
2177
2190
  rlc_model.SetPinPairRlc(pin_pair, rlc)
2178
2191
  if not edb_rlc_component_property.SetModel(rlc_model) or not edb_component.SetComponentProperty(
2179
2192
  edb_rlc_component_property
@@ -2310,9 +2323,9 @@ class Components(object):
2310
2323
  pinlist = self.get_pin_from_component(refdes)
2311
2324
  if not part_name in self.definitions:
2312
2325
  footprint_cell = self.definitions[comp.partname]._edb_object.GetFootprintCell()
2313
- comp_def = self._edb.definition.ComponentDef.Create(self._db, part_name, footprint_cell)
2326
+ comp_def = self._edb.Definition.ComponentDef.Create(self._db, part_name, footprint_cell)
2314
2327
  for pin in pinlist:
2315
- self._edb.definition.ComponentDefPin.Create(comp_def, pin._edb_object.GetName())
2328
+ self._edb.Definition.ComponentDefPin.Create(comp_def, pin._edb_object.GetName())
2316
2329
 
2317
2330
  p_layer = comp.placement_layer
2318
2331
  refdes_temp = comp.refdes + "_temp"
@@ -2388,7 +2401,7 @@ class Components(object):
2388
2401
  reference_designator : str
2389
2402
  Reference designator of the component.
2390
2403
  """
2391
- obj = self._pedb.core.cell.hierarchy.component.FindByName(self._active_layout, reference_designator)
2404
+ obj = self._pedb.core.Cell.Hierarchy.Component.FindByName(self._active_layout, reference_designator)
2392
2405
  return EDBComponent(self._pedb, obj)
2393
2406
 
2394
2407
  def get_pin_from_component(self, component, netName=None, pinName=None, net_name=None, pin_name=None):
@@ -2427,8 +2440,8 @@ class Components(object):
2427
2440
 
2428
2441
  """
2429
2442
  warnings.warn("Use new property :func:`edb.padstacks.get_instances` instead.", DeprecationWarning)
2430
- if not isinstance(component, self._pedb.core.cell.hierarchy.component):
2431
- component = self._pedb.core.cell.hierarchy.component.FindByName(self._active_layout, component)
2443
+ if not isinstance(component, self._pedb.core.Cell.Hierarchy.Component):
2444
+ component = self._pedb.core.Cell.Hierarchy.Component.FindByName(self._active_layout, component)
2432
2445
  if pinName:
2433
2446
  warnings.warn("Use argument `pin_name` instead of `pinName`", DeprecationWarning)
2434
2447
  if netName:
@@ -2490,7 +2503,7 @@ class Components(object):
2490
2503
  if isinstance(pin, EDBPadstackInstance):
2491
2504
  pin = pin._edb_padstackinstance
2492
2505
  val = String("")
2493
- _, name = pin.GetProductProperty(self._edb.core.ProductId.Designer, 11, val)
2506
+ _, name = pin.GetProductProperty(self._edb.ProductId.Designer, 11, val)
2494
2507
  name = str(name).strip("'")
2495
2508
  return name
2496
2509
 
@@ -2552,7 +2565,7 @@ class Components(object):
2552
2565
  transformed_pt_pos = pt_pos
2553
2566
  else:
2554
2567
  transformed_pt_pos = pin.GetComponent().GetTransform().TransformPoint(pt_pos)
2555
- pin_xy = self._edb.geometry.point_data(
2568
+ pin_xy = self._edb.Geometry.PointData(
2556
2569
  self._get_edb_value(str(transformed_pt_pos.X.ToDouble())),
2557
2570
  self._get_edb_value(str(transformed_pt_pos.Y.ToDouble())),
2558
2571
  )