Skip to content

Commit e3f3c10

Browse files
committed
est: add via resistances from the pin layer to the tree layer
Signed-off-by: Eder Monteiro <[email protected]>
1 parent 3f97fc0 commit e3f3c10

File tree

1 file changed

+32
-6
lines changed

1 file changed

+32
-6
lines changed

src/est/src/EstimateParasitics.cpp

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "db_sta/SpefWriter.hh"
1616
#include "db_sta/dbNetwork.hh"
1717
#include "grt/GlobalRouter.h"
18+
#include "odb/dbShape.h"
1819
#include "sta/ArcDelayCalc.hh"
1920
#include "sta/Corner.hh"
2021
#include "sta/DcalcAnalysisPt.hh"
@@ -716,8 +717,10 @@ void EstimateParasitics::estimateWireParasiticSteiner(const Pin* drvr_pin,
716717
parasitics_->makeResistor(parasitic, resistor_id++, res, n1, n2);
717718
parasitics_->incrCap(n2, cap / 2.0);
718719
}
719-
parasiticNodeConnectPins(parasitic, n1, tree, steiner_pt1, resistor_id);
720-
parasiticNodeConnectPins(parasitic, n2, tree, steiner_pt2, resistor_id);
720+
parasiticNodeConnectPins(
721+
parasitic, n1, tree, steiner_pt1, resistor_id, corner, is_clk);
722+
parasiticNodeConnectPins(
723+
parasitic, n2, tree, steiner_pt2, resistor_id, corner, is_clk);
721724
}
722725
if (spef_writer) {
723726
spef_writer->writeNet(corner, net, parasitic);
@@ -840,16 +843,39 @@ void EstimateParasitics::parasiticNodeConnectPins(Parasitic* parasitic,
840843
ParasiticNode* node,
841844
SteinerTree* tree,
842845
SteinerPt pt,
843-
size_t& resistor_id)
846+
size_t& resistor_id,
847+
Corner* corner,
848+
const bool is_clk)
844849
{
845850
const PinSeq* pins = tree->pins(pt);
846851
if (pins) {
852+
odb::dbTechLayer* tree_layer = is_clk ? clk_layers_[0] : signal_layers_[0];
847853
for (const Pin* pin : *pins) {
848854
ParasiticNode* pin_node
849855
= parasitics_->ensureParasiticNode(parasitic, pin, network_);
850-
// Use a small resistor to keep the connectivity intact.
851-
parasitics_->makeResistor(
852-
parasitic, resistor_id++, 1.0e-3, node, pin_node);
856+
if (tree_layer != nullptr && !layer_res_.empty()) {
857+
odb::dbTechLayer* pin_layer = getPinLayer(pin);
858+
859+
for (int layer_number = pin_layer->getNumber();
860+
layer_number < tree_layer->getNumber();
861+
layer_number++) {
862+
odb::dbTechLayer* via_layer = db_->getTech()->findLayer(layer_number);
863+
if (via_layer->getType() == odb::dbTechLayerType::CUT) {
864+
float cut_res = layer_res_[layer_number][corner->index()];
865+
if (cut_res > 0.0) {
866+
parasitics_->makeResistor(
867+
parasitic, resistor_id++, cut_res, node, pin_node);
868+
} else {
869+
parasitics_->makeResistor(
870+
parasitic, resistor_id++, 1.0e-3, node, pin_node);
871+
}
872+
}
873+
}
874+
} else {
875+
// Use a small resistor to keep the connectivity intact.
876+
parasitics_->makeResistor(
877+
parasitic, resistor_id++, 1.0e-3, node, pin_node);
878+
}
853879
}
854880
}
855881
}

0 commit comments

Comments
 (0)