Skip to content

Commit 393f4ff

Browse files
committed
grt: add function to find clock nets
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
1 parent 2b83ae5 commit 393f4ff

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/grt/include/grt/GlobalRouter.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,8 @@ class GlobalRouter
438438
void computeCapacities(int max_layer);
439439
void findTrackPitches(int max_layer);
440440
std::vector<Net*> findNets(bool init_clock_nets);
441+
void findClockNets(const std::vector<Net*>& nets,
442+
std::set<odb::dbNet*>& clock_nets);
441443
void computeObstructionsAdjustments();
442444
void findLayerExtensions(std::vector<int>& layer_extensions);
443445
int findObstructions(odb::Rect& die_area);

src/grt/src/GlobalRouter.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3794,6 +3794,16 @@ std::vector<Net*> GlobalRouter::findNets(bool init_clock_nets)
37943794
return nets;
37953795
}
37963796

3797+
void GlobalRouter::findClockNets(const std::vector<Net*>& nets,
3798+
std::set<odb::dbNet*>& clock_nets)
3799+
{
3800+
for (Net* net : nets) {
3801+
if (net->isClockNet()) {
3802+
clock_nets.insert(net->getDbNet());
3803+
}
3804+
}
3805+
}
3806+
37973807
Net* GlobalRouter::addNet(odb::dbNet* db_net)
37983808
{
37993809
if (!db_net->getSigType().isSupply() && !db_net->isSpecial()

0 commit comments

Comments
 (0)