liberty statetable ref test_cell ports resolves #276

Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2026-03-10 12:58:53 -07:00
parent 2ada1ce715
commit 6280635c38
1 changed files with 5 additions and 2 deletions

View File

@ -986,6 +986,8 @@ LibertyReader::readCell(LibertyCell *cell,
// Make ff/latch output ports.
makeSequentials(cell, cell_group);
// Test cell ports may be referenced by a statetable.
readTestCell(cell, cell_group);
readCellAttributes(cell, cell_group);
@ -1000,8 +1002,6 @@ LibertyReader::readCell(LibertyCell *cell,
readInternalPowerGroups(cell, ports, port_group);
}
readTestCell(cell, cell_group);
cell->finish(infer_latches_, report_, debug_);
}
@ -2966,6 +2966,9 @@ LibertyReader::readStatetable(LibertyCell *cell,
LibertyPortSeq input_port_ptrs;
for (const std::string &input : input_ports) {
LibertyPort *port = cell->findLibertyPort(input.c_str());
if (port == nullptr
&& cell->testCell())
port = cell->testCell()->findLibertyPort(input.c_str());
if (port)
input_port_ptrs.push_back(port);
else