pyedb 0.13.dev0__py3-none-any.whl → 0.14.1__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 +0 -5
- pyedb/configuration/cfg_components.py +0 -2
- pyedb/configuration/cfg_operations.py +0 -2
- pyedb/configuration/cfg_package_definition.py +0 -2
- pyedb/configuration/cfg_ports_sources.py +14 -11
- pyedb/configuration/cfg_stackup.py +0 -7
- pyedb/configuration/configuration.py +0 -6
- pyedb/dotnet/application/Variables.py +4 -40
- pyedb/dotnet/edb.py +27 -82
- pyedb/dotnet/edb_core/{edb_data/components_data.py → cell/hierarchy/component.py} +13 -133
- pyedb/dotnet/edb_core/cell/hierarchy/model.py +0 -3
- pyedb/dotnet/edb_core/cell/hierarchy/netlist_model.py +30 -0
- pyedb/dotnet/edb_core/cell/hierarchy/pin_pair_model.py +105 -0
- pyedb/dotnet/edb_core/cell/hierarchy/s_parameter_model.py +34 -0
- pyedb/dotnet/edb_core/cell/hierarchy/spice_model.py +34 -0
- pyedb/dotnet/edb_core/cell/layout.py +137 -0
- pyedb/dotnet/edb_core/cell/layout_obj.py +2 -4
- pyedb/dotnet/edb_core/cell/primitive.py +199 -1
- pyedb/dotnet/edb_core/cell/terminal/bundle_terminal.py +52 -0
- pyedb/dotnet/edb_core/cell/terminal/edge_terminal.py +50 -0
- pyedb/dotnet/edb_core/cell/terminal/padstack_instance_terminal.py +88 -0
- pyedb/dotnet/edb_core/cell/terminal/pingroup_terminal.py +59 -0
- pyedb/dotnet/edb_core/cell/terminal/point_terminal.py +73 -0
- pyedb/dotnet/edb_core/{edb_data/terminals.py → cell/terminal/terminal.py} +33 -242
- pyedb/dotnet/edb_core/components.py +10 -56
- pyedb/dotnet/edb_core/definition/component_def.py +1 -8
- pyedb/dotnet/edb_core/definition/component_model.py +0 -2
- pyedb/dotnet/edb_core/definition/definitions.py +0 -2
- pyedb/dotnet/edb_core/definition/package_def.py +7 -5
- pyedb/dotnet/edb_core/edb_data/control_file.py +0 -3
- pyedb/dotnet/edb_core/edb_data/hfss_extent_info.py +0 -5
- pyedb/dotnet/edb_core/edb_data/hfss_pi_simulation_setup_data.py +4 -9
- pyedb/dotnet/edb_core/edb_data/layer_data.py +0 -7
- pyedb/dotnet/edb_core/edb_data/nets_data.py +2 -5
- pyedb/dotnet/edb_core/edb_data/padstacks_data.py +11 -29
- pyedb/dotnet/edb_core/edb_data/ports.py +4 -4
- pyedb/dotnet/edb_core/edb_data/primitives_data.py +3 -26
- pyedb/dotnet/edb_core/edb_data/raptor_x_simulation_setup_data.py +13 -20
- pyedb/dotnet/edb_core/edb_data/simulation_configuration.py +3 -11
- pyedb/dotnet/edb_core/edb_data/sources.py +12 -17
- pyedb/dotnet/edb_core/general.py +1 -6
- pyedb/dotnet/edb_core/geometry/polygon_data.py +0 -3
- pyedb/dotnet/edb_core/hfss.py +1 -33
- pyedb/dotnet/edb_core/layout.py +0 -35
- pyedb/dotnet/edb_core/layout_validation.py +1 -3
- pyedb/dotnet/edb_core/materials.py +1 -22
- pyedb/dotnet/edb_core/net_class.py +0 -8
- pyedb/dotnet/edb_core/nets.py +4 -29
- pyedb/dotnet/edb_core/padstack.py +76 -30
- pyedb/dotnet/edb_core/sim_setup_data/data/adaptive_frequency_data.py +72 -0
- pyedb/dotnet/edb_core/sim_setup_data/data/mesh_operation.py +287 -0
- pyedb/dotnet/edb_core/{edb_data/hfss_simulation_setup_data.py → sim_setup_data/data/settings.py} +174 -878
- pyedb/dotnet/edb_core/sim_setup_data/data/sweep_data.py +509 -0
- pyedb/dotnet/edb_core/sim_setup_data/io/__init__.py +0 -0
- pyedb/dotnet/edb_core/{edb_data/siwave_simulation_setup_data.py → sim_setup_data/io/siwave.py} +0 -341
- pyedb/dotnet/edb_core/siwave.py +5 -33
- pyedb/dotnet/edb_core/stackup.py +4 -51
- pyedb/dotnet/edb_core/utilities/simulation_setup.py +613 -366
- pyedb/generic/data_handlers.py +1 -9
- pyedb/generic/general_methods.py +3 -53
- pyedb/generic/plot.py +1 -2
- pyedb/ipc2581/ecad/cad_data/layer_feature.py +1 -7
- pyedb/ipc2581/ecad/cad_data/package.py +1 -4
- pyedb/ipc2581/ecad/cad_data/path.py +1 -3
- pyedb/ipc2581/ecad/cad_data/polygon.py +1 -6
- pyedb/ipc2581/ecad/cad_data/step.py +1 -10
- pyedb/ipc2581/ipc2581.py +8 -15
- pyedb/modeler/geometry_operators.py +164 -67
- pyedb/siwave.py +25 -32
- {pyedb-0.13.dev0.dist-info → pyedb-0.14.1.dist-info}/METADATA +2 -2
- {pyedb-0.13.dev0.dist-info → pyedb-0.14.1.dist-info}/RECORD +75 -61
- /pyedb/dotnet/edb_core/cell/{__init__.py → terminal/__init__.py} +0 -0
- {pyedb-0.13.dev0.dist-info → pyedb-0.14.1.dist-info}/LICENSE +0 -0
- {pyedb-0.13.dev0.dist-info → pyedb-0.14.1.dist-info}/WHEEL +0 -0
pyedb/dotnet/edb_core/{edb_data/siwave_simulation_setup_data.py → sim_setup_data/io/siwave.py}
RENAMED
|
@@ -20,18 +20,6 @@
|
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
|
-
import warnings
|
|
24
|
-
|
|
25
|
-
from pyedb.dotnet.edb_core.general import (
|
|
26
|
-
convert_netdict_to_pydict,
|
|
27
|
-
convert_pydict_to_netdict,
|
|
28
|
-
)
|
|
29
|
-
from pyedb.dotnet.edb_core.sim_setup_data.data.siw_dc_ir_settings import (
|
|
30
|
-
SiwaveDCIRSettings,
|
|
31
|
-
)
|
|
32
|
-
from pyedb.dotnet.edb_core.utilities.simulation_setup import BaseSimulationSetup
|
|
33
|
-
from pyedb.generic.general_methods import is_linux, pyedb_function_handler
|
|
34
|
-
|
|
35
23
|
|
|
36
24
|
def _parse_value(v):
|
|
37
25
|
"""Parse value in C sharp format."""
|
|
@@ -67,7 +55,6 @@ class SettingsBase(object):
|
|
|
67
55
|
"""EDB internal simulation setup object."""
|
|
68
56
|
return self._parent.get_sim_setup_info
|
|
69
57
|
|
|
70
|
-
@pyedb_function_handler
|
|
71
58
|
def get_configurations(self):
|
|
72
59
|
"""Get all attributes.
|
|
73
60
|
|
|
@@ -96,7 +83,6 @@ class SettingsBase(object):
|
|
|
96
83
|
temp[i] = self.__getattribute__(i)
|
|
97
84
|
return temp
|
|
98
85
|
|
|
99
|
-
@pyedb_function_handler
|
|
100
86
|
def restore_default(self):
|
|
101
87
|
for k, val in self.defaults.items():
|
|
102
88
|
self.__setattr__(k, val)
|
|
@@ -144,12 +130,10 @@ class AdvancedSettings(SettingsBase):
|
|
|
144
130
|
"max_coupled_lines": [12, 12, 40],
|
|
145
131
|
}
|
|
146
132
|
|
|
147
|
-
@pyedb_function_handler
|
|
148
133
|
def set_si_slider(self, value):
|
|
149
134
|
for k, val in self.si_defaults.items():
|
|
150
135
|
self.__setattr__(k, val[value])
|
|
151
136
|
|
|
152
|
-
@pyedb_function_handler
|
|
153
137
|
def set_pi_slider(self, value):
|
|
154
138
|
for k, val in self.pi_defaults.items():
|
|
155
139
|
self.__setattr__(k, val[value])
|
|
@@ -656,7 +640,6 @@ class DCAdvancedSettings(SettingsBase):
|
|
|
656
640
|
"refine_vias": [False, False, True],
|
|
657
641
|
}
|
|
658
642
|
|
|
659
|
-
@pyedb_function_handler
|
|
660
643
|
def set_dc_slider(self, value):
|
|
661
644
|
for k, val in self.dc_defaults.items():
|
|
662
645
|
self.__setattr__(k, val[value])
|
|
@@ -909,327 +892,3 @@ class DCAdvancedSettings(SettingsBase):
|
|
|
909
892
|
edb_setup_info.SimulationSettings.DCAdvancedSettings.RefineVias = value
|
|
910
893
|
self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info)
|
|
911
894
|
self._parent._update_setup()
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
class SiwaveSYZSimulationSetup(BaseSimulationSetup):
|
|
915
|
-
"""Manages EDB methods for SIwave simulation setup.
|
|
916
|
-
|
|
917
|
-
Parameters
|
|
918
|
-
----------
|
|
919
|
-
pedb : :class:`pyedb.dotnet.edb.Edb`
|
|
920
|
-
Inherited AEDT object.
|
|
921
|
-
edb_setup : :class:`Ansys.Ansoft.Edb.Utility.SIWaveSimulationSetup`
|
|
922
|
-
Edb object.
|
|
923
|
-
"""
|
|
924
|
-
|
|
925
|
-
def __init__(self, pedb, edb_setup=None):
|
|
926
|
-
super().__init__(pedb, edb_setup)
|
|
927
|
-
self._edb = self._pedb
|
|
928
|
-
self._setup_type = "kSIwave"
|
|
929
|
-
self._sim_setup_info = None
|
|
930
|
-
|
|
931
|
-
@pyedb_function_handler()
|
|
932
|
-
def create(self, name=None):
|
|
933
|
-
"""Create a SIwave SYZ setup.
|
|
934
|
-
|
|
935
|
-
Returns
|
|
936
|
-
-------
|
|
937
|
-
:class:`SiwaveDCSimulationSetup`
|
|
938
|
-
"""
|
|
939
|
-
self._name = name
|
|
940
|
-
self._create(name)
|
|
941
|
-
self.si_slider_position = 1
|
|
942
|
-
|
|
943
|
-
return self
|
|
944
|
-
|
|
945
|
-
@pyedb_function_handler
|
|
946
|
-
def get_configurations(self):
|
|
947
|
-
"""Get SIwave SYZ simulation settings.
|
|
948
|
-
|
|
949
|
-
Returns
|
|
950
|
-
-------
|
|
951
|
-
dict
|
|
952
|
-
Dictionary of SIwave SYZ simulation settings.
|
|
953
|
-
"""
|
|
954
|
-
return {
|
|
955
|
-
"pi_slider_position": self.pi_slider_position,
|
|
956
|
-
"si_slider_position": self.si_slider_position,
|
|
957
|
-
"use_custom_settings": self.use_si_settings,
|
|
958
|
-
"use_si_settings": self.use_si_settings,
|
|
959
|
-
"advanced_settings": self.advanced_settings.get_configurations(),
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
@property
|
|
963
|
-
def advanced_settings(self):
|
|
964
|
-
"""SIwave advanced settings."""
|
|
965
|
-
return AdvancedSettings(self)
|
|
966
|
-
|
|
967
|
-
@property
|
|
968
|
-
def get_sim_setup_info(self):
|
|
969
|
-
"""Get simulation information from the setup."""
|
|
970
|
-
if self._sim_setup_info:
|
|
971
|
-
return self._sim_setup_info
|
|
972
|
-
|
|
973
|
-
edb_setup = self._edb_object
|
|
974
|
-
edb_sim_setup_info = self._pedb.simsetupdata.SimSetupInfo[self._setup_type_mapping[self._setup_type]]()
|
|
975
|
-
edb_sim_setup_info.Name = edb_setup.GetName()
|
|
976
|
-
|
|
977
|
-
string = edb_setup.ToString().replace("\t", "").split("\r\n")
|
|
978
|
-
|
|
979
|
-
if is_linux:
|
|
980
|
-
string = string[0].split("\n")
|
|
981
|
-
keys = [i.split("=")[0] for i in string if len(i.split("=")) == 2 and "SourceTermsToGround" not in i]
|
|
982
|
-
values = [i.split("=")[1] for i in string if len(i.split("=")) == 2 and "SourceTermsToGround" not in i]
|
|
983
|
-
for val in string:
|
|
984
|
-
if "SourceTermsToGround()" in val:
|
|
985
|
-
break
|
|
986
|
-
elif "SourceTermsToGround" in val:
|
|
987
|
-
sources = {}
|
|
988
|
-
val = val.replace("SourceTermsToGround(", "").replace(")", "").split(",")
|
|
989
|
-
for v in val:
|
|
990
|
-
source = v.split("=")
|
|
991
|
-
sources[source[0]] = int(source[1].replace("'", ""))
|
|
992
|
-
edb_sim_setup_info.SimulationSettings.DCIRSettings.SourceTermsToGround = convert_pydict_to_netdict(
|
|
993
|
-
sources
|
|
994
|
-
)
|
|
995
|
-
break
|
|
996
|
-
for k in keys:
|
|
997
|
-
value = _parse_value(values[keys.index(k)])
|
|
998
|
-
setter = None
|
|
999
|
-
if k in dir(edb_sim_setup_info.SimulationSettings):
|
|
1000
|
-
setter = edb_sim_setup_info.SimulationSettings
|
|
1001
|
-
elif k in dir(edb_sim_setup_info.SimulationSettings.AdvancedSettings):
|
|
1002
|
-
setter = edb_sim_setup_info.SimulationSettings.AdvancedSettings
|
|
1003
|
-
|
|
1004
|
-
elif k in dir(edb_sim_setup_info.SimulationSettings.DCAdvancedSettings):
|
|
1005
|
-
setter = edb_sim_setup_info.SimulationSettings.DCAdvancedSettings
|
|
1006
|
-
elif "DCIRSettings" in dir(edb_sim_setup_info.SimulationSettings) and k in dir(
|
|
1007
|
-
edb_sim_setup_info.SimulationSettings.DCIRSettings
|
|
1008
|
-
):
|
|
1009
|
-
setter = edb_sim_setup_info.SimulationSettings.DCIRSettings
|
|
1010
|
-
elif k in dir(edb_sim_setup_info.SimulationSettings.DCSettings):
|
|
1011
|
-
setter = edb_sim_setup_info.SimulationSettings.DCSettings
|
|
1012
|
-
elif k in dir(edb_sim_setup_info.SimulationSettings.AdvancedSettings):
|
|
1013
|
-
setter = edb_sim_setup_info.SimulationSettings.AdvancedSettings
|
|
1014
|
-
if setter:
|
|
1015
|
-
try:
|
|
1016
|
-
setter.__setattr__(k, value)
|
|
1017
|
-
except TypeError:
|
|
1018
|
-
try:
|
|
1019
|
-
setter.__setattr__(k, str(value))
|
|
1020
|
-
except:
|
|
1021
|
-
pass
|
|
1022
|
-
|
|
1023
|
-
return edb_sim_setup_info
|
|
1024
|
-
|
|
1025
|
-
@pyedb_function_handler
|
|
1026
|
-
def set_pi_slider(self, value):
|
|
1027
|
-
"""Set SIwave PI simulation accuracy level.
|
|
1028
|
-
Options are:
|
|
1029
|
-
- ``0``: Optimal speed
|
|
1030
|
-
- ``1``: Balanced
|
|
1031
|
-
- ``2``: Optimal accuracy
|
|
1032
|
-
|
|
1033
|
-
.. deprecated:: 0.7.5
|
|
1034
|
-
Use :property:`pi_slider_position` property instead.
|
|
1035
|
-
|
|
1036
|
-
"""
|
|
1037
|
-
warnings.warn("`set_pi_slider` is deprecated. Use `pi_slider_position` property instead.", DeprecationWarning)
|
|
1038
|
-
self.pi_slider_position = value
|
|
1039
|
-
|
|
1040
|
-
@pyedb_function_handler
|
|
1041
|
-
def set_si_slider(self, value):
|
|
1042
|
-
"""Set SIwave SI simulation accuracy level.
|
|
1043
|
-
|
|
1044
|
-
Options are:
|
|
1045
|
-
- ``0``: Optimal speed;
|
|
1046
|
-
- ``1``: Balanced;
|
|
1047
|
-
- ``2``: Optimal accuracy```.
|
|
1048
|
-
"""
|
|
1049
|
-
self.use_si_settings = True
|
|
1050
|
-
self.use_custom_settings = False
|
|
1051
|
-
self.si_slider_position = value
|
|
1052
|
-
self.advanced_settings.set_si_slider(value)
|
|
1053
|
-
|
|
1054
|
-
@property
|
|
1055
|
-
def pi_slider_position(self):
|
|
1056
|
-
"""PI solider position. Values are from ``1`` to ``3``."""
|
|
1057
|
-
return self.get_sim_setup_info.SimulationSettings.PISliderPos
|
|
1058
|
-
|
|
1059
|
-
@pi_slider_position.setter
|
|
1060
|
-
def pi_slider_position(self, value):
|
|
1061
|
-
edb_setup_info = self.get_sim_setup_info
|
|
1062
|
-
edb_setup_info.SimulationSettings.PISliderPos = value
|
|
1063
|
-
self._edb_object = self._set_edb_setup_info(edb_setup_info)
|
|
1064
|
-
self._update_setup()
|
|
1065
|
-
|
|
1066
|
-
self.use_si_settings = False
|
|
1067
|
-
self.use_custom_settings = False
|
|
1068
|
-
self.advanced_settings.set_pi_slider(value)
|
|
1069
|
-
|
|
1070
|
-
@property
|
|
1071
|
-
def si_slider_position(self):
|
|
1072
|
-
"""SI slider position. Values are from ``1`` to ``3``."""
|
|
1073
|
-
return self.get_sim_setup_info.SimulationSettings.SISliderPos
|
|
1074
|
-
|
|
1075
|
-
@si_slider_position.setter
|
|
1076
|
-
def si_slider_position(self, value):
|
|
1077
|
-
edb_setup_info = self.get_sim_setup_info
|
|
1078
|
-
edb_setup_info.SimulationSettings.SISliderPos = value
|
|
1079
|
-
self._edb_object = self._set_edb_setup_info(edb_setup_info)
|
|
1080
|
-
self._update_setup()
|
|
1081
|
-
|
|
1082
|
-
self.use_si_settings = True
|
|
1083
|
-
self.use_custom_settings = False
|
|
1084
|
-
self.advanced_settings.set_si_slider(value)
|
|
1085
|
-
|
|
1086
|
-
@property
|
|
1087
|
-
def use_custom_settings(self):
|
|
1088
|
-
"""Custom settings to use.
|
|
1089
|
-
|
|
1090
|
-
Returns
|
|
1091
|
-
-------
|
|
1092
|
-
bool
|
|
1093
|
-
"""
|
|
1094
|
-
return self.get_sim_setup_info.SimulationSettings.UseCustomSettings
|
|
1095
|
-
|
|
1096
|
-
@use_custom_settings.setter
|
|
1097
|
-
def use_custom_settings(self, value):
|
|
1098
|
-
edb_setup_info = self.get_sim_setup_info
|
|
1099
|
-
edb_setup_info.SimulationSettings.UseCustomSettings = value
|
|
1100
|
-
self._edb_object = self._set_edb_setup_info(edb_setup_info)
|
|
1101
|
-
self._update_setup()
|
|
1102
|
-
|
|
1103
|
-
@property
|
|
1104
|
-
def use_si_settings(self):
|
|
1105
|
-
"""Whether to use SI Settings.
|
|
1106
|
-
|
|
1107
|
-
Returns
|
|
1108
|
-
-------
|
|
1109
|
-
bool
|
|
1110
|
-
"""
|
|
1111
|
-
return self.get_sim_setup_info.SimulationSettings.UseSISettings
|
|
1112
|
-
|
|
1113
|
-
@use_si_settings.setter
|
|
1114
|
-
def use_si_settings(self, value):
|
|
1115
|
-
edb_setup_info = self.get_sim_setup_info
|
|
1116
|
-
edb_setup_info.SimulationSettings.UseSISettings = value
|
|
1117
|
-
self._edb_object = self._set_edb_setup_info(edb_setup_info)
|
|
1118
|
-
self._update_setup()
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
class SiwaveDCSimulationSetup(SiwaveSYZSimulationSetup):
|
|
1122
|
-
"""Manages EDB methods for SIwave DC simulation setup.
|
|
1123
|
-
|
|
1124
|
-
Parameters
|
|
1125
|
-
----------
|
|
1126
|
-
pedb : :class:`pyedb.dotnet.edb.Edb`
|
|
1127
|
-
Inherited AEDT object.
|
|
1128
|
-
edb_setup : Ansys.Ansoft.Edb.Utility.SIWDCIRSimulationSettings
|
|
1129
|
-
EDB object. The default is ``None``.
|
|
1130
|
-
"""
|
|
1131
|
-
|
|
1132
|
-
def __init__(self, pedb, edb_object=None):
|
|
1133
|
-
super().__init__(pedb, edb_object)
|
|
1134
|
-
self._setup_type = "kSIwaveDCIR"
|
|
1135
|
-
self._edb = pedb
|
|
1136
|
-
self._mesh_operations = {}
|
|
1137
|
-
|
|
1138
|
-
def create(self, name=None):
|
|
1139
|
-
"""Create a SIwave DCIR setup.
|
|
1140
|
-
|
|
1141
|
-
Returns
|
|
1142
|
-
-------
|
|
1143
|
-
:class:`SiwaveDCSimulationSetup`
|
|
1144
|
-
"""
|
|
1145
|
-
self._name = name
|
|
1146
|
-
self._create(name)
|
|
1147
|
-
self.set_dc_slider(1)
|
|
1148
|
-
return self
|
|
1149
|
-
|
|
1150
|
-
@property
|
|
1151
|
-
def dc_ir_settings(self):
|
|
1152
|
-
"""DC IR settings."""
|
|
1153
|
-
return SiwaveDCIRSettings(self)
|
|
1154
|
-
|
|
1155
|
-
@pyedb_function_handler
|
|
1156
|
-
def get_configurations(self):
|
|
1157
|
-
"""Get SIwave DC simulation settings.
|
|
1158
|
-
|
|
1159
|
-
Returns
|
|
1160
|
-
-------
|
|
1161
|
-
dict
|
|
1162
|
-
Dictionary of SIwave DC simulation settings.
|
|
1163
|
-
"""
|
|
1164
|
-
return {
|
|
1165
|
-
"dc_settings": self.dc_settings.get_configurations(),
|
|
1166
|
-
"dc_advanced_settings": self.dc_advanced_settings.get_configurations(),
|
|
1167
|
-
}
|
|
1168
|
-
|
|
1169
|
-
@pyedb_function_handler
|
|
1170
|
-
def set_dc_slider(self, value):
|
|
1171
|
-
"""Set DC simulation accuracy level.
|
|
1172
|
-
|
|
1173
|
-
Options are:
|
|
1174
|
-
|
|
1175
|
-
- ``0``: Optimal speed
|
|
1176
|
-
- ``1``: Balanced
|
|
1177
|
-
- ``2``: Optimal accuracy
|
|
1178
|
-
"""
|
|
1179
|
-
self.use_custom_settings = False
|
|
1180
|
-
self.dc_settings.dc_slider_position = value
|
|
1181
|
-
self.dc_advanced_settings.set_dc_slider(value)
|
|
1182
|
-
|
|
1183
|
-
@property
|
|
1184
|
-
def dc_settings(self):
|
|
1185
|
-
"""SIwave DC setting."""
|
|
1186
|
-
return DCSettings(self)
|
|
1187
|
-
|
|
1188
|
-
@property
|
|
1189
|
-
def dc_advanced_settings(self):
|
|
1190
|
-
"""Siwave DC advanced settings.
|
|
1191
|
-
|
|
1192
|
-
Returns
|
|
1193
|
-
-------
|
|
1194
|
-
:class:`pyedb.dotnet.edb_core.edb_data.siwave_simulation_setup_data.SiwaveDCAdvancedSettings`
|
|
1195
|
-
"""
|
|
1196
|
-
return DCAdvancedSettings(self)
|
|
1197
|
-
|
|
1198
|
-
@property
|
|
1199
|
-
def source_terms_to_ground(self):
|
|
1200
|
-
"""Dictionary of grounded terminals.
|
|
1201
|
-
|
|
1202
|
-
Returns
|
|
1203
|
-
-------
|
|
1204
|
-
Dictionary
|
|
1205
|
-
{str, int}, keys is source name, value int 0 unspecified, 1 negative node, 2 positive one.
|
|
1206
|
-
|
|
1207
|
-
"""
|
|
1208
|
-
return convert_netdict_to_pydict(self.get_sim_setup_info.SimulationSettings.DCIRSettings.SourceTermsToGround)
|
|
1209
|
-
|
|
1210
|
-
@pyedb_function_handler()
|
|
1211
|
-
def add_source_terminal_to_ground(self, source_name, terminal=0):
|
|
1212
|
-
"""Add a source terminal to ground.
|
|
1213
|
-
|
|
1214
|
-
Parameters
|
|
1215
|
-
----------
|
|
1216
|
-
source_name : str,
|
|
1217
|
-
Source name.
|
|
1218
|
-
terminal : int, optional
|
|
1219
|
-
Terminal to assign. Options are:
|
|
1220
|
-
|
|
1221
|
-
- 0=Unspecified
|
|
1222
|
-
- 1=Negative node
|
|
1223
|
-
- 2=Positive none
|
|
1224
|
-
|
|
1225
|
-
Returns
|
|
1226
|
-
-------
|
|
1227
|
-
bool
|
|
1228
|
-
|
|
1229
|
-
"""
|
|
1230
|
-
terminals = self.source_terms_to_ground
|
|
1231
|
-
terminals[source_name] = terminal
|
|
1232
|
-
self.get_sim_setup_info.SimulationSettings.DCIRSettings.SourceTermsToGround = convert_pydict_to_netdict(
|
|
1233
|
-
terminals
|
|
1234
|
-
)
|
|
1235
|
-
return self._update_setup()
|
pyedb/dotnet/edb_core/siwave.py
CHANGED
|
@@ -42,11 +42,7 @@ from pyedb.dotnet.edb_core.edb_data.sources import (
|
|
|
42
42
|
)
|
|
43
43
|
from pyedb.dotnet.edb_core.general import convert_py_list_to_net_list
|
|
44
44
|
from pyedb.generic.constants import SolverType, SweepType
|
|
45
|
-
from pyedb.generic.general_methods import
|
|
46
|
-
_retry_ntimes,
|
|
47
|
-
generate_unique_name,
|
|
48
|
-
pyedb_function_handler,
|
|
49
|
-
)
|
|
45
|
+
from pyedb.generic.general_methods import _retry_ntimes, generate_unique_name
|
|
50
46
|
from pyedb.modeler.geometry_operators import GeometryOperators
|
|
51
47
|
|
|
52
48
|
|
|
@@ -131,7 +127,6 @@ class EdbSiwave(object):
|
|
|
131
127
|
_pingroups[el.GetName()] = PinGroup(el.GetName(), el, self._pedb)
|
|
132
128
|
return _pingroups
|
|
133
129
|
|
|
134
|
-
@pyedb_function_handler()
|
|
135
130
|
def _create_terminal_on_pins(self, source):
|
|
136
131
|
"""Create a terminal on pins.
|
|
137
132
|
|
|
@@ -233,7 +228,6 @@ class EdbSiwave(object):
|
|
|
233
228
|
pass
|
|
234
229
|
return pos_pingroup_terminal.GetName()
|
|
235
230
|
|
|
236
|
-
@pyedb_function_handler()
|
|
237
231
|
def create_circuit_port_on_pin(self, pos_pin, neg_pin, impedance=50, port_name=None):
|
|
238
232
|
"""Create a circuit port on a pin.
|
|
239
233
|
|
|
@@ -356,7 +350,6 @@ class EdbSiwave(object):
|
|
|
356
350
|
return positive_terminal
|
|
357
351
|
return False
|
|
358
352
|
|
|
359
|
-
@pyedb_function_handler()
|
|
360
353
|
def create_voltage_source_on_pin(self, pos_pin, neg_pin, voltage_value=3.3, phase_value=0, source_name=""):
|
|
361
354
|
"""Create a voltage source.
|
|
362
355
|
|
|
@@ -406,7 +399,6 @@ class EdbSiwave(object):
|
|
|
406
399
|
voltage_source.negative_node.node_pins = pos_pin
|
|
407
400
|
return self._create_terminal_on_pins(voltage_source)
|
|
408
401
|
|
|
409
|
-
@pyedb_function_handler()
|
|
410
402
|
def create_current_source_on_pin(self, pos_pin, neg_pin, current_value=0.1, phase_value=0, source_name=""):
|
|
411
403
|
"""Create a current source.
|
|
412
404
|
|
|
@@ -455,7 +447,6 @@ class EdbSiwave(object):
|
|
|
455
447
|
current_source.negative_node.node_pins = neg_pin
|
|
456
448
|
return self._create_terminal_on_pins(current_source)
|
|
457
449
|
|
|
458
|
-
@pyedb_function_handler()
|
|
459
450
|
def create_resistor_on_pin(self, pos_pin, neg_pin, rvalue=1, resistor_name=""):
|
|
460
451
|
"""Create a Resistor boundary between two given pins..
|
|
461
452
|
|
|
@@ -501,7 +492,6 @@ class EdbSiwave(object):
|
|
|
501
492
|
resistor.negative_node.node_pins = neg_pin
|
|
502
493
|
return self._create_terminal_on_pins(resistor)
|
|
503
494
|
|
|
504
|
-
@pyedb_function_handler()
|
|
505
495
|
def _check_gnd(self, component_name):
|
|
506
496
|
negative_net_name = None
|
|
507
497
|
if self._pedb.nets.is_net_in_component(component_name, "GND"):
|
|
@@ -516,7 +506,6 @@ class EdbSiwave(object):
|
|
|
516
506
|
raise ValueError("No GND, PGND, AGND, DGND found. Please setup the negative net name manually.")
|
|
517
507
|
return negative_net_name
|
|
518
508
|
|
|
519
|
-
@pyedb_function_handler()
|
|
520
509
|
def create_circuit_port_on_net(
|
|
521
510
|
self,
|
|
522
511
|
positive_component_name,
|
|
@@ -584,7 +573,6 @@ class EdbSiwave(object):
|
|
|
584
573
|
circuit_port.negative_node.node_pins = neg_node_pins
|
|
585
574
|
return self.create_pin_group_terminal(circuit_port)
|
|
586
575
|
|
|
587
|
-
@pyedb_function_handler()
|
|
588
576
|
def create_voltage_source_on_net(
|
|
589
577
|
self,
|
|
590
578
|
positive_component_name,
|
|
@@ -655,7 +643,6 @@ class EdbSiwave(object):
|
|
|
655
643
|
voltage_source.negative_node.node_pins = neg_node_pins
|
|
656
644
|
return self.create_pin_group_terminal(voltage_source)
|
|
657
645
|
|
|
658
|
-
@pyedb_function_handler()
|
|
659
646
|
def create_current_source_on_net(
|
|
660
647
|
self,
|
|
661
648
|
positive_component_name,
|
|
@@ -726,7 +713,6 @@ class EdbSiwave(object):
|
|
|
726
713
|
current_source.negative_node.node_pins = neg_node_pins
|
|
727
714
|
return self.create_pin_group_terminal(current_source)
|
|
728
715
|
|
|
729
|
-
@pyedb_function_handler()
|
|
730
716
|
def create_dc_terminal(
|
|
731
717
|
self,
|
|
732
718
|
component_name,
|
|
@@ -773,7 +759,6 @@ class EdbSiwave(object):
|
|
|
773
759
|
dc_source.positive_node.node_pins = pos_node_pins
|
|
774
760
|
return self.create_pin_group_terminal(dc_source)
|
|
775
761
|
|
|
776
|
-
@pyedb_function_handler()
|
|
777
762
|
def create_exec_file(
|
|
778
763
|
self, add_dc=False, add_ac=False, add_syz=False, export_touchstone=False, touchstone_file_path=""
|
|
779
764
|
):
|
|
@@ -819,7 +804,6 @@ class EdbSiwave(object):
|
|
|
819
804
|
|
|
820
805
|
return True if os.path.exists(file_name) else False
|
|
821
806
|
|
|
822
|
-
@pyedb_function_handler()
|
|
823
807
|
def add_siwave_syz_analysis(
|
|
824
808
|
self,
|
|
825
809
|
accuracy_level=1,
|
|
@@ -883,7 +867,6 @@ class EdbSiwave(object):
|
|
|
883
867
|
self.create_exec_file(add_ac=True)
|
|
884
868
|
return setup
|
|
885
869
|
|
|
886
|
-
@pyedb_function_handler()
|
|
887
870
|
def add_siwave_dc_analysis(self, name=None):
|
|
888
871
|
"""Add a Siwave DC analysis in EDB.
|
|
889
872
|
|
|
@@ -915,7 +898,6 @@ class EdbSiwave(object):
|
|
|
915
898
|
self.create_exec_file(add_dc=True)
|
|
916
899
|
return setup
|
|
917
900
|
|
|
918
|
-
@pyedb_function_handler()
|
|
919
901
|
def create_pin_group_terminal(self, source):
|
|
920
902
|
"""Create a pin group terminal.
|
|
921
903
|
|
|
@@ -1014,7 +996,6 @@ class EdbSiwave(object):
|
|
|
1014
996
|
pass
|
|
1015
997
|
return pos_pingroup_terminal.GetName()
|
|
1016
998
|
|
|
1017
|
-
@pyedb_function_handler()
|
|
1018
999
|
def configure_siw_analysis_setup(self, simulation_setup=None, delete_existing_setup=True):
|
|
1019
1000
|
"""Configure Siwave analysis setup.
|
|
1020
1001
|
|
|
@@ -1163,7 +1144,6 @@ class EdbSiwave(object):
|
|
|
1163
1144
|
self._logger.warning("Setup {} has been delete".format(setup.GetName()))
|
|
1164
1145
|
return self._cell.AddSimulationSetup(sim_setup)
|
|
1165
1146
|
|
|
1166
|
-
@pyedb_function_handler()
|
|
1167
1147
|
def _setup_decade_count_sweep(self, sweep, start_freq, stop_freq, decade_count):
|
|
1168
1148
|
import math
|
|
1169
1149
|
|
|
@@ -1182,7 +1162,6 @@ class EdbSiwave(object):
|
|
|
1182
1162
|
freq = freq * math.pow(10, 1.0 / decade_cnt)
|
|
1183
1163
|
sweep.Frequencies.Add(str(freq))
|
|
1184
1164
|
|
|
1185
|
-
@pyedb_function_handler()
|
|
1186
1165
|
def create_rlc_component(
|
|
1187
1166
|
self,
|
|
1188
1167
|
pins,
|
|
@@ -1230,7 +1209,6 @@ class EdbSiwave(object):
|
|
|
1230
1209
|
is_parallel=is_parallel,
|
|
1231
1210
|
) # pragma no cover
|
|
1232
1211
|
|
|
1233
|
-
@pyedb_function_handler()
|
|
1234
1212
|
def create_pin_group(self, reference_designator, pin_numbers, group_name=None):
|
|
1235
1213
|
"""Create pin group on the component.
|
|
1236
1214
|
|
|
@@ -1266,7 +1244,6 @@ class EdbSiwave(object):
|
|
|
1266
1244
|
edb_pingroup.SetNet(names[0].GetNet())
|
|
1267
1245
|
return group_name, self.pin_groups[group_name]
|
|
1268
1246
|
|
|
1269
|
-
@pyedb_function_handler()
|
|
1270
1247
|
def create_pin_group_on_net(self, reference_designator, net_name, group_name=None):
|
|
1271
1248
|
"""Create pin group on component by net name.
|
|
1272
1249
|
|
|
@@ -1287,7 +1264,6 @@ class EdbSiwave(object):
|
|
|
1287
1264
|
pin_names = [p.GetName() for p in pins]
|
|
1288
1265
|
return self.create_pin_group(reference_designator, pin_names, group_name)
|
|
1289
1266
|
|
|
1290
|
-
@pyedb_function_handler()
|
|
1291
1267
|
def create_current_source_on_pin_group(
|
|
1292
1268
|
self, pos_pin_group_name, neg_pin_group_name, magnitude=1, phase=0, name=None
|
|
1293
1269
|
):
|
|
@@ -1322,7 +1298,6 @@ class EdbSiwave(object):
|
|
|
1322
1298
|
pos_terminal.SetReferenceTerminal(neg_terminal)
|
|
1323
1299
|
return True
|
|
1324
1300
|
|
|
1325
|
-
@pyedb_function_handler()
|
|
1326
1301
|
def create_voltage_source_on_pin_group(
|
|
1327
1302
|
self, pos_pin_group_name, neg_pin_group_name, magnitude=1, phase=0, name=None, impedance=0.001
|
|
1328
1303
|
):
|
|
@@ -1357,7 +1332,6 @@ class EdbSiwave(object):
|
|
|
1357
1332
|
pos_terminal.SetReferenceTerminal(neg_terminal)
|
|
1358
1333
|
return True
|
|
1359
1334
|
|
|
1360
|
-
@pyedb_function_handler()
|
|
1361
1335
|
def create_voltage_probe_on_pin_group(self, probe_name, pos_pin_group_name, neg_pin_group_name, impedance=1000000):
|
|
1362
1336
|
"""Create voltage probe between two pin groups.
|
|
1363
1337
|
|
|
@@ -1384,13 +1358,12 @@ class EdbSiwave(object):
|
|
|
1384
1358
|
else:
|
|
1385
1359
|
probe_name = generate_unique_name("vprobe")
|
|
1386
1360
|
pos_terminal.SetName(probe_name)
|
|
1387
|
-
|
|
1388
|
-
neg_terminal =
|
|
1361
|
+
neg_pin_group = self.pin_groups[neg_pin_group_name]
|
|
1362
|
+
neg_terminal = neg_pin_group.create_voltage_probe_terminal()
|
|
1389
1363
|
neg_terminal.SetName(probe_name + "_ref")
|
|
1390
1364
|
pos_terminal.SetReferenceTerminal(neg_terminal)
|
|
1391
1365
|
return not pos_terminal.IsNull()
|
|
1392
1366
|
|
|
1393
|
-
@pyedb_function_handler()
|
|
1394
1367
|
def create_circuit_port_on_pin_group(self, pos_pin_group_name, neg_pin_group_name, impedance=50, name=None):
|
|
1395
1368
|
"""Create a port between two pin groups.
|
|
1396
1369
|
|
|
@@ -1417,13 +1390,12 @@ class EdbSiwave(object):
|
|
|
1417
1390
|
else:
|
|
1418
1391
|
name = generate_unique_name("port")
|
|
1419
1392
|
pos_terminal.SetName(name)
|
|
1420
|
-
|
|
1421
|
-
neg_terminal =
|
|
1393
|
+
neg_pin_group = self.pin_groups[neg_pin_group_name]
|
|
1394
|
+
neg_terminal = neg_pin_group.create_port_terminal(impedance)
|
|
1422
1395
|
neg_terminal.SetName(name + "_ref")
|
|
1423
1396
|
pos_terminal.SetReferenceTerminal(neg_terminal)
|
|
1424
1397
|
return True
|
|
1425
1398
|
|
|
1426
|
-
@pyedb_function_handler
|
|
1427
1399
|
def place_voltage_probe(
|
|
1428
1400
|
self,
|
|
1429
1401
|
name,
|