Skip to content

Commit 6280635

Browse files
committed
liberty statetable ref test_cell ports resolves #276
Signed-off-by: James Cherry <cherry@parallaxsw.com>
1 parent 2ada1ce commit 6280635

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

liberty/LibertyReader.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,8 @@ LibertyReader::readCell(LibertyCell *cell,
986986

987987
// Make ff/latch output ports.
988988
makeSequentials(cell, cell_group);
989+
// Test cell ports may be referenced by a statetable.
990+
readTestCell(cell, cell_group);
989991

990992
readCellAttributes(cell, cell_group);
991993

@@ -1000,8 +1002,6 @@ LibertyReader::readCell(LibertyCell *cell,
10001002
readInternalPowerGroups(cell, ports, port_group);
10011003
}
10021004

1003-
readTestCell(cell, cell_group);
1004-
10051005
cell->finish(infer_latches_, report_, debug_);
10061006
}
10071007

@@ -2966,6 +2966,9 @@ LibertyReader::readStatetable(LibertyCell *cell,
29662966
LibertyPortSeq input_port_ptrs;
29672967
for (const std::string &input : input_ports) {
29682968
LibertyPort *port = cell->findLibertyPort(input.c_str());
2969+
if (port == nullptr
2970+
&& cell->testCell())
2971+
port = cell->testCell()->findLibertyPort(input.c_str());
29692972
if (port)
29702973
input_port_ptrs.push_back(port);
29712974
else

0 commit comments

Comments
 (0)