@@ -494,7 +494,8 @@ void TritonCTS::writeDataToDb()
494494 writeClockNDRsToDb (builder.get ());
495495 }
496496 if (options_->dummyLoadEnabled ()) {
497- writeDummyLoadsToDb (builder->getClock (), clkDummies);
497+ int nDummies = writeDummyLoadsToDb (builder->getClock (), clkDummies);
498+ builder->setNDummies (nDummies);
498499 }
499500 }
500501
@@ -538,7 +539,8 @@ void TritonCTS::writeDataToDb()
538539 }
539540 logger_->info (CTS, 102 , " Path depth {} - {}" , minDepth, maxDepth);
540541 if (options_->dummyLoadEnabled ()) {
541- logger_->info (CTS, 207 , " Leaf load cells {}" , dummyLoadIndex_);
542+ logger_->info (
543+ CTS, 207 , " Dummy loads inserted {}" , builder->getNDummies ());
542544 }
543545 }
544546 }
@@ -2122,20 +2124,21 @@ sta::LibertyCell* findBestDummyCell(
21222124 return bestCell;
21232125}
21242126
2125- void TritonCTS::writeDummyLoadsToDb (Clock& clockNet,
2126- std::unordered_set<odb::dbInst*>& dummies)
2127+ int TritonCTS::writeDummyLoadsToDb (Clock& clockNet,
2128+ std::unordered_set<odb::dbInst*>& dummies)
21272129{
21282130 // Traverse clock tree and compute ideal output caps for clock
21292131 // buffers in the same level
21302132 if (!computeIdealOutputCaps (clockNet)) {
21312133 // No cap adjustment is needed
2132- return ;
2134+ return 0 ;
21332135 }
21342136
21352137 // Find suitable candidate cells for dummy loads
21362138 std::vector<sta::LibertyCell*> dummyCandidates;
21372139 findCandidateDummyCells (dummyCandidates);
21382140
2141+ int nDummies = 0 ;
21392142 clockNet.forEachSubNet ([&](ClockSubNet& subNet) {
21402143 subNet.forEachSink ([&](ClockInst* inst) {
21412144 if (inst->isClockBuffer ()
@@ -2145,6 +2148,7 @@ void TritonCTS::writeDummyLoadsToDb(Clock& clockNet,
21452148 = insertDummyCell (clockNet, inst, dummyCandidates);
21462149 if (dummyInst != nullptr ) {
21472150 dummies.insert (dummyInst);
2151+ nDummies++;
21482152 }
21492153 }
21502154 });
@@ -2153,6 +2157,7 @@ void TritonCTS::writeDummyLoadsToDb(Clock& clockNet,
21532157 if (logger_->debugCheck (utl::CTS, " dummy load" , 1 )) {
21542158 printClockNetwork (clockNet);
21552159 }
2160+ return nDummies;
21562161}
21572162
21582163// Return true if any clock buffers need cap adjustment; false otherwise
0 commit comments