From 35d54c3e74d3651bf13eae81b123c282eb39d4ba Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Mon, 1 Feb 2021 16:48:36 +0100 Subject: [PATCH] Take account of Rectilinears in KatanaEngine::setupPowerRails() * New: In QueryPowerRails::addToPowerRail(), now manage Rectilinears, *if* they are, in fact, rectangles. For LibreSOCMem block support. --- katana/src/GlobalRoute.cpp | 6 +++++- katana/src/PowerRails.cpp | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/katana/src/GlobalRoute.cpp b/katana/src/GlobalRoute.cpp index 9d7a96f7..5f319646 100644 --- a/katana/src/GlobalRoute.cpp +++ b/katana/src/GlobalRoute.cpp @@ -80,10 +80,13 @@ namespace { if (source->getGCell()->isStdCellRow() and target->getGCell()->isStdCellRow()) return Vertex::unreachable; + cdebug_log(112,0) << "DigitalDistance::operator(): " << edge + << " isGostraight():" << source->getGCell()->isGoStraight() << endl; if ( source->getGCell()->isGoStraight() and source->getFrom() and (source->getFrom()->isHorizontal() xor edge->isHorizontal())) return Vertex::unreachable; + cdebug_log(112,0) << "Not a go straight" << endl; if (edge->getCapacity() <= 0) { if (target->getGCell()->isStdCellRow() @@ -94,9 +97,11 @@ namespace { and source->hasValidStamp() and (source->getConnexId() >= 0) ) return 0; + cdebug_log(112,0) << "Negative or null edge capacity: " << edge->getCapacity() << endl; return Vertex::unreachable; } + cdebug_log(112,0) << "Computing distance" << endl; float congestionCost = 1.0; float congestion = ((float)edge->getRealOccupancy() + edge->getEstimateOccupancy()) / (float)edge->getCapacity(); @@ -110,7 +115,6 @@ namespace { /*and not source->hasGContact(_net)*/ ) { viaCost += 2.5; } - float realCongestion = (float)edge->getRealOccupancy() / (float)edge->getCapacity(); float historicCost = edge->getHistoricCost(); diff --git a/katana/src/PowerRails.cpp b/katana/src/PowerRails.cpp index f893db7e..8d719ca4 100644 --- a/katana/src/PowerRails.cpp +++ b/katana/src/PowerRails.cpp @@ -26,6 +26,7 @@ #include "hurricane/Pad.h" #include "hurricane/Horizontal.h" #include "hurricane/Vertical.h" +#include "hurricane/Rectilinear.h" #include "hurricane/RoutingPad.h" #include "hurricane/NetExternalComponents.h" #include "hurricane/NetRoutingProperty.h" @@ -54,6 +55,7 @@ namespace { using Hurricane::DeepNet; using Hurricane::Horizontal; using Hurricane::Pad; + using Hurricane::Rectilinear; using Hurricane::Vertical; using Hurricane::RoutingPad; using Hurricane::NetExternalComponents; @@ -1107,6 +1109,19 @@ namespace { << " " << basicLayer << endl; _powerRailsPlanes.merge( bb, rootNet ); + } else { + const Rectilinear* rectilinear = dynamic_cast(component); + if (rectilinear and (rectilinear->getPoints().size() == 5)) { + _goMatchCount++; + + Box bb = rectilinear->getBoundingBox( basicLayer ); + transformation.applyOn( bb ); + + cdebug_log(159,0) << " Merging PowerRail element: " << rectilinear << " bb:" << bb + << " " << basicLayer << endl; + + _powerRailsPlanes.merge( bb, rootNet ); + } } } }