pyedb 0.53.0__py3-none-any.whl → 0.55.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pyedb might be problematic. Click here for more details.
- 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 +20 -9
- pyedb/configuration/cfg_s_parameter_models.py +67 -172
- pyedb/configuration/cfg_setup.py +102 -295
- pyedb/configuration/configuration.py +66 -6
- 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 +64 -3
- pyedb/dotnet/database/cell/layout_obj.py +3 -3
- pyedb/dotnet/database/cell/primitive/path.py +6 -8
- pyedb/dotnet/database/cell/primitive/primitive.py +10 -31
- 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 +26 -28
- pyedb/dotnet/database/cell/voltage_regulator.py +0 -21
- pyedb/dotnet/database/components.py +99 -91
- 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 +27 -218
- pyedb/dotnet/database/dotnet/primitive.py +16 -16
- 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 +35 -35
- pyedb/dotnet/database/edb_data/padstacks_data.py +65 -90
- 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 +8 -4
- pyedb/dotnet/database/geometry/point_data.py +14 -10
- pyedb/dotnet/database/geometry/polygon_data.py +3 -5
- pyedb/dotnet/database/hfss.py +50 -52
- pyedb/dotnet/database/layout_validation.py +14 -11
- pyedb/dotnet/database/materials.py +10 -11
- pyedb/dotnet/database/modeler.py +104 -101
- pyedb/dotnet/database/nets.py +20 -23
- pyedb/dotnet/database/padstack.py +156 -84
- 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 +47 -47
- pyedb/dotnet/database/stackup.py +152 -87
- pyedb/dotnet/database/utilities/heatsink.py +4 -4
- pyedb/dotnet/database/utilities/obj_base.py +3 -3
- pyedb/dotnet/database/utilities/simulation_setup.py +2 -2
- pyedb/dotnet/database/utilities/value.py +116 -0
- pyedb/dotnet/edb.py +248 -170
- pyedb/edb_logger.py +12 -27
- pyedb/extensions/via_design_backend.py +6 -3
- pyedb/generic/design_types.py +68 -21
- pyedb/generic/general_methods.py +0 -120
- pyedb/generic/process.py +44 -108
- pyedb/generic/settings.py +75 -19
- pyedb/grpc/__init__.py +0 -0
- pyedb/grpc/database/components.py +55 -17
- pyedb/grpc/database/control_file.py +5 -5
- pyedb/grpc/database/definition/materials.py +24 -31
- pyedb/grpc/database/definition/package_def.py +18 -18
- pyedb/grpc/database/definition/padstack_def.py +104 -51
- 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 +4 -3
- 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 +17 -13
- pyedb/grpc/database/layout/voltage_regulator.py +7 -7
- pyedb/grpc/database/layout_validation.py +16 -15
- pyedb/grpc/database/modeler.py +60 -58
- pyedb/grpc/database/net/net.py +15 -14
- pyedb/grpc/database/nets.py +112 -31
- pyedb/grpc/database/padstacks.py +303 -190
- 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 +191 -23
- 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_simulation_setup.py +17 -1
- pyedb/grpc/database/siwave.py +31 -25
- pyedb/grpc/database/source_excitations.py +335 -233
- pyedb/grpc/database/stackup.py +165 -148
- pyedb/grpc/database/terminal/bundle_terminal.py +18 -8
- pyedb/grpc/database/terminal/edge_terminal.py +10 -0
- pyedb/grpc/database/terminal/padstack_instance_terminal.py +16 -5
- pyedb/grpc/database/terminal/pingroup_terminal.py +12 -11
- 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/database/utility/xml_control_file.py +5 -5
- pyedb/grpc/edb.py +130 -63
- pyedb/grpc/edb_init.py +3 -10
- pyedb/grpc/rpc_session.py +10 -10
- pyedb/libraries/common.py +366 -0
- pyedb/libraries/rf_libraries/base_functions.py +1358 -0
- pyedb/libraries/rf_libraries/planar_antennas.py +628 -0
- pyedb/misc/decorators.py +61 -0
- pyedb/misc/misc.py +0 -13
- pyedb/siwave.py +2 -2
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/METADATA +2 -3
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/RECORD +119 -112
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/WHEEL +0 -0
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -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:
|
|
@@ -41,7 +42,7 @@ class Variable:
|
|
|
41
42
|
if self._is_design_varible:
|
|
42
43
|
return self._pedb.active_cell.GetVariableServer()
|
|
43
44
|
else:
|
|
44
|
-
return self._pedb.
|
|
45
|
+
return self._pedb._db.GetVariableServer()
|
|
45
46
|
|
|
46
47
|
@property
|
|
47
48
|
def name(self):
|
|
@@ -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):
|
|
@@ -24,17 +24,21 @@
|
|
|
24
24
|
class PointData:
|
|
25
25
|
"""Point Data."""
|
|
26
26
|
|
|
27
|
-
def __init__(self, pedb, edb_object=None
|
|
27
|
+
def __init__(self, pedb, edb_object=None):
|
|
28
28
|
self._pedb = pedb
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
self._edb_object = edb_object
|
|
30
|
+
|
|
31
|
+
@classmethod
|
|
32
|
+
def create_from_x(cls, pedb, x):
|
|
33
|
+
"""Create a new PointData object."""
|
|
34
|
+
edb_object = pedb.core.Geometry.PointData(pedb.edb_value(x))
|
|
35
|
+
return cls(pedb, edb_object)
|
|
36
|
+
|
|
37
|
+
@classmethod
|
|
38
|
+
def create_from_xy(cls, pedb, x, y):
|
|
39
|
+
"""Create a new PointData object."""
|
|
40
|
+
edb_object = pedb.core.Geometry.PointData(pedb.edb_value(x), pedb.edb_value(y))
|
|
41
|
+
return cls(pedb, edb_object)
|
|
38
42
|
|
|
39
43
|
@property
|
|
40
44
|
def x(self):
|
|
@@ -90,14 +90,12 @@ class PolygonData:
|
|
|
90
90
|
def create_from_points(self, points, closed=True):
|
|
91
91
|
list_of_point_data = []
|
|
92
92
|
for pt in points:
|
|
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
|
-
)
|
|
93
|
+
list_of_point_data.append(PointData.create_from_xy(self._pedb, x=pt[0], y=pt[1])._edb_object)
|
|
94
|
+
return self._pedb.core.Geometry.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.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):
|
|
@@ -130,16 +130,16 @@ class EdbHfss(object):
|
|
|
130
130
|
if not terminal_name:
|
|
131
131
|
terminal_name = generate_unique_name("Terminal_")
|
|
132
132
|
if isinstance(point_on_edge, (list, tuple)):
|
|
133
|
-
point_on_edge = self._edb.
|
|
133
|
+
point_on_edge = self._edb.Geometry.PointData(
|
|
134
134
|
self._get_edb_value(point_on_edge[0]), self._get_edb_value(point_on_edge[1])
|
|
135
135
|
)
|
|
136
136
|
if hasattr(prim_id, "GetId"):
|
|
137
137
|
prim = prim_id
|
|
138
138
|
else:
|
|
139
139
|
prim = [i for i in self._pedb.modeler.primitives if i.id == prim_id][0].primitive_object
|
|
140
|
-
pos_edge = self._edb.
|
|
141
|
-
pos_edge = convert_py_list_to_net_list(pos_edge, self._edb.
|
|
142
|
-
return self._edb.
|
|
140
|
+
pos_edge = self._edb.Cell.Terminal.PrimitiveEdge.Create(prim, point_on_edge)
|
|
141
|
+
pos_edge = convert_py_list_to_net_list(pos_edge, self._edb.Cell.Terminal.Edge)
|
|
142
|
+
return self._edb.Cell.Terminal.EdgeTerminal.Create(
|
|
143
143
|
prim.GetLayout(), prim.GetNet(), terminal_name, pos_edge, isRef=is_ref
|
|
144
144
|
)
|
|
145
145
|
|
|
@@ -470,7 +470,7 @@ class EdbHfss(object):
|
|
|
470
470
|
if (
|
|
471
471
|
res
|
|
472
472
|
and from_layer_pos
|
|
473
|
-
and self._edb.
|
|
473
|
+
and self._edb.Cell.Terminal.PadstackInstanceTerminal.Create(
|
|
474
474
|
self._active_layout,
|
|
475
475
|
py_inst.pin.GetNet(),
|
|
476
476
|
port_name,
|
|
@@ -550,9 +550,9 @@ class EdbHfss(object):
|
|
|
550
550
|
pec_launch_width=pec_launch_width,
|
|
551
551
|
)
|
|
552
552
|
edb_list = convert_py_list_to_net_list(
|
|
553
|
-
[pos_term._edb_object, neg_term._edb_object], self._edb.
|
|
553
|
+
[pos_term._edb_object, neg_term._edb_object], self._edb.Cell.Terminal.Terminal
|
|
554
554
|
)
|
|
555
|
-
_edb_boundle_terminal = self._edb.
|
|
555
|
+
_edb_boundle_terminal = self._edb.Cell.Terminal.BundleTerminal.Create(edb_list)
|
|
556
556
|
_edb_boundle_terminal.SetName(port_name)
|
|
557
557
|
pos, neg = list(_edb_boundle_terminal.GetTerminals())
|
|
558
558
|
pos.SetName(port_name + ":T1")
|
|
@@ -616,8 +616,8 @@ class EdbHfss(object):
|
|
|
616
616
|
_port_name = None
|
|
617
617
|
terminals.append(term)
|
|
618
618
|
|
|
619
|
-
edb_list = convert_py_list_to_net_list([i._edb_object for i in terminals], self._edb.
|
|
620
|
-
_edb_bundle_terminal = self._edb.
|
|
619
|
+
edb_list = convert_py_list_to_net_list([i._edb_object for i in terminals], self._edb.Cell.Terminal.Terminal)
|
|
620
|
+
_edb_bundle_terminal = self._edb.Cell.Terminal.BundleTerminal.Create(edb_list)
|
|
621
621
|
return port_name, BundleWavePort(self._pedb, _edb_bundle_terminal)
|
|
622
622
|
|
|
623
623
|
def create_hfss_ports_on_padstack(self, pinpos, portname=None):
|
|
@@ -640,7 +640,7 @@ class EdbHfss(object):
|
|
|
640
640
|
|
|
641
641
|
if not portname:
|
|
642
642
|
portname = generate_unique_name("Port_" + pinpos.GetNet().GetName())
|
|
643
|
-
edbpointTerm_pos = self._edb.
|
|
643
|
+
edbpointTerm_pos = self._edb.Cell.Terminal.PadstackInstanceTerminal.Create(
|
|
644
644
|
self._active_layout, pinpos.GetNet(), portname, pinpos, toLayer_pos
|
|
645
645
|
)
|
|
646
646
|
if edbpointTerm_pos:
|
|
@@ -717,18 +717,18 @@ class EdbHfss(object):
|
|
|
717
717
|
if not isinstance(terminal_point, list):
|
|
718
718
|
self._logger.error("Terminal point must be a list of float with providing the point location in meter")
|
|
719
719
|
return False
|
|
720
|
-
terminal_point = self._edb.
|
|
720
|
+
terminal_point = self._edb.Geometry.PointData(
|
|
721
721
|
self._get_edb_value(terminal_point[0]), self._get_edb_value(terminal_point[1])
|
|
722
722
|
)
|
|
723
723
|
if reference_point and isinstance(reference_point, list):
|
|
724
|
-
reference_point = self._edb.
|
|
724
|
+
reference_point = self._edb.Geometry.PointData(
|
|
725
725
|
self._get_edb_value(reference_point[0]), self._get_edb_value(reference_point[1])
|
|
726
726
|
)
|
|
727
727
|
if not port_name:
|
|
728
728
|
port_name = generate_unique_name("Port_")
|
|
729
|
-
edge = self._edb.
|
|
730
|
-
edges = convert_py_list_to_net_list(edge, self._edb.
|
|
731
|
-
edge_term = self._edb.
|
|
729
|
+
edge = self._edb.Cell.Terminal.PrimitiveEdge.Create(polygon._edb_object, terminal_point)
|
|
730
|
+
edges = convert_py_list_to_net_list(edge, self._edb.Cell.Terminal.Edge)
|
|
731
|
+
edge_term = self._edb.Cell.Terminal.EdgeTerminal.Create(
|
|
732
732
|
polygon._edb_object.GetLayout(), polygon._edb_object.GetNet(), port_name, edges, isRef=False
|
|
733
733
|
)
|
|
734
734
|
if force_circuit_port:
|
|
@@ -740,9 +740,9 @@ class EdbHfss(object):
|
|
|
740
740
|
edge_term.SetImpedance(self._pedb.edb_value(port_impedance))
|
|
741
741
|
edge_term.SetName(port_name)
|
|
742
742
|
if reference_polygon and reference_point:
|
|
743
|
-
ref_edge = self._edb.
|
|
744
|
-
ref_edges = convert_py_list_to_net_list(ref_edge, self._edb.
|
|
745
|
-
ref_edge_term = self._edb.
|
|
743
|
+
ref_edge = self._edb.Cell.Terminal.PrimitiveEdge.Create(reference_polygon._edb_object, reference_point)
|
|
744
|
+
ref_edges = convert_py_list_to_net_list(ref_edge, self._edb.Cell.Terminal.Edge)
|
|
745
|
+
ref_edge_term = self._edb.Cell.Terminal.EdgeTerminal.Create(
|
|
746
746
|
reference_polygon._edb_object.GetLayout(),
|
|
747
747
|
reference_polygon._edb_object.GetNet(),
|
|
748
748
|
port_name + "_ref",
|
|
@@ -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
|
)
|
|
@@ -981,15 +981,15 @@ class EdbHfss(object):
|
|
|
981
981
|
"""
|
|
982
982
|
if not isinstance(nets, list):
|
|
983
983
|
if isinstance(nets, str):
|
|
984
|
-
nets = [self._edb.
|
|
985
|
-
elif isinstance(nets, self._edb.
|
|
984
|
+
nets = [self._edb.Cell.net.find_by_name(self._active_layout, nets)]
|
|
985
|
+
elif isinstance(nets, self._edb.Cell.net.net):
|
|
986
986
|
nets = [nets]
|
|
987
987
|
else:
|
|
988
988
|
temp_nets = []
|
|
989
989
|
for nn in nets:
|
|
990
990
|
if isinstance(nn, str):
|
|
991
|
-
temp_nets.append(self._edb.
|
|
992
|
-
elif isinstance(nn, self._edb.
|
|
991
|
+
temp_nets.append(self._edb.Cell.net.find_by_name(self._active_layout, nn))
|
|
992
|
+
elif isinstance(nn, self._edb.Cell.net.net):
|
|
993
993
|
temp_nets.append(nn)
|
|
994
994
|
nets = temp_nets
|
|
995
995
|
port_created = False
|
|
@@ -1109,7 +1109,7 @@ class EdbHfss(object):
|
|
|
1109
1109
|
net_polygons = [
|
|
1110
1110
|
pp
|
|
1111
1111
|
for pp in net.primitives
|
|
1112
|
-
if pp._edb_object.GetPrimitiveType() == self._edb.
|
|
1112
|
+
if pp._edb_object.GetPrimitiveType() == self._edb.Cell.Primitive.PrimitiveType.Polygon
|
|
1113
1113
|
]
|
|
1114
1114
|
for poly in net_polygons:
|
|
1115
1115
|
mid_points = [[arc.mid_point.X.ToDouble(), arc.mid_point.Y.ToDouble()] for arc in poly.arcs]
|
|
@@ -1121,8 +1121,8 @@ class EdbHfss(object):
|
|
|
1121
1121
|
self._logger.info("Terminal {} created".format(term.GetName()))
|
|
1122
1122
|
term.SetIsCircuitPort(True)
|
|
1123
1123
|
terminal_info.append([poly.net.name, mid_point[0], mid_point[1], term.GetName()])
|
|
1124
|
-
mid_pt_data = self._edb.
|
|
1125
|
-
self._edb.
|
|
1124
|
+
mid_pt_data = self._edb.Geometry.PointData(
|
|
1125
|
+
self._edb.Utility.Value(mid_point[0]), self._edb.Utility.Value(mid_point[1])
|
|
1126
1126
|
)
|
|
1127
1127
|
ref_prim = [
|
|
1128
1128
|
prim
|
|
@@ -1138,13 +1138,13 @@ class EdbHfss(object):
|
|
|
1138
1138
|
(mid_point[0] + mid_point[0] * 1e-3, mid_point[1] - mid_point[1] * 1e-3),
|
|
1139
1139
|
]
|
|
1140
1140
|
for new_point in scanning_zone:
|
|
1141
|
-
mid_pt_data = self._edb.
|
|
1142
|
-
self._edb.
|
|
1141
|
+
mid_pt_data = self._edb.Geometry.PointData(
|
|
1142
|
+
self._edb.Utility.Value(new_point[0]), self._edb.Utility.Value(new_point[1])
|
|
1143
1143
|
)
|
|
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")
|
|
@@ -1181,7 +1181,7 @@ class EdbHfss(object):
|
|
|
1181
1181
|
for lobj in layout_obj_instances.Items:
|
|
1182
1182
|
lobj_bbox = lobj.GetLayoutInstanceContext().GetBBox(False)
|
|
1183
1183
|
tuple_list.append(lobj_bbox)
|
|
1184
|
-
_bbox = self._edb.
|
|
1184
|
+
_bbox = self._edb.Geometry.PolygonData.GetBBoxOfBoxes(convert_py_list_to_net_list(tuple_list))
|
|
1185
1185
|
layout_bbox = [
|
|
1186
1186
|
round(_bbox.Item1.X.ToDouble(), digit_resolution),
|
|
1187
1187
|
round(_bbox.Item1.Y.ToDouble(), digit_resolution),
|
|
@@ -1209,13 +1209,13 @@ class EdbHfss(object):
|
|
|
1209
1209
|
"Configure HFSS extent requires edb_data.simulation_configuration.SimulationConfiguration object"
|
|
1210
1210
|
)
|
|
1211
1211
|
return False
|
|
1212
|
-
hfss_extent = self._edb.
|
|
1212
|
+
hfss_extent = self._edb.Utility.HFSSExtentInfo()
|
|
1213
1213
|
if simulation_setup.radiation_box == RadiationBoxType.BoundingBox:
|
|
1214
|
-
hfss_extent.ExtentType = self._edb.
|
|
1214
|
+
hfss_extent.ExtentType = self._edb.Utility.HFSSExtentInfoType.BoundingBox
|
|
1215
1215
|
elif simulation_setup.radiation_box == RadiationBoxType.Conformal:
|
|
1216
|
-
hfss_extent.ExtentType = self._edb.
|
|
1216
|
+
hfss_extent.ExtentType = self._edb.Utility.HFSSExtentInfoType.Conforming
|
|
1217
1217
|
else:
|
|
1218
|
-
hfss_extent.ExtentType = self._edb.
|
|
1218
|
+
hfss_extent.ExtentType = self._edb.Utility.HFSSExtentInfoType.ConvexHull
|
|
1219
1219
|
hfss_extent.DielectricExtentSize = convert_pytuple_to_nettuple(
|
|
1220
1220
|
(simulation_setup.dielectric_extent, simulation_setup.use_dielectric_extent_multiple)
|
|
1221
1221
|
)
|
|
@@ -1346,7 +1346,7 @@ class EdbHfss(object):
|
|
|
1346
1346
|
except Exception as err:
|
|
1347
1347
|
self._logger.error("Exception in Sweep configuration: {0}".format(err))
|
|
1348
1348
|
|
|
1349
|
-
sim_setup = self._edb.
|
|
1349
|
+
sim_setup = self._edb.Utility.HFSSSimulationSetup(simsetup_info)
|
|
1350
1350
|
for setup in self._layout.cell.SimulationSetups:
|
|
1351
1351
|
self._layout.cell.DeleteSimulationSetup(setup.GetName())
|
|
1352
1352
|
self._logger.warning("Setup {} has been deleted".format(setup.GetName()))
|
|
@@ -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
|
|
|
@@ -1416,7 +1416,7 @@ class EdbHfss(object):
|
|
|
1416
1416
|
pin_list = [
|
|
1417
1417
|
obj
|
|
1418
1418
|
for obj in list(comp.LayoutObjs)
|
|
1419
|
-
if obj.GetObjType() == self._edb.
|
|
1419
|
+
if obj.GetObjType() == self._edb.Cell.LayoutObjectType.PadstackInstance
|
|
1420
1420
|
]
|
|
1421
1421
|
for pin in pin_list:
|
|
1422
1422
|
loi = l_inst.GetLayoutObjInstance(pin, None)
|
|
@@ -1473,13 +1473,11 @@ 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
|
|
1480
|
-
terms = [
|
|
1481
|
-
obj for obj in list(cmp.LayoutObjs) if obj.GetObjType() == self._edb.cell.layout_object_type.Terminal
|
|
1482
|
-
]
|
|
1480
|
+
terms = [obj for obj in list(cmp.LayoutObjs) if obj.GetObjType() == self._edb.Cell.LayoutObjType.Terminal]
|
|
1483
1481
|
for nn in net_names:
|
|
1484
1482
|
for tt in [term for term in terms if term.GetNet().GetName() == nn]:
|
|
1485
1483
|
if not tt.SetImpedance(self._pedb.edb_value("50ohm")):
|
|
@@ -1491,9 +1489,9 @@ class EdbHfss(object):
|
|
|
1491
1489
|
# Set the Radial Extent Factor
|
|
1492
1490
|
typ = cmp.GetComponentType()
|
|
1493
1491
|
if typ in [
|
|
1494
|
-
self._edb.
|
|
1495
|
-
self._edb.
|
|
1496
|
-
self._edb.
|
|
1492
|
+
self._edb.Definition.ComponentType.Other,
|
|
1493
|
+
self._edb.Definition.ComponentType.IC,
|
|
1494
|
+
self._edb.Definition.ComponentType.IO,
|
|
1497
1495
|
]:
|
|
1498
1496
|
cmp_prop = cmp.GetComponentProperty().Clone()
|
|
1499
1497
|
(
|
|
@@ -1512,14 +1510,14 @@ class EdbHfss(object):
|
|
|
1512
1510
|
"'PEC Launch Width'='0mm')"
|
|
1513
1511
|
)
|
|
1514
1512
|
for tt in terms:
|
|
1515
|
-
tt.SetProductSolverOption(self._edb.
|
|
1513
|
+
tt.SetProductSolverOption(self._edb.ProductId.Designer, "HFSS", option)
|
|
1516
1514
|
return True
|
|
1517
1515
|
|
|
1518
1516
|
def _get_terminals_bbox(self, comp, l_inst, terminals_only):
|
|
1519
1517
|
terms_loi = []
|
|
1520
1518
|
if terminals_only:
|
|
1521
1519
|
term_list = [
|
|
1522
|
-
obj for obj in list(comp.LayoutObjs) if obj.GetObjType() == self._edb.
|
|
1520
|
+
obj for obj in list(comp.LayoutObjs) if obj.GetObjType() == self._edb.Cell.LayoutObjectType.Terminal
|
|
1523
1521
|
]
|
|
1524
1522
|
for tt in term_list:
|
|
1525
1523
|
success, p_inst, lyr = tt.GetParameters()
|
|
@@ -1530,7 +1528,7 @@ class EdbHfss(object):
|
|
|
1530
1528
|
pin_list = [
|
|
1531
1529
|
obj
|
|
1532
1530
|
for obj in list(comp.LayoutObjs)
|
|
1533
|
-
if obj.GetObjType() == self._edb.
|
|
1531
|
+
if obj.GetObjType() == self._edb.Cell.LayoutObjectType.PadstackInstance
|
|
1534
1532
|
]
|
|
1535
1533
|
for pi in pin_list:
|
|
1536
1534
|
loi = l_inst.GetLayoutObjInstance(pi, None)
|
|
@@ -1643,9 +1641,9 @@ class EdbHfss(object):
|
|
|
1643
1641
|
if positive_pin and negative_pin:
|
|
1644
1642
|
positive_pin_term = self._pedb.components._create_terminal(positive_pin)
|
|
1645
1643
|
negative_pin_term = self._pedb.components._create_terminal(negative_pin)
|
|
1646
|
-
positive_pin_term.SetBoundaryType(self._edb.
|
|
1647
|
-
negative_pin_term.SetBoundaryType(self._edb.
|
|
1648
|
-
rlc = self._edb.
|
|
1644
|
+
positive_pin_term.SetBoundaryType(self._edb.Cell.Terminal.BoundaryType.RlcBoundary)
|
|
1645
|
+
negative_pin_term.SetBoundaryType(self._edb.Cell.Terminal.BoundaryType.RlcBoundary)
|
|
1646
|
+
rlc = self._edb.Utility.Rlc()
|
|
1649
1647
|
rlc.IsParallel = True
|
|
1650
1648
|
rlc.REnabled = True
|
|
1651
1649
|
rlc.LEnabled = True
|
|
@@ -25,6 +25,7 @@ import re
|
|
|
25
25
|
from pyedb.dotnet.database.edb_data.padstacks_data import EDBPadstackInstance
|
|
26
26
|
from pyedb.dotnet.database.edb_data.primitives_data import Primitive
|
|
27
27
|
from pyedb.generic.general_methods import generate_unique_name
|
|
28
|
+
from pyedb.misc.decorators import execution_timer
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
class LayoutValidation:
|
|
@@ -33,6 +34,7 @@ class LayoutValidation:
|
|
|
33
34
|
def __init__(self, pedb):
|
|
34
35
|
self._pedb = pedb
|
|
35
36
|
|
|
37
|
+
@execution_timer("dc_shorts")
|
|
36
38
|
def dc_shorts(self, net_list=None, fix=False):
|
|
37
39
|
"""Find DC shorts on layout.
|
|
38
40
|
|
|
@@ -120,6 +122,7 @@ class LayoutValidation:
|
|
|
120
122
|
# i.net = temp_name
|
|
121
123
|
return dc_shorts
|
|
122
124
|
|
|
125
|
+
@execution_timer("disjoint_nets")
|
|
123
126
|
def disjoint_nets(
|
|
124
127
|
self,
|
|
125
128
|
net_list=None,
|
|
@@ -154,10 +157,9 @@ class LayoutValidation:
|
|
|
154
157
|
|
|
155
158
|
>>> renamed_nets = edb.layout_validation.disjoint_nets(["GND","Net2"])
|
|
156
159
|
"""
|
|
157
|
-
timer_start = self._pedb._logger.reset_timer()
|
|
158
160
|
|
|
159
161
|
if not net_list:
|
|
160
|
-
net_list = list(self._pedb.nets.keys())
|
|
162
|
+
net_list = list(self._pedb.nets.nets.keys())
|
|
161
163
|
elif isinstance(net_list, str):
|
|
162
164
|
net_list = [net_list]
|
|
163
165
|
_objects_list = {}
|
|
@@ -176,7 +178,6 @@ class LayoutValidation:
|
|
|
176
178
|
_padstacks_list[n_name] = [pad]
|
|
177
179
|
new_nets = []
|
|
178
180
|
disjoints_objects = []
|
|
179
|
-
self._pedb._logger.reset_timer()
|
|
180
181
|
for net in net_list:
|
|
181
182
|
net_groups = []
|
|
182
183
|
obj_dict = {}
|
|
@@ -253,11 +254,10 @@ class LayoutValidation:
|
|
|
253
254
|
except KeyError:
|
|
254
255
|
pass
|
|
255
256
|
disjoints_objects.extend(disjoints)
|
|
256
|
-
self._pedb.
|
|
257
|
-
self._pedb._logger.info_timer("Disjoint Cleanup Completed.", timer_start)
|
|
258
|
-
|
|
257
|
+
self._pedb.logger.info("Found {} objects in {} new nets.".format(len(disjoints_objects), len(new_nets)))
|
|
259
258
|
return new_nets
|
|
260
259
|
|
|
260
|
+
@execution_timer("self_intersections")
|
|
261
261
|
def fix_self_intersections(self, net_list=None):
|
|
262
262
|
"""Find and fix self intersections from a given netlist.
|
|
263
263
|
|
|
@@ -279,11 +279,12 @@ class LayoutValidation:
|
|
|
279
279
|
if prim.net_name in net_list:
|
|
280
280
|
new_prims.extend(prim.fix_self_intersections())
|
|
281
281
|
if new_prims:
|
|
282
|
-
self._pedb.
|
|
282
|
+
self._pedb.logger.info("Self-intersections detected and removed.")
|
|
283
283
|
else:
|
|
284
|
-
self._pedb.
|
|
284
|
+
self._pedb.logger.info("Self-intersection not found.")
|
|
285
285
|
return True
|
|
286
286
|
|
|
287
|
+
@execution_timer("illegal_net_names")
|
|
287
288
|
def illegal_net_names(self, fix=False):
|
|
288
289
|
"""Find and fix illegal net names."""
|
|
289
290
|
pattern = r"[\(\)\\\/:;*?<>\'\"|`~$]"
|
|
@@ -298,9 +299,10 @@ class LayoutValidation:
|
|
|
298
299
|
new_name = re.sub(pattern, "_", net)
|
|
299
300
|
val.name = new_name
|
|
300
301
|
|
|
301
|
-
self._pedb.
|
|
302
|
+
self._pedb.logger.info("Found {} illegal net names.".format(len(renamed_nets)))
|
|
302
303
|
return
|
|
303
304
|
|
|
305
|
+
@execution_timer("illegal_rlc_values")
|
|
304
306
|
def illegal_rlc_values(self, fix=False):
|
|
305
307
|
"""Find and fix RLC illegal values."""
|
|
306
308
|
|
|
@@ -320,9 +322,10 @@ class LayoutValidation:
|
|
|
320
322
|
if fix:
|
|
321
323
|
v.rlc_values = [0, 1, 0]
|
|
322
324
|
|
|
323
|
-
self._pedb.
|
|
325
|
+
self._pedb.logger.info(f"Found {len(temp)} {name} have no value.")
|
|
324
326
|
return
|
|
325
327
|
|
|
328
|
+
@execution_timer("padstacks_no_name")
|
|
326
329
|
def padstacks_no_name(self, fix=False):
|
|
327
330
|
"""Find and fix padstacks without aedt_name."""
|
|
328
331
|
pds = self._pedb.layout.padstack_instances
|
|
@@ -332,4 +335,4 @@ class LayoutValidation:
|
|
|
332
335
|
counts += 1
|
|
333
336
|
if fix:
|
|
334
337
|
obj.aedt_name = f"via_{obj.id}"
|
|
335
|
-
self._pedb.
|
|
338
|
+
self._pedb.logger.info(f"Found {counts}/{len(pds)} padstacks have no name.")
|
|
@@ -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()
|
|
@@ -191,12 +191,6 @@ class Material(object):
|
|
|
191
191
|
)
|
|
192
192
|
return self.dielectric_loss_tangent
|
|
193
193
|
|
|
194
|
-
@property
|
|
195
|
-
def dielectric_loss_tangent(self):
|
|
196
|
-
"""Get material loss tangent."""
|
|
197
|
-
material_property_id = self.__edb_definition.MaterialPropertyId.DielectricLossTangent
|
|
198
|
-
return self.__property_value(material_property_id)
|
|
199
|
-
|
|
200
194
|
@loss_tangent.setter
|
|
201
195
|
def loss_tangent(self, value):
|
|
202
196
|
"""Set material loss tangent."""
|
|
@@ -205,11 +199,16 @@ class Material(object):
|
|
|
205
199
|
"Use property dielectric_loss_tangent instead.",
|
|
206
200
|
DeprecationWarning,
|
|
207
201
|
)
|
|
208
|
-
|
|
202
|
+
self.dielectric_loss_tangent = value
|
|
203
|
+
|
|
204
|
+
@property
|
|
205
|
+
def dielectric_loss_tangent(self):
|
|
206
|
+
"""Get material loss tangent."""
|
|
207
|
+
material_property_id = self.__edb_definition.MaterialPropertyId.DielectricLossTangent
|
|
208
|
+
return self.__property_value(material_property_id)
|
|
209
209
|
|
|
210
210
|
@dielectric_loss_tangent.setter
|
|
211
211
|
def dielectric_loss_tangent(self, value):
|
|
212
|
-
"""Set material loss tangent."""
|
|
213
212
|
edb_value = self.__edb_value(value)
|
|
214
213
|
material_property_id = self.__edb_definition.MaterialPropertyId.DielectricLossTangent
|
|
215
214
|
self.__material_def.SetProperty(material_property_id, edb_value)
|
|
@@ -553,7 +552,7 @@ class Materials(object):
|
|
|
553
552
|
|
|
554
553
|
def __init__(self, edb: Edb):
|
|
555
554
|
self.__edb = edb
|
|
556
|
-
self.__edb_definition = edb.
|
|
555
|
+
self.__edb_definition = edb.core.Definition
|
|
557
556
|
self.__syslib = os.path.join(self.__edb.base_path, "syslib")
|
|
558
557
|
|
|
559
558
|
def __contains__(self, item):
|
|
@@ -575,7 +574,7 @@ class Materials(object):
|
|
|
575
574
|
"""Get materials."""
|
|
576
575
|
materials = {
|
|
577
576
|
material_def.GetName(): Material(self.__edb, material_def)
|
|
578
|
-
for material_def in list(self.__edb.
|
|
577
|
+
for material_def in list(self.__edb._db.MaterialDefs)
|
|
579
578
|
}
|
|
580
579
|
return materials
|
|
581
580
|
|