Skip to content

Commit 9309105

Browse files
committed
dbSta: propagate clock signal type when Liberty loaded after LEF
Ensure that when Liberty timing libraries are loaded after LEF macro files, the OpenDB master terms (dbMTerm) correctly receive the CLOCK signal type. This aligns the LEF-first loading order behavior with the Liberty-first behavior. Signed-off-by: Mohnish <kmohnishm@gmail.com>
1 parent 065077a commit 9309105

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

src/dbSta/src/dbNetwork.cc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2425,6 +2425,20 @@ void dbNetwork::readLibertyAfter(LibertyLibrary* lib)
24252425
if (lport) {
24262426
cport->setLibertyPort(lport);
24272427
lport->setExtPort(cport->extPort());
2428+
dbMTerm* mterm = staToDb(lport);
2429+
if (mterm && lport->isClock()
2430+
&& mterm->getSigType() != dbSigType::CLOCK) {
2431+
debugPrint(
2432+
logger_,
2433+
utl::ORD,
2434+
"dbNetwork",
2435+
1,
2436+
"Updating LEF pin {}/{} from {} to CLOCK from Liberty",
2437+
mterm->getMaster()->getName(),
2438+
mterm->getName(),
2439+
mterm->getSigType().getString());
2440+
mterm->setSigType(dbSigType::CLOCK);
2441+
}
24282442
} else if (!cport->direction()->isPowerGround()
24292443
&& !lcell->findPort(port_name)) {
24302444
logger_->warn(ORD,

src/gpl/test/mbff_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ class MBFFTestFixture : public tst::Fixture
7070
opendp_.get(),
7171
estimate_parasitics_.get());
7272

73-
readLiberty(getFilePath("openroad/src/gpl/test/library/test/test0.lib"));
7473
loadTechAndLib("test0",
7574
"test0",
7675
getFilePath("openroad/src/gpl/test/library/test/test0.lef"));
76+
readLiberty(getFilePath("openroad/src/gpl/test/library/test/test0.lib"));
7777

7878
chip_ = odb::dbChip::create(db_.get(), db_->getTech());
7979
block_ = odb::dbBlock::create(chip_, "top");

0 commit comments

Comments
 (0)