pyedb 0.52.0__py3-none-any.whl → 0.54.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pyedb might be problematic. Click here for more details.
- pyedb/__init__.py +1 -1
- pyedb/configuration/cfg_common.py +12 -15
- pyedb/configuration/cfg_data.py +2 -2
- pyedb/configuration/cfg_modeler.py +163 -234
- pyedb/configuration/cfg_ports_sources.py +6 -8
- pyedb/configuration/cfg_stackup.py +62 -249
- pyedb/configuration/configuration.py +272 -170
- pyedb/dotnet/database/cell/hierarchy/model.py +1 -1
- pyedb/dotnet/database/cell/layout.py +1 -1
- pyedb/dotnet/database/cell/layout_obj.py +3 -3
- pyedb/dotnet/database/cell/primitive/path.py +1 -1
- pyedb/dotnet/database/cell/primitive/primitive.py +8 -8
- pyedb/dotnet/database/cell/terminal/pingroup_terminal.py +1 -1
- pyedb/dotnet/database/cell/terminal/point_terminal.py +1 -1
- pyedb/dotnet/database/cell/terminal/terminal.py +24 -26
- pyedb/dotnet/database/components.py +33 -27
- pyedb/dotnet/database/definition/component_def.py +3 -3
- pyedb/dotnet/database/definition/component_model.py +1 -1
- pyedb/dotnet/database/definition/package_def.py +1 -1
- pyedb/dotnet/database/dotnet/database.py +47 -38
- pyedb/dotnet/database/dotnet/primitive.py +16 -16
- pyedb/dotnet/database/edb_data/hfss_extent_info.py +6 -6
- pyedb/dotnet/database/edb_data/layer_data.py +17 -15
- pyedb/dotnet/database/edb_data/padstacks_data.py +12 -12
- pyedb/dotnet/database/edb_data/primitives_data.py +3 -3
- pyedb/dotnet/database/edb_data/sources.py +6 -6
- pyedb/dotnet/database/edb_data/variables.py +7 -3
- pyedb/dotnet/database/geometry/point_data.py +1 -1
- pyedb/dotnet/database/geometry/polygon_data.py +2 -4
- pyedb/dotnet/database/hfss.py +7 -7
- pyedb/dotnet/database/materials.py +2 -2
- pyedb/dotnet/database/modeler.py +8 -11
- pyedb/dotnet/database/nets.py +1 -1
- pyedb/dotnet/database/padstack.py +72 -1
- pyedb/dotnet/database/sim_setup_data/data/settings.py +24 -0
- pyedb/dotnet/database/sim_setup_data/io/siwave.py +26 -1
- pyedb/dotnet/database/siwave.py +19 -5
- pyedb/dotnet/database/stackup.py +80 -137
- pyedb/dotnet/database/utilities/heatsink.py +4 -4
- pyedb/dotnet/database/utilities/obj_base.py +1 -1
- pyedb/dotnet/database/utilities/simulation_setup.py +1 -1
- pyedb/dotnet/database/utilities/siwave_cpa_simulation_setup.py +894 -0
- pyedb/dotnet/database/utilities/siwave_simulation_setup.py +15 -0
- pyedb/dotnet/database/utilities/value.py +116 -0
- pyedb/dotnet/edb.py +58 -45
- pyedb/generic/design_types.py +39 -1
- pyedb/generic/grpc_warnings.py +5 -0
- pyedb/grpc/__init__.py +0 -0
- pyedb/grpc/database/components.py +155 -98
- pyedb/grpc/database/control_file.py +240 -193
- pyedb/grpc/database/definition/materials.py +23 -30
- pyedb/grpc/database/definition/package_def.py +15 -15
- pyedb/grpc/database/definition/padstack_def.py +51 -51
- pyedb/grpc/database/definitions.py +7 -5
- pyedb/grpc/database/geometry/arc_data.py +7 -5
- pyedb/grpc/database/geometry/point_3d_data.py +8 -7
- pyedb/grpc/database/geometry/polygon_data.py +3 -2
- pyedb/grpc/database/hierarchy/component.py +43 -38
- pyedb/grpc/database/hierarchy/pin_pair_model.py +15 -14
- pyedb/grpc/database/hierarchy/pingroup.py +9 -9
- pyedb/grpc/database/layers/stackup_layer.py +45 -44
- pyedb/grpc/database/layout/layout.py +9 -8
- pyedb/grpc/database/layout/voltage_regulator.py +7 -7
- pyedb/grpc/database/layout_validation.py +13 -12
- pyedb/grpc/database/modeler.py +156 -131
- pyedb/grpc/database/nets.py +42 -31
- pyedb/grpc/database/padstacks.py +270 -175
- pyedb/grpc/database/ports/ports.py +5 -6
- pyedb/grpc/database/primitive/bondwire.py +8 -7
- pyedb/grpc/database/primitive/circle.py +4 -4
- pyedb/grpc/database/primitive/padstack_instance.py +18 -18
- pyedb/grpc/database/primitive/path.py +7 -7
- pyedb/grpc/database/primitive/polygon.py +3 -3
- pyedb/grpc/database/primitive/primitive.py +13 -17
- pyedb/grpc/database/primitive/rectangle.py +13 -13
- pyedb/grpc/database/simulation_setup/hfss_general_settings.py +1 -1
- pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +10 -0
- pyedb/grpc/database/simulation_setup/siwave_cpa_simulation_setup.py +961 -0
- pyedb/grpc/database/simulation_setup/siwave_simulation_setup.py +17 -1
- pyedb/grpc/database/siwave.py +44 -24
- pyedb/grpc/database/source_excitations.py +333 -229
- pyedb/grpc/database/stackup.py +164 -147
- pyedb/grpc/database/terminal/bundle_terminal.py +17 -7
- pyedb/grpc/database/terminal/edge_terminal.py +10 -0
- pyedb/grpc/database/terminal/padstack_instance_terminal.py +15 -4
- pyedb/grpc/database/terminal/pingroup_terminal.py +11 -10
- pyedb/grpc/database/terminal/point_terminal.py +4 -3
- pyedb/grpc/database/terminal/terminal.py +9 -9
- pyedb/grpc/database/utility/value.py +109 -0
- pyedb/grpc/edb.py +129 -45
- pyedb/grpc/edb_init.py +0 -7
- pyedb/siwave_core/cpa/simulation_setup_data_model.py +132 -0
- pyedb/siwave_core/product_properties.py +198 -0
- {pyedb-0.52.0.dist-info → pyedb-0.54.0.dist-info}/METADATA +15 -13
- {pyedb-0.52.0.dist-info → pyedb-0.54.0.dist-info}/RECORD +97 -89
- {pyedb-0.52.0.dist-info → pyedb-0.54.0.dist-info}/WHEEL +1 -1
- {pyedb-0.52.0.dist-info → pyedb-0.54.0.dist-info/licenses}/LICENSE +0 -0
|
@@ -56,7 +56,7 @@ class PrimitiveDotNet:
|
|
|
56
56
|
def __init__(self, api, prim_object=None):
|
|
57
57
|
self._app = api
|
|
58
58
|
self.api = api._edb.Cell.Primitive
|
|
59
|
-
self.
|
|
59
|
+
self.core = api._edb
|
|
60
60
|
self.prim_obj = prim_object
|
|
61
61
|
self._edb_object = prim_object
|
|
62
62
|
|
|
@@ -133,7 +133,7 @@ class PrimitiveDotNet:
|
|
|
133
133
|
if _poly is None or _poly.IsNull() or _poly is False:
|
|
134
134
|
self._logger.error("Failed to create void polygon data")
|
|
135
135
|
return False
|
|
136
|
-
point_list = self._app.
|
|
136
|
+
point_list = self._app.core.cell.primitive.polygon.create(
|
|
137
137
|
self._app.active_layout, self.layer_name, self.prim_obj.GetNet(), _poly
|
|
138
138
|
).prim_obj
|
|
139
139
|
elif "prim_obj" in dir(point_list):
|
|
@@ -340,7 +340,7 @@ class PrimitiveDotNet:
|
|
|
340
340
|
maximum_corner_extension : float, optional
|
|
341
341
|
The maximum corner extension (when round corners are not used) at which point the corner is clipped.
|
|
342
342
|
"""
|
|
343
|
-
new_poly = self.polygon_data.
|
|
343
|
+
new_poly = self.polygon_data.core.Expand(offset, tolerance, round_corners, maximum_corner_extension)
|
|
344
344
|
self.polygon_data = new_poly[0]
|
|
345
345
|
return True
|
|
346
346
|
|
|
@@ -361,9 +361,9 @@ class PrimitiveDotNet:
|
|
|
361
361
|
"""
|
|
362
362
|
if not isinstance(factor, str):
|
|
363
363
|
factor = float(factor)
|
|
364
|
-
polygon_data = self.polygon_data.create_from_arcs(self.polygon_data.
|
|
364
|
+
polygon_data = self.polygon_data.create_from_arcs(self.polygon_data.core.GetArcData(), True)
|
|
365
365
|
if not center:
|
|
366
|
-
center = self.polygon_data.
|
|
366
|
+
center = self.polygon_data.core.GetBoundingCircleCenter()
|
|
367
367
|
if center:
|
|
368
368
|
polygon_data.Scale(factor, center)
|
|
369
369
|
self.polygon_data = polygon_data
|
|
@@ -422,15 +422,15 @@ class RectangleDotNet(PrimitiveDotNet):
|
|
|
422
422
|
net = net.api_object
|
|
423
423
|
if isinstance(rep_type, int):
|
|
424
424
|
if rep_type == 1:
|
|
425
|
-
rep_type = self.
|
|
425
|
+
rep_type = self.core.cell.primitive.RectangleRepresentationType.CenterWidthHeight
|
|
426
426
|
else:
|
|
427
|
-
rep_type = self.
|
|
428
|
-
param1 = self._app.
|
|
429
|
-
param2 = self._app.
|
|
430
|
-
param3 = self._app.
|
|
431
|
-
param4 = self._app.
|
|
432
|
-
corner_rad = self._app.
|
|
433
|
-
rotation = self._app.
|
|
427
|
+
rep_type = self.core.cell.primitive.RectangleRepresentationType.LowerLeftUpperRight
|
|
428
|
+
param1 = self._app.core.utility.value(param1)
|
|
429
|
+
param2 = self._app.core.utility.value(param2)
|
|
430
|
+
param3 = self._app.core.utility.value(param3)
|
|
431
|
+
param4 = self._app.core.utility.value(param4)
|
|
432
|
+
corner_rad = self._app.core.utility.value(corner_rad)
|
|
433
|
+
rotation = self._app.core.utility.value(rotation)
|
|
434
434
|
return RectangleDotNet(
|
|
435
435
|
self._app,
|
|
436
436
|
self.api.Rectangle.Create(
|
|
@@ -742,10 +742,10 @@ class PathDotNet(PrimitiveDotNet):
|
|
|
742
742
|
"""
|
|
743
743
|
if isinstance(net, NetDotNet):
|
|
744
744
|
net = net.api_object
|
|
745
|
-
width = self._app.
|
|
745
|
+
width = self._app.core.utility.value(width)
|
|
746
746
|
if isinstance(points, list):
|
|
747
747
|
points = convert_py_list_to_net_list([self._app.point_data(i[0], i[1]) for i in points])
|
|
748
|
-
points = self._app.
|
|
748
|
+
points = self._app.core.geometry.polygon_data.dotnetobj(points)
|
|
749
749
|
return PathDotNet(
|
|
750
750
|
self._app, self.api.Path.Create(layout, layer, net, width, end_cap1, end_cap2, corner_style, points)
|
|
751
751
|
)
|
|
@@ -1501,7 +1501,7 @@ class BoardBendDef(PrimitiveDotNet):
|
|
|
1501
1501
|
|
|
1502
1502
|
Read-Only.
|
|
1503
1503
|
"""
|
|
1504
|
-
return cast(self.
|
|
1504
|
+
return cast(self.core, self.prim_obj.GetBoundaryPrim())
|
|
1505
1505
|
|
|
1506
1506
|
@property
|
|
1507
1507
|
def bend_middle(self):
|
|
@@ -38,14 +38,14 @@ class HfssExtentInfo:
|
|
|
38
38
|
self._pedb = pedb
|
|
39
39
|
|
|
40
40
|
self._hfss_extent_info_type = {
|
|
41
|
-
"bounding_box": self._pedb.
|
|
42
|
-
"conforming": self._pedb.
|
|
43
|
-
"convexHull": self._pedb.
|
|
44
|
-
"polygon": self._pedb.
|
|
41
|
+
"bounding_box": self._pedb.core.utility.utility.HFSSExtentInfoType.BoundingBox,
|
|
42
|
+
"conforming": self._pedb.core.utility.utility.HFSSExtentInfoType.Conforming,
|
|
43
|
+
"convexHull": self._pedb.core.utility.utility.HFSSExtentInfoType.ConvexHull,
|
|
44
|
+
"polygon": self._pedb.core.utility.utility.HFSSExtentInfoType.Polygon,
|
|
45
45
|
}
|
|
46
46
|
self._open_region_type = {
|
|
47
|
-
"radiation": self._pedb.
|
|
48
|
-
"pml": self._pedb.
|
|
47
|
+
"radiation": self._pedb.core.utility.utility.OpenRegionType.Radiation,
|
|
48
|
+
"pml": self._pedb.core.utility.utility.OpenRegionType.PML,
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
def _get_edb_value(self, value):
|
|
@@ -49,7 +49,7 @@ class LayerEdbClass(object):
|
|
|
49
49
|
layer_type = self._layer_name_mapping[layer_type]
|
|
50
50
|
layer_type = self._doc_layer_mapping[layer_type]
|
|
51
51
|
|
|
52
|
-
self._edb_object = self._pedb.
|
|
52
|
+
self._edb_object = self._pedb.core.cell._cell.Layer(
|
|
53
53
|
self._name,
|
|
54
54
|
layer_type,
|
|
55
55
|
)
|
|
@@ -76,7 +76,9 @@ class LayerEdbClass(object):
|
|
|
76
76
|
|
|
77
77
|
@fill_material.setter
|
|
78
78
|
def fill_material(self, value):
|
|
79
|
-
self.
|
|
79
|
+
layer_clone = self._edb_layer
|
|
80
|
+
layer_clone.SetFillMaterial(value)
|
|
81
|
+
self._pedb.stackup._set_layout_stackup(layer_clone, "change_attribute")
|
|
80
82
|
|
|
81
83
|
@property
|
|
82
84
|
def _stackup_layer_mapping(self):
|
|
@@ -144,7 +146,7 @@ class LayerEdbClass(object):
|
|
|
144
146
|
|
|
145
147
|
@property
|
|
146
148
|
def _edb(self):
|
|
147
|
-
return self._pedb.
|
|
149
|
+
return self._pedb.core
|
|
148
150
|
|
|
149
151
|
@property
|
|
150
152
|
def _edb_layer(self):
|
|
@@ -287,7 +289,7 @@ class StackupLayerEdbClass(LayerEdbClass):
|
|
|
287
289
|
def _create(self, layer_type):
|
|
288
290
|
layer_type_edb_name = self._layer_name_mapping[layer_type]
|
|
289
291
|
layer_type = self._layer_type_mapping[layer_type_edb_name]
|
|
290
|
-
self._edb_object = self._pedb.
|
|
292
|
+
self._edb_object = self._pedb.core.cell._cell.StackupLayer(
|
|
291
293
|
self._name,
|
|
292
294
|
layer_type,
|
|
293
295
|
self._pedb.edb_value(0),
|
|
@@ -637,11 +639,11 @@ class StackupLayerEdbClass(LayerEdbClass):
|
|
|
637
639
|
if not self.is_stackup_layer: # pragma: no cover
|
|
638
640
|
return
|
|
639
641
|
if surface == "top":
|
|
640
|
-
return self._edb_layer.GetRoughnessModel(self._pedb.
|
|
642
|
+
return self._edb_layer.GetRoughnessModel(self._pedb.core.Cell.RoughnessModel.Region.Top)
|
|
641
643
|
elif surface == "bottom":
|
|
642
|
-
return self._edb_layer.GetRoughnessModel(self._pedb.
|
|
644
|
+
return self._edb_layer.GetRoughnessModel(self._pedb.core.Cell.RoughnessModel.Region.Bottom)
|
|
643
645
|
elif surface == "side":
|
|
644
|
-
return self._edb_layer.GetRoughnessModel(self._pedb.
|
|
646
|
+
return self._edb_layer.GetRoughnessModel(self._pedb.core.Cell.RoughnessModel.Region.Side)
|
|
645
647
|
|
|
646
648
|
def assign_roughness_model(
|
|
647
649
|
self,
|
|
@@ -683,27 +685,27 @@ class StackupLayerEdbClass(LayerEdbClass):
|
|
|
683
685
|
if apply_on_surface == "all":
|
|
684
686
|
self._side_roughness = "all"
|
|
685
687
|
regions = [
|
|
686
|
-
self._pedb.
|
|
687
|
-
self._pedb.
|
|
688
|
-
self._pedb.
|
|
688
|
+
self._pedb.core.Cell.RoughnessModel.Region.Top,
|
|
689
|
+
self._pedb.core.Cell.RoughnessModel.Region.Side,
|
|
690
|
+
self._pedb.core.Cell.RoughnessModel.Region.Bottom,
|
|
689
691
|
]
|
|
690
692
|
elif apply_on_surface == "top":
|
|
691
693
|
self._side_roughness = "top"
|
|
692
|
-
regions = [self._pedb.
|
|
694
|
+
regions = [self._pedb.core.Cell.RoughnessModel.Region.Top]
|
|
693
695
|
elif apply_on_surface == "bottom":
|
|
694
696
|
self._side_roughness = "bottom"
|
|
695
|
-
regions = [self._pedb.
|
|
697
|
+
regions = [self._pedb.core.Cell.RoughnessModel.Region.Bottom]
|
|
696
698
|
elif apply_on_surface == "side":
|
|
697
699
|
self._side_roughness = "side"
|
|
698
|
-
regions = [self._pedb.
|
|
700
|
+
regions = [self._pedb.core.Cell.RoughnessModel.Region.Side]
|
|
699
701
|
|
|
700
702
|
layer_clone = self._edb_layer
|
|
701
703
|
layer_clone.SetRoughnessEnabled(True)
|
|
702
704
|
for r in regions:
|
|
703
705
|
if model_type == "huray":
|
|
704
|
-
model = self._pedb.
|
|
706
|
+
model = self._pedb.core.Cell.HurrayRoughnessModel(radius, surface_ratio)
|
|
705
707
|
else:
|
|
706
|
-
model = self._pedb.
|
|
708
|
+
model = self._pedb.core.Cell.GroisseRoughnessModel(groisse_roughness)
|
|
707
709
|
layer_clone.SetRoughnessModel(r, model)
|
|
708
710
|
return self._pedb.stackup._set_layout_stackup(layer_clone, "change_attribute")
|
|
709
711
|
|
|
@@ -954,13 +954,13 @@ class EDBPadstack(object):
|
|
|
954
954
|
stop = layer_names[layer_names.index(layer_name) + 1]
|
|
955
955
|
new_padstack_name = "MV_{}_{}_{}".format(self.name, start, stop)
|
|
956
956
|
included = [start, stop]
|
|
957
|
-
new_padstack_definition_data = self._ppadstack._pedb.
|
|
957
|
+
new_padstack_definition_data = self._ppadstack._pedb.core.definition.PadstackDefData.Create()
|
|
958
958
|
new_padstack_definition_data.AddLayers(convert_py_list_to_net_list(included))
|
|
959
959
|
for layer in included:
|
|
960
960
|
pl = self.pad_by_layer[layer]
|
|
961
961
|
new_padstack_definition_data.SetPadParameters(
|
|
962
962
|
layer,
|
|
963
|
-
self._ppadstack._pedb.
|
|
963
|
+
self._ppadstack._pedb.core.definition.PadType.RegularPad,
|
|
964
964
|
pl.int_to_geometry_type(pl.geometry_type),
|
|
965
965
|
list(
|
|
966
966
|
pl._edb_padstack.GetData().GetPadParametersValue(
|
|
@@ -980,7 +980,7 @@ class EDBPadstack(object):
|
|
|
980
980
|
pl = self.antipad_by_layer[layer]
|
|
981
981
|
new_padstack_definition_data.SetPadParameters(
|
|
982
982
|
layer,
|
|
983
|
-
self._ppadstack._pedb.
|
|
983
|
+
self._ppadstack._pedb.core.definition.PadType.AntiPad,
|
|
984
984
|
pl.int_to_geometry_type(pl.geometry_type),
|
|
985
985
|
list(
|
|
986
986
|
pl._edb_padstack.GetData().GetPadParametersValue(
|
|
@@ -1000,7 +1000,7 @@ class EDBPadstack(object):
|
|
|
1000
1000
|
pl = self.thermalpad_by_layer[layer]
|
|
1001
1001
|
new_padstack_definition_data.SetPadParameters(
|
|
1002
1002
|
layer,
|
|
1003
|
-
self._ppadstack._pedb.
|
|
1003
|
+
self._ppadstack._pedb.core.definition.PadType.ThermalPad,
|
|
1004
1004
|
pl.int_to_geometry_type(pl.geometry_type),
|
|
1005
1005
|
list(
|
|
1006
1006
|
pl._edb_padstack.GetData().GetPadParametersValue(
|
|
@@ -1422,7 +1422,7 @@ class EDBPadstackInstance(Primitive):
|
|
|
1422
1422
|
tuple
|
|
1423
1423
|
Tuple of the layer name, drill diameter, and offset if it exists.
|
|
1424
1424
|
"""
|
|
1425
|
-
layer = self._pedb.
|
|
1425
|
+
layer = self._pedb.core.cell.layer("", self._pedb.core.cell.layer_type.SignalLayer)
|
|
1426
1426
|
val = self._pedb.edb_value(0)
|
|
1427
1427
|
offset = self._pedb.edb_value(0.0)
|
|
1428
1428
|
(
|
|
@@ -1488,7 +1488,7 @@ class EDBPadstackInstance(Primitive):
|
|
|
1488
1488
|
tuple
|
|
1489
1489
|
Tuple of the layer name, drill diameter, and drill offset if it exists.
|
|
1490
1490
|
"""
|
|
1491
|
-
layer = self._pedb.
|
|
1491
|
+
layer = self._pedb.core.cell.layer("", self._pedb.core.cell.layer_type.SignalLayer)
|
|
1492
1492
|
val = self._pedb.edb_value(0)
|
|
1493
1493
|
offset = self._pedb.edb_value(0.0)
|
|
1494
1494
|
(
|
|
@@ -1509,7 +1509,7 @@ class EDBPadstackInstance(Primitive):
|
|
|
1509
1509
|
def backdrill_parameters(self):
|
|
1510
1510
|
data = {}
|
|
1511
1511
|
flag, drill_to_layer, offset, diameter = self._edb_object.GetBackDrillParametersLayerValue(
|
|
1512
|
-
self._pedb.
|
|
1512
|
+
self._pedb.core.cell.layer("", self._pedb.core.cell.layer_type.SignalLayer),
|
|
1513
1513
|
self._pedb.edb_value(0),
|
|
1514
1514
|
self._pedb.edb_value(0.0),
|
|
1515
1515
|
True,
|
|
@@ -1522,7 +1522,7 @@ class EDBPadstackInstance(Primitive):
|
|
|
1522
1522
|
"stub_length": offset.ToString(),
|
|
1523
1523
|
}
|
|
1524
1524
|
flag, drill_to_layer, offset, diameter = self._edb_object.GetBackDrillParametersLayerValue(
|
|
1525
|
-
self._pedb.
|
|
1525
|
+
self._pedb.core.cell.layer("", self._pedb.core.cell.layer_type.SignalLayer),
|
|
1526
1526
|
self._pedb.edb_value(0),
|
|
1527
1527
|
self._pedb.edb_value(0.0),
|
|
1528
1528
|
False,
|
|
@@ -1710,7 +1710,7 @@ class EDBPadstackInstance(Primitive):
|
|
|
1710
1710
|
pos.append(self._pedb.edb_value(v))
|
|
1711
1711
|
else:
|
|
1712
1712
|
pos.append(v)
|
|
1713
|
-
point_data = self._pedb.
|
|
1713
|
+
point_data = self._pedb.core.geometry.point_data(pos[0], pos[1])
|
|
1714
1714
|
self._edb_padstackinstance.SetPositionAndRotation(point_data, self._pedb.edb_value(self.rotation))
|
|
1715
1715
|
|
|
1716
1716
|
@property
|
|
@@ -1738,7 +1738,7 @@ class EDBPadstackInstance(Primitive):
|
|
|
1738
1738
|
@name.setter
|
|
1739
1739
|
def name(self, value):
|
|
1740
1740
|
self._edb_padstackinstance.SetName(value)
|
|
1741
|
-
self._edb_padstackinstance.SetProductProperty(self._pedb.
|
|
1741
|
+
self._edb_padstackinstance.SetProductProperty(self._pedb.core.ProductId.Designer, 11, value)
|
|
1742
1742
|
|
|
1743
1743
|
@property
|
|
1744
1744
|
def metal_volume(self):
|
|
@@ -1806,7 +1806,7 @@ class EDBPadstackInstance(Primitive):
|
|
|
1806
1806
|
"""
|
|
1807
1807
|
|
|
1808
1808
|
val = String("")
|
|
1809
|
-
_, name = self._edb_padstackinstance.GetProductProperty(self._pedb.
|
|
1809
|
+
_, name = self._edb_padstackinstance.GetProductProperty(self._pedb.core.ProductId.Designer, 11, val)
|
|
1810
1810
|
aedt_name = str(name).strip("'")
|
|
1811
1811
|
if aedt_name == "":
|
|
1812
1812
|
if self.is_pin and self.component:
|
|
@@ -1818,7 +1818,7 @@ class EDBPadstackInstance(Primitive):
|
|
|
1818
1818
|
|
|
1819
1819
|
@aedt_name.setter
|
|
1820
1820
|
def aedt_name(self, value):
|
|
1821
|
-
self._edb_object.SetProductProperty(self._pedb.
|
|
1821
|
+
self._edb_object.SetProductProperty(self._pedb.core.ProductId.Designer, 11, value)
|
|
1822
1822
|
|
|
1823
1823
|
def parametrize_position(self, prefix=None):
|
|
1824
1824
|
"""Parametrize the instance position.
|
|
@@ -109,7 +109,7 @@ class EdbPolygon(Primitive):
|
|
|
109
109
|
new_polygons = list(self.polygon_data._edb_object.RemoveSelfIntersections())
|
|
110
110
|
self._edb_object.SetPolygonData(new_polygons[0])
|
|
111
111
|
for p in new_polygons[1:]:
|
|
112
|
-
cloned_poly = self._app.
|
|
112
|
+
cloned_poly = self._app.core.cell.primitive.polygon.create(
|
|
113
113
|
self._app.active_layout, self.layer_name, self.net, p
|
|
114
114
|
)
|
|
115
115
|
new_polys.append(cloned_poly)
|
|
@@ -258,7 +258,7 @@ class EdbPolygon(Primitive):
|
|
|
258
258
|
``True`` when successful, ``False`` when failed.
|
|
259
259
|
"""
|
|
260
260
|
if isinstance(point_data, list):
|
|
261
|
-
point_data = self._app.
|
|
261
|
+
point_data = self._app.core.geometry.point_data(
|
|
262
262
|
self._app.edb_value(point_data[0]), self._app.edb_value(point_data[1])
|
|
263
263
|
)
|
|
264
264
|
int_val = int(self.polygon_data._edb_object.PointInPolygon(point_data))
|
|
@@ -297,7 +297,7 @@ class EdbPolygon(Primitive):
|
|
|
297
297
|
# if _poly is None or _poly.IsNull() or _poly is False:
|
|
298
298
|
# self._logger.error("Failed to create void polygon data")
|
|
299
299
|
# return False
|
|
300
|
-
# prim = self._app.
|
|
300
|
+
# prim = self._app.core.cell.primitive.polygon.create(
|
|
301
301
|
# self._app.active_layout, self.layer_name, self.primitive_object.GetNet(), _poly
|
|
302
302
|
# )
|
|
303
303
|
# elif isinstance(point_list, Primitive):
|
|
@@ -369,28 +369,28 @@ class PinGroup(object):
|
|
|
369
369
|
|
|
370
370
|
def create_current_source_terminal(self, magnitude=1, phase=0):
|
|
371
371
|
terminal = self.create_terminal()._edb_object
|
|
372
|
-
terminal.SetBoundaryType(self._pedb.
|
|
372
|
+
terminal.SetBoundaryType(self._pedb.core.cell.terminal.BoundaryType.kCurrentSource)
|
|
373
373
|
terminal.SetSourceAmplitude(self._pedb.edb_value(magnitude))
|
|
374
|
-
terminal.SetSourcePhase(self._pedb.
|
|
374
|
+
terminal.SetSourcePhase(self._pedb.core.utility.value(phase))
|
|
375
375
|
return terminal
|
|
376
376
|
|
|
377
377
|
def create_voltage_source_terminal(self, magnitude=1, phase=0, impedance=0.001):
|
|
378
378
|
terminal = self.create_terminal()._edb_object
|
|
379
|
-
terminal.SetBoundaryType(self._pedb.
|
|
379
|
+
terminal.SetBoundaryType(self._pedb.core.cell.terminal.BoundaryType.kVoltageSource)
|
|
380
380
|
terminal.SetSourceAmplitude(self._pedb.edb_value(magnitude))
|
|
381
|
-
terminal.SetSourcePhase(self._pedb.
|
|
381
|
+
terminal.SetSourcePhase(self._pedb.core.utility.value(phase))
|
|
382
382
|
terminal.SetImpedance(self._pedb.edb_value(impedance))
|
|
383
383
|
return terminal
|
|
384
384
|
|
|
385
385
|
def create_voltage_probe_terminal(self, impedance=1000000):
|
|
386
386
|
terminal = self.create_terminal()._edb_object
|
|
387
|
-
terminal.SetBoundaryType(self._pedb.
|
|
387
|
+
terminal.SetBoundaryType(self._pedb.core.cell.terminal.BoundaryType.kVoltageProbe)
|
|
388
388
|
terminal.SetImpedance(self._pedb.edb_value(impedance))
|
|
389
389
|
return terminal
|
|
390
390
|
|
|
391
391
|
def create_port_terminal(self, impedance=50):
|
|
392
392
|
terminal = self.create_terminal()._edb_object
|
|
393
|
-
terminal.SetBoundaryType(self._pedb.
|
|
393
|
+
terminal.SetBoundaryType(self._pedb.core.cell.terminal.BoundaryType.PortBoundary)
|
|
394
394
|
terminal.SetImpedance(self._pedb.edb_value(impedance))
|
|
395
395
|
terminal.SetIsCircuitPort(True)
|
|
396
396
|
return terminal
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
# SOFTWARE.
|
|
22
|
+
import warnings
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
class Variable:
|
|
@@ -57,7 +58,10 @@ class Variable:
|
|
|
57
58
|
str
|
|
58
59
|
|
|
59
60
|
"""
|
|
60
|
-
|
|
61
|
+
warnings.warn(
|
|
62
|
+
"`value_string` is deprecated. Use `str(value)` method instead.", DeprecationWarning, stacklevel=2
|
|
63
|
+
)
|
|
64
|
+
return str(self.value)
|
|
61
65
|
|
|
62
66
|
@property
|
|
63
67
|
def value_object(self):
|
|
@@ -77,11 +81,11 @@ class Variable:
|
|
|
77
81
|
-------
|
|
78
82
|
float
|
|
79
83
|
"""
|
|
80
|
-
return self._var_server.GetVariableValue(self.name)[1]
|
|
84
|
+
return self._pedb.value(self._var_server.GetVariableValue(self.name)[1])
|
|
81
85
|
|
|
82
86
|
@value.setter
|
|
83
87
|
def value(self, value):
|
|
84
|
-
self._var_server.SetVariableValue(self.name, self._pedb.
|
|
88
|
+
self._var_server.SetVariableValue(self.name, self._pedb.value(value)._edb_obj)
|
|
85
89
|
|
|
86
90
|
@property
|
|
87
91
|
def description(self):
|
|
@@ -91,13 +91,11 @@ class PolygonData:
|
|
|
91
91
|
list_of_point_data = []
|
|
92
92
|
for pt in points:
|
|
93
93
|
list_of_point_data.append(PointData(self._pedb, x=pt[0], y=pt[1])._edb_object)
|
|
94
|
-
return self._pedb.
|
|
95
|
-
convert_py_list_to_net_list(list_of_point_data), closed
|
|
96
|
-
)
|
|
94
|
+
return self._pedb.core.geometry.api_class.PolygonData(convert_py_list_to_net_list(list_of_point_data), closed)
|
|
97
95
|
|
|
98
96
|
def create_from_bounding_box(self, points):
|
|
99
97
|
bbox = BBox(self._pedb, point_1=points[0], point_2=points[1])
|
|
100
|
-
return self._pedb.
|
|
98
|
+
return self._pedb.core.geometry.api_class.PolygonData.CreateFromBBox(bbox._edb_object)
|
|
101
99
|
|
|
102
100
|
def expand(self, offset=0.001, tolerance=1e-12, round_corners=True, maximum_corner_extension=0.001):
|
|
103
101
|
"""Expand the polygon shape by an absolute value in all direction.
|
pyedb/dotnet/database/hfss.py
CHANGED
|
@@ -70,7 +70,7 @@ class EdbHfss(object):
|
|
|
70
70
|
-------
|
|
71
71
|
Ansys.Ansoft.Edb
|
|
72
72
|
"""
|
|
73
|
-
return self._pedb.
|
|
73
|
+
return self._pedb.core
|
|
74
74
|
|
|
75
75
|
@property
|
|
76
76
|
def _active_layout(self):
|
|
@@ -884,7 +884,7 @@ class EdbHfss(object):
|
|
|
884
884
|
]
|
|
885
885
|
)
|
|
886
886
|
pos_edge_term.SetProductSolverOption(
|
|
887
|
-
self._pedb.
|
|
887
|
+
self._pedb.core.ProductId.Designer,
|
|
888
888
|
"HFSS",
|
|
889
889
|
prop,
|
|
890
890
|
)
|
|
@@ -939,7 +939,7 @@ class EdbHfss(object):
|
|
|
939
939
|
if not layer_alignment == "Upper":
|
|
940
940
|
layer_alignment = "Lower"
|
|
941
941
|
pos_edge_term.SetProductSolverOption(
|
|
942
|
-
self._pedb.
|
|
942
|
+
self._pedb.core.ProductId.Designer,
|
|
943
943
|
"HFSS",
|
|
944
944
|
"HFSS('HFSS Type'='Gap(coax)', Orientation='Horizontal', 'Layer Alignment'='{}')".format(layer_alignment),
|
|
945
945
|
)
|
|
@@ -1144,7 +1144,7 @@ class EdbHfss(object):
|
|
|
1144
1144
|
ref_prim = [
|
|
1145
1145
|
prim
|
|
1146
1146
|
for prim in reference_net.primitives
|
|
1147
|
-
if prim.polygon_data.
|
|
1147
|
+
if prim.polygon_data.core.PointInPolygon(mid_pt_data)
|
|
1148
1148
|
]
|
|
1149
1149
|
if ref_prim:
|
|
1150
1150
|
self._logger.info("Reference primitive found")
|
|
@@ -1401,7 +1401,7 @@ class EdbHfss(object):
|
|
|
1401
1401
|
l_inst = layout.GetLayoutInstance()
|
|
1402
1402
|
|
|
1403
1403
|
for inst in simulation_setup.components: # pragma: no cover
|
|
1404
|
-
comp = self._pedb.
|
|
1404
|
+
comp = self._pedb.core.cell.hierarchy.component.FindByName(layout, inst)
|
|
1405
1405
|
if comp.IsNull():
|
|
1406
1406
|
continue
|
|
1407
1407
|
|
|
@@ -1473,7 +1473,7 @@ class EdbHfss(object):
|
|
|
1473
1473
|
cmp_names = []
|
|
1474
1474
|
ii = 0
|
|
1475
1475
|
for cc in cmp_names:
|
|
1476
|
-
cmp = self._pedb.
|
|
1476
|
+
cmp = self._pedb.core.cell.hierarchy.component.FindByName(self._active_layout, cc)
|
|
1477
1477
|
if cmp.IsNull():
|
|
1478
1478
|
self._logger.warning("RenamePorts: could not find component {0}".format(cc))
|
|
1479
1479
|
continue
|
|
@@ -1512,7 +1512,7 @@ class EdbHfss(object):
|
|
|
1512
1512
|
"'PEC Launch Width'='0mm')"
|
|
1513
1513
|
)
|
|
1514
1514
|
for tt in terms:
|
|
1515
|
-
tt.SetProductSolverOption(self._edb.
|
|
1515
|
+
tt.SetProductSolverOption(self._edb.core.ProductId.Designer, "HFSS", option)
|
|
1516
1516
|
return True
|
|
1517
1517
|
|
|
1518
1518
|
def _get_terminals_bbox(self, comp, l_inst, terminals_only):
|
|
@@ -111,7 +111,7 @@ class Material(object):
|
|
|
111
111
|
|
|
112
112
|
def __init__(self, edb: Edb, material_def):
|
|
113
113
|
self.__edb: Edb = edb
|
|
114
|
-
self.__edb_definition = edb.
|
|
114
|
+
self.__edb_definition = edb.core.definition
|
|
115
115
|
self.__name: str = material_def.GetName()
|
|
116
116
|
self.__material_def = material_def
|
|
117
117
|
self.__dc_model = material_def.GetDielectricMaterialModel()
|
|
@@ -553,7 +553,7 @@ class Materials(object):
|
|
|
553
553
|
|
|
554
554
|
def __init__(self, edb: Edb):
|
|
555
555
|
self.__edb = edb
|
|
556
|
-
self.__edb_definition = edb.
|
|
556
|
+
self.__edb_definition = edb.core.definition
|
|
557
557
|
self.__syslib = os.path.join(self.__edb.base_path, "syslib")
|
|
558
558
|
|
|
559
559
|
def __contains__(self, item):
|
pyedb/dotnet/database/modeler.py
CHANGED
|
@@ -70,7 +70,7 @@ class Modeler(object):
|
|
|
70
70
|
|
|
71
71
|
@property
|
|
72
72
|
def _edb(self):
|
|
73
|
-
return self._pedb.
|
|
73
|
+
return self._pedb.core
|
|
74
74
|
|
|
75
75
|
def _get_edb_value(self, value):
|
|
76
76
|
return self._pedb.edb_value(value)
|
|
@@ -289,20 +289,20 @@ class Modeler(object):
|
|
|
289
289
|
if not isinstance(point, list) and len(point) == 2:
|
|
290
290
|
self._logger.error("Provided point must be a list of two values")
|
|
291
291
|
return False
|
|
292
|
-
pt = self._edb.geometry.point_data(point[0], point[1])
|
|
293
|
-
if
|
|
294
|
-
nets
|
|
295
|
-
|
|
292
|
+
pt = self._edb.geometry.point_data(self._pedb.edb_value(point[0]), self._pedb.edb_value(point[1]))
|
|
293
|
+
if nets:
|
|
294
|
+
if isinstance(nets, str):
|
|
295
|
+
nets = [nets]
|
|
296
296
|
_nets = []
|
|
297
297
|
for net in nets:
|
|
298
298
|
if net not in self._pedb.nets:
|
|
299
|
-
self._logger.
|
|
299
|
+
self._logger.warning(
|
|
300
300
|
f"Net {net} used to find primitive from layer point and net not found, skipping it."
|
|
301
301
|
)
|
|
302
302
|
else:
|
|
303
303
|
_nets.append(self._pedb.nets[net].net_obj)
|
|
304
304
|
if _nets:
|
|
305
|
-
nets = _nets
|
|
305
|
+
nets = convert_py_list_to_net_list(_nets)
|
|
306
306
|
_obj_instances = list(self._pedb.layout_instance.FindLayoutObjInstance(pt, None, nets).Items)
|
|
307
307
|
returned_obj = []
|
|
308
308
|
if layer:
|
|
@@ -324,10 +324,7 @@ class Modeler(object):
|
|
|
324
324
|
else:
|
|
325
325
|
for obj in _obj_instances:
|
|
326
326
|
obj_id = obj.GetLayoutObj().GetId()
|
|
327
|
-
[
|
|
328
|
-
returned_obj.append(Primitive(p, self._pedb))
|
|
329
|
-
for p in [obj for obj in self.primitives if obj.id == obj_id]
|
|
330
|
-
]
|
|
327
|
+
[returned_obj.append(p) for p in [obj for obj in self.primitives if obj.id == obj_id]]
|
|
331
328
|
return returned_obj
|
|
332
329
|
|
|
333
330
|
def get_polygon_bounding_box(self, polygon):
|
pyedb/dotnet/database/nets.py
CHANGED
|
@@ -23,7 +23,9 @@
|
|
|
23
23
|
"""
|
|
24
24
|
This module contains the `EdbPadstacks` class.
|
|
25
25
|
"""
|
|
26
|
+
from collections import defaultdict
|
|
26
27
|
import math
|
|
28
|
+
from typing import Dict, List
|
|
27
29
|
import warnings
|
|
28
30
|
|
|
29
31
|
import numpy as np
|
|
@@ -82,7 +84,7 @@ class EdbPadstacks(object):
|
|
|
82
84
|
@property
|
|
83
85
|
def _edb(self):
|
|
84
86
|
""" """
|
|
85
|
-
return self._pedb.
|
|
87
|
+
return self._pedb.core
|
|
86
88
|
|
|
87
89
|
def _get_edb_value(self, value):
|
|
88
90
|
return self._pedb.edb_value(value)
|
|
@@ -1871,3 +1873,72 @@ class EdbPadstacks(object):
|
|
|
1871
1873
|
all_instances[item].delete()
|
|
1872
1874
|
|
|
1873
1875
|
return True
|
|
1876
|
+
|
|
1877
|
+
@staticmethod
|
|
1878
|
+
def dbscan(
|
|
1879
|
+
padstack: Dict[int, List[float]], max_distance: float = 1e-3, min_samples: int = 5
|
|
1880
|
+
) -> Dict[int, List[str]]:
|
|
1881
|
+
"""
|
|
1882
|
+
density based spatial clustering for padstack instances
|
|
1883
|
+
|
|
1884
|
+
Parameters
|
|
1885
|
+
----------
|
|
1886
|
+
padstack : dict.
|
|
1887
|
+
padstack id: [x, y]
|
|
1888
|
+
|
|
1889
|
+
max_distance: float
|
|
1890
|
+
maximum distance between two points to be included in one cluster
|
|
1891
|
+
|
|
1892
|
+
min_samples: int
|
|
1893
|
+
minimum number of points that a cluster must have
|
|
1894
|
+
|
|
1895
|
+
Returns
|
|
1896
|
+
-------
|
|
1897
|
+
dict
|
|
1898
|
+
clusters {cluster label: [padstack ids]} <
|
|
1899
|
+
"""
|
|
1900
|
+
|
|
1901
|
+
padstack_ids = list(padstack.keys())
|
|
1902
|
+
xy_array = np.array([padstack[pid] for pid in padstack_ids])
|
|
1903
|
+
n = len(padstack_ids)
|
|
1904
|
+
|
|
1905
|
+
labels = -1 * np.ones(n, dtype=int)
|
|
1906
|
+
visited = np.zeros(n, dtype=bool)
|
|
1907
|
+
cluster_id = 0
|
|
1908
|
+
|
|
1909
|
+
def region_query(point_idx):
|
|
1910
|
+
distances = np.linalg.norm(xy_array - xy_array[point_idx], axis=1)
|
|
1911
|
+
return np.where(distances <= max_distance)[0]
|
|
1912
|
+
|
|
1913
|
+
def expand_cluster(point_idx, neighbors):
|
|
1914
|
+
nonlocal cluster_id
|
|
1915
|
+
labels[point_idx] = cluster_id
|
|
1916
|
+
i = 0
|
|
1917
|
+
while i < len(neighbors):
|
|
1918
|
+
neighbor_idx = neighbors[i]
|
|
1919
|
+
if not visited[neighbor_idx]:
|
|
1920
|
+
visited[neighbor_idx] = True
|
|
1921
|
+
neighbor_neighbors = region_query(neighbor_idx)
|
|
1922
|
+
if len(neighbor_neighbors) >= min_samples:
|
|
1923
|
+
neighbors = np.concatenate((neighbors, neighbor_neighbors))
|
|
1924
|
+
if labels[neighbor_idx] == -1:
|
|
1925
|
+
labels[neighbor_idx] = cluster_id
|
|
1926
|
+
i += 1
|
|
1927
|
+
|
|
1928
|
+
for point_idx in range(n):
|
|
1929
|
+
if visited[point_idx]:
|
|
1930
|
+
continue
|
|
1931
|
+
visited[point_idx] = True
|
|
1932
|
+
neighbors = region_query(point_idx)
|
|
1933
|
+
if len(neighbors) < min_samples:
|
|
1934
|
+
labels[point_idx] = -1
|
|
1935
|
+
else:
|
|
1936
|
+
expand_cluster(point_idx, neighbors)
|
|
1937
|
+
cluster_id += 1
|
|
1938
|
+
|
|
1939
|
+
# group point IDs by label
|
|
1940
|
+
clusters = defaultdict(list)
|
|
1941
|
+
for i, label in enumerate(labels):
|
|
1942
|
+
clusters[int(label)].append(padstack_ids[i])
|
|
1943
|
+
|
|
1944
|
+
return dict(clusters)
|