Skip to content

Commit 49ac76d

Browse files
authored
Merge pull request The-OpenROAD-Project#7470 from gadfort/pdn-markers
pdn: add marker category for repair channels
2 parents 01aa43f + 09e4001 commit 49ac76d

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

src/pdn/src/connect.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -920,6 +920,8 @@ void Connect::recordFailedVias() const
920920
tool_category = odb::dbMarkerCategory::create(grid_->getBlock(), "PDN");
921921
tool_category->setSource("PDN");
922922
}
923+
odb::dbMarkerCategory* via_category
924+
= odb::dbMarkerCategory::createOrGet(tool_category, "Via");
923925

924926
for (const auto& [reason, shapes] : failed_vias_) {
925927
std::string reason_str;
@@ -937,8 +939,8 @@ void Connect::recordFailedVias() const
937939
reason_str = "Ripup";
938940
break;
939941
case failedViaReason::RECHECK:
940-
reason_str = "Recheck";
941-
break;
942+
// Do not report recheck vias
943+
continue;
942944
case failedViaReason::OTHER:
943945
reason_str = "Other";
944946
break;
@@ -948,7 +950,7 @@ void Connect::recordFailedVias() const
948950
reason_str += " - " + layer0_->getName() + " -> " + layer1_->getName();
949951

950952
odb::dbMarkerCategory* category
951-
= odb::dbMarkerCategory::createOrGet(tool_category, reason_str.c_str());
953+
= odb::dbMarkerCategory::createOrGet(via_category, reason_str.c_str());
952954

953955
for (const auto& [net, shape] : shapes) {
954956
odb::dbMarker* marker = odb::dbMarker::create(category);

src/pdn/src/straps.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2361,6 +2361,14 @@ void RepairChannelStraps::repairGridChannels(
23612361
} else {
23622362
const auto remaining_channels = findRepairChannels(grid);
23632363
if (!remaining_channels.empty()) {
2364+
odb::dbMarkerCategory* tool_category
2365+
= grid->getBlock()->findMarkerCategory("PDN");
2366+
if (tool_category == nullptr) {
2367+
tool_category = odb::dbMarkerCategory::create(grid->getBlock(), "PDN");
2368+
tool_category->setSource("PDN");
2369+
}
2370+
odb::dbMarkerCategory* category = odb::dbMarkerCategory::createOrReplace(
2371+
tool_category, "Repair channels");
23642372
// if channels remain, report them and generate error
23652373
const double dbu_to_microns = grid->getBlock()->getDbUnitsPerMicron();
23662374
for (const auto& channel : remaining_channels) {
@@ -2378,6 +2386,15 @@ void RepairChannelStraps::repairGridChannels(
23782386
Shape::getRectText(channel.area, dbu_to_microns),
23792387
channel.connect_to->getName(),
23802388
nets);
2389+
2390+
odb::dbMarker* marker = odb::dbMarker::create(category);
2391+
if (marker == nullptr) {
2392+
continue;
2393+
}
2394+
marker->addShape(channel.area);
2395+
for (auto* net : channel.nets) {
2396+
marker->addSource(net);
2397+
}
23812398
}
23822399
if (!allow) {
23832400
grid->getLogger()->error(

0 commit comments

Comments
 (0)