Skip to content

Commit 47c8ddb

Browse files
committed
ant: modify designIsPlaced function to avoid checking special nets
Signed-off-by: luis201420 <[email protected]>
1 parent 7648711 commit 47c8ddb

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

src/ant/src/AntennaChecker.cc

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,15 +1095,28 @@ Violations AntennaChecker::getAntennaViolations(odb::dbNet* net,
10951095

10961096
bool AntennaChecker::designIsPlaced()
10971097
{
1098+
if (db_->getChip() == nullptr) {
1099+
logger_->error(
1100+
utl::ANT,
1101+
18,
1102+
"Load a design before running the antenna checker commands.");
1103+
}
1104+
10981105
for (odb::dbBTerm* bterm : block_->getBTerms()) {
10991106
if (bterm->getFirstPinPlacementStatus() == odb::dbPlacementStatus::NONE) {
11001107
return false;
11011108
}
11021109
}
11031110

1104-
for (odb::dbInst* inst : block_->getInsts()) {
1105-
if (!inst->isPlaced()) {
1106-
return false;
1111+
for (odb::dbNet* net : block_->getNets()) {
1112+
if (net->isSpecial()) {
1113+
continue;
1114+
}
1115+
for (odb::dbITerm* iterm : net->getITerms()) {
1116+
odb::dbInst* inst = iterm->getInst();
1117+
if (!inst->isPlaced()) {
1118+
return false;
1119+
}
11071120
}
11081121
}
11091122

0 commit comments

Comments
 (0)