Skip to content

Commit f88ddfb

Browse files
authored
Read IBIS file from circuit class. (#1002)
* Add test for ibis reader from Circuit module. * Fix the issue regarding the IBIS reader in the Circuit module.
1 parent 66c6424 commit f88ddfb

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

_unittest/test_15_ibs_reader.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,10 @@ def test_01_read_ibis(self):
5858
ibis.buffers["RDQS#_u26a_800_modified"].add()
5959
buffer = ibis.buffers["RDQS#_u26a_800_modified"].insert(0.1016, 0.05334, 0.0)
6060
assert buffer.name == "CompInst@RDQS#_u26a_800_modified"
61+
62+
def test_02_read_ibis_from_circuit(self):
63+
ibis_model = self.aedtapp.get_ibis_model_from_file(
64+
os.path.join(local_path, "example_models", "u26a_800_modified.ibs")
65+
)
66+
assert len(ibis_model.components) == 6
67+
assert len(ibis_model.models) == 17

pyaedt/circuit.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ def create_schematic_from_netlist(self, file_to_import):
372372
return True
373373

374374
@pyaedt_function_handler()
375-
def read_ibis(self, path):
375+
def get_ibis_model_from_file(self, path):
376376
"""Create an IBIS model based on the data contained in an IBIS file.
377377
378378
Parameters
@@ -386,8 +386,9 @@ def read_ibis(self, path):
386386
IBIS object exposing all data from the IBIS file.
387387
"""
388388

389-
reader = ibis_reader.IbisReader()
390-
return reader.read_project(path, self)
389+
reader = ibis_reader.IbisReader(path, self)
390+
reader.parse_ibis_file()
391+
return reader.ibis_model
391392

392393
@pyaedt_function_handler()
393394
def create_schematic_from_mentor_netlist(self, file_to_import):

0 commit comments

Comments
 (0)