-
Notifications
You must be signed in to change notification settings - Fork 163
Create port on component #656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
105fef7
create port on component iter #1
svandenb-dev 6ad2f88
auto port creation iter #1
svandenb-dev 1d0868b
auto port creation iter #1
svandenb-dev 80bb682
create port on component iter #2
svandenb-dev 32dc258
create port on component iter #2
svandenb-dev 491de7f
Merge branch 'main' into create_port_on_component
svandenb-dev f3dcba0
create port on component iter #2
svandenb-dev 53ac3ec
create port on component iter #2
svandenb-dev 5ef245c
create port on component iter #2
svandenb-dev 5539ea1
Merge branch 'main' into create_port_on_component
svandenb-dev e44ca0e
Merge branch 'main' into create_port_on_component
maxcapodi78 a61dd8c
Fixed black
maxcapodi78 828bad5
Update pyaedt/edb_core/components.py
svandenb-dev 70b9af3
create port on component iter #2
svandenb-dev 75cce60
create port on component iter #2
svandenb-dev 82384e7
create port on component iter #2
svandenb-dev 5e061a4
create port on component iter #2
svandenb-dev 9128d2d
create port on component iter #2
svandenb-dev 653223d
try m black fix
svandenb-dev ce39c35
Update _unittest/test_00_EDB.py
MaxJPRey d27d822
create ports on component unit test fix
svandenb-dev 9dd14e4
create ports on component unit test fix
svandenb-dev 2047b47
create ports on component unit test fix
svandenb-dev bd311fc
create ports on component unit test fix
svandenb-dev 7229a74
create ports on component unit test fix
svandenb-dev 7288e89
Update pyaedt/edb_core/components.py
MaxJPRey 8b14d8b
Fixed Bug in get_pin_from_component in Ironpython
maxcapodi78 b6506a6
Fixed issue
maxcapodi78 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -7,8 +7,9 @@ | |||||||||||||||||||||||||||||
from pyaedt import generate_unique_name, _retry_ntimes | ||||||||||||||||||||||||||||||
from pyaedt.edb_core.general import convert_py_list_to_net_list | ||||||||||||||||||||||||||||||
from pyaedt.generic.general_methods import aedt_exception_handler, get_filename_without_extension, is_ironpython | ||||||||||||||||||||||||||||||
from pyaedt.generic.constants import FlipChipOrientation | ||||||||||||||||||||||||||||||
from pyaedt.generic.constants import SourceType | ||||||||||||||||||||||||||||||
from pyaedt.edb_core.EDB_Data import EDBComponent | ||||||||||||||||||||||||||||||
from pyaedt.edb_core.padstack import EdbPadstacks | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
try: | ||||||||||||||||||||||||||||||
import clr | ||||||||||||||||||||||||||||||
|
@@ -71,6 +72,7 @@ def __init__(self, p_edb): | |||||||||||||||||||||||||||||
self._pins = {} | ||||||||||||||||||||||||||||||
self._comps_by_part = {} | ||||||||||||||||||||||||||||||
self._init_parts() | ||||||||||||||||||||||||||||||
self._padstack = EdbPadstacks(self._pedb) | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
@property | ||||||||||||||||||||||||||||||
def _logger(self): | ||||||||||||||||||||||||||||||
|
@@ -400,7 +402,189 @@ def get_solder_ball_height(self, cmp): | |||||||||||||||||||||||||||||
return False | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
@aedt_exception_handler | ||||||||||||||||||||||||||||||
def set_solder_ball(self, cmp, sball_height=100e-6, sball_diam=150e-6, orientation=FlipChipOrientation.Up): | ||||||||||||||||||||||||||||||
def create_port_on_component(self, cmp, net_list, port_type=SourceType.CoaxPort, do_pingroup=True, refnet="gnd"): | ||||||||||||||||||||||||||||||
"""Create ports on given component. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Parameters | ||||||||||||||||||||||||||||||
---------- | ||||||||||||||||||||||||||||||
cmp : str or self._edb.Cell.Hierarchy.Component | ||||||||||||||||||||||||||||||
EDB component or str component name. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
net_list : str or list of string. | ||||||||||||||||||||||||||||||
The list of nets where ports have to be created on the component. | ||||||||||||||||||||||||||||||
If net is not part of the component this one will be skipped. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
port_type : SourceType enumerator, CoaxPort or CircuitPort | ||||||||||||||||||||||||||||||
define the type of port to be created. CoaxPort will auto generate solder balls. | ||||||||||||||||||||||||||||||
MaxJPRey marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||
CircuitPort will generate circuit ports on pins belonging to the net list. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
do_pingroup : bool | ||||||||||||||||||||||||||||||
True activate pingroup during port creation (only used with combination of CoaxPort), | ||||||||||||||||||||||||||||||
False will take the closest reference pin and generate one port per signal pin. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
refnet : string or list of string. | ||||||||||||||||||||||||||||||
list of the reference net. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Returns | ||||||||||||||||||||||||||||||
------- | ||||||||||||||||||||||||||||||
double, bool | ||||||||||||||||||||||||||||||
Salder ball height vale, ``False`` when failed. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Examples | ||||||||||||||||||||||||||||||
-------- | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
>>> from pyaedt import Edb | ||||||||||||||||||||||||||||||
>>> edbapp = Edb("myaedbfolder") | ||||||||||||||||||||||||||||||
>>> net_list = ["M_DQ<1>", "M_DQ<2>", "M_DQ<3>", "M_DQ<4>", "M_DQ<5>"] | ||||||||||||||||||||||||||||||
>>> edbapp.core_components.create_port_on_component(cmp="U2A5", net_list=net_list, | ||||||||||||||||||||||||||||||
>>> port_type=SourceType.CoaxPort, do_pingroup=False, refnet="GND") | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
""" | ||||||||||||||||||||||||||||||
if isinstance(cmp, self._edb.Cell.Hierarchy.Component): | ||||||||||||||||||||||||||||||
cmp = cmp.GetName() | ||||||||||||||||||||||||||||||
if not isinstance(net_list, list): | ||||||||||||||||||||||||||||||
net_list = [net_list] | ||||||||||||||||||||||||||||||
for net in net_list: | ||||||||||||||||||||||||||||||
if not isinstance(net, str): | ||||||||||||||||||||||||||||||
try: | ||||||||||||||||||||||||||||||
net_name = net.GetName() | ||||||||||||||||||||||||||||||
if net_name != "": | ||||||||||||||||||||||||||||||
net_list.append(net_name) | ||||||||||||||||||||||||||||||
except: | ||||||||||||||||||||||||||||||
pass | ||||||||||||||||||||||||||||||
if refnet in net_list: | ||||||||||||||||||||||||||||||
net_list.remove(refnet) | ||||||||||||||||||||||||||||||
cmp_pins = self.get_pin_from_component(cmp, net_list) | ||||||||||||||||||||||||||||||
if len(cmp_pins) == 0: | ||||||||||||||||||||||||||||||
return False | ||||||||||||||||||||||||||||||
pin_layers = cmp_pins[0].GetPadstackDef().GetData().GetLayerNames() | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
if port_type == SourceType.CoaxPort: | ||||||||||||||||||||||||||||||
pad_params = self._padstack.get_pad_parameters(pin=cmp_pins[0], layername=pin_layers[0], pad_type=0) | ||||||||||||||||||||||||||||||
sball_diam = min([self._edb_value(val).ToDouble() for val in pad_params[1]]) | ||||||||||||||||||||||||||||||
sb_height = sball_diam | ||||||||||||||||||||||||||||||
self.set_solder_ball(cmp, sb_height, sball_diam) | ||||||||||||||||||||||||||||||
for pin in cmp_pins: | ||||||||||||||||||||||||||||||
self._padstack.create_coax_port(pin) | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
elif port_type == SourceType.CircPort: | ||||||||||||||||||||||||||||||
ref_pins = self.get_pin_from_component(cmp, refnet) | ||||||||||||||||||||||||||||||
if do_pingroup: | ||||||||||||||||||||||||||||||
pingroups = [] | ||||||||||||||||||||||||||||||
if len(ref_pins) == 1: | ||||||||||||||||||||||||||||||
ref_pin_group_term = self._create_terminal(ref_pins[0]) | ||||||||||||||||||||||||||||||
else: | ||||||||||||||||||||||||||||||
ref_pin_group = self.create_pingroup_from_pins(ref_pins) | ||||||||||||||||||||||||||||||
ref_pin_group_term = self._create_pin_group_terminal(ref_pin_group[1]) | ||||||||||||||||||||||||||||||
if not ref_pin_group[0]: | ||||||||||||||||||||||||||||||
return False | ||||||||||||||||||||||||||||||
ref_pin_group_term.SetBoundaryType(self._edb.Cell.Terminal.BoundaryType.PortBoundary) | ||||||||||||||||||||||||||||||
ref_pin_group_term.SetIsCircuitPort(True) | ||||||||||||||||||||||||||||||
for net in net_list: | ||||||||||||||||||||||||||||||
pins = [pin for pin in cmp_pins if pin.GetNet().GetName() == net] | ||||||||||||||||||||||||||||||
pin_group = self.create_pingroup_from_pins(pins) | ||||||||||||||||||||||||||||||
if pin_group[0]: | ||||||||||||||||||||||||||||||
pingroups.append(pin_group[1]) | ||||||||||||||||||||||||||||||
pg_terminal = [] | ||||||||||||||||||||||||||||||
for pg in pingroups: | ||||||||||||||||||||||||||||||
pg_term = self._create_pin_group_terminal(pg) | ||||||||||||||||||||||||||||||
pg_terminal.append(pg_term) | ||||||||||||||||||||||||||||||
for term in pg_terminal: | ||||||||||||||||||||||||||||||
term.SetBoundaryType(self._edb.Cell.Terminal.BoundaryType.PortBoundary) | ||||||||||||||||||||||||||||||
term.SetIsCircuitPort(True) | ||||||||||||||||||||||||||||||
term.SetReferenceTerminal(ref_pin_group_term) | ||||||||||||||||||||||||||||||
else: | ||||||||||||||||||||||||||||||
for net in net_list: | ||||||||||||||||||||||||||||||
pins = [pin for pin in cmp_pins if pin.GetNet().GetName().lower() == net] | ||||||||||||||||||||||||||||||
for pin in pins: | ||||||||||||||||||||||||||||||
ref_pin = self._get_closest_pin_from(pin, ref_pins) | ||||||||||||||||||||||||||||||
ref_pin_term = self._create_terminal(ref_pin) | ||||||||||||||||||||||||||||||
term = self._create_terminal(pin) | ||||||||||||||||||||||||||||||
ref_pin_term.SetBoundaryType(self._edb.Cell.Terminal.BoundaryType.PortBoundary) | ||||||||||||||||||||||||||||||
ref_pin_term.SetIsCircuitPort(True) | ||||||||||||||||||||||||||||||
term.SetBoundaryType(self._edb.Cell.Terminal.BoundaryType.PortBoundary) | ||||||||||||||||||||||||||||||
term.SetIsCircuitPort(True) | ||||||||||||||||||||||||||||||
term.SetReferenceTerminal(ref_pin_term) | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
@aedt_exception_handler | ||||||||||||||||||||||||||||||
def _create_terminal(self, pin): | ||||||||||||||||||||||||||||||
"""Create terminal on component pin. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Parameters | ||||||||||||||||||||||||||||||
---------- | ||||||||||||||||||||||||||||||
pin : Edb padstack instance. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Returns | ||||||||||||||||||||||||||||||
------- | ||||||||||||||||||||||||||||||
Edb terminal. | ||||||||||||||||||||||||||||||
""" | ||||||||||||||||||||||||||||||
svandenb-dev marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
pin_pos = self._edb.Definition.Geometry.PointData() | ||||||||||||||||||||||||||||||
pin_rot = 0.0 | ||||||||||||||||||||||||||||||
from_layer = self._edb.Cell.ILayerReadOnly | ||||||||||||||||||||||||||||||
to_layer = self._edb.Cell.ILayerReadOnly | ||||||||||||||||||||||||||||||
pin.GetLayerRange(from_layer, to_layer) | ||||||||||||||||||||||||||||||
term_name = "{]_{}_{}".format(pin.GetComponent().GetName(), pin.GetNet().GetName(), pin.GetName()) | ||||||||||||||||||||||||||||||
term = self._edb.Cell.Terminal.PointTerminal.Create(pin.GetLayout(), pin.GetNet(), term_name, pin_pos, | ||||||||||||||||||||||||||||||
from_layer) | ||||||||||||||||||||||||||||||
return term | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
@aedt_exception_handler | ||||||||||||||||||||||||||||||
def _get_closest_pin_from(self, pin, ref_pinlist): | ||||||||||||||||||||||||||||||
"""Returns the closest pin from given pin among the list of reference pins. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Parameters | ||||||||||||||||||||||||||||||
---------- | ||||||||||||||||||||||||||||||
pin : Edb padstack instance. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
ref_pinlist : list of reference edb pins. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Returns | ||||||||||||||||||||||||||||||
------- | ||||||||||||||||||||||||||||||
Edb pin. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
""" | ||||||||||||||||||||||||||||||
Comment on lines
+538
to
+550
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||
pin_position = self._edb.Geometry.PointData() | ||||||||||||||||||||||||||||||
pin_rot = 0.0 | ||||||||||||||||||||||||||||||
pin.GetPositionAndRotation(pin_position, pin_rot) | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
distance = 1e3 | ||||||||||||||||||||||||||||||
closest_pin = ref_pinlist[0] | ||||||||||||||||||||||||||||||
ref_pin_pos = self._edb.Geometry.PointData() | ||||||||||||||||||||||||||||||
ref_pin_rot = 0.0 | ||||||||||||||||||||||||||||||
for ref_pin in ref_pinlist: | ||||||||||||||||||||||||||||||
ref_pin.GetPositionAndRotation(ref_pin_pos, ref_pin_rot) | ||||||||||||||||||||||||||||||
temp_distance = pin_position.Distance(ref_pin_pos) | ||||||||||||||||||||||||||||||
if temp_distance < distance: | ||||||||||||||||||||||||||||||
distance = temp_distance | ||||||||||||||||||||||||||||||
closest_pin = ref_pin | ||||||||||||||||||||||||||||||
return closest_pin | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
@aedt_exception_handler | ||||||||||||||||||||||||||||||
def _create_pin_group_terminal(self, pingroup, isref=False): | ||||||||||||||||||||||||||||||
""" Creates edb pin group terminal from given edb pin group. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Parameters | ||||||||||||||||||||||||||||||
---------- | ||||||||||||||||||||||||||||||
pingroup : Edb pin group. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
isref : bool | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Returns | ||||||||||||||||||||||||||||||
------- | ||||||||||||||||||||||||||||||
Edb pin group terminal. | ||||||||||||||||||||||||||||||
""" | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
layout = pingroup.GetLayout() | ||||||||||||||||||||||||||||||
cmp_name = pingroup.GetComponent().GetName() | ||||||||||||||||||||||||||||||
net_name = pingroup.GetNet().GetName() | ||||||||||||||||||||||||||||||
term_name = pingroup.GetUniqueName(layout, "Pingroup_{0}_{1}".format(cmp_name, net_name)) | ||||||||||||||||||||||||||||||
pingroup_term = self._edb.Cell.Terminal.PinGroupTerminal.Create(self._active_layout, pingroup.GetNet(), | ||||||||||||||||||||||||||||||
term_name, pingroup, isref) | ||||||||||||||||||||||||||||||
return pingroup_term | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
@aedt_exception_handler | ||||||||||||||||||||||||||||||
def set_solder_ball(self, cmp, sball_height=100e-6, sball_diam=150e-6): | ||||||||||||||||||||||||||||||
"""Define component solder ball ready for port assignment. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Parameters | ||||||||||||||||||||||||||||||
|
@@ -433,14 +617,12 @@ def set_solder_ball(self, cmp, sball_height=100e-6, sball_diam=150e-6, orientati | |||||||||||||||||||||||||||||
cmp_type = cmp.GetComponentType() | ||||||||||||||||||||||||||||||
if cmp_type == self._edb.Definition.ComponentType.IC: | ||||||||||||||||||||||||||||||
die_prop = cmp_prop.GetDieProperty().Clone() | ||||||||||||||||||||||||||||||
if orientation == FlipChipOrientation.Up: | ||||||||||||||||||||||||||||||
if not die_prop.SetOrientation(self._edb.Definition.DieOrientation.ChipUp): | ||||||||||||||||||||||||||||||
return False | ||||||||||||||||||||||||||||||
else: | ||||||||||||||||||||||||||||||
if self._is_top_component(cmp): | ||||||||||||||||||||||||||||||
die_prop.SetOrientation(self._edb.Definition.DieOrientation.ChipDown) | ||||||||||||||||||||||||||||||
else: | ||||||||||||||||||||||||||||||
die_prop.SetOrientation(self._edb.Definition.DieOrientation.ChipUp) | ||||||||||||||||||||||||||||||
if not cmp_prop.SetDieProperty(die_prop): | ||||||||||||||||||||||||||||||
return False | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
solder_prop = cmp_prop.GetSolderBallProperty().Clone() | ||||||||||||||||||||||||||||||
if not solder_prop.SetDiameter(self._edb_value(sball_diam), self._edb_value(sball_diam)): | ||||||||||||||||||||||||||||||
return False | ||||||||||||||||||||||||||||||
|
@@ -459,6 +641,28 @@ def set_solder_ball(self, cmp, sball_height=100e-6, sball_diam=150e-6, orientati | |||||||||||||||||||||||||||||
else: | ||||||||||||||||||||||||||||||
return False | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
@aedt_exception_handler | ||||||||||||||||||||||||||||||
def _is_top_component(self, cmp): | ||||||||||||||||||||||||||||||
"""Test the component placment layer. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Parameters | ||||||||||||||||||||||||||||||
---------- | ||||||||||||||||||||||||||||||
cmp : self._edb.Cell.Hierarchy.Component | ||||||||||||||||||||||||||||||
Edb component. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Returns | ||||||||||||||||||||||||||||||
------- | ||||||||||||||||||||||||||||||
bool | ||||||||||||||||||||||||||||||
``True`` when component placed on top layer, ``False`` on bottom layer. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
""" | ||||||||||||||||||||||||||||||
Comment on lines
+651
to
+664
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||
signal_layers = cmp.GetLayout().GetLayerCollection().Layers(self._edb.Cell.LayerTypeSet.SignalLayerSet) | ||||||||||||||||||||||||||||||
if cmp.GetPlacementLayer() == signal_layers[0]: | ||||||||||||||||||||||||||||||
return True | ||||||||||||||||||||||||||||||
else: | ||||||||||||||||||||||||||||||
return False | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
@aedt_exception_handler | ||||||||||||||||||||||||||||||
def create_component_from_pins(self, pins, component_name, placement_layer=None): | ||||||||||||||||||||||||||||||
"""Create a component from pins. | ||||||||||||||||||||||||||||||
|
@@ -641,6 +845,7 @@ def create_pingroup_from_pins(self, pins, group_name=None): | |||||||||||||||||||||||||||||
if pingroup.IsNull(): | ||||||||||||||||||||||||||||||
return (False, None) | ||||||||||||||||||||||||||||||
else: | ||||||||||||||||||||||||||||||
pingroup.SetNet(pins[0].GetNet()) | ||||||||||||||||||||||||||||||
return (True, pingroup) | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
@aedt_exception_handler | ||||||||||||||||||||||||||||||
|
@@ -864,7 +1069,7 @@ def set_component_rlc(self, componentname, res_value=None, ind_value=None, cap_v | |||||||||||||||||||||||||||||
rlcModel = self._edb.Cell.Hierarchy.PinPairModel() | ||||||||||||||||||||||||||||||
rlcModel.SetPinPairRlc(pinPair, rlc) | ||||||||||||||||||||||||||||||
if not edbRlcComponentProperty.SetModel(rlcModel) or not edbComponent.SetComponentProperty( | ||||||||||||||||||||||||||||||
edbRlcComponentProperty | ||||||||||||||||||||||||||||||
edbRlcComponentProperty | ||||||||||||||||||||||||||||||
): | ||||||||||||||||||||||||||||||
self._logger.error("Failed to set RLC model on component") | ||||||||||||||||||||||||||||||
return False | ||||||||||||||||||||||||||||||
|
@@ -880,7 +1085,7 @@ def set_component_rlc(self, componentname, res_value=None, ind_value=None, cap_v | |||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
@aedt_exception_handler | ||||||||||||||||||||||||||||||
def update_rlc_from_bom( | ||||||||||||||||||||||||||||||
self, bom_file, delimiter=";", valuefield="Func des", comptype="Prod name", refdes="Pos / Place" | ||||||||||||||||||||||||||||||
self, bom_file, delimiter=";", valuefield="Func des", comptype="Prod name", refdes="Pos / Place" | ||||||||||||||||||||||||||||||
): | ||||||||||||||||||||||||||||||
"""Update the EDC core component values (RLCs) with values coming from a BOM file. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
@@ -968,26 +1173,38 @@ def get_pin_from_component(self, cmpName, netName=None, pinName=None): | |||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
cmp = self._edb.Cell.Hierarchy.Component.FindByName(self._active_layout, cmpName) | ||||||||||||||||||||||||||||||
if netName: | ||||||||||||||||||||||||||||||
if not isinstance(netName, list): | ||||||||||||||||||||||||||||||
netName = [netName] | ||||||||||||||||||||||||||||||
#pins = [] | ||||||||||||||||||||||||||||||
#cmp_obj = list(cmp.LayoutObjs) | ||||||||||||||||||||||||||||||
#for p in cmp_obj: | ||||||||||||||||||||||||||||||
# if p.GetObjType() == 1: | ||||||||||||||||||||||||||||||
# if p.IsLayoutPin(): | ||||||||||||||||||||||||||||||
# pin_net_name = p.GetNet().GetName() | ||||||||||||||||||||||||||||||
# if pin_net_name in netName: | ||||||||||||||||||||||||||||||
# pins.append(p) | ||||||||||||||||||||||||||||||
pins = [ | ||||||||||||||||||||||||||||||
p | ||||||||||||||||||||||||||||||
for p in cmp.LayoutObjs | ||||||||||||||||||||||||||||||
if p.GetObjType() == self._edb.Cell.LayoutObjType.PadstackInstance | ||||||||||||||||||||||||||||||
and p.IsLayoutPin() | ||||||||||||||||||||||||||||||
and p.GetNet().GetName() == netName | ||||||||||||||||||||||||||||||
for p in list(cmp.LayoutObjs) | ||||||||||||||||||||||||||||||
if p.GetObjType() == 1 | ||||||||||||||||||||||||||||||
and p.IsLayoutPin() | ||||||||||||||||||||||||||||||
and p.GetNet().GetName() in netName | ||||||||||||||||||||||||||||||
] | ||||||||||||||||||||||||||||||
elif pinName: | ||||||||||||||||||||||||||||||
if not isinstance(pinName, list): | ||||||||||||||||||||||||||||||
pinName = [pinName] | ||||||||||||||||||||||||||||||
pins = [ | ||||||||||||||||||||||||||||||
p | ||||||||||||||||||||||||||||||
for p in cmp.LayoutObjs | ||||||||||||||||||||||||||||||
if p.GetObjType() == self._edb.Cell.LayoutObjType.PadstackInstance | ||||||||||||||||||||||||||||||
and p.IsLayoutPin() | ||||||||||||||||||||||||||||||
and (self.get_aedt_pin_name(p) == str(pinName) or p.GetName() == str(pinName)) | ||||||||||||||||||||||||||||||
for p in list(cmp.LayoutObjs) | ||||||||||||||||||||||||||||||
if p.GetObjType() == 1 | ||||||||||||||||||||||||||||||
and p.IsLayoutPin() | ||||||||||||||||||||||||||||||
and (self.get_aedt_pin_name(p) == str(pinName) or p.GetName() in str(pinName)) | ||||||||||||||||||||||||||||||
] | ||||||||||||||||||||||||||||||
else: | ||||||||||||||||||||||||||||||
pins = [ | ||||||||||||||||||||||||||||||
p | ||||||||||||||||||||||||||||||
for p in cmp.LayoutObjs | ||||||||||||||||||||||||||||||
if p.GetObjType() == self._edb.Cell.LayoutObjType.PadstackInstance and p.IsLayoutPin() | ||||||||||||||||||||||||||||||
for p in list(cmp.LayoutObjs) | ||||||||||||||||||||||||||||||
if p.GetObjType() == 1 and p.IsLayoutPin() | ||||||||||||||||||||||||||||||
] | ||||||||||||||||||||||||||||||
return pins | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.