Skip to content

Commit d3ab270

Browse files
authored
Merge pull request #8440 from arthurjolo/cts_remove_unused_functions
Cts remove unused functions
2 parents c2ab7c1 + d429317 commit d3ab270

30 files changed

+24
-1425
lines changed

src/cts/BUILD

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ cc_library(
1919
"src/CtsObserver.h",
2020
"src/HTreeBuilder.h",
2121
"src/LatencyBalancer.h",
22-
"src/LevelBalancer.h",
2322
"src/SinkClustering.h",
2423
"src/TreeBuilder.h",
2524
"src/Util.h",
@@ -41,7 +40,6 @@ cc_library(
4140
"src/CtsOptions.cpp",
4241
"src/HTreeBuilder.cpp",
4342
"src/LatencyBalancer.cpp",
44-
"src/LevelBalancer.cpp",
4543
"src/SinkClustering.cpp",
4644
"src/TechChar.cpp",
4745
"src/TreeBuilder.cpp",

src/cts/include/cts/TritonCTS.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -208,22 +208,6 @@ class TritonCTS
208208
void setAllClocksPropagated();
209209
void repairClockNets();
210210
void balanceMacroRegisterLatencies();
211-
float getVertexClkArrival(sta::Vertex* sinkVertex,
212-
odb::dbNet* topNet,
213-
odb::dbITerm* iterm);
214-
void computeAveSinkArrivals(TreeBuilder* builder, sta::Graph* graph);
215-
void computeSinkArrivalRecur(odb::dbNet* topClokcNet,
216-
odb::dbITerm* iterm,
217-
float& sumArrivals,
218-
unsigned& numSinks,
219-
sta::Graph* graph);
220-
bool propagateClock(odb::dbITerm* input);
221-
void adjustLatencies(TreeBuilder* macroBuilder, TreeBuilder* registerBuilder);
222-
void computeTopBufferDelay(TreeBuilder* builder);
223-
odb::dbInst* insertDelayBuffer(odb::dbInst* driver,
224-
const std::string& clockName,
225-
int locX,
226-
int locY);
227211

228212
sta::dbSta* openSta_ = nullptr;
229213
sta::dbNetwork* network_ = nullptr;

src/cts/src/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ add_library(cts_lib
1414
TechChar.cpp
1515
TritonCTS.cpp
1616
Clustering.cpp
17-
LevelBalancer.cpp
1817
LatencyBalancer.cpp
1918
CtsOptions.cpp
2019
)

src/cts/src/CtsOptions.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,6 @@ class CtsOptions : public odb::dbBlockCallBackObj
277277
return macroSinkClustersSizeSet_;
278278
}
279279
unsigned getNumStaticLayers() const { return numStaticLayers_; }
280-
void setBalanceLevels(bool balance) { balanceLevels_ = balance; }
281-
bool getBalanceLevels() const { return balanceLevels_; }
282280
void setNumStaticLayers(unsigned num) { numStaticLayers_ = num; }
283281
void resetNumStaticLayers() { numStaticLayers_ = 0; }
284282
void setSinkBuffer(const std::string& buffer) { sinkBuffer_ = buffer; }
@@ -400,7 +398,6 @@ class CtsOptions : public odb::dbBlockCallBackObj
400398
bool macroMaxDiameterSet_ = false;
401399
unsigned macroSinkClustersSize_ = 4;
402400
bool macroSinkClustersSizeSet_ = true;
403-
bool balanceLevels_ = false;
404401
unsigned sinkClusteringLevels_ = 0;
405402
unsigned numStaticLayers_ = 0;
406403
std::vector<std::string> bufferList_;

src/cts/src/LatencyBalancer.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ int LatencyBalancer::run()
4545
33,
4646
"Balancing latency for clock {}",
4747
root_->getClock().getSdcName());
48-
worseDelay_ = std::numeric_limits<float>::min();
49-
delayBufIndex_ = 0;
5048
initSta();
5149
findLeafBuilders(root_);
5250
buildGraph(root_->getTopInputNet());
@@ -136,8 +134,8 @@ void LatencyBalancer::buildGraph(odb::dbNet* clkInputNet)
136134
}
137135
int builderSrcId = graph_.size();
138136
GraphNode builderSrcNode
139-
= GraphNode(builderSrcId, rootSrcName, rootOutputITerm);
140-
graph_.push_back(builderSrcNode);
137+
= GraphNode(builderSrcId, std::move(rootSrcName), rootOutputITerm);
138+
graph_.push_back(std::move(builderSrcNode));
141139

142140
std::stack<int> visitNode;
143141
visitNode.push(builderSrcId);
@@ -164,7 +162,7 @@ void LatencyBalancer::buildGraph(odb::dbNet* clkInputNet)
164162
odb::dbInst* sinkInst = sinkIterm->getInst();
165163
std::string sinkName = sinkInst->getName();
166164
GraphNode sinkNode = GraphNode(sinkId, sinkName, sinkIterm);
167-
graph_.push_back(sinkNode);
165+
graph_.push_back(std::move(sinkNode));
168166
graph_[driverId].childrenIds.push_back(sinkId);
169167

170168
if (inst2builder_.find(sinkName) != inst2builder_.end()) {
@@ -440,7 +438,7 @@ void LatencyBalancer::balanceLatencies(int nodeId)
440438
if (!previouBufToInsert) {
441439
previouBufToInsert = bufToInsert;
442440
sinksInput.clear();
443-
sinksInput = children;
441+
sinksInput = std::move(children);
444442
continue;
445443
}
446444

@@ -449,7 +447,7 @@ void LatencyBalancer::balanceLatencies(int nodeId)
449447
= insertDelayBuffers(numBuffers, srcX, srcY, sinksInput);
450448

451449
sinksInput.clear();
452-
sinksInput = children;
450+
sinksInput = std::move(children);
453451
sinksInput.push_back(delauBuffInput);
454452

455453
previouBufToInsert = bufToInsert;

src/cts/src/LatencyBalancer.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ class LatencyBalancer
6666
network_(network),
6767
openSta_(sta),
6868
wireSegmentUnit_(scalingUnit),
69-
capPerDBU_(capPerDBU)
69+
capPerDBU_(capPerDBU),
70+
worseDelay_(std::numeric_limits<float>::min()),
71+
delayBufIndex_(0)
7072
{
7173
}
7274

@@ -115,9 +117,9 @@ class LatencyBalancer
115117
sta::dbSta* openSta_ = nullptr;
116118
sta::Graph* timingGraph_ = nullptr;
117119
double wireSegmentUnit_;
118-
float worseDelay_;
119120
float bufferDelay_;
120121
double capPerDBU_;
122+
float worseDelay_;
121123
int delayBufIndex_;
122124
std::vector<GraphNode> graph_;
123125
std::map<std::string, TreeBuilder*> inst2builder_;

src/cts/src/LevelBalancer.cpp

Lines changed: 0 additions & 185 deletions
This file was deleted.

0 commit comments

Comments
 (0)