pyedb 0.51.2__py3-none-any.whl → 0.53.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_stackup.py +62 -249
- pyedb/configuration/configuration.py +356 -409
- pyedb/dotnet/database/components.py +9 -3
- pyedb/dotnet/database/dotnet/database.py +4 -0
- pyedb/dotnet/database/edb_data/layer_data.py +3 -1
- pyedb/dotnet/database/edb_data/padstacks_data.py +8 -2
- pyedb/dotnet/database/layout_validation.py +3 -13
- pyedb/dotnet/database/siwave.py +14 -0
- pyedb/dotnet/database/stackup.py +8 -61
- 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/edb.py +50 -3
- pyedb/generic/design_types.py +29 -0
- pyedb/generic/grpc_warnings.py +5 -0
- pyedb/grpc/database/__init__.py +0 -1
- pyedb/grpc/database/components.py +102 -81
- pyedb/grpc/database/control_file.py +240 -193
- pyedb/grpc/database/definition/materials.py +7 -7
- pyedb/grpc/database/definitions.py +7 -5
- pyedb/grpc/database/hierarchy/pin_pair_model.py +1 -1
- pyedb/grpc/database/modeler.py +105 -77
- pyedb/grpc/database/net/differential_pair.py +2 -1
- pyedb/grpc/database/simulation_setup/siwave_cpa_simulation_setup.py +961 -0
- pyedb/grpc/database/siwave.py +14 -0
- pyedb/grpc/database/source_excitations.py +10 -10
- pyedb/grpc/edb.py +156 -180
- pyedb/grpc/edb_init.py +4 -2
- pyedb/siwave_core/cpa/simulation_setup_data_model.py +132 -0
- pyedb/siwave_core/product_properties.py +198 -0
- {pyedb-0.51.2.dist-info → pyedb-0.53.0.dist-info}/METADATA +16 -14
- {pyedb-0.51.2.dist-info → pyedb-0.53.0.dist-info}/RECORD +38 -33
- {pyedb-0.51.2.dist-info → pyedb-0.53.0.dist-info}/WHEEL +1 -1
- {pyedb-0.51.2.dist-info → pyedb-0.53.0.dist-info/licenses}/LICENSE +0 -0
|
@@ -1597,9 +1597,15 @@ class Components(object):
|
|
|
1597
1597
|
>>> edbapp.components.create(pins, "A1New")
|
|
1598
1598
|
|
|
1599
1599
|
"""
|
|
1600
|
-
_pins = [
|
|
1601
|
-
|
|
1602
|
-
|
|
1600
|
+
_pins = []
|
|
1601
|
+
for p in pins:
|
|
1602
|
+
if isinstance(p, EDBPadstackInstance):
|
|
1603
|
+
_pins.append(p._edb_object)
|
|
1604
|
+
elif isinstance(p, str):
|
|
1605
|
+
_pins.append(self._pedb.padstacks.instances_by_name[p]._edb_object)
|
|
1606
|
+
else:
|
|
1607
|
+
_pins.append(p)
|
|
1608
|
+
pins = _pins
|
|
1603
1609
|
if not component_name:
|
|
1604
1610
|
component_name = generate_unique_name("Comp_")
|
|
1605
1611
|
if component_part_name:
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
import os
|
|
25
25
|
import re
|
|
26
26
|
import sys
|
|
27
|
+
import warnings
|
|
27
28
|
|
|
28
29
|
from pyedb import __version__
|
|
29
30
|
from pyedb.dotnet.database.general import convert_py_list_to_net_list
|
|
@@ -34,6 +35,7 @@ from pyedb.generic.general_methods import (
|
|
|
34
35
|
is_linux,
|
|
35
36
|
settings,
|
|
36
37
|
)
|
|
38
|
+
from pyedb.generic.grpc_warnings import GRPC_GENERAL_WARNING
|
|
37
39
|
from pyedb.misc.misc import list_installed_ansysem
|
|
38
40
|
|
|
39
41
|
|
|
@@ -710,6 +712,8 @@ class EdbDotNet(object):
|
|
|
710
712
|
except IndexError:
|
|
711
713
|
raise Exception("No ANSYSEM_ROOTxxx is found.")
|
|
712
714
|
self.edbversion = edbversion
|
|
715
|
+
if float(self.edbversion) >= 2025.2:
|
|
716
|
+
warnings.warn(GRPC_GENERAL_WARNING, UserWarning)
|
|
713
717
|
self.student_version = student_version
|
|
714
718
|
"""Initialize DLLs."""
|
|
715
719
|
from pyedb.dotnet.clr_module import _clr, edb_initialized
|
|
@@ -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):
|
|
@@ -1807,8 +1807,14 @@ class EDBPadstackInstance(Primitive):
|
|
|
1807
1807
|
|
|
1808
1808
|
val = String("")
|
|
1809
1809
|
_, name = self._edb_padstackinstance.GetProductProperty(self._pedb.edb_api.ProductId.Designer, 11, val)
|
|
1810
|
-
|
|
1811
|
-
|
|
1810
|
+
aedt_name = str(name).strip("'")
|
|
1811
|
+
if aedt_name == "":
|
|
1812
|
+
if self.is_pin and self.component:
|
|
1813
|
+
aedt_name = f"{self.component.name}-{self.component_pin}"
|
|
1814
|
+
elif self.component_pin:
|
|
1815
|
+
aedt_name = self.component_pin
|
|
1816
|
+
self.aedt_name = aedt_name
|
|
1817
|
+
return aedt_name
|
|
1812
1818
|
|
|
1813
1819
|
@aedt_name.setter
|
|
1814
1820
|
def aedt_name(self, value):
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
|
|
23
23
|
import re
|
|
24
24
|
|
|
25
|
-
from pyedb.dotnet.clr_module import String
|
|
26
25
|
from pyedb.dotnet.database.edb_data.padstacks_data import EDBPadstackInstance
|
|
27
26
|
from pyedb.dotnet.database.edb_data.primitives_data import Primitive
|
|
28
27
|
from pyedb.generic.general_methods import generate_unique_name
|
|
@@ -325,21 +324,12 @@ class LayoutValidation:
|
|
|
325
324
|
return
|
|
326
325
|
|
|
327
326
|
def padstacks_no_name(self, fix=False):
|
|
327
|
+
"""Find and fix padstacks without aedt_name."""
|
|
328
328
|
pds = self._pedb.layout.padstack_instances
|
|
329
329
|
counts = 0
|
|
330
|
-
via_count = 1
|
|
331
330
|
for obj in pds:
|
|
332
|
-
|
|
333
|
-
_, name = obj._edb_object.GetProductProperty(self._pedb.edb_api.ProductId.Designer, 11, val)
|
|
334
|
-
name = str(name).strip("'")
|
|
335
|
-
if name == "":
|
|
331
|
+
if obj.aedt_name == "":
|
|
336
332
|
counts += 1
|
|
337
333
|
if fix:
|
|
338
|
-
|
|
339
|
-
obj._edb_object.SetProductProperty(self._pedb.edb_api.ProductId.Designer, 11, f"Via{via_count}")
|
|
340
|
-
via_count = via_count + 1
|
|
341
|
-
else:
|
|
342
|
-
obj._edb_object.SetProductProperty(
|
|
343
|
-
self._pedb.edb_api.ProductId.Designer, 11, f"{obj.component.name}-{obj.component_pin}"
|
|
344
|
-
)
|
|
334
|
+
obj.aedt_name = f"via_{obj.id}"
|
|
345
335
|
self._pedb._logger.info(f"Found {counts}/{len(pds)} padstacks have no name.")
|
pyedb/dotnet/database/siwave.py
CHANGED
|
@@ -40,6 +40,9 @@ from pyedb.dotnet.database.edb_data.sources import (
|
|
|
40
40
|
VoltageSource,
|
|
41
41
|
)
|
|
42
42
|
from pyedb.dotnet.database.general import convert_py_list_to_net_list
|
|
43
|
+
from pyedb.dotnet.database.utilities.siwave_cpa_simulation_setup import (
|
|
44
|
+
SIWaveCPASimulationSetup,
|
|
45
|
+
)
|
|
43
46
|
from pyedb.generic.constants import SolverType, SweepType
|
|
44
47
|
from pyedb.generic.general_methods import _retry_ntimes, generate_unique_name
|
|
45
48
|
from pyedb.misc.siw_feature_config.xtalk_scan.scan_config import SiwaveScanConfig
|
|
@@ -1507,6 +1510,17 @@ class EdbSiwave(object):
|
|
|
1507
1510
|
"""
|
|
1508
1511
|
return SiwaveScanConfig(self._pedb, scan_type)
|
|
1509
1512
|
|
|
1513
|
+
def add_cpa_analysis(self, name=None, siwave_cpa_setup_class=None):
|
|
1514
|
+
if not name:
|
|
1515
|
+
from pyedb.generic.general_methods import generate_unique_name
|
|
1516
|
+
|
|
1517
|
+
if not siwave_cpa_setup_class:
|
|
1518
|
+
name = generate_unique_name("cpa_setup")
|
|
1519
|
+
else:
|
|
1520
|
+
name = siwave_cpa_setup_class.name
|
|
1521
|
+
cpa_setup = SIWaveCPASimulationSetup(self._pedb, name=name, siwave_cpa_setup_class=siwave_cpa_setup_class)
|
|
1522
|
+
return cpa_setup
|
|
1523
|
+
|
|
1510
1524
|
@icepak_use_minimal_comp_defaults.setter
|
|
1511
1525
|
def icepak_use_minimal_comp_defaults(self, value):
|
|
1512
1526
|
value = "True" if bool(value) else ""
|
pyedb/dotnet/database/stackup.py
CHANGED
|
@@ -2234,11 +2234,8 @@ class Stackup(LayerCollection):
|
|
|
2234
2234
|
material.loss_tanget = material_properties["DielectricLossTangent"]
|
|
2235
2235
|
return True
|
|
2236
2236
|
|
|
2237
|
-
def _import_xml(self, file_path
|
|
2238
|
-
"""
|
|
2239
|
-
You can use xml file to import layer stackup but using json file is recommended.
|
|
2240
|
-
see :class:`pyedb.dotnet.database.edb_data.simulation_configuration.SimulationConfiguration´ class to
|
|
2241
|
-
generate files`.
|
|
2237
|
+
def _import_xml(self, file_path):
|
|
2238
|
+
"""Load stackup from a XML file.
|
|
2242
2239
|
|
|
2243
2240
|
Parameters
|
|
2244
2241
|
----------
|
|
@@ -2250,61 +2247,11 @@ class Stackup(LayerCollection):
|
|
|
2250
2247
|
bool
|
|
2251
2248
|
``True`` when successful, ``False`` when failed.
|
|
2252
2249
|
"""
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
stackup = root.find("Stackup")
|
|
2259
|
-
stackup_dict = {}
|
|
2260
|
-
if stackup.find("Materials"):
|
|
2261
|
-
mats = []
|
|
2262
|
-
for m in stackup.find("Materials").findall("Material"):
|
|
2263
|
-
temp = dict()
|
|
2264
|
-
for i in list(m):
|
|
2265
|
-
value = list(i)[0].text
|
|
2266
|
-
temp[i.tag] = value
|
|
2267
|
-
mat = {"name": m.attrib["Name"]}
|
|
2268
|
-
temp_dict = {
|
|
2269
|
-
"Permittivity": "permittivity",
|
|
2270
|
-
"Conductivity": "conductivity",
|
|
2271
|
-
"DielectricLossTangent": "dielectric_loss_tangent",
|
|
2272
|
-
}
|
|
2273
|
-
for i in temp_dict.keys():
|
|
2274
|
-
value = temp.get(i, None)
|
|
2275
|
-
if value:
|
|
2276
|
-
mat[temp_dict[i]] = value
|
|
2277
|
-
mats.append(mat)
|
|
2278
|
-
stackup_dict["materials"] = mats
|
|
2279
|
-
|
|
2280
|
-
stackup_section = stackup.find("Layers")
|
|
2281
|
-
if stackup_section:
|
|
2282
|
-
length_unit = stackup_section.attrib["LengthUnit"]
|
|
2283
|
-
layers = []
|
|
2284
|
-
for l in stackup.find("Layers").findall("Layer"):
|
|
2285
|
-
temp = l.attrib
|
|
2286
|
-
layer = dict()
|
|
2287
|
-
temp_dict = {
|
|
2288
|
-
"Name": "name",
|
|
2289
|
-
"Color": "color",
|
|
2290
|
-
"Material": "material",
|
|
2291
|
-
"Thickness": "thickness",
|
|
2292
|
-
"Type": "type",
|
|
2293
|
-
"FillMaterial": "fill_material",
|
|
2294
|
-
}
|
|
2295
|
-
for i in temp_dict.keys():
|
|
2296
|
-
value = temp.get(i, None)
|
|
2297
|
-
if value:
|
|
2298
|
-
if i == "Thickness":
|
|
2299
|
-
value = str(round(float(value), 6)) + length_unit
|
|
2300
|
-
value = "signal" if value == "conductor" else value
|
|
2301
|
-
if i == "Color":
|
|
2302
|
-
value = [int(x * 255) for x in list(colors.to_rgb(value))]
|
|
2303
|
-
layer[temp_dict[i]] = value
|
|
2304
|
-
layers.append(layer)
|
|
2305
|
-
stackup_dict["layers"] = layers
|
|
2306
|
-
cfg = {"stackup": stackup_dict}
|
|
2307
|
-
return self._pedb.configuration.load(cfg, apply_file=True)
|
|
2250
|
+
|
|
2251
|
+
self._edb_object.ImportFromControlFile(file_path)
|
|
2252
|
+
flag = self._pedb.layout._edb_object.SetLayerCollection(self._edb_object)
|
|
2253
|
+
self.refresh_layer_collection()
|
|
2254
|
+
return flag
|
|
2308
2255
|
|
|
2309
2256
|
def _export_xml(self, file_path):
|
|
2310
2257
|
"""Export stackup information to an external XMLfile.
|
|
@@ -2391,7 +2338,7 @@ class Stackup(LayerCollection):
|
|
|
2391
2338
|
elif file_path.endswith(".json"):
|
|
2392
2339
|
return self._import_json(file_path, rename=rename)
|
|
2393
2340
|
elif file_path.endswith(".xml"):
|
|
2394
|
-
return self._import_xml(file_path
|
|
2341
|
+
return self._import_xml(file_path)
|
|
2395
2342
|
else:
|
|
2396
2343
|
return False
|
|
2397
2344
|
|
|
@@ -377,5 +377,5 @@ class SimulationSetup(object):
|
|
|
377
377
|
... ["linear scale", "0.1GHz", "10GHz", "0.1GHz"],
|
|
378
378
|
... ])
|
|
379
379
|
"""
|
|
380
|
-
warnings.warn("`
|
|
380
|
+
warnings.warn("`add_frequency_sweep` is deprecated. Use `add_sweep` method instead.", DeprecationWarning)
|
|
381
381
|
return self.add_sweep(name, frequency_sweep)
|