pyedb 0.16.0__py3-none-any.whl → 0.17.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_components.py +47 -1
- pyedb/configuration/configuration.py +2 -0
- pyedb/dotnet/edb.py +43 -37
- pyedb/dotnet/edb_core/cell/hierarchy/component.py +12 -17
- pyedb/dotnet/edb_core/cell/hierarchy/hierarchy_obj.py +50 -0
- pyedb/dotnet/edb_core/cell/layout.py +0 -6
- pyedb/dotnet/edb_core/cell/voltage_regulator.py +0 -5
- pyedb/dotnet/edb_core/components.py +2 -2
- pyedb/dotnet/edb_core/dotnet/primitive.py +129 -3
- pyedb/dotnet/edb_core/edb_data/hfss_pi_simulation_setup_data.py +0 -460
- pyedb/dotnet/edb_core/edb_data/primitives_data.py +38 -38
- pyedb/dotnet/edb_core/edb_data/raptor_x_simulation_setup_data.py +1 -1
- pyedb/dotnet/edb_core/layout.py +21 -0
- pyedb/dotnet/edb_core/layout_validation.py +26 -0
- pyedb/dotnet/edb_core/nets.py +1 -1
- pyedb/dotnet/edb_core/sim_setup_data/data/sim_setup_info.py +1 -1
- pyedb/dotnet/edb_core/sim_setup_data/data/simulation_settings.py +357 -0
- pyedb/dotnet/edb_core/siwave.py +14 -0
- pyedb/dotnet/edb_core/utilities/hfss_simulation_setup.py +83 -0
- pyedb/dotnet/edb_core/utilities/simulation_setup.py +7 -4
- pyedb/misc/siw_feature_config/xtalk_scan/fd_xtalk_scan_config.py +91 -0
- pyedb/misc/siw_feature_config/xtalk_scan/impedance_scan_config.py +70 -0
- pyedb/misc/siw_feature_config/xtalk_scan/net.py +69 -0
- pyedb/misc/siw_feature_config/xtalk_scan/pins.py +60 -0
- pyedb/misc/siw_feature_config/xtalk_scan/scan_config.py +88 -0
- pyedb/misc/siw_feature_config/xtalk_scan/td_xtalk_config.py +104 -0
- pyedb/workflow.py +32 -0
- {pyedb-0.16.0.dist-info → pyedb-0.17.0.dist-info}/METADATA +1 -1
- {pyedb-0.16.0.dist-info → pyedb-0.17.0.dist-info}/RECORD +32 -24
- {pyedb-0.16.0.dist-info → pyedb-0.17.0.dist-info}/LICENSE +0 -0
- {pyedb-0.16.0.dist-info → pyedb-0.17.0.dist-info}/WHEEL +0 -0
pyedb/__init__.py
CHANGED
|
@@ -51,12 +51,13 @@ class CfgRlcModel(CfgBase):
|
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
class CfgComponent(CfgBase):
|
|
54
|
-
protected_attributes = ["reference_designator"]
|
|
54
|
+
protected_attributes = ["reference_designator", "definition", "location", "angle", "placement_layer"]
|
|
55
55
|
|
|
56
56
|
def __init__(self, **kwargs):
|
|
57
57
|
self.enabled = kwargs.get("enabled", None)
|
|
58
58
|
|
|
59
59
|
self.reference_designator = kwargs.get("reference_designator", None)
|
|
60
|
+
self.definition = kwargs.get("definition", None)
|
|
60
61
|
self.type = kwargs.get("part_type", None)
|
|
61
62
|
self.value = kwargs.get("value", None)
|
|
62
63
|
self.port_properties = CfgPortProperties(**kwargs["port_properties"]) if "port_properties" in kwargs else None
|
|
@@ -67,6 +68,29 @@ class CfgComponent(CfgBase):
|
|
|
67
68
|
|
|
68
69
|
self.rlc_model = [CfgRlcModel(**rlc_m) for rlc_m in rlc_models]
|
|
69
70
|
|
|
71
|
+
self.x_location, self.y_location = kwargs.get("location", [None, None])
|
|
72
|
+
self.angle = kwargs.get("angle", None)
|
|
73
|
+
self.placement_layer = kwargs.get("placement_layer", None)
|
|
74
|
+
|
|
75
|
+
def export_properties(self):
|
|
76
|
+
"""Export component properties.
|
|
77
|
+
|
|
78
|
+
Returns
|
|
79
|
+
-------
|
|
80
|
+
Dict
|
|
81
|
+
"""
|
|
82
|
+
data_comp = {}
|
|
83
|
+
data_comp["enabled"] = self.enabled
|
|
84
|
+
data_comp["reference_designator"] = self.reference_designator
|
|
85
|
+
data_comp["definition"] = self.definition
|
|
86
|
+
data_comp["type"] = self.type
|
|
87
|
+
data_comp["value"] = self.value
|
|
88
|
+
data_comp["x_location"] = self.x_location
|
|
89
|
+
data_comp["y_location"] = self.y_location
|
|
90
|
+
# data_comp["angle"] = self.angle
|
|
91
|
+
data_comp["placement_layer"] = self.placement_layer
|
|
92
|
+
return data_comp
|
|
93
|
+
|
|
70
94
|
|
|
71
95
|
class CfgComponents:
|
|
72
96
|
def __init__(self, pedb, components_data):
|
|
@@ -127,3 +151,25 @@ class CfgComponents:
|
|
|
127
151
|
setattr(c_db, attr, value)
|
|
128
152
|
else:
|
|
129
153
|
raise AttributeError(f"'{attr}' is not valid component attribute.")
|
|
154
|
+
|
|
155
|
+
def _load_data_from_db(self):
|
|
156
|
+
self.components = []
|
|
157
|
+
comps_in_db = self._pedb.components
|
|
158
|
+
for _, comp in comps_in_db.components.items():
|
|
159
|
+
cfg_comp = CfgComponent(
|
|
160
|
+
enabled=comp.enabled,
|
|
161
|
+
reference_designator=comp.name,
|
|
162
|
+
part_type=comp.type,
|
|
163
|
+
value=comp.value,
|
|
164
|
+
definition=comp.component_def,
|
|
165
|
+
location=comp.location,
|
|
166
|
+
placement_layer=comp.placement_layer,
|
|
167
|
+
)
|
|
168
|
+
self.components.append(cfg_comp)
|
|
169
|
+
|
|
170
|
+
def get_data_from_db(self):
|
|
171
|
+
self._load_data_from_db()
|
|
172
|
+
data = []
|
|
173
|
+
for comp in self.components:
|
|
174
|
+
data.append(comp.export_properties())
|
|
175
|
+
return data
|
|
@@ -271,6 +271,8 @@ class Configuration:
|
|
|
271
271
|
data["package_definitions"] = self.cfg_data.package_definitions.get_data_from_db()
|
|
272
272
|
if kwargs.get("setups", False):
|
|
273
273
|
data["setups"] = self.cfg_data.setups.get_data_from_db()
|
|
274
|
+
if kwargs.get("components", False):
|
|
275
|
+
data["components"] = self.cfg_data.components.get_data_from_db()
|
|
274
276
|
|
|
275
277
|
return data
|
|
276
278
|
|
pyedb/dotnet/edb.py
CHANGED
|
@@ -58,9 +58,6 @@ from pyedb.dotnet.edb_core.edb_data.control_file import (
|
|
|
58
58
|
)
|
|
59
59
|
from pyedb.dotnet.edb_core.edb_data.design_options import EdbDesignOptions
|
|
60
60
|
from pyedb.dotnet.edb_core.edb_data.edbvalue import EdbValue
|
|
61
|
-
from pyedb.dotnet.edb_core.edb_data.hfss_pi_simulation_setup_data import (
|
|
62
|
-
HFSSPISimulationSetup,
|
|
63
|
-
)
|
|
64
61
|
from pyedb.dotnet.edb_core.edb_data.ports import (
|
|
65
62
|
BundleWavePort,
|
|
66
63
|
CircuitPort,
|
|
@@ -94,7 +91,10 @@ from pyedb.dotnet.edb_core.nets import EdbNets
|
|
|
94
91
|
from pyedb.dotnet.edb_core.padstack import EdbPadstacks
|
|
95
92
|
from pyedb.dotnet.edb_core.siwave import EdbSiwave
|
|
96
93
|
from pyedb.dotnet.edb_core.stackup import Stackup
|
|
97
|
-
from pyedb.dotnet.edb_core.utilities.hfss_simulation_setup import
|
|
94
|
+
from pyedb.dotnet.edb_core.utilities.hfss_simulation_setup import (
|
|
95
|
+
HFSSPISimulationSetup,
|
|
96
|
+
HfssSimulationSetup,
|
|
97
|
+
)
|
|
98
98
|
from pyedb.dotnet.edb_core.utilities.siwave_simulation_setup import (
|
|
99
99
|
SiwaveDCSimulationSetup,
|
|
100
100
|
SiwaveSimulationSetup,
|
|
@@ -112,6 +112,7 @@ from pyedb.generic.process import SiwaveSolve
|
|
|
112
112
|
from pyedb.generic.settings import settings
|
|
113
113
|
from pyedb.ipc2581.ipc2581 import Ipc2581
|
|
114
114
|
from pyedb.modeler.geometry_operators import GeometryOperators
|
|
115
|
+
from pyedb.workflow import Workflow
|
|
115
116
|
|
|
116
117
|
if is_linux and is_ironpython:
|
|
117
118
|
import subprocessdotnet as subprocess
|
|
@@ -157,7 +158,7 @@ class Edb(Database):
|
|
|
157
158
|
--------
|
|
158
159
|
Create an ``Edb`` object and a new EDB cell.
|
|
159
160
|
|
|
160
|
-
>>> from pyedb
|
|
161
|
+
>>> from pyedb import Edb
|
|
161
162
|
>>> app = Edb()
|
|
162
163
|
|
|
163
164
|
Add a new variable named "s1" to the ``Edb`` instance.
|
|
@@ -517,7 +518,7 @@ class Edb(Database):
|
|
|
517
518
|
vrms = [VoltageRegulator(self, edb_object) for edb_object in list(self.active_layout.VoltageRegulators)]
|
|
518
519
|
_vrms = {}
|
|
519
520
|
for vrm in vrms:
|
|
520
|
-
_vrms[vrm.
|
|
521
|
+
_vrms[vrm.name] = vrm
|
|
521
522
|
return _vrms
|
|
522
523
|
|
|
523
524
|
@property
|
|
@@ -801,7 +802,7 @@ class Edb(Database):
|
|
|
801
802
|
|
|
802
803
|
Examples
|
|
803
804
|
--------
|
|
804
|
-
>>> from pyedb
|
|
805
|
+
>>> from pyedb import Edb
|
|
805
806
|
>>> edbapp = Edb("myproject.aedb")
|
|
806
807
|
>>> comp = edbapp.components.get_component_by_name("J1")
|
|
807
808
|
"""
|
|
@@ -818,7 +819,7 @@ class Edb(Database):
|
|
|
818
819
|
|
|
819
820
|
Examples
|
|
820
821
|
--------
|
|
821
|
-
>>> from pyedb
|
|
822
|
+
>>> from pyedb import Edb
|
|
822
823
|
>>> edbapp = Edb("myproject.aedb")
|
|
823
824
|
>>> comp = edbapp.components.get_component_by_name("J1")
|
|
824
825
|
"""
|
|
@@ -861,7 +862,7 @@ class Edb(Database):
|
|
|
861
862
|
|
|
862
863
|
Examples
|
|
863
864
|
--------
|
|
864
|
-
>>> from pyedb
|
|
865
|
+
>>> from pyedb import Edb
|
|
865
866
|
>>> edbapp = Edb("myproject.aedb")
|
|
866
867
|
>>> edbapp.stackup.layers["TOP"].thickness = 4e-5
|
|
867
868
|
>>> edbapp.stackup.layers["TOP"].thickness == 4e-05
|
|
@@ -879,7 +880,7 @@ class Edb(Database):
|
|
|
879
880
|
|
|
880
881
|
Examples
|
|
881
882
|
--------
|
|
882
|
-
>>> from pyedb
|
|
883
|
+
>>> from pyedb import Edb
|
|
883
884
|
>>> edbapp = Edb()
|
|
884
885
|
>>> edbapp.materials.add_material("air", permittivity=1.0)
|
|
885
886
|
>>> edbapp.materials.add_debye_material("debye_mat", 5, 3, 0.02, 0.05, 1e5, 1e9)
|
|
@@ -903,7 +904,7 @@ class Edb(Database):
|
|
|
903
904
|
|
|
904
905
|
Examples
|
|
905
906
|
--------
|
|
906
|
-
>>> from pyedb
|
|
907
|
+
>>> from pyedb import Edb
|
|
907
908
|
>>> edbapp = Edb("myproject.aedb")
|
|
908
909
|
>>> p = edbapp.padstacks.create(padstackname="myVia_bullet", antipad_shape="Bullet")
|
|
909
910
|
>>> edbapp.padstacks.get_pad_parameters(
|
|
@@ -925,7 +926,7 @@ class Edb(Database):
|
|
|
925
926
|
|
|
926
927
|
Examples
|
|
927
928
|
--------
|
|
928
|
-
>>> from pyedb
|
|
929
|
+
>>> from pyedb import Edb
|
|
929
930
|
>>> edbapp = Edb("myproject.aedb")
|
|
930
931
|
>>> p = edbapp.padstacks.create(padstackname="myVia_bullet", antipad_shape="Bullet")
|
|
931
932
|
>>> edbapp.padstacks.get_pad_parameters(
|
|
@@ -950,7 +951,7 @@ class Edb(Database):
|
|
|
950
951
|
|
|
951
952
|
Examples
|
|
952
953
|
--------
|
|
953
|
-
>>> from pyedb
|
|
954
|
+
>>> from pyedb import Edb
|
|
954
955
|
>>> edbapp = Edb("myproject.aedb")
|
|
955
956
|
>>> p2 = edbapp.siwave.create_circuit_port_on_net("U2A5", "V3P3_S0", "U2A5", "GND", 50, "test")
|
|
956
957
|
"""
|
|
@@ -967,7 +968,7 @@ class Edb(Database):
|
|
|
967
968
|
|
|
968
969
|
Examples
|
|
969
970
|
--------
|
|
970
|
-
>>> from pyedb
|
|
971
|
+
>>> from pyedb import Edb
|
|
971
972
|
>>> edbapp = Edb("myproject.aedb")
|
|
972
973
|
>>> p2 = edbapp.siwave.create_circuit_port_on_net("U2A5", "V3P3_S0", "U2A5", "GND", 50, "test")
|
|
973
974
|
"""
|
|
@@ -988,7 +989,7 @@ class Edb(Database):
|
|
|
988
989
|
|
|
989
990
|
Examples
|
|
990
991
|
--------
|
|
991
|
-
>>> from pyedb
|
|
992
|
+
>>> from pyedb import Edb
|
|
992
993
|
>>> edbapp = Edb("myproject.aedb")
|
|
993
994
|
>>> edbapp.hfss.configure_hfss_analysis_setup(sim_config)
|
|
994
995
|
"""
|
|
@@ -1009,7 +1010,7 @@ class Edb(Database):
|
|
|
1009
1010
|
|
|
1010
1011
|
Examples
|
|
1011
1012
|
--------
|
|
1012
|
-
>>> from pyedb
|
|
1013
|
+
>>> from pyedb import Edb
|
|
1013
1014
|
>>> edbapp = Edb("myproject.aedb")
|
|
1014
1015
|
>>> sim_config = edbapp.new_simulation_configuration()
|
|
1015
1016
|
>>> sim_config.mesh_freq = "10Ghz"
|
|
@@ -1032,7 +1033,7 @@ class Edb(Database):
|
|
|
1032
1033
|
|
|
1033
1034
|
Examples
|
|
1034
1035
|
--------
|
|
1035
|
-
>>> from pyedb
|
|
1036
|
+
>>> from pyedb import Edb
|
|
1036
1037
|
>>> edbapp = Edb("myproject.aedb")
|
|
1037
1038
|
>>> edbapp.nets.find_or_create_net("GND")
|
|
1038
1039
|
>>> edbapp.nets.find_and_fix_disjoint_nets("GND", keep_only_main_net=True)
|
|
@@ -1050,7 +1051,7 @@ class Edb(Database):
|
|
|
1050
1051
|
|
|
1051
1052
|
Examples
|
|
1052
1053
|
--------
|
|
1053
|
-
>>> from pyedb
|
|
1054
|
+
>>> from pyedb import Edb
|
|
1054
1055
|
>>> edbapp = Edb"myproject.aedb")
|
|
1055
1056
|
>>> edbapp.nets.find_or_create_net("GND")
|
|
1056
1057
|
>>> edbapp.nets.find_and_fix_disjoint_nets("GND", keep_only_main_net=True)
|
|
@@ -1071,7 +1072,7 @@ class Edb(Database):
|
|
|
1071
1072
|
|
|
1072
1073
|
Examples
|
|
1073
1074
|
--------
|
|
1074
|
-
>>> from pyedb
|
|
1075
|
+
>>> from pyedb import Edb
|
|
1075
1076
|
>>> edbapp = Edb("myproject.aedb")
|
|
1076
1077
|
>>> edbapp.net_classes
|
|
1077
1078
|
"""
|
|
@@ -1089,7 +1090,7 @@ class Edb(Database):
|
|
|
1089
1090
|
|
|
1090
1091
|
Examples
|
|
1091
1092
|
--------
|
|
1092
|
-
>>> from pyedb
|
|
1093
|
+
>>> from pyedb import Edb
|
|
1093
1094
|
>>> edbapp = Edb("myproject.aedb")
|
|
1094
1095
|
>>> edbapp.extended_nets
|
|
1095
1096
|
"""
|
|
@@ -1107,7 +1108,7 @@ class Edb(Database):
|
|
|
1107
1108
|
|
|
1108
1109
|
Examples
|
|
1109
1110
|
--------
|
|
1110
|
-
>>> from pyedb
|
|
1111
|
+
>>> from pyedb import Edb
|
|
1111
1112
|
>>> edbapp = Edb("myproject.aedb")
|
|
1112
1113
|
>>> edbapp.differential_pairs
|
|
1113
1114
|
"""
|
|
@@ -1129,7 +1130,7 @@ class Edb(Database):
|
|
|
1129
1130
|
|
|
1130
1131
|
Examples
|
|
1131
1132
|
--------
|
|
1132
|
-
>>> from pyedb
|
|
1133
|
+
>>> from pyedb import Edb
|
|
1133
1134
|
>>> edbapp = Edb("myproject.aedb")
|
|
1134
1135
|
>>> top_prims = edbapp.modeler.primitives_by_layer["TOP"]
|
|
1135
1136
|
"""
|
|
@@ -1146,7 +1147,7 @@ class Edb(Database):
|
|
|
1146
1147
|
|
|
1147
1148
|
Examples
|
|
1148
1149
|
--------
|
|
1149
|
-
>>> from pyedb
|
|
1150
|
+
>>> from pyedb import Edb
|
|
1150
1151
|
>>> edbapp = Edb("myproject.aedb")
|
|
1151
1152
|
>>> top_prims = edbapp.modeler.primitives_by_layer["TOP"]
|
|
1152
1153
|
"""
|
|
@@ -1243,7 +1244,7 @@ class Edb(Database):
|
|
|
1243
1244
|
|
|
1244
1245
|
Examples
|
|
1245
1246
|
--------
|
|
1246
|
-
>>> from pyedb
|
|
1247
|
+
>>> from pyedb import Edb
|
|
1247
1248
|
>>> edbapp = Edb("myproject.aedb")
|
|
1248
1249
|
>>> pin_net_name = edbapp.pins[424968329].netname
|
|
1249
1250
|
"""
|
|
@@ -1845,7 +1846,7 @@ class Edb(Database):
|
|
|
1845
1846
|
|
|
1846
1847
|
Examples
|
|
1847
1848
|
--------
|
|
1848
|
-
>>> from pyedb
|
|
1849
|
+
>>> from pyedb import Edb
|
|
1849
1850
|
>>> edb = Edb(r'C:\\test.aedb', edbversion="2022.2")
|
|
1850
1851
|
>>> edb.logger.info_timer("Edb Opening")
|
|
1851
1852
|
>>> edb.logger.reset_timer()
|
|
@@ -2461,7 +2462,7 @@ class Edb(Database):
|
|
|
2461
2462
|
|
|
2462
2463
|
Examples
|
|
2463
2464
|
--------
|
|
2464
|
-
>>> from pyedb
|
|
2465
|
+
>>> from pyedb import Edb
|
|
2465
2466
|
>>> edb = Edb(r'C:\\test.aedb', edbversion="2022.2")
|
|
2466
2467
|
>>> edb.logger.info_timer("Edb Opening")
|
|
2467
2468
|
>>> edb.logger.reset_timer()
|
|
@@ -2894,7 +2895,7 @@ class Edb(Database):
|
|
|
2894
2895
|
Examples
|
|
2895
2896
|
--------
|
|
2896
2897
|
|
|
2897
|
-
>>> from pyedb
|
|
2898
|
+
>>> from pyedb import Edb
|
|
2898
2899
|
>>> edb = Edb(edbpath=r"C:\temp\myproject.aedb", edbversion="2023.2")
|
|
2899
2900
|
|
|
2900
2901
|
>>> options_config = {'UNITE_NETS' : 1, 'LAUNCH_Q3D' : 0}
|
|
@@ -2937,7 +2938,7 @@ class Edb(Database):
|
|
|
2937
2938
|
Examples
|
|
2938
2939
|
--------
|
|
2939
2940
|
|
|
2940
|
-
>>> from pyedb
|
|
2941
|
+
>>> from pyedb import Edb
|
|
2941
2942
|
>>> edb = Edb(edbpath=r"C:\temp\myproject.aedb", edbversion="2021.2")
|
|
2942
2943
|
>>> options_config = {'UNITE_NETS' : 1, 'LAUNCH_Q3D' : 0}
|
|
2943
2944
|
>>> edb.write_export3d_option_config_file(r"C:\temp", options_config)
|
|
@@ -2987,7 +2988,7 @@ class Edb(Database):
|
|
|
2987
2988
|
Examples
|
|
2988
2989
|
--------
|
|
2989
2990
|
|
|
2990
|
-
>>> from pyedb
|
|
2991
|
+
>>> from pyedb import Edb
|
|
2991
2992
|
|
|
2992
2993
|
>>> edb = Edb(edbpath=r"C:\temp\myproject.aedb", edbversion="2021.2")
|
|
2993
2994
|
|
|
@@ -3146,7 +3147,7 @@ class Edb(Database):
|
|
|
3146
3147
|
Examples
|
|
3147
3148
|
--------
|
|
3148
3149
|
|
|
3149
|
-
>>> from pyedb
|
|
3150
|
+
>>> from pyedb import Edb
|
|
3150
3151
|
>>> edb_app = Edb()
|
|
3151
3152
|
>>> boolean_1, ant_length = edb_app.add_project_variable("my_local_variable", "1cm")
|
|
3152
3153
|
>>> print(edb_app["$my_local_variable"]) #using getitem
|
|
@@ -3182,7 +3183,7 @@ class Edb(Database):
|
|
|
3182
3183
|
Examples
|
|
3183
3184
|
--------
|
|
3184
3185
|
|
|
3185
|
-
>>> from pyedb
|
|
3186
|
+
>>> from pyedb import Edb
|
|
3186
3187
|
>>> edb_app = Edb()
|
|
3187
3188
|
>>> boolean_1, ant_length = edb_app.add_design_variable("my_local_variable", "1cm")
|
|
3188
3189
|
>>> print(edb_app["my_local_variable"]) #using getitem
|
|
@@ -3220,7 +3221,7 @@ class Edb(Database):
|
|
|
3220
3221
|
Examples
|
|
3221
3222
|
--------
|
|
3222
3223
|
|
|
3223
|
-
>>> from pyedb
|
|
3224
|
+
>>> from pyedb import Edb
|
|
3224
3225
|
>>> edb_app = Edb()
|
|
3225
3226
|
>>> boolean, ant_length = edb_app.add_design_variable("ant_length", "1cm")
|
|
3226
3227
|
>>> boolean, ant_length = edb_app.change_design_variable_value("ant_length", "1m")
|
|
@@ -3265,7 +3266,7 @@ class Edb(Database):
|
|
|
3265
3266
|
Examples
|
|
3266
3267
|
--------
|
|
3267
3268
|
|
|
3268
|
-
>>> from pyedb
|
|
3269
|
+
>>> from pyedb import Edb
|
|
3269
3270
|
>>> from pyedb.dotnet.edb_core.edb_data.simulation_configuration import SimulationConfiguration
|
|
3270
3271
|
>>> config_file = path_configuration_file
|
|
3271
3272
|
>>> source_file = path_to_edb_folder
|
|
@@ -3465,7 +3466,7 @@ class Edb(Database):
|
|
|
3465
3466
|
|
|
3466
3467
|
Examples
|
|
3467
3468
|
--------
|
|
3468
|
-
>>> from pyedb
|
|
3469
|
+
>>> from pyedb import Edb
|
|
3469
3470
|
>>>edb = Edb()
|
|
3470
3471
|
>>> edb.hfss.create_edge_port_vertical(prim_1_id, ["-66mm", "-4mm"], "port_ver")
|
|
3471
3472
|
>>> edb.hfss.create_edge_port_horizontal(
|
|
@@ -3620,7 +3621,7 @@ class Edb(Database):
|
|
|
3620
3621
|
|
|
3621
3622
|
Examples
|
|
3622
3623
|
--------
|
|
3623
|
-
>>> from pyedb
|
|
3624
|
+
>>> from pyedb import Edb
|
|
3624
3625
|
>>> edbapp = Edb()
|
|
3625
3626
|
>>> setup1 = edbapp.create_hfss_setup("setup1")
|
|
3626
3627
|
>>> setup1.hfss_port_settings.max_delta_z0 = 0.5
|
|
@@ -3695,7 +3696,7 @@ class Edb(Database):
|
|
|
3695
3696
|
|
|
3696
3697
|
Examples
|
|
3697
3698
|
--------
|
|
3698
|
-
>>> from pyedb
|
|
3699
|
+
>>> from pyedb import Edb
|
|
3699
3700
|
>>> edbapp = Edb()
|
|
3700
3701
|
>>> setup1 = edbapp.create_siwave_syz_setup("setup1")
|
|
3701
3702
|
>>> setup1.add_frequency_sweep(frequency_sweep=[
|
|
@@ -3727,7 +3728,7 @@ class Edb(Database):
|
|
|
3727
3728
|
|
|
3728
3729
|
Examples
|
|
3729
3730
|
--------
|
|
3730
|
-
>>> from pyedb
|
|
3731
|
+
>>> from pyedb import Edb
|
|
3731
3732
|
>>> edbapp = Edb()
|
|
3732
3733
|
>>> setup1 = edbapp.create_siwave_dc_setup("setup1")
|
|
3733
3734
|
>>> setup1.mesh_bondwires = True
|
|
@@ -4456,3 +4457,8 @@ class Edb(Database):
|
|
|
4456
4457
|
from pyedb.dotnet.edb_core.definition.definitions import Definitions
|
|
4457
4458
|
|
|
4458
4459
|
return Definitions(self)
|
|
4460
|
+
|
|
4461
|
+
@property
|
|
4462
|
+
def workflow(self):
|
|
4463
|
+
"""Workflow class."""
|
|
4464
|
+
return Workflow(self)
|
|
@@ -24,6 +24,7 @@ import logging
|
|
|
24
24
|
import re
|
|
25
25
|
import warnings
|
|
26
26
|
|
|
27
|
+
from pyedb.dotnet.edb_core.cell.hierarchy.hierarchy_obj import Group
|
|
27
28
|
from pyedb.dotnet.edb_core.cell.hierarchy.model import PinPairModel, SPICEModel
|
|
28
29
|
from pyedb.dotnet.edb_core.cell.hierarchy.netlist_model import NetlistModel
|
|
29
30
|
from pyedb.dotnet.edb_core.cell.hierarchy.pin_pair_model import PinPair
|
|
@@ -44,7 +45,7 @@ if not is_ironpython:
|
|
|
44
45
|
from pyedb.generic.general_methods import get_filename_without_extension
|
|
45
46
|
|
|
46
47
|
|
|
47
|
-
class EDBComponent(
|
|
48
|
+
class EDBComponent(Group):
|
|
48
49
|
"""Manages EDB functionalities for components.
|
|
49
50
|
|
|
50
51
|
Parameters
|
|
@@ -56,9 +57,9 @@ class EDBComponent(object):
|
|
|
56
57
|
|
|
57
58
|
"""
|
|
58
59
|
|
|
59
|
-
def __init__(self, pedb,
|
|
60
|
-
|
|
61
|
-
self.edbcomponent =
|
|
60
|
+
def __init__(self, pedb, edb_object):
|
|
61
|
+
super().__init__(pedb, edb_object)
|
|
62
|
+
self.edbcomponent = edb_object
|
|
62
63
|
self._layout_instance = None
|
|
63
64
|
self._comp_instance = None
|
|
64
65
|
|
|
@@ -186,7 +187,10 @@ class EDBComponent(object):
|
|
|
186
187
|
@property
|
|
187
188
|
def enabled(self):
|
|
188
189
|
"""Get or Set the component to active mode."""
|
|
189
|
-
|
|
190
|
+
if self.type.lower() in ["resistor", "capacitor", "inductor"]:
|
|
191
|
+
return self.component_property.IsEnabled()
|
|
192
|
+
else:
|
|
193
|
+
return
|
|
190
194
|
|
|
191
195
|
@enabled.setter
|
|
192
196
|
def enabled(self, value):
|
|
@@ -319,11 +323,11 @@ class EDBComponent(object):
|
|
|
319
323
|
str
|
|
320
324
|
Reference Designator Name.
|
|
321
325
|
"""
|
|
322
|
-
return self.
|
|
326
|
+
return self.name
|
|
323
327
|
|
|
324
328
|
@refdes.setter
|
|
325
329
|
def refdes(self, name):
|
|
326
|
-
self.
|
|
330
|
+
self.name = name
|
|
327
331
|
|
|
328
332
|
@property
|
|
329
333
|
def is_null(self):
|
|
@@ -395,12 +399,7 @@ class EDBComponent(object):
|
|
|
395
399
|
"""
|
|
396
400
|
if self.model_type == "RLC":
|
|
397
401
|
if not self._pin_pairs:
|
|
398
|
-
|
|
399
|
-
return 1e-9
|
|
400
|
-
elif self.type == "Resistor":
|
|
401
|
-
return 1e6
|
|
402
|
-
else:
|
|
403
|
-
return 1
|
|
402
|
+
return
|
|
404
403
|
else:
|
|
405
404
|
pin_pair = self._pin_pairs[0]
|
|
406
405
|
if len([i for i in pin_pair.rlc_enable if i]) == 1:
|
|
@@ -731,10 +730,6 @@ class EDBComponent(object):
|
|
|
731
730
|
"""Set component part name."""
|
|
732
731
|
self.edbcomponent.GetComponentDef().SetName(name)
|
|
733
732
|
|
|
734
|
-
@property
|
|
735
|
-
def _edb(self):
|
|
736
|
-
return self._pedb.edb_api
|
|
737
|
-
|
|
738
733
|
@property
|
|
739
734
|
def placement_layer(self):
|
|
740
735
|
"""Placement layer.
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
import logging
|
|
24
|
+
|
|
25
|
+
from pyedb.dotnet.edb_core.cell.layout_obj import Connectable
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class HierarchyObj(Connectable):
|
|
29
|
+
def __init__(self, pedb, edb_object):
|
|
30
|
+
super().__init__(pedb, edb_object)
|
|
31
|
+
|
|
32
|
+
@property
|
|
33
|
+
def component_def(self):
|
|
34
|
+
"""Component definition."""
|
|
35
|
+
return self._edb_object.GetComponentDef().GetName()
|
|
36
|
+
|
|
37
|
+
@property
|
|
38
|
+
def location(self):
|
|
39
|
+
"""XY Coordinates."""
|
|
40
|
+
flag, x, y = self._edb_object.GetLocation()
|
|
41
|
+
if flag:
|
|
42
|
+
return [x, y]
|
|
43
|
+
else: # pragma no cover
|
|
44
|
+
logging.warning(f"Failed to get location of '{self.name}'.")
|
|
45
|
+
return
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class Group(HierarchyObj):
|
|
49
|
+
def __init__(self, pedb, edb_object):
|
|
50
|
+
super().__init__(pedb, edb_object)
|
|
@@ -84,8 +84,6 @@ class Layout(EdbLayout):
|
|
|
84
84
|
|
|
85
85
|
Parameters
|
|
86
86
|
----------
|
|
87
|
-
layout : :class:`Layout <ansys.edb.layout.Layout>`
|
|
88
|
-
Layout this bondwire will be in.
|
|
89
87
|
bondwire_type : :class:`BondwireType`
|
|
90
88
|
Type of bondwire: kAPDBondWire or kJDECBondWire types.
|
|
91
89
|
definition_name : str
|
|
@@ -96,16 +94,12 @@ class Layout(EdbLayout):
|
|
|
96
94
|
Bondwire width.
|
|
97
95
|
material : str
|
|
98
96
|
Bondwire material name.
|
|
99
|
-
start_context : :class:`CellInstance <ansys.edb.hierarchy.CellInstance>`
|
|
100
|
-
Start context: None means top level.
|
|
101
97
|
start_layer_name : str
|
|
102
98
|
Name of start layer.
|
|
103
99
|
start_x : :class:`Value <ansys.edb.utility.Value>`
|
|
104
100
|
X value of start point.
|
|
105
101
|
start_y : :class:`Value <ansys.edb.utility.Value>`
|
|
106
102
|
Y value of start point.
|
|
107
|
-
end_context : :class:`CellInstance <ansys.edb.hierarchy.CellInstance>`
|
|
108
|
-
End context: None means top level.
|
|
109
103
|
end_layer_name : str
|
|
110
104
|
Name of end layer.
|
|
111
105
|
end_x : :class:`Value <ansys.edb.utility.Value>`
|
|
@@ -51,11 +51,6 @@ class VoltageRegulator(Connectable):
|
|
|
51
51
|
return
|
|
52
52
|
self._edb_object.SetGroup(self._pedb.components.instances[value].edbcomponent)
|
|
53
53
|
|
|
54
|
-
@property
|
|
55
|
-
def id(self):
|
|
56
|
-
"""Retrieve voltage regulator ID."""
|
|
57
|
-
return self._edb_object.GetId()
|
|
58
|
-
|
|
59
54
|
@property
|
|
60
55
|
def load_regulator_current(self):
|
|
61
56
|
"""Retrieve load regulator current value"""
|
|
@@ -174,7 +174,7 @@ class Components(object):
|
|
|
174
174
|
Examples
|
|
175
175
|
--------
|
|
176
176
|
|
|
177
|
-
>>> from pyedb
|
|
177
|
+
>>> from pyedb import Edb
|
|
178
178
|
>>> edbapp = Edb("myaedbfolder")
|
|
179
179
|
>>> edbapp.components.components
|
|
180
180
|
|
|
@@ -194,7 +194,7 @@ class Components(object):
|
|
|
194
194
|
Examples
|
|
195
195
|
--------
|
|
196
196
|
|
|
197
|
-
>>> from pyedb
|
|
197
|
+
>>> from pyedb import Edb
|
|
198
198
|
>>> edbapp = Edb("myaedbfolder")
|
|
199
199
|
>>> edbapp.components.components
|
|
200
200
|
|