pyedb 0.18.0__py3-none-any.whl → 0.20.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_data.py +8 -11
- pyedb/configuration/cfg_nets.py +14 -0
- pyedb/configuration/cfg_pin_groups.py +57 -20
- pyedb/configuration/cfg_ports_sources.py +248 -60
- pyedb/configuration/configuration.py +51 -17
- pyedb/dotnet/edb.py +156 -236
- pyedb/dotnet/edb_core/cell/connectable.py +64 -0
- pyedb/dotnet/edb_core/cell/hierarchy/component.py +12 -10
- pyedb/dotnet/edb_core/cell/hierarchy/hierarchy_obj.py +1 -1
- pyedb/dotnet/edb_core/cell/layout.py +271 -76
- pyedb/dotnet/edb_core/cell/layout_obj.py +4 -49
- pyedb/dotnet/edb_core/cell/primitive.py +14 -2
- pyedb/dotnet/edb_core/cell/terminal/padstack_instance_terminal.py +10 -0
- pyedb/dotnet/edb_core/cell/terminal/pingroup_terminal.py +5 -0
- pyedb/dotnet/edb_core/cell/terminal/point_terminal.py +1 -12
- pyedb/dotnet/edb_core/cell/terminal/terminal.py +36 -20
- pyedb/dotnet/edb_core/cell/voltage_regulator.py +2 -16
- pyedb/dotnet/edb_core/components.py +88 -31
- pyedb/dotnet/edb_core/dotnet/database.py +5 -10
- pyedb/dotnet/edb_core/dotnet/primitive.py +20 -7
- pyedb/dotnet/edb_core/edb_data/control_file.py +2 -12
- pyedb/dotnet/edb_core/edb_data/padstacks_data.py +28 -37
- pyedb/dotnet/edb_core/edb_data/ports.py +0 -18
- pyedb/dotnet/edb_core/edb_data/primitives_data.py +1 -1
- pyedb/dotnet/edb_core/general.py +6 -9
- pyedb/dotnet/edb_core/hfss.py +4 -8
- pyedb/dotnet/edb_core/layout_obj_instance.py +30 -0
- pyedb/dotnet/edb_core/materials.py +4 -11
- pyedb/dotnet/edb_core/{layout.py → modeler.py} +153 -7
- pyedb/dotnet/edb_core/net_class.py +7 -8
- pyedb/dotnet/edb_core/nets.py +3 -9
- pyedb/dotnet/edb_core/padstack.py +23 -10
- pyedb/dotnet/edb_core/sim_setup_data/data/sim_setup_info.py +42 -3
- pyedb/dotnet/edb_core/sim_setup_data/data/simulation_settings.py +92 -158
- pyedb/dotnet/edb_core/sim_setup_data/data/siw_dc_ir_settings.py +22 -22
- pyedb/dotnet/edb_core/sim_setup_data/data/sweep_data.py +5 -2
- pyedb/dotnet/edb_core/sim_setup_data/io/siwave.py +76 -76
- pyedb/dotnet/edb_core/siwave.py +5 -6
- pyedb/dotnet/edb_core/stackup.py +18 -23
- pyedb/dotnet/edb_core/utilities/hfss_simulation_setup.py +23 -94
- pyedb/dotnet/edb_core/utilities/simulation_setup.py +40 -41
- pyedb/dotnet/edb_core/utilities/siwave_simulation_setup.py +26 -17
- pyedb/generic/filesystem.py +2 -8
- pyedb/generic/general_methods.py +4 -10
- pyedb/generic/plot.py +26 -29
- pyedb/generic/process.py +2 -6
- pyedb/misc/downloads.py +3 -40
- pyedb/siwave.py +2 -5
- {pyedb-0.18.0.dist-info → pyedb-0.20.0.dist-info}/METADATA +8 -8
- {pyedb-0.18.0.dist-info → pyedb-0.20.0.dist-info}/RECORD +53 -52
- pyedb/dotnet/edb_core/dotnet/layout.py +0 -260
- {pyedb-0.18.0.dist-info → pyedb-0.20.0.dist-info}/LICENSE +0 -0
- {pyedb-0.18.0.dist-info → pyedb-0.20.0.dist-info}/WHEEL +0 -0
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
import re
|
|
24
24
|
|
|
25
|
-
from pyedb.dotnet.edb_core.cell.
|
|
25
|
+
from pyedb.dotnet.edb_core.cell.connectable import Connectable
|
|
26
26
|
from pyedb.dotnet.edb_core.edb_data.padstacks_data import EDBPadstackInstance
|
|
27
27
|
from pyedb.dotnet.edb_core.edb_data.primitives_data import cast
|
|
28
28
|
|
|
@@ -159,24 +159,6 @@ class Terminal(Connectable):
|
|
|
159
159
|
ppp.DoRenormalize = value
|
|
160
160
|
self._port_post_processing_prop = ppp
|
|
161
161
|
|
|
162
|
-
@property
|
|
163
|
-
def name(self):
|
|
164
|
-
"""Port Name.
|
|
165
|
-
|
|
166
|
-
Returns
|
|
167
|
-
-------
|
|
168
|
-
str
|
|
169
|
-
"""
|
|
170
|
-
return self._edb_object.GetName()
|
|
171
|
-
|
|
172
|
-
@name.setter
|
|
173
|
-
def name(self, value):
|
|
174
|
-
if isinstance(value, str):
|
|
175
|
-
if not any(port for port in list(self._pedb.excitations.keys()) if port == value):
|
|
176
|
-
self._edb_object.SetName(value)
|
|
177
|
-
else:
|
|
178
|
-
self._pedb.logger.warning("An existing port already has this same name. A port name must be unique.")
|
|
179
|
-
|
|
180
162
|
@property
|
|
181
163
|
def net_name(self):
|
|
182
164
|
"""Net name.
|
|
@@ -217,6 +199,21 @@ class Terminal(Connectable):
|
|
|
217
199
|
def boundary_type(self, value):
|
|
218
200
|
self._edb_object.SetBoundaryType(self._boundary_type_mapping[value])
|
|
219
201
|
|
|
202
|
+
@property
|
|
203
|
+
def is_port(self):
|
|
204
|
+
"""Whether it is a port."""
|
|
205
|
+
return True if self.boundary_type == "PortBoundary" else False
|
|
206
|
+
|
|
207
|
+
@property
|
|
208
|
+
def is_current_source(self):
|
|
209
|
+
"""Whether it is a current source."""
|
|
210
|
+
return True if self.boundary_type == "kCurrentSource" else False
|
|
211
|
+
|
|
212
|
+
@property
|
|
213
|
+
def is_voltage_source(self):
|
|
214
|
+
"""Whether it is a voltage source."""
|
|
215
|
+
return True if self.boundary_type == "kVoltageSource" else False
|
|
216
|
+
|
|
220
217
|
@property
|
|
221
218
|
def impedance(self):
|
|
222
219
|
"""Impedance of the port."""
|
|
@@ -235,7 +232,8 @@ class Terminal(Connectable):
|
|
|
235
232
|
def ref_terminal(self):
|
|
236
233
|
"""Get reference terminal."""
|
|
237
234
|
|
|
238
|
-
|
|
235
|
+
edb_terminal = self._edb_object.GetReferenceTerminal()
|
|
236
|
+
terminal = self._pedb.terminals[edb_terminal.GetName()]
|
|
239
237
|
if not terminal.is_null:
|
|
240
238
|
return terminal
|
|
241
239
|
|
|
@@ -444,3 +442,21 @@ class Terminal(Connectable):
|
|
|
444
442
|
pin_obj = pin
|
|
445
443
|
if pin_obj:
|
|
446
444
|
return EDBPadstackInstance(pin_obj, self._pedb)
|
|
445
|
+
|
|
446
|
+
@property
|
|
447
|
+
def magnitude(self):
|
|
448
|
+
"""Get the magnitude of the source."""
|
|
449
|
+
return self._edb_object.GetSourceAmplitude().ToDouble()
|
|
450
|
+
|
|
451
|
+
@magnitude.setter
|
|
452
|
+
def magnitude(self, value):
|
|
453
|
+
self._edb_object.SetSourceAmplitude(self._edb.utility.value(value))
|
|
454
|
+
|
|
455
|
+
@property
|
|
456
|
+
def phase(self):
|
|
457
|
+
"""Get the phase of the source."""
|
|
458
|
+
return self._edb_object.GetSourcePhase().ToDouble()
|
|
459
|
+
|
|
460
|
+
@phase.setter
|
|
461
|
+
def phase(self, value):
|
|
462
|
+
self._edb_object.SetSourcePhase(self._edb.utility.value(value))
|
|
@@ -20,7 +20,7 @@
|
|
|
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 pyedb.dotnet.edb_core.cell.
|
|
23
|
+
from pyedb.dotnet.edb_core.cell.connectable import Connectable
|
|
24
24
|
from pyedb.dotnet.edb_core.edb_data.padstacks_data import EDBPadstackInstance
|
|
25
25
|
|
|
26
26
|
|
|
@@ -49,7 +49,7 @@ class VoltageRegulator(Connectable):
|
|
|
49
49
|
if value not in self._pedb.components.instances:
|
|
50
50
|
self._pedb.logger.error(f"component {value} not found in layout")
|
|
51
51
|
return
|
|
52
|
-
self._edb_object.SetGroup(self._pedb.components.instances[value].
|
|
52
|
+
self._edb_object.SetGroup(self._pedb.components.instances[value]._edb_object)
|
|
53
53
|
|
|
54
54
|
@property
|
|
55
55
|
def load_regulator_current(self):
|
|
@@ -71,16 +71,6 @@ class VoltageRegulator(Connectable):
|
|
|
71
71
|
_value = self._edb_object.edb_value(value)
|
|
72
72
|
self._edb_object.SetLoadRegulationPercent(_value)
|
|
73
73
|
|
|
74
|
-
@property
|
|
75
|
-
def name(self):
|
|
76
|
-
"""Retrieve voltage regulator name."""
|
|
77
|
-
return self._edb_object.GetName()
|
|
78
|
-
|
|
79
|
-
@name.setter
|
|
80
|
-
def name(self, value):
|
|
81
|
-
if isinstance(value, str):
|
|
82
|
-
self._edb_object.SetName(value)
|
|
83
|
-
|
|
84
74
|
@property
|
|
85
75
|
def negative_remote_sense_pin(self):
|
|
86
76
|
"""Retrieve negative remote sense pin."""
|
|
@@ -137,7 +127,3 @@ class VoltageRegulator(Connectable):
|
|
|
137
127
|
def is_active(self, value):
|
|
138
128
|
if isinstance(value, bool):
|
|
139
129
|
self._edb_object.SetIsActive(value)
|
|
140
|
-
|
|
141
|
-
@property
|
|
142
|
-
def is_null(self):
|
|
143
|
-
return self._edb_object.IsNull()
|
|
@@ -305,11 +305,10 @@ class Components(object):
|
|
|
305
305
|
def refresh_components(self):
|
|
306
306
|
"""Refresh the component dictionary."""
|
|
307
307
|
# self._logger.info("Refreshing the Components dictionary.")
|
|
308
|
-
self._cmp = {
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}
|
|
308
|
+
self._cmp = {}
|
|
309
|
+
for i in self._pedb.layout.groups:
|
|
310
|
+
if i.group_type == "component":
|
|
311
|
+
self._cmp[i.name] = i
|
|
313
312
|
return True
|
|
314
313
|
|
|
315
314
|
@property
|
|
@@ -487,11 +486,7 @@ class Components(object):
|
|
|
487
486
|
``True`` when successful, ``False`` when failed.
|
|
488
487
|
|
|
489
488
|
"""
|
|
490
|
-
|
|
491
|
-
if edbcmp is not None:
|
|
492
|
-
return edbcmp
|
|
493
|
-
else:
|
|
494
|
-
pass
|
|
489
|
+
return self._pedb.layout.find_component_by_name(name)
|
|
495
490
|
|
|
496
491
|
def get_components_from_nets(self, netlist=None):
|
|
497
492
|
"""Retrieve components from a net list.
|
|
@@ -675,9 +670,11 @@ class Components(object):
|
|
|
675
670
|
positive_pin_group = self.create_pingroup_from_pins(positive_pins)
|
|
676
671
|
if not positive_pin_group: # pragma: no cover
|
|
677
672
|
return False
|
|
673
|
+
positive_pin_group = self._pedb.siwave.pin_groups[positive_pin_group.GetName()]
|
|
678
674
|
negative_pin_group = self.create_pingroup_from_pins(negative_pins)
|
|
679
675
|
if not negative_pin_group: # pragma: no cover
|
|
680
676
|
return False
|
|
677
|
+
negative_pin_group = self._pedb.siwave.pin_groups[negative_pin_group.GetName()]
|
|
681
678
|
if source.source_type == SourceType.Vsource: # pragma: no cover
|
|
682
679
|
positive_pin_group_term = self._create_pin_group_terminal(
|
|
683
680
|
positive_pin_group,
|
|
@@ -766,20 +763,44 @@ class Components(object):
|
|
|
766
763
|
>>> edb.close_edb()
|
|
767
764
|
"""
|
|
768
765
|
|
|
769
|
-
if isinstance(pins, str)
|
|
766
|
+
if isinstance(pins, str):
|
|
770
767
|
pins = [pins]
|
|
768
|
+
elif isinstance(pins, EDBPadstackInstance):
|
|
769
|
+
pins = [pins.name]
|
|
771
770
|
if isinstance(reference_pins, str):
|
|
772
771
|
reference_pins = [reference_pins]
|
|
773
|
-
if isinstance(
|
|
772
|
+
if isinstance(reference_pins, list):
|
|
773
|
+
_temp = []
|
|
774
|
+
for ref_pin in reference_pins:
|
|
775
|
+
if isinstance(ref_pin, int):
|
|
776
|
+
if ref_pin in self._padstack.instances:
|
|
777
|
+
_temp.append(self._padstack.instances[ref_pin])
|
|
778
|
+
elif isinstance(ref_pin, str):
|
|
779
|
+
if ref_pin in self.instances[refdes].pins:
|
|
780
|
+
_temp.append(self.instances[refdes].pins[ref_pin])
|
|
781
|
+
else:
|
|
782
|
+
p = [pp for pp in list(self._padstack.instances.values()) if pp.name == ref_pin]
|
|
783
|
+
if p:
|
|
784
|
+
_temp.append(p)
|
|
785
|
+
elif isinstance(ref_pin, EDBPadstackInstance):
|
|
786
|
+
_temp.append(ref_pin.name)
|
|
787
|
+
reference_pins = _temp
|
|
788
|
+
elif isinstance(reference_pins, int):
|
|
789
|
+
if reference_pins in self._padstack.instances:
|
|
790
|
+
reference_pins = self._padstack.instances[reference_pins]
|
|
791
|
+
if isinstance(refdes, str):
|
|
774
792
|
refdes = self.instances[refdes]
|
|
793
|
+
elif isinstance(refdes, self._pedb._edb.Cell.Hierarchy.Component):
|
|
794
|
+
refdes = EDBComponent(self._pedb, refdes)
|
|
795
|
+
refdes_pins = refdes.pins
|
|
775
796
|
if any(refdes.rlc_values):
|
|
776
797
|
return self.deactivate_rlc_component(component=refdes, create_circuit_port=True)
|
|
777
798
|
if len([pin for pin in pins if isinstance(pin, str)]) == len(pins):
|
|
778
799
|
cmp_pins = []
|
|
779
800
|
for pin_name in pins:
|
|
780
|
-
cmp_pin = [pin for pin in list(
|
|
801
|
+
cmp_pin = [pin for pin in list(refdes_pins.values()) if pin_name == pin.name]
|
|
781
802
|
if not cmp_pin:
|
|
782
|
-
cmp_pin = [pin for pin in list(
|
|
803
|
+
cmp_pin = [pin for pin in list(refdes_pins.values()) if pin_name == pin.name.split("-")[1]]
|
|
783
804
|
if cmp_pin:
|
|
784
805
|
cmp_pins.append(cmp_pin[0])
|
|
785
806
|
if not cmp_pins:
|
|
@@ -793,15 +814,15 @@ class Components(object):
|
|
|
793
814
|
if len([pin for pin in reference_pins if isinstance(pin, str)]) == len(reference_pins):
|
|
794
815
|
ref_cmp_pins = []
|
|
795
816
|
for ref_pin_name in reference_pins:
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
ref_cmp_pins.append(cmp_ref_pin[0])
|
|
817
|
+
if ref_pin_name in refdes_pins:
|
|
818
|
+
ref_cmp_pins.append(refdes_pins[ref_pin_name])
|
|
819
|
+
elif "-" in ref_pin_name and ref_pin_name.split("-")[1] in refdes_pins:
|
|
820
|
+
ref_cmp_pins.append(refdes_pins[ref_pin_name.split("-")[1]])
|
|
801
821
|
if not ref_cmp_pins:
|
|
802
822
|
return
|
|
803
823
|
reference_pins = ref_cmp_pins
|
|
804
|
-
if not
|
|
824
|
+
if not reference_pins:
|
|
825
|
+
self._logger.error("No reference pins found.")
|
|
805
826
|
return
|
|
806
827
|
if len(pins) > 1:
|
|
807
828
|
pec_boundary = False
|
|
@@ -824,7 +845,9 @@ class Components(object):
|
|
|
824
845
|
)
|
|
825
846
|
ref_group_name = "group_{}_ref".format(port_name)
|
|
826
847
|
ref_pin_group = self.create_pingroup_from_pins(reference_pins, ref_group_name)
|
|
848
|
+
ref_pin_group = self._pedb.siwave.pin_groups[ref_pin_group.GetName()]
|
|
827
849
|
ref_term = self._create_pin_group_terminal(pingroup=ref_pin_group, term_name=port_name + "_ref")
|
|
850
|
+
|
|
828
851
|
else:
|
|
829
852
|
ref_term = self._create_terminal(reference_pins[0].primitive_object, term_name=port_name + "_ref")
|
|
830
853
|
ref_term.SetIsCircuitPort(True)
|
|
@@ -883,7 +906,7 @@ class Components(object):
|
|
|
883
906
|
solder_balls_size : float, optional
|
|
884
907
|
Solder balls diameter. When provided auto evaluation based on padstack size will be disabled.
|
|
885
908
|
solder_balls_mid_size : float, optional
|
|
886
|
-
Solder balls mid
|
|
909
|
+
Solder balls mid-diameter. When provided if value is different than solder balls size, spheroid shape will
|
|
887
910
|
be switched.
|
|
888
911
|
|
|
889
912
|
Returns
|
|
@@ -904,11 +927,11 @@ class Components(object):
|
|
|
904
927
|
if isinstance(component, str):
|
|
905
928
|
component = self.instances[component].edbcomponent
|
|
906
929
|
if not solder_balls_height:
|
|
907
|
-
solder_balls_height = self.
|
|
930
|
+
solder_balls_height = self.instances[component.GetName()].solder_ball_height
|
|
908
931
|
if not solder_balls_size:
|
|
909
|
-
solder_balls_size = self.
|
|
932
|
+
solder_balls_size = self.instances[component.GetName()].solder_ball_diameter[0]
|
|
910
933
|
if not solder_balls_mid_size:
|
|
911
|
-
solder_balls_mid_size = self.
|
|
934
|
+
solder_balls_mid_size = self.instances[component.GetName()].solder_ball_diameter[1]
|
|
912
935
|
if not isinstance(net_list, list):
|
|
913
936
|
net_list = [net_list]
|
|
914
937
|
for net in net_list:
|
|
@@ -934,6 +957,18 @@ class Components(object):
|
|
|
934
957
|
return False
|
|
935
958
|
pin_layers = cmp_pins[0].GetPadstackDef().GetData().GetLayerNames()
|
|
936
959
|
if port_type == SourceType.CoaxPort:
|
|
960
|
+
ref_pins = [
|
|
961
|
+
p
|
|
962
|
+
for p in list(component.LayoutObjs)
|
|
963
|
+
if int(p.GetObjType()) == 1 and p.GetNet().GetName() in reference_net
|
|
964
|
+
]
|
|
965
|
+
if not ref_pins:
|
|
966
|
+
self._logger.error(
|
|
967
|
+
"No reference pins found on component. You might consider"
|
|
968
|
+
"using Circuit port instead since reference pins can be extended"
|
|
969
|
+
"outside the component automatically when not found."
|
|
970
|
+
)
|
|
971
|
+
return False
|
|
937
972
|
pad_params = self._padstack.get_pad_parameters(pin=cmp_pins[0], layername=pin_layers[0], pad_type=0)
|
|
938
973
|
if not pad_params[0] == 7:
|
|
939
974
|
if not solder_balls_size: # pragma no cover
|
|
@@ -981,17 +1016,26 @@ class Components(object):
|
|
|
981
1016
|
for p in ref_pins:
|
|
982
1017
|
if not p.IsLayoutPin():
|
|
983
1018
|
p.SetIsLayoutPin(True)
|
|
984
|
-
if
|
|
985
|
-
self._logger.
|
|
1019
|
+
if not ref_pins:
|
|
1020
|
+
self._logger.warning("No reference pins found on component, the closest pin will be selected.")
|
|
1021
|
+
do_pingroup = False
|
|
986
1022
|
if do_pingroup:
|
|
987
1023
|
if len(ref_pins) == 1:
|
|
1024
|
+
ref_pins.is_pin = True
|
|
988
1025
|
ref_pin_group_term = self._create_terminal(ref_pins[0])
|
|
989
1026
|
else:
|
|
1027
|
+
for pin in ref_pins:
|
|
1028
|
+
pin.is_pin = True
|
|
990
1029
|
ref_pin_group = self.create_pingroup_from_pins(ref_pins)
|
|
991
1030
|
if not ref_pin_group:
|
|
1031
|
+
self._logger.error(f"Failed to create reference pin group on component {component.GetName()}.")
|
|
992
1032
|
return False
|
|
993
|
-
|
|
1033
|
+
ref_pin_group = self._pedb.siwave.pin_groups[ref_pin_group.GetName()]
|
|
1034
|
+
ref_pin_group_term = self._create_pin_group_terminal(ref_pin_group, isref=False)
|
|
994
1035
|
if not ref_pin_group_term:
|
|
1036
|
+
self._logger.error(
|
|
1037
|
+
f"Failed to create reference pin group terminal on component {component.GetName()}"
|
|
1038
|
+
)
|
|
995
1039
|
return False
|
|
996
1040
|
for net in net_list:
|
|
997
1041
|
pins = [pin for pin in cmp_pins if pin.GetNet().GetName() == net]
|
|
@@ -1004,6 +1048,7 @@ class Components(object):
|
|
|
1004
1048
|
pin_group = self.create_pingroup_from_pins(pins)
|
|
1005
1049
|
if not pin_group:
|
|
1006
1050
|
return False
|
|
1051
|
+
pin_group = self._pedb.siwave.pin_groups[pin_group.GetName()]
|
|
1007
1052
|
pin_group_term = self._create_pin_group_terminal(pin_group)
|
|
1008
1053
|
if pin_group_term:
|
|
1009
1054
|
pin_group_term.SetReferenceTerminal(ref_pin_group_term)
|
|
@@ -1013,7 +1058,19 @@ class Components(object):
|
|
|
1013
1058
|
for net in net_list:
|
|
1014
1059
|
pins = [pin for pin in cmp_pins if pin.GetNet().GetName() == net]
|
|
1015
1060
|
for pin in pins:
|
|
1016
|
-
|
|
1061
|
+
if ref_pins:
|
|
1062
|
+
self.create_port_on_pins(component, pin, ref_pins)
|
|
1063
|
+
else:
|
|
1064
|
+
_pin = EDBPadstackInstance(pin, self._pedb)
|
|
1065
|
+
ref_pin = _pin.get_reference_pins(
|
|
1066
|
+
reference_net=reference_net[0], max_limit=1, component_only=False, search_radius=3e-3
|
|
1067
|
+
)
|
|
1068
|
+
if ref_pin:
|
|
1069
|
+
self.create_port_on_pins(
|
|
1070
|
+
component,
|
|
1071
|
+
[EDBPadstackInstance(pin, self._pedb).name],
|
|
1072
|
+
[EDBPadstackInstance(ref_pin[0], self._pedb).id],
|
|
1073
|
+
)
|
|
1017
1074
|
return True
|
|
1018
1075
|
|
|
1019
1076
|
def _create_terminal(self, pin, term_name=None):
|
|
@@ -1334,14 +1391,14 @@ class Components(object):
|
|
|
1334
1391
|
-------
|
|
1335
1392
|
Edb pin group terminal.
|
|
1336
1393
|
"""
|
|
1337
|
-
pin = list(pingroup.GetPins())[0]
|
|
1394
|
+
pin = list(pingroup._edb_object.GetPins())[0]
|
|
1338
1395
|
if term_name is None:
|
|
1339
1396
|
term_name = "{}.{}.{}".format(pin.GetComponent().GetName(), pin.GetName(), pin.GetNet().GetName())
|
|
1340
1397
|
for t in list(self._pedb.active_layout.Terminals):
|
|
1341
1398
|
if t.GetName() == term_name:
|
|
1342
1399
|
return t
|
|
1343
1400
|
pingroup_term = self._edb.cell.terminal.PinGroupTerminal.Create(
|
|
1344
|
-
self._active_layout, pingroup.GetNet(), term_name, pingroup, isref
|
|
1401
|
+
self._active_layout, pingroup._edb_object.GetNet(), term_name, pingroup._edb_object, isref
|
|
1345
1402
|
)
|
|
1346
1403
|
if term_type == "circuit":
|
|
1347
1404
|
pingroup_term.SetIsCircuitPort(True)
|
|
@@ -1929,7 +1986,7 @@ class Components(object):
|
|
|
1929
1986
|
|
|
1930
1987
|
"""
|
|
1931
1988
|
if not isinstance(component, self._pedb.edb_api.cell.hierarchy.component):
|
|
1932
|
-
edb_cmp = self.get_component_by_name(component)
|
|
1989
|
+
edb_cmp = self.get_component_by_name(component)._edb_object
|
|
1933
1990
|
cmp = self.instances[component]
|
|
1934
1991
|
else: # pragma: no cover
|
|
1935
1992
|
edb_cmp = component
|
|
@@ -32,7 +32,6 @@ from pyedb.generic.general_methods import (
|
|
|
32
32
|
env_path,
|
|
33
33
|
env_path_student,
|
|
34
34
|
env_value,
|
|
35
|
-
is_ironpython,
|
|
36
35
|
is_linux,
|
|
37
36
|
settings,
|
|
38
37
|
)
|
|
@@ -751,14 +750,10 @@ class EdbDotNet(object):
|
|
|
751
750
|
self.base_path = edb_path
|
|
752
751
|
sys.path.append(edb_path)
|
|
753
752
|
os.environ[env_value(self.edbversion)] = self.base_path
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
else:
|
|
759
|
-
_clr.AddReference("Ansys.Ansoft.Edb")
|
|
760
|
-
_clr.AddReference("Ansys.Ansoft.EdbBuilderUtils")
|
|
761
|
-
_clr.AddReference("Ansys.Ansoft.SimSetupData")
|
|
753
|
+
|
|
754
|
+
_clr.AddReference("Ansys.Ansoft.Edb")
|
|
755
|
+
_clr.AddReference("Ansys.Ansoft.EdbBuilderUtils")
|
|
756
|
+
_clr.AddReference("Ansys.Ansoft.SimSetupData")
|
|
762
757
|
else:
|
|
763
758
|
if settings.edb_dll_path:
|
|
764
759
|
self.base_path = settings.edb_dll_path
|
|
@@ -1234,7 +1229,7 @@ class Database(EdbDotNet):
|
|
|
1234
1229
|
-------
|
|
1235
1230
|
|
|
1236
1231
|
"""
|
|
1237
|
-
from pyedb.
|
|
1232
|
+
from pyedb.dotnet.clr_module import Convert
|
|
1238
1233
|
|
|
1239
1234
|
hdl = Convert.ToUInt64(hdb)
|
|
1240
1235
|
self._db = self.edb_api.database.Attach(hdl)
|
|
@@ -96,7 +96,17 @@ class PrimitiveDotNet:
|
|
|
96
96
|
_, name = self.prim_obj.GetProductProperty(self._app._edb.ProductId.Designer, 1, val)
|
|
97
97
|
name = str(name).strip("'")
|
|
98
98
|
if name == "":
|
|
99
|
-
|
|
99
|
+
if str(self.primitive_type) == "Path":
|
|
100
|
+
ptype = "line"
|
|
101
|
+
elif str(self.primitive_type) == "Rectangle":
|
|
102
|
+
ptype = "rect"
|
|
103
|
+
elif str(self.primitive_type) == "Polygon":
|
|
104
|
+
ptype = "poly"
|
|
105
|
+
elif str(self.primitive_type) == "Bondwire":
|
|
106
|
+
ptype = "bwr"
|
|
107
|
+
else:
|
|
108
|
+
ptype = str(self.primitive_type).lower()
|
|
109
|
+
name = "{}_{}".format(ptype, self.id)
|
|
100
110
|
self.prim_obj.SetProductProperty(self._app._edb.ProductId.Designer, 1, name)
|
|
101
111
|
return name
|
|
102
112
|
|
|
@@ -837,9 +847,8 @@ class PathDotNet(PrimitiveDotNet):
|
|
|
837
847
|
net = net.api_object
|
|
838
848
|
width = self._app.edb_api.utility.value(width)
|
|
839
849
|
if isinstance(points, list):
|
|
840
|
-
points = self._app.
|
|
841
|
-
|
|
842
|
-
)
|
|
850
|
+
points = convert_py_list_to_net_list([self._app.point_data(i[0], i[1]) for i in points])
|
|
851
|
+
points = self._app.edb_api.geometry.polygon_data.dotnetobj(points)
|
|
843
852
|
return PathDotNet(
|
|
844
853
|
self._app, self.api.Path.Create(layout, layer, net, width, end_cap1, end_cap2, corner_style, points)
|
|
845
854
|
)
|
|
@@ -847,11 +856,15 @@ class PathDotNet(PrimitiveDotNet):
|
|
|
847
856
|
@property
|
|
848
857
|
def center_line(self):
|
|
849
858
|
""":class:`PolygonData <ansys.edb.geometry.PolygonData>`: Center line for this Path."""
|
|
850
|
-
|
|
859
|
+
edb_center_line = self.prim_obj.GetCenterLine()
|
|
860
|
+
return [[pt.X.ToDouble(), pt.Y.ToDouble()] for pt in list(edb_center_line.Points)]
|
|
851
861
|
|
|
852
862
|
@center_line.setter
|
|
853
|
-
def center_line(self,
|
|
854
|
-
|
|
863
|
+
def center_line(self, value):
|
|
864
|
+
if isinstance(value, list):
|
|
865
|
+
points = [self._pedb.point_data(i[0], i[1]) for i in value]
|
|
866
|
+
polygon_data = self._edb.geometry.polygon_data.dotnetobj(convert_py_list_to_net_list(points), False)
|
|
867
|
+
self.prim_obj.SetCenterLine(polygon_data)
|
|
855
868
|
|
|
856
869
|
@property
|
|
857
870
|
def end_cap_style(self):
|
|
@@ -23,24 +23,14 @@
|
|
|
23
23
|
import copy
|
|
24
24
|
import os
|
|
25
25
|
import re
|
|
26
|
+
import subprocess
|
|
26
27
|
import sys
|
|
27
28
|
|
|
28
29
|
from pyedb.edb_logger import pyedb_logger
|
|
29
|
-
from pyedb.generic.general_methods import
|
|
30
|
-
ET,
|
|
31
|
-
env_path,
|
|
32
|
-
env_value,
|
|
33
|
-
is_ironpython,
|
|
34
|
-
is_linux,
|
|
35
|
-
)
|
|
30
|
+
from pyedb.generic.general_methods import ET, env_path, env_value, is_linux
|
|
36
31
|
from pyedb.misc.aedtlib_personalib_install import write_pretty_xml
|
|
37
32
|
from pyedb.misc.misc import list_installed_ansysem
|
|
38
33
|
|
|
39
|
-
if is_linux and is_ironpython:
|
|
40
|
-
import subprocessdotnet as subprocess
|
|
41
|
-
else:
|
|
42
|
-
import subprocess
|
|
43
|
-
|
|
44
34
|
|
|
45
35
|
def convert_technology_file(tech_file, edbversion=None, control_file=None):
|
|
46
36
|
"""Convert a technology file to edb control file (xml).
|
|
@@ -25,12 +25,12 @@ import math
|
|
|
25
25
|
import re
|
|
26
26
|
import warnings
|
|
27
27
|
|
|
28
|
-
from pyedb.dotnet.clr_module import String
|
|
28
|
+
from pyedb.dotnet.clr_module import String
|
|
29
29
|
from pyedb.dotnet.edb_core.cell.primitive import Primitive
|
|
30
30
|
from pyedb.dotnet.edb_core.dotnet.database import PolygonDataDotNet
|
|
31
31
|
from pyedb.dotnet.edb_core.edb_data.edbvalue import EdbValue
|
|
32
32
|
from pyedb.dotnet.edb_core.general import PadGeometryTpe, convert_py_list_to_net_list
|
|
33
|
-
from pyedb.generic.general_methods import generate_unique_name
|
|
33
|
+
from pyedb.generic.general_methods import generate_unique_name
|
|
34
34
|
from pyedb.modeler.geometry_operators import GeometryOperators
|
|
35
35
|
|
|
36
36
|
|
|
@@ -1403,17 +1403,12 @@ class EDBPadstackInstance(Primitive):
|
|
|
1403
1403
|
layer = self._pedb.edb_api.cell.layer("", self._pedb.edb_api.cell.layer_type.SignalLayer)
|
|
1404
1404
|
val = self._pedb.edb_value(0)
|
|
1405
1405
|
offset = self._pedb.edb_value(0.0)
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
drill_to_layer
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
flag,
|
|
1413
|
-
drill_to_layer,
|
|
1414
|
-
offset,
|
|
1415
|
-
diameter,
|
|
1416
|
-
) = self._edb_padstackinstance.GetBackDrillParametersLayerValue(layer, offset, val, False)
|
|
1406
|
+
(
|
|
1407
|
+
flag,
|
|
1408
|
+
drill_to_layer,
|
|
1409
|
+
offset,
|
|
1410
|
+
diameter,
|
|
1411
|
+
) = self._edb_padstackinstance.GetBackDrillParametersLayerValue(layer, offset, val, False)
|
|
1417
1412
|
if flag:
|
|
1418
1413
|
if offset.ToDouble():
|
|
1419
1414
|
return drill_to_layer.GetName(), diameter.ToString(), offset.ToString()
|
|
@@ -1461,17 +1456,12 @@ class EDBPadstackInstance(Primitive):
|
|
|
1461
1456
|
layer = self._pedb.edb_api.cell.layer("", self._pedb.edb_api.cell.layer_type.SignalLayer)
|
|
1462
1457
|
val = self._pedb.edb_value(0)
|
|
1463
1458
|
offset = self._pedb.edb_value(0.0)
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
drill_to_layer
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
flag,
|
|
1471
|
-
drill_to_layer,
|
|
1472
|
-
offset,
|
|
1473
|
-
diameter,
|
|
1474
|
-
) = self._edb_padstackinstance.GetBackDrillParametersLayerValue(layer, offset, val, True)
|
|
1459
|
+
(
|
|
1460
|
+
flag,
|
|
1461
|
+
drill_to_layer,
|
|
1462
|
+
offset,
|
|
1463
|
+
diameter,
|
|
1464
|
+
) = self._edb_padstackinstance.GetBackDrillParametersLayerValue(layer, offset, val, True)
|
|
1475
1465
|
if flag:
|
|
1476
1466
|
if offset.ToDouble():
|
|
1477
1467
|
return drill_to_layer.GetName(), diameter.ToString(), offset.ToString()
|
|
@@ -1503,9 +1493,9 @@ class EDBPadstackInstance(Primitive):
|
|
|
1503
1493
|
val = self._pedb.edb_value(drill_diameter)
|
|
1504
1494
|
offset = self._pedb.edb_value(offset)
|
|
1505
1495
|
if offset.ToDouble():
|
|
1506
|
-
return self.
|
|
1496
|
+
return self._edb_object.SetBackDrillParameters(layer, offset, val, True)
|
|
1507
1497
|
else:
|
|
1508
|
-
return self.
|
|
1498
|
+
return self._edb_object.SetBackDrillParameters(layer, val, True)
|
|
1509
1499
|
|
|
1510
1500
|
@property
|
|
1511
1501
|
def start_layer(self):
|
|
@@ -1517,7 +1507,7 @@ class EDBPadstackInstance(Primitive):
|
|
|
1517
1507
|
Name of the starting layer.
|
|
1518
1508
|
"""
|
|
1519
1509
|
layer = self._pedb.edb_api.cell.layer("", self._pedb.edb_api.cell.layer_type.SignalLayer)
|
|
1520
|
-
_, start_layer, stop_layer = self.
|
|
1510
|
+
_, start_layer, stop_layer = self._edb_object.GetLayerRange()
|
|
1521
1511
|
|
|
1522
1512
|
if start_layer:
|
|
1523
1513
|
return start_layer.GetName()
|
|
@@ -1678,11 +1668,9 @@ class EDBPadstackInstance(Primitive):
|
|
|
1678
1668
|
def name(self):
|
|
1679
1669
|
"""Padstack Instance Name. If it is a pin, the syntax will be like in AEDT ComponentName-PinName."""
|
|
1680
1670
|
if self.is_pin:
|
|
1681
|
-
|
|
1682
|
-
pin_name = self._edb_padstackinstance.GetName()
|
|
1683
|
-
return "-".join([comp_name, pin_name])
|
|
1671
|
+
return self.aedt_name
|
|
1684
1672
|
else:
|
|
1685
|
-
return self.
|
|
1673
|
+
return self.component_pin
|
|
1686
1674
|
|
|
1687
1675
|
@name.setter
|
|
1688
1676
|
def name(self, value):
|
|
@@ -1725,6 +1713,12 @@ class EDBPadstackInstance(Primitive):
|
|
|
1725
1713
|
@property
|
|
1726
1714
|
def pin_number(self):
|
|
1727
1715
|
"""Get pin number."""
|
|
1716
|
+
warnings.warn("`pin_number` is deprecated. Use `component_pin` method instead.", DeprecationWarning)
|
|
1717
|
+
return self.component_pin
|
|
1718
|
+
|
|
1719
|
+
@property
|
|
1720
|
+
def component_pin(self):
|
|
1721
|
+
"""Get component pin."""
|
|
1728
1722
|
return self._edb_padstackinstance.GetName()
|
|
1729
1723
|
|
|
1730
1724
|
@property
|
|
@@ -1747,12 +1741,9 @@ class EDBPadstackInstance(Primitive):
|
|
|
1747
1741
|
>>> edbapp.padstacks.instances[111].get_aedt_pin_name()
|
|
1748
1742
|
|
|
1749
1743
|
"""
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
else:
|
|
1754
|
-
val = String("")
|
|
1755
|
-
_, name = self._edb_padstackinstance.GetProductProperty(self._pedb.edb_api.ProductId.Designer, 11, val)
|
|
1744
|
+
|
|
1745
|
+
val = String("")
|
|
1746
|
+
_, name = self._edb_padstackinstance.GetProductProperty(self._pedb.edb_api.ProductId.Designer, 11, val)
|
|
1756
1747
|
name = str(name).strip("'")
|
|
1757
1748
|
return name
|
|
1758
1749
|
|
|
@@ -198,24 +198,6 @@ class ExcitationSources(Terminal):
|
|
|
198
198
|
def __init__(self, pedb, edb_terminal):
|
|
199
199
|
Terminal.__init__(self, pedb, edb_terminal)
|
|
200
200
|
|
|
201
|
-
@property
|
|
202
|
-
def magnitude(self):
|
|
203
|
-
"""Get the magnitude of the source."""
|
|
204
|
-
return self._edb_object.GetSourceAmplitude().ToDouble()
|
|
205
|
-
|
|
206
|
-
@magnitude.setter
|
|
207
|
-
def magnitude(self, value):
|
|
208
|
-
self._edb_object.SetSourceAmplitude(self._edb.utility.value(value))
|
|
209
|
-
|
|
210
|
-
@property
|
|
211
|
-
def phase(self):
|
|
212
|
-
"""Get the phase of the source."""
|
|
213
|
-
return self._edb_object.GetSourcePhase().ToDouble()
|
|
214
|
-
|
|
215
|
-
@phase.setter
|
|
216
|
-
def phase(self, value):
|
|
217
|
-
self._edb_object.SetSourcePhase(self._edb.utility.value(value))
|
|
218
|
-
|
|
219
201
|
|
|
220
202
|
class BundleWavePort(BundleTerminal):
|
|
221
203
|
"""Manages bundle wave port properties.
|
|
@@ -631,7 +631,7 @@ class EdbPath(EDBPrimitives, PathDotNet):
|
|
|
631
631
|
float
|
|
632
632
|
Path length in meters.
|
|
633
633
|
"""
|
|
634
|
-
center_line_arcs = list(self.
|
|
634
|
+
center_line_arcs = list(self.api_object.GetCenterLine().GetArcData())
|
|
635
635
|
path_length = 0.0
|
|
636
636
|
for arc in center_line_arcs:
|
|
637
637
|
path_length += arc.GetLength()
|