Skip to content

Commit 3f97fc0

Browse files
committed
est: sort clk and signal layers
Signed-off-by: Eder Monteiro <[email protected]>
1 parent 7a9a921 commit 3f97fc0

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/est/include/est/EstimateParasitics.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ class EstimateParasitics : public dbStaState
127127
double& cap) const;
128128
void addClkLayer(odb::dbTechLayer* layer);
129129
void addSignalLayer(odb::dbTechLayer* layer);
130+
void sortClkAndSignalLayers();
130131
// Set the resistance and capacitance used for horizontal parasitics on signal
131132
// nets.
132133
void setHWireSignalRC(const Corner* corner,

src/est/src/EstimateParasitics.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,16 @@ void EstimateParasitics::addSignalLayer(odb::dbTechLayer* layer)
128128
signal_layers_.push_back(layer);
129129
}
130130

131+
void EstimateParasitics::sortClkAndSignalLayers()
132+
{
133+
auto sortLayers = [](const odb::dbTechLayer* a, const odb::dbTechLayer* b) {
134+
return a->getNumber() < b->getNumber();
135+
};
136+
137+
std::sort(clk_layers_.begin(), clk_layers_.end(), sortLayers);
138+
std::sort(signal_layers_.begin(), signal_layers_.end(), sortLayers);
139+
}
140+
131141
void EstimateParasitics::setHWireSignalRC(const Corner* corner,
132142
double res,
133143
double cap)
@@ -530,6 +540,9 @@ void EstimateParasitics::estimateWireParasitics(SpefWriter* spef_writer)
530540
// Note that in hierarchy mode, this will not present all the nets,
531541
// which is intent here. So get all flat nets from block
532542
//
543+
544+
sortClkAndSignalLayers();
545+
533546
odb::dbSet<odb::dbNet> nets = block_->getNets();
534547
for (auto db_net : nets) {
535548
Net* cur_net = db_network_->dbToSta(db_net);

0 commit comments

Comments
 (0)