pyedb 0.54.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 +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/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 +96 -88
- 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 +84 -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 +228 -150
- pyedb/edb_logger.py +12 -27
- pyedb/extensions/via_design_backend.py +6 -3
- pyedb/generic/design_types.py +67 -29
- pyedb/generic/general_methods.py +0 -120
- pyedb/generic/process.py +44 -108
- pyedb/generic/settings.py +75 -19
- pyedb/grpc/database/components.py +2 -0
- 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 +8 -5
- pyedb/grpc/database/layout_validation.py +3 -3
- pyedb/grpc/database/modeler.py +9 -4
- pyedb/grpc/database/net/net.py +15 -14
- pyedb/grpc/database/nets.py +70 -0
- pyedb/grpc/database/padstacks.py +35 -17
- pyedb/grpc/database/primitive/padstack_instance.py +175 -7
- pyedb/grpc/database/siwave.py +1 -1
- pyedb/grpc/database/source_excitations.py +2 -4
- 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/xml_control_file.py +5 -5
- pyedb/grpc/edb.py +73 -27
- pyedb/grpc/edb_init.py +3 -3
- 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.54.0.dist-info → pyedb-0.55.0.dist-info}/METADATA +1 -2
- {pyedb-0.54.0.dist-info → pyedb-0.55.0.dist-info}/RECORD +95 -91
- {pyedb-0.54.0.dist-info → pyedb-0.55.0.dist-info}/WHEEL +0 -0
- {pyedb-0.54.0.dist-info → pyedb-0.55.0.dist-info}/licenses/LICENSE +0 -0
pyedb/grpc/rpc_session.py
CHANGED
|
@@ -34,8 +34,8 @@ from ansys.edb.core.utility.io_manager import (
|
|
|
34
34
|
import psutil
|
|
35
35
|
|
|
36
36
|
from pyedb import __version__
|
|
37
|
-
from pyedb.edb_logger import pyedb_logger
|
|
38
37
|
from pyedb.generic.general_methods import env_path, env_value, is_linux
|
|
38
|
+
from pyedb.generic.settings import settings
|
|
39
39
|
from pyedb.misc.misc import list_installed_ansysem
|
|
40
40
|
|
|
41
41
|
latency_delay = 0.1
|
|
@@ -80,12 +80,12 @@ class RpcSession:
|
|
|
80
80
|
if not edb_version: # pragma: no cover
|
|
81
81
|
try:
|
|
82
82
|
edb_version = "20{}.{}".format(list_installed_ansysem()[0][-3:-1], list_installed_ansysem()[0][-1:])
|
|
83
|
-
|
|
83
|
+
settings.logger.info("Edb version " + edb_version)
|
|
84
84
|
except IndexError:
|
|
85
85
|
raise Exception("No ANSYSEM_ROOTxxx is found.")
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
settings.logger.info("Logger is initialized in EDB.")
|
|
87
|
+
settings.logger.info("legacy v%s", __version__)
|
|
88
|
+
settings.logger.info("Python version %s", sys.version)
|
|
89
89
|
if is_linux:
|
|
90
90
|
if env_value(edb_version) in os.environ:
|
|
91
91
|
RpcSession.base_path = env_path(edb_version)
|
|
@@ -106,18 +106,18 @@ class RpcSession:
|
|
|
106
106
|
|
|
107
107
|
if RpcSession.pid:
|
|
108
108
|
if restart_server:
|
|
109
|
-
|
|
109
|
+
settings.logger.logger.info("Restarting RPC server")
|
|
110
110
|
RpcSession.kill()
|
|
111
111
|
RpcSession.__start_rpc_server()
|
|
112
112
|
else:
|
|
113
|
-
|
|
113
|
+
settings.logger.info(f"Server already running on port {RpcSession.port}")
|
|
114
114
|
else:
|
|
115
115
|
RpcSession.__start_rpc_server()
|
|
116
116
|
if RpcSession.rpc_session:
|
|
117
117
|
RpcSession.server_pid = RpcSession.rpc_session.local_server_proc.pid
|
|
118
|
-
|
|
118
|
+
settings.logger.info(f"Grpc session started: pid={RpcSession.server_pid}")
|
|
119
119
|
else:
|
|
120
|
-
|
|
120
|
+
settings.logger.error("Failed to start EDB_RPC_server process")
|
|
121
121
|
|
|
122
122
|
@staticmethod
|
|
123
123
|
def __get_process_id():
|
|
@@ -135,7 +135,7 @@ class RpcSession:
|
|
|
135
135
|
time.sleep(latency_delay)
|
|
136
136
|
if RpcSession.rpc_session:
|
|
137
137
|
RpcSession.pid = RpcSession.rpc_session.local_server_proc.pid
|
|
138
|
-
|
|
138
|
+
settings.logger.logger.info("Grpc session started")
|
|
139
139
|
|
|
140
140
|
@staticmethod
|
|
141
141
|
def kill():
|
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
from dataclasses import dataclass
|
|
24
|
+
from typing import Tuple, Union
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@dataclass
|
|
28
|
+
class Substrate:
|
|
29
|
+
"""
|
|
30
|
+
Small helper that groups the four basic substrate parameters used
|
|
31
|
+
throughout the library.
|
|
32
|
+
|
|
33
|
+
Parameters
|
|
34
|
+
----------
|
|
35
|
+
h : float, default 100 µm
|
|
36
|
+
Substrate height in metres.
|
|
37
|
+
er : float, default 4.4
|
|
38
|
+
Relative permittivity.
|
|
39
|
+
tan_d : float, default 0
|
|
40
|
+
Loss tangent.
|
|
41
|
+
name : str, default "SUB"
|
|
42
|
+
Logical name used for layer creation.
|
|
43
|
+
size : tuple[float, float], default (1 mm, 1 mm)
|
|
44
|
+
(width, length) of the surrounding ground plane in metres.
|
|
45
|
+
|
|
46
|
+
Examples
|
|
47
|
+
--------
|
|
48
|
+
>>> sub = Substrate(h=1.6e-3, er=4.4, tan_d=0.02,
|
|
49
|
+
... name="FR4", size=(10e-3, 15e-3))
|
|
50
|
+
>>> sub.h
|
|
51
|
+
0.0016
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
h: float = 100e-6 # height (m)
|
|
55
|
+
er: float = 4.4 # relative permittivity
|
|
56
|
+
tan_d: float = 0 # loss tangent
|
|
57
|
+
name: str = "SUB"
|
|
58
|
+
size: Tuple[float, float] = (0.001, 0.001) # width, length in metres
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
from typing import Union
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
# ------------------------------------------------------------------
|
|
65
|
+
# Material
|
|
66
|
+
# ------------------------------------------------------------------
|
|
67
|
+
class Material:
|
|
68
|
+
"""
|
|
69
|
+
Generic material definition.
|
|
70
|
+
|
|
71
|
+
When the material name is set, the object automatically registers
|
|
72
|
+
itself in the provided PyEDB material database if the name is not
|
|
73
|
+
already present.
|
|
74
|
+
|
|
75
|
+
Parameters
|
|
76
|
+
----------
|
|
77
|
+
pedb : ansys.edb.core.database.Database
|
|
78
|
+
Active EDB session.
|
|
79
|
+
name : str
|
|
80
|
+
Material name (e.g. ``"Copper"``).
|
|
81
|
+
|
|
82
|
+
Examples
|
|
83
|
+
--------
|
|
84
|
+
>>> m = Material(edb, "MyMaterial")
|
|
85
|
+
>>> m.name
|
|
86
|
+
'MyMaterial'
|
|
87
|
+
>>> edb.materials["MyMaterial"] # now exists in the database
|
|
88
|
+
<Material object at ...>
|
|
89
|
+
"""
|
|
90
|
+
|
|
91
|
+
def __init__(self, pedb, name):
|
|
92
|
+
self._pedb = pedb
|
|
93
|
+
self.name = name
|
|
94
|
+
|
|
95
|
+
@property
|
|
96
|
+
def name(self) -> str:
|
|
97
|
+
"""Material name."""
|
|
98
|
+
return self._name
|
|
99
|
+
|
|
100
|
+
@name.setter
|
|
101
|
+
def name(self, value: str):
|
|
102
|
+
self._name = value
|
|
103
|
+
if value not in self._pedb.materials:
|
|
104
|
+
self._pedb.materials.add_material(value)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
# ------------------------------------------------------------------
|
|
108
|
+
# Conductor
|
|
109
|
+
# ------------------------------------------------------------------
|
|
110
|
+
class Conductor(Material):
|
|
111
|
+
"""
|
|
112
|
+
Metallic conductor material with electrical conductivity.
|
|
113
|
+
|
|
114
|
+
Parameters
|
|
115
|
+
----------
|
|
116
|
+
pedb : ansys.edb.core.database.Database
|
|
117
|
+
Active EDB session.
|
|
118
|
+
name : str
|
|
119
|
+
Material name.
|
|
120
|
+
conductivity : float, optional
|
|
121
|
+
Electrical conductivity in S/m. Default is 5.8e7 (Copper).
|
|
122
|
+
|
|
123
|
+
Examples
|
|
124
|
+
--------
|
|
125
|
+
>>> cu = Conductor(edb, "Copper", conductivity=5.8e7)
|
|
126
|
+
>>> cu.conductivity
|
|
127
|
+
58000000.0
|
|
128
|
+
>>> cu.conductivity = 3.5e7 # update on-the-fly
|
|
129
|
+
>>> edb.materials["Copper"].conductivity
|
|
130
|
+
35000000.0
|
|
131
|
+
"""
|
|
132
|
+
|
|
133
|
+
def __init__(self, pedb, name: str, conductivity: float = 5.8e7):
|
|
134
|
+
super().__init__(pedb, name)
|
|
135
|
+
self.conductivity = conductivity
|
|
136
|
+
|
|
137
|
+
@property
|
|
138
|
+
def conductivity(self) -> float:
|
|
139
|
+
"""Electrical conductivity (S/m)."""
|
|
140
|
+
return self._conductivity
|
|
141
|
+
|
|
142
|
+
@conductivity.setter
|
|
143
|
+
def conductivity(self, value: float):
|
|
144
|
+
self._conductivity = value
|
|
145
|
+
self._pedb.materials[self.name].conductivity = value
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
# ------------------------------------------------------------------
|
|
149
|
+
# Dielectric
|
|
150
|
+
# ------------------------------------------------------------------
|
|
151
|
+
class Dielectric(Material):
|
|
152
|
+
"""
|
|
153
|
+
Dielectric material with relative permittivity and loss tangent.
|
|
154
|
+
|
|
155
|
+
Parameters
|
|
156
|
+
----------
|
|
157
|
+
pedb : ansys.edb.core.database.Database
|
|
158
|
+
Active EDB session.
|
|
159
|
+
name : str
|
|
160
|
+
Material name.
|
|
161
|
+
permittivity : float, optional
|
|
162
|
+
Relative permittivity (εᵣ). Default is 11.9 (Silicon).
|
|
163
|
+
loss_tg : float, optional
|
|
164
|
+
Loss tangent (tan δ). Default is 0.02.
|
|
165
|
+
|
|
166
|
+
Examples
|
|
167
|
+
--------
|
|
168
|
+
>>> sub = Dielectric(edb, "Silicon", permittivity=11.9, loss_tg=0.01)
|
|
169
|
+
>>> sub.permittivity
|
|
170
|
+
11.9
|
|
171
|
+
>>> sub.loss_tg = 0.005
|
|
172
|
+
>>> edb.materials["Silicon"].loss_tangent
|
|
173
|
+
0.005
|
|
174
|
+
"""
|
|
175
|
+
|
|
176
|
+
def __init__(self, pedb, name: str, permittivity: float = 11.9, loss_tg: float = 0.02):
|
|
177
|
+
super().__init__(pedb, name)
|
|
178
|
+
self.permittivity = permittivity
|
|
179
|
+
self.loss_tg = loss_tg
|
|
180
|
+
|
|
181
|
+
@property
|
|
182
|
+
def permittivity(self) -> float:
|
|
183
|
+
"""Relative permittivity (εᵣ)."""
|
|
184
|
+
return self._permittivity
|
|
185
|
+
|
|
186
|
+
@permittivity.setter
|
|
187
|
+
def permittivity(self, value: float):
|
|
188
|
+
self._permittivity = value
|
|
189
|
+
self._pedb.materials[self.name].permittivity = value
|
|
190
|
+
|
|
191
|
+
@property
|
|
192
|
+
def loss_tg(self) -> float:
|
|
193
|
+
"""Loss tangent (tan δ)."""
|
|
194
|
+
return self._loss_tg
|
|
195
|
+
|
|
196
|
+
@loss_tg.setter
|
|
197
|
+
def loss_tg(self, value: float):
|
|
198
|
+
self._loss_tg = value
|
|
199
|
+
self._pedb.materials[self.name].loss_tangent = value
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
# ------------------------------------------------------------------
|
|
203
|
+
# Layer
|
|
204
|
+
# ------------------------------------------------------------------
|
|
205
|
+
class Layer:
|
|
206
|
+
"""
|
|
207
|
+
Physical layer inside a stackup.
|
|
208
|
+
|
|
209
|
+
Parameters
|
|
210
|
+
----------
|
|
211
|
+
pedb : ansys.edb.core.database.Database
|
|
212
|
+
Active EDB session.
|
|
213
|
+
name : str
|
|
214
|
+
Layer name.
|
|
215
|
+
material : Conductor or Dielectric, optional
|
|
216
|
+
Material instance assigned to the layer.
|
|
217
|
+
thickness : float, optional
|
|
218
|
+
Layer thickness in meters. Default is 1 µm.
|
|
219
|
+
|
|
220
|
+
Examples
|
|
221
|
+
--------
|
|
222
|
+
>>> diel = Dielectric(edb, "FR4")
|
|
223
|
+
>>> lyr = Layer(edb, "Core", material=diel, thickness=100e-6)
|
|
224
|
+
>>> lyr.thickness = 50e-6
|
|
225
|
+
>>> edb.stackup.layers["Core"].thickness
|
|
226
|
+
5e-05
|
|
227
|
+
"""
|
|
228
|
+
|
|
229
|
+
def __init__(self, pedb, name: str, material: Union[Conductor, Dielectric] = None, thickness: float = 1e-6):
|
|
230
|
+
self._pedb = pedb
|
|
231
|
+
self.name: str = name
|
|
232
|
+
self.thickness: float = thickness
|
|
233
|
+
self._material = material
|
|
234
|
+
|
|
235
|
+
@property
|
|
236
|
+
def name(self) -> str:
|
|
237
|
+
"""Layer name."""
|
|
238
|
+
return self._name
|
|
239
|
+
|
|
240
|
+
@name.setter
|
|
241
|
+
def name(self, value: str):
|
|
242
|
+
self._name = value
|
|
243
|
+
if value not in self._pedb.stackup.layers:
|
|
244
|
+
self._pedb.stackup.add_layer(value)
|
|
245
|
+
else:
|
|
246
|
+
self._pedb.stackup.layers[self.name].name = self.name
|
|
247
|
+
|
|
248
|
+
@property
|
|
249
|
+
def thickness(self) -> float:
|
|
250
|
+
"""Layer thickness (m)."""
|
|
251
|
+
return self._thickness
|
|
252
|
+
|
|
253
|
+
@thickness.setter
|
|
254
|
+
def thickness(self, value: float):
|
|
255
|
+
self._thickness = value
|
|
256
|
+
self._pedb.stackup.layers[self.name].thickness = value
|
|
257
|
+
|
|
258
|
+
@property
|
|
259
|
+
def material(self) -> Union[Conductor, Dielectric]:
|
|
260
|
+
"""Material assigned to this layer."""
|
|
261
|
+
return self._material
|
|
262
|
+
|
|
263
|
+
@material.setter
|
|
264
|
+
def material(self, material: Union[Conductor, Dielectric]):
|
|
265
|
+
self._material = material
|
|
266
|
+
self._pedb.stackup.layers[self.name].material = material.name
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
# ------------------------------------------------------------------
|
|
270
|
+
# MetalLayer
|
|
271
|
+
# ------------------------------------------------------------------
|
|
272
|
+
class MetalLayer(Layer):
|
|
273
|
+
"""
|
|
274
|
+
Convenience wrapper for metallic layers.
|
|
275
|
+
|
|
276
|
+
Automatically creates a ``Conductor`` material.
|
|
277
|
+
|
|
278
|
+
Parameters
|
|
279
|
+
----------
|
|
280
|
+
pedb : ansys.edb.core.database.Database
|
|
281
|
+
Active EDB session.
|
|
282
|
+
name : str
|
|
283
|
+
Layer name.
|
|
284
|
+
thickness : float, optional
|
|
285
|
+
Thickness in meters. Default is 1 µm.
|
|
286
|
+
material : str, optional
|
|
287
|
+
Name of the conductor material. Default is ``"Copper"``.
|
|
288
|
+
|
|
289
|
+
Examples
|
|
290
|
+
--------
|
|
291
|
+
>>> top = MetalLayer(edb, "TOP", thickness=18e-6, material="Gold")
|
|
292
|
+
>>> top.material.conductivity
|
|
293
|
+
58000000.0
|
|
294
|
+
"""
|
|
295
|
+
|
|
296
|
+
def __init__(self, pedb, name, thickness=1e-6, material: str = "Copper"):
|
|
297
|
+
super().__init__(pedb, name, thickness=thickness)
|
|
298
|
+
self.material = Conductor(pedb, name=material)
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
# ------------------------------------------------------------------
|
|
302
|
+
# DielectricLayer
|
|
303
|
+
# ------------------------------------------------------------------
|
|
304
|
+
class DielectricLayer(Layer):
|
|
305
|
+
"""
|
|
306
|
+
Convenience wrapper for dielectric layers.
|
|
307
|
+
|
|
308
|
+
Automatically creates a ``Dielectric`` material.
|
|
309
|
+
|
|
310
|
+
Parameters
|
|
311
|
+
----------
|
|
312
|
+
pedb : ansys.edb.core.database.Database
|
|
313
|
+
Active EDB session.
|
|
314
|
+
name : str
|
|
315
|
+
Layer name.
|
|
316
|
+
thickness : float, optional
|
|
317
|
+
Thickness in meters. Default is 1 µm.
|
|
318
|
+
material : str, optional
|
|
319
|
+
Name of the dielectric material. Default is ``"FR4"``.
|
|
320
|
+
|
|
321
|
+
Examples
|
|
322
|
+
--------
|
|
323
|
+
>>> core = DielectricLayer(edb, "Core", thickness=100e-6, material="FR4")
|
|
324
|
+
>>> core.material.permittivity
|
|
325
|
+
4.4
|
|
326
|
+
"""
|
|
327
|
+
|
|
328
|
+
def __init__(self, pedb, name, thickness=1e-6, material: str = "FR4"):
|
|
329
|
+
super().__init__(pedb, name, thickness=thickness)
|
|
330
|
+
self._pedb.stackup[name].type = "dielectric"
|
|
331
|
+
self.material = Dielectric(pedb, name=material)
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
# ------------------------------------------------------------------
|
|
335
|
+
# MicroStripTechnologyStackup
|
|
336
|
+
# ------------------------------------------------------------------
|
|
337
|
+
class MicroStripTechnologyStackup:
|
|
338
|
+
"""
|
|
339
|
+
Pre-defined micro-strip stackup with bottom metal, substrate and top metal.
|
|
340
|
+
|
|
341
|
+
Parameters
|
|
342
|
+
----------
|
|
343
|
+
pedb : ansys.edb.core.database.Database
|
|
344
|
+
Active EDB session.
|
|
345
|
+
|
|
346
|
+
Attributes
|
|
347
|
+
----------
|
|
348
|
+
bottom_metal : MetalLayer
|
|
349
|
+
Bottom metal layer.
|
|
350
|
+
substrate : DielectricLayer
|
|
351
|
+
Substrate dielectric layer.
|
|
352
|
+
top_metal : MetalLayer
|
|
353
|
+
Top metal layer.
|
|
354
|
+
|
|
355
|
+
Examples
|
|
356
|
+
--------
|
|
357
|
+
>>> stack = MicroStripTechnologyStackup(edb)
|
|
358
|
+
>>> stack.top_metal.thickness = 5e-6
|
|
359
|
+
>>> stack.substrate.material.permittivity = 9.8
|
|
360
|
+
"""
|
|
361
|
+
|
|
362
|
+
def __init__(self, pedb):
|
|
363
|
+
self._pedb = pedb
|
|
364
|
+
self.bottom_metal = MetalLayer(pedb, name="BOT_METAL", thickness=4e-6, material="Gold")
|
|
365
|
+
self.substrate = DielectricLayer(pedb, name="Substrate", thickness=100e-6, material="Silicon")
|
|
366
|
+
self.top_metal = MetalLayer(pedb, name="TOP_METAL", thickness=4e-6, material="Gold")
|