Skip to content

Commit 42157d1

Browse files
authored
Merge pull request #9103 from arthurjolo/cts_optimize_techChar_iterations
Cts optimize tech char iterations
2 parents 8e118d2 + b951cbb commit 42157d1

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/cts/src/TechChar.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ std::vector<TechChar::SolutionData> TechChar::createPatterns(
950950
odb::dbNet* net = nullptr;
951951
// clang-format off
952952
debugPrint(logger_, CTS, "tech char", 1, "*createPatterns for #nodes = {}"
953-
" #topologies = {}", setupWirelength, numberOfNodes, numberOfTopologies);
953+
" #topologies = {}", numberOfNodes, numberOfTopologies);
954954
// clang-format on
955955
// For each possible topology...
956956
for (unsigned solutionCounterInt = 0; solutionCounterInt < numberOfTopologies;
@@ -1051,9 +1051,6 @@ std::vector<TechChar::SolutionData> TechChar::createPatterns(
10511051
tmp << "OUT";
10521052
debugPrint(logger_, CTS, "tech char", 1, tmp.str());
10531053
topology.outPort = outPortPin;
1054-
if (isPureWire) {
1055-
topology.instVector.push_back(nullptr);
1056-
}
10571054
topology.isPureWire = isPureWire;
10581055
topology.netVector.push_back(net);
10591056
topology.nodesWithoutBufVector.push_back(nodesWithoutBuf);
@@ -1478,6 +1475,7 @@ std::vector<TechChar::ResultData> TechChar::characterizationPostProcess()
14781475
unsigned maxResultCapacitance = 0;
14791476
unsigned minResultSlew = std::numeric_limits<unsigned>::max();
14801477
unsigned maxResultSlew = 0;
1478+
14811479
std::vector<ResultData> convertedSolutions;
14821480
for (ResultData solution : selectedSolutions) {
14831481
if (solution.pinSlew <= options_->getMaxCharSlew()) {
@@ -1530,6 +1528,7 @@ std::vector<TechChar::ResultData> TechChar::characterizationPostProcess()
15301528
convertedSolutions.push_back(convertedResult);
15311529
}
15321530
}
1531+
15331532
// Sets the min and max values and returns the result vector.
15341533
minSlew_ = minResultSlew;
15351534
maxSlew_ = maxResultSlew;
@@ -1631,10 +1630,10 @@ void TechChar::create()
16311630
masterNames_.size(), solution.instVector.size());
16321631
// clang-format on
16331632
// For each possible buffer combination (different sizes).
1634-
unsigned buffersUpdate
1633+
unsigned buffersCombinations
16351634
= getBufferingCombo(masterNames_.size(), solution.instVector.size());
16361635

1637-
if (buffersUpdate == 0) {
1636+
if (buffersCombinations == 0) {
16381637
continue;
16391638
}
16401639

@@ -1697,12 +1696,13 @@ void TechChar::create()
16971696
}
16981697
}
16991698
// If the solution is not a pure-wire, update the buffer topologies.
1700-
if (!solution.isPureWire) {
1699+
if (!solution.isPureWire && buffersCombinations > 1) {
17011700
updateBufferTopologies(solution);
17021701
}
1703-
// For pure-wire solution buffersUpdate == 1, so it only runs once.
1704-
buffersUpdate--;
1705-
} while (buffersUpdate != 0);
1702+
// For pure-wire solution buffersCombinations == 1, so it only runs
1703+
// once.
1704+
buffersCombinations--;
1705+
} while (buffersCombinations != 0);
17061706
}
17071707
openStaChar_.reset(nullptr);
17081708
}

0 commit comments

Comments
 (0)