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
pyedb/__init__.py
CHANGED
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
|
+
from typing import List, Optional, Union
|
|
24
|
+
|
|
25
|
+
from pydantic import BaseModel
|
|
26
|
+
|
|
23
27
|
|
|
24
28
|
class CfgBase:
|
|
25
29
|
protected_attributes = ["pedb", "pyedb_obj", "api"]
|
|
@@ -41,21 +45,14 @@ class CfgBase:
|
|
|
41
45
|
setattr(pedb_object, attr, value)
|
|
42
46
|
|
|
43
47
|
|
|
44
|
-
class CfgVar:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
self.description = kwargs.get("description", "")
|
|
48
|
+
class CfgVar(BaseModel):
|
|
49
|
+
name: str
|
|
50
|
+
value: Union[int, float, str]
|
|
51
|
+
description: Optional[str] = ""
|
|
49
52
|
|
|
50
53
|
|
|
51
|
-
class CfgVariables:
|
|
52
|
-
|
|
53
|
-
self._pedb = pedb
|
|
54
|
-
self.variables = [CfgVar(**i) for i in data]
|
|
54
|
+
class CfgVariables(BaseModel):
|
|
55
|
+
variables: List[CfgVar] = []
|
|
55
56
|
|
|
56
|
-
def
|
|
57
|
-
|
|
58
|
-
if i.name.startswith("$"):
|
|
59
|
-
self._pedb.add_project_variable(i.name, i.value)
|
|
60
|
-
else:
|
|
61
|
-
self._pedb.add_design_variable(i.name, i.value)
|
|
57
|
+
def add_variable(self, name, value, description=""):
|
|
58
|
+
self.variables.append(CfgVar(name=name, value=value, description=description))
|
pyedb/configuration/cfg_data.py
CHANGED
|
@@ -63,7 +63,7 @@ class CfgData(object):
|
|
|
63
63
|
|
|
64
64
|
self.setups = CfgSetups(self._pedb, setups_data=kwargs.get("setups", []))
|
|
65
65
|
|
|
66
|
-
self.stackup = CfgStackup(
|
|
66
|
+
self.stackup = CfgStackup(**kwargs.get("stackup", {}))
|
|
67
67
|
|
|
68
68
|
self.s_parameters = CfgSParameters(self._pedb, kwargs.get("s_parameters", []), self.general.s_parameter_library)
|
|
69
69
|
|
|
@@ -77,6 +77,6 @@ class CfgData(object):
|
|
|
77
77
|
|
|
78
78
|
self.modeler = CfgModeler(self._pedb, data=kwargs.get("modeler", {}))
|
|
79
79
|
|
|
80
|
-
self.variables = CfgVariables(
|
|
80
|
+
self.variables = CfgVariables(variables=kwargs.get("variables", []))
|
|
81
81
|
|
|
82
82
|
self.probes = CfgProbes(self._pedb, data=kwargs.get("probes", []))
|
|
@@ -20,254 +20,183 @@
|
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
|
+
from dataclasses import dataclass, field
|
|
24
|
+
from typing import Any, Dict, List, Optional, TypedDict, Union
|
|
25
|
+
|
|
23
26
|
from pyedb.configuration.cfg_components import CfgComponent
|
|
24
27
|
from pyedb.configuration.cfg_padstacks import CfgPadstackDefinition, CfgPadstackInstance
|
|
25
|
-
from pyedb.dotnet.database.edb_data.padstacks_data import EDBPadstack
|
|
26
28
|
|
|
27
29
|
|
|
30
|
+
@dataclass
|
|
28
31
|
class CfgTrace:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
name: str
|
|
33
|
+
layer: str
|
|
34
|
+
path: List[List[Union[float, str]]]
|
|
35
|
+
width: str
|
|
36
|
+
net_name: str
|
|
37
|
+
start_cap_style: str
|
|
38
|
+
end_cap_style: str
|
|
39
|
+
corner_style: str
|
|
40
|
+
incremental_path: List[List[Union[float, str]]]
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@dataclass
|
|
44
|
+
class CfgPlane:
|
|
45
|
+
name: str = ""
|
|
46
|
+
layer: str = ""
|
|
47
|
+
net_name: str = ""
|
|
48
|
+
type: str = "rectangle"
|
|
40
49
|
|
|
50
|
+
# rectangle
|
|
51
|
+
lower_left_point: List[Union[float, str]] = field(default_factory=list)
|
|
52
|
+
upper_right_point: List[Union[float, str]] = field(default_factory=list)
|
|
53
|
+
corner_radius: Union[float, str] = 0
|
|
54
|
+
rotation: Union[float, str] = 0
|
|
55
|
+
voids: List[Any] = field(default_factory=list)
|
|
41
56
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
self.name = kwargs.get("name", "")
|
|
45
|
-
self.layer = kwargs["layer"]
|
|
46
|
-
self.net_name = kwargs.get("net_name", "")
|
|
47
|
-
self.type = kwargs.get("type", "rectangle")
|
|
57
|
+
# polygon
|
|
58
|
+
points: List[List[float]] = field(default_factory=list)
|
|
48
59
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
self.corner_radius = kwargs.get("corner_radius", 0)
|
|
53
|
-
self.rotation = kwargs.get("rotation", 0)
|
|
54
|
-
self.voids = kwargs.get("voids", [])
|
|
60
|
+
# circle
|
|
61
|
+
radius: Union[float, str] = 0
|
|
62
|
+
position: List[float] = field(default_factory=lambda: [0, 0])
|
|
55
63
|
|
|
56
|
-
# polygon
|
|
57
|
-
self.points = kwargs.get("points", [])
|
|
58
64
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
65
|
+
class PrimitivesToDeleteDict(TypedDict, total=False):
|
|
66
|
+
layer_name: List[str]
|
|
67
|
+
name: List[str]
|
|
68
|
+
net_name: List[str]
|
|
62
69
|
|
|
63
70
|
|
|
71
|
+
@dataclass
|
|
64
72
|
class CfgModeler:
|
|
65
73
|
"""Manage configuration general settings."""
|
|
66
74
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
self.parent = parent
|
|
70
|
-
self._pedb = parent._pedb
|
|
71
|
-
|
|
72
|
-
def set_parameter_to_edb(self):
|
|
73
|
-
from ansys.edb.core.definition.padstack_def import (
|
|
74
|
-
PadstackDef as GrpcPadstackDef,
|
|
75
|
-
)
|
|
76
|
-
from ansys.edb.core.definition.padstack_def_data import (
|
|
77
|
-
PadstackDefData as GrpcPadstackDefData,
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
from pyedb.grpc.database.definition.padstack_def import PadstackDef
|
|
81
|
-
|
|
82
|
-
if self.parent.traces:
|
|
83
|
-
for t in self.parent.traces:
|
|
84
|
-
obj = self._pedb.modeler.create_trace(
|
|
85
|
-
path_list=t.path,
|
|
86
|
-
layer_name=t.layer,
|
|
87
|
-
net_name=t.net_name,
|
|
88
|
-
width=t.width,
|
|
89
|
-
start_cap_style=t.start_cap_style,
|
|
90
|
-
end_cap_style=t.end_cap_style,
|
|
91
|
-
corner_style=t.corner_style,
|
|
92
|
-
)
|
|
93
|
-
obj.aedt_name = t.name
|
|
94
|
-
|
|
95
|
-
if self.parent.padstack_defs:
|
|
96
|
-
for p in self.parent.padstack_defs:
|
|
97
|
-
pdata = GrpcPadstackDefData.create()
|
|
98
|
-
pdef = GrpcPadstackDef.create(self._pedb.active_db, p.name)
|
|
99
|
-
pdef.data = pdata
|
|
100
|
-
pdef = PadstackDef(self._pedb, pdef)
|
|
101
|
-
p.pyedb_obj = pdef
|
|
102
|
-
p.api.set_parameters_to_edb()
|
|
103
|
-
|
|
104
|
-
if self.parent.padstack_instances:
|
|
105
|
-
for p in self.parent.padstack_instances:
|
|
106
|
-
p_inst = self._pedb.padstacks.place(
|
|
107
|
-
via_name=p.name,
|
|
108
|
-
net_name=p.net_name,
|
|
109
|
-
position=p.position,
|
|
110
|
-
definition_name=p.definition,
|
|
111
|
-
)
|
|
112
|
-
p.pyedb_obj = p_inst
|
|
113
|
-
p.api.set_parameters_to_edb()
|
|
114
|
-
|
|
115
|
-
if self.parent.planes:
|
|
116
|
-
for p in self.parent.planes:
|
|
117
|
-
if p.type == "rectangle":
|
|
118
|
-
obj = self._pedb.modeler.create_rectangle(
|
|
119
|
-
layer_name=p.layer,
|
|
120
|
-
net_name=p.net_name,
|
|
121
|
-
lower_left_point=p.lower_left_point,
|
|
122
|
-
upper_right_point=p.upper_right_point,
|
|
123
|
-
corner_radius=p.corner_radius,
|
|
124
|
-
rotation=p.rotation,
|
|
125
|
-
)
|
|
126
|
-
obj.aedt_name = p.name
|
|
127
|
-
elif p.type == "polygon":
|
|
128
|
-
obj = self._pedb.modeler.create_polygon(
|
|
129
|
-
points=p.points, layer_name=p.layer, net_name=p.net_name
|
|
130
|
-
)
|
|
131
|
-
obj.aedt_name = p.name
|
|
132
|
-
|
|
133
|
-
for v in p.voids:
|
|
134
|
-
for i in self._pedb.layout.primitives:
|
|
135
|
-
if i.aedt_name == v:
|
|
136
|
-
self._pedb.modeler.add_void(obj, i)
|
|
75
|
+
traces: List[CfgTrace] = field(default_factory=list)
|
|
76
|
+
planes: List[CfgPlane] = field(default_factory=list)
|
|
137
77
|
|
|
138
|
-
|
|
139
|
-
pedb_p_inst = self._pedb.padstacks.instances_by_name
|
|
140
|
-
for c in self.parent.components:
|
|
141
|
-
obj = self._pedb.components.create(
|
|
142
|
-
[pedb_p_inst[i] for i in c.pins],
|
|
143
|
-
component_name=c.reference_designator,
|
|
144
|
-
placement_layer=c.placement_layer,
|
|
145
|
-
component_part_name=c.definition,
|
|
146
|
-
)
|
|
147
|
-
c.pyedb_obj = obj
|
|
148
|
-
c.api.set_parameters_to_edb()
|
|
149
|
-
|
|
150
|
-
def delete_primitives(self):
|
|
151
|
-
primitives = self._pedb.layout.find_primitive(**self.parent.primitives_to_delete)
|
|
152
|
-
for i in primitives:
|
|
153
|
-
i.delete()
|
|
154
|
-
|
|
155
|
-
class DotNet(Grpc):
|
|
156
|
-
def __init__(self, parent):
|
|
157
|
-
super().__init__(parent)
|
|
158
|
-
|
|
159
|
-
def set_parameter_to_edb(self):
|
|
160
|
-
if self.parent.traces:
|
|
161
|
-
for t in self.parent.traces:
|
|
162
|
-
if t.path:
|
|
163
|
-
obj = self._pedb.modeler.create_trace(
|
|
164
|
-
path_list=t.path,
|
|
165
|
-
layer_name=t.layer,
|
|
166
|
-
net_name=t.net_name,
|
|
167
|
-
width=t.width,
|
|
168
|
-
start_cap_style=t.start_cap_style,
|
|
169
|
-
end_cap_style=t.end_cap_style,
|
|
170
|
-
corner_style=t.corner_style,
|
|
171
|
-
)
|
|
172
|
-
obj.aedt_name = t.name
|
|
173
|
-
else:
|
|
174
|
-
obj = self._pedb.modeler.create_trace(
|
|
175
|
-
path_list=[t.incremental_path[0]],
|
|
176
|
-
layer_name=t.layer,
|
|
177
|
-
net_name=t.net_name,
|
|
178
|
-
width=t.width,
|
|
179
|
-
start_cap_style=t.start_cap_style,
|
|
180
|
-
end_cap_style=t.end_cap_style,
|
|
181
|
-
corner_style=t.corner_style,
|
|
182
|
-
)
|
|
183
|
-
obj.aedt_name = t.name
|
|
184
|
-
for x, y in t.incremental_path[1:]:
|
|
185
|
-
obj.add_point(x, y, True)
|
|
186
|
-
|
|
187
|
-
if self.parent.padstack_defs:
|
|
188
|
-
for p in self.parent.padstack_defs:
|
|
189
|
-
pdata = self._pedb._edb.Definition.PadstackDefData.Create()
|
|
190
|
-
pdef = self._pedb._edb.Definition.PadstackDef.Create(self._pedb.active_db, p.name)
|
|
191
|
-
pdef.SetData(pdata)
|
|
192
|
-
pdef = EDBPadstack(pdef, self._pedb.padstacks)
|
|
193
|
-
p.pyedb_obj = pdef
|
|
194
|
-
p.api.set_parameters_to_edb()
|
|
195
|
-
|
|
196
|
-
if self.parent.padstack_instances:
|
|
197
|
-
for p in self.parent.padstack_instances:
|
|
198
|
-
p_inst = self._pedb.padstacks.place(
|
|
199
|
-
via_name=p.name,
|
|
200
|
-
net_name=p.net_name,
|
|
201
|
-
position=p.position,
|
|
202
|
-
definition_name=p.definition,
|
|
203
|
-
rotation=p.rotation if p.rotation is not None else 0,
|
|
204
|
-
)
|
|
205
|
-
p.pyedb_obj = p_inst
|
|
206
|
-
p.api.set_parameters_to_edb()
|
|
207
|
-
|
|
208
|
-
if self.parent.planes:
|
|
209
|
-
for p in self.parent.planes:
|
|
210
|
-
if p.type == "rectangle":
|
|
211
|
-
obj = self._pedb.modeler.create_rectangle(
|
|
212
|
-
layer_name=p.layer,
|
|
213
|
-
net_name=p.net_name,
|
|
214
|
-
lower_left_point=p.lower_left_point,
|
|
215
|
-
upper_right_point=p.upper_right_point,
|
|
216
|
-
corner_radius=p.corner_radius,
|
|
217
|
-
rotation=p.rotation,
|
|
218
|
-
)
|
|
219
|
-
obj.aedt_name = p.name
|
|
220
|
-
elif p.type == "polygon":
|
|
221
|
-
obj = self._pedb.modeler.create_polygon(
|
|
222
|
-
main_shape=p.points, layer_name=p.layer, net_name=p.net_name
|
|
223
|
-
)
|
|
224
|
-
obj.aedt_name = p.name
|
|
225
|
-
elif p.type == "circle":
|
|
226
|
-
obj = self._pedb.modeler.create_circle(
|
|
227
|
-
layer_name=p.layer,
|
|
228
|
-
net_name=p.net_name,
|
|
229
|
-
x=p.position[0],
|
|
230
|
-
y=p.position[1],
|
|
231
|
-
radius=p.radius,
|
|
232
|
-
)
|
|
233
|
-
obj.aedt_name = p.name
|
|
234
|
-
else:
|
|
235
|
-
raise
|
|
236
|
-
|
|
237
|
-
for v in p.voids:
|
|
238
|
-
for i in self._pedb.layout.primitives:
|
|
239
|
-
if i.aedt_name == v:
|
|
240
|
-
self._pedb.modeler.add_void(obj, i)
|
|
241
|
-
|
|
242
|
-
if self.parent.components:
|
|
243
|
-
pedb_p_inst = self._pedb.padstacks.instances_by_name
|
|
244
|
-
for c in self.parent.components:
|
|
245
|
-
obj = self._pedb.components.create(
|
|
246
|
-
[pedb_p_inst[i] for i in c.pins],
|
|
247
|
-
component_name=c.reference_designator,
|
|
248
|
-
placement_layer=c.placement_layer,
|
|
249
|
-
component_part_name=c.definition,
|
|
250
|
-
)
|
|
251
|
-
c.pyedb_obj = obj
|
|
252
|
-
c.api.set_parameters_to_edb()
|
|
253
|
-
|
|
254
|
-
def __init__(self, pedb, data):
|
|
78
|
+
def __init__(self, pedb, data: Dict):
|
|
255
79
|
self._pedb = pedb
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
self.
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
80
|
+
self.traces = []
|
|
81
|
+
self.planes = []
|
|
82
|
+
|
|
83
|
+
self.padstack_defs = [CfgPadstackDefinition(pedb, None, **i) for i in data.get("padstack_definitions", [])]
|
|
84
|
+
self.padstack_instances = [CfgPadstackInstance(pedb, None, **i) for i in data.get("padstack_instances", [])]
|
|
85
|
+
|
|
86
|
+
self.components = [CfgComponent(pedb, None, **i) for i in data.get("components", [])]
|
|
87
|
+
self.primitives_to_delete: PrimitivesToDeleteDict = data.get(
|
|
88
|
+
"primitives_to_delete", {"layer_name": [], "name": [], "net_name": []}
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
for trace_data in data.get("traces", []):
|
|
92
|
+
self.add_trace(**trace_data)
|
|
93
|
+
|
|
94
|
+
for plane_data in data.get("planes", []):
|
|
95
|
+
shape = plane_data.pop("type")
|
|
96
|
+
if shape == "rectangle":
|
|
97
|
+
self.add_rectangular_plane(**plane_data)
|
|
98
|
+
elif shape == "circle":
|
|
99
|
+
self.add_circular_plane(**plane_data)
|
|
100
|
+
elif shape == "polygon":
|
|
101
|
+
self.add_polygon_plane(**plane_data)
|
|
102
|
+
|
|
103
|
+
def add_trace(
|
|
104
|
+
self,
|
|
105
|
+
layer: str,
|
|
106
|
+
width: str,
|
|
107
|
+
name: str,
|
|
108
|
+
net_name: str = "",
|
|
109
|
+
start_cap_style: str = "round",
|
|
110
|
+
end_cap_style: str = "round",
|
|
111
|
+
corner_style: str = "sharp",
|
|
112
|
+
path: Optional[Any] = None,
|
|
113
|
+
incremental_path: Optional[Any] = None,
|
|
114
|
+
):
|
|
115
|
+
"""Add a trace from a dictionary of parameters."""
|
|
116
|
+
|
|
117
|
+
trace_obj = CfgTrace(
|
|
118
|
+
name,
|
|
119
|
+
layer,
|
|
120
|
+
path,
|
|
121
|
+
width,
|
|
122
|
+
net_name,
|
|
123
|
+
start_cap_style,
|
|
124
|
+
end_cap_style,
|
|
125
|
+
corner_style,
|
|
126
|
+
incremental_path,
|
|
127
|
+
)
|
|
128
|
+
self.traces.append(trace_obj)
|
|
129
|
+
return name
|
|
130
|
+
|
|
131
|
+
def add_rectangular_plane(
|
|
132
|
+
self,
|
|
133
|
+
layer: str,
|
|
134
|
+
name: str = "",
|
|
135
|
+
net_name: str = "",
|
|
136
|
+
lower_left_point: List[float] = "",
|
|
137
|
+
upper_right_point: List[float] = "",
|
|
138
|
+
corner_radius: float = 0,
|
|
139
|
+
rotation: float = 0,
|
|
140
|
+
voids: Optional[List[Any]] = "",
|
|
141
|
+
):
|
|
142
|
+
plane_obj = CfgPlane(
|
|
143
|
+
name=name,
|
|
144
|
+
layer=layer,
|
|
145
|
+
net_name=net_name,
|
|
146
|
+
type="rectangle",
|
|
147
|
+
lower_left_point=lower_left_point,
|
|
148
|
+
upper_right_point=upper_right_point,
|
|
149
|
+
corner_radius=corner_radius,
|
|
150
|
+
rotation=rotation,
|
|
151
|
+
voids=voids,
|
|
152
|
+
)
|
|
153
|
+
self.planes.append(plane_obj)
|
|
154
|
+
return name
|
|
155
|
+
|
|
156
|
+
def add_circular_plane(
|
|
157
|
+
self,
|
|
158
|
+
layer: str,
|
|
159
|
+
name: str = "",
|
|
160
|
+
net_name: str = "",
|
|
161
|
+
corner_radius: float = 0,
|
|
162
|
+
rotation: float = 0,
|
|
163
|
+
voids: Optional[List[Any]] = "",
|
|
164
|
+
radius: Union[float, str] = 0,
|
|
165
|
+
position: List[Union[float, str]] = "",
|
|
166
|
+
):
|
|
167
|
+
plane_obj = CfgPlane(
|
|
168
|
+
name=name,
|
|
169
|
+
layer=layer,
|
|
170
|
+
net_name=net_name,
|
|
171
|
+
type="circle",
|
|
172
|
+
corner_radius=corner_radius,
|
|
173
|
+
rotation=rotation,
|
|
174
|
+
voids=voids,
|
|
175
|
+
radius=radius,
|
|
176
|
+
position=position,
|
|
177
|
+
)
|
|
178
|
+
self.planes.append(plane_obj)
|
|
179
|
+
return name
|
|
180
|
+
|
|
181
|
+
def add_polygon_plane(
|
|
182
|
+
self,
|
|
183
|
+
layer: str,
|
|
184
|
+
name: str = "",
|
|
185
|
+
net_name: str = "",
|
|
186
|
+
corner_radius: float = 0,
|
|
187
|
+
rotation: float = 0,
|
|
188
|
+
voids: Optional[List[Any]] = "",
|
|
189
|
+
points: List[List[float]] = "",
|
|
190
|
+
):
|
|
191
|
+
plane_obj = CfgPlane(
|
|
192
|
+
name=name,
|
|
193
|
+
layer=layer,
|
|
194
|
+
net_name=net_name,
|
|
195
|
+
type="polygon",
|
|
196
|
+
corner_radius=corner_radius,
|
|
197
|
+
rotation=rotation,
|
|
198
|
+
voids=voids,
|
|
199
|
+
points=points,
|
|
200
|
+
)
|
|
201
|
+
self.planes.append(plane_obj)
|
|
202
|
+
return name
|
|
@@ -58,7 +58,7 @@ class CfgTerminalInfo(CfgBase):
|
|
|
58
58
|
self.contact_type = kwargs.get("contact_type", "default") # options are full, center, quad, inline
|
|
59
59
|
contact_radius = "0.1mm" if kwargs.get("contact_radius") is None else kwargs.get("contact_radius")
|
|
60
60
|
|
|
61
|
-
self.contact_radius = self._pedb.
|
|
61
|
+
self.contact_radius = self._pedb.value(contact_radius)
|
|
62
62
|
self.num_of_contact = kwargs.get("num_of_contact", 4)
|
|
63
63
|
self.contact_expansion = kwargs.get("contact_expansion", 1)
|
|
64
64
|
|
|
@@ -678,11 +678,9 @@ class CfgEdgePort:
|
|
|
678
678
|
def set_parameters_to_edb(self):
|
|
679
679
|
point_on_edge = PointData(self._pedb, x=self.point_on_edge[0], y=self.point_on_edge[1])
|
|
680
680
|
primitive = self._pedb.layout.primitives_by_aedt_name[self.primitive_name]
|
|
681
|
-
pos_edge = self._pedb.
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
pos_edge = convert_py_list_to_net_list(pos_edge, self._pedb.edb_api.cell.terminal.Edge)
|
|
685
|
-
edge_term = self._pedb.edb_api.cell.terminal.EdgeTerminal.Create(
|
|
681
|
+
pos_edge = self._pedb.core.cell.terminal.PrimitiveEdge.Create(primitive._edb_object, point_on_edge._edb_object)
|
|
682
|
+
pos_edge = convert_py_list_to_net_list(pos_edge, self._pedb.core.cell.terminal.Edge)
|
|
683
|
+
edge_term = self._pedb.core.cell.terminal.EdgeTerminal.Create(
|
|
686
684
|
primitive._edb_object.GetLayout(),
|
|
687
685
|
primitive._edb_object.GetNet(),
|
|
688
686
|
self.name,
|
|
@@ -755,9 +753,9 @@ class CfgDiffWavePort:
|
|
|
755
753
|
pos_term = self.positive_port.set_parameters_to_edb()
|
|
756
754
|
neg_term = self.negative_port.set_parameters_to_edb()
|
|
757
755
|
edb_list = convert_py_list_to_net_list(
|
|
758
|
-
[pos_term._edb_object, neg_term._edb_object], self._pedb.
|
|
756
|
+
[pos_term._edb_object, neg_term._edb_object], self._pedb.core.cell.terminal.Terminal
|
|
759
757
|
)
|
|
760
|
-
_edb_boundle_terminal = self._pedb.
|
|
758
|
+
_edb_boundle_terminal = self._pedb.core.cell.terminal.BundleTerminal.Create(edb_list)
|
|
761
759
|
_edb_boundle_terminal.SetName(self.name)
|
|
762
760
|
pos, neg = list(_edb_boundle_terminal.GetTerminals())
|
|
763
761
|
pos.SetName(self.name + ":T1")
|