Skip to content

Commit da61325

Browse files
authored
Merge pull request #8703 from arthurjolo/est_remove_wrong_dead_code
EST: Remove dead code
2 parents a534c43 + 91e56c4 commit da61325

4 files changed

Lines changed: 0 additions & 104 deletions

File tree

src/est/include/est/EstimateParasitics.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,6 @@ class EstimateParasitics : public dbStaState
247247
bool isPadPin(const Pin* pin) const;
248248
bool isPad(const Instance* inst) const;
249249
float pinCapacitance(const Pin* pin, const DcalcAnalysisPt* dcalc_ap) const;
250-
float totalLoad(SteinerTree* tree) const;
251-
float subtreeLoad(SteinerTree* tree,
252-
float cap_per_micron,
253-
SteinerPt pt) const;
254250
odb::dbTechLayer* getPinLayer(const Pin* pin);
255251
double computeAverageCutResistance(Corner* corner);
256252
void parasiticNodeConnectPins(Parasitic* parasitic,

src/est/include/est/SteinerTree.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ class SteinerTree
103103
const std::vector<SteinerPt>& adj1,
104104
const std::vector<SteinerPt>& adj2,
105105
const std::vector<SteinerPt>& adj3);
106-
int distance(SteinerPt from, SteinerPt to) const;
107106

108107
// "Accessors" for SteinerPts.
109108
const char* name(SteinerPt pt, const Network* network);

src/est/src/EstimateParasitics.cpp

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -775,72 +775,6 @@ float EstimateParasitics::pinCapacitance(const Pin* pin,
775775
return 0.0;
776776
}
777777

778-
float EstimateParasitics::totalLoad(SteinerTree* tree) const
779-
{
780-
if (!tree) {
781-
return 0;
782-
}
783-
784-
SteinerPt top_pt = tree->top();
785-
SteinerPt drvr_pt = tree->drvrPt();
786-
787-
if (top_pt == SteinerNull) {
788-
return 0;
789-
}
790-
791-
auto top_loc = tree->location(top_pt);
792-
auto drvr_loc = tree->location(drvr_pt);
793-
int length = tree->distance(drvr_pt, top_pt);
794-
double dx
795-
= dbuToMeters(std::abs(top_loc.x() - drvr_loc.x())) / dbuToMeters(length);
796-
double dy
797-
= dbuToMeters(std::abs(top_loc.y() - drvr_loc.y())) / dbuToMeters(length);
798-
799-
float load = 0.0, max_load = 0.0;
800-
801-
debugPrint(logger_, EST, "estimate_parasitics", 1, "Steiner totalLoad ");
802-
// For now we will just look at the worst corner for totalLoad
803-
for (Corner* corner : *sta_->corners()) {
804-
double wire_cap = dx * wireSignalHCapacitance(corner)
805-
+ dy * wireSignalVCapacitance(corner);
806-
float top_length = dbuToMeters(tree->distance(drvr_pt, top_pt));
807-
float subtree_load = subtreeLoad(tree, wire_cap, top_pt);
808-
load = top_length * wire_cap + subtree_load;
809-
max_load = std::max(max_load, load);
810-
}
811-
return max_load;
812-
}
813-
814-
float EstimateParasitics::subtreeLoad(SteinerTree* tree,
815-
float cap_per_micron,
816-
SteinerPt pt) const
817-
{
818-
if (pt == SteinerNull) {
819-
return 0;
820-
}
821-
SteinerPt left_pt = tree->left(pt);
822-
SteinerPt right_pt = tree->right(pt);
823-
824-
if ((left_pt == SteinerNull) && (right_pt == SteinerNull)) {
825-
return (this->pinCapacitance(tree->pin(pt), tgt_slew_dcalc_ap_));
826-
}
827-
828-
float left_cap = 0;
829-
float right_cap = 0;
830-
831-
if (left_pt != SteinerNull) {
832-
const float left_length = dbuToMeters(tree->distance(pt, left_pt));
833-
left_cap = subtreeLoad(tree, cap_per_micron, left_pt)
834-
+ (left_length * cap_per_micron);
835-
}
836-
if (right_pt != SteinerNull) {
837-
const float right_length = dbuToMeters(tree->distance(pt, right_pt));
838-
right_cap = subtreeLoad(tree, cap_per_micron, right_pt)
839-
+ (right_length * cap_per_micron);
840-
}
841-
return left_cap + right_cap;
842-
}
843-
844778
odb::dbTechLayer* EstimateParasitics::getPinLayer(const Pin* pin)
845779
{
846780
odb::dbITerm* iterm;

src/est/src/SteinerTree.cpp

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -271,39 +271,6 @@ void SteinerTree::populateSides(const SteinerPt from,
271271
}
272272
}
273273

274-
int SteinerTree::distance(const SteinerPt from, const SteinerPt to) const
275-
{
276-
if (from == SteinerNull || to == SteinerNull) {
277-
return -1;
278-
}
279-
if (from == to) {
280-
return 0;
281-
}
282-
const odb::Point from_pt = location(from);
283-
const odb::Point to_pt = location(to);
284-
const SteinerPt left_from = left(from);
285-
const SteinerPt right_from = right(from);
286-
if (left_from == to || right_from == to) {
287-
return abs(from_pt.x() - to_pt.x()) + abs(from_pt.y() - to_pt.y());
288-
}
289-
if (left_from == SteinerNull && right_from == SteinerNull) {
290-
return -1;
291-
}
292-
293-
const int find_left = distance(left_from, to);
294-
if (find_left >= 0) {
295-
return find_left + abs(from_pt.x() - to_pt.x())
296-
+ abs(from_pt.y() - to_pt.y());
297-
}
298-
299-
const int find_right = distance(right_from, to);
300-
if (find_right >= 0) {
301-
return find_right + abs(from_pt.x() - to_pt.x())
302-
+ abs(from_pt.y() - to_pt.y());
303-
}
304-
return -1;
305-
}
306-
307274
const Pin* SteinerTree::pin(const SteinerPt pt) const
308275
{
309276
validatePoint(pt);

0 commit comments

Comments
 (0)