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.
- 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/Variables.py +26 -19
- 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 +137 -124
- 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 +171 -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 +230 -152
- pyedb/edb_logger.py +12 -27
- pyedb/extensions/create_cell_array.py +394 -0
- pyedb/extensions/via_design_backend.py +6 -3
- pyedb/generic/data_handlers.py +6 -7
- pyedb/generic/design_types.py +81 -30
- pyedb/generic/filesystem.py +5 -2
- pyedb/generic/general_methods.py +2 -122
- pyedb/generic/process.py +44 -108
- pyedb/generic/settings.py +79 -19
- pyedb/grpc/database/components.py +26 -4
- 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 +81 -5
- pyedb/grpc/database/layout_validation.py +5 -5
- pyedb/grpc/database/modeler.py +24 -16
- pyedb/grpc/database/net/net.py +15 -14
- pyedb/grpc/database/nets.py +70 -0
- pyedb/grpc/database/padstacks.py +122 -17
- pyedb/grpc/database/primitive/padstack_instance.py +175 -7
- pyedb/grpc/database/primitive/polygon.py +2 -2
- pyedb/grpc/database/simulation_setup/siwave_cpa_simulation_setup.py +3 -2
- pyedb/grpc/database/siwave.py +1 -1
- pyedb/grpc/database/source_excitations.py +12 -5
- 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/value.py +1 -0
- pyedb/grpc/database/utility/xml_control_file.py +5 -5
- pyedb/grpc/edb.py +80 -30
- pyedb/grpc/edb_init.py +3 -3
- pyedb/grpc/rpc_session.py +14 -13
- 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/modeler/geometry_operators.py +6 -6
- pyedb/siwave.py +6 -8
- pyedb/siwave_core/__init__.py +0 -0
- pyedb/siwave_core/cpa/__init__.py +0 -0
- {pyedb-0.54.0.dist-info → pyedb-0.56.0.dist-info}/METADATA +1 -2
- {pyedb-0.54.0.dist-info → pyedb-0.56.0.dist-info}/RECORD +105 -98
- {pyedb-0.54.0.dist-info → pyedb-0.56.0.dist-info}/WHEEL +0 -0
- {pyedb-0.54.0.dist-info → pyedb-0.56.0.dist-info}/licenses/LICENSE +0 -0
pyedb/dotnet/database/modeler.py
CHANGED
|
@@ -26,6 +26,7 @@ This module contains these classes: `EdbLayout` and `Shape`.
|
|
|
26
26
|
import math
|
|
27
27
|
import warnings
|
|
28
28
|
|
|
29
|
+
from pyedb.dotnet.clr_module import Tuple
|
|
29
30
|
from pyedb.dotnet.database.cell.primitive.bondwire import Bondwire
|
|
30
31
|
from pyedb.dotnet.database.dotnet.primitive import CircleDotNet, RectangleDotNet
|
|
31
32
|
from pyedb.dotnet.database.edb_data.primitives_data import Primitive, cast
|
|
@@ -289,7 +290,7 @@ class Modeler(object):
|
|
|
289
290
|
if not isinstance(point, list) and len(point) == 2:
|
|
290
291
|
self._logger.error("Provided point must be a list of two values")
|
|
291
292
|
return False
|
|
292
|
-
pt = self._edb.
|
|
293
|
+
pt = self._edb.Geometry.PointData(self._pedb.edb_value(point[0]), self._pedb.edb_value(point[1]))
|
|
293
294
|
if nets:
|
|
294
295
|
if isinstance(nets, str):
|
|
295
296
|
nets = [nets]
|
|
@@ -536,30 +537,30 @@ class Modeler(object):
|
|
|
536
537
|
"""
|
|
537
538
|
net = self._pedb.nets.find_or_create_net(net_name)
|
|
538
539
|
if start_cap_style.lower() == "round":
|
|
539
|
-
start_cap_style = self._edb.
|
|
540
|
+
start_cap_style = self._edb.Cell.Primitive.PathEndCapStyle.Round
|
|
540
541
|
elif start_cap_style.lower() == "extended":
|
|
541
|
-
start_cap_style = self._edb.
|
|
542
|
+
start_cap_style = self._edb.Cell.Primitive.PathEndCapStyle.Extended # pragma: no cover
|
|
542
543
|
else:
|
|
543
|
-
start_cap_style = self._edb.
|
|
544
|
+
start_cap_style = self._edb.Cell.Primitive.PathEndCapStyle.Flat # pragma: no cover
|
|
544
545
|
if end_cap_style.lower() == "round":
|
|
545
|
-
end_cap_style = self._edb.
|
|
546
|
+
end_cap_style = self._edb.Cell.Primitive.PathEndCapStyle.Round # pragma: no cover
|
|
546
547
|
elif end_cap_style.lower() == "extended":
|
|
547
|
-
end_cap_style = self._edb.
|
|
548
|
+
end_cap_style = self._edb.Cell.Primitive.PathEndCapStyle.Extended # pragma: no cover
|
|
548
549
|
else:
|
|
549
|
-
end_cap_style = self._edb.
|
|
550
|
+
end_cap_style = self._edb.Cell.Primitive.PathEndCapStyle.Flat
|
|
550
551
|
if corner_style.lower() == "round":
|
|
551
|
-
corner_style = self._edb.
|
|
552
|
+
corner_style = self._edb.Cell.Primitive.PathCornerStyle.RoundCorner
|
|
552
553
|
elif corner_style.lower() == "sharp":
|
|
553
|
-
corner_style = self._edb.
|
|
554
|
+
corner_style = self._edb.Cell.Primitive.PathCornerStyle.SharpCorner # pragma: no cover
|
|
554
555
|
else:
|
|
555
|
-
corner_style = self._edb.
|
|
556
|
+
corner_style = self._edb.Cell.Primitive.PathCornerStyle.MiterCorner # pragma: no cover
|
|
556
557
|
|
|
557
558
|
pointlists = [self._pedb.point_data(i[0], i[1]) for i in path_list.points]
|
|
558
|
-
polygonData = self._edb.
|
|
559
|
-
polygon = self._edb.
|
|
559
|
+
polygonData = self._edb.Geometry.PolygonData(convert_py_list_to_net_list(pointlists), False)
|
|
560
|
+
polygon = self._edb.Cell.Primitive.Path.Create(
|
|
560
561
|
self._active_layout,
|
|
561
562
|
layer_name,
|
|
562
|
-
net,
|
|
563
|
+
net._edb_object,
|
|
563
564
|
self._get_edb_value(width),
|
|
564
565
|
start_cap_style,
|
|
565
566
|
end_cap_style,
|
|
@@ -567,10 +568,9 @@ class Modeler(object):
|
|
|
567
568
|
polygonData,
|
|
568
569
|
)
|
|
569
570
|
|
|
570
|
-
if polygon.
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
polygon = self._pedb.layout.find_object_by_id(polygon.prim_obj.GetId())
|
|
571
|
+
if polygon.IsNull(): # pragma: no cover
|
|
572
|
+
raise RuntimeError("Failed to create path.")
|
|
573
|
+
polygon = self._pedb.layout.find_object_by_id(polygon.GetId())
|
|
574
574
|
return polygon
|
|
575
575
|
|
|
576
576
|
def create_trace(
|
|
@@ -720,11 +720,10 @@ class Modeler(object):
|
|
|
720
720
|
if isinstance(polygonData, PolygonData):
|
|
721
721
|
polygonData = polygonData._edb_object
|
|
722
722
|
polygon = self._pedb._edb.Cell.Primitive.Polygon.Create(
|
|
723
|
-
self._active_layout, layer_name, net.
|
|
723
|
+
self._active_layout, layer_name, net._edb_object, polygonData
|
|
724
724
|
)
|
|
725
725
|
if polygon.IsNull() or polygonData is False: # pragma: no cover
|
|
726
|
-
|
|
727
|
-
return False
|
|
726
|
+
raise RuntimeError("Null polygon created")
|
|
728
727
|
else:
|
|
729
728
|
return cast(polygon, self._pedb)
|
|
730
729
|
|
|
@@ -802,11 +801,11 @@ class Modeler(object):
|
|
|
802
801
|
"""
|
|
803
802
|
edb_net = self._pedb.nets.find_or_create_net(net_name)
|
|
804
803
|
if representation_type == "LowerLeftUpperRight":
|
|
805
|
-
rep_type = self._edb.
|
|
806
|
-
rect = self._edb.
|
|
804
|
+
rep_type = self._edb.Cell.Primitive.RectangleRepresentationType.LowerLeftUpperRight
|
|
805
|
+
rect = self._edb.Cell.Primitive.Rectangle.Create(
|
|
807
806
|
self._active_layout,
|
|
808
807
|
layer_name,
|
|
809
|
-
edb_net.
|
|
808
|
+
edb_net._edb_object,
|
|
810
809
|
rep_type,
|
|
811
810
|
self._get_edb_value(lower_left_point[0]),
|
|
812
811
|
self._get_edb_value(lower_left_point[1]),
|
|
@@ -816,11 +815,11 @@ class Modeler(object):
|
|
|
816
815
|
self._get_edb_value(rotation),
|
|
817
816
|
)
|
|
818
817
|
else:
|
|
819
|
-
rep_type = self._edb.
|
|
820
|
-
rect = self._edb.
|
|
818
|
+
rep_type = self._edb.Cell.Primitive.RectangleRepresentationType.CenterWidthHeight
|
|
819
|
+
rect = self._edb.Cell.Primitive.Rectangle.Create(
|
|
821
820
|
self._active_layout,
|
|
822
821
|
layer_name,
|
|
823
|
-
edb_net.
|
|
822
|
+
edb_net._edb_object,
|
|
824
823
|
rep_type,
|
|
825
824
|
self._get_edb_value(center_point[0]),
|
|
826
825
|
self._get_edb_value(center_point[1]),
|
|
@@ -829,8 +828,8 @@ class Modeler(object):
|
|
|
829
828
|
self._get_edb_value(corner_radius),
|
|
830
829
|
self._get_edb_value(rotation),
|
|
831
830
|
)
|
|
832
|
-
if rect:
|
|
833
|
-
return self._pedb.layout.find_object_by_id(rect.
|
|
831
|
+
if not rect.IsNull():
|
|
832
|
+
return self._pedb.layout.find_object_by_id(rect.GetId())
|
|
834
833
|
return False # pragma: no cover
|
|
835
834
|
|
|
836
835
|
def create_circle(self, layer_name, x, y, radius, net_name=""):
|
|
@@ -857,16 +856,16 @@ class Modeler(object):
|
|
|
857
856
|
"""
|
|
858
857
|
edb_net = self._pedb.nets.find_or_create_net(net_name)
|
|
859
858
|
|
|
860
|
-
circle = self._edb.
|
|
859
|
+
circle = self._edb.Cell.Primitive.Circle.Create(
|
|
861
860
|
self._active_layout,
|
|
862
861
|
layer_name,
|
|
863
|
-
edb_net,
|
|
862
|
+
edb_net._edb_object,
|
|
864
863
|
self._get_edb_value(x),
|
|
865
864
|
self._get_edb_value(y),
|
|
866
865
|
self._get_edb_value(radius),
|
|
867
866
|
)
|
|
868
|
-
if circle:
|
|
869
|
-
return self._pedb.layout.find_object_by_id(circle.
|
|
867
|
+
if not circle.IsNull():
|
|
868
|
+
return self._pedb.layout.find_object_by_id(circle.GetId())
|
|
870
869
|
return False # pragma: no cover
|
|
871
870
|
|
|
872
871
|
def delete_primitives(self, net_names):
|
|
@@ -949,7 +948,7 @@ class Modeler(object):
|
|
|
949
948
|
radius,
|
|
950
949
|
) = void_circle.primitive_object.GetParameters()
|
|
951
950
|
|
|
952
|
-
cloned_circle = self._edb.
|
|
951
|
+
cloned_circle = self._edb.Cell.Primitive.Circle.Create(
|
|
953
952
|
self._active_layout,
|
|
954
953
|
void_circle.layer_name,
|
|
955
954
|
void_circle.net,
|
|
@@ -1032,7 +1031,7 @@ class Modeler(object):
|
|
|
1032
1031
|
or endPoint[0].IsParametric()
|
|
1033
1032
|
or endPoint[1].IsParametric()
|
|
1034
1033
|
)
|
|
1035
|
-
arc = self._edb.
|
|
1034
|
+
arc = self._edb.Geometry.ArcData(
|
|
1036
1035
|
self._pedb.point_data(startPoint[0].ToDouble(), startPoint[1].ToDouble()),
|
|
1037
1036
|
self._pedb.point_data(endPoint[0].ToDouble(), endPoint[1].ToDouble()),
|
|
1038
1037
|
)
|
|
@@ -1046,10 +1045,10 @@ class Modeler(object):
|
|
|
1046
1045
|
or endPoint[1].IsParametric()
|
|
1047
1046
|
or endPoint[2].IsParametric()
|
|
1048
1047
|
)
|
|
1049
|
-
arc = self._edb.
|
|
1048
|
+
arc = self._edb.Geometry.Arc_data(
|
|
1050
1049
|
self._pedb.point_data(startPoint[0].ToDouble(), startPoint[1].ToDouble()),
|
|
1051
1050
|
self._pedb.point_data(endPoint[0].ToDouble(), endPoint[1].ToDouble()),
|
|
1052
|
-
endPoint[2].ToDouble(),
|
|
1051
|
+
# endPoint[2].ToDouble(), # This argument is never used in the original code. There might be a bug.
|
|
1053
1052
|
)
|
|
1054
1053
|
arcs.append(arc)
|
|
1055
1054
|
elif len(endPoint) == 5:
|
|
@@ -1062,29 +1061,27 @@ class Modeler(object):
|
|
|
1062
1061
|
or endPoint[3].IsParametric()
|
|
1063
1062
|
or endPoint[4].IsParametric()
|
|
1064
1063
|
)
|
|
1065
|
-
rotationDirection = self._edb.geometry.geometry.RotationDirection.Colinear
|
|
1066
1064
|
if endPoint[2].ToString() == "cw":
|
|
1067
1065
|
rotationDirection = self._edb.geometry.geometry.RotationDirection.CW
|
|
1068
1066
|
elif endPoint[2].ToString() == "ccw":
|
|
1069
1067
|
rotationDirection = self._edb.geometry.geometry.RotationDirection.CCW
|
|
1070
1068
|
else:
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
arc = self._edb.geometry.arc_data(
|
|
1069
|
+
raise ValueError("Invalid rotation direction %s is specified.", endPoint[2])
|
|
1070
|
+
arc = self._edb.Geometry.ArcData(
|
|
1074
1071
|
self._pedb.point_data(startPoint[0].ToDouble(), startPoint[1].ToDouble()),
|
|
1075
1072
|
self._pedb.point_data(endPoint[0].ToDouble(), endPoint[1].ToDouble()),
|
|
1076
1073
|
rotationDirection,
|
|
1077
1074
|
self._pedb.point_data(endPoint[3].ToDouble(), endPoint[4].ToDouble()),
|
|
1078
1075
|
)
|
|
1079
1076
|
arcs.append(arc)
|
|
1080
|
-
polygon = self._edb.
|
|
1077
|
+
polygon = self._edb.Geometry.PolygonData.CreateFromArcs(convert_py_list_to_net_list(arcs), True)
|
|
1081
1078
|
if not is_parametric:
|
|
1082
1079
|
return polygon
|
|
1083
1080
|
else:
|
|
1084
1081
|
k = 0
|
|
1085
1082
|
for pt in points:
|
|
1086
1083
|
point = [self._get_edb_value(i) for i in pt]
|
|
1087
|
-
new_points = self._edb.
|
|
1084
|
+
new_points = self._edb.Geometry.PointData(point[0], point[1])
|
|
1088
1085
|
if len(point) > 2:
|
|
1089
1086
|
k += 1
|
|
1090
1087
|
polygon.SetPoint(k, new_points)
|
|
@@ -1141,13 +1138,14 @@ class Modeler(object):
|
|
|
1141
1138
|
def _createPolygonDataFromRectangle(self, shape):
|
|
1142
1139
|
if not self._validatePoint(shape.pointA, False) or not self._validatePoint(shape.pointB, False):
|
|
1143
1140
|
return None
|
|
1144
|
-
pointA = self._edb.
|
|
1141
|
+
pointA = self._edb.Geometry.PointData(
|
|
1145
1142
|
self._get_edb_value(shape.pointA[0]), self._get_edb_value(shape.pointA[1])
|
|
1146
1143
|
)
|
|
1147
|
-
pointB = self._edb.
|
|
1144
|
+
pointB = self._edb.Geometry.PointData(
|
|
1148
1145
|
self._get_edb_value(shape.pointB[0]), self._get_edb_value(shape.pointB[1])
|
|
1149
1146
|
)
|
|
1150
|
-
|
|
1147
|
+
points = Tuple[self._pedb.core.Geometry.PointData, self._pedb.core.Geometry.PointData](pointA, pointB)
|
|
1148
|
+
return self._edb.Geometry.PolygonData.CreateFromBBox(points)
|
|
1151
1149
|
|
|
1152
1150
|
class Shape(object):
|
|
1153
1151
|
"""Shape class.
|
|
@@ -1240,7 +1238,7 @@ class Modeler(object):
|
|
|
1240
1238
|
p.width = self._pedb.edb_value(parameter_name)
|
|
1241
1239
|
return True
|
|
1242
1240
|
|
|
1243
|
-
def unite_polygons_on_layer(self, layer_name=None, delete_padstack_gemometries=False, net_names_list=
|
|
1241
|
+
def unite_polygons_on_layer(self, layer_name=None, delete_padstack_gemometries=False, net_names_list=None):
|
|
1244
1242
|
"""Try to unite all Polygons on specified layer.
|
|
1245
1243
|
|
|
1246
1244
|
Parameters
|
|
@@ -1257,51 +1255,59 @@ class Modeler(object):
|
|
|
1257
1255
|
bool
|
|
1258
1256
|
``True`` is successful.
|
|
1259
1257
|
"""
|
|
1260
|
-
|
|
1261
|
-
|
|
1258
|
+
|
|
1259
|
+
def unite_polygons(polygons: list):
|
|
1260
|
+
"""Unite a list of polygons.
|
|
1261
|
+
|
|
1262
|
+
Parameters
|
|
1263
|
+
----------
|
|
1264
|
+
polygons
|
|
1265
|
+
"""
|
|
1266
|
+
if len(polygons) < 2:
|
|
1267
|
+
raise ValueError("At least two polygons are required to unite.")
|
|
1268
|
+
layer = set([i.layer_name for i in polygons])
|
|
1269
|
+
if len(layer) > 1:
|
|
1270
|
+
raise ValueError("Polygons must be on the same layer.")
|
|
1271
|
+
layer = list(layer)[0]
|
|
1272
|
+
|
|
1273
|
+
new_polygon_data = self._pedb.core.Geometry.PolygonData.Unite(
|
|
1274
|
+
convert_py_list_to_net_list([i.polygon_data._edb_object for i in polygons])
|
|
1275
|
+
)
|
|
1276
|
+
voids = []
|
|
1277
|
+
for i in polygons:
|
|
1278
|
+
voids.extend(i.voids)
|
|
1279
|
+
|
|
1280
|
+
new_polygons = []
|
|
1281
|
+
for pdata in new_polygon_data:
|
|
1282
|
+
voids_ = [i for i in voids if int(pdata.GetIntersectionType(i.polygon_data._edb_object)) == 2]
|
|
1283
|
+
|
|
1284
|
+
new_polygons.append(self.create_polygon(pdata, layer, voids_, polygons[0].net_name))
|
|
1285
|
+
|
|
1286
|
+
for i in polygons:
|
|
1287
|
+
i.delete()
|
|
1288
|
+
return new_polygons
|
|
1289
|
+
|
|
1262
1290
|
if not layer_name:
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
if
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
list_polygon_data.append(i.GetPolygonData())
|
|
1284
|
-
delete_list.append(i)
|
|
1285
|
-
all_voids.append(i.Voids)
|
|
1286
|
-
a = self._edb.geometry.polygon_data.unite(convert_py_list_to_net_list(list_polygon_data))
|
|
1287
|
-
for item in a:
|
|
1288
|
-
for v in all_voids:
|
|
1289
|
-
for void in v:
|
|
1290
|
-
if int(item.GetIntersectionType(void.GetPolygonData())) == 2:
|
|
1291
|
-
item.AddHole(void.GetPolygonData())
|
|
1292
|
-
self.create_polygon(item, layer_name=lay, voids=[], net_name=net)
|
|
1293
|
-
for v in all_voids:
|
|
1294
|
-
for void in v:
|
|
1295
|
-
for poly in poly_by_nets[net]: # pragma no cover
|
|
1296
|
-
if int(void.GetPolygonData().GetIntersectionType(poly.GetPolygonData())) >= 2:
|
|
1297
|
-
try:
|
|
1298
|
-
id = delete_list.index(poly)
|
|
1299
|
-
except ValueError:
|
|
1300
|
-
id = -1
|
|
1301
|
-
if id >= 0:
|
|
1302
|
-
delete_list.pop(id)
|
|
1303
|
-
for poly in delete_list:
|
|
1304
|
-
poly.Delete()
|
|
1291
|
+
layers = list(self._pedb.stackup.signal_layers.keys())
|
|
1292
|
+
elif isinstance(layer_name, str):
|
|
1293
|
+
layers = [layer_name]
|
|
1294
|
+
else:
|
|
1295
|
+
layers = layer_name
|
|
1296
|
+
|
|
1297
|
+
for layer in layers:
|
|
1298
|
+
self._logger.info("Uniting Objects on layer %s.", layer)
|
|
1299
|
+
if net_names_list:
|
|
1300
|
+
polygons = [
|
|
1301
|
+
i
|
|
1302
|
+
for i in self._pedb.layout.find_primitive(layer_name=layer, net_name=net_names_list)
|
|
1303
|
+
if i.primitive_type == "polygon"
|
|
1304
|
+
]
|
|
1305
|
+
else:
|
|
1306
|
+
polygons = [
|
|
1307
|
+
i for i in self._pedb.layout.find_primitive(layer_name=layer) if i.primitive_type == "polygon"
|
|
1308
|
+
]
|
|
1309
|
+
if len(polygons) > 1:
|
|
1310
|
+
unite_polygons(polygons)
|
|
1305
1311
|
|
|
1306
1312
|
if delete_padstack_gemometries:
|
|
1307
1313
|
self._logger.info("Deleting Padstack Definitions")
|
|
@@ -1506,7 +1512,7 @@ class Modeler(object):
|
|
|
1506
1512
|
self._logger.error("No pin found.")
|
|
1507
1513
|
return False
|
|
1508
1514
|
pins = list(pins.values())
|
|
1509
|
-
obj = self._edb.
|
|
1515
|
+
obj = self._edb.Cell.Hierarchy.PinGroup.Create(
|
|
1510
1516
|
self._pedb.active_layout, name, convert_py_list_to_net_list(pins)
|
|
1511
1517
|
)
|
|
1512
1518
|
if obj.IsNull():
|
pyedb/dotnet/database/nets.py
CHANGED
|
@@ -205,9 +205,9 @@ class EdbNets(CommonNets):
|
|
|
205
205
|
total_trace_area = 0.0
|
|
206
206
|
for primitive in net.primitives:
|
|
207
207
|
primitive = primitive._edb_object
|
|
208
|
-
if primitive.GetPrimitiveType() == self._edb.
|
|
208
|
+
if primitive.GetPrimitiveType() == self._edb.Cell.Primitive.PrimitiveType.Bondwire:
|
|
209
209
|
continue
|
|
210
|
-
if primitive.GetPrimitiveType() != self._edb.
|
|
210
|
+
if primitive.GetPrimitiveType() != self._edb.Cell.Primitive.PrimitiveType.Path:
|
|
211
211
|
total_plane_area += float(primitive.GetPolygonData().Area())
|
|
212
212
|
else:
|
|
213
213
|
total_trace_area += float(primitive.GetPolygonData().Area())
|
|
@@ -551,9 +551,10 @@ class EdbNets(CommonNets):
|
|
|
551
551
|
|
|
552
552
|
def get_net_by_name(self, net_name):
|
|
553
553
|
"""Find a net by name."""
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
554
|
+
|
|
555
|
+
edb_net = self._edb.Cell.Net.FindByName(self._active_layout, net_name)
|
|
556
|
+
if not edb_net.IsNull():
|
|
557
|
+
return self._pedb.pedb_class.database.edb_data.nets_data.EDBNetsData(edb_net, self._pedb)
|
|
557
558
|
|
|
558
559
|
def delete_nets(self, netlist):
|
|
559
560
|
"""Delete one or more nets from EDB.
|
|
@@ -635,54 +636,50 @@ class EdbNets(CommonNets):
|
|
|
635
636
|
"""
|
|
636
637
|
if not net_name and not start_with and not contain and not end_with:
|
|
637
638
|
net_name = generate_unique_name("NET_")
|
|
638
|
-
|
|
639
|
-
return
|
|
639
|
+
self._edb.Cell.Net.Create(self._active_layout, net_name)
|
|
640
|
+
return self.nets[net_name]
|
|
640
641
|
else:
|
|
641
642
|
if not start_with and not contain and not end_with:
|
|
642
|
-
net = self._edb.
|
|
643
|
-
if net.
|
|
644
|
-
net = self._edb.
|
|
645
|
-
return
|
|
643
|
+
net = self._edb.Cell.Net.FindByName(self._active_layout, net_name)
|
|
644
|
+
if net.IsNull():
|
|
645
|
+
net = self._edb.Cell.Net.Create(self._active_layout, net_name)
|
|
646
|
+
return self.nets[net_name]
|
|
646
647
|
elif start_with:
|
|
647
|
-
nets_found = [
|
|
648
|
-
self.nets[net].net_object for net in list(self.nets.keys()) if net.lower().startswith(start_with)
|
|
649
|
-
]
|
|
648
|
+
nets_found = [self.nets[net] for net in list(self.nets.keys()) if net.lower().startswith(start_with)]
|
|
650
649
|
return nets_found
|
|
651
650
|
elif start_with and end_with:
|
|
652
651
|
nets_found = [
|
|
653
|
-
self.nets[net]
|
|
652
|
+
self.nets[net]
|
|
654
653
|
for net in list(self.nets.keys())
|
|
655
654
|
if net.lower().startswith(start_with) and net.lower().endswith(end_with)
|
|
656
655
|
]
|
|
657
656
|
return nets_found
|
|
658
657
|
elif start_with and contain and end_with:
|
|
659
658
|
nets_found = [
|
|
660
|
-
self.nets[net]
|
|
659
|
+
self.nets[net]
|
|
661
660
|
for net in list(self.nets.keys())
|
|
662
661
|
if net.lower().startswith(start_with) and net.lower().endswith(end_with) and contain in net.lower()
|
|
663
662
|
]
|
|
664
663
|
return nets_found
|
|
665
664
|
elif start_with and contain:
|
|
666
665
|
nets_found = [
|
|
667
|
-
self.nets[net]
|
|
666
|
+
self.nets[net]
|
|
668
667
|
for net in list(self.nets.keys())
|
|
669
668
|
if net.lower().startswith(start_with) and contain in net.lower()
|
|
670
669
|
]
|
|
671
670
|
return nets_found
|
|
672
671
|
elif contain and end_with:
|
|
673
672
|
nets_found = [
|
|
674
|
-
self.nets[net]
|
|
673
|
+
self.nets[net]
|
|
675
674
|
for net in list(self.nets.keys())
|
|
676
675
|
if net.lower().endswith(end_with) and contain in net.lower()
|
|
677
676
|
]
|
|
678
677
|
return nets_found
|
|
679
678
|
elif end_with and not start_with and not contain:
|
|
680
|
-
nets_found = [
|
|
681
|
-
self.nets[net].net_object for net in list(self.nets.keys()) if net.lower().endswith(end_with)
|
|
682
|
-
]
|
|
679
|
+
nets_found = [self.nets[net] for net in list(self.nets.keys()) if net.lower().endswith(end_with)]
|
|
683
680
|
return nets_found
|
|
684
681
|
elif contain and not start_with and not end_with:
|
|
685
|
-
nets_found = [self.nets[net]
|
|
682
|
+
nets_found = [self.nets[net] for net in list(self.nets.keys()) if contain in net.lower()]
|
|
686
683
|
return nets_found
|
|
687
684
|
|
|
688
685
|
def is_net_in_component(self, component_name, net_name):
|