Support of RoutingGauge, part 2.
In Katabatic & Kite, remove all hard-coded values related to track pitches. * New: In <Session>, add more convenience function to access RoutingGauge characteristics. * New: In <AutoSegment>, <AutoContact>, add support for the "depth spin", that is, if the source/target contacts are going "top" or "down". Used to compute the perpandicular pitch. Need a small modification of the revalidation mechanism. The observers of <AutoSegment> are notified when the spin changes. * New: In <AutoSegment>, the getPPitch() method allow to compute the "perpandicular pitch". For now it is simply the greatest from the source perpandicular pitch and the target perpandicular pitch. Make uses of the "depth spin". * New: In <TrackElement>, <TrackSegment>, cache the perpandicular pitch. Updated through the notification from the observable.
This commit is contained in:
parent
65d2cc98b8
commit
2dd36b9624
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
|
|
|
@ -185,6 +185,18 @@
|
||||||
//! This AutoSegment has been created to to reconnect parts of an AutoSegment
|
//! This AutoSegment has been created to to reconnect parts of an AutoSegment
|
||||||
//! after slackening.
|
//! after slackening.
|
||||||
|
|
||||||
|
//! \var AutoSegmentFlag::SegSourceTop
|
||||||
|
//! The source contact of this segment is connected to the <em>top</em> layer.
|
||||||
|
|
||||||
|
//! \var AutoSegmentFlag::SegSourceBottom
|
||||||
|
//! The source contact of this segment is connected to the <em>bottom</em> layer.
|
||||||
|
|
||||||
|
//! \var AutoSegmentFlag::SegTargetTop
|
||||||
|
//! The target contact of this segment is connected to the <em>top</em> layer.
|
||||||
|
|
||||||
|
//! \var AutoSegmentFlag::SegTargetBottom
|
||||||
|
//! The target contact of this segment is connected to the <em>bottom</em> layer.
|
||||||
|
|
||||||
//! \var AutoSegmentFlag::SegLayerChange
|
//! \var AutoSegmentFlag::SegLayerChange
|
||||||
//! This AutoSegment has been created to to reconnect parts of an AutoSegment
|
//! This AutoSegment has been created to to reconnect parts of an AutoSegment
|
||||||
//! after a layer change.
|
//! after a layer change.
|
||||||
|
|
|
@ -31,11 +31,13 @@
|
||||||
//! \var KbWithPerpands
|
//! \var KbWithPerpands
|
||||||
//! Request that AutoSegments in perpandicular direction should be includeds.
|
//! Request that AutoSegments in perpandicular direction should be includeds.
|
||||||
|
|
||||||
//! \var KbBySource
|
//! \var KbSource
|
||||||
//! Request AutoSegments anchored by their source anchor.
|
//! Request AutoSegments anchored by their source anchor or that some
|
||||||
|
//! operation has to be performed on the source.
|
||||||
|
|
||||||
//! \var KbByTarget
|
//! \var KbTarget
|
||||||
//! Request AutoSegments anchored by their target anchor.
|
//! Request AutoSegments anchored by their target anchor or that some
|
||||||
|
//! operation has to be performed on the target.
|
||||||
|
|
||||||
//! \var KbWarnOnError
|
//! \var KbWarnOnError
|
||||||
//! Display a warning if something has gone wrong.
|
//! Display a warning if something has gone wrong.
|
||||||
|
|
|
@ -286,7 +286,7 @@
|
||||||
border: 2px solid black;
|
border: 2px solid black;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.center {
|
div.center, div.image {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC 2008-2013, All Rights Reserved
|
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
@ -30,7 +29,6 @@
|
||||||
#include "hurricane/RoutingPad.h"
|
#include "hurricane/RoutingPad.h"
|
||||||
#include "hurricane/Vertical.h"
|
#include "hurricane/Vertical.h"
|
||||||
#include "hurricane/Horizontal.h"
|
#include "hurricane/Horizontal.h"
|
||||||
#include "hurricane/UpdateSession.h"
|
|
||||||
#include "hurricane/DebugSession.h"
|
#include "hurricane/DebugSession.h"
|
||||||
#include "crlcore/RoutingGauge.h"
|
#include "crlcore/RoutingGauge.h"
|
||||||
#include "katabatic/AutoContact.h"
|
#include "katabatic/AutoContact.h"
|
||||||
|
@ -90,10 +88,10 @@ namespace Katabatic {
|
||||||
restoreNativeConstraintBox();
|
restoreNativeConstraintBox();
|
||||||
|
|
||||||
ltrace(90) << "Native CBox: " << this
|
ltrace(90) << "Native CBox: " << this
|
||||||
<< " <" << DbU::getLambda(getCBXMin())
|
<< " <" << DbU::toLambda(getCBXMin())
|
||||||
<< " " << DbU::getLambda(getCBYMin())
|
<< " " << DbU::toLambda(getCBYMin())
|
||||||
<< " " << DbU::getLambda(getCBXMax())
|
<< " " << DbU::toLambda(getCBXMax())
|
||||||
<< " " << DbU::getLambda(getCBYMax()) << ">" << endl;
|
<< " " << DbU::toLambda(getCBYMax()) << ">" << endl;
|
||||||
|
|
||||||
Session::link( this );
|
Session::link( this );
|
||||||
invalidate( KbTopology );
|
invalidate( KbTopology );
|
||||||
|
@ -212,6 +210,9 @@ namespace Katabatic {
|
||||||
|
|
||||||
void AutoContact::getLengths ( DbU::Unit* lengths, AutoSegment::DepthLengthSet& processeds )
|
void AutoContact::getLengths ( DbU::Unit* lengths, AutoSegment::DepthLengthSet& processeds )
|
||||||
{
|
{
|
||||||
|
DbU::Unit hSideLength = getGCell()->getSide( KbHorizontal ).getSize();
|
||||||
|
DbU::Unit vSideLength = getGCell()->getSide( KbVertical ).getSize();
|
||||||
|
|
||||||
forEach ( AutoSegment*, isegment, getAutoSegments() ) {
|
forEach ( AutoSegment*, isegment, getAutoSegments() ) {
|
||||||
bool isSourceHook = (isegment->getAutoSource() == this);
|
bool isSourceHook = (isegment->getAutoSource() == this);
|
||||||
|
|
||||||
|
@ -223,9 +224,11 @@ namespace Katabatic {
|
||||||
if (isegment->isLocal()) {
|
if (isegment->isLocal()) {
|
||||||
length = isegment->getLength();
|
length = isegment->getLength();
|
||||||
lengths[depth] += length;
|
lengths[depth] += length;
|
||||||
if ( not isegment->isUnbound() and (abs(length) > DbU::lambda(50.0)) )
|
|
||||||
|
DbU::Unit sideLength = (isegment->isHorizontal()) ? hSideLength : vSideLength;
|
||||||
|
if ( not isegment->isUnbound() and (abs(length) > sideLength) )
|
||||||
cerr << Error("Suspicious length:%.2f of %s."
|
cerr << Error("Suspicious length:%.2f of %s."
|
||||||
,DbU::getLambda(length),getString(*isegment).c_str()) << endl;
|
,DbU::toLambda(length),getString(*isegment).c_str()) << endl;
|
||||||
} else {
|
} else {
|
||||||
if ( isegment->isHorizontal() ) {
|
if ( isegment->isHorizontal() ) {
|
||||||
if ( isSourceHook )
|
if ( isSourceHook )
|
||||||
|
@ -250,19 +253,27 @@ namespace Katabatic {
|
||||||
Interval AutoContact::getNativeUConstraints ( unsigned int direction ) const
|
Interval AutoContact::getNativeUConstraints ( unsigned int direction ) const
|
||||||
{
|
{
|
||||||
Box nativeConstraints = getNativeConstraintBox();
|
Box nativeConstraints = getNativeConstraintBox();
|
||||||
|
Interval constraint;
|
||||||
if (direction & KbHorizontal) {
|
if (direction & KbHorizontal) {
|
||||||
return Interval( nativeConstraints.getXMin(), nativeConstraints.getXMax() );
|
constraint = Interval( nativeConstraints.getXMin(), nativeConstraints.getXMax() );
|
||||||
|
} else {
|
||||||
|
constraint = Interval( nativeConstraints.getYMin(), nativeConstraints.getYMax() );
|
||||||
}
|
}
|
||||||
return Interval( nativeConstraints.getYMin(), nativeConstraints.getYMax() );
|
if (direction & KbNoGCellShrink) constraint.inflate( 0, GCell::getTopRightShrink() );
|
||||||
|
return constraint;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Interval AutoContact::getUConstraints ( unsigned int direction ) const
|
Interval AutoContact::getUConstraints ( unsigned int direction ) const
|
||||||
{
|
{
|
||||||
|
Interval constraint;
|
||||||
if (direction & KbHorizontal) {
|
if (direction & KbHorizontal) {
|
||||||
return Interval( getCBXMin(), getCBXMax() );
|
constraint = Interval( getCBXMin(), getCBXMax() );
|
||||||
|
} else {
|
||||||
|
constraint = Interval( getCBYMin(), getCBYMax() );
|
||||||
}
|
}
|
||||||
return Interval( getCBYMin(), getCBYMax() );
|
if (direction & KbNoGCellShrink) constraint.inflate( 0, GCell::getTopRightShrink() );
|
||||||
|
return constraint;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -429,13 +440,13 @@ namespace Katabatic {
|
||||||
cerr << Error ( "Incompatible DY restriction on %s", _getString().c_str() ) << endl;
|
cerr << Error ( "Incompatible DY restriction on %s", _getString().c_str() ) << endl;
|
||||||
if ( constraintMin > getCBYMax() )
|
if ( constraintMin > getCBYMax() )
|
||||||
cerr << Error ( "(constraintMin > CBYMax : %.2lf > %.2lf)"
|
cerr << Error ( "(constraintMin > CBYMax : %.2lf > %.2lf)"
|
||||||
, DbU::getLambda(constraintMin)
|
, DbU::toLambda(constraintMin)
|
||||||
, DbU::getLambda(getCBYMax()) )
|
, DbU::toLambda(getCBYMax()) )
|
||||||
<< endl;
|
<< endl;
|
||||||
if ( constraintMax < getCBYMin() )
|
if ( constraintMax < getCBYMin() )
|
||||||
cerr << Error ( "(constraintMax < CBYMin : %.2lf < %.2lf)"
|
cerr << Error ( "(constraintMax < CBYMin : %.2lf < %.2lf)"
|
||||||
, DbU::getLambda(constraintMax)
|
, DbU::toLambda(constraintMax)
|
||||||
, DbU::getLambda(getCBYMin()) )
|
, DbU::toLambda(getCBYMin()) )
|
||||||
<< endl;
|
<< endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -448,13 +459,13 @@ namespace Katabatic {
|
||||||
cerr << Error ( "Incompatible DX restriction on %s", _getString().c_str() ) << endl;
|
cerr << Error ( "Incompatible DX restriction on %s", _getString().c_str() ) << endl;
|
||||||
if ( constraintMin > getCBXMax() )
|
if ( constraintMin > getCBXMax() )
|
||||||
cerr << Error ( "(constraintMin > CBXMax : %.2lf > %.2lf)"
|
cerr << Error ( "(constraintMin > CBXMax : %.2lf > %.2lf)"
|
||||||
, DbU::getLambda(constraintMin)
|
, DbU::toLambda(constraintMin)
|
||||||
, DbU::getLambda(getCBXMax()) )
|
, DbU::toLambda(getCBXMax()) )
|
||||||
<< endl;
|
<< endl;
|
||||||
if ( constraintMax < getCBXMin() )
|
if ( constraintMax < getCBXMin() )
|
||||||
cerr << Error ( "(constraintMax < CBXMin : %.2lf < %.2lf)"
|
cerr << Error ( "(constraintMax < CBXMin : %.2lf < %.2lf)"
|
||||||
, DbU::getLambda(constraintMax)
|
, DbU::toLambda(constraintMax)
|
||||||
, DbU::getLambda(getCBXMin()) )
|
, DbU::toLambda(getCBXMin()) )
|
||||||
<< endl;
|
<< endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#include "hurricane/Plug.h"
|
#include "hurricane/Plug.h"
|
||||||
#include "hurricane/Vertical.h"
|
#include "hurricane/Vertical.h"
|
||||||
#include "hurricane/Horizontal.h"
|
#include "hurricane/Horizontal.h"
|
||||||
#include "hurricane/UpdateSession.h"
|
|
||||||
#include "hurricane/DebugSession.h"
|
#include "hurricane/DebugSession.h"
|
||||||
#include "crlcore/RoutingGauge.h"
|
#include "crlcore/RoutingGauge.h"
|
||||||
#include "katabatic/AutoContactHTee.h"
|
#include "katabatic/AutoContactHTee.h"
|
||||||
|
@ -304,6 +303,9 @@ namespace Katabatic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_horizontal1->invalidate( this );
|
||||||
|
_horizontal2->invalidate( this );
|
||||||
|
_vertical1 ->invalidate( this );
|
||||||
|
|
||||||
ltraceout(110);
|
ltraceout(110);
|
||||||
DebugSession::close();
|
DebugSession::close();
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC 2012-2013, All Rights Reserved
|
// Copyright (c) UPMC 2012-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
@ -30,7 +29,6 @@
|
||||||
#include "hurricane/RoutingPad.h"
|
#include "hurricane/RoutingPad.h"
|
||||||
#include "hurricane/Vertical.h"
|
#include "hurricane/Vertical.h"
|
||||||
#include "hurricane/Horizontal.h"
|
#include "hurricane/Horizontal.h"
|
||||||
#include "hurricane/UpdateSession.h"
|
|
||||||
#include "hurricane/DebugSession.h"
|
#include "hurricane/DebugSession.h"
|
||||||
#include "crlcore/RoutingGauge.h"
|
#include "crlcore/RoutingGauge.h"
|
||||||
#include "katabatic/AutoContactTerminal.h"
|
#include "katabatic/AutoContactTerminal.h"
|
||||||
|
@ -265,7 +263,6 @@ namespace Katabatic {
|
||||||
throw Error( os.str() );
|
throw Error( os.str() );
|
||||||
}
|
}
|
||||||
unsetFlags( CntInvalidatedCache );
|
unsetFlags( CntInvalidatedCache );
|
||||||
|
|
||||||
ltrace(110) << "seg:" << _segment << endl;
|
ltrace(110) << "seg:" << _segment << endl;
|
||||||
|
|
||||||
delete [] horizontals;
|
delete [] horizontals;
|
||||||
|
@ -354,6 +351,7 @@ namespace Katabatic {
|
||||||
else if (delta == 0) setLayer( rg->getRoutingLayer(anchorDepth) );
|
else if (delta == 0) setLayer( rg->getRoutingLayer(anchorDepth) );
|
||||||
else if (delta == 1) setLayer( rg->getContactLayer(std::min(anchorDepth,segmentDepth)) );
|
else if (delta == 1) setLayer( rg->getContactLayer(std::min(anchorDepth,segmentDepth)) );
|
||||||
}
|
}
|
||||||
|
_segment->invalidate( this );
|
||||||
|
|
||||||
ltraceout(110);
|
ltraceout(110);
|
||||||
DebugSession::close();
|
DebugSession::close();
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#include "hurricane/Plug.h"
|
#include "hurricane/Plug.h"
|
||||||
#include "hurricane/Vertical.h"
|
#include "hurricane/Vertical.h"
|
||||||
#include "hurricane/Horizontal.h"
|
#include "hurricane/Horizontal.h"
|
||||||
#include "hurricane/UpdateSession.h"
|
|
||||||
#include "hurricane/DebugSession.h"
|
#include "hurricane/DebugSession.h"
|
||||||
#include "crlcore/RoutingGauge.h"
|
#include "crlcore/RoutingGauge.h"
|
||||||
#include "katabatic/AutoContactTurn.h"
|
#include "katabatic/AutoContactTurn.h"
|
||||||
|
@ -251,6 +250,8 @@ namespace Katabatic {
|
||||||
setLayer ( (delta == 0) ? rg->getRoutingLayer(depthContact) : rg->getContactLayer(depthContact) );
|
setLayer ( (delta == 0) ? rg->getRoutingLayer(depthContact) : rg->getContactLayer(depthContact) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_horizontal1->invalidate( this );
|
||||||
|
_vertical1 ->invalidate( this );
|
||||||
|
|
||||||
ltraceout(110);
|
ltraceout(110);
|
||||||
DebugSession::close ();
|
DebugSession::close ();
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#include "hurricane/Plug.h"
|
#include "hurricane/Plug.h"
|
||||||
#include "hurricane/Vertical.h"
|
#include "hurricane/Vertical.h"
|
||||||
#include "hurricane/Horizontal.h"
|
#include "hurricane/Horizontal.h"
|
||||||
#include "hurricane/UpdateSession.h"
|
|
||||||
#include "hurricane/DebugSession.h"
|
#include "hurricane/DebugSession.h"
|
||||||
#include "crlcore/RoutingGauge.h"
|
#include "crlcore/RoutingGauge.h"
|
||||||
#include "katabatic/AutoContactVTee.h"
|
#include "katabatic/AutoContactVTee.h"
|
||||||
|
@ -289,6 +288,9 @@ namespace Katabatic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_horizontal1->invalidate( this );
|
||||||
|
_vertical1 ->invalidate( this );
|
||||||
|
_vertical2 ->invalidate( this );
|
||||||
|
|
||||||
ltraceout(110);
|
ltraceout(110);
|
||||||
DebugSession::close ();
|
DebugSession::close ();
|
||||||
|
|
|
@ -231,9 +231,6 @@ namespace Katabatic {
|
||||||
Interval sourceConstraints = Interval(getAutoSource()->getCBYMin(),getAutoSource()->getCBYMax());
|
Interval sourceConstraints = Interval(getAutoSource()->getCBYMin(),getAutoSource()->getCBYMax());
|
||||||
Interval targetConstraints = Interval(getAutoTarget()->getCBYMin(),getAutoTarget()->getCBYMax());
|
Interval targetConstraints = Interval(getAutoTarget()->getCBYMin(),getAutoTarget()->getCBYMax());
|
||||||
|
|
||||||
// Ugly: should uses topRightShrink from GCell.
|
|
||||||
//sourceConstraints.inflate( 0, /*Katabatic::GCell::getTopRightShrink()*/ DbU::lambda(1.0) );
|
|
||||||
//targetConstraints.inflate( 0, /*Katabatic::GCell::getTopRightShrink()*/ DbU::lambda(1.0) );
|
|
||||||
// Expand by a tiny amount for the "contains" to work for sure.
|
// Expand by a tiny amount for the "contains" to work for sure.
|
||||||
sourceConstraints.inflate( 1 );
|
sourceConstraints.inflate( 1 );
|
||||||
targetConstraints.inflate( 1 );
|
targetConstraints.inflate( 1 );
|
||||||
|
@ -245,9 +242,6 @@ namespace Katabatic {
|
||||||
ltrace(200) << "target constraints: " << targetConstraints
|
ltrace(200) << "target constraints: " << targetConstraints
|
||||||
<< " " << DbU::getValueString(targetConstraints.getSize()) << endl;
|
<< " " << DbU::getValueString(targetConstraints.getSize()) << endl;
|
||||||
|
|
||||||
// Ugly: GCell's track number is hardwired.
|
|
||||||
//if (sourceConstraints.getSize() / DbU::lambda(5.0) < 10) { ltraceout(200); return true; }
|
|
||||||
//if (targetConstraints.getSize() / DbU::lambda(5.0) < 10) { ltraceout(200); return true; }
|
|
||||||
if (not sourceConstraints.contains(sourceSide)) { ltraceout(200); return true; }
|
if (not sourceConstraints.contains(sourceSide)) { ltraceout(200); return true; }
|
||||||
if (not targetConstraints.contains(targetSide)) { ltraceout(200); return true; }
|
if (not targetConstraints.contains(targetSide)) { ltraceout(200); return true; }
|
||||||
|
|
||||||
|
@ -298,8 +292,8 @@ namespace Katabatic {
|
||||||
|
|
||||||
if (source->isTerminal()) {
|
if (source->isTerminal()) {
|
||||||
Interval perpandConstraints = getAutoTarget()->getUConstraints(KbHorizontal);
|
Interval perpandConstraints = getAutoTarget()->getUConstraints(KbHorizontal);
|
||||||
Interval constraints = source->getUConstraints (KbVertical).inflate( 0, /*Katabatic::GCell::getTopRightShrink()*/ DbU::lambda(1.0) );
|
Interval constraints = source->getUConstraints (KbVertical|KbNoGCellShrink);
|
||||||
Interval nativeConstraints = source->getNativeUConstraints(KbVertical).inflate( 0, /*Katabatic::GCell::getTopRightShrink()*/ DbU::lambda(1.0) );
|
Interval nativeConstraints = source->getNativeUConstraints(KbVertical|KbNoGCellShrink);
|
||||||
int slack = constraints.getSize() / getPitch();
|
int slack = constraints.getSize() / getPitch();
|
||||||
int nativeSlack = nativeConstraints.getSize() / getPitch();
|
int nativeSlack = nativeConstraints.getSize() / getPitch();
|
||||||
|
|
||||||
|
@ -334,8 +328,8 @@ namespace Katabatic {
|
||||||
if (parallel) target = parallel->getAutoTarget();
|
if (parallel) target = parallel->getAutoTarget();
|
||||||
|
|
||||||
if (target->isTerminal()) {
|
if (target->isTerminal()) {
|
||||||
Interval constraints = target->getUConstraints (KbVertical).inflate( 0, /*Katabatic::GCell::getTopRightShrink()*/ DbU::lambda(1.0) );
|
Interval constraints = target->getUConstraints (KbVertical|KbNoGCellShrink);
|
||||||
Interval nativeConstraints = target->getNativeUConstraints(KbVertical).inflate( 0, /*Katabatic::GCell::getTopRightShrink()*/ DbU::lambda(1.0) );
|
Interval nativeConstraints = target->getNativeUConstraints(KbVertical|KbNoGCellShrink);
|
||||||
int slack = constraints.getSize() / getPitch();
|
int slack = constraints.getSize() / getPitch();
|
||||||
int nativeSlack = nativeConstraints.getSize() / getPitch();
|
int nativeSlack = nativeConstraints.getSize() / getPitch();
|
||||||
|
|
||||||
|
@ -390,7 +384,7 @@ namespace Katabatic {
|
||||||
|
|
||||||
if (_horizontal->getY() == axis) return;
|
if (_horizontal->getY() == axis) return;
|
||||||
|
|
||||||
ltrace(80) << "_setAxis() @Y " << DbU::getLambda(axis) << " " << this << endl;
|
ltrace(80) << "_setAxis() @Y " << DbU::toLambda(axis) << " " << this << endl;
|
||||||
|
|
||||||
_horizontal->setY( axis );
|
_horizontal->setY( axis );
|
||||||
invalidate();
|
invalidate();
|
||||||
|
@ -410,6 +404,13 @@ namespace Katabatic {
|
||||||
if (_horizontal->getTargetX() < _horizontal->getSourceX()) {
|
if (_horizontal->getTargetX() < _horizontal->getSourceX()) {
|
||||||
ltrace(80) << "updateOrient() " << this << " (before S/T swap)" << endl;
|
ltrace(80) << "updateOrient() " << this << " (before S/T swap)" << endl;
|
||||||
_horizontal->invert();
|
_horizontal->invert();
|
||||||
|
|
||||||
|
unsigned int spinFlags = _flags & SegDepthSpin;
|
||||||
|
unsetFlags( SegDepthSpin );
|
||||||
|
if (spinFlags & SegSourceTop ) setFlags( SegTargetTop );
|
||||||
|
if (spinFlags & SegSourceBottom) setFlags( SegTargetBottom );
|
||||||
|
if (spinFlags & SegTargetTop ) setFlags( SegSourceTop );
|
||||||
|
if (spinFlags & SegTargetBottom) setFlags( SegSourceBottom );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -690,7 +691,7 @@ namespace Katabatic {
|
||||||
{
|
{
|
||||||
ltrace(200) << "AutoHorizontal::_makeDogleg(GCell*)" << endl;
|
ltrace(200) << "AutoHorizontal::_makeDogleg(GCell*)" << endl;
|
||||||
|
|
||||||
DebugSession::open( getNet(), 110 );
|
DebugSession::open( getNet(), 80 );
|
||||||
ltracein(159);
|
ltracein(159);
|
||||||
|
|
||||||
//Session::doglegReset();
|
//Session::doglegReset();
|
||||||
|
@ -723,7 +724,7 @@ namespace Katabatic {
|
||||||
|
|
||||||
Session::dogleg( this );
|
Session::dogleg( this );
|
||||||
targetDetach();
|
targetDetach();
|
||||||
invalidate();
|
invalidate( KbTopology );
|
||||||
autoTarget->invalidate( KbTopology );
|
autoTarget->invalidate( KbTopology );
|
||||||
AutoContact* dlContact1 = AutoContactTurn::create( doglegGCell, _horizontal->getNet(), contactLayer );
|
AutoContact* dlContact1 = AutoContactTurn::create( doglegGCell, _horizontal->getNet(), contactLayer );
|
||||||
AutoContact* dlContact2 = AutoContactTurn::create( doglegGCell, _horizontal->getNet(), contactLayer );
|
AutoContact* dlContact2 = AutoContactTurn::create( doglegGCell, _horizontal->getNet(), contactLayer );
|
||||||
|
|
|
@ -198,7 +198,7 @@ namespace {
|
||||||
_attractors[position]++;
|
_attractors[position]++;
|
||||||
_attractorsCount++;
|
_attractorsCount++;
|
||||||
|
|
||||||
ltrace(88) << "add Attractor @" << DbU::getLambda(position)
|
ltrace(88) << "add Attractor @" << DbU::toLambda(position)
|
||||||
<< " [" << _attractors[position] << "]" << endl;
|
<< " [" << _attractors[position] << "]" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -356,9 +356,7 @@ namespace Katabatic {
|
||||||
Session::link( this );
|
Session::link( this );
|
||||||
updateOrient();
|
updateOrient();
|
||||||
updatePositions();
|
updatePositions();
|
||||||
invalidate( KbNoFlags );
|
invalidate( KbTopology );
|
||||||
//sourceAttach( getAutoSource() );
|
|
||||||
//targetAttach( getAutoTarget() );
|
|
||||||
|
|
||||||
_observers.notify( Create );
|
_observers.notify( Create );
|
||||||
}
|
}
|
||||||
|
@ -415,16 +413,20 @@ namespace Katabatic {
|
||||||
void AutoSegment::invalidate ( unsigned int flags )
|
void AutoSegment::invalidate ( unsigned int flags )
|
||||||
{
|
{
|
||||||
if (Session::doDestroyTool()) return;
|
if (Session::doDestroyTool()) return;
|
||||||
|
if (flags & KbSource) setFlags( SegInvalidatedSource );
|
||||||
|
if (flags & KbTarget) setFlags( SegInvalidatedTarget );
|
||||||
if (isInvalidated()) return;
|
if (isInvalidated()) return;
|
||||||
|
|
||||||
ltrace(200) << "AutoSegment::invalidate() " << flags << " " << this << endl;
|
ltrace(200) << "AutoSegment::invalidate() " << flags << " " << this << endl;
|
||||||
ltracein(200);
|
ltracein(200);
|
||||||
|
|
||||||
_invalidate();
|
_invalidate();
|
||||||
|
|
||||||
if ((flags & KbPropagate) and not isNotAligned()) {
|
if ((flags & KbPropagate) and not isNotAligned()) {
|
||||||
forEach( AutoSegment*, isegment, getAligneds() )
|
forEach( AutoSegment*, isegment, getAligneds() ) {
|
||||||
isegment->_invalidate();
|
isegment->_invalidate();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ltraceout(200);
|
ltraceout(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -441,20 +443,63 @@ namespace Katabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AutoSegment::invalidate ( AutoContact* contact )
|
||||||
|
{
|
||||||
|
if (Session::doDestroyTool()) return;
|
||||||
|
if (contact == getAutoSource()) setFlags( SegInvalidatedSource );
|
||||||
|
if (contact == getAutoTarget()) setFlags( SegInvalidatedTarget );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void AutoSegment::revalidate ()
|
void AutoSegment::revalidate ()
|
||||||
{
|
{
|
||||||
ltrace(110) << "AutoSegment::revalidate() " << this << endl;
|
ltrace(200) << "AutoSegment::revalidate() " << this << endl;
|
||||||
if (not isInvalidated()) return;
|
if (not isInvalidated()) return;
|
||||||
|
|
||||||
ltracein(110);
|
ltracein(200);
|
||||||
|
|
||||||
updateOrient();
|
updateOrient ();
|
||||||
updatePositions();
|
updatePositions();
|
||||||
unsetFlags( SegInvalidated|SegInvalidatedLayer|SegCreated );
|
|
||||||
|
|
||||||
_observers.notify( Revalidate );
|
unsigned int oldSpinFlags = _flags & SegDepthSpin;
|
||||||
|
|
||||||
ltraceout(110);
|
if (_flags & (SegInvalidatedSource|SegCreated)) {
|
||||||
|
const Layer* contactLayer = getAutoSource()->getLayer();
|
||||||
|
const Layer* segmentLayer = getLayer();
|
||||||
|
ltrace(200) << "Changed source: " << getAutoSource() << endl;
|
||||||
|
|
||||||
|
unsetFlags( SegSourceTop|SegSourceBottom );
|
||||||
|
if (contactLayer != segmentLayer) {
|
||||||
|
setFlags( (segmentLayer == contactLayer->getTop()) ? SegSourceBottom : SegSourceTop );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_flags & (SegInvalidatedTarget|SegCreated)) {
|
||||||
|
const Layer* contactLayer = getAutoTarget()->getLayer();
|
||||||
|
const Layer* segmentLayer = getLayer();
|
||||||
|
ltrace(200) << "Changed target: " << getAutoTarget() << endl;
|
||||||
|
|
||||||
|
unsetFlags( SegTargetTop|SegTargetBottom );
|
||||||
|
if (contactLayer != segmentLayer) {
|
||||||
|
setFlags( (segmentLayer == contactLayer->getTop()) ? SegTargetBottom : SegTargetTop );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int observerFlags = Revalidate;
|
||||||
|
if ( (_flags & SegCreated) or (oldSpinFlags != (_flags & SegDepthSpin)) )
|
||||||
|
observerFlags |= RevalidatePPitch;
|
||||||
|
|
||||||
|
unsetFlags( SegInvalidated
|
||||||
|
| SegInvalidatedSource
|
||||||
|
| SegInvalidatedTarget
|
||||||
|
| SegInvalidatedLayer
|
||||||
|
| SegCreated
|
||||||
|
);
|
||||||
|
|
||||||
|
_observers.notify( observerFlags );
|
||||||
|
|
||||||
|
ltrace(200) << "Updated: " << this << endl;
|
||||||
|
ltraceout(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -471,6 +516,38 @@ namespace Katabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool AutoSegment::isSameLayerDogleg () const
|
||||||
|
{
|
||||||
|
if (not isSpinTopOrBottom()) return false;
|
||||||
|
|
||||||
|
unsigned int perpandicularDepth = getDepth() + (isSpinTop() ? 1 : -1);
|
||||||
|
if (perpandicularDepth >= Session::getDepth()) {
|
||||||
|
cerr << this << " isSpinTop too high." << endl;
|
||||||
|
}
|
||||||
|
perpandicularDepth = Session::getDepth() - 1;
|
||||||
|
|
||||||
|
return (getLength() > (Session::getPitch(perpandicularDepth)))
|
||||||
|
and (getLength() < (Session::getPitch(perpandicularDepth) * 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DbU::Unit AutoSegment::getPPitch () const
|
||||||
|
{
|
||||||
|
DbU::Unit topPPitch = getPitch();
|
||||||
|
DbU::Unit bottomPPitch = topPPitch;
|
||||||
|
unsigned int depth = getDepth();
|
||||||
|
|
||||||
|
if (depth < Session::getDepth()) {
|
||||||
|
topPPitch = Session::getPitch( depth + ((_flags & SegSpinTop) ? 1 : 0) );
|
||||||
|
}
|
||||||
|
if (depth > 0) {
|
||||||
|
bottomPPitch = Session::getPitch( depth - ((_flags & SegSpinBottom) ? 1 : 0) );
|
||||||
|
}
|
||||||
|
|
||||||
|
return std::max( topPPitch, bottomPPitch );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
DbU::Unit AutoSegment::getSlack () const
|
DbU::Unit AutoSegment::getSlack () const
|
||||||
{
|
{
|
||||||
DbU::Unit constraintMin;
|
DbU::Unit constraintMin;
|
||||||
|
@ -578,6 +655,49 @@ namespace Katabatic {
|
||||||
{ return AutoSegments_Perpandiculars( this ); }
|
{ return AutoSegments_Perpandiculars( this ); }
|
||||||
|
|
||||||
|
|
||||||
|
bool AutoSegment::checkDepthSpin () const
|
||||||
|
{
|
||||||
|
bool valid = true;
|
||||||
|
const Layer* sourceLayer = getAutoSource()->getLayer();
|
||||||
|
const Layer* targetLayer = getAutoTarget()->getLayer();
|
||||||
|
|
||||||
|
if ( (_flags & SegSourceTop) and (sourceLayer->getBottom() != getLayer()) ) {
|
||||||
|
cerr << Error("%s\n"
|
||||||
|
" Source is not going above, connected to *top* of %s."
|
||||||
|
, getString(this).c_str()
|
||||||
|
, getString(getAutoSource()).c_str()
|
||||||
|
) << endl;
|
||||||
|
valid = false;
|
||||||
|
}
|
||||||
|
if ( (_flags & SegSourceBottom) and (sourceLayer->getTop() != getLayer()) ) {
|
||||||
|
cerr << Error("%s\n"
|
||||||
|
" Source is not going below, connected to *bottom* of %s."
|
||||||
|
, getString(this).c_str()
|
||||||
|
, getString(getAutoSource()).c_str()
|
||||||
|
) << endl;
|
||||||
|
valid = false;
|
||||||
|
}
|
||||||
|
if ( (_flags & SegTargetTop) and (targetLayer->getBottom() != getLayer()) ) {
|
||||||
|
cerr << Error("%s\n"
|
||||||
|
" Target is not going above connected to *top* of %s."
|
||||||
|
, getString(this).c_str()
|
||||||
|
, getString(getAutoTarget()).c_str()
|
||||||
|
) << endl;
|
||||||
|
valid = false;
|
||||||
|
}
|
||||||
|
if ( (_flags & SegTargetBottom) and (targetLayer->getTop() != getLayer()) ) {
|
||||||
|
cerr << Error("%s\n"
|
||||||
|
" Target is not going below, connected to *bottom* of %s."
|
||||||
|
, getString(this).c_str()
|
||||||
|
, getString(getAutoTarget()).c_str()
|
||||||
|
) << endl;
|
||||||
|
valid = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return valid;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void AutoSegment::setFlagsOnAligneds ( unsigned int flags )
|
void AutoSegment::setFlagsOnAligneds ( unsigned int flags )
|
||||||
{
|
{
|
||||||
setFlags( flags );
|
setFlags( flags );
|
||||||
|
@ -595,6 +715,7 @@ namespace Katabatic {
|
||||||
base()->getSourceHook()->detach();
|
base()->getSourceHook()->detach();
|
||||||
source->cacheDetach( this );
|
source->cacheDetach( this );
|
||||||
unsetFlags( SegNotSourceAligned );
|
unsetFlags( SegNotSourceAligned );
|
||||||
|
setFlags( SegInvalidatedSource );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -606,6 +727,7 @@ namespace Katabatic {
|
||||||
base()->getTargetHook()->detach();
|
base()->getTargetHook()->detach();
|
||||||
target->cacheDetach( this );
|
target->cacheDetach( this );
|
||||||
unsetFlags( SegNotTargetAligned );
|
unsetFlags( SegNotTargetAligned );
|
||||||
|
setFlags( SegInvalidatedTarget );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -662,9 +784,10 @@ namespace Katabatic {
|
||||||
if (constraintMin > constraintMax) { ltraceout(200); return false; }
|
if (constraintMin > constraintMax) { ltraceout(200); return false; }
|
||||||
|
|
||||||
if (isDogleg()) {
|
if (isDogleg()) {
|
||||||
// Ugly: hard-wired value of the track spacing.
|
DbU::Unit halfSideLength = getAutoSource()->getGCell()->getSide
|
||||||
constraintMin -= DbU::lambda(25.0);
|
( isHorizontal() ? KbVertical : KbHorizontal ).getHalfSize();
|
||||||
constraintMax += DbU::lambda(25.0);
|
constraintMin -= halfSideLength;
|
||||||
|
constraintMax += halfSideLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getAxis() < constraintMin) {
|
if (getAxis() < constraintMin) {
|
||||||
|
@ -725,8 +848,8 @@ namespace Katabatic {
|
||||||
if ( (axis == getAxis()) and not (flags & KbRealignate) ) return;
|
if ( (axis == getAxis()) and not (flags & KbRealignate) ) return;
|
||||||
|
|
||||||
ltrace(200) << "setAxis() @"
|
ltrace(200) << "setAxis() @"
|
||||||
<< ((isHorizontal())?"Y ":"X ") << DbU::getLambda(getAxis())
|
<< ((isHorizontal())?"Y ":"X ") << DbU::toLambda(getAxis())
|
||||||
<< " to " << DbU::getLambda(axis) << " on " << this << endl;
|
<< " to " << DbU::toLambda(axis) << " on " << this << endl;
|
||||||
ltracein(80);
|
ltracein(80);
|
||||||
|
|
||||||
_setAxis( axis );
|
_setAxis( axis );
|
||||||
|
@ -856,8 +979,8 @@ namespace Katabatic {
|
||||||
getConstraints( constraintMin, constraintMax );
|
getConstraints( constraintMin, constraintMax );
|
||||||
|
|
||||||
if (attractors.getAttractorsCount()) {
|
if (attractors.getAttractorsCount()) {
|
||||||
ltrace(89) << "Lower Median " << DbU::getLambda(attractors.getLowerMedian()) << endl;
|
ltrace(89) << "Lower Median " << DbU::toLambda(attractors.getLowerMedian()) << endl;
|
||||||
ltrace(89) << "Upper Median " << DbU::getLambda(attractors.getUpperMedian()) << endl;
|
ltrace(89) << "Upper Median " << DbU::toLambda(attractors.getUpperMedian()) << endl;
|
||||||
|
|
||||||
optimalMin = attractors.getLowerMedian();
|
optimalMin = attractors.getLowerMedian();
|
||||||
optimalMax = attractors.getUpperMedian();
|
optimalMax = attractors.getUpperMedian();
|
||||||
|
@ -1044,7 +1167,7 @@ namespace Katabatic {
|
||||||
ltracein(200);
|
ltracein(200);
|
||||||
|
|
||||||
invalidate( KbNoFlags );
|
invalidate( KbNoFlags );
|
||||||
setFlags( SegInvalidatedLayer );
|
setFlags( SegInvalidatedLayer|SegInvalidatedSource|SegInvalidatedTarget );
|
||||||
|
|
||||||
const Layer* newLayer = Session::getRoutingGauge()->getRoutingLayer(depth);
|
const Layer* newLayer = Session::getRoutingGauge()->getRoutingLayer(depth);
|
||||||
if (getLayer() != newLayer) {
|
if (getLayer() != newLayer) {
|
||||||
|
@ -1658,9 +1781,10 @@ namespace Katabatic {
|
||||||
{
|
{
|
||||||
bool coherency = true;
|
bool coherency = true;
|
||||||
|
|
||||||
coherency = coherency && checkNotInvalidated();
|
coherency = checkNotInvalidated() and coherency;
|
||||||
coherency = coherency && checkPositions();
|
coherency = checkPositions() and coherency;
|
||||||
coherency = coherency && checkConstraints();
|
coherency = checkConstraints() and coherency;
|
||||||
|
coherency = checkDepthSpin() and coherency;
|
||||||
|
|
||||||
return coherency;
|
return coherency;
|
||||||
}
|
}
|
||||||
|
@ -1681,6 +1805,14 @@ namespace Katabatic {
|
||||||
state += isNotAligned () ? "A": "-";
|
state += isNotAligned () ? "A": "-";
|
||||||
state += isSlackened () ? "S": "-";
|
state += isSlackened () ? "S": "-";
|
||||||
state += isInvalidated () ? "i": "-";
|
state += isInvalidated () ? "i": "-";
|
||||||
|
|
||||||
|
if (_flags & SegSourceTop) state += 'T';
|
||||||
|
else if (_flags & SegSourceBottom) state += 'B';
|
||||||
|
else state += '-';
|
||||||
|
if (_flags & SegTargetTop) state += 'T';
|
||||||
|
else if (_flags & SegTargetBottom) state += 'B';
|
||||||
|
else state += '-';
|
||||||
|
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC 2008-2013, All Rights Reserved
|
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
@ -381,8 +380,8 @@ namespace Katabatic {
|
||||||
ltrace(79) << _hookLocator->getElement() << endl;
|
ltrace(79) << _hookLocator->getElement() << endl;
|
||||||
Hook* hook = dynamic_cast<Segment::SourceHook*>(_hookLocator->getElement());
|
Hook* hook = dynamic_cast<Segment::SourceHook*>(_hookLocator->getElement());
|
||||||
if (hook) {
|
if (hook) {
|
||||||
if ( ((_flags & KbBySource) and (dynamic_cast<Segment::SourceHook*>(hook)))
|
if ( ((_flags & KbSource) and (dynamic_cast<Segment::SourceHook*>(hook)))
|
||||||
or ((_flags & KbByTarget) and (dynamic_cast<Segment::TargetHook*>(hook))) ) {
|
or ((_flags & KbTarget) and (dynamic_cast<Segment::TargetHook*>(hook))) ) {
|
||||||
_element = Session::lookup( static_cast<Segment*>(hook->getComponent()) );
|
_element = Session::lookup( static_cast<Segment*>(hook->getComponent()) );
|
||||||
|
|
||||||
if (_element->isHorizontal()) {
|
if (_element->isHorizontal()) {
|
||||||
|
|
|
@ -224,16 +224,10 @@ namespace Katabatic {
|
||||||
Interval sourceConstraints = Interval(getAutoSource()->getCBXMin(),getAutoSource()->getCBXMax());
|
Interval sourceConstraints = Interval(getAutoSource()->getCBXMin(),getAutoSource()->getCBXMax());
|
||||||
Interval targetConstraints = Interval(getAutoTarget()->getCBXMin(),getAutoTarget()->getCBXMax());
|
Interval targetConstraints = Interval(getAutoTarget()->getCBXMin(),getAutoTarget()->getCBXMax());
|
||||||
|
|
||||||
// Ugly: should uses topRightShrink from GCell.
|
|
||||||
//sourceConstraints.inflate( 0, /*Katabatic::GCell::getTopRightShrink()*/ DbU::lambda(1.0) );
|
|
||||||
//targetConstraints.inflate( 0, /*Katabatic::GCell::getTopRightShrink()*/ DbU::lambda(1.0) );
|
|
||||||
// Expand by a tiny amount for the "contains" to work for sure.
|
// Expand by a tiny amount for the "contains" to work for sure.
|
||||||
sourceConstraints.inflate( 1 );
|
sourceConstraints.inflate( 1 );
|
||||||
targetConstraints.inflate( 1 );
|
targetConstraints.inflate( 1 );
|
||||||
|
|
||||||
// Ugly: GCell's track number is hardwired.
|
|
||||||
//if (sourceConstraints.getSize() / DbU::lambda(5.0) < 10) { ltraceout(200); return true; }
|
|
||||||
//if (targetConstraints.getSize() / DbU::lambda(5.0) < 10) { ltraceout(200); return true; }
|
|
||||||
if (not sourceConstraints.contains(sourceSide)) { ltraceout(200); return true; }
|
if (not sourceConstraints.contains(sourceSide)) { ltraceout(200); return true; }
|
||||||
if (not targetConstraints.contains(targetSide)) { ltraceout(200); return true; }
|
if (not targetConstraints.contains(targetSide)) { ltraceout(200); return true; }
|
||||||
|
|
||||||
|
@ -263,8 +257,8 @@ namespace Katabatic {
|
||||||
AutoSegment* parallel = this;
|
AutoSegment* parallel = this;
|
||||||
|
|
||||||
if (source->isTerminal()) {
|
if (source->isTerminal()) {
|
||||||
Interval constraints = source->getUConstraints (KbHorizontal).inflate( 0, /*Katabatic::GCell::getTopRightShrink()*/ DbU::lambda(1.0) );
|
Interval constraints = source->getUConstraints (KbHorizontal|KbNoGCellShrink);
|
||||||
Interval nativeConstraints = source->getNativeUConstraints(KbHorizontal).inflate( 0, /*Katabatic::GCell::getTopRightShrink()*/ DbU::lambda(1.0) );
|
Interval nativeConstraints = source->getNativeUConstraints(KbHorizontal|KbNoGCellShrink);
|
||||||
int slack = constraints.getSize() / getPitch();
|
int slack = constraints.getSize() / getPitch();
|
||||||
int nativeSlack = nativeConstraints.getSize() / getPitch();
|
int nativeSlack = nativeConstraints.getSize() / getPitch();
|
||||||
|
|
||||||
|
@ -294,8 +288,8 @@ namespace Katabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target->isTerminal()) {
|
if (target->isTerminal()) {
|
||||||
Interval constraints = target->getUConstraints (KbHorizontal).inflate( 0, /*Katabatic::GCell::getTopRightShrink()*/ DbU::lambda(1.0) );
|
Interval constraints = target->getUConstraints (KbHorizontal|KbNoGCellShrink);
|
||||||
Interval nativeConstraints = target->getNativeUConstraints(KbHorizontal).inflate( 0, /*Katabatic::GCell::getTopRightShrink()*/ DbU::lambda(1.0) );
|
Interval nativeConstraints = target->getNativeUConstraints(KbHorizontal|KbNoGCellShrink);
|
||||||
int slack = constraints.getSize() / getPitch();
|
int slack = constraints.getSize() / getPitch();
|
||||||
int nativeSlack = nativeConstraints.getSize() / getPitch();
|
int nativeSlack = nativeConstraints.getSize() / getPitch();
|
||||||
|
|
||||||
|
@ -333,7 +327,7 @@ namespace Katabatic {
|
||||||
|
|
||||||
if (_vertical->getX() == axis) return;
|
if (_vertical->getX() == axis) return;
|
||||||
|
|
||||||
ltrace(159) << "_setAxis() @X " << DbU::getLambda(axis) << " " << this << endl;
|
ltrace(159) << "_setAxis() @X " << DbU::toLambda(axis) << " " << this << endl;
|
||||||
|
|
||||||
_vertical->setX( axis );
|
_vertical->setX( axis );
|
||||||
invalidate();
|
invalidate();
|
||||||
|
@ -353,6 +347,13 @@ namespace Katabatic {
|
||||||
if (_vertical->getTargetY() < _vertical->getSourceY()) {
|
if (_vertical->getTargetY() < _vertical->getSourceY()) {
|
||||||
ltrace(80) << "updateOrient() " << this << " (before S/T swap)" << endl;
|
ltrace(80) << "updateOrient() " << this << " (before S/T swap)" << endl;
|
||||||
_vertical->invert();
|
_vertical->invert();
|
||||||
|
|
||||||
|
unsigned int spinFlags = _flags & SegDepthSpin;
|
||||||
|
unsetFlags( SegDepthSpin );
|
||||||
|
if (spinFlags & SegSourceTop ) setFlags( SegTargetTop );
|
||||||
|
if (spinFlags & SegSourceBottom) setFlags( SegTargetBottom );
|
||||||
|
if (spinFlags & SegTargetTop ) setFlags( SegSourceTop );
|
||||||
|
if (spinFlags & SegTargetBottom) setFlags( SegSourceBottom );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -641,7 +642,7 @@ namespace Katabatic {
|
||||||
|
|
||||||
Session::dogleg( this );
|
Session::dogleg( this );
|
||||||
targetDetach();
|
targetDetach();
|
||||||
invalidate();
|
invalidate( KbTopology );
|
||||||
autoTarget->invalidate( KbTopology );
|
autoTarget->invalidate( KbTopology );
|
||||||
AutoContact* dlContact1 = AutoContactTurn::create( doglegGCell, _vertical->getNet(), contactLayer );
|
AutoContact* dlContact1 = AutoContactTurn::create( doglegGCell, _vertical->getNet(), contactLayer );
|
||||||
ltrace(200) << dlContact1 << endl;
|
ltrace(200) << dlContact1 << endl;
|
||||||
|
|
|
@ -47,16 +47,20 @@ namespace {
|
||||||
enum SegmentType { LocalSegments=0x10, GlobalSegments=0x20 };
|
enum SegmentType { LocalSegments=0x10, GlobalSegments=0x20 };
|
||||||
|
|
||||||
|
|
||||||
bool isChip ( Cell* cell, Instance*& core )
|
bool isChip ( Cell* cell, Instance*& core, Cell*& referencePad )
|
||||||
{
|
{
|
||||||
AllianceFramework* af = AllianceFramework::get();
|
AllianceFramework* af = AllianceFramework::get();
|
||||||
int pads = 0;
|
int pads = 0;
|
||||||
int cores = 0;
|
int cores = 0;
|
||||||
|
|
||||||
|
core = NULL;
|
||||||
|
referencePad = NULL;
|
||||||
forEach ( Instance*, iinstance, cell->getInstances() ) {
|
forEach ( Instance*, iinstance, cell->getInstances() ) {
|
||||||
if ( af->isPad(iinstance->getMasterCell()) )
|
if ( af->isPad(iinstance->getMasterCell()) ) {
|
||||||
++pads;
|
++pads;
|
||||||
else {
|
if (not referencePad)
|
||||||
|
referencePad = iinstance->getMasterCell();
|
||||||
|
} else {
|
||||||
++cores;
|
++cores;
|
||||||
core = *iinstance;
|
core = *iinstance;
|
||||||
}
|
}
|
||||||
|
@ -177,7 +181,7 @@ namespace Katabatic {
|
||||||
cmess1 << " o Slackening IOs of <" << core->getName() << ">." << endl;
|
cmess1 << " o Slackening IOs of <" << core->getName() << ">." << endl;
|
||||||
|
|
||||||
Layer::Mask mask = Session::getRoutingLayer(1)->getMask();
|
Layer::Mask mask = Session::getRoutingLayer(1)->getMask();
|
||||||
slackenBorder ( core->getBoundingBox().inflate(DbU::lambda(50.0))
|
slackenBorder ( core->getBoundingBox().inflate(Session::getSliceHeight())
|
||||||
, mask
|
, mask
|
||||||
, GlobalSegments|Constant::Horizontal
|
, GlobalSegments|Constant::Horizontal
|
||||||
);
|
);
|
||||||
|
@ -186,16 +190,16 @@ namespace Katabatic {
|
||||||
|
|
||||||
void KatabaticEngine::chipPrep ()
|
void KatabaticEngine::chipPrep ()
|
||||||
{
|
{
|
||||||
if ( isChip() ) {
|
if (isChip()) {
|
||||||
reselectPadRp ( getCell() );
|
reselectPadRp( getCell() );
|
||||||
// slackenBlockIos ( _core );
|
//slackenBlockIos( _core );
|
||||||
|
|
||||||
// cmess1 << " o Slackening Pads-connected segments." << endl;
|
//cmess1 << " o Slackening Pads-connected segments." << endl;
|
||||||
// slackenBorder ( _cell->getBoundingBox().inflate(DbU::lambda(-425.0))
|
//slackenBorder( _cell->getBoundingBox().inflate(DbU::lambda(-425.0))
|
||||||
// , Session::getRoutingLayer(3)->getMask()
|
// , Session::getRoutingLayer(3)->getMask()
|
||||||
// , GlobalSegments|LocalSegments|Constant::Horizontal
|
// , GlobalSegments|LocalSegments|Constant::Horizontal
|
||||||
// );
|
// );
|
||||||
// slackenBorder ( _cell->getBoundingBox().inflate(DbU::lambda(-425.0))
|
//slackenBorder( _cell->getBoundingBox().inflate(DbU::lambda(-425.0))
|
||||||
// , Session::getRoutingLayer(1)->getMask()
|
// , Session::getRoutingLayer(1)->getMask()
|
||||||
// , GlobalSegments|Constant::Horizontal
|
// , GlobalSegments|Constant::Horizontal
|
||||||
// );
|
// );
|
||||||
|
@ -206,6 +210,7 @@ namespace Katabatic {
|
||||||
ChipTools::ChipTools ( Cell* cell )
|
ChipTools::ChipTools ( Cell* cell )
|
||||||
: _cell (cell)
|
: _cell (cell)
|
||||||
, _core (NULL)
|
, _core (NULL)
|
||||||
|
, _referencePad(NULL)
|
||||||
, _isChip (false)
|
, _isChip (false)
|
||||||
, _chipBb (cell->getBoundingBox())
|
, _chipBb (cell->getBoundingBox())
|
||||||
, _leftPadsBb ()
|
, _leftPadsBb ()
|
||||||
|
@ -214,11 +219,11 @@ namespace Katabatic {
|
||||||
, _bottomPadsBb()
|
, _bottomPadsBb()
|
||||||
, _chipCorona ()
|
, _chipCorona ()
|
||||||
{
|
{
|
||||||
_isChip = ::isChip ( _cell, _core );
|
_isChip = ::isChip( _cell, _core, _referencePad );
|
||||||
|
|
||||||
if ( _isChip ) {
|
if (_isChip) {
|
||||||
// Ugly: hard-coded pads height.
|
// Ugly: hard-coded pads height.
|
||||||
const DbU::Unit padHeight = DbU::lambda(400.0);
|
const DbU::Unit padHeight = _referencePad->getAbutmentBox().getHeight();
|
||||||
|
|
||||||
Box outer = _cell->getBoundingBox().inflate ( -padHeight );
|
Box outer = _cell->getBoundingBox().inflate ( -padHeight );
|
||||||
_chipCorona = Torus ( outer, _core->getBoundingBox() );
|
_chipCorona = Torus ( outer, _core->getBoundingBox() );
|
||||||
|
@ -230,6 +235,7 @@ namespace Katabatic {
|
||||||
cmess1 << " o Design is a complete chip." << endl;
|
cmess1 << " o Design is a complete chip." << endl;
|
||||||
cmess1 << " - Core: <" << _core->getName() << ">/<"
|
cmess1 << " - Core: <" << _core->getName() << ">/<"
|
||||||
<< _core->getMasterCell()->getName() << ">." << endl;
|
<< _core->getMasterCell()->getName() << ">." << endl;
|
||||||
|
cmess1 << " - Reference pad: <" << _referencePad->getName() << ">" << endl;
|
||||||
cmess1 << " - Corona: " << _chipCorona << "." << endl;
|
cmess1 << " - Corona: " << _chipCorona << "." << endl;
|
||||||
} else {
|
} else {
|
||||||
_chipCorona = Torus ( _cell->getBoundingBox(), _cell->getBoundingBox() );
|
_chipCorona = Torus ( _cell->getBoundingBox(), _cell->getBoundingBox() );
|
||||||
|
@ -253,6 +259,7 @@ namespace Katabatic {
|
||||||
|
|
||||||
record->add ( getSlot ( "_cell" , _cell ) );
|
record->add ( getSlot ( "_cell" , _cell ) );
|
||||||
record->add ( getSlot ( "_core" , _core ) );
|
record->add ( getSlot ( "_core" , _core ) );
|
||||||
|
record->add ( getSlot ( "_referencePad", _referencePad ) );
|
||||||
record->add ( getSlot ( "_isChip" , &_isChip ) );
|
record->add ( getSlot ( "_isChip" , &_isChip ) );
|
||||||
record->add ( getSlot ( "_chipBb" , &_chipBb ) );
|
record->add ( getSlot ( "_chipBb" , &_chipBb ) );
|
||||||
record->add ( getSlot ( "_leftPadsBb" , &_leftPadsBb ) );
|
record->add ( getSlot ( "_leftPadsBb" , &_leftPadsBb ) );
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
#include "hurricane/DataBase.h"
|
#include "hurricane/DataBase.h"
|
||||||
#include "hurricane/Cell.h"
|
#include "hurricane/Cell.h"
|
||||||
#include "crlcore/Utilities.h"
|
#include "crlcore/Utilities.h"
|
||||||
|
#include "crlcore/CellGauge.h"
|
||||||
|
#include "crlcore/RoutingGauge.h"
|
||||||
#include "crlcore/RoutingLayerGauge.h"
|
#include "crlcore/RoutingLayerGauge.h"
|
||||||
#include "crlcore/AllianceFramework.h"
|
#include "crlcore/AllianceFramework.h"
|
||||||
#include "katabatic/Configuration.h"
|
#include "katabatic/Configuration.h"
|
||||||
|
@ -62,18 +64,21 @@ namespace Katabatic {
|
||||||
// Class : "Katabatic::ConfigurationConcrete".
|
// Class : "Katabatic::ConfigurationConcrete".
|
||||||
|
|
||||||
|
|
||||||
ConfigurationConcrete::ConfigurationConcrete ( const RoutingGauge* rg )
|
ConfigurationConcrete::ConfigurationConcrete ( const CellGauge* cg, const RoutingGauge* rg )
|
||||||
: Configuration ()
|
: Configuration ()
|
||||||
|
, _cg (NULL)
|
||||||
, _rg (NULL)
|
, _rg (NULL)
|
||||||
, _extensionCap (DbU::lambda(0.5))
|
, _extensionCap (DbU::lambda(0.5))
|
||||||
, _saturateRatio (Cfg::getParamPercentage("katabatic.saturateRatio",80.0)->asDouble())
|
, _saturateRatio (Cfg::getParamPercentage("katabatic.saturateRatio",80.0)->asDouble())
|
||||||
, _saturateRp (Cfg::getParamInt ("katabatic.saturateRp" ,8 )->asInt())
|
, _saturateRp (Cfg::getParamInt ("katabatic.saturateRp" ,8 )->asInt())
|
||||||
, _globalThreshold(DbU::lambda((double)Cfg::getParamInt("katabatic.globalLengthThreshold",29*50)->asInt())) // Ugly: direct uses of SxLib gauge.
|
, _globalThreshold(0)
|
||||||
, _allowedDepth (0)
|
, _allowedDepth (0)
|
||||||
, _hEdgeCapacity (0)
|
, _hEdgeCapacity (0)
|
||||||
, _vEdgeCapacity (0)
|
, _vEdgeCapacity (0)
|
||||||
{
|
{
|
||||||
|
if (cg == NULL) cg = AllianceFramework::get()->getCellGauge();
|
||||||
if (rg == NULL) rg = AllianceFramework::get()->getRoutingGauge();
|
if (rg == NULL) rg = AllianceFramework::get()->getRoutingGauge();
|
||||||
|
_cg = cg->getClone();
|
||||||
_rg = rg->getClone();
|
_rg = rg->getClone();
|
||||||
|
|
||||||
if (Cfg::hasParameter("katabatic.topRoutingLayer")) {
|
if (Cfg::hasParameter("katabatic.topRoutingLayer")) {
|
||||||
|
@ -89,15 +94,19 @@ namespace Katabatic {
|
||||||
if (_gmetalv == NULL) cerr << Warning("Cannot get \"gmetalv\" layer from the Technology.") << endl;
|
if (_gmetalv == NULL) cerr << Warning("Cannot get \"gmetalv\" layer from the Technology.") << endl;
|
||||||
if (_gmetalh == NULL) cerr << Warning("Cannot get \"gmetalh\" layer from the Technology.") << endl;
|
if (_gmetalh == NULL) cerr << Warning("Cannot get \"gmetalh\" layer from the Technology.") << endl;
|
||||||
|
|
||||||
|
DbU::Unit sliceHeight = _cg->getSliceHeight();
|
||||||
|
_globalThreshold = DbU::fromLambda
|
||||||
|
( (double)Cfg::getParamInt("katabatic.globalLengthThreshold",29*DbU::toLambda(sliceHeight))->asInt() );
|
||||||
|
|
||||||
vector<RoutingLayerGauge*>::const_iterator ilayerGauge = rg->getLayerGauges().begin();
|
vector<RoutingLayerGauge*>::const_iterator ilayerGauge = rg->getLayerGauges().begin();
|
||||||
for ( ; ilayerGauge != rg->getLayerGauges().end() ; ++ilayerGauge ) {
|
for ( ; ilayerGauge != rg->getLayerGauges().end() ; ++ilayerGauge ) {
|
||||||
RoutingLayerGauge* layerGauge = (*ilayerGauge);
|
RoutingLayerGauge* layerGauge = (*ilayerGauge);
|
||||||
if (layerGauge->getType() != Constant::Default) continue;
|
if (layerGauge->getType() != Constant::Default) continue;
|
||||||
|
|
||||||
if (layerGauge->getDirection() == Constant::Horizontal) {
|
if (layerGauge->getDirection() == Constant::Horizontal) {
|
||||||
_hEdgeCapacity += layerGauge->getTrackNumber ( 0, DbU::lambda(50.0) ) - 1;
|
_hEdgeCapacity += layerGauge->getTrackNumber ( 0, sliceHeight ) - 1;
|
||||||
} else if (layerGauge->getDirection() == Constant::Vertical) {
|
} else if (layerGauge->getDirection() == Constant::Vertical) {
|
||||||
_vEdgeCapacity += layerGauge->getTrackNumber( 0, DbU::lambda(50.0) ) - 1;
|
_vEdgeCapacity += layerGauge->getTrackNumber( 0, sliceHeight ) - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -108,19 +117,22 @@ namespace Katabatic {
|
||||||
, _gmetalh (other._gmetalh)
|
, _gmetalh (other._gmetalh)
|
||||||
, _gmetalv (other._gmetalv)
|
, _gmetalv (other._gmetalv)
|
||||||
, _gcontact (other._gcontact)
|
, _gcontact (other._gcontact)
|
||||||
|
, _cg (NULL)
|
||||||
, _rg (NULL)
|
, _rg (NULL)
|
||||||
, _extensionCap (other._extensionCap)
|
, _extensionCap (other._extensionCap)
|
||||||
, _saturateRatio (other._saturateRatio)
|
, _saturateRatio (other._saturateRatio)
|
||||||
, _globalThreshold (other._globalThreshold)
|
, _globalThreshold (other._globalThreshold)
|
||||||
, _allowedDepth (other._allowedDepth)
|
, _allowedDepth (other._allowedDepth)
|
||||||
{
|
{
|
||||||
if ( other._rg ) _rg = other._rg->getClone();
|
if (other._cg) _cg = other._cg->getClone();
|
||||||
|
if (other._rg) _rg = other._rg->getClone();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ConfigurationConcrete::~ConfigurationConcrete ()
|
ConfigurationConcrete::~ConfigurationConcrete ()
|
||||||
{
|
{
|
||||||
ltrace(89) << "About to delete attribute _rg (RoutingGauge)." << endl;
|
ltrace(89) << "About to delete attribute _rg (RoutingGauge)." << endl;
|
||||||
|
_cg->destroy ();
|
||||||
_rg->destroy ();
|
_rg->destroy ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,6 +165,10 @@ namespace Katabatic {
|
||||||
{ return _rg->getLayerDepth(layer); }
|
{ return _rg->getLayerDepth(layer); }
|
||||||
|
|
||||||
|
|
||||||
|
CellGauge* ConfigurationConcrete::getCellGauge () const
|
||||||
|
{ return _cg; }
|
||||||
|
|
||||||
|
|
||||||
RoutingGauge* ConfigurationConcrete::getRoutingGauge () const
|
RoutingGauge* ConfigurationConcrete::getRoutingGauge () const
|
||||||
{ return _rg; }
|
{ return _rg; }
|
||||||
|
|
||||||
|
@ -173,6 +189,14 @@ namespace Katabatic {
|
||||||
{ return _extensionCap; }
|
{ return _extensionCap; }
|
||||||
|
|
||||||
|
|
||||||
|
DbU::Unit ConfigurationConcrete::getSliceHeight () const
|
||||||
|
{ return _cg->getSliceHeight(); }
|
||||||
|
|
||||||
|
|
||||||
|
DbU::Unit ConfigurationConcrete::getSliceStep () const
|
||||||
|
{ return _cg->getSliceStep(); }
|
||||||
|
|
||||||
|
|
||||||
DbU::Unit ConfigurationConcrete::getPitch ( const Layer* layer, unsigned int flags ) const
|
DbU::Unit ConfigurationConcrete::getPitch ( const Layer* layer, unsigned int flags ) const
|
||||||
{ return getPitch( getLayerDepth(layer), flags ); }
|
{ return getPitch( getLayerDepth(layer), flags ); }
|
||||||
|
|
||||||
|
@ -290,7 +314,7 @@ namespace Katabatic {
|
||||||
cout << Dots::asIdentifier(" - Routing Gauge" ,getString(_rg->getName())) << endl;
|
cout << Dots::asIdentifier(" - Routing Gauge" ,getString(_rg->getName())) << endl;
|
||||||
cout << Dots::asString (" - Top routing layer" ,topLayerName) << endl;
|
cout << Dots::asString (" - Top routing layer" ,topLayerName) << endl;
|
||||||
cout << Dots::asPercentage(" - GCell saturation threshold" ,_saturateRatio) << endl;
|
cout << Dots::asPercentage(" - GCell saturation threshold" ,_saturateRatio) << endl;
|
||||||
cout << Dots::asDouble (" - Long global length threshold",DbU::getLambda(_globalThreshold)) << endl;
|
cout << Dots::asDouble (" - Long global length threshold",DbU::toLambda(_globalThreshold)) << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -361,8 +361,7 @@ namespace Katabatic {
|
||||||
|
|
||||||
GCell* GCell::create ( GCellGrid* gcellGrid, unsigned int index, Box box )
|
GCell* GCell::create ( GCellGrid* gcellGrid, unsigned int index, Box box )
|
||||||
{
|
{
|
||||||
if (_topRightShrink == 0)
|
if (_topRightShrink == 0) _topRightShrink = 1;
|
||||||
_topRightShrink = 1 /*DbU::lambda(0.0)*/;
|
|
||||||
|
|
||||||
DbU::Unit trShrink = ( gcellGrid->isOnTopBorder (index)
|
DbU::Unit trShrink = ( gcellGrid->isOnTopBorder (index)
|
||||||
or gcellGrid->isOnRightBorder(index)) ? 0 : _topRightShrink;
|
or gcellGrid->isOnRightBorder(index)) ? 0 : _topRightShrink;
|
||||||
|
@ -499,25 +498,25 @@ namespace Katabatic {
|
||||||
|
|
||||||
AutoSegments GCell::getHStartSegments ()
|
AutoSegments GCell::getHStartSegments ()
|
||||||
{
|
{
|
||||||
return new AutoSegments_AnchorOnGCell (this,KbHorizontal|KbBySource);
|
return new AutoSegments_AnchorOnGCell (this,KbHorizontal|KbSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
AutoSegments GCell::getVStartSegments ()
|
AutoSegments GCell::getVStartSegments ()
|
||||||
{
|
{
|
||||||
return new AutoSegments_AnchorOnGCell (this,KbVertical|KbBySource);
|
return new AutoSegments_AnchorOnGCell (this,KbVertical|KbSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
AutoSegments GCell::getHStopSegments ()
|
AutoSegments GCell::getHStopSegments ()
|
||||||
{
|
{
|
||||||
return new AutoSegments_AnchorOnGCell (this,KbHorizontal|KbByTarget);
|
return new AutoSegments_AnchorOnGCell (this,KbHorizontal|KbTarget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
AutoSegments GCell::getVStopSegments ()
|
AutoSegments GCell::getVStopSegments ()
|
||||||
{
|
{
|
||||||
return new AutoSegments_AnchorOnGCell (this,KbVertical|KbByTarget);
|
return new AutoSegments_AnchorOnGCell (this,KbVertical|KbTarget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1324,8 +1323,8 @@ namespace Katabatic {
|
||||||
, "<GCell index=\"%04i %04i\" corner=\"%06.1f %06.1f\" density=\"%3.2f,%3.2f\">"
|
, "<GCell index=\"%04i %04i\" corner=\"%06.1f %06.1f\" density=\"%3.2f,%3.2f\">"
|
||||||
, getColumn()
|
, getColumn()
|
||||||
, getRow()
|
, getRow()
|
||||||
, DbU::getLambda(getX())
|
, DbU::toLambda(getX())
|
||||||
, DbU::getLambda(getY())
|
, DbU::toLambda(getY())
|
||||||
, getDensity()
|
, getDensity()
|
||||||
, _cDensity
|
, _cDensity
|
||||||
);
|
);
|
||||||
|
|
|
@ -401,7 +401,7 @@ namespace Katabatic {
|
||||||
AutoSegmentLut::const_iterator it = _autoSegmentLut.begin();
|
AutoSegmentLut::const_iterator it = _autoSegmentLut.begin();
|
||||||
AutoSegmentLut::const_iterator end = _autoSegmentLut.end ();
|
AutoSegmentLut::const_iterator end = _autoSegmentLut.end ();
|
||||||
for ( ; it != end ; it++ )
|
for ( ; it != end ; it++ )
|
||||||
coherency = coherency && it->second->_check();
|
coherency = it->second->_check() and coherency;
|
||||||
|
|
||||||
vector<GCell*>::const_iterator itGCell = _gcellGrid->getGCellVector()->begin();
|
vector<GCell*>::const_iterator itGCell = _gcellGrid->getGCellVector()->begin();
|
||||||
vector<GCell*>::const_iterator endGCell = _gcellGrid->getGCellVector()->end();
|
vector<GCell*>::const_iterator endGCell = _gcellGrid->getGCellVector()->end();
|
||||||
|
@ -573,7 +573,7 @@ namespace Katabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
ltrace(159) << "Align on " << aligneds[0]
|
ltrace(159) << "Align on " << aligneds[0]
|
||||||
<< " " << DbU::getLambda(aligneds[0]->getAxis()) << endl;
|
<< " " << DbU::toLambda(aligneds[0]->getAxis()) << endl;
|
||||||
aligneds[0]->setAxis( aligneds[0]->getAxis(), KbRealignate );
|
aligneds[0]->setAxis( aligneds[0]->getAxis(), KbRealignate );
|
||||||
aligneds.clear();
|
aligneds.clear();
|
||||||
|
|
||||||
|
|
|
@ -299,7 +299,7 @@ namespace Katabatic {
|
||||||
locals.push_back( autoSegment );
|
locals.push_back( autoSegment );
|
||||||
} else {
|
} else {
|
||||||
// Ugly: Hard-coded GCell side.
|
// Ugly: Hard-coded GCell side.
|
||||||
if ( (autoSegment->getLength() < 3*DbU::lambda(50.0)) and (autoSegment != seed) )
|
if ( (autoSegment->getLength() < 3*Session::getSliceHeight()) and (autoSegment != seed) )
|
||||||
locals.push_back( autoSegment );
|
locals.push_back( autoSegment );
|
||||||
else
|
else
|
||||||
globals.push_back( autoSegment );
|
globals.push_back( autoSegment );
|
||||||
|
|
|
@ -961,7 +961,7 @@ namespace {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
// HARDCODED VALUE.
|
// HARDCODED VALUE.
|
||||||
if ( (_topology & Global_Fixed) and (globalSegment->getLength() < 2*DbU::lambda(50.0)) )
|
if ( (_topology & Global_Fixed) and (globalSegment->getLength() < 2*Session::getSliceHeight()) )
|
||||||
_toFixSegments.push_back( globalSegment );
|
_toFixSegments.push_back( globalSegment );
|
||||||
|
|
||||||
if (_connexity.fields.globals < 2) {
|
if (_connexity.fields.globals < 2) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// -*- mode: C++; explicit-buffer-name: "Session.cpp<katabatic>" -*-
|
// -*- mode: C++; explicit-buffer-name: "Session.cpp<katabatic>" -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC 2008-2013, All Rights Reserved
|
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
@ -81,6 +81,7 @@ namespace Katabatic {
|
||||||
Session::Session ( KatabaticEngine* ktbt )
|
Session::Session ( KatabaticEngine* ktbt )
|
||||||
: _katabatic (ktbt)
|
: _katabatic (ktbt)
|
||||||
, _technology (ktbt->getRoutingGauge()->getTechnology())
|
, _technology (ktbt->getRoutingGauge()->getTechnology())
|
||||||
|
, _cellGauge (ktbt->getCellGauge())
|
||||||
, _routingGauge (ktbt->getRoutingGauge())
|
, _routingGauge (ktbt->getRoutingGauge())
|
||||||
, _autoContacts ()
|
, _autoContacts ()
|
||||||
, _doglegs ()
|
, _doglegs ()
|
||||||
|
@ -185,7 +186,7 @@ namespace Katabatic {
|
||||||
}
|
}
|
||||||
if (aligneds.empty()) canonical->setFlags( SegNotAligned );
|
if (aligneds.empty()) canonical->setFlags( SegNotAligned );
|
||||||
|
|
||||||
ltrace(159) << "Align @" << DbU::getLambda(canonical->getAxis())
|
ltrace(159) << "Align @" << DbU::toLambda(canonical->getAxis())
|
||||||
<< " on " << canonical << endl;
|
<< " on " << canonical << endl;
|
||||||
|
|
||||||
//canonical->setAxis( canonical->getAxis(), KbRealignate );
|
//canonical->setAxis( canonical->getAxis(), KbRealignate );
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC 2008-2013, All Rights Reserved
|
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2012-2013, All Rights Reserved
|
// Copyright (c) UPMC/LIP6 2012-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
|
|
@ -60,7 +60,8 @@ namespace Katabatic {
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
// Class : "AutoSegment".
|
// Class : "AutoSegment".
|
||||||
|
|
||||||
enum AutoSegmentFlag { SegHorizontal = 0x00000001
|
enum AutoSegmentFlag { SegNoFlags = 0x00000000
|
||||||
|
, SegHorizontal = 0x00000001
|
||||||
, SegFixed = 0x00000002
|
, SegFixed = 0x00000002
|
||||||
, SegGlobal = 0x00000004
|
, SegGlobal = 0x00000004
|
||||||
, SegWeakGlobal = 0x00000008
|
, SegWeakGlobal = 0x00000008
|
||||||
|
@ -68,22 +69,31 @@ namespace Katabatic {
|
||||||
, SegBipoint = 0x00000020
|
, SegBipoint = 0x00000020
|
||||||
, SegDogleg = 0x00000040
|
, SegDogleg = 0x00000040
|
||||||
, SegStrap = 0x00000080
|
, SegStrap = 0x00000080
|
||||||
, SegLayerChange = 0x00000100
|
, SegSourceTop = 0x00000100
|
||||||
, SegStrongTerminal = 0x00000200 // Replace Terminal.
|
, SegSourceBottom = 0x00000200
|
||||||
, SegWeakTerminal1 = 0x00000400 // Replace TopologicalEnd.
|
, SegTargetTop = 0x00000400
|
||||||
, SegWeakTerminal2 = 0x00000800 // Replace TopologicalEnd.
|
, SegTargetBottom = 0x00000800
|
||||||
, SegNotSourceAligned = 0x00001000
|
, SegLayerChange = 0x00001000
|
||||||
, SegNotTargetAligned = 0x00002000
|
, SegStrongTerminal = 0x00002000 // Replace Terminal.
|
||||||
, SegUnbound = 0x00010000
|
, SegWeakTerminal1 = 0x00004000 // Replace TopologicalEnd.
|
||||||
, SegHalfSlackened = 0x00020000
|
, SegWeakTerminal2 = 0x00008000 // Replace TopologicalEnd.
|
||||||
, SegSlackened = 0x00040000
|
, SegNotSourceAligned = 0x00010000
|
||||||
, SegAxisSet = 0x00080000
|
, SegNotTargetAligned = 0x00020000
|
||||||
, SegInvalidated = 0x00100000
|
, SegUnbound = 0x00100000
|
||||||
, SegInvalidatedLayer = 0x00200000
|
, SegHalfSlackened = 0x00200000
|
||||||
, SegCreated = 0x00400000
|
, SegSlackened = 0x00400000
|
||||||
|
, SegAxisSet = 0x00800000
|
||||||
|
, SegInvalidated = 0x01000000
|
||||||
|
, SegInvalidatedSource = 0x02000000
|
||||||
|
, SegInvalidatedTarget = 0x04000000
|
||||||
|
, SegInvalidatedLayer = 0x08000000
|
||||||
|
, SegCreated = 0x10000000
|
||||||
// Masks.
|
// Masks.
|
||||||
, SegWeakTerminal = SegStrongTerminal|SegWeakTerminal1|SegWeakTerminal2
|
, SegWeakTerminal = SegStrongTerminal|SegWeakTerminal1|SegWeakTerminal2
|
||||||
, SegNotAligned = SegNotSourceAligned|SegNotTargetAligned
|
, SegNotAligned = SegNotSourceAligned|SegNotTargetAligned
|
||||||
|
, SegSpinTop = SegSourceTop |SegTargetTop
|
||||||
|
, SegSpinBottom = SegSourceBottom|SegTargetBottom
|
||||||
|
, SegDepthSpin = SegSpinTop |SegSpinBottom
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -94,8 +104,9 @@ namespace Katabatic {
|
||||||
public:
|
public:
|
||||||
enum ObserverFlag { Create = 0x000000001
|
enum ObserverFlag { Create = 0x000000001
|
||||||
, Destroy = 0x000000002
|
, Destroy = 0x000000002
|
||||||
, Invalidate = 0x000000003
|
, Invalidate = 0x000000004
|
||||||
, Revalidate = 0x000000004
|
, Revalidate = 0x000000008
|
||||||
|
, RevalidatePPitch = 0x000000010
|
||||||
};
|
};
|
||||||
public:
|
public:
|
||||||
typedef std::function< void(AutoSegment*) > RevalidateCb_t;
|
typedef std::function< void(AutoSegment*) > RevalidateCb_t;
|
||||||
|
@ -153,7 +164,11 @@ namespace Katabatic {
|
||||||
inline bool isNotTargetAligned () const;
|
inline bool isNotTargetAligned () const;
|
||||||
inline bool isNotAligned () const;
|
inline bool isNotAligned () const;
|
||||||
bool isStrongTerminal ( unsigned int flags=0 ) const;
|
bool isStrongTerminal ( unsigned int flags=0 ) const;
|
||||||
|
bool isSameLayerDogleg () const;
|
||||||
inline bool isLayerChange () const;
|
inline bool isLayerChange () const;
|
||||||
|
inline bool isSpinTop () const;
|
||||||
|
inline bool isSpinBottom () const;
|
||||||
|
inline bool isSpinTopOrBottom () const;
|
||||||
inline bool isStrap () const;
|
inline bool isStrap () const;
|
||||||
inline bool isDogleg () const;
|
inline bool isDogleg () const;
|
||||||
inline bool isUnbound () const;
|
inline bool isUnbound () const;
|
||||||
|
@ -173,6 +188,7 @@ namespace Katabatic {
|
||||||
bool canSlacken ( unsigned int flags=0 ) const;
|
bool canSlacken ( unsigned int flags=0 ) const;
|
||||||
virtual bool checkPositions () const = 0;
|
virtual bool checkPositions () const = 0;
|
||||||
virtual bool checkConstraints () const = 0;
|
virtual bool checkConstraints () const = 0;
|
||||||
|
bool checkDepthSpin () const;
|
||||||
// Accessors.
|
// Accessors.
|
||||||
template< typename T >
|
template< typename T >
|
||||||
inline T* getObserver ();
|
inline T* getObserver ();
|
||||||
|
@ -188,6 +204,7 @@ namespace Katabatic {
|
||||||
inline AutoSegment* getParent () const;
|
inline AutoSegment* getParent () const;
|
||||||
inline unsigned int getDepth () const;
|
inline unsigned int getDepth () const;
|
||||||
inline DbU::Unit getPitch () const;
|
inline DbU::Unit getPitch () const;
|
||||||
|
DbU::Unit getPPitch () const;
|
||||||
inline DbU::Unit getAxis () const;
|
inline DbU::Unit getAxis () const;
|
||||||
virtual DbU::Unit getSourceU () const = 0;
|
virtual DbU::Unit getSourceU () const = 0;
|
||||||
virtual DbU::Unit getTargetU () const = 0;
|
virtual DbU::Unit getTargetU () const = 0;
|
||||||
|
@ -221,6 +238,8 @@ namespace Katabatic {
|
||||||
void computeTerminal ();
|
void computeTerminal ();
|
||||||
virtual void updateOrient () = 0;
|
virtual void updateOrient () = 0;
|
||||||
virtual void updatePositions () = 0;
|
virtual void updatePositions () = 0;
|
||||||
|
void updateSourceSpin ();
|
||||||
|
void updateTargetSpin ();
|
||||||
void sourceDetach ();
|
void sourceDetach ();
|
||||||
void targetDetach ();
|
void targetDetach ();
|
||||||
void sourceAttach ( AutoContact* );
|
void sourceAttach ( AutoContact* );
|
||||||
|
@ -248,6 +267,7 @@ namespace Katabatic {
|
||||||
// Canonical Modifiers.
|
// Canonical Modifiers.
|
||||||
AutoSegment* canonize ( unsigned int flags=KbNoFlags );
|
AutoSegment* canonize ( unsigned int flags=KbNoFlags );
|
||||||
virtual void invalidate ( unsigned int flags=KbPropagate );
|
virtual void invalidate ( unsigned int flags=KbPropagate );
|
||||||
|
void invalidate ( AutoContact* );
|
||||||
void computeOptimal ( set<AutoSegment*>& processeds );
|
void computeOptimal ( set<AutoSegment*>& processeds );
|
||||||
void setAxis ( DbU::Unit, unsigned int flags=KbNoFlags );
|
void setAxis ( DbU::Unit, unsigned int flags=KbNoFlags );
|
||||||
bool toConstraintAxis ( unsigned int flags=KbRealignate );
|
bool toConstraintAxis ( unsigned int flags=KbRealignate );
|
||||||
|
@ -414,6 +434,9 @@ namespace Katabatic {
|
||||||
inline bool AutoSegment::isUnbound () const { return _flags & SegUnbound ; }
|
inline bool AutoSegment::isUnbound () const { return _flags & SegUnbound ; }
|
||||||
inline bool AutoSegment::isStrap () const { return _flags & SegStrap; }
|
inline bool AutoSegment::isStrap () const { return _flags & SegStrap; }
|
||||||
inline bool AutoSegment::isLayerChange () const { return _flags & SegLayerChange; }
|
inline bool AutoSegment::isLayerChange () const { return _flags & SegLayerChange; }
|
||||||
|
inline bool AutoSegment::isSpinTop () const { return ((_flags & SegSpinTop ) == SegSpinTop); }
|
||||||
|
inline bool AutoSegment::isSpinBottom () const { return ((_flags & SegSpinBottom) == SegSpinBottom); }
|
||||||
|
inline bool AutoSegment::isSpinTopOrBottom () const { return isSpinTop() or isSpinBottom(); }
|
||||||
inline bool AutoSegment::isSlackened () const { return _flags & SegSlackened; }
|
inline bool AutoSegment::isSlackened () const { return _flags & SegSlackened; }
|
||||||
inline bool AutoSegment::isCanonical () const { return _flags & SegCanonical; }
|
inline bool AutoSegment::isCanonical () const { return _flags & SegCanonical; }
|
||||||
inline bool AutoSegment::isUnsetAxis () const { return not (_flags & SegAxisSet); }
|
inline bool AutoSegment::isUnsetAxis () const { return not (_flags & SegAxisSet); }
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2013, All Rights Reserved
|
// Copyright (c) UPMC/LIP6 2008-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
|
|
@ -42,6 +42,7 @@ namespace Katabatic {
|
||||||
inline bool isChip () const;
|
inline bool isChip () const;
|
||||||
inline Cell* getCell () const;
|
inline Cell* getCell () const;
|
||||||
inline Instance* getCore () const;
|
inline Instance* getCore () const;
|
||||||
|
inline Cell* getReferencePad () const;
|
||||||
inline const Box& getChipBb () const;
|
inline const Box& getChipBb () const;
|
||||||
inline const Box& getLeftPadsBb () const;
|
inline const Box& getLeftPadsBb () const;
|
||||||
inline const Box& getRightPadsBb () const;
|
inline const Box& getRightPadsBb () const;
|
||||||
|
@ -59,6 +60,7 @@ namespace Katabatic {
|
||||||
private:
|
private:
|
||||||
Cell* _cell;
|
Cell* _cell;
|
||||||
Instance* _core;
|
Instance* _core;
|
||||||
|
Cell* _referencePad;
|
||||||
bool _isChip;
|
bool _isChip;
|
||||||
Box _chipBb;
|
Box _chipBb;
|
||||||
Box _leftPadsBb;
|
Box _leftPadsBb;
|
||||||
|
@ -73,6 +75,7 @@ namespace Katabatic {
|
||||||
inline bool ChipTools::isChip () const { return _isChip; }
|
inline bool ChipTools::isChip () const { return _isChip; }
|
||||||
inline Cell* ChipTools::getCell () const { return _cell; }
|
inline Cell* ChipTools::getCell () const { return _cell; }
|
||||||
inline Instance* ChipTools::getCore () const { return _core; }
|
inline Instance* ChipTools::getCore () const { return _core; }
|
||||||
|
inline Cell* ChipTools::getReferencePad () const { return _referencePad; }
|
||||||
inline const Box& ChipTools::getChipBb () const { return _chipBb; }
|
inline const Box& ChipTools::getChipBb () const { return _chipBb; }
|
||||||
inline const Box& ChipTools::getLeftPadsBb () const { return _leftPadsBb; };
|
inline const Box& ChipTools::getLeftPadsBb () const { return _leftPadsBb; };
|
||||||
inline const Box& ChipTools::getRightPadsBb () const { return _rightPadsBb; };
|
inline const Box& ChipTools::getRightPadsBb () const { return _rightPadsBb; };
|
||||||
|
|
|
@ -25,8 +25,9 @@ namespace Hurricane {
|
||||||
class Cell;
|
class Cell;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "crlcore/RoutingGauge.h"
|
|
||||||
namespace CRL {
|
namespace CRL {
|
||||||
|
class CellGauge;
|
||||||
|
class RoutingGauge;
|
||||||
class RoutingLayerGauge;
|
class RoutingLayerGauge;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,6 +41,7 @@ namespace Katabatic {
|
||||||
using Hurricane::Layer;
|
using Hurricane::Layer;
|
||||||
using Hurricane::DbU;
|
using Hurricane::DbU;
|
||||||
using Hurricane::Cell;
|
using Hurricane::Cell;
|
||||||
|
using CRL::CellGauge;
|
||||||
using CRL::RoutingGauge;
|
using CRL::RoutingGauge;
|
||||||
using CRL::RoutingLayerGauge;
|
using CRL::RoutingLayerGauge;
|
||||||
|
|
||||||
|
@ -61,11 +63,14 @@ namespace Katabatic {
|
||||||
virtual size_t getDepth () const = 0;
|
virtual size_t getDepth () const = 0;
|
||||||
virtual size_t getAllowedDepth () const = 0;
|
virtual size_t getAllowedDepth () const = 0;
|
||||||
virtual size_t getLayerDepth ( const Layer* ) const = 0;
|
virtual size_t getLayerDepth ( const Layer* ) const = 0;
|
||||||
|
virtual CellGauge* getCellGauge () const = 0;
|
||||||
virtual RoutingGauge* getRoutingGauge () const = 0;
|
virtual RoutingGauge* getRoutingGauge () const = 0;
|
||||||
virtual RoutingLayerGauge* getLayerGauge ( size_t depth ) const = 0;
|
virtual RoutingLayerGauge* getLayerGauge ( size_t depth ) const = 0;
|
||||||
virtual const Layer* getRoutingLayer ( size_t depth ) const = 0;
|
virtual const Layer* getRoutingLayer ( size_t depth ) const = 0;
|
||||||
virtual Layer* getContactLayer ( size_t depth ) const = 0;
|
virtual Layer* getContactLayer ( size_t depth ) const = 0;
|
||||||
virtual DbU::Unit getExtensionCap () const = 0;
|
virtual DbU::Unit getExtensionCap () const = 0;
|
||||||
|
virtual DbU::Unit getSliceHeight () const = 0;
|
||||||
|
virtual DbU::Unit getSliceStep () const = 0;
|
||||||
virtual DbU::Unit getPitch ( size_t depth, unsigned int flags ) const = 0;
|
virtual DbU::Unit getPitch ( size_t depth, unsigned int flags ) const = 0;
|
||||||
virtual DbU::Unit getOffset ( size_t depth ) const = 0;
|
virtual DbU::Unit getOffset ( size_t depth ) const = 0;
|
||||||
virtual DbU::Unit getWireWidth ( size_t depth ) const = 0;
|
virtual DbU::Unit getWireWidth ( size_t depth ) const = 0;
|
||||||
|
@ -105,7 +110,7 @@ namespace Katabatic {
|
||||||
friend class Configuration;
|
friend class Configuration;
|
||||||
public:
|
public:
|
||||||
// Constructor & Destructor.
|
// Constructor & Destructor.
|
||||||
ConfigurationConcrete ( const RoutingGauge* rg=NULL );
|
ConfigurationConcrete ( const CellGauge* cg=NULL, const RoutingGauge* rg=NULL );
|
||||||
virtual ~ConfigurationConcrete ();
|
virtual ~ConfigurationConcrete ();
|
||||||
virtual ConfigurationConcrete* clone () const;
|
virtual ConfigurationConcrete* clone () const;
|
||||||
// Methods.
|
// Methods.
|
||||||
|
@ -114,11 +119,14 @@ namespace Katabatic {
|
||||||
virtual size_t getDepth () const;
|
virtual size_t getDepth () const;
|
||||||
virtual size_t getAllowedDepth () const;
|
virtual size_t getAllowedDepth () const;
|
||||||
virtual size_t getLayerDepth ( const Layer* ) const;
|
virtual size_t getLayerDepth ( const Layer* ) const;
|
||||||
|
virtual CellGauge* getCellGauge () const;
|
||||||
virtual RoutingGauge* getRoutingGauge () const;
|
virtual RoutingGauge* getRoutingGauge () const;
|
||||||
virtual RoutingLayerGauge* getLayerGauge ( size_t depth ) const;
|
virtual RoutingLayerGauge* getLayerGauge ( size_t depth ) const;
|
||||||
virtual const Layer* getRoutingLayer ( size_t depth ) const;
|
virtual const Layer* getRoutingLayer ( size_t depth ) const;
|
||||||
virtual Layer* getContactLayer ( size_t depth ) const;
|
virtual Layer* getContactLayer ( size_t depth ) const;
|
||||||
virtual DbU::Unit getExtensionCap () const;
|
virtual DbU::Unit getExtensionCap () const;
|
||||||
|
virtual DbU::Unit getSliceHeight () const;
|
||||||
|
virtual DbU::Unit getSliceStep () const;
|
||||||
virtual DbU::Unit getPitch ( size_t depth, unsigned int flags ) const;
|
virtual DbU::Unit getPitch ( size_t depth, unsigned int flags ) const;
|
||||||
virtual DbU::Unit getOffset ( size_t depth ) const;
|
virtual DbU::Unit getOffset ( size_t depth ) const;
|
||||||
virtual DbU::Unit getWireWidth ( size_t depth ) const;
|
virtual DbU::Unit getWireWidth ( size_t depth ) const;
|
||||||
|
@ -145,6 +153,7 @@ namespace Katabatic {
|
||||||
const Layer* _gmetalh;
|
const Layer* _gmetalh;
|
||||||
const Layer* _gmetalv;
|
const Layer* _gmetalv;
|
||||||
const Layer* _gcontact;
|
const Layer* _gcontact;
|
||||||
|
CellGauge* _cg;
|
||||||
RoutingGauge* _rg;
|
RoutingGauge* _rg;
|
||||||
DbU::Unit _extensionCap;
|
DbU::Unit _extensionCap;
|
||||||
float _saturateRatio;
|
float _saturateRatio;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// -*- mode: C++; explicit-buffer-name: "Constants.h<katabatic>" -*-
|
// -*- mode: C++; explicit-buffer-name: "Constants.h<katabatic>" -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC 2013-2013, All Rights Reserved
|
// Copyright (c) UPMC 2013-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
@ -27,8 +27,8 @@ namespace Katabatic {
|
||||||
, KbHorizontal = 0x00000010
|
, KbHorizontal = 0x00000010
|
||||||
, KbVertical = 0x00000020
|
, KbVertical = 0x00000020
|
||||||
, KbWithPerpands = 0x00000040
|
, KbWithPerpands = 0x00000040
|
||||||
, KbBySource = 0x00000080
|
, KbSource = 0x00000080
|
||||||
, KbByTarget = 0x00000100
|
, KbTarget = 0x00000100
|
||||||
, KbWarnOnError = 0x00000200
|
, KbWarnOnError = 0x00000200
|
||||||
, KbTopology = 0x00000400
|
, KbTopology = 0x00000400
|
||||||
, KbGlobalSegment = 0x00000800
|
, KbGlobalSegment = 0x00000800
|
||||||
|
@ -44,6 +44,7 @@ namespace Katabatic {
|
||||||
, KbWithNeighbors = 0x00200000
|
, KbWithNeighbors = 0x00200000
|
||||||
, KbNoCheckLayer = 0x00400000
|
, KbNoCheckLayer = 0x00400000
|
||||||
, KbHalfSlacken = 0x00800000
|
, KbHalfSlacken = 0x00800000
|
||||||
|
, KbNoGCellShrink = 0x01000000
|
||||||
, KbDirectionMask = KbHorizontal|KbVertical
|
, KbDirectionMask = KbHorizontal|KbVertical
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -72,7 +73,7 @@ namespace Katabatic {
|
||||||
|
|
||||||
inline unsigned int perpandicularTo ( unsigned int direction )
|
inline unsigned int perpandicularTo ( unsigned int direction )
|
||||||
{
|
{
|
||||||
switch ( direction ) {
|
switch ( direction & KbDirectionMask ) {
|
||||||
case KbHorizontal: return KbVertical;
|
case KbHorizontal: return KbVertical;
|
||||||
case KbVertical: return KbHorizontal;
|
case KbVertical: return KbHorizontal;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2013, All Rights Reserved
|
// Copyright (c) UPMC/LIP6 2008-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
@ -172,14 +171,14 @@ namespace Katabatic {
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if ( direction & Constant::Horizontal ) {
|
if ( direction & Constant::Horizontal ) {
|
||||||
channelMin = getYMin() + DbU::lambda( inclusive?0:0.1 );
|
channelMin = getYMin() + DbU::toLambda( inclusive?0:0.1 );
|
||||||
channelMax = getYMax();
|
channelMax = getYMax();
|
||||||
channelLeft = getXMin() + DbU::lambda( inclusive?0:0.1 );
|
channelLeft = getXMin() + DbU::toLambda( inclusive?0:0.1 );
|
||||||
channelRight = getXMax();
|
channelRight = getXMax();
|
||||||
} else {
|
} else {
|
||||||
channelMin = getXMin() + DbU::lambda( inclusive?0:0.1 );
|
channelMin = getXMin() + DbU::toLambda( inclusive?0:0.1 );
|
||||||
channelMax = getXMax();
|
channelMax = getXMax();
|
||||||
channelLeft = getYMin() + DbU::lambda( inclusive?0:0.1 );
|
channelLeft = getYMin() + DbU::toLambda( inclusive?0:0.1 );
|
||||||
channelRight = getYMax();
|
channelRight = getYMax();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,6 +106,7 @@ namespace Katabatic {
|
||||||
inline unsigned int getFlags ( unsigned int mask ) const;
|
inline unsigned int getFlags ( unsigned int mask ) const;
|
||||||
inline Configuration* getKatabaticConfiguration ();
|
inline Configuration* getKatabaticConfiguration ();
|
||||||
virtual Configuration* getConfiguration ();
|
virtual Configuration* getConfiguration ();
|
||||||
|
inline CellGauge* getCellGauge () const;
|
||||||
inline RoutingGauge* getRoutingGauge () const;
|
inline RoutingGauge* getRoutingGauge () const;
|
||||||
inline RoutingLayerGauge* getLayerGauge ( size_t depth ) const;
|
inline RoutingLayerGauge* getLayerGauge ( size_t depth ) const;
|
||||||
inline const Layer* getRoutingLayer ( size_t depth ) const ;
|
inline const Layer* getRoutingLayer ( size_t depth ) const ;
|
||||||
|
@ -219,6 +220,7 @@ namespace Katabatic {
|
||||||
inline void KatabaticEngine::setGlobalThreshold ( DbU::Unit threshold ) { _configuration->setGlobalThreshold(threshold); }
|
inline void KatabaticEngine::setGlobalThreshold ( DbU::Unit threshold ) { _configuration->setGlobalThreshold(threshold); }
|
||||||
inline unsigned int KatabaticEngine::getFlags ( unsigned int mask ) const { return _flags & mask; }
|
inline unsigned int KatabaticEngine::getFlags ( unsigned int mask ) const { return _flags & mask; }
|
||||||
inline EngineState KatabaticEngine::getState () const { return _state; }
|
inline EngineState KatabaticEngine::getState () const { return _state; }
|
||||||
|
inline CellGauge* KatabaticEngine::getCellGauge () const { return _configuration->getCellGauge(); }
|
||||||
inline RoutingGauge* KatabaticEngine::getRoutingGauge () const { return _configuration->getRoutingGauge(); }
|
inline RoutingGauge* KatabaticEngine::getRoutingGauge () const { return _configuration->getRoutingGauge(); }
|
||||||
inline RoutingLayerGauge* KatabaticEngine::getLayerGauge ( size_t depth ) const { return _configuration->getLayerGauge(depth); }
|
inline RoutingLayerGauge* KatabaticEngine::getLayerGauge ( size_t depth ) const { return _configuration->getLayerGauge(depth); }
|
||||||
inline const Layer* KatabaticEngine::getRoutingLayer ( size_t depth ) const { return _configuration->getRoutingLayer(depth); }
|
inline const Layer* KatabaticEngine::getRoutingLayer ( size_t depth ) const { return _configuration->getRoutingLayer(depth); }
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC 2008-2013, All Rights Reserved
|
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include <boost/function.hpp>
|
#include <boost/function.hpp>
|
||||||
#include "hurricane/Commons.h"
|
#include "hurricane/Commons.h"
|
||||||
#include "hurricane/DbU.h"
|
#include "hurricane/DbU.h"
|
||||||
|
#include "crlcore/CellGauge.h"
|
||||||
#include "crlcore/RoutingGauge.h"
|
#include "crlcore/RoutingGauge.h"
|
||||||
#include "katabatic/Constants.h"
|
#include "katabatic/Constants.h"
|
||||||
#include "katabatic/Configuration.h"
|
#include "katabatic/Configuration.h"
|
||||||
|
@ -82,6 +83,9 @@ namespace Katabatic {
|
||||||
static size_t getSaturateRp ();
|
static size_t getSaturateRp ();
|
||||||
static inline size_t getAllowedDepth ();
|
static inline size_t getAllowedDepth ();
|
||||||
static DbU::Unit getExtensionCap ();
|
static DbU::Unit getExtensionCap ();
|
||||||
|
static inline CellGauge* getCellGauge ();
|
||||||
|
static inline DbU::Unit getSliceHeight ();
|
||||||
|
static inline DbU::Unit getSliceStep ();
|
||||||
static inline RoutingGauge* getRoutingGauge ();
|
static inline RoutingGauge* getRoutingGauge ();
|
||||||
static inline RoutingLayerGauge* getLayerGauge ( size_t depth );
|
static inline RoutingLayerGauge* getLayerGauge ( size_t depth );
|
||||||
static inline size_t getDepth ();
|
static inline size_t getDepth ();
|
||||||
|
@ -147,6 +151,7 @@ namespace Katabatic {
|
||||||
static Session* _session;
|
static Session* _session;
|
||||||
KatabaticEngine* _katabatic;
|
KatabaticEngine* _katabatic;
|
||||||
Technology* _technology;
|
Technology* _technology;
|
||||||
|
CellGauge* _cellGauge;
|
||||||
RoutingGauge* _routingGauge;
|
RoutingGauge* _routingGauge;
|
||||||
vector<AutoContact*> _autoContacts;
|
vector<AutoContact*> _autoContacts;
|
||||||
vector<AutoSegment*> _doglegs;
|
vector<AutoSegment*> _doglegs;
|
||||||
|
@ -170,6 +175,7 @@ namespace Katabatic {
|
||||||
|
|
||||||
// Inline Functions.
|
// Inline Functions.
|
||||||
inline Technology* Session::getTechnology () { return get("getTechnology()")->_technology; }
|
inline Technology* Session::getTechnology () { return get("getTechnology()")->_technology; }
|
||||||
|
inline CellGauge* Session::getCellGauge () { return get("getCellGauge()")->_cellGauge; }
|
||||||
inline RoutingGauge* Session::getRoutingGauge () { return get("getRoutingGauge()")->_routingGauge; }
|
inline RoutingGauge* Session::getRoutingGauge () { return get("getRoutingGauge()")->_routingGauge; }
|
||||||
inline bool Session::doDestroyBaseContact () { return get("doDestroyBaseContact()")->_doDestroyBaseContact(); }
|
inline bool Session::doDestroyBaseContact () { return get("doDestroyBaseContact()")->_doDestroyBaseContact(); }
|
||||||
inline bool Session::doDestroyBaseSegment () { return get("doDestroyBaseSegment()")->_doDestroyBaseSegment(); }
|
inline bool Session::doDestroyBaseSegment () { return get("doDestroyBaseSegment()")->_doDestroyBaseSegment(); }
|
||||||
|
@ -195,6 +201,8 @@ namespace Katabatic {
|
||||||
inline DbU::Unit Session::getExtensionCap () { return getConfiguration()->getExtensionCap(); }
|
inline DbU::Unit Session::getExtensionCap () { return getConfiguration()->getExtensionCap(); }
|
||||||
inline size_t Session::getAllowedDepth () { return getConfiguration()->getAllowedDepth(); }
|
inline size_t Session::getAllowedDepth () { return getConfiguration()->getAllowedDepth(); }
|
||||||
|
|
||||||
|
inline DbU::Unit Session::getSliceHeight () { return getCellGauge()->getSliceHeight(); }
|
||||||
|
inline DbU::Unit Session::getSliceStep () { return getCellGauge()->getSliceStep(); }
|
||||||
inline RoutingLayerGauge* Session::getLayerGauge ( size_t depth ) { return getRoutingGauge()->getLayerGauge(depth); }
|
inline RoutingLayerGauge* Session::getLayerGauge ( size_t depth ) { return getRoutingGauge()->getLayerGauge(depth); }
|
||||||
inline size_t Session::getDepth () { return getRoutingGauge()->getDepth(); }
|
inline size_t Session::getDepth () { return getRoutingGauge()->getDepth(); }
|
||||||
inline size_t Session::getViaDepth ( const Layer* layer ) { return getRoutingGauge()->getViaDepth(layer); }
|
inline size_t Session::getViaDepth ( const Layer* layer ) { return getRoutingGauge()->getViaDepth(layer); }
|
||||||
|
|
|
@ -223,16 +223,67 @@ namespace {
|
||||||
else destroyRing( _vdde );
|
else destroyRing( _vdde );
|
||||||
if (_vsse == NULL) cerr << Error("Missing <vsse> net (for pads) at chip level." ) << endl;
|
if (_vsse == NULL) cerr << Error("Missing <vsse> net (for pads) at chip level." ) << endl;
|
||||||
else destroyRing( _vsse );
|
else destroyRing( _vsse );
|
||||||
if (_ck == NULL) cerr << Warning("No <ck> net at (for pads) chip level." ) << endl;
|
|
||||||
if (_cki == NULL) cerr << Warning("No <cki> net at (for pads) chip level." ) << endl;
|
|
||||||
else destroyRing( _cki );
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_vddi == NULL) cerr << Error("Missing <vddi>/<vdd> net (for pads) at top level." ) << endl;
|
if (_vddi == NULL) cerr << Error("Missing <vddi>/<vdd> net (for pads) at top level." ) << endl;
|
||||||
else destroyRing( _vddi );
|
else destroyRing( _vddi );
|
||||||
if (_vssi == NULL) cerr << Error("Missing <vssi>/<vss> net (for pads) at top level." ) << endl;
|
if (_vssi == NULL) cerr << Error("Missing <vssi>/<vss> net (for pads) at top level." ) << endl;
|
||||||
else destroyRing( _vssi );
|
else destroyRing( _vssi );
|
||||||
if (_cko == NULL) cparanoid << Warning("No <ck> net at top level." ) << endl;
|
if (_ck == NULL) cerr << Warning("No <ck> net at (for pads) chip level." ) << endl;
|
||||||
|
if (_cki == NULL) cerr << Warning("No <cki> net at (for pads) chip level." ) << endl;
|
||||||
|
else destroyRing( _cki );
|
||||||
|
} else {
|
||||||
|
_vddiName = "";
|
||||||
|
_vssiName = "";
|
||||||
|
_ckoName = "";
|
||||||
|
|
||||||
|
forEach ( Net*, inet, topCell->getNets() ) {
|
||||||
|
Net::Type netType = inet->getType();
|
||||||
|
if (netType == Net::Type::POWER) {
|
||||||
|
if (_vddiName.isEmpty()) {
|
||||||
|
_vddiName = inet->getName();
|
||||||
|
_vddi = *inet;
|
||||||
|
} else {
|
||||||
|
cerr << Error("Second power supply net <%s> net at top block level will be ignored.\n"
|
||||||
|
" (will consider only <%s>)"
|
||||||
|
, getString(inet ->getName()).c_str()
|
||||||
|
, getString(_vddi->getName()).c_str()
|
||||||
|
) << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (netType == Net::Type::GROUND) {
|
||||||
|
if (_vssiName.isEmpty()) {
|
||||||
|
_vssiName = inet->getName();
|
||||||
|
_vssi = *inet;
|
||||||
|
} else {
|
||||||
|
cerr << Error("Second power ground net <%s> net at top block level will be ignored.\n"
|
||||||
|
" (will consider only <%s>)"
|
||||||
|
, getString(inet ->getName()).c_str()
|
||||||
|
, getString(_vssi->getName()).c_str()
|
||||||
|
) << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (netType == Net::Type::CLOCK) {
|
||||||
|
if (_ckoName.isEmpty()) {
|
||||||
|
_ckoName = inet->getName();
|
||||||
|
_cko = *inet;
|
||||||
|
} else {
|
||||||
|
cerr << Error("Second clock net <%s> net at top block level will be ignored.\n"
|
||||||
|
" (will consider only <%s>)"
|
||||||
|
, getString(inet ->getName()).c_str()
|
||||||
|
, getString(_cko->getName()).c_str()
|
||||||
|
) << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((_vddi) == NULL) cerr << Error("Missing <vdd> net at top block level." ) << endl;
|
||||||
|
else destroyRing( _vddi );
|
||||||
|
if (_vssi == NULL) cerr << Error("Missing <vss> net at top block level." ) << endl;
|
||||||
|
else destroyRing( _vssi );
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_cko == NULL) cparanoid << Warning("No clock net at top level." ) << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -524,7 +575,7 @@ namespace {
|
||||||
Segment* segment = NULL;
|
Segment* segment = NULL;
|
||||||
DbU::Unit delta = plane->getLayerGauge()->getPitch()
|
DbU::Unit delta = plane->getLayerGauge()->getPitch()
|
||||||
- plane->getLayerGauge()->getHalfWireWidth()
|
- plane->getLayerGauge()->getHalfWireWidth()
|
||||||
- DbU::lambda(0.1);
|
- DbU::fromLambda(0.1);
|
||||||
DbU::Unit extension = layer->getExtentionCap();
|
DbU::Unit extension = layer->getExtentionCap();
|
||||||
//DbU::Unit extension = Session::getExtentionCap();
|
//DbU::Unit extension = Session::getExtentionCap();
|
||||||
//unsigned int type = plane->getLayerGauge()->getType();
|
//unsigned int type = plane->getLayerGauge()->getType();
|
||||||
|
@ -1020,8 +1071,8 @@ namespace {
|
||||||
|
|
||||||
if ( _chipTools.isChip()
|
if ( _chipTools.isChip()
|
||||||
and ((depth == 2) or (depth == 3))
|
and ((depth == 2) or (depth == 3))
|
||||||
and (segment->getWidth () == DbU::lambda( 12.0))
|
and (segment->getWidth () == DbU::fromLambda( 12.0))
|
||||||
and (segment->getLength() > DbU::lambda(200.0))
|
and (segment->getLength() > DbU::fromLambda(200.0))
|
||||||
and (_kite->getChipTools().getCorona().contains(bb)) ) {
|
and (_kite->getChipTools().getCorona().contains(bb)) ) {
|
||||||
switch ( depth ) {
|
switch ( depth ) {
|
||||||
case 2: _vRingSegments.push_back ( segment ); break; // M3 V.
|
case 2: _vRingSegments.push_back ( segment ); break; // M3 V.
|
||||||
|
|
|
@ -125,10 +125,22 @@ namespace Kite {
|
||||||
{ return _base->getLayerDepth(layer); }
|
{ return _base->getLayerDepth(layer); }
|
||||||
|
|
||||||
|
|
||||||
|
CellGauge* Configuration::getCellGauge () const
|
||||||
|
{ return _base->getCellGauge(); }
|
||||||
|
|
||||||
|
|
||||||
RoutingGauge* Configuration::getRoutingGauge () const
|
RoutingGauge* Configuration::getRoutingGauge () const
|
||||||
{ return _base->getRoutingGauge(); }
|
{ return _base->getRoutingGauge(); }
|
||||||
|
|
||||||
|
|
||||||
|
DbU::Unit Configuration::getSliceHeight () const
|
||||||
|
{ return _base->getSliceHeight(); }
|
||||||
|
|
||||||
|
|
||||||
|
DbU::Unit Configuration::getSliceStep () const
|
||||||
|
{ return _base->getSliceStep(); }
|
||||||
|
|
||||||
|
|
||||||
RoutingLayerGauge* Configuration::getLayerGauge ( size_t depth ) const
|
RoutingLayerGauge* Configuration::getLayerGauge ( size_t depth ) const
|
||||||
{ return _base->getLayerGauge(depth); }
|
{ return _base->getLayerGauge(depth); }
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,7 @@ namespace Kite {
|
||||||
if (RoutingEvent::getStage() == RoutingEvent::Repair)
|
if (RoutingEvent::getStage() == RoutingEvent::Repair)
|
||||||
perpandicular->base()->setFlagsOnAligneds( Katabatic::SegUnbound );
|
perpandicular->base()->setFlagsOnAligneds( Katabatic::SegUnbound );
|
||||||
|
|
||||||
interval.inflate( DbU::lambda(-0.5) );
|
interval.inflate( DbU::fromLambda(-0.5) );
|
||||||
|
|
||||||
ltrace(148) << "| perpandicular: " << perpandiculars[i] << endl;
|
ltrace(148) << "| perpandicular: " << perpandiculars[i] << endl;
|
||||||
ltrace(148) << "| canonical: " << perpandicular << endl;
|
ltrace(148) << "| canonical: " << perpandicular << endl;
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
#include <hurricane/Go.h>
|
#include <hurricane/Go.h>
|
||||||
#include <hurricane/Net.h>
|
#include <hurricane/Net.h>
|
||||||
#include <hurricane/Cell.h>
|
#include <hurricane/Cell.h>
|
||||||
#include <hurricane/UpdateSession.h>
|
|
||||||
#include <hurricane/viewer/Graphics.h>
|
#include <hurricane/viewer/Graphics.h>
|
||||||
#include <hurricane/viewer/CellWidget.h>
|
#include <hurricane/viewer/CellWidget.h>
|
||||||
#include <hurricane/viewer/CellViewer.h>
|
#include <hurricane/viewer/CellViewer.h>
|
||||||
|
@ -52,7 +51,6 @@ namespace Kite {
|
||||||
using Hurricane::Exception;
|
using Hurricane::Exception;
|
||||||
using Hurricane::Breakpoint;
|
using Hurricane::Breakpoint;
|
||||||
using Hurricane::DebugSession;
|
using Hurricane::DebugSession;
|
||||||
using Hurricane::UpdateSession;
|
|
||||||
using Hurricane::Point;
|
using Hurricane::Point;
|
||||||
using Hurricane::Net;
|
using Hurricane::Net;
|
||||||
using Hurricane::Graphics;
|
using Hurricane::Graphics;
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
#include "hurricane/Instance.h"
|
#include "hurricane/Instance.h"
|
||||||
#include "hurricane/Vertical.h"
|
#include "hurricane/Vertical.h"
|
||||||
#include "hurricane/Horizontal.h"
|
#include "hurricane/Horizontal.h"
|
||||||
#include "hurricane/UpdateSession.h"
|
|
||||||
#include "crlcore/Measures.h"
|
#include "crlcore/Measures.h"
|
||||||
#include "knik/Vertex.h"
|
#include "knik/Vertex.h"
|
||||||
#include "knik/Edge.h"
|
#include "knik/Edge.h"
|
||||||
|
@ -41,6 +40,7 @@
|
||||||
#include "kite/DataNegociate.h"
|
#include "kite/DataNegociate.h"
|
||||||
#include "kite/RoutingPlane.h"
|
#include "kite/RoutingPlane.h"
|
||||||
#include "kite/Session.h"
|
#include "kite/Session.h"
|
||||||
|
#include "kite/TrackSegment.h"
|
||||||
#include "kite/NegociateWindow.h"
|
#include "kite/NegociateWindow.h"
|
||||||
#include "kite/KiteEngine.h"
|
#include "kite/KiteEngine.h"
|
||||||
|
|
||||||
|
@ -456,6 +456,7 @@ namespace Kite {
|
||||||
//DebugSession::addToTrace( getCell(), "acc_reg_ckx" );
|
//DebugSession::addToTrace( getCell(), "acc_reg_ckx" );
|
||||||
//DebugSession::addToTrace( getCell(), "acc_reg_nckx" );
|
//DebugSession::addToTrace( getCell(), "acc_reg_nckx" );
|
||||||
//DebugSession::addToTrace( getCell(), "i(0)" );
|
//DebugSession::addToTrace( getCell(), "i(0)" );
|
||||||
|
//DebugSession::addToTrace( getCell(), "ram_nmux_0_sel0" );
|
||||||
//DebugSession::addToTrace( getCell(), "ram_adrb_14" );
|
//DebugSession::addToTrace( getCell(), "ram_adrb_14" );
|
||||||
//DebugSession::addToTrace( getCell(), "ram_adrb_9" );
|
//DebugSession::addToTrace( getCell(), "ram_adrb_9" );
|
||||||
//DebugSession::addToTrace( getCell(), "ram_adra(11)" );
|
//DebugSession::addToTrace( getCell(), "ram_adra(11)" );
|
||||||
|
@ -463,7 +464,7 @@ namespace Kite {
|
||||||
//DebugSession::addToTrace( getCell(), "ram_adrb(8)" );
|
//DebugSession::addToTrace( getCell(), "ram_adrb(8)" );
|
||||||
//DebugSession::addToTrace( getCell(), "alu_carry(1)" );
|
//DebugSession::addToTrace( getCell(), "alu_carry(1)" );
|
||||||
//DebugSession::addToTrace( getCell(), "alu_np(0)" );
|
//DebugSession::addToTrace( getCell(), "alu_np(0)" );
|
||||||
//DebugSession::addToTrace( getCell(), "ram_d(3)" );
|
//DebugSession::addToTrace( getCell(), "ram_q2(0)" );
|
||||||
//DebugSession::addToTrace( getCell(), "ram_q1(0)" );
|
//DebugSession::addToTrace( getCell(), "ram_q1(0)" );
|
||||||
//DebugSession::addToTrace( getCell(), "ram_i_up" );
|
//DebugSession::addToTrace( getCell(), "ram_i_up" );
|
||||||
// Test signals from <amd2901> (M1-VLSI).
|
// Test signals from <amd2901> (M1-VLSI).
|
||||||
|
@ -504,6 +505,7 @@ namespace Kite {
|
||||||
//DebugSession::addToTrace( getCell(), "mips_r3000_1m_dp_mux32_s_mw_se_sel0" );
|
//DebugSession::addToTrace( getCell(), "mips_r3000_1m_dp_mux32_s_mw_se_sel0" );
|
||||||
//DebugSession::addToTrace( getCell(), "mips_r3000_1m_dp_mux32_badr_sd_sel1" );
|
//DebugSession::addToTrace( getCell(), "mips_r3000_1m_dp_mux32_badr_sd_sel1" );
|
||||||
//DebugSession::addToTrace( getCell(), "mips_r3000_1m_dp_addsub32_carith_se_pi_3_21" );
|
//DebugSession::addToTrace( getCell(), "mips_r3000_1m_dp_addsub32_carith_se_pi_3_21" );
|
||||||
|
//DebugSession::addToTrace( getCell(), "mips_r3000_1m_dp_addsub32_carith_se_pi_4_26" );
|
||||||
//DebugSession::addToTrace( getCell(), "mips_r3000_1m_ct_cause_rx(1)" );
|
//DebugSession::addToTrace( getCell(), "mips_r3000_1m_ct_cause_rx(1)" );
|
||||||
// Test signals from <MIPS> (R3000,pipeline+chip).
|
// Test signals from <MIPS> (R3000,pipeline+chip).
|
||||||
//DebugSession::addToTrace( getCell(), "mips_r3000_core.mips_r3000_1m_dp.banc.reada0" );
|
//DebugSession::addToTrace( getCell(), "mips_r3000_core.mips_r3000_1m_dp.banc.reada0" );
|
||||||
|
@ -552,7 +554,6 @@ namespace Kite {
|
||||||
if (_negociateWindow) return;
|
if (_negociateWindow) return;
|
||||||
|
|
||||||
startMeasures();
|
startMeasures();
|
||||||
|
|
||||||
Session::open( this );
|
Session::open( this );
|
||||||
|
|
||||||
_negociateWindow = NegociateWindow::create( this );
|
_negociateWindow = NegociateWindow::create( this );
|
||||||
|
@ -564,9 +565,9 @@ namespace Kite {
|
||||||
_negociateWindow = NULL;
|
_negociateWindow = NULL;
|
||||||
|
|
||||||
Session::close();
|
Session::close();
|
||||||
|
stopMeasures();
|
||||||
//if ( _editor ) _editor->refresh ();
|
//if ( _editor ) _editor->refresh ();
|
||||||
|
|
||||||
stopMeasures();
|
|
||||||
printMeasures( "algo" );
|
printMeasures( "algo" );
|
||||||
|
|
||||||
Session::open( this );
|
Session::open( this );
|
||||||
|
@ -601,7 +602,7 @@ namespace Kite {
|
||||||
TrackElement* segment = _lookup( ilut->second );
|
TrackElement* segment = _lookup( ilut->second );
|
||||||
if (segment == NULL) continue;
|
if (segment == NULL) continue;
|
||||||
|
|
||||||
unsigned long long wl = (unsigned long long)DbU::getLambda( segment->getLength() );
|
unsigned long long wl = (unsigned long long)DbU::toLambda( segment->getLength() );
|
||||||
if (wl > 100000) {
|
if (wl > 100000) {
|
||||||
cerr << Error("KiteEngine::printCompletion(): Suspiciously long wire: %llu for %p:%s"
|
cerr << Error("KiteEngine::printCompletion(): Suspiciously long wire: %llu for %p:%s"
|
||||||
,wl,ilut->first,getString(segment).c_str()) << endl;
|
,wl,ilut->first,getString(segment).c_str()) << endl;
|
||||||
|
@ -610,6 +611,12 @@ namespace Kite {
|
||||||
|
|
||||||
if (segment->isFixed() or segment->isBlockage()) continue;
|
if (segment->isFixed() or segment->isBlockage()) continue;
|
||||||
|
|
||||||
|
// if (segment->isSameLayerDogleg()) {
|
||||||
|
// cerr << " Same layer:" << segment << endl;
|
||||||
|
// cerr << " S: " << segment->base()->getAutoSource() << endl;
|
||||||
|
// cerr << " T: " << segment->base()->getAutoTarget() << endl;
|
||||||
|
// }
|
||||||
|
|
||||||
totalWireLength += wl;
|
totalWireLength += wl;
|
||||||
if (segment->getTrack() != NULL) {
|
if (segment->getTrack() != NULL) {
|
||||||
routeds++;
|
routeds++;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2013, All Rights Reserved
|
// Copyright (c) UPMC/LIP6 2008-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
@ -25,7 +25,6 @@ namespace bopts = boost::program_options;
|
||||||
#include "hurricane/DataBase.h"
|
#include "hurricane/DataBase.h"
|
||||||
#include "hurricane/Cell.h"
|
#include "hurricane/Cell.h"
|
||||||
#include "hurricane/Warning.h"
|
#include "hurricane/Warning.h"
|
||||||
#include "hurricane/UpdateSession.h"
|
|
||||||
using namespace Hurricane;
|
using namespace Hurricane;
|
||||||
|
|
||||||
#include "crlcore/Utilities.h"
|
#include "crlcore/Utilities.h"
|
||||||
|
|
|
@ -127,13 +127,13 @@ namespace Kite {
|
||||||
|
|
||||||
TrackElement* neighbor = _segment->getPrevious();
|
TrackElement* neighbor = _segment->getPrevious();
|
||||||
if (neighbor and (neighbor->isFixed() or neighbor->isBlockage())) {
|
if (neighbor and (neighbor->isFixed() or neighbor->isBlockage())) {
|
||||||
if (abs(axis - neighbor->getTargetU()) < DbU::lambda(10.0))
|
if (abs(axis - neighbor->getTargetU()) < getPPitch()*2)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
neighbor = _segment->getNext();
|
neighbor = _segment->getNext();
|
||||||
if (neighbor and (neighbor->isFixed() or neighbor->isBlockage())) {
|
if (neighbor and (neighbor->isFixed() or neighbor->isBlockage())) {
|
||||||
if (abs(axis - neighbor->getSourceU()) < DbU::lambda(10.0))
|
if (abs(axis - neighbor->getSourceU()) < getPPitch()*2)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,8 +209,7 @@ namespace Kite {
|
||||||
|
|
||||||
if (Manipulator(perpandiculars[i],_fsm).ripup(perpandicularActionFlags)) {
|
if (Manipulator(perpandiculars[i],_fsm).ripup(perpandicularActionFlags)) {
|
||||||
if (dislodgeCaged) {
|
if (dislodgeCaged) {
|
||||||
// Ugly: hard-coded uses of pitch.
|
_event->setAxisHint( _event->getSegment()->getAxis() + _event->getSegment()->getPitch() );
|
||||||
_event->setAxisHint( _event->getSegment()->getAxis() + DbU::lambda(5.0) );
|
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -272,7 +271,7 @@ namespace Kite {
|
||||||
|
|
||||||
bool Manipulator::relax ( Interval interval, unsigned int flags )
|
bool Manipulator::relax ( Interval interval, unsigned int flags )
|
||||||
{
|
{
|
||||||
interval.inflate( - Session::getExtensionCap() /*+ DbU::lambda(5.0)*/ ); // Ugly.
|
interval.inflate( - Session::getExtensionCap() );
|
||||||
ltrace(200) << "Manipulator::relax() of: " << _segment << " " << interval << endl;
|
ltrace(200) << "Manipulator::relax() of: " << _segment << " " << interval << endl;
|
||||||
|
|
||||||
if (_segment->isFixed()) return false;
|
if (_segment->isFixed()) return false;
|
||||||
|
@ -451,9 +450,8 @@ namespace Kite {
|
||||||
uside = gcells[imaxconflict+1]->getSide( _segment->getDirection() );
|
uside = gcells[imaxconflict+1]->getSide( _segment->getDirection() );
|
||||||
ltrace(200) << "GCell Edge Comparison (max): " << uside
|
ltrace(200) << "GCell Edge Comparison (max): " << uside
|
||||||
<< " vs. " << DbU::getValueString(interval.getVMax()) << endl;
|
<< " vs. " << DbU::getValueString(interval.getVMax()) << endl;
|
||||||
// Ugly: Direct uses of routing pitch.
|
if (interval.getVMax()+getPPitch() >= uside.getVMin()) {
|
||||||
if (interval.getVMax()+DbU::lambda(5.0) >= uside.getVMin()) {
|
interval.inflate( 0, getPPitch() );
|
||||||
interval.inflate( 0, DbU::fromLambda(5.0) );
|
|
||||||
ltrace(200) << "Using next GCell " << interval << endl;
|
ltrace(200) << "Using next GCell " << interval << endl;
|
||||||
imaxconflict++;
|
imaxconflict++;
|
||||||
}
|
}
|
||||||
|
@ -501,8 +499,7 @@ namespace Kite {
|
||||||
doglegAxis = dogLegGCell->getSide( _segment->getDirection() ).getCenter();
|
doglegAxis = dogLegGCell->getSide( _segment->getDirection() ).getCenter();
|
||||||
//ltrace(200) << "MARK 1 doglegAxis: " << DbU::getValueString(doglegAxis) << endl;
|
//ltrace(200) << "MARK 1 doglegAxis: " << DbU::getValueString(doglegAxis) << endl;
|
||||||
} else {
|
} else {
|
||||||
// Ugly: hardcoded pitch.
|
doglegAxis = interval.getVMin() - getPPitch();
|
||||||
doglegAxis = interval.getVMin() - DbU::lambda(5.0);
|
|
||||||
//ltrace(200) << "MARK 2 doglegAxis: " << DbU::getValueString(doglegAxis) << endl;
|
//ltrace(200) << "MARK 2 doglegAxis: " << DbU::getValueString(doglegAxis) << endl;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -510,8 +507,7 @@ namespace Kite {
|
||||||
doglegAxis = dogLegGCell->getSide( _segment->getDirection() ).getVMin();
|
doglegAxis = dogLegGCell->getSide( _segment->getDirection() ).getVMin();
|
||||||
//ltrace(200) << "MARK 3 doglegAxis: " << DbU::getValueString(doglegAxis) << endl;
|
//ltrace(200) << "MARK 3 doglegAxis: " << DbU::getValueString(doglegAxis) << endl;
|
||||||
} else {
|
} else {
|
||||||
// Ugly: hardcoded pitch (5.0 - 1.0).
|
doglegAxis = interval.getVMax() + getPPitch() - DbU::fromLambda(1.0);
|
||||||
doglegAxis = interval.getVMax() + DbU::lambda(4.0);
|
|
||||||
//ltrace(200) << "MARK 4 doglegAxis: " << DbU::getValueString(doglegAxis) << endl;
|
//ltrace(200) << "MARK 4 doglegAxis: " << DbU::getValueString(doglegAxis) << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -558,8 +554,7 @@ namespace Kite {
|
||||||
if (maxExpanded) {
|
if (maxExpanded) {
|
||||||
doglegAxis = dogLegGCell->getSide(segment1->getDirection()/*,false*/).getCenter();
|
doglegAxis = dogLegGCell->getSide(segment1->getDirection()/*,false*/).getCenter();
|
||||||
} else {
|
} else {
|
||||||
// Ugly: hardcoded pitch.
|
doglegAxis = interval.getVMax() + getPPitch();
|
||||||
doglegAxis = interval.getVMax() + DbU::lambda(5.0);
|
|
||||||
}
|
}
|
||||||
if (doglegReuse2) _fsm.addAction( dogleg, SegmentAction::OtherRipup );
|
if (doglegReuse2) _fsm.addAction( dogleg, SegmentAction::OtherRipup );
|
||||||
else dogleg->setAxis( doglegAxis );
|
else dogleg->setAxis( doglegAxis );
|
||||||
|
@ -740,7 +735,7 @@ namespace Kite {
|
||||||
if ( shrinkRight ) {
|
if ( shrinkRight ) {
|
||||||
if ( not (success=Manipulator(*isegment3,_fsm)
|
if ( not (success=Manipulator(*isegment3,_fsm)
|
||||||
.ripup( SegmentAction::OtherRipupPerpandAndPushAside
|
.ripup( SegmentAction::OtherRipupPerpandAndPushAside
|
||||||
, toFree.getVMin() - DbU::lambda(2.5)
|
, toFree.getVMin() - getPPitch()/2
|
||||||
)) )
|
)) )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -755,7 +750,7 @@ namespace Kite {
|
||||||
if ( shrinkLeft ) {
|
if ( shrinkLeft ) {
|
||||||
if ( not (success=Manipulator(*isegment3,_fsm)
|
if ( not (success=Manipulator(*isegment3,_fsm)
|
||||||
.ripup( SegmentAction::OtherRipupPerpandAndPushAside
|
.ripup( SegmentAction::OtherRipupPerpandAndPushAside
|
||||||
, toFree.getVMax() + DbU::lambda(2.5)
|
, toFree.getVMax() + getPPitch()/2
|
||||||
)) )
|
)) )
|
||||||
break;
|
break;
|
||||||
if ( event3->getTracksFree() == 1 ) {
|
if ( event3->getTracksFree() == 1 ) {
|
||||||
|
@ -1033,12 +1028,12 @@ namespace Kite {
|
||||||
|
|
||||||
if (other->getAxis() < _segment->getAxis()) {
|
if (other->getAxis() < _segment->getAxis()) {
|
||||||
// Ugly: routing pitch.
|
// Ugly: routing pitch.
|
||||||
shiftedAxisHint = otherEvent->getAxisHint() - DbU::lambda(5.0);
|
shiftedAxisHint = otherEvent->getAxisHint() - getPitch();
|
||||||
if (shiftedAxisHint < uside.getVMin())
|
if (shiftedAxisHint < uside.getVMin())
|
||||||
shiftedAxisHint = uside.getVMin();
|
shiftedAxisHint = uside.getVMin();
|
||||||
} else {
|
} else {
|
||||||
// Ugly: routing pitch.
|
// Ugly: routing pitch.
|
||||||
shiftedAxisHint = otherEvent->getAxisHint() + DbU::lambda(5.0);
|
shiftedAxisHint = otherEvent->getAxisHint() + getPitch();
|
||||||
if (shiftedAxisHint > uside.getVMax())
|
if (shiftedAxisHint > uside.getVMax())
|
||||||
shiftedAxisHint = uside.getVMax();
|
shiftedAxisHint = uside.getVMax();
|
||||||
}
|
}
|
||||||
|
@ -1094,7 +1089,7 @@ namespace Kite {
|
||||||
if (_segment->isLocal()) {
|
if (_segment->isLocal()) {
|
||||||
if (not _segment->canPivotUp(0.5)) return false;
|
if (not _segment->canPivotUp(0.5)) return false;
|
||||||
} else {
|
} else {
|
||||||
if (_segment->getLength() < DbU::lambda(100.0)) {
|
if (_segment->getLength() < 20*getPitch()) {
|
||||||
if (not (flags & AllowShortPivotUp)) return false;
|
if (not (flags & AllowShortPivotUp)) return false;
|
||||||
if (not _segment->canPivotUp(1.0)) return false;
|
if (not _segment->canPivotUp(1.0)) return false;
|
||||||
}
|
}
|
||||||
|
@ -1113,7 +1108,7 @@ namespace Kite {
|
||||||
|
|
||||||
if ( _segment->isFixed()) return false;
|
if ( _segment->isFixed()) return false;
|
||||||
if (not _segment->isLocal()) return false;
|
if (not _segment->isLocal()) return false;
|
||||||
if (_segment->getLength() < 5*DbU::lambda(5.0)) return false;
|
if (_segment->getLength() < 5*getPitch()) return false;
|
||||||
|
|
||||||
if (_fsm.getCosts().size()) {
|
if (_fsm.getCosts().size()) {
|
||||||
Track* track = _fsm.getTrack(0);
|
Track* track = _fsm.getTrack(0);
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC 2008-2013, All Rights Reserved
|
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
@ -244,19 +243,20 @@ namespace {
|
||||||
TrackElement* segment = track->getSegment(i);
|
TrackElement* segment = track->getSegment(i);
|
||||||
if ( segment and segment->isFixed() and segment->isTerminal() ) {
|
if ( segment and segment->isFixed() and segment->isTerminal() ) {
|
||||||
Interval freeInterval = track->getFreeInterval( segment->getSourceU(), segment->getNet() );
|
Interval freeInterval = track->getFreeInterval( segment->getSourceU(), segment->getNet() );
|
||||||
|
DbU::Unit ppitch = segment->getPPitch();
|
||||||
|
|
||||||
//if (freeInterval.getSize() < DbU::lambda(5.0)*6) {
|
//if (freeInterval.getSize() < ppitch*6) {
|
||||||
if ( (segment->getSourceU() - freeInterval.getVMin() < DbU::lambda(5.0)*3)
|
if ( (segment->getSourceU() - freeInterval.getVMin() < ppitch*3)
|
||||||
or (freeInterval.getVMax() - segment->getTargetU() < DbU::lambda(5.0)*3) ) {
|
or (freeInterval.getVMax() - segment->getTargetU() < ppitch*3) ) {
|
||||||
cinfo << "Caged terminal: " << segment << endl;
|
cinfo << "Caged terminal: " << segment << endl;
|
||||||
if ( (segment->getLayer() != metal2)
|
if ( (segment->getLayer () != metal2)
|
||||||
or (segment->getLength() >= DbU::lambda(5.0))
|
or (segment->getLength() >= ppitch)
|
||||||
or (segment->getNet() == neighborNet) ) {
|
or (segment->getNet () == neighborNet) ) {
|
||||||
neighborNet = segment->getNet();
|
neighborNet = segment->getNet();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (segment->getSourceU() - lastMovedUp < DbU::lambda(5.0)*4) {
|
if (segment->getSourceU() - lastMovedUp < ppitch*4) {
|
||||||
++moveUpCount;
|
++moveUpCount;
|
||||||
if (moveUpCount % 2 == 0) {
|
if (moveUpCount % 2 == 0) {
|
||||||
moveUpCaged( segment );
|
moveUpCaged( segment );
|
||||||
|
@ -274,7 +274,7 @@ namespace {
|
||||||
, rp
|
, rp
|
||||||
, metal3
|
, metal3
|
||||||
, rp->getSourcePosition()
|
, rp->getSourcePosition()
|
||||||
, DbU::lambda(1.0), DbU::lambda(1.0)
|
, DbU::fromLambda(1.0), DbU::fromLambda(1.0)
|
||||||
);
|
);
|
||||||
source->setFlags( Katabatic::CntIgnoreAnchor );
|
source->setFlags( Katabatic::CntIgnoreAnchor );
|
||||||
|
|
||||||
|
@ -283,7 +283,7 @@ namespace {
|
||||||
, rp
|
, rp
|
||||||
, metal3
|
, metal3
|
||||||
, rp->getSourcePosition()
|
, rp->getSourcePosition()
|
||||||
, DbU::lambda(1.0), DbU::lambda(1.0)
|
, DbU::fromLambda(1.0), DbU::fromLambda(1.0)
|
||||||
);
|
);
|
||||||
target->setFlags( Katabatic::CntIgnoreAnchor );
|
target->setFlags( Katabatic::CntIgnoreAnchor );
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC 2008-2013, All Rights Reserved
|
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
@ -98,7 +97,7 @@ namespace {
|
||||||
DbU::Unit wireWidth = plane->getLayerGauge()->getWireWidth();
|
DbU::Unit wireWidth = plane->getLayerGauge()->getWireWidth();
|
||||||
DbU::Unit delta = plane->getLayerGauge()->getHalfPitch()
|
DbU::Unit delta = plane->getLayerGauge()->getHalfPitch()
|
||||||
+ wireWidth/2
|
+ wireWidth/2
|
||||||
- DbU::lambda(0.1);
|
- DbU::fromLambda(0.1);
|
||||||
DbU::Unit extension = segments[i]->getLayer()->getExtentionCap();
|
DbU::Unit extension = segments[i]->getLayer()->getExtentionCap();
|
||||||
Box bb ( segments[i]->getBoundingBox() );
|
Box bb ( segments[i]->getBoundingBox() );
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC 2008-2013, All Rights Reserved
|
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
@ -617,8 +616,7 @@ namespace Kite {
|
||||||
ltrace(200) << "Not expanding on Terminals:" << _constraints << endl;
|
ltrace(200) << "Not expanding on Terminals:" << _constraints << endl;
|
||||||
} else {
|
} else {
|
||||||
ltrace(200) << "Expanding:" << _constraints << endl;
|
ltrace(200) << "Expanding:" << _constraints << endl;
|
||||||
// Ugly: direct uses of Cell Gauge.
|
_constraints.inflate( Session::getSliceHeight() );
|
||||||
_constraints.inflate( DbU::lambda(50.0) );
|
|
||||||
ltrace(200) << "Expanding (after):" << _constraints << endl;
|
ltrace(200) << "Expanding (after):" << _constraints << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -655,8 +653,8 @@ namespace Kite {
|
||||||
}
|
}
|
||||||
|
|
||||||
_priority
|
_priority
|
||||||
= (DbU::getLambda(_segment->getLength()) + 1.0)
|
= (DbU::toLambda(_segment->getLength()) + 1.0)
|
||||||
* (DbU::getLambda(_segment->base()->getSlack()) + 1.0);
|
* (DbU::toLambda(_segment->base()->getSlack()) + 1.0);
|
||||||
|
|
||||||
ltrace(200) << _segment << " has " << _tracksNb << " choices " << perpandicular << endl;
|
ltrace(200) << _segment << " has " << _tracksNb << " choices " << perpandicular << endl;
|
||||||
ltraceout(200);
|
ltraceout(200);
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC 2008-2013, All Rights Reserved
|
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
@ -100,18 +99,27 @@ namespace Kite {
|
||||||
if (not plane->_layerGauge)
|
if (not plane->_layerGauge)
|
||||||
throw Error( badLayerGauge, depth, getString(kite->getRoutingGauge()).c_str() );
|
throw Error( badLayerGauge, depth, getString(kite->getRoutingGauge()).c_str() );
|
||||||
|
|
||||||
|
DbU::Unit hExtension = 0;
|
||||||
|
DbU::Unit vExtension = 0;
|
||||||
|
unsigned int gaugeDepth = 0;
|
||||||
|
if (Session::getLayerGauge(gaugeDepth)->getType() == Constant::PinOnly) ++gaugeDepth;
|
||||||
|
|
||||||
|
bool HV = (Session::getLayerGauge(gaugeDepth)->getDirection() == Constant::Horizontal);
|
||||||
|
hExtension = Session::getLayerGauge( gaugeDepth + (HV?1:0) )->getPitch() / 2;
|
||||||
|
vExtension = Session::getLayerGauge( gaugeDepth + (HV?0:1) )->getPitch() / 2;
|
||||||
|
|
||||||
size_t trackNumber;
|
size_t trackNumber;
|
||||||
Box abutmentBox = kite->getCell()->getAbutmentBox();
|
Box abutmentBox = kite->getCell()->getAbutmentBox();
|
||||||
// HARD CODED.
|
// HARD CODED.
|
||||||
if (plane->getDirection() == KbHorizontal) {
|
if (plane->getDirection() == KbHorizontal) {
|
||||||
plane->_trackMin = abutmentBox.getXMin() - DbU::lambda(2.0);
|
plane->_trackMin = abutmentBox.getXMin() - hExtension;
|
||||||
plane->_trackMax = abutmentBox.getXMax() + DbU::lambda(2.0);
|
plane->_trackMax = abutmentBox.getXMax() + hExtension;
|
||||||
plane->_axisMin = abutmentBox.getYMin();
|
plane->_axisMin = abutmentBox.getYMin();
|
||||||
plane->_axisMax = abutmentBox.getYMax();
|
plane->_axisMax = abutmentBox.getYMax();
|
||||||
trackNumber = plane->computeTracksSize();
|
trackNumber = plane->computeTracksSize();
|
||||||
} else {
|
} else {
|
||||||
plane->_trackMin = abutmentBox.getYMin() - DbU::lambda(2.0);
|
plane->_trackMin = abutmentBox.getYMin() - vExtension;
|
||||||
plane->_trackMax = abutmentBox.getYMax() + DbU::lambda(2.0);
|
plane->_trackMax = abutmentBox.getYMax() + vExtension;
|
||||||
plane->_axisMin = abutmentBox.getXMin();
|
plane->_axisMin = abutmentBox.getXMin();
|
||||||
plane->_axisMax = abutmentBox.getXMax();
|
plane->_axisMax = abutmentBox.getXMax();
|
||||||
trackNumber = plane->computeTracksSize();
|
trackNumber = plane->computeTracksSize();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC 2008-2013, All Rights Reserved
|
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
@ -41,7 +41,7 @@ namespace {
|
||||||
|
|
||||||
class Cs1Candidate {
|
class Cs1Candidate {
|
||||||
public:
|
public:
|
||||||
inline Cs1Candidate ( Track* track=NULL );
|
inline Cs1Candidate ( Track* track=NULL, DbU::Unit ppitch=0 );
|
||||||
inline Track* getTrack () const;
|
inline Track* getTrack () const;
|
||||||
inline size_t getBegin () const;
|
inline size_t getBegin () const;
|
||||||
inline size_t getEnd () const;
|
inline size_t getEnd () const;
|
||||||
|
@ -58,6 +58,7 @@ namespace {
|
||||||
friend inline bool operator< ( const Cs1Candidate&, const Cs1Candidate& );
|
friend inline bool operator< ( const Cs1Candidate&, const Cs1Candidate& );
|
||||||
private:
|
private:
|
||||||
Track* _track;
|
Track* _track;
|
||||||
|
DbU::Unit _ppitch;
|
||||||
size_t _begin;
|
size_t _begin;
|
||||||
size_t _end;
|
size_t _end;
|
||||||
vector<Interval> _conflicts;
|
vector<Interval> _conflicts;
|
||||||
|
@ -67,8 +68,9 @@ namespace {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
inline Cs1Candidate::Cs1Candidate ( Track* track )
|
inline Cs1Candidate::Cs1Candidate ( Track* track, DbU::Unit ppitch )
|
||||||
: _track (track)
|
: _track (track)
|
||||||
|
, _ppitch (ppitch)
|
||||||
, _begin (0)
|
, _begin (0)
|
||||||
, _end (0)
|
, _end (0)
|
||||||
, _conflicts ()
|
, _conflicts ()
|
||||||
|
@ -123,7 +125,7 @@ namespace {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ugly: hard-coded pitch.
|
// Ugly: hard-coded pitch.
|
||||||
_breakPos = _conflicts[i].getVMin() - DbU::lambda(5.0);
|
_breakPos = _conflicts[i].getVMin() - _ppitch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -742,7 +744,7 @@ namespace Kite {
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( ; track and track->getAxis() <= constraints.getVMax() ; track = track->getNextTrack() ) {
|
for ( ; track and track->getAxis() <= constraints.getVMax() ; track = track->getNextTrack() ) {
|
||||||
candidates.push_back( Cs1Candidate(track) );
|
candidates.push_back( Cs1Candidate(track,segment->getPPitch()) );
|
||||||
|
|
||||||
size_t begin;
|
size_t begin;
|
||||||
size_t end;
|
size_t end;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// -*- mode: C++; explicit-buffer-name: "Session.cpp<kite>" -*-
|
// -*- mode: C++; explicit-buffer-name: "Session.cpp<kite>" -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC 2008-2013, All Rights Reserved
|
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
@ -205,6 +205,10 @@ namespace Kite {
|
||||||
for ( set<Track*>::iterator it=packTracks.begin() ; it != packTracks.end() ; ++it )
|
for ( set<Track*>::iterator it=packTracks.begin() ; it != packTracks.end() ; ++it )
|
||||||
(*it)->check( overlaps, "Session::_revalidate() - on packed track." );
|
(*it)->check( overlaps, "Session::_revalidate() - on packed track." );
|
||||||
|
|
||||||
|
for ( size_t i=0 ; i<revalidateds.size() ; ++i ) {
|
||||||
|
revalidateds[i]->_check();
|
||||||
|
}
|
||||||
|
|
||||||
//_getKiteEngine()->_showOverlap ();
|
//_getKiteEngine()->_showOverlap ();
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC 2008-2013, All Rights Reserved
|
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC 2008-2013, All Rights Reserved
|
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
@ -58,17 +57,20 @@ namespace Kite {
|
||||||
, _deltaShared (0)
|
, _deltaShared (0)
|
||||||
, _deltaPerpand (0)
|
, _deltaPerpand (0)
|
||||||
, _axisWeight (0)
|
, _axisWeight (0)
|
||||||
, _distanceToFixed(DbU::lambda(100.0))
|
, _distanceToFixed(2*Session::getSliceHeight())
|
||||||
, _longuestOverlap(0)
|
, _longuestOverlap(0)
|
||||||
, _dataState (0)
|
, _dataState (0)
|
||||||
, _ripupCount (0)
|
, _ripupCount (0)
|
||||||
{
|
{
|
||||||
|
// This is the GCell side (it is *one* cell height from the gauge).
|
||||||
|
DbU::Unit cellHeight = Session::getSliceHeight();
|
||||||
|
|
||||||
TrackElement* neighbor;
|
TrackElement* neighbor;
|
||||||
if ( _begin != Track::npos ) {
|
if ( _begin != Track::npos ) {
|
||||||
neighbor = _track->getSegment(_begin);
|
neighbor = _track->getSegment(_begin);
|
||||||
if ( neighbor and (neighbor->getNet() != net) ) {
|
if ( neighbor and (neighbor->getNet() != net) ) {
|
||||||
DbU::Unit distance = interval.getVMin() - neighbor->getTargetU();
|
DbU::Unit distance = interval.getVMin() - neighbor->getTargetU();
|
||||||
if ( distance < DbU::lambda(50.0) )
|
if ( distance < cellHeight )
|
||||||
_distanceToFixed = distance;
|
_distanceToFixed = distance;
|
||||||
}
|
}
|
||||||
// if ( neighbor and neighbor->isFixed() ) {
|
// if ( neighbor and neighbor->isFixed() ) {
|
||||||
|
@ -80,8 +82,8 @@ namespace Kite {
|
||||||
neighbor = _track->getSegment(_end);
|
neighbor = _track->getSegment(_end);
|
||||||
if ( neighbor and (neighbor->getNet() != net) ) {
|
if ( neighbor and (neighbor->getNet() != net) ) {
|
||||||
DbU::Unit distance = neighbor->getSourceU() - interval.getVMax();
|
DbU::Unit distance = neighbor->getSourceU() - interval.getVMax();
|
||||||
if ( _distanceToFixed == DbU::lambda(100.0) ) _distanceToFixed = 0;
|
if ( _distanceToFixed == 2*cellHeight ) _distanceToFixed = 0;
|
||||||
if ( distance < DbU::lambda(50.0) )
|
if ( distance < cellHeight )
|
||||||
_distanceToFixed += distance;
|
_distanceToFixed += distance;
|
||||||
}
|
}
|
||||||
// if ( neighbor and neighbor->isFixed() ) {
|
// if ( neighbor and neighbor->isFixed() ) {
|
||||||
|
|
|
@ -102,20 +102,23 @@ namespace Kite {
|
||||||
void SegmentObserver::notify ( unsigned int flags )
|
void SegmentObserver::notify ( unsigned int flags )
|
||||||
{
|
{
|
||||||
TrackElement* segment = getOwner();
|
TrackElement* segment = getOwner();
|
||||||
switch ( flags ) {
|
if (flags & AutoSegment::Invalidate) {
|
||||||
case AutoSegment::Invalidate:
|
|
||||||
if (not segment->isInvalidated()) {
|
if (not segment->isInvalidated()) {
|
||||||
ltrace(200) << "::notify() <Invalidate> on " << segment << endl;
|
ltrace(200) << "::notify() <Invalidate> on " << segment << endl;
|
||||||
segment->invalidate();
|
segment->invalidate();
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case AutoSegment::Revalidate:
|
|
||||||
|
if (flags & AutoSegment::Revalidate) {
|
||||||
// Revalidation must be delayed until *all* the AutoSegments have been revalidated.
|
// Revalidation must be delayed until *all* the AutoSegments have been revalidated.
|
||||||
// if (segment->isInvalidated()) {
|
// if (segment->isInvalidated()) {
|
||||||
// ltrace(200) << "::notify() <Revalidate> on " << segment << endl;
|
// ltrace(200) << "::notify() <Revalidate> on " << segment << endl;
|
||||||
// segment->revalidate( true );
|
// segment->revalidate( true );
|
||||||
// }
|
// }
|
||||||
break;
|
}
|
||||||
|
|
||||||
|
if (flags & AutoSegment::RevalidatePPitch) {
|
||||||
|
segment->updatePPitch();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,6 +149,7 @@ namespace Kite {
|
||||||
bool TrackElement::isStrap () const { return false; }
|
bool TrackElement::isStrap () const { return false; }
|
||||||
bool TrackElement::isSlackened () const { return false; }
|
bool TrackElement::isSlackened () const { return false; }
|
||||||
bool TrackElement::isDogleg () const { return false; }
|
bool TrackElement::isDogleg () const { return false; }
|
||||||
|
bool TrackElement::isSameLayerDogleg () const { return false; }
|
||||||
// Predicates.
|
// Predicates.
|
||||||
bool TrackElement::canSlacken () const { return false; }
|
bool TrackElement::canSlacken () const { return false; }
|
||||||
bool TrackElement::canPivotUp ( float ) const { return false; };
|
bool TrackElement::canPivotUp ( float ) const { return false; };
|
||||||
|
@ -157,6 +161,8 @@ namespace Kite {
|
||||||
// Accessors.
|
// Accessors.
|
||||||
unsigned long TrackElement::getId () const { return 0; }
|
unsigned long TrackElement::getId () const { return 0; }
|
||||||
unsigned long TrackElement::getFreedomDegree () const { return 0; }
|
unsigned long TrackElement::getFreedomDegree () const { return 0; }
|
||||||
|
DbU::Unit TrackElement::getPitch () const { return 0; }
|
||||||
|
DbU::Unit TrackElement::getPPitch () const { return 0; }
|
||||||
float TrackElement::getMaxUnderDensity ( unsigned int ) const { return 0.0; };
|
float TrackElement::getMaxUnderDensity ( unsigned int ) const { return 0.0; };
|
||||||
unsigned int TrackElement::getDoglegLevel () const { return 0; }
|
unsigned int TrackElement::getDoglegLevel () const { return 0; }
|
||||||
TrackElement* TrackElement::getParent () const { return NULL; }
|
TrackElement* TrackElement::getParent () const { return NULL; }
|
||||||
|
@ -176,6 +182,7 @@ namespace Kite {
|
||||||
void TrackElement::reschedule ( unsigned int ) { }
|
void TrackElement::reschedule ( unsigned int ) { }
|
||||||
void TrackElement::detach () { }
|
void TrackElement::detach () { }
|
||||||
void TrackElement::revalidate () { }
|
void TrackElement::revalidate () { }
|
||||||
|
void TrackElement::updatePPitch () { }
|
||||||
void TrackElement::setAxis ( DbU::Unit, unsigned int flags ) { }
|
void TrackElement::setAxis ( DbU::Unit, unsigned int flags ) { }
|
||||||
TrackElement* TrackElement::makeDogleg () { return NULL; }
|
TrackElement* TrackElement::makeDogleg () { return NULL; }
|
||||||
TrackElement* TrackElement::makeDogleg ( Interval, unsigned int& ) { return NULL; }
|
TrackElement* TrackElement::makeDogleg ( Interval, unsigned int& ) { return NULL; }
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC 2008-2013, All Rights Reserved
|
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
@ -65,8 +64,9 @@ namespace Kite {
|
||||||
{
|
{
|
||||||
Point sourcePoint = pad->getSourcePosition();
|
Point sourcePoint = pad->getSourcePosition();
|
||||||
Point targetPoint = pad->getTargetPosition();
|
Point targetPoint = pad->getTargetPosition();
|
||||||
RoutingGauge* rg = Session::getKiteEngine()->getRoutingGauge();
|
RoutingGauge* rg = Session::getRoutingGauge();
|
||||||
RoutingPlane* rp = Session::getKiteEngine()->getRoutingPlaneByIndex(depth);
|
RoutingPlane* rp = Session::getKiteEngine()->getRoutingPlaneByIndex(depth);
|
||||||
|
DbU::Unit pitch = DbU::toLambda(Session::getPitch(depth));
|
||||||
unsigned int rpDirection = rg->getLayerDirection(depth);
|
unsigned int rpDirection = rg->getLayerDirection(depth);
|
||||||
Interval trackSpan;
|
Interval trackSpan;
|
||||||
|
|
||||||
|
@ -81,9 +81,9 @@ namespace Kite {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( rpDirection xor rg->getLayerDirection(rg->getLayerDepth(pad->getLayer())) ) {
|
if ( rpDirection xor rg->getLayerDirection(rg->getLayerDepth(pad->getLayer())) ) {
|
||||||
_weight = (unsigned int)(( 5.0 / (5.0+DbU::getLambda(trackSpan.getSize())) ) * 100.0) ;
|
_weight = (unsigned int)(( pitch / (pitch+DbU::toLambda(trackSpan.getSize())) ) * 100.0) ;
|
||||||
} else {
|
} else {
|
||||||
_weight = (unsigned int)( (5.0 + DbU::getLambda(trackSpan.getSize())) * 20.0 );
|
_weight = (unsigned int)( (pitch + DbU::toLambda(trackSpan.getSize())) * 20.0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
Track* track = rp->getTrackByPosition ( trackSpan.getVMin() );
|
Track* track = rp->getTrackByPosition ( trackSpan.getVMin() );
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC 2008-2013, All Rights Reserved
|
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
@ -53,11 +52,18 @@ namespace Kite {
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
// Class : "TrackSegment".
|
// Class : "TrackSegment".
|
||||||
|
|
||||||
|
size_t TrackSegment::_allocateds = 0;
|
||||||
|
|
||||||
|
|
||||||
|
size_t TrackSegment::getAllocateds ()
|
||||||
|
{ return _allocateds; }
|
||||||
|
|
||||||
|
|
||||||
TrackSegment::TrackSegment ( AutoSegment* segment, Track* track )
|
TrackSegment::TrackSegment ( AutoSegment* segment, Track* track )
|
||||||
: TrackElement (track)
|
: TrackElement (track)
|
||||||
, _base (segment)
|
, _base (segment)
|
||||||
, _freedomDegree(0)
|
, _freedomDegree(0)
|
||||||
|
, _ppitch (0)
|
||||||
, _data (NULL)
|
, _data (NULL)
|
||||||
, _dogLegLevel (0)
|
, _dogLegLevel (0)
|
||||||
{
|
{
|
||||||
|
@ -69,7 +75,10 @@ namespace Kite {
|
||||||
_data = new DataNegociate( this );
|
_data = new DataNegociate( this );
|
||||||
_base->getCanonical( _sourceU, _targetU );
|
_base->getCanonical( _sourceU, _targetU );
|
||||||
updateFreedomDegree();
|
updateFreedomDegree();
|
||||||
|
updatePPitch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
++_allocateds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -83,6 +92,7 @@ namespace Kite {
|
||||||
TrackSegment::~TrackSegment ()
|
TrackSegment::~TrackSegment ()
|
||||||
{
|
{
|
||||||
if (_data) delete _data;
|
if (_data) delete _data;
|
||||||
|
--_allocateds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -131,12 +141,15 @@ namespace Kite {
|
||||||
bool TrackSegment::isStrap () const { return _base->isStrap(); }
|
bool TrackSegment::isStrap () const { return _base->isStrap(); }
|
||||||
bool TrackSegment::isSlackened () const { return _base->isSlackened(); }
|
bool TrackSegment::isSlackened () const { return _base->isSlackened(); }
|
||||||
bool TrackSegment::isDogleg () const { return _base->isDogleg(); }
|
bool TrackSegment::isDogleg () const { return _base->isDogleg(); }
|
||||||
|
bool TrackSegment::isSameLayerDogleg () const { return _base->isSameLayerDogleg(); }
|
||||||
// Predicates.
|
// Predicates.
|
||||||
// Accessors.
|
// Accessors.
|
||||||
unsigned long TrackSegment::getId () const { return _base->getId(); }
|
unsigned long TrackSegment::getId () const { return _base->getId(); }
|
||||||
unsigned int TrackSegment::getDirection () const { return _base->getDirection(); }
|
unsigned int TrackSegment::getDirection () const { return _base->getDirection(); }
|
||||||
Net* TrackSegment::getNet () const { return _base->getNet(); }
|
Net* TrackSegment::getNet () const { return _base->getNet(); }
|
||||||
const Layer* TrackSegment::getLayer () const { return _base->getLayer(); }
|
const Layer* TrackSegment::getLayer () const { return _base->getLayer(); }
|
||||||
|
DbU::Unit TrackSegment::getPitch () const { return _base->getPitch(); }
|
||||||
|
DbU::Unit TrackSegment::getPPitch () const { return _ppitch; }
|
||||||
DbU::Unit TrackSegment::getAxis () const { return _base->getAxis(); }
|
DbU::Unit TrackSegment::getAxis () const { return _base->getAxis(); }
|
||||||
unsigned long TrackSegment::getFreedomDegree () const { return _freedomDegree; }
|
unsigned long TrackSegment::getFreedomDegree () const { return _freedomDegree; }
|
||||||
unsigned int TrackSegment::getDoglegLevel () const { return _dogLegLevel; }
|
unsigned int TrackSegment::getDoglegLevel () const { return _dogLegLevel; }
|
||||||
|
@ -277,6 +290,13 @@ namespace Kite {
|
||||||
{ _freedomDegree = _base->getSlack(); }
|
{ _freedomDegree = _base->getSlack(); }
|
||||||
|
|
||||||
|
|
||||||
|
void TrackSegment::updatePPitch ()
|
||||||
|
{
|
||||||
|
_ppitch = _base->getPPitch();
|
||||||
|
//cerr << "Update P/Pitch (" << DbU::toLambda(getPPitch()) << ") on " << this << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void TrackSegment::setTrack ( Track* track )
|
void TrackSegment::setTrack ( Track* track )
|
||||||
{ TrackElement::setTrack( track ); }
|
{ TrackElement::setTrack( track ); }
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2013, All Rights Reserved
|
// Copyright (c) UPMC/LIP6 2008-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
|
|
@ -28,6 +28,7 @@ namespace Kite {
|
||||||
using Hurricane::Layer;
|
using Hurricane::Layer;
|
||||||
using Hurricane::DbU;
|
using Hurricane::DbU;
|
||||||
using Hurricane::Cell;
|
using Hurricane::Cell;
|
||||||
|
using CRL::CellGauge;
|
||||||
using CRL::RoutingGauge;
|
using CRL::RoutingGauge;
|
||||||
using CRL::RoutingLayerGauge;
|
using CRL::RoutingLayerGauge;
|
||||||
|
|
||||||
|
@ -59,7 +60,10 @@ namespace Kite {
|
||||||
virtual bool isGContact ( const Layer* ) const;
|
virtual bool isGContact ( const Layer* ) const;
|
||||||
virtual size_t getDepth () const;
|
virtual size_t getDepth () const;
|
||||||
virtual size_t getAllowedDepth () const;
|
virtual size_t getAllowedDepth () const;
|
||||||
|
virtual DbU::Unit getSliceHeight () const;
|
||||||
|
virtual DbU::Unit getSliceStep () const;
|
||||||
virtual size_t getLayerDepth ( const Layer* ) const;
|
virtual size_t getLayerDepth ( const Layer* ) const;
|
||||||
|
virtual CellGauge* getCellGauge () const;
|
||||||
virtual RoutingGauge* getRoutingGauge () const;
|
virtual RoutingGauge* getRoutingGauge () const;
|
||||||
virtual RoutingLayerGauge* getLayerGauge ( size_t depth ) const;
|
virtual RoutingLayerGauge* getLayerGauge ( size_t depth ) const;
|
||||||
virtual const Layer* getRoutingLayer ( size_t depth ) const;
|
virtual const Layer* getRoutingLayer ( size_t depth ) const;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// -*- mode: C++; explicit-buffer-name: "Constants.h<kite>" -*-
|
// -*- mode: C++; explicit-buffer-name: "Constants.h<kite>" -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC 2008-2013, All Rights Reserved
|
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
@ -28,8 +28,8 @@ namespace Kite {
|
||||||
using Katabatic::KbHorizontal;
|
using Katabatic::KbHorizontal;
|
||||||
using Katabatic::KbVertical;
|
using Katabatic::KbVertical;
|
||||||
using Katabatic::KbWithPerpands;
|
using Katabatic::KbWithPerpands;
|
||||||
using Katabatic::KbBySource;
|
using Katabatic::KbSource;
|
||||||
using Katabatic::KbByTarget;
|
using Katabatic::KbTarget;
|
||||||
using Katabatic::KbWarnOnError;
|
using Katabatic::KbWarnOnError;
|
||||||
using Katabatic::perpandicularTo;
|
using Katabatic::perpandicularTo;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC 2008-2013, All Rights Reserved
|
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
@ -56,6 +56,8 @@ namespace Kite {
|
||||||
inline TrackElement* getSegment () const;
|
inline TrackElement* getSegment () const;
|
||||||
inline DataNegociate* getData () const;
|
inline DataNegociate* getData () const;
|
||||||
inline RoutingEvent* getEvent () const;
|
inline RoutingEvent* getEvent () const;
|
||||||
|
inline DbU::Unit getPitch () const;
|
||||||
|
inline DbU::Unit getPPitch () const;
|
||||||
bool canRipup ( unsigned int flags=0 ) const;
|
bool canRipup ( unsigned int flags=0 ) const;
|
||||||
bool isCaged ( DbU::Unit ) const;
|
bool isCaged ( DbU::Unit ) const;
|
||||||
bool ripup ( unsigned int type, DbU::Unit axisHint=0 );
|
bool ripup ( unsigned int type, DbU::Unit axisHint=0 );
|
||||||
|
@ -91,6 +93,8 @@ namespace Kite {
|
||||||
inline TrackElement* Manipulator::getSegment () const { return _segment; }
|
inline TrackElement* Manipulator::getSegment () const { return _segment; }
|
||||||
inline DataNegociate* Manipulator::getData () const { return _data; }
|
inline DataNegociate* Manipulator::getData () const { return _data; }
|
||||||
inline RoutingEvent* Manipulator::getEvent () const { return _event; }
|
inline RoutingEvent* Manipulator::getEvent () const { return _event; }
|
||||||
|
inline DbU::Unit Manipulator::getPitch () const { return _segment->getPitch(); }
|
||||||
|
inline DbU::Unit Manipulator::getPPitch () const { return _segment->getPPitch(); }
|
||||||
|
|
||||||
|
|
||||||
} // Kite namespace.
|
} // Kite namespace.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// -*- mode: C++; explicit-buffer-name: "Session.h<kite>" -*-
|
// -*- mode: C++; explicit-buffer-name: "Session.h<kite>" -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC 2008-2013, All Rights Reserved
|
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
|
|
@ -116,6 +116,7 @@ namespace Kite {
|
||||||
virtual bool isStrap () const;
|
virtual bool isStrap () const;
|
||||||
virtual bool isSlackened () const;
|
virtual bool isSlackened () const;
|
||||||
virtual bool isDogleg () const;
|
virtual bool isDogleg () const;
|
||||||
|
virtual bool isSameLayerDogleg () const;
|
||||||
// Predicates.
|
// Predicates.
|
||||||
inline bool isCreated () const;
|
inline bool isCreated () const;
|
||||||
inline bool isInvalidated () const;
|
inline bool isInvalidated () const;
|
||||||
|
@ -138,6 +139,8 @@ namespace Kite {
|
||||||
virtual unsigned int getDirection () const = 0;
|
virtual unsigned int getDirection () const = 0;
|
||||||
virtual Net* getNet () const = 0;
|
virtual Net* getNet () const = 0;
|
||||||
virtual const Layer* getLayer () const = 0;
|
virtual const Layer* getLayer () const = 0;
|
||||||
|
virtual DbU::Unit getPitch () const;
|
||||||
|
virtual DbU::Unit getPPitch () const;
|
||||||
inline Track* getTrack () const;
|
inline Track* getTrack () const;
|
||||||
inline size_t getIndex () const;
|
inline size_t getIndex () const;
|
||||||
virtual unsigned long getFreedomDegree () const;
|
virtual unsigned long getFreedomDegree () const;
|
||||||
|
@ -171,8 +174,9 @@ namespace Kite {
|
||||||
virtual void swapTrack ( TrackElement* );
|
virtual void swapTrack ( TrackElement* );
|
||||||
virtual void reschedule ( unsigned int level );
|
virtual void reschedule ( unsigned int level );
|
||||||
virtual void detach ();
|
virtual void detach ();
|
||||||
virtual void revalidate ();
|
|
||||||
virtual void invalidate ();
|
virtual void invalidate ();
|
||||||
|
virtual void revalidate ();
|
||||||
|
virtual void updatePPitch ();
|
||||||
virtual void incOverlapCost ( Net*, TrackCost& ) const;
|
virtual void incOverlapCost ( Net*, TrackCost& ) const;
|
||||||
virtual void setAxis ( DbU::Unit, unsigned int flags=Katabatic::SegAxisSet );
|
virtual void setAxis ( DbU::Unit, unsigned int flags=Katabatic::SegAxisSet );
|
||||||
virtual TrackElement* makeDogleg ();
|
virtual TrackElement* makeDogleg ();
|
||||||
|
|
|
@ -52,6 +52,7 @@ namespace Kite {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TrackElement* create ( AutoSegment*, Track*, bool& created );
|
static TrackElement* create ( AutoSegment*, Track*, bool& created );
|
||||||
|
static size_t getAllocateds ();
|
||||||
public:
|
public:
|
||||||
// Wrapped AutoSegment Functions (when applicable).
|
// Wrapped AutoSegment Functions (when applicable).
|
||||||
virtual AutoSegment* base () const;
|
virtual AutoSegment* base () const;
|
||||||
|
@ -66,6 +67,7 @@ namespace Kite {
|
||||||
virtual bool isStrap () const;
|
virtual bool isStrap () const;
|
||||||
virtual bool isSlackened () const;
|
virtual bool isSlackened () const;
|
||||||
virtual bool isDogleg () const;
|
virtual bool isDogleg () const;
|
||||||
|
virtual bool isSameLayerDogleg () const;
|
||||||
// Predicates.
|
// Predicates.
|
||||||
virtual bool canDogleg ();
|
virtual bool canDogleg ();
|
||||||
virtual bool canDogleg ( Interval );
|
virtual bool canDogleg ( Interval );
|
||||||
|
@ -79,6 +81,8 @@ namespace Kite {
|
||||||
virtual unsigned int getDirection () const;
|
virtual unsigned int getDirection () const;
|
||||||
virtual Net* getNet () const;
|
virtual Net* getNet () const;
|
||||||
virtual const Layer* getLayer () const;
|
virtual const Layer* getLayer () const;
|
||||||
|
virtual DbU::Unit getPitch () const;
|
||||||
|
virtual DbU::Unit getPPitch () const;
|
||||||
virtual unsigned long getFreedomDegree () const;
|
virtual unsigned long getFreedomDegree () const;
|
||||||
virtual unsigned int getDoglegLevel () const;
|
virtual unsigned int getDoglegLevel () const;
|
||||||
virtual TrackElement* getNext () const;
|
virtual TrackElement* getNext () const;
|
||||||
|
@ -102,8 +106,9 @@ namespace Kite {
|
||||||
virtual void swapTrack ( TrackElement* );
|
virtual void swapTrack ( TrackElement* );
|
||||||
virtual void reschedule ( unsigned int level );
|
virtual void reschedule ( unsigned int level );
|
||||||
virtual void detach ();
|
virtual void detach ();
|
||||||
virtual void revalidate ();
|
|
||||||
virtual void invalidate ();
|
virtual void invalidate ();
|
||||||
|
virtual void revalidate ();
|
||||||
|
virtual void updatePPitch ();
|
||||||
virtual void setAxis ( DbU::Unit, unsigned int flags );
|
virtual void setAxis ( DbU::Unit, unsigned int flags );
|
||||||
virtual TrackElement* makeDogleg ();
|
virtual TrackElement* makeDogleg ();
|
||||||
virtual TrackElement* makeDogleg ( Katabatic::GCell*, TrackElement*& perpandicular, TrackElement*& parallel );
|
virtual TrackElement* makeDogleg ( Katabatic::GCell*, TrackElement*& perpandicular, TrackElement*& parallel );
|
||||||
|
@ -123,8 +128,10 @@ namespace Kite {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Attributes.
|
// Attributes.
|
||||||
|
static size_t _allocateds;
|
||||||
AutoSegment* _base;
|
AutoSegment* _base;
|
||||||
unsigned long _freedomDegree;
|
unsigned long _freedomDegree;
|
||||||
|
DbU::Unit _ppitch;
|
||||||
DataNegociate* _data;
|
DataNegociate* _data;
|
||||||
unsigned int _dogLegLevel:4;
|
unsigned int _dogLegLevel:4;
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
#include "vlsisapd/configuration/Configuration.h"
|
#include "vlsisapd/configuration/Configuration.h"
|
||||||
#include "hurricane/Cell.h"
|
#include "hurricane/Cell.h"
|
||||||
#include "crlcore/Utilities.h"
|
#include "crlcore/Utilities.h"
|
||||||
|
|
Loading…
Reference in New Issue