Fix overlap of non-used RoutinPads in VH,2RL styles.

* New: In KatanaEngine::digitalInit(), when using a "VH,2RL" style,
    protect all RoutingPads of each net, because unlike "2RL+" style,
    the standard cell RoutingPads are not in a "below" layer only
    used inside the cell, but on the V layer. So the area of the RP,
    even if not fully used to connect, must be protected.
* Change: In NegociateOverlapCost(), when computing cost from a fixed
    or blockage, do not set the infinite flag if it's the *same* net.
* New: In KatanaEngine::protectRoutingPads(), add a new "flags" argument
    to pass on whether we want to protect the the RP candidates or just
    the non-used ones.
* Change: In protectRoutingpad(), change the formula (again) to compute
    the berth to give to a fixed segment... Should really try to
    summarize all the case.
* Change: In TrackFixedSegment::getNet(), no longer return the blockage
    net if the real net is tagged as clock.
This commit is contained in:
Jean-Paul Chaput 2023-01-18 23:42:38 +01:00
parent 047bf14921
commit 96fe367cc0
7 changed files with 46 additions and 24 deletions

View File

@ -39,6 +39,7 @@ namespace Katana {
const Hurricane::BaseFlags Flags::ShowOverloadedEdges = (1L << 35);
const Hurricane::BaseFlags Flags::ShowOverloadedGCells = (1L << 36);
const Hurricane::BaseFlags Flags::ShowBloatedInstances = (1L << 37);
const Hurricane::BaseFlags Flags::ProtectSelf = (1L << 38);
} // Anabatic namespace.

View File

@ -243,6 +243,7 @@ namespace Katana {
void KatanaEngine::digitalInit ()
{
cdebug_log(155,1) << "KatanaEngine::_initDataBase()" << endl;
_runKatanaInit();
setRoutingMode( DigitalMode );
@ -260,10 +261,11 @@ namespace Katana {
} else {
if (not isChannelStyle()) {
setupPowerRails();
protectRoutingPads();
Flags flags = (getConfiguration()->getNetBuilderStyle() == "VH,2RL")
? Flags::ProtectSelf : Flags::NoFlags;
protectRoutingPads( flags );
}
}
_runKatanaInit();
cdebug_tabw(155,-1);
}

View File

@ -55,22 +55,29 @@ namespace {
void NegociateOverlapCost ( const TrackElement* segment, TrackCost& cost )
{
cdebug_log(9000,0) << "Deter| NegociateOverlapCost() " << segment << endl;
cdebug_log(159,1) << "NegociateOverlapCost() " << segment << endl;
Interval intersect = segment->getCanonicalInterval();
if (not intersect.intersect(cost.getInterval())) return;
if ( segment->isBlockage()
or (segment->isFixed()
and not (segment->isVertical() and Session::getKatanaEngine()->isChannelStyle()))) {
cdebug_log(159,0) << "Infinite cost from: " << segment << endl;
cost.setInfinite ();
cost.setOverlap ();
cost.setHardOverlap();
cost.setBlockage ();
if (not intersect.intersect(cost.getInterval())) {
cdebug_tabw(159,-1);
return;
}
if (segment->getNet() != cost.getNet()) {
cdebug_log(159,0) << segment->getNet() << " vs. " << cost.getNet() << endl;
if ( segment->isBlockage()
or (segment->isFixed()
and not (segment->isVertical() and Session::getKatanaEngine()->isChannelStyle()))) {
cdebug_log(159,0) << "Infinite cost from: " << segment << endl;
cost.setInfinite ();
cost.setOverlap ();
cost.setHardOverlap();
cost.setBlockage ();
cdebug_tabw(159,-1);
return;
}
}
if (cost.getInterval().getVMax() > intersect.getVMax()) cost.setLeftOverlap();
if (cost.getInterval().getVMin() < intersect.getVMin()) cost.setRightOverlap();
@ -85,7 +92,10 @@ namespace {
}
DataNegociate* data = segment->getDataNegociate();
if (not data) return;
if (not data) {
cdebug_tabw(159,-1);
return;
}
TrackElement* refSegment = cost.getRefElement();
DataNegociate* refData = refSegment->getDataNegociate();
@ -129,6 +139,7 @@ namespace {
cost.setInfinite ();
cost.setOverlap ();
cost.setHardOverlap();
cdebug_tabw(159,-1);
return;
}
}
@ -165,6 +176,7 @@ namespace {
cdebug_log(159,0) << "Infinite cost from (RP access)" << segment << endl;
}
cdebug_tabw(159,-1);
}

View File

@ -71,7 +71,7 @@ namespace {
using namespace Katana;
void protectRoutingPad ( RoutingPad* rp )
void protectRoutingPad ( RoutingPad* rp, Flags flags )
{
cdebug_log(145,1) << "::protectRoutingPad() " << rp << endl;
@ -87,6 +87,7 @@ namespace {
, getString(rp->getNet()->getName()).c_str()
, getString(usedComponent).c_str()
) << endl;
cdebug_tabw(145,-1);
return;
}
if (Session::getRoutingGauge()->getLayerType(usedComponent->getLayer()) == Constant::PinOnly) {
@ -111,7 +112,8 @@ namespace {
RoutingPlane* plane = Session::getKatanaEngine()->getRoutingPlaneByLayer(segment->getLayer());
if (not plane) continue;
if (usedComponent == dynamic_cast<Component*>(segment)) continue;
if (usedComponent == dynamic_cast<Component*>(segment)
and not (flags & Flags::ProtectSelf)) continue;
if (not NetExternalComponents::isExternal(segment)) continue;
segments.push_back( segment );
@ -121,8 +123,8 @@ namespace {
RoutingPlane* plane = Session::getKatanaEngine()->getRoutingPlaneByLayer(segments[i]->getLayer());
Flags direction = plane->getDirection();
DbU::Unit wireWidth = plane->getLayerGauge()->getWireWidth();
DbU::Unit delta = plane->getLayerGauge()->getHalfPitch()
+ wireWidth/2
DbU::Unit delta = plane->getLayerGauge()->getPitch()
- wireWidth/2
- DbU::fromLambda(0.1);
DbU::Unit extension = segments[i]->getLayer()->getExtentionCap();
Box bb ( segments[i]->getBoundingBox() );
@ -130,6 +132,7 @@ namespace {
transformation.applyOn ( bb );
cdebug_log(145,0) << "@ " << segments[i] << " bb:" << bb << endl;
cdebug_log(145,0) << "delta=" << DbU::getValueString(delta) << endl;
if ( direction == Flags::Horizontal ) {
DbU::Unit axisMin = bb.getYMin() - delta;
@ -181,7 +184,7 @@ namespace Katana {
using Anabatic::NetData;
void KatanaEngine::protectRoutingPads ()
void KatanaEngine::protectRoutingPads ( Flags flags )
{
cmess1 << " o Protect external components not useds as RoutingPads." << endl;
@ -191,22 +194,24 @@ namespace Katana {
if (net->isSupply()) continue;
DebugSession::open( net, 145, 150 );
cdebug_log(145,0) << "Protect RoutingPads of " << net << endl;
NetData* data = getNetData( net );
if (data and data->isFixed()) continue;
vector<RoutingPad*> rps;
for ( RoutingPad* rp : net->getRoutingPads() ) {
for ( RoutingPad* rp : net->getRoutingPads() )
rps.push_back( rp );
}
for ( size_t i=0 ; i<rps.size() ; ++i )
protectRoutingPad( rps[i] );
protectRoutingPad( rps[i], flags );
DebugSession::close();
}
Session::close();
cerr.flush();
cout.flush();
}

View File

@ -198,7 +198,8 @@ namespace Katana {
Net* TrackFixedSegment::getNet () const
{
Net* realNet = _segment->getNet();
if (realNet->isSupply() or realNet->isClock())
//if (realNet->isSupply() or realNet->isClock())
if (realNet->isSupply())
return Session::getBlockageNet();
return realNet;
}

View File

@ -48,6 +48,7 @@ namespace Katana {
static const Hurricane::BaseFlags ShowOverloadedEdges;
static const Hurricane::BaseFlags ShowOverloadedGCells;
static const Hurricane::BaseFlags ShowBloatedInstances;
static const Hurricane::BaseFlags ProtectSelf;
public:
inline Flags ( uint64_t );
inline Flags ( const Super& );

View File

@ -121,7 +121,7 @@ namespace Katana {
DataSymmetric* addDataSymmetric ( Net* );
void setupChannelMode ();
void setupPowerRails ();
void protectRoutingPads ();
void protectRoutingPads ( Flags flags=Flags::NoFlags );
void preProcess ();
void setInterrupt ( bool );
void createChannels ();