Skip to content

FIX: improved ibis pin load time #6181

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 3 commits into from
May 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changelog.d/6181.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
improved ibis pin load time
43 changes: 22 additions & 21 deletions src/ansys/aedt/core/generic/ibis_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -892,8 +892,8 @@
``True`` when the model is imported successfully, ``False`` if not imported or model already present.

"""

if [i for i in self._circuit.modeler.schematic.ocomponent_manager.GetNames() if i in self._ibis_model.buffers]:
names = [i.name for i in self._ibis_model.buffers.values()]
if [i for i in self._circuit.modeler.schematic.ocomponent_manager.GetNames() if i in names]:

Check warning on line 896 in src/ansys/aedt/core/generic/ibis_reader.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/generic/ibis_reader.py#L895-L896

Added lines #L895 - L896 were not covered by tests
return False

if self._circuit:
Expand All @@ -912,22 +912,22 @@
for buffer_item in self._ibis_model.buffers.values():
arg_buffers.append(f"{buffer_item.short_name}:=")
arg_buffers.append([True, "IbisSingleEnded"])
model_selector_names = [i.name for i in self._ibis_model.model_selectors]
# model_selector_names = [i.name for i in self._ibis_model.model_selectors]
arg_components = ["NAME:Components"]
for comp_value in self._ibis_model.components.values():
arg_component = [f"NAME:{comp_value.name}"]
for pin in comp_value.pins.values():
arg_component.append(f"{pin.short_name}:=")
if pin.model not in model_selector_names:
arg_component.append([False, False])
else:
arg_component.append([True, False])
# if pin.model not in model_selector_names:
# arg_component.append([False, False])
# else:
arg_component.append([True, False])

Check warning on line 924 in src/ansys/aedt/core/generic/ibis_reader.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/generic/ibis_reader.py#L924

Added line #L924 was not covered by tests
for pin in comp_value.differential_pins.values():
arg_component.append(f"{pin.short_name}:=")
if pin.model not in model_selector_names:
arg_component.append([False, True])
else:
arg_component.append([True, True])
# if pin.model not in model_selector_names:
# arg_component.append([False, True])
# else:
arg_component.append([True, True])

Check warning on line 930 in src/ansys/aedt/core/generic/ibis_reader.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/generic/ibis_reader.py#L930

Added line #L930 was not covered by tests
arg_components.append(arg_component)

args.append(arg_buffers)
Expand Down Expand Up @@ -1321,7 +1321,8 @@

def import_model_in_aedt(self):

if [i for i in self._circuit.modeler.schematic.ocomponent_manager.GetNames() if i in self._ibis_model.buffers]:
names = [i.name for i in self._ibis_model.buffers.values()]
if [i for i in self._circuit.modeler.schematic.ocomponent_manager.GetNames() if i in names]:

Check warning on line 1325 in src/ansys/aedt/core/generic/ibis_reader.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/generic/ibis_reader.py#L1324-L1325

Added lines #L1324 - L1325 were not covered by tests
return False
if self._circuit:
args = [
Expand All @@ -1339,22 +1340,22 @@
for buffer in self._ibis_model.buffers:
arg_buffers.append(f"{self._ibis_model.buffers[buffer].short_name}:=")
arg_buffers.append([True, "IbisSingleEnded"])
model_selector_names = [i.name for i in self._ibis_model.model_selectors]
# model_selector_names = [i.name for i in self._ibis_model.model_selectors]
arg_components = ["NAME:Components"]
for component in self._ibis_model.components:
arg_component = [f"NAME:{self._ibis_model.components[component].name}"]
for pin in self._ibis_model.components[component].pins.values():
arg_component.append(f"{pin.short_name}:=")
if model_selector_names and pin.model not in model_selector_names:
arg_component.append([False, False])
else:
arg_component.append([True, False])
# if model_selector_names and pin.model not in model_selector_names:
# arg_component.append([False, False])
# else:
arg_component.append([True, False])

Check warning on line 1352 in src/ansys/aedt/core/generic/ibis_reader.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/generic/ibis_reader.py#L1352

Added line #L1352 was not covered by tests
for pin in self._ibis_model.components[component].differential_pins.values():
arg_component.append(f"{pin.short_name}:=")
if model_selector_names and pin.model not in model_selector_names:
arg_component.append([False, True])
else:
arg_component.append([True, True])
# if model_selector_names and pin.model not in model_selector_names:
# arg_component.append([False, True])
# else:
arg_component.append([True, True])

Check warning on line 1358 in src/ansys/aedt/core/generic/ibis_reader.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/generic/ibis_reader.py#L1358

Added line #L1358 was not covered by tests
arg_components.append(arg_component)

args.append(arg_buffers)
Expand Down