Anabatic transient commit 18. Port of Kite (Katana), Yeah, Baby! Yeah!
* Bug: In Hurricane, in StaticObservable::getObserver(), if the slot pointer is NULL, do not try to access the owner. Returns NULL, so the caller can be aware of the situation... * Change: In Hurricane, in BreakpointWidget & ExceptionWidget some cosmetic changes (fonts and window sizes). * Bug: In Anabatic, In AutoHorizontal::getConstraints(), take into account the constraints from the source AutoContact, as it holds the constraints transmitted by the RoutingPads and sets up by propageConstraintsFromRp(). It is likely to be a bug affecting the original Katabatic as well. * Change: In Anabatic, in RawGCellsUnder(), check that the segment is not completly oustside the cell abutment box and truncate the coordinates to the part that is inside. Use the "shrink" if we reach the east/north border. * Change: In Anabatic, in Configuration, no more decorator because we will use a true derived relationship. Katana *derives* from *Anabatic* and do not *decorate* it, so the Configuration can do the same. It also implies that we directly create a Katana engine, not an Anabatic one. * Change: In Anabatic, in Session, do not allow the opening of the Session in a standalone fashion (with a static method). Instead it must be opened using the relevant method of the Anabatic/Katana engine. This ensure we are opening the right Session type. * Change: In Anabatic, in AutoSegment_Aligneds() collection the seed segment is not part of the collection by default, but will be included if the Flags::WithSelf is set. * Change: In Configuration, all the flags value are now defined in two steps. Declared in the header and initialized in the module. This is to prevent the fact that on some cases, in relation with the Python "extern C" part modules, we need a true allocated variable. It was causing weird linking problems. A side effect is that they can no longer be used as entry is switches, have to replace them by if/else. * New: In Anabatic, new GCell::getNeighborAt() utility function. * Bug: In Anabatic, in GCell::doGrid(), tag all the GCells of the grid with the grid type... Back annote all the edges capacity (north & east) with the reserved local capacity. * New: Complete portage of Kite over Anabatic. The new engine is christened "Katana" for Kite-Analogic. When it's capabilities and performances will be on a part with Kite, it is to completly replace it (and take back the "Kite" name). Preliminary tests seems to show that, contrary to intuition (because built on a more complex/slower grid), it is even slightly faster than Kite 8-).
This commit is contained in:
parent
248704c61c
commit
48f3a2bc3c
|
@ -75,21 +75,45 @@ namespace Anabatic {
|
||||||
{
|
{
|
||||||
cdebug_log(112,1) << "RawGCellsUnder::RawGCellsUnder(): " << segment << endl;
|
cdebug_log(112,1) << "RawGCellsUnder::RawGCellsUnder(): " << segment << endl;
|
||||||
|
|
||||||
GCell* gsource = engine->getGCellUnder( segment->getSourcePosition() );
|
Box gcellsArea = engine->getCell()->getAbutmentBox();
|
||||||
GCell* gtarget = engine->getGCellUnder( segment->getTargetPosition() );
|
Point sourcePosition = segment->getSourcePosition();
|
||||||
|
Point targetPosition = segment->getTargetPosition();
|
||||||
|
|
||||||
if (not gsource) {
|
if ( (sourcePosition.getX() >= gcellsArea.getXMax())
|
||||||
cerr << Error( "RawGCellsUnder::RawGCellsUnder(): %s source not over a GCell (ignored)."
|
or (sourcePosition.getY() >= gcellsArea.getYMax())
|
||||||
|
or (targetPosition.getX() <= gcellsArea.getXMin())
|
||||||
|
or (targetPosition.getY() <= gcellsArea.getYMin()) ) {
|
||||||
|
cerr << Error( "RawGCellsUnder::RawGCellsUnder(): %s is completly outside the GCells area (ignored)."
|
||||||
, getString(segment).c_str()
|
, getString(segment).c_str()
|
||||||
) << endl;
|
) << endl;
|
||||||
cdebug_tabw(112,-1);
|
cdebug_tabw(112,-1);
|
||||||
DebugSession::close();
|
DebugSession::close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DbU::Unit xsource = std::max( sourcePosition.getX(), gcellsArea.getXMin() );
|
||||||
|
DbU::Unit ysource = std::max( sourcePosition.getY(), gcellsArea.getYMin() );
|
||||||
|
DbU::Unit xtarget = std::min( targetPosition.getX(), gcellsArea.getXMax() );
|
||||||
|
DbU::Unit ytarget = std::min( targetPosition.getY(), gcellsArea.getYMax() );
|
||||||
|
|
||||||
|
if (xtarget == gcellsArea.getXMax()) --xtarget;
|
||||||
|
if (ytarget == gcellsArea.getYMax()) --ytarget;
|
||||||
|
|
||||||
|
GCell* gsource = engine->getGCellUnder( xsource, ysource );
|
||||||
|
GCell* gtarget = engine->getGCellUnder( xtarget, ytarget );
|
||||||
|
|
||||||
|
if (not gsource) {
|
||||||
|
cerr << Bug( "RawGCellsUnder::RawGCellsUnder(): %s source not under a GCell (ignored)."
|
||||||
|
, getString(segment).c_str()
|
||||||
|
) << endl;
|
||||||
|
cdebug_tabw(112,-1);
|
||||||
|
DebugSession::close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (not gtarget) {
|
if (not gtarget) {
|
||||||
cerr << Error( "RawGCellsUnder::RawGCellsUnder(): %s target not over a GCell (ignored)."
|
cerr << Bug( "RawGCellsUnder::RawGCellsUnder(): %s target not under a GCell (ignored)."
|
||||||
, getString(segment).c_str()
|
, getString(segment).c_str()
|
||||||
) << endl;
|
) << endl;
|
||||||
cdebug_tabw(112,-1);
|
cdebug_tabw(112,-1);
|
||||||
DebugSession::close();
|
DebugSession::close();
|
||||||
return;
|
return;
|
||||||
|
@ -175,7 +199,7 @@ namespace Anabatic {
|
||||||
AnabaticEngine::AnabaticEngine ( Cell* cell )
|
AnabaticEngine::AnabaticEngine ( Cell* cell )
|
||||||
: Super(cell)
|
: Super(cell)
|
||||||
, _timer ()
|
, _timer ()
|
||||||
, _configuration (new ConfigurationConcrete())
|
, _configuration (new Configuration())
|
||||||
, _chipTools (cell)
|
, _chipTools (cell)
|
||||||
, _state (EngineCreation)
|
, _state (EngineCreation)
|
||||||
, _matrix ()
|
, _matrix ()
|
||||||
|
@ -251,7 +275,7 @@ namespace Anabatic {
|
||||||
|
|
||||||
void AnabaticEngine::_gutAnabatic ()
|
void AnabaticEngine::_gutAnabatic ()
|
||||||
{
|
{
|
||||||
Session::open( this );
|
openSession();
|
||||||
|
|
||||||
_flags.reset( Flags::DestroyBaseContact|Flags::DestroyBaseSegment );
|
_flags.reset( Flags::DestroyBaseContact|Flags::DestroyBaseSegment );
|
||||||
|
|
||||||
|
@ -301,6 +325,21 @@ namespace Anabatic {
|
||||||
{ return _configuration; }
|
{ return _configuration; }
|
||||||
|
|
||||||
|
|
||||||
|
Interval AnabaticEngine::getUSide ( Flags direction ) const
|
||||||
|
{
|
||||||
|
Interval side;
|
||||||
|
Box bBox ( getCell()->getBoundingBox() );
|
||||||
|
|
||||||
|
if (direction & Flags::Horizontal) side = Interval( bBox.getXMin(), bBox.getXMax() );
|
||||||
|
else if (direction & Flags::Vertical ) side = Interval( bBox.getYMin(), bBox.getYMax() );
|
||||||
|
else {
|
||||||
|
cerr << Error( "AnabaticEngine::getUSide(): Unknown direction flag \"%i\""
|
||||||
|
, getString(direction).c_str() ) << endl;
|
||||||
|
}
|
||||||
|
return side;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int AnabaticEngine::getCapacity ( Interval span, Flags flags ) const
|
int AnabaticEngine::getCapacity ( Interval span, Flags flags ) const
|
||||||
{
|
{
|
||||||
int capacity = 0;
|
int capacity = 0;
|
||||||
|
@ -333,6 +372,10 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AnabaticEngine::openSession ()
|
||||||
|
{ Session::_open(this); }
|
||||||
|
|
||||||
|
|
||||||
void AnabaticEngine::reset ()
|
void AnabaticEngine::reset ()
|
||||||
{
|
{
|
||||||
_gutAnabatic();
|
_gutAnabatic();
|
||||||
|
@ -1013,6 +1056,46 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AnabaticEngine::_check ( Net* net ) const
|
||||||
|
{
|
||||||
|
cdebug_log(149,1) << "Checking " << net << endl;
|
||||||
|
for ( Segment* segment : net->getComponents().getSubSet<Segment*>() ) {
|
||||||
|
AutoSegment* autoSegment = _lookup( segment );
|
||||||
|
cdebug_log(149,0) << autoSegment << endl;
|
||||||
|
if (autoSegment) {
|
||||||
|
AutoContact* autoContact = autoSegment->getAutoSource();
|
||||||
|
cdebug_log(149,0) << autoContact << endl;
|
||||||
|
if (autoContact) autoContact->checkTopology();
|
||||||
|
|
||||||
|
autoContact = autoSegment->getAutoTarget();
|
||||||
|
cdebug_log(149,0) << autoContact << endl;
|
||||||
|
if (autoContact) autoContact->checkTopology();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cdebug_tabw(149,-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool AnabaticEngine::_check ( const char* message ) const
|
||||||
|
{
|
||||||
|
bool coherency = true;
|
||||||
|
if (message)
|
||||||
|
cerr << " o checking Anabatic DB (" << message << ")." << endl;
|
||||||
|
|
||||||
|
for ( auto element : _autoSegmentLut )
|
||||||
|
coherency = element.second->_check() and coherency;
|
||||||
|
|
||||||
|
for ( GCell* gcell : _gcells ) {
|
||||||
|
for ( AutoContact* contact : gcell->getContacts() )
|
||||||
|
contact->checkTopology();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (message) cerr << " - completed." << endl;
|
||||||
|
|
||||||
|
return coherency;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
string AnabaticEngine::_getTypeName () const
|
string AnabaticEngine::_getTypeName () const
|
||||||
{ return getString(_toolName); }
|
{ return getString(_toolName); }
|
||||||
|
|
||||||
|
|
|
@ -335,6 +335,10 @@ namespace Anabatic {
|
||||||
message << "Terminal horizontal segment Y " << DbU::getValueString(_segment->getY())
|
message << "Terminal horizontal segment Y " << DbU::getValueString(_segment->getY())
|
||||||
<< " axis is outside RoutingPad " << getUConstraints(Flags::Vertical) << ".";
|
<< " axis is outside RoutingPad " << getUConstraints(Flags::Vertical) << ".";
|
||||||
|
|
||||||
|
Interval intv;
|
||||||
|
_segment->getConstraints( intv );
|
||||||
|
message << "\n Segment constraints: " << intv << endl;
|
||||||
|
|
||||||
unsigned int flags = 0;
|
unsigned int flags = 0;
|
||||||
if (_segment->isCreated()) flags |= Flags::CParanoid;
|
if (_segment->isCreated()) flags |= Flags::CParanoid;
|
||||||
showTopologyError( message.str(), flags );
|
showTopologyError( message.str(), flags );
|
||||||
|
|
|
@ -146,28 +146,34 @@ namespace Anabatic {
|
||||||
constraintMax = getNativeMax();
|
constraintMax = getNativeMax();
|
||||||
|
|
||||||
cdebug_log(149,0) << "Native constraints: ["
|
cdebug_log(149,0) << "Native constraints: ["
|
||||||
<< DbU::getValueString(constraintMin) << ":"
|
<< DbU::getValueString(constraintMin) << ":"
|
||||||
<< DbU::getValueString(constraintMax) << "]"
|
<< DbU::getValueString(constraintMax) << "]"
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
constraintMin = max ( constraintMin, getUserConstraints().getVMin() );
|
constraintMin = std::max ( constraintMin, getAutoSource()->getCBYMin() );
|
||||||
constraintMax = min ( constraintMax, getUserConstraints().getVMax() );
|
constraintMax = std::min ( constraintMax, getAutoSource()->getCBYMax() );
|
||||||
|
cdebug_log(149,0) << "Merge with source constraints: ["
|
||||||
|
<< DbU::getValueString(getAutoSource()->getCBYMin()) << ":"
|
||||||
|
<< DbU::getValueString(getAutoSource()->getCBYMax()) << "]"
|
||||||
|
<< endl;
|
||||||
|
|
||||||
cdebug_log(149,0) << "Merge with user constraints: " << getUserConstraints() << " ["
|
constraintMin = std::max ( constraintMin, getUserConstraints().getVMin() );
|
||||||
<< DbU::getValueString(getUserConstraints().getVMin()) << ":"
|
constraintMax = std::min ( constraintMax, getUserConstraints().getVMax() );
|
||||||
<< DbU::getValueString(getUserConstraints().getVMax()) << "]"
|
cdebug_log(149,0) << "Merge with user constraints: ["
|
||||||
<< endl;
|
<< DbU::getValueString(getUserConstraints().getVMin()) << ":"
|
||||||
|
<< DbU::getValueString(getUserConstraints().getVMax()) << "]"
|
||||||
|
<< endl;
|
||||||
|
|
||||||
cdebug_log(149,0) << "Resulting constraints: " << " ["
|
cdebug_log(149,0) << "Resulting constraints: " << " ["
|
||||||
<< DbU::getValueString(constraintMin) << ":"
|
<< DbU::getValueString(constraintMin) << ":"
|
||||||
<< DbU::getValueString(constraintMax) << "]"
|
<< DbU::getValueString(constraintMax) << "]"
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unsigned int AutoHorizontal::getDirection () const
|
Flags AutoHorizontal::getDirection () const
|
||||||
{ return Flags::Horizontal; }
|
{ return Flags::Horizontal; }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -685,8 +685,8 @@ namespace Anabatic {
|
||||||
{
|
{
|
||||||
setFlags( flags );
|
setFlags( flags );
|
||||||
if (not isNotAligned()) {
|
if (not isNotAligned()) {
|
||||||
forEach( AutoSegment*, isegment, getAligneds() )
|
for( AutoSegment* segment : getAligneds() )
|
||||||
isegment->setFlags( flags );
|
segment->setFlags( flags );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -846,8 +846,8 @@ namespace Anabatic {
|
||||||
_setAxis( axis );
|
_setAxis( axis );
|
||||||
|
|
||||||
if (not isNotAligned()) {
|
if (not isNotAligned()) {
|
||||||
forEach( AutoSegment*, isegment, getAligneds() ) {
|
for ( AutoSegment* segment : getAligneds() ) {
|
||||||
isegment->_setAxis( getAxis() );
|
segment->_setAxis( getAxis() );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cdebug_log(149,0) << "No need to process parallels." << endl;
|
cdebug_log(149,0) << "No need to process parallels." << endl;
|
||||||
|
@ -1009,11 +1009,11 @@ namespace Anabatic {
|
||||||
setOptimalMax( optimalMax );
|
setOptimalMax( optimalMax );
|
||||||
processeds.insert( this );
|
processeds.insert( this );
|
||||||
if (not isNotAligned()) {
|
if (not isNotAligned()) {
|
||||||
forEach ( AutoSegment*, autoSegment, getAligneds() ) {
|
for ( AutoSegment* autoSegment : getAligneds() ) {
|
||||||
cdebug_log(145,0) << "Applying constraint on: " << *autoSegment << endl;
|
cdebug_log(145,0) << "Applying constraint on: " << autoSegment << endl;
|
||||||
autoSegment->setOptimalMin( optimalMin );
|
autoSegment->setOptimalMin( optimalMin );
|
||||||
autoSegment->setOptimalMax( optimalMax );
|
autoSegment->setOptimalMax( optimalMax );
|
||||||
processeds.insert( (*autoSegment) );
|
processeds.insert( autoSegment );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -131,7 +131,7 @@ namespace Anabatic {
|
||||||
contact = segment->getAutoTarget();
|
contact = segment->getAutoTarget();
|
||||||
if (contact) _stack.push( contact, segment );
|
if (contact) _stack.push( contact, segment );
|
||||||
|
|
||||||
progress();
|
if (not (_flags & Flags::WithSelf)) progress();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -139,28 +139,35 @@ namespace Anabatic {
|
||||||
constraintMax = getNativeMax();
|
constraintMax = getNativeMax();
|
||||||
|
|
||||||
cdebug_log(149,0) << "Native constraints: ["
|
cdebug_log(149,0) << "Native constraints: ["
|
||||||
<< DbU::getValueString(constraintMin) << ":"
|
<< DbU::getValueString(constraintMin) << ":"
|
||||||
<< DbU::getValueString(constraintMax) << "]"
|
<< DbU::getValueString(constraintMax) << "]"
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
|
constraintMin = std::max ( constraintMin, getAutoSource()->getCBXMin() );
|
||||||
|
constraintMax = std::min ( constraintMax, getAutoSource()->getCBXMax() );
|
||||||
|
cdebug_log(149,0) << "Merge with source constraints: ["
|
||||||
|
<< DbU::getValueString(getAutoSource()->getCBXMin()) << ":"
|
||||||
|
<< DbU::getValueString(getAutoSource()->getCBXMax()) << "]"
|
||||||
|
<< endl;
|
||||||
|
|
||||||
constraintMin = max ( constraintMin, getUserConstraints().getVMin() );
|
constraintMin = max ( constraintMin, getUserConstraints().getVMin() );
|
||||||
constraintMax = min ( constraintMax, getUserConstraints().getVMax() );
|
constraintMax = min ( constraintMax, getUserConstraints().getVMax() );
|
||||||
|
|
||||||
cdebug_log(149,0) << "Merge with user constraints: " << getUserConstraints() << " ["
|
cdebug_log(149,0) << "Merge with user constraints: ["
|
||||||
<< DbU::getValueString(getUserConstraints().getVMin()) << ":"
|
<< DbU::getValueString(getUserConstraints().getVMin()) << ":"
|
||||||
<< DbU::getValueString(getUserConstraints().getVMax()) << "]"
|
<< DbU::getValueString(getUserConstraints().getVMax()) << "]"
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
cdebug_log(149,0) << "Resulting constraints: " << " ["
|
cdebug_log(149,0) << "Resulting constraints: " << " ["
|
||||||
<< DbU::getValueString(constraintMin) << ":"
|
<< DbU::getValueString(constraintMin) << ":"
|
||||||
<< DbU::getValueString(constraintMax) << "]"
|
<< DbU::getValueString(constraintMax) << "]"
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unsigned int AutoVertical::getDirection () const
|
Flags AutoVertical::getDirection () const
|
||||||
{ return Flags::Vertical; }
|
{ return Flags::Vertical; }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -57,17 +57,8 @@ namespace Anabatic {
|
||||||
// Class : "Anabatic::Configuration".
|
// Class : "Anabatic::Configuration".
|
||||||
|
|
||||||
|
|
||||||
Configuration::Configuration () { }
|
Configuration::Configuration ( const CellGauge* cg, const RoutingGauge* rg )
|
||||||
Configuration::~Configuration () { }
|
: _cg (NULL)
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
|
||||||
// Class : "Anabatic::ConfigurationConcrete".
|
|
||||||
|
|
||||||
|
|
||||||
ConfigurationConcrete::ConfigurationConcrete ( const CellGauge* cg, const RoutingGauge* rg )
|
|
||||||
: Configuration ()
|
|
||||||
, _cg (NULL)
|
|
||||||
, _rg (NULL)
|
, _rg (NULL)
|
||||||
, _extensionCaps ()
|
, _extensionCaps ()
|
||||||
, _saturateRatio (Cfg::getParamPercentage("katabatic.saturateRatio",80.0)->asDouble())
|
, _saturateRatio (Cfg::getParamPercentage("katabatic.saturateRatio",80.0)->asDouble())
|
||||||
|
@ -79,8 +70,6 @@ namespace Anabatic {
|
||||||
, _edgeCostH (Cfg::getParamDouble("anabatic.edgeCostH", 9.0)->asDouble())
|
, _edgeCostH (Cfg::getParamDouble("anabatic.edgeCostH", 9.0)->asDouble())
|
||||||
, _edgeCostK (Cfg::getParamDouble("anabatic.edgeCostK",-10.0)->asDouble())
|
, _edgeCostK (Cfg::getParamDouble("anabatic.edgeCostK",-10.0)->asDouble())
|
||||||
, _edgeHInc (Cfg::getParamDouble("anabatic.edgeHInc" , 1.5)->asDouble())
|
, _edgeHInc (Cfg::getParamDouble("anabatic.edgeHInc" , 1.5)->asDouble())
|
||||||
, _hEdgeLocal (Cfg::getParamInt("kite.hTracksReservedLocal",0)->asInt())
|
|
||||||
, _vEdgeLocal (Cfg::getParamInt("kite.vTracksReservedLocal",0)->asInt())
|
|
||||||
{
|
{
|
||||||
if (cg == NULL) cg = AllianceFramework::get()->getCellGauge();
|
if (cg == NULL) cg = AllianceFramework::get()->getCellGauge();
|
||||||
if (rg == NULL) rg = AllianceFramework::get()->getRoutingGauge();
|
if (rg == NULL) rg = AllianceFramework::get()->getRoutingGauge();
|
||||||
|
@ -119,9 +108,8 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ConfigurationConcrete::ConfigurationConcrete ( const ConfigurationConcrete& other )
|
Configuration::Configuration ( const Configuration& other )
|
||||||
: Configuration()
|
: _gmetalh (other._gmetalh)
|
||||||
, _gmetalh (other._gmetalh)
|
|
||||||
, _gmetalv (other._gmetalv)
|
, _gmetalv (other._gmetalv)
|
||||||
, _gcontact (other._gcontact)
|
, _gcontact (other._gcontact)
|
||||||
, _cg (NULL)
|
, _cg (NULL)
|
||||||
|
@ -139,7 +127,7 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ConfigurationConcrete::~ConfigurationConcrete ()
|
Configuration::~Configuration ()
|
||||||
{
|
{
|
||||||
cdebug_log(145,0) << "About to delete attribute _rg (RoutingGauge)." << endl;
|
cdebug_log(145,0) << "About to delete attribute _rg (RoutingGauge)." << endl;
|
||||||
_cg->destroy ();
|
_cg->destroy ();
|
||||||
|
@ -147,99 +135,99 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ConfigurationConcrete* ConfigurationConcrete::clone () const
|
Configuration* Configuration::clone () const
|
||||||
{ return new ConfigurationConcrete(*this); }
|
{ return new Configuration(*this); }
|
||||||
|
|
||||||
|
|
||||||
bool ConfigurationConcrete::isGMetal ( const Layer* layer ) const
|
bool Configuration::isGMetal ( const Layer* layer ) const
|
||||||
{ return (layer and ((layer == _gmetalh) or (layer == _gmetalv))); }
|
{ return (layer and ((layer == _gmetalh) or (layer == _gmetalv))); }
|
||||||
|
|
||||||
|
|
||||||
bool ConfigurationConcrete::isGContact ( const Layer* layer ) const
|
bool Configuration::isGContact ( const Layer* layer ) const
|
||||||
{ return (layer and (layer == _gcontact)); }
|
{ return (layer and (layer == _gcontact)); }
|
||||||
|
|
||||||
const Layer* ConfigurationConcrete::getGContactLayer () const
|
const Layer* Configuration::getGContactLayer () const
|
||||||
{ return _gcontact; }
|
{ return _gcontact; }
|
||||||
|
|
||||||
const Layer* ConfigurationConcrete::getGHorizontalLayer () const
|
const Layer* Configuration::getGHorizontalLayer () const
|
||||||
{ return _gmetalh; }
|
{ return _gmetalh; }
|
||||||
|
|
||||||
const Layer* ConfigurationConcrete::getGVerticalLayer () const
|
const Layer* Configuration::getGVerticalLayer () const
|
||||||
{ return _gmetalv; }
|
{ return _gmetalv; }
|
||||||
|
|
||||||
size_t ConfigurationConcrete::getDepth () const
|
size_t Configuration::getDepth () const
|
||||||
{ return _rg->getDepth(); }
|
{ return _rg->getDepth(); }
|
||||||
|
|
||||||
|
|
||||||
size_t ConfigurationConcrete::getAllowedDepth () const
|
size_t Configuration::getAllowedDepth () const
|
||||||
{ return _allowedDepth; }
|
{ return _allowedDepth; }
|
||||||
|
|
||||||
|
|
||||||
size_t ConfigurationConcrete::getLayerDepth ( const Layer* layer ) const
|
size_t Configuration::getLayerDepth ( const Layer* layer ) const
|
||||||
{ return _rg->getLayerDepth(layer); }
|
{ return _rg->getLayerDepth(layer); }
|
||||||
|
|
||||||
|
|
||||||
CellGauge* ConfigurationConcrete::getCellGauge () const
|
CellGauge* Configuration::getCellGauge () const
|
||||||
{ return _cg; }
|
{ return _cg; }
|
||||||
|
|
||||||
|
|
||||||
RoutingGauge* ConfigurationConcrete::getRoutingGauge () const
|
RoutingGauge* Configuration::getRoutingGauge () const
|
||||||
{ return _rg; }
|
{ return _rg; }
|
||||||
|
|
||||||
|
|
||||||
RoutingLayerGauge* ConfigurationConcrete::getLayerGauge ( size_t depth ) const
|
RoutingLayerGauge* Configuration::getLayerGauge ( size_t depth ) const
|
||||||
{ return _rg->getLayerGauge(depth); }
|
{ return _rg->getLayerGauge(depth); }
|
||||||
|
|
||||||
|
|
||||||
const Layer* ConfigurationConcrete::getRoutingLayer ( size_t depth ) const
|
const Layer* Configuration::getRoutingLayer ( size_t depth ) const
|
||||||
{ return _rg->getRoutingLayer(depth); }
|
{ return _rg->getRoutingLayer(depth); }
|
||||||
|
|
||||||
|
|
||||||
Layer* ConfigurationConcrete::getContactLayer ( size_t depth ) const
|
Layer* Configuration::getContactLayer ( size_t depth ) const
|
||||||
{ return _rg->getContactLayer(depth); }
|
{ return _rg->getContactLayer(depth); }
|
||||||
|
|
||||||
|
|
||||||
DbU::Unit ConfigurationConcrete::getSliceHeight () const
|
DbU::Unit Configuration::getSliceHeight () const
|
||||||
{ return _cg->getSliceHeight(); }
|
{ return _cg->getSliceHeight(); }
|
||||||
|
|
||||||
|
|
||||||
DbU::Unit ConfigurationConcrete::getSliceStep () const
|
DbU::Unit Configuration::getSliceStep () const
|
||||||
{ return _cg->getSliceStep(); }
|
{ return _cg->getSliceStep(); }
|
||||||
|
|
||||||
|
|
||||||
DbU::Unit ConfigurationConcrete::getPitch ( const Layer* layer, Flags flags ) const
|
DbU::Unit Configuration::getPitch ( const Layer* layer, Flags flags ) const
|
||||||
{ return getPitch( getLayerDepth(layer), flags ); }
|
{ return getPitch( getLayerDepth(layer), flags ); }
|
||||||
|
|
||||||
|
|
||||||
DbU::Unit ConfigurationConcrete::getOffset ( const Layer* layer ) const
|
DbU::Unit Configuration::getOffset ( const Layer* layer ) const
|
||||||
{ return getOffset( getLayerDepth(layer) ); }
|
{ return getOffset( getLayerDepth(layer) ); }
|
||||||
|
|
||||||
|
|
||||||
DbU::Unit ConfigurationConcrete::getExtensionCap ( const Layer* layer ) const
|
DbU::Unit Configuration::getExtensionCap ( const Layer* layer ) const
|
||||||
{ return getExtensionCap( getLayerDepth(layer) ); }
|
{ return getExtensionCap( getLayerDepth(layer) ); }
|
||||||
|
|
||||||
|
|
||||||
DbU::Unit ConfigurationConcrete::getWireWidth ( const Layer* layer ) const
|
DbU::Unit Configuration::getWireWidth ( const Layer* layer ) const
|
||||||
{ return getWireWidth( getLayerDepth(layer) ); }
|
{ return getWireWidth( getLayerDepth(layer) ); }
|
||||||
|
|
||||||
|
|
||||||
Flags ConfigurationConcrete::getDirection ( const Layer* layer ) const
|
Flags Configuration::getDirection ( const Layer* layer ) const
|
||||||
{ return getDirection( getLayerDepth(layer) ); }
|
{ return getDirection( getLayerDepth(layer) ); }
|
||||||
|
|
||||||
|
|
||||||
float ConfigurationConcrete::getSaturateRatio () const
|
float Configuration::getSaturateRatio () const
|
||||||
{ return _saturateRatio; }
|
{ return _saturateRatio; }
|
||||||
|
|
||||||
|
|
||||||
size_t ConfigurationConcrete::getSaturateRp () const
|
size_t Configuration::getSaturateRp () const
|
||||||
{ return _saturateRp; }
|
{ return _saturateRp; }
|
||||||
|
|
||||||
|
|
||||||
DbU::Unit ConfigurationConcrete::getGlobalThreshold () const
|
DbU::Unit Configuration::getGlobalThreshold () const
|
||||||
{ return _globalThreshold; }
|
{ return _globalThreshold; }
|
||||||
|
|
||||||
|
|
||||||
DbU::Unit ConfigurationConcrete::getPitch ( size_t depth, Flags flags ) const
|
DbU::Unit Configuration::getPitch ( size_t depth, Flags flags ) const
|
||||||
{
|
{
|
||||||
if (flags == Flags::NoFlags) return _rg->getLayerPitch(depth);
|
if (flags == Flags::NoFlags) return _rg->getLayerPitch(depth);
|
||||||
|
|
||||||
|
@ -266,27 +254,27 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DbU::Unit ConfigurationConcrete::getOffset ( size_t depth ) const
|
DbU::Unit Configuration::getOffset ( size_t depth ) const
|
||||||
{ return _rg->getLayerOffset(depth); }
|
{ return _rg->getLayerOffset(depth); }
|
||||||
|
|
||||||
|
|
||||||
DbU::Unit ConfigurationConcrete::getWireWidth ( size_t depth ) const
|
DbU::Unit Configuration::getWireWidth ( size_t depth ) const
|
||||||
{ return _rg->getLayerWireWidth(depth); }
|
{ return _rg->getLayerWireWidth(depth); }
|
||||||
|
|
||||||
|
|
||||||
DbU::Unit ConfigurationConcrete::getExtensionCap ( size_t depth ) const
|
DbU::Unit Configuration::getExtensionCap ( size_t depth ) const
|
||||||
{ return _extensionCaps[depth]; }
|
{ return _extensionCaps[depth]; }
|
||||||
|
|
||||||
|
|
||||||
Flags ConfigurationConcrete::getDirection ( size_t depth ) const
|
Flags Configuration::getDirection ( size_t depth ) const
|
||||||
{ return _rg->getLayerDirection(depth); }
|
{ return _rg->getLayerDirection(depth); }
|
||||||
|
|
||||||
|
|
||||||
void ConfigurationConcrete::setAllowedDepth ( size_t allowedDepth )
|
void Configuration::setAllowedDepth ( size_t allowedDepth )
|
||||||
{ _allowedDepth = (allowedDepth > getDepth()) ? getDepth() : allowedDepth; }
|
{ _allowedDepth = (allowedDepth > getDepth()) ? getDepth() : allowedDepth; }
|
||||||
|
|
||||||
|
|
||||||
void ConfigurationConcrete::_setTopRoutingLayer ( Name name )
|
void Configuration::_setTopRoutingLayer ( Name name )
|
||||||
{
|
{
|
||||||
for ( size_t depth=0 ; depth<_rg->getDepth() ; ++depth ) {
|
for ( size_t depth=0 ; depth<_rg->getDepth() ; ++depth ) {
|
||||||
if (_rg->getRoutingLayer(depth)->getName() == name) {
|
if (_rg->getRoutingLayer(depth)->getName() == name) {
|
||||||
|
@ -301,47 +289,39 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ConfigurationConcrete::setSaturateRatio ( float ratio )
|
void Configuration::setSaturateRatio ( float ratio )
|
||||||
{ _saturateRatio = ratio; }
|
{ _saturateRatio = ratio; }
|
||||||
|
|
||||||
|
|
||||||
void ConfigurationConcrete::setSaturateRp ( size_t threshold )
|
void Configuration::setSaturateRp ( size_t threshold )
|
||||||
{ _saturateRp = threshold; }
|
{ _saturateRp = threshold; }
|
||||||
|
|
||||||
|
|
||||||
void ConfigurationConcrete::setGlobalThreshold ( DbU::Unit threshold )
|
void Configuration::setGlobalThreshold ( DbU::Unit threshold )
|
||||||
{ _globalThreshold = threshold; }
|
{ _globalThreshold = threshold; }
|
||||||
|
|
||||||
|
|
||||||
DbU::Unit ConfigurationConcrete::getEdgeLength () const
|
DbU::Unit Configuration::getEdgeLength () const
|
||||||
{ return _edgeLength; }
|
{ return _edgeLength; }
|
||||||
|
|
||||||
|
|
||||||
DbU::Unit ConfigurationConcrete::getEdgeWidth () const
|
DbU::Unit Configuration::getEdgeWidth () const
|
||||||
{ return _edgeWidth; }
|
{ return _edgeWidth; }
|
||||||
|
|
||||||
|
|
||||||
size_t ConfigurationConcrete::getHEdgeLocal () const
|
float Configuration::getEdgeCostH () const
|
||||||
{ return _hEdgeLocal; }
|
|
||||||
|
|
||||||
|
|
||||||
size_t ConfigurationConcrete::getVEdgeLocal () const
|
|
||||||
{ return _vEdgeLocal; }
|
|
||||||
|
|
||||||
|
|
||||||
float ConfigurationConcrete::getEdgeCostH () const
|
|
||||||
{ return _edgeCostH; }
|
{ return _edgeCostH; }
|
||||||
|
|
||||||
|
|
||||||
float ConfigurationConcrete::getEdgeCostK () const
|
float Configuration::getEdgeCostK () const
|
||||||
{ return _edgeCostK; }
|
{ return _edgeCostK; }
|
||||||
|
|
||||||
|
|
||||||
float ConfigurationConcrete::getEdgeHInc () const
|
float Configuration::getEdgeHInc () const
|
||||||
{ return _edgeHInc; }
|
{ return _edgeHInc; }
|
||||||
|
|
||||||
|
|
||||||
void ConfigurationConcrete::print ( Cell* cell ) const
|
void Configuration::print ( Cell* cell ) const
|
||||||
{
|
{
|
||||||
string topLayerName = "UNKOWN";
|
string topLayerName = "UNKOWN";
|
||||||
const Layer* topLayer = _rg->getRoutingLayer( _allowedDepth );
|
const Layer* topLayer = _rg->getRoutingLayer( _allowedDepth );
|
||||||
|
@ -354,13 +334,13 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
string ConfigurationConcrete::_getTypeName () const
|
string Configuration::_getTypeName () const
|
||||||
{
|
{
|
||||||
return "ConfigurationConcrete";
|
return "Configuration";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
string ConfigurationConcrete::_getString () const
|
string Configuration::_getString () const
|
||||||
{
|
{
|
||||||
ostringstream os;
|
ostringstream os;
|
||||||
|
|
||||||
|
@ -370,7 +350,7 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Record* ConfigurationConcrete::_getRecord () const
|
Record* Configuration::_getRecord () const
|
||||||
{
|
{
|
||||||
Record* record = new Record ( _getString() );
|
Record* record = new Record ( _getString() );
|
||||||
record->add ( getSlot( "_rg" , _rg ) );
|
record->add ( getSlot( "_rg" , _rg ) );
|
||||||
|
@ -385,5 +365,4 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} // Anabatic namespace.
|
} // Anabatic namespace.
|
||||||
|
|
|
@ -22,6 +22,66 @@ namespace Anabatic {
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
||||||
|
const unsigned int Flags::NoFlags = 0;
|
||||||
|
// Flags used for both objects states & functions arguments.
|
||||||
|
const unsigned int Flags::Horizontal = (1 << 0);
|
||||||
|
const unsigned int Flags::Vertical = (1 << 1);
|
||||||
|
const unsigned int Flags::Source = (1 << 2);
|
||||||
|
const unsigned int Flags::Target = (1 << 3);
|
||||||
|
const unsigned int Flags::Invalidated = (1 << 4);
|
||||||
|
// Flags for GCell objects states only.
|
||||||
|
const unsigned int Flags::DeviceGCell = (1 << 5);
|
||||||
|
const unsigned int Flags::ChannelGCell = (1 << 6);
|
||||||
|
const unsigned int Flags::StrutGCell = (1 << 7);
|
||||||
|
const unsigned int Flags::MatrixGCell = (1 << 8);
|
||||||
|
const unsigned int Flags::IoPadGCell = (1 << 9);
|
||||||
|
const unsigned int Flags::Saturated = (1 << 10);
|
||||||
|
// Flags for Anabatic objects states only.
|
||||||
|
const unsigned int Flags::DemoMode = (1 << 5);
|
||||||
|
const unsigned int Flags::WarnOnGCellOverload = (1 << 6);
|
||||||
|
const unsigned int Flags::DestroyGCell = (1 << 7);
|
||||||
|
const unsigned int Flags::DestroyBaseContact = (1 << 8);
|
||||||
|
const unsigned int Flags::DestroyBaseSegment = (1 << 9);
|
||||||
|
// Flags for NetDatas objects states only.
|
||||||
|
const unsigned int Flags::GlobalRouted = (1 << 5);
|
||||||
|
// Masks.
|
||||||
|
const unsigned int Flags::WestSide = Horizontal|Target;
|
||||||
|
const unsigned int Flags::EastSide = Horizontal|Source;
|
||||||
|
const unsigned int Flags::SouthSide = Vertical |Target;
|
||||||
|
const unsigned int Flags::NorthSide = Vertical |Source;
|
||||||
|
const unsigned int Flags::AllSides = WestSide|EastSide|SouthSide|NorthSide ;
|
||||||
|
const unsigned int Flags::EndsMask = Source|Target;
|
||||||
|
const unsigned int Flags::DirectionMask = Horizontal|Vertical;
|
||||||
|
const unsigned int Flags::DestroyMask = DestroyGCell|DestroyBaseContact|DestroyBaseSegment;
|
||||||
|
const unsigned int Flags::GCellTypeMask = DeviceGCell|ChannelGCell|StrutGCell|MatrixGCell|IoPadGCell;
|
||||||
|
// Flags for functions arguments only.
|
||||||
|
const unsigned int Flags::Create = (1 << 5);
|
||||||
|
const unsigned int Flags::WithPerpands = (1 << 6);
|
||||||
|
const unsigned int Flags::WithSelf = (1 << 7);
|
||||||
|
const unsigned int Flags::AboveLayer = (1 << 8);
|
||||||
|
const unsigned int Flags::BelowLayer = (1 << 9);
|
||||||
|
const unsigned int Flags::OpenSession = (1 << 10);
|
||||||
|
const unsigned int Flags::Realignate = (1 << 11);
|
||||||
|
const unsigned int Flags::NativeConstraints = (1 << 12);
|
||||||
|
const unsigned int Flags::ForceMove = (1 << 13);
|
||||||
|
const unsigned int Flags::WarnOnError = (1 << 14);
|
||||||
|
const unsigned int Flags::Topology = (1 << 15);
|
||||||
|
const unsigned int Flags::GlobalSegment = (1 << 16);
|
||||||
|
const unsigned int Flags::AllowTerminal = (1 << 17);
|
||||||
|
const unsigned int Flags::AllowLocal = (1 << 18);
|
||||||
|
const unsigned int Flags::IgnoreContacts = (1 << 19);
|
||||||
|
const unsigned int Flags::Propagate = (1 << 20);
|
||||||
|
const unsigned int Flags::Superior = (1 << 21);
|
||||||
|
const unsigned int Flags::DoglegOnLeft = (1 << 22);
|
||||||
|
const unsigned int Flags::DoglegOnRight = (1 << 23);
|
||||||
|
const unsigned int Flags::WithNeighbors = (1 << 24);
|
||||||
|
const unsigned int Flags::NoCheckLayer = (1 << 25);
|
||||||
|
const unsigned int Flags::HalfSlacken = (1 << 26);
|
||||||
|
const unsigned int Flags::NoGCellShrink = (1 << 27);
|
||||||
|
const unsigned int Flags::CParanoid = (1 << 28);
|
||||||
|
const unsigned int Flags::CheckLowDensity = (1 << 29);
|
||||||
|
const unsigned int Flags::NoUpdate = (1 << 30);
|
||||||
|
|
||||||
|
|
||||||
Flags::~Flags ()
|
Flags::~Flags ()
|
||||||
{ }
|
{ }
|
||||||
|
|
|
@ -85,7 +85,6 @@ namespace Anabatic {
|
||||||
|
|
||||||
void Vertex::notify ( Vertex* vertex, unsigned int flags )
|
void Vertex::notify ( Vertex* vertex, unsigned int flags )
|
||||||
{
|
{
|
||||||
//Vertex* vertex = getOwner();
|
|
||||||
cdebug_log(111,0) << "Vertex::notify() " << vertex << endl;
|
cdebug_log(111,0) << "Vertex::notify() " << vertex << endl;
|
||||||
// Take into account the GCell modification here.
|
// Take into account the GCell modification here.
|
||||||
}
|
}
|
||||||
|
|
|
@ -325,7 +325,7 @@ namespace Anabatic {
|
||||||
if (not anabatic) throw Error( "GCell::create(): NULL anabatic argument." );
|
if (not anabatic) throw Error( "GCell::create(): NULL anabatic argument." );
|
||||||
if (not anabatic->getCell()) throw Error( "GCell::create(): AnabaticEngine has no Cell loaded." );
|
if (not anabatic->getCell()) throw Error( "GCell::create(): AnabaticEngine has no Cell loaded." );
|
||||||
|
|
||||||
Session::open( anabatic );
|
anabatic->openSession();
|
||||||
GCell* gcell = new GCell ( anabatic
|
GCell* gcell = new GCell ( anabatic
|
||||||
, anabatic->getCell()->getAbutmentBox().getXMin()
|
, anabatic->getCell()->getAbutmentBox().getXMin()
|
||||||
, anabatic->getCell()->getAbutmentBox().getYMin() );
|
, anabatic->getCell()->getAbutmentBox().getYMin() );
|
||||||
|
@ -539,6 +539,16 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
GCell* GCell::getNeighborAt ( Flags side, DbU::Unit axis ) const
|
||||||
|
{
|
||||||
|
if (side & Flags::EastSide ) return getEast (axis);
|
||||||
|
if (side & Flags::WestSide ) return getWest (axis);
|
||||||
|
if (side & Flags::NorthSide) return getNorth(axis);
|
||||||
|
if (side & Flags::SouthSide) return getSouth(axis);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
GCell* GCell::getUnder ( DbU::Unit x, DbU::Unit y ) const
|
GCell* GCell::getUnder ( DbU::Unit x, DbU::Unit y ) const
|
||||||
{
|
{
|
||||||
const GCell* current = this;
|
const GCell* current = this;
|
||||||
|
@ -706,10 +716,10 @@ namespace Anabatic {
|
||||||
|
|
||||||
bool GCell::doGrid ()
|
bool GCell::doGrid ()
|
||||||
{
|
{
|
||||||
Session::open( getAnabatic() );
|
getAnabatic()->openSession();
|
||||||
|
|
||||||
const vector<GCell*>& gcells = getAnabatic()->getGCells();
|
//const vector<GCell*>& gcells = getAnabatic()->getGCells();
|
||||||
size_t ibegin = gcells.size();
|
//size_t ibegin = gcells.size();
|
||||||
DbU::Unit side = Session::getSliceHeight();
|
DbU::Unit side = Session::getSliceHeight();
|
||||||
|
|
||||||
Interval hspan = getSide( Flags::Horizontal );
|
Interval hspan = getSide( Flags::Horizontal );
|
||||||
|
@ -740,29 +750,32 @@ namespace Anabatic {
|
||||||
for ( ; ycut < vspan.getVMax() ; ycut += side ) {
|
for ( ; ycut < vspan.getVMax() ; ycut += side ) {
|
||||||
column = row;
|
column = row;
|
||||||
row = row->hcut( ycut );
|
row = row->hcut( ycut );
|
||||||
|
row->setType( Flags::MatrixGCell );
|
||||||
|
|
||||||
for ( DbU::Unit xcut = hspan.getVMin()+side ; xcut < hspan.getVMax() ; xcut += side ) {
|
for ( DbU::Unit xcut = hspan.getVMin()+side ; xcut < hspan.getVMax() ; xcut += side ) {
|
||||||
column = column->vcut( xcut );
|
column = column->vcut( xcut );
|
||||||
|
column->setType( Flags::MatrixGCell );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
column = row;
|
column = row;
|
||||||
for ( DbU::Unit xcut = hspan.getVMin()+side ; xcut < hspan.getVMax() ; xcut += side ) {
|
for ( DbU::Unit xcut = hspan.getVMin()+side ; xcut < hspan.getVMax() ; xcut += side ) {
|
||||||
column = column->vcut( xcut );
|
column = column->vcut( xcut );
|
||||||
|
column->setType( Flags::MatrixGCell );
|
||||||
}
|
}
|
||||||
|
|
||||||
setType( Flags::MatrixGCell );
|
setType( Flags::MatrixGCell );
|
||||||
|
|
||||||
size_t hLocal = - getAnabatic()->getConfiguration()->getHEdgeLocal();
|
//size_t hLocal = - getAnabatic()->getConfiguration()->getHEdgeLocal();
|
||||||
size_t vLocal = - getAnabatic()->getConfiguration()->getVEdgeLocal();
|
//size_t vLocal = - getAnabatic()->getConfiguration()->getVEdgeLocal();
|
||||||
for ( ; ibegin < gcells.size() ; ++ibegin ) {
|
//for ( ; ibegin < gcells.size() ; ++ibegin ) {
|
||||||
gcells[ibegin]->setType( Flags::MatrixGCell );
|
// gcells[ibegin]->setType( Flags::MatrixGCell );
|
||||||
|
|
||||||
for ( Edge* edge : gcells[ibegin]->getEdges(Flags::NorthSide|Flags::EastSide) ) {
|
// for ( Edge* edge : gcells[ibegin]->getEdges(Flags::NorthSide|Flags::EastSide) ) {
|
||||||
if (edge->isHorizontal()) edge->incCapacity( hLocal );
|
// if (edge->isHorizontal()) edge->incCapacity( hLocal );
|
||||||
else edge->incCapacity( vLocal );
|
// else edge->incCapacity( vLocal );
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
Session::close();
|
Session::close();
|
||||||
return true;
|
return true;
|
||||||
|
@ -1049,13 +1062,8 @@ namespace Anabatic {
|
||||||
|
|
||||||
Interval GCell::getSide ( unsigned int direction ) const
|
Interval GCell::getSide ( unsigned int direction ) const
|
||||||
{
|
{
|
||||||
Interval side;
|
if (direction & Flags::Vertical) return Interval( getYMin(), getYMax() );
|
||||||
switch ( direction ) {
|
return Interval( getXMin(), getXMax() );
|
||||||
default:
|
|
||||||
case Flags::Horizontal: side = Interval(getXMin(),getXMax()); break;
|
|
||||||
case Flags::Vertical: side = Interval(getYMin(),getYMax()); break;
|
|
||||||
}
|
|
||||||
return side;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1312,15 +1320,12 @@ namespace Anabatic {
|
||||||
localCounts [i] = 0.0;
|
localCounts [i] = 0.0;
|
||||||
_globalsCount[i] = 0.0;
|
_globalsCount[i] = 0.0;
|
||||||
|
|
||||||
switch ( Session::getDirection(i) ) {
|
if (Session::getDirection(i) & Flags::Horizontal) {
|
||||||
case Flags::Horizontal:
|
ufragments[i].setSpan ( getXMin(), getXMax() );
|
||||||
ufragments[i].setSpan ( getXMin(), getXMax() );
|
ufragments[i].setCapacity( (size_t)hcapacity );
|
||||||
ufragments[i].setCapacity( (size_t)hcapacity );
|
} else {
|
||||||
break;
|
ufragments[i].setSpan ( getYMin(), getYMax() );
|
||||||
case Flags::Vertical:
|
ufragments[i].setCapacity( (size_t)vcapacity );
|
||||||
ufragments[i].setSpan ( getYMin(), getYMax() );
|
|
||||||
ufragments[i].setCapacity( (size_t)vcapacity );
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1330,10 +1335,10 @@ namespace Anabatic {
|
||||||
for ( size_t i=0 ; i<_depth ; i++ ) uLengths1[i] = 0;
|
for ( size_t i=0 ; i<_depth ; i++ ) uLengths1[i] = 0;
|
||||||
contact->getLengths ( uLengths1, processeds );
|
contact->getLengths ( uLengths1, processeds );
|
||||||
for ( size_t i=0 ; i<_depth ; i++ ) {
|
for ( size_t i=0 ; i<_depth ; i++ ) {
|
||||||
switch ( Session::getDirection(i) ) {
|
if (Session::getDirection(i) & Flags::Horizontal)
|
||||||
case Flags::Horizontal: uLengths2[i] += uLengths1[i]+hpenalty; break;
|
uLengths2[i] += uLengths1[i]+hpenalty;
|
||||||
case Flags::Vertical: uLengths2[i] += uLengths1[i]+vpenalty; break;
|
else
|
||||||
}
|
uLengths2[i] += uLengths1[i]+vpenalty; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1415,29 +1420,26 @@ namespace Anabatic {
|
||||||
|
|
||||||
// Normalize: 0 < d < 1.0 (divide by H/V capacity).
|
// Normalize: 0 < d < 1.0 (divide by H/V capacity).
|
||||||
for ( size_t i=0 ; i<_depth ; i++ ) {
|
for ( size_t i=0 ; i<_depth ; i++ ) {
|
||||||
switch ( Session::getDirection(i) ) {
|
if (Session::getDirection(i) & Flags::Horizontal) {
|
||||||
case Flags::Horizontal:
|
if (width) {
|
||||||
if (width) {
|
_densities [i] = ((float)uLengths2[i]) / ( hcapacity * (float)width );
|
||||||
_densities [i] = ((float)uLengths2[i]) / ( hcapacity * (float)width );
|
_feedthroughs [i] += (float)(_blockages[i] / width);
|
||||||
_feedthroughs [i] += (float)(_blockages[i] / width);
|
_fragmentations[i] = (float)ufragments[i].getMaxFree().getSize() / (float)width;
|
||||||
_fragmentations[i] = (float)ufragments[i].getMaxFree().getSize() / (float)width;
|
} else {
|
||||||
} else {
|
_densities [i] = 0;
|
||||||
_densities [i] = 0;
|
_feedthroughs [i] = 0;
|
||||||
_feedthroughs [i] = 0;
|
_fragmentations[i] = 0;
|
||||||
_fragmentations[i] = 0;
|
}
|
||||||
}
|
} else {
|
||||||
break;
|
if (height) {
|
||||||
case Flags::Vertical:
|
_densities [i] = ((float)uLengths2[i]) / ( vcapacity * (float)height );
|
||||||
if (height) {
|
_feedthroughs [i] += (float)(_blockages[i] / height);
|
||||||
_densities [i] = ((float)uLengths2[i]) / ( vcapacity * (float)height );
|
_fragmentations[i] = (float)ufragments[i].getMaxFree().getSize() / (float)height;
|
||||||
_feedthroughs [i] += (float)(_blockages[i] / height);
|
} else {
|
||||||
_fragmentations[i] = (float)ufragments[i].getMaxFree().getSize() / (float)height;
|
_densities [i] = 0;
|
||||||
} else {
|
_feedthroughs [i] = 0;
|
||||||
_densities [i] = 0;
|
_fragmentations[i] = 0;
|
||||||
_feedthroughs [i] = 0;
|
}
|
||||||
_fragmentations[i] = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_densities[i] >= 1.0) _flags |= Flags::Saturated;
|
if (_densities[i] >= 1.0) _flags |= Flags::Saturated;
|
||||||
|
@ -1455,6 +1457,25 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GCell::truncDensities ()
|
||||||
|
{
|
||||||
|
int hcapacity = (int)getHCapacity();
|
||||||
|
int vcapacity = (int)getVCapacity();
|
||||||
|
Box bBox = getBoundingBox();
|
||||||
|
|
||||||
|
for ( size_t i=0 ; i<_depth ; i++ ) {
|
||||||
|
if (Session::getDirection(i) & Flags::Horizontal) {
|
||||||
|
if (_blockages[i] > hcapacity * bBox.getWidth())
|
||||||
|
_blockages[i] = hcapacity * bBox.getWidth();
|
||||||
|
} else {
|
||||||
|
if (_blockages[i] > vcapacity * bBox.getHeight())
|
||||||
|
_blockages[i] = vcapacity * bBox.getHeight();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_flags &= ~Flags::Saturated;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
size_t GCell::checkDensity () const
|
size_t GCell::checkDensity () const
|
||||||
{
|
{
|
||||||
if (isInvalidated()) const_cast<GCell*>(this)->updateDensity();
|
if (isInvalidated()) const_cast<GCell*>(this)->updateDensity();
|
||||||
|
@ -1485,10 +1506,8 @@ namespace Anabatic {
|
||||||
if (isInvalidated()) const_cast<GCell*>(this)->updateDensity();
|
if (isInvalidated()) const_cast<GCell*>(this)->updateDensity();
|
||||||
|
|
||||||
float capacity = 0.0;
|
float capacity = 0.0;
|
||||||
switch ( Session::getDirection(depth) ) {
|
if (Session::getDirection(depth) & Flags::Horizontal) capacity = getHCapacity();
|
||||||
case Flags::Horizontal: capacity = getHCapacity(); break;
|
else capacity = getVCapacity();
|
||||||
case Flags::Vertical: capacity = getVCapacity(); break;
|
|
||||||
}
|
|
||||||
|
|
||||||
cdebug_log(149,0) << " | hasFreeTrack [" << getId() << "] depth:" << depth << " "
|
cdebug_log(149,0) << " | hasFreeTrack [" << getId() << "] depth:" << depth << " "
|
||||||
<< Session::getRoutingGauge()->getRoutingLayer(depth)->getName()
|
<< Session::getRoutingGauge()->getRoutingLayer(depth)->getName()
|
||||||
|
@ -1543,15 +1562,12 @@ namespace Anabatic {
|
||||||
vector<AutoSegment*>::iterator isegment;
|
vector<AutoSegment*>::iterator isegment;
|
||||||
vector<AutoSegment*>::iterator iend;
|
vector<AutoSegment*>::iterator iend;
|
||||||
|
|
||||||
switch ( Session::getDirection(depth) ) {
|
if (Session::getDirection(depth) & Flags::Horizontal) {
|
||||||
case Flags::Horizontal:
|
iend = _hsegments.end ();
|
||||||
iend = _hsegments.end ();
|
isegment = _hsegments.begin();
|
||||||
isegment = _hsegments.begin();
|
} else {
|
||||||
break;
|
iend = _vsegments.end ();
|
||||||
case Flags::Vertical:
|
isegment = _vsegments.begin();
|
||||||
iend = _vsegments.end ();
|
|
||||||
isegment = _vsegments.begin();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( ; (isegment != iend) ; isegment++ ) {
|
for ( ; (isegment != iend) ; isegment++ ) {
|
||||||
|
@ -1582,15 +1598,12 @@ namespace Anabatic {
|
||||||
vector<AutoSegment*>::iterator iend;
|
vector<AutoSegment*>::iterator iend;
|
||||||
set<Net*> globalNets;
|
set<Net*> globalNets;
|
||||||
|
|
||||||
switch ( Session::getDirection(depth) ) {
|
if (Session::getDirection(depth) & Flags::Horizontal) {
|
||||||
case Flags::Horizontal:
|
iend = _hsegments.end ();
|
||||||
iend = _hsegments.end ();
|
isegment = _hsegments.begin();
|
||||||
isegment = _hsegments.begin();
|
} else {
|
||||||
break;
|
iend = _vsegments.end ();
|
||||||
case Flags::Vertical:
|
isegment = _vsegments.begin();
|
||||||
iend = _vsegments.end ();
|
|
||||||
isegment = _vsegments.begin();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( ; (isegment != iend) ; isegment++ ) {
|
for ( ; (isegment != iend) ; isegment++ ) {
|
||||||
|
@ -1626,15 +1639,12 @@ namespace Anabatic {
|
||||||
vector<AutoSegment*>::iterator isegment;
|
vector<AutoSegment*>::iterator isegment;
|
||||||
vector<AutoSegment*>::iterator iend;
|
vector<AutoSegment*>::iterator iend;
|
||||||
|
|
||||||
switch ( Session::getDirection(depth) ) {
|
if (Session::getDirection(depth) & Flags::Horizontal) {
|
||||||
case Flags::Horizontal:
|
iend = _hsegments.end ();
|
||||||
iend = _hsegments.end ();
|
isegment = _hsegments.begin ();
|
||||||
isegment = _hsegments.begin ();
|
} else {
|
||||||
break;
|
iend = _vsegments.end ();
|
||||||
case Flags::Vertical:
|
isegment = _vsegments.begin ();
|
||||||
iend = _vsegments.end ();
|
|
||||||
isegment = _vsegments.begin ();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( ; (isegment != iend) ; isegment++ ) {
|
for ( ; (isegment != iend) ; isegment++ ) {
|
||||||
|
@ -1775,4 +1785,30 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool isLess ( const GCell* lhs, const GCell* rhs, Flags direction )
|
||||||
|
{
|
||||||
|
if (direction & Flags::Horizontal) {
|
||||||
|
if (lhs->getXMin() != rhs->getXMin()) return lhs->getXMin() < rhs->getXMin();
|
||||||
|
} else {
|
||||||
|
if (direction & Flags::Vertical) {
|
||||||
|
if (lhs->getYMin() != rhs->getYMin()) return lhs->getYMin() < rhs->getYMin();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return lhs->getId() < rhs->getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool isGreater ( const GCell* lhs, const GCell* rhs, Flags direction )
|
||||||
|
{
|
||||||
|
if (direction & Flags::Horizontal) {
|
||||||
|
if (lhs->getXMin() != rhs->getXMin()) return lhs->getXMin() > rhs->getXMin();
|
||||||
|
} else {
|
||||||
|
if (direction & Flags::Vertical) {
|
||||||
|
if (lhs->getYMin() != rhs->getYMin()) return lhs->getYMin() > rhs->getYMin();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return lhs->getId() > rhs->getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} // Anabatic namespace.
|
} // Anabatic namespace.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// -*- C++ -*-
|
// -*- mode: C++; explicit-buffer-name: "GlobalRoute.cpp<anabatic>" -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC 2016-2016, All Rights Reserved
|
// Copyright (c) UPMC 2016-2016, All Rights Reserved
|
||||||
|
@ -138,7 +138,6 @@ namespace Anabatic {
|
||||||
|
|
||||||
startMeasures();
|
startMeasures();
|
||||||
|
|
||||||
UpdateSession::open();
|
|
||||||
if (getGCells().size() == 1) {
|
if (getGCells().size() == 1) {
|
||||||
cmess1 << " o Building regular grid..." << endl;
|
cmess1 << " o Building regular grid..." << endl;
|
||||||
getSouthWestGCell()->doGrid();
|
getSouthWestGCell()->doGrid();
|
||||||
|
@ -146,24 +145,21 @@ namespace Anabatic {
|
||||||
cmess1 << " o Reusing existing grid." << endl;
|
cmess1 << " o Reusing existing grid." << endl;
|
||||||
}
|
}
|
||||||
cmess1 << Dots::asInt(" - GCells" ,getGCells().size()) << endl;
|
cmess1 << Dots::asInt(" - GCells" ,getGCells().size()) << endl;
|
||||||
UpdateSession::close();
|
|
||||||
|
|
||||||
stopMeasures();
|
stopMeasures();
|
||||||
printMeasures( "Anabatic Grid" );
|
printMeasures( "Anabatic Grid" );
|
||||||
|
|
||||||
Session::open( this );
|
|
||||||
setupSpecialNets();
|
setupSpecialNets();
|
||||||
setupPreRouteds ();
|
setupPreRouteds ();
|
||||||
setupNetDatas();
|
setupNetDatas();
|
||||||
Session::close();
|
|
||||||
|
|
||||||
|
openSession();
|
||||||
startMeasures();
|
startMeasures();
|
||||||
|
|
||||||
cmess1 << " o Running global routing..." << endl;
|
cmess1 << " o Running global routing..." << endl;
|
||||||
|
|
||||||
float edgeHInc = getConfiguration()->getEdgeHInc();
|
float edgeHInc = getConfiguration()->getEdgeHInc();
|
||||||
|
|
||||||
Session::open( this );
|
|
||||||
Dijkstra* dijkstra = new Dijkstra ( this );
|
Dijkstra* dijkstra = new Dijkstra ( this );
|
||||||
dijkstra->setDistance( DigitalDistance( getConfiguration()->getEdgeCostH()
|
dijkstra->setDistance( DigitalDistance( getConfiguration()->getEdgeCostH()
|
||||||
, getConfiguration()->getEdgeCostK() ) );
|
, getConfiguration()->getEdgeCostK() ) );
|
||||||
|
|
|
@ -377,7 +377,7 @@ namespace Anabatic {
|
||||||
void AnabaticEngine::_balanceGlobalDensity ( unsigned int depth )
|
void AnabaticEngine::_balanceGlobalDensity ( unsigned int depth )
|
||||||
{
|
{
|
||||||
startMeasures();
|
startMeasures();
|
||||||
Session::open( this );
|
openSession();
|
||||||
|
|
||||||
cmess1 << " o Balance Global Density "
|
cmess1 << " o Balance Global Density "
|
||||||
<< Session::getRoutingGauge()->getRoutingLayer(depth)->getName() << endl;
|
<< Session::getRoutingGauge()->getRoutingLayer(depth)->getName() << endl;
|
||||||
|
@ -435,7 +435,7 @@ namespace Anabatic {
|
||||||
set<Net*> globalNets;
|
set<Net*> globalNets;
|
||||||
GCell::Set invalidateds;
|
GCell::Set invalidateds;
|
||||||
|
|
||||||
Session::open( this );
|
openSession();
|
||||||
|
|
||||||
vector<AutoSegment*> segments;
|
vector<AutoSegment*> segments;
|
||||||
|
|
||||||
|
@ -482,7 +482,7 @@ namespace Anabatic {
|
||||||
unsigned long global = 0;
|
unsigned long global = 0;
|
||||||
|
|
||||||
startMeasures();
|
startMeasures();
|
||||||
Session::open( this );
|
openSession();
|
||||||
|
|
||||||
if (Session::getAllowedDepth() >= 3) {
|
if (Session::getAllowedDepth() >= 3) {
|
||||||
switch ( method ) {
|
switch ( method ) {
|
||||||
|
|
|
@ -2096,7 +2096,10 @@ namespace {
|
||||||
|
|
||||||
void GCellTopology::_doChannel ()
|
void GCellTopology::_doChannel ()
|
||||||
{
|
{
|
||||||
throw Error( "GCellTopology::_doChannel() Unimplemented, blame goes to E. Lao." );
|
throw Error( "GCellTopology::_doChannel() Unimplemented, blame goes to E. Lao.\n"
|
||||||
|
" On: %s."
|
||||||
|
, getString(_gcell).c_str()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2134,7 +2137,7 @@ namespace Anabatic {
|
||||||
//cmess1 << Dots::asDouble(" - Saturation",getMeasure<double>(getCell(),"Sat.")->getData()) << endl;
|
//cmess1 << Dots::asDouble(" - Saturation",getMeasure<double>(getCell(),"Sat.")->getData()) << endl;
|
||||||
|
|
||||||
startMeasures();
|
startMeasures();
|
||||||
Session::open( this );
|
openSession();
|
||||||
|
|
||||||
forEach ( Net*, inet, getCell()->getNets() ) {
|
forEach ( Net*, inet, getCell()->getNets() ) {
|
||||||
if (NetRoutingExtension::isAutomaticGlobalRoute(*inet)) {
|
if (NetRoutingExtension::isAutomaticGlobalRoute(*inet)) {
|
||||||
|
|
|
@ -63,40 +63,42 @@ namespace {
|
||||||
{
|
{
|
||||||
cdebug_log(145,1) << "propagateConstraintFromRp() - " << rp << endl;
|
cdebug_log(145,1) << "propagateConstraintFromRp() - " << rp << endl;
|
||||||
|
|
||||||
forEach ( Component*, icomponent, rp->getSlaveComponents() ) {
|
for ( Component* component : rp->getSlaveComponents() ) {
|
||||||
cdebug_log(145,0) << "slave component: " << *icomponent << endl;
|
cdebug_log(145,0) << "slave component: " << component << endl;
|
||||||
AutoContact* sourceContact = Session::lookup( dynamic_cast<Contact*>(*icomponent) );
|
AutoContact* sourceContact = Session::lookup( dynamic_cast<Contact*>(component) );
|
||||||
if (sourceContact) {
|
if (sourceContact) {
|
||||||
cdebug_log(145,0) << "Start slave: " << sourceContact << endl;
|
cdebug_log(145,0) << "Start slave: " << sourceContact << endl;
|
||||||
|
|
||||||
set<AutoSegment*> verticalSegments;
|
set<AutoSegment*> verticalSegments;
|
||||||
set<AutoSegment*> horizontalSegments;
|
set<AutoSegment*> horizontalSegments;
|
||||||
|
|
||||||
forEach ( AutoSegment*, isegment, sourceContact->getAutoSegments() ) {
|
for ( AutoSegment* segment : sourceContact->getAutoSegments() ) {
|
||||||
cdebug_log(145,0) << "Examining: " << (*isegment) << endl;
|
cdebug_log(145,0) << "Examining: " << segment << endl;
|
||||||
AutoContact* targetContact = isegment->getOppositeAnchor(sourceContact);
|
AutoContact* targetContact = segment->getOppositeAnchor(sourceContact);
|
||||||
|
|
||||||
if (targetContact) {
|
if (targetContact) {
|
||||||
if (isegment->isHorizontal()) {
|
if (segment->isHorizontal()) {
|
||||||
cdebug_log(145,0) << "On horizontal stack " << (*isegment) << endl;
|
cdebug_log(145,0) << "On horizontal stack " << segment << endl;
|
||||||
horizontalSegments.insert( (*isegment) );
|
horizontalSegments.insert( segment );
|
||||||
} else {
|
} else {
|
||||||
cdebug_log(145,0) << "On vertical stack " << (*isegment) << endl;
|
cdebug_log(145,0) << "On vertical stack " << segment << endl;
|
||||||
verticalSegments.insert( (*isegment) );
|
verticalSegments.insert( segment );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Box constraintBox = sourceContact->getConstraintBox();
|
Box constraintBox = sourceContact->getConstraintBox();
|
||||||
|
cdebug_log(145,0) << "Contraint: " << constraintBox << endl;
|
||||||
|
|
||||||
// Propagate constraint through horizontally aligned segments.
|
// Propagate constraint through horizontally aligned segments.
|
||||||
cdebug_log(145,0) << "Propagate constraint on horizontal segments" << endl;
|
cdebug_log(145,0) << "Propagate constraint on horizontal segments" << endl;
|
||||||
|
|
||||||
set<AutoSegment*>::iterator ihorizontal = horizontalSegments.begin();
|
for ( AutoSegment* horizontal : horizontalSegments ) {
|
||||||
for ( ; ihorizontal != horizontalSegments.end() ; ++ihorizontal ) {
|
|
||||||
AutoContact* contact = NULL;
|
AutoContact* contact = NULL;
|
||||||
forEach ( AutoSegment*, ialigned, (*ihorizontal)->getAligneds() ) {
|
for ( AutoSegment* aligned : horizontal->getAligneds(Flags::WithSelf) ) {
|
||||||
contact = ialigned->getAutoTarget();
|
cdebug_log(145,0) << "aligned horizontal: " << aligned << endl;
|
||||||
|
|
||||||
|
contact = aligned->getAutoTarget();
|
||||||
cdebug_log(145,0) << "contact: " << contact << endl;
|
cdebug_log(145,0) << "contact: " << contact << endl;
|
||||||
if (contact) {
|
if (contact) {
|
||||||
cdebug_log(145,0) << "Apply to (target): " << contact << endl;
|
cdebug_log(145,0) << "Apply to (target): " << contact << endl;
|
||||||
|
@ -104,7 +106,7 @@ namespace {
|
||||||
, constraintBox.getYMax()
|
, constraintBox.getYMax()
|
||||||
, Flags::Horizontal|Flags::WarnOnError );
|
, Flags::Horizontal|Flags::WarnOnError );
|
||||||
}
|
}
|
||||||
contact = ialigned->getAutoSource();
|
contact = aligned->getAutoSource();
|
||||||
cdebug_log(145,0) << "contact: " << contact << endl;
|
cdebug_log(145,0) << "contact: " << contact << endl;
|
||||||
if (contact) {
|
if (contact) {
|
||||||
cdebug_log(145,0) << "Apply to (source): " << contact << endl;
|
cdebug_log(145,0) << "Apply to (source): " << contact << endl;
|
||||||
|
@ -118,18 +120,19 @@ namespace {
|
||||||
// Propagate constraint through vertically aligned segments.
|
// Propagate constraint through vertically aligned segments.
|
||||||
cdebug_log(145,0) << "Propagate constraint on vertical segments" << endl;
|
cdebug_log(145,0) << "Propagate constraint on vertical segments" << endl;
|
||||||
|
|
||||||
set<AutoSegment*>::iterator ivertical = verticalSegments.begin();
|
for ( AutoSegment* vertical : verticalSegments ) {
|
||||||
for ( ; ivertical != verticalSegments.end() ; ++ivertical ) {
|
|
||||||
AutoContact* contact = NULL;
|
AutoContact* contact = NULL;
|
||||||
forEach ( AutoSegment*, ialigned, (*ivertical)->getAligneds() ) {
|
for ( AutoSegment* aligned : vertical->getAligneds(Flags::WithSelf) ) {
|
||||||
contact = ialigned->getAutoTarget();
|
cdebug_log(145,0) << "aligned vertical: " << aligned << endl;
|
||||||
|
|
||||||
|
contact = aligned->getAutoTarget();
|
||||||
if (contact) {
|
if (contact) {
|
||||||
cdebug_log(145,0) << "Apply to (target): " << contact << endl;
|
cdebug_log(145,0) << "Apply to (target): " << contact << endl;
|
||||||
contact->restrictConstraintBox( constraintBox.getXMin()
|
contact->restrictConstraintBox( constraintBox.getXMin()
|
||||||
, constraintBox.getXMax()
|
, constraintBox.getXMax()
|
||||||
, Flags::Vertical|Flags::WarnOnError );
|
, Flags::Vertical|Flags::WarnOnError );
|
||||||
}
|
}
|
||||||
contact = ialigned->getAutoSource();
|
contact = aligned->getAutoSource();
|
||||||
if (contact) {
|
if (contact) {
|
||||||
cdebug_log(145,0) << "Apply to (source): " << contact << endl;
|
cdebug_log(145,0) << "Apply to (source): " << contact << endl;
|
||||||
contact->restrictConstraintBox( constraintBox.getXMin()
|
contact->restrictConstraintBox( constraintBox.getXMin()
|
||||||
|
|
|
@ -70,6 +70,8 @@ namespace Anabatic {
|
||||||
{
|
{
|
||||||
cmess1 << " o Looking for fixed or manually global routed nets." << endl;
|
cmess1 << " o Looking for fixed or manually global routed nets." << endl;
|
||||||
|
|
||||||
|
openSession();
|
||||||
|
|
||||||
for ( Net* net : getCell()->getNets() ) {
|
for ( Net* net : getCell()->getNets() ) {
|
||||||
if (net == _blockageNet) continue;
|
if (net == _blockageNet) continue;
|
||||||
if (net->getType() == Net::Type::POWER ) continue;
|
if (net->getType() == Net::Type::POWER ) continue;
|
||||||
|
@ -170,7 +172,7 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Session::revalidate();
|
Session::close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
|
||||||
const char* reopenSession = "Session::open(): Session already open for %s (internal error).";
|
const char* reopenSession = "Anabatic::Session::_open(): Session already open for %s (internal error).";
|
||||||
const char* openSessionError = "%s: Session has not been opened (internal error).";
|
const char* openSessionError = "%s: Session has not been opened (internal error).";
|
||||||
|
|
||||||
|
|
||||||
|
@ -96,7 +96,6 @@ namespace Anabatic {
|
||||||
{
|
{
|
||||||
if (_anabatic->getState() <= EngineActive) {
|
if (_anabatic->getState() <= EngineActive) {
|
||||||
_revalidate ();
|
_revalidate ();
|
||||||
|
|
||||||
_anabatic->updateDensity();
|
_anabatic->updateDensity();
|
||||||
}
|
}
|
||||||
UpdateSession::close();
|
UpdateSession::close();
|
||||||
|
@ -266,9 +265,9 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Session* Session::open ( AnabaticEngine* anbt )
|
Session* Session::_open ( AnabaticEngine* anbt )
|
||||||
{
|
{
|
||||||
cdebug_log(145,0) << "Session::open()" << endl;
|
cdebug_log(145,0) << "Anabatic::Session::_open()" << endl;
|
||||||
|
|
||||||
if (_session) {
|
if (_session) {
|
||||||
if (_session->_anabatic != anbt)
|
if (_session->_anabatic != anbt)
|
||||||
|
|
|
@ -107,6 +107,7 @@ namespace Anabatic {
|
||||||
NetData ( Net* );
|
NetData ( Net* );
|
||||||
inline bool isGlobalRouted () const;
|
inline bool isGlobalRouted () const;
|
||||||
inline bool isMixedPreRoute () const;
|
inline bool isMixedPreRoute () const;
|
||||||
|
inline bool isFixed () const;
|
||||||
inline Net* getNet () const;
|
inline Net* getNet () const;
|
||||||
inline NetRoutingState* getNetRoutingState () const;
|
inline NetRoutingState* getNetRoutingState () const;
|
||||||
inline const Box& getSearchArea () const;
|
inline const Box& getSearchArea () const;
|
||||||
|
@ -133,6 +134,7 @@ namespace Anabatic {
|
||||||
|
|
||||||
inline bool NetData::isGlobalRouted () const { return _flags & Flags::GlobalRouted; }
|
inline bool NetData::isGlobalRouted () const { return _flags & Flags::GlobalRouted; }
|
||||||
inline bool NetData::isMixedPreRoute () const { return (_state) ? _state->isMixedPreRoute() : false; }
|
inline bool NetData::isMixedPreRoute () const { return (_state) ? _state->isMixedPreRoute() : false; }
|
||||||
|
inline bool NetData::isFixed () const { return (_state) ? _state->isFixed () : false; }
|
||||||
inline Net* NetData::getNet () const { return _net; }
|
inline Net* NetData::getNet () const { return _net; }
|
||||||
inline NetRoutingState* NetData::getNetRoutingState () const { return _state; }
|
inline NetRoutingState* NetData::getNetRoutingState () const { return _state; }
|
||||||
inline const Box& NetData::getSearchArea () const { return _searchArea; }
|
inline const Box& NetData::getSearchArea () const { return _searchArea; }
|
||||||
|
@ -195,8 +197,10 @@ namespace Anabatic {
|
||||||
inline GCell* getGCellUnder ( DbU::Unit x, DbU::Unit y ) const;
|
inline GCell* getGCellUnder ( DbU::Unit x, DbU::Unit y ) const;
|
||||||
inline GCell* getGCellUnder ( Point ) const;
|
inline GCell* getGCellUnder ( Point ) const;
|
||||||
inline GCellsUnder getGCellsUnder ( Segment* ) const;
|
inline GCellsUnder getGCellsUnder ( Segment* ) const;
|
||||||
|
Interval getUSide ( Flags direction ) const;
|
||||||
int getCapacity ( Interval, Flags ) const;
|
int getCapacity ( Interval, Flags ) const;
|
||||||
size_t getNetsFromEdge ( const Edge*, NetSet& );
|
size_t getNetsFromEdge ( const Edge*, NetSet& );
|
||||||
|
virtual void openSession ();
|
||||||
inline void setState ( EngineState state );
|
inline void setState ( EngineState state );
|
||||||
inline void setDensityMode ( unsigned int );
|
inline void setDensityMode ( unsigned int );
|
||||||
inline void addOv ( Edge* );
|
inline void addOv ( Edge* );
|
||||||
|
@ -225,11 +229,14 @@ namespace Anabatic {
|
||||||
inline size_t getSaturateRp () const;
|
inline size_t getSaturateRp () const;
|
||||||
inline DbU::Unit getExtensionCap () const;
|
inline DbU::Unit getExtensionCap () const;
|
||||||
inline Net* getBlockageNet () const;
|
inline Net* getBlockageNet () const;
|
||||||
|
inline const ChipTools& getChipTools () const;
|
||||||
|
inline const vector<NetData*>& getNetOrdering () const;
|
||||||
void updateDensity ();
|
void updateDensity ();
|
||||||
size_t checkGCellDensities ();
|
size_t checkGCellDensities ();
|
||||||
inline void setGlobalThreshold ( DbU::Unit );
|
inline void setGlobalThreshold ( DbU::Unit );
|
||||||
inline void setSaturateRatio ( float );
|
inline void setSaturateRatio ( float );
|
||||||
inline void setSaturateRp ( size_t );
|
inline void setSaturateRp ( size_t );
|
||||||
|
inline void setBlockageNet ( Net* );
|
||||||
void chipPrep ();
|
void chipPrep ();
|
||||||
void setupSpecialNets ();
|
void setupSpecialNets ();
|
||||||
void setupPreRouteds ();
|
void setupPreRouteds ();
|
||||||
|
@ -261,10 +268,13 @@ namespace Anabatic {
|
||||||
void _saveNet ( Net* );
|
void _saveNet ( Net* );
|
||||||
void _destroyAutoContacts ();
|
void _destroyAutoContacts ();
|
||||||
void _destroyAutoSegments ();
|
void _destroyAutoSegments ();
|
||||||
|
void _check ( Net* net ) const;
|
||||||
|
bool _check ( const char* message ) const;
|
||||||
// Misc. functions.
|
// Misc. functions.
|
||||||
inline const Flags& flags () const;
|
inline const Flags& flags () const;
|
||||||
inline Flags& flags ();
|
inline Flags& flags ();
|
||||||
void reset ();
|
void reset ();
|
||||||
|
inline const Timer& getTimer () const;
|
||||||
void startMeasures ();
|
void startMeasures ();
|
||||||
void stopMeasures ();
|
void stopMeasures ();
|
||||||
void printMeasures ( const string& ) const;
|
void printMeasures ( const string& ) const;
|
||||||
|
@ -319,6 +329,7 @@ namespace Anabatic {
|
||||||
inline GCellsUnder AnabaticEngine::getGCellsUnder ( Segment* s ) const { return std::shared_ptr<RawGCellsUnder>( new RawGCellsUnder(this,s) ); }
|
inline GCellsUnder AnabaticEngine::getGCellsUnder ( Segment* s ) const { return std::shared_ptr<RawGCellsUnder>( new RawGCellsUnder(this,s) ); }
|
||||||
inline unsigned int AnabaticEngine::getDensityMode () const { return _densityMode; }
|
inline unsigned int AnabaticEngine::getDensityMode () const { return _densityMode; }
|
||||||
inline void AnabaticEngine::setDensityMode ( unsigned int mode ) { _densityMode=mode; }
|
inline void AnabaticEngine::setDensityMode ( unsigned int mode ) { _densityMode=mode; }
|
||||||
|
inline void AnabaticEngine::setBlockageNet ( Net* net ) { _blockageNet = net; }
|
||||||
inline const AutoContactLut& AnabaticEngine::_getAutoContactLut () const { return _autoContactLut; }
|
inline const AutoContactLut& AnabaticEngine::_getAutoContactLut () const { return _autoContactLut; }
|
||||||
inline const AutoSegmentLut& AnabaticEngine::_getAutoSegmentLut () const { return _autoSegmentLut; }
|
inline const AutoSegmentLut& AnabaticEngine::_getAutoSegmentLut () const { return _autoSegmentLut; }
|
||||||
inline const Flags& AnabaticEngine::flags () const { return _flags; }
|
inline const Flags& AnabaticEngine::flags () const { return _flags; }
|
||||||
|
@ -335,6 +346,8 @@ namespace Anabatic {
|
||||||
inline void AnabaticEngine::setSaturateRatio ( float ratio ) { _configuration->setSaturateRatio(ratio); }
|
inline void AnabaticEngine::setSaturateRatio ( float ratio ) { _configuration->setSaturateRatio(ratio); }
|
||||||
inline void AnabaticEngine::setSaturateRp ( size_t threshold ) { _configuration->setSaturateRp(threshold); }
|
inline void AnabaticEngine::setSaturateRp ( size_t threshold ) { _configuration->setSaturateRp(threshold); }
|
||||||
inline Net* AnabaticEngine::getBlockageNet () const { return _blockageNet; }
|
inline Net* AnabaticEngine::getBlockageNet () const { return _blockageNet; }
|
||||||
|
inline const ChipTools& AnabaticEngine::getChipTools () const { return _chipTools; }
|
||||||
|
inline const vector<NetData*>& AnabaticEngine::getNetOrdering () const { return _netOrdering; }
|
||||||
inline void AnabaticEngine::setGlobalThreshold ( DbU::Unit threshold ) { _configuration->setGlobalThreshold(threshold); }
|
inline void AnabaticEngine::setGlobalThreshold ( DbU::Unit threshold ) { _configuration->setGlobalThreshold(threshold); }
|
||||||
inline const NetDatas& AnabaticEngine::getNetDatas () const { return _netDatas; }
|
inline const NetDatas& AnabaticEngine::getNetDatas () const { return _netDatas; }
|
||||||
inline void AnabaticEngine::_updateLookup ( GCell* gcell ) { _matrix.updateLookup(gcell); }
|
inline void AnabaticEngine::_updateLookup ( GCell* gcell ) { _matrix.updateLookup(gcell); }
|
||||||
|
@ -356,8 +369,9 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int AnabaticEngine::getStamp () const { return _stamp; }
|
inline const Timer& AnabaticEngine::getTimer () const { return _timer; }
|
||||||
inline int AnabaticEngine::incStamp () { return ++_stamp; }
|
inline int AnabaticEngine::getStamp () const { return _stamp; }
|
||||||
|
inline int AnabaticEngine::incStamp () { return ++_stamp; }
|
||||||
|
|
||||||
inline void AnabaticEngine::addOv ( Edge* edge ) { _ovEdges.push_back(edge); }
|
inline void AnabaticEngine::addOv ( Edge* edge ) { _ovEdges.push_back(edge); }
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ namespace Anabatic {
|
||||||
virtual bool getConstraints ( DbU::Unit& min , DbU::Unit& max ) const;
|
virtual bool getConstraints ( DbU::Unit& min , DbU::Unit& max ) const;
|
||||||
virtual Interval getSourceConstraints ( unsigned int flags=0 ) const;
|
virtual Interval getSourceConstraints ( unsigned int flags=0 ) const;
|
||||||
virtual Interval getTargetConstraints ( unsigned int flags=0 ) const;
|
virtual Interval getTargetConstraints ( unsigned int flags=0 ) const;
|
||||||
virtual unsigned int getDirection () const;
|
virtual Flags getDirection () const;
|
||||||
virtual size_t getGCells ( vector<GCell*>& ) const;
|
virtual size_t getGCells ( vector<GCell*>& ) const;
|
||||||
// Modifiers.
|
// Modifiers.
|
||||||
virtual void setDuSource ( DbU::Unit );
|
virtual void setDuSource ( DbU::Unit );
|
||||||
|
|
|
@ -215,7 +215,7 @@ namespace Anabatic {
|
||||||
// Accessors.
|
// Accessors.
|
||||||
inline unsigned long getId () const;
|
inline unsigned long getId () const;
|
||||||
inline unsigned int getFlags () const;
|
inline unsigned int getFlags () const;
|
||||||
virtual unsigned int getDirection () const = 0;
|
virtual Flags getDirection () const = 0;
|
||||||
inline GCell* getGCell () const;
|
inline GCell* getGCell () const;
|
||||||
virtual size_t getGCells ( vector<GCell*>& ) const = 0;
|
virtual size_t getGCells ( vector<GCell*>& ) const = 0;
|
||||||
inline AutoContact* getAutoSource () const;
|
inline AutoContact* getAutoSource () const;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
|
@ -49,7 +48,7 @@ namespace Anabatic {
|
||||||
virtual bool getConstraints ( DbU::Unit& min, DbU::Unit& max ) const;
|
virtual bool getConstraints ( DbU::Unit& min, DbU::Unit& max ) const;
|
||||||
virtual Interval getSourceConstraints ( unsigned int flags=0 ) const;
|
virtual Interval getSourceConstraints ( unsigned int flags=0 ) const;
|
||||||
virtual Interval getTargetConstraints ( unsigned int flags=0 ) const;
|
virtual Interval getTargetConstraints ( unsigned int flags=0 ) const;
|
||||||
virtual unsigned int getDirection () const;
|
virtual Flags getDirection () const;
|
||||||
virtual size_t getGCells ( vector<GCell*>& ) const;
|
virtual size_t getGCells ( vector<GCell*>& ) const;
|
||||||
// Modifiers.
|
// Modifiers.
|
||||||
virtual void setDuSource ( DbU::Unit );
|
virtual void setDuSource ( DbU::Unit );
|
||||||
|
|
|
@ -50,121 +50,57 @@ namespace Anabatic {
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
// Class : "Anabatic::Configuration" (decorator).
|
// Class : "Anabatic::Configuration".
|
||||||
|
|
||||||
class Configuration {
|
class Configuration {
|
||||||
public:
|
public:
|
||||||
// Constructor & Destructor.
|
// Constructor & Destructor.
|
||||||
virtual ~Configuration ();
|
Configuration ( const CellGauge* cg=NULL, const RoutingGauge* rg=NULL );
|
||||||
virtual Configuration* clone () const = 0;
|
|
||||||
// Methods.
|
|
||||||
virtual bool isGMetal ( const Layer* ) const = 0;
|
|
||||||
virtual bool isGContact ( const Layer* ) const = 0;
|
|
||||||
virtual const Layer* getGContactLayer () const = 0;
|
|
||||||
virtual const Layer* getGHorizontalLayer () const = 0;
|
|
||||||
virtual const Layer* getGVerticalLayer () const = 0;
|
|
||||||
virtual size_t getDepth () const = 0;
|
|
||||||
virtual size_t getAllowedDepth () const = 0;
|
|
||||||
virtual size_t getLayerDepth ( const Layer* ) const = 0;
|
|
||||||
virtual CellGauge* getCellGauge () const = 0;
|
|
||||||
virtual RoutingGauge* getRoutingGauge () const = 0;
|
|
||||||
virtual RoutingLayerGauge* getLayerGauge ( size_t depth ) const = 0;
|
|
||||||
virtual const Layer* getRoutingLayer ( size_t depth ) const = 0;
|
|
||||||
virtual Layer* getContactLayer ( size_t depth ) const = 0;
|
|
||||||
virtual DbU::Unit getSliceHeight () const = 0;
|
|
||||||
virtual DbU::Unit getSliceStep () const = 0;
|
|
||||||
virtual DbU::Unit getPitch ( size_t depth, Flags flags ) const = 0;
|
|
||||||
virtual DbU::Unit getOffset ( size_t depth ) const = 0;
|
|
||||||
virtual DbU::Unit getWireWidth ( size_t depth ) const = 0;
|
|
||||||
virtual DbU::Unit getExtensionCap ( size_t depth ) const = 0;
|
|
||||||
virtual Flags getDirection ( size_t depth ) const = 0;
|
|
||||||
virtual DbU::Unit getPitch ( const Layer*, Flags flags ) const = 0;
|
|
||||||
virtual DbU::Unit getOffset ( const Layer* ) const = 0;
|
|
||||||
virtual DbU::Unit getWireWidth ( const Layer* ) const = 0;
|
|
||||||
virtual DbU::Unit getExtensionCap ( const Layer* ) const = 0;
|
|
||||||
virtual Flags getDirection ( const Layer* ) const = 0;
|
|
||||||
virtual float getSaturateRatio () const = 0;
|
|
||||||
virtual size_t getSaturateRp () const = 0;
|
|
||||||
virtual DbU::Unit getGlobalThreshold () const = 0;
|
|
||||||
virtual void setAllowedDepth ( size_t ) = 0;
|
|
||||||
virtual void setSaturateRatio ( float ) = 0;
|
|
||||||
virtual void setSaturateRp ( size_t ) = 0;
|
|
||||||
virtual void setGlobalThreshold ( DbU::Unit ) = 0;
|
|
||||||
virtual DbU::Unit getEdgeLength () const = 0;
|
|
||||||
virtual DbU::Unit getEdgeWidth () const = 0;
|
|
||||||
virtual float getEdgeCostH () const = 0;
|
|
||||||
virtual float getEdgeCostK () const = 0;
|
|
||||||
virtual float getEdgeHInc () const = 0;
|
|
||||||
virtual size_t getHEdgeLocal () const = 0;
|
|
||||||
virtual size_t getVEdgeLocal () const = 0;
|
|
||||||
virtual void print ( Cell* ) const = 0;
|
|
||||||
virtual Record* _getRecord () const = 0;
|
|
||||||
virtual string _getString () const = 0;
|
|
||||||
virtual string _getTypeName () const = 0;
|
|
||||||
protected:
|
|
||||||
Configuration ();
|
|
||||||
private:
|
|
||||||
Configuration ( const Configuration& );
|
Configuration ( const Configuration& );
|
||||||
Configuration& operator= ( const Configuration& );
|
virtual ~Configuration ();
|
||||||
private:
|
virtual Configuration* clone () const;
|
||||||
static Configuration* _default;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
|
||||||
// Class : "Anabatic::ConfigurationConcrete".
|
|
||||||
|
|
||||||
class ConfigurationConcrete : public Configuration {
|
|
||||||
friend class Configuration;
|
|
||||||
public:
|
|
||||||
// Constructor & Destructor.
|
|
||||||
ConfigurationConcrete ( const CellGauge* cg=NULL, const RoutingGauge* rg=NULL );
|
|
||||||
virtual ~ConfigurationConcrete ();
|
|
||||||
virtual ConfigurationConcrete* clone () const;
|
|
||||||
// Methods.
|
// Methods.
|
||||||
virtual bool isGMetal ( const Layer* ) const;
|
bool isGMetal ( const Layer* ) const;
|
||||||
virtual bool isGContact ( const Layer* ) const;
|
bool isGContact ( const Layer* ) const;
|
||||||
virtual const Layer* getGContactLayer () const;
|
const Layer* getGContactLayer () const;
|
||||||
virtual const Layer* getGHorizontalLayer () const;
|
const Layer* getGHorizontalLayer () const;
|
||||||
virtual const Layer* getGVerticalLayer () const;
|
const Layer* getGVerticalLayer () const;
|
||||||
virtual size_t getDepth () const;
|
size_t getDepth () const;
|
||||||
virtual size_t getAllowedDepth () const;
|
size_t getAllowedDepth () const;
|
||||||
virtual size_t getLayerDepth ( const Layer* ) const;
|
size_t getLayerDepth ( const Layer* ) const;
|
||||||
virtual CellGauge* getCellGauge () const;
|
CellGauge* getCellGauge () const;
|
||||||
virtual RoutingGauge* getRoutingGauge () const;
|
RoutingGauge* getRoutingGauge () const;
|
||||||
virtual RoutingLayerGauge* getLayerGauge ( size_t depth ) const;
|
RoutingLayerGauge* getLayerGauge ( size_t depth ) const;
|
||||||
virtual const Layer* getRoutingLayer ( size_t depth ) const;
|
const Layer* getRoutingLayer ( size_t depth ) const;
|
||||||
virtual Layer* getContactLayer ( size_t depth ) const;
|
Layer* getContactLayer ( size_t depth ) const;
|
||||||
virtual DbU::Unit getSliceHeight () const;
|
DbU::Unit getSliceHeight () const;
|
||||||
virtual DbU::Unit getSliceStep () const;
|
DbU::Unit getSliceStep () const;
|
||||||
virtual DbU::Unit getPitch ( size_t depth, Flags flags ) const;
|
DbU::Unit getPitch ( size_t depth, Flags flags ) const;
|
||||||
virtual DbU::Unit getOffset ( size_t depth ) const;
|
DbU::Unit getOffset ( size_t depth ) const;
|
||||||
virtual DbU::Unit getWireWidth ( size_t depth ) const;
|
DbU::Unit getWireWidth ( size_t depth ) const;
|
||||||
virtual DbU::Unit getExtensionCap ( size_t depth ) const;
|
DbU::Unit getExtensionCap ( size_t depth ) const;
|
||||||
virtual Flags getDirection ( size_t depth ) const;
|
Flags getDirection ( size_t depth ) const;
|
||||||
virtual DbU::Unit getPitch ( const Layer*, Flags flags ) const;
|
DbU::Unit getPitch ( const Layer*, Flags flags ) const;
|
||||||
virtual DbU::Unit getOffset ( const Layer* ) const;
|
DbU::Unit getOffset ( const Layer* ) const;
|
||||||
virtual DbU::Unit getWireWidth ( const Layer* ) const;
|
DbU::Unit getWireWidth ( const Layer* ) const;
|
||||||
virtual DbU::Unit getExtensionCap ( const Layer* ) const;
|
DbU::Unit getExtensionCap ( const Layer* ) const;
|
||||||
virtual Flags getDirection ( const Layer* ) const;
|
Flags getDirection ( const Layer* ) const;
|
||||||
virtual float getSaturateRatio () const;
|
float getSaturateRatio () const;
|
||||||
virtual size_t getSaturateRp () const;
|
size_t getSaturateRp () const;
|
||||||
virtual DbU::Unit getGlobalThreshold () const;
|
DbU::Unit getGlobalThreshold () const;
|
||||||
virtual void setAllowedDepth ( size_t );
|
void setAllowedDepth ( size_t );
|
||||||
virtual void setSaturateRatio ( float );
|
void setSaturateRatio ( float );
|
||||||
virtual void setSaturateRp ( size_t );
|
void setSaturateRp ( size_t );
|
||||||
virtual void setGlobalThreshold ( DbU::Unit );
|
void setGlobalThreshold ( DbU::Unit );
|
||||||
virtual DbU::Unit getEdgeLength () const;
|
DbU::Unit getEdgeLength () const;
|
||||||
virtual DbU::Unit getEdgeWidth () const;
|
DbU::Unit getEdgeWidth () const;
|
||||||
virtual float getEdgeCostH () const;
|
float getEdgeCostH () const;
|
||||||
virtual float getEdgeCostK () const;
|
float getEdgeCostK () const;
|
||||||
virtual float getEdgeHInc () const;
|
float getEdgeHInc () const;
|
||||||
virtual size_t getHEdgeLocal () const;
|
virtual void print ( Cell* ) const;
|
||||||
virtual size_t getVEdgeLocal () const;
|
virtual Record* _getRecord () const;
|
||||||
virtual void print ( Cell* ) const;
|
virtual string _getString () const;
|
||||||
virtual Record* _getRecord () const;
|
virtual string _getTypeName () const;
|
||||||
virtual string _getString () const;
|
|
||||||
virtual string _getTypeName () const;
|
|
||||||
protected:
|
protected:
|
||||||
// Attributes.
|
// Attributes.
|
||||||
const Layer* _gmetalh;
|
const Layer* _gmetalh;
|
||||||
|
@ -182,12 +118,9 @@ namespace Anabatic {
|
||||||
float _edgeCostH;
|
float _edgeCostH;
|
||||||
float _edgeCostK;
|
float _edgeCostK;
|
||||||
float _edgeHInc;
|
float _edgeHInc;
|
||||||
size_t _hEdgeLocal;
|
|
||||||
size_t _vEdgeLocal;
|
|
||||||
private:
|
private:
|
||||||
ConfigurationConcrete ( const ConfigurationConcrete& );
|
Configuration& operator= ( const Configuration& ) = delete;
|
||||||
ConfigurationConcrete& operator= ( const ConfigurationConcrete& );
|
void _setTopRoutingLayer ( Name name );
|
||||||
void _setTopRoutingLayer ( Name name );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -195,7 +128,5 @@ namespace Anabatic {
|
||||||
|
|
||||||
|
|
||||||
INSPECTOR_P_SUPPORT(Anabatic::Configuration);
|
INSPECTOR_P_SUPPORT(Anabatic::Configuration);
|
||||||
INSPECTOR_P_SUPPORT(Anabatic::ConfigurationConcrete);
|
|
||||||
|
|
||||||
|
|
||||||
#endif // ANABATIC_CONFIGURATION_H
|
#endif // ANABATIC_CONFIGURATION_H
|
||||||
|
|
|
@ -24,64 +24,65 @@ namespace Anabatic {
|
||||||
|
|
||||||
class Flags : public Hurricane::BaseFlags {
|
class Flags : public Hurricane::BaseFlags {
|
||||||
public:
|
public:
|
||||||
static const unsigned int NoFlags = 0;
|
static const unsigned int NoFlags ; // = 0;
|
||||||
// Flags used for both objects states & functions arguments.
|
// Flags used for both objects states & functions arguments.
|
||||||
static const unsigned int Horizontal = (1 << 0);
|
static const unsigned int Horizontal ; // = (1 << 0);
|
||||||
static const unsigned int Vertical = (1 << 1);
|
static const unsigned int Vertical ; // = (1 << 1);
|
||||||
static const unsigned int Source = (1 << 2);
|
static const unsigned int Source ; // = (1 << 2);
|
||||||
static const unsigned int Target = (1 << 3);
|
static const unsigned int Target ; // = (1 << 3);
|
||||||
static const unsigned int Invalidated = (1 << 4);
|
static const unsigned int Invalidated ; // = (1 << 4);
|
||||||
// Flags for GCell objects states only.
|
// Flags for GCell objects states only.
|
||||||
static const unsigned int DeviceGCell = (1 << 5);
|
static const unsigned int DeviceGCell ; // = (1 << 5);
|
||||||
static const unsigned int ChannelGCell = (1 << 6);
|
static const unsigned int ChannelGCell ; // = (1 << 6);
|
||||||
static const unsigned int StrutGCell = (1 << 7);
|
static const unsigned int StrutGCell ; // = (1 << 7);
|
||||||
static const unsigned int MatrixGCell = (1 << 8);
|
static const unsigned int MatrixGCell ; // = (1 << 8);
|
||||||
static const unsigned int IoPadGCell = (1 << 9);
|
static const unsigned int IoPadGCell ; // = (1 << 9);
|
||||||
static const unsigned int Saturated = (1 << 10);
|
static const unsigned int Saturated ; // = (1 << 10);
|
||||||
// Flags for Anabatic objects states only.
|
// Flags for Anabatic objects states only.
|
||||||
static const unsigned int DemoMode = (1 << 5);
|
static const unsigned int DemoMode ; // = (1 << 5);
|
||||||
static const unsigned int WarnOnGCellOverload = (1 << 6);
|
static const unsigned int WarnOnGCellOverload ; // = (1 << 6);
|
||||||
static const unsigned int DestroyGCell = (1 << 7);
|
static const unsigned int DestroyGCell ; // = (1 << 7);
|
||||||
static const unsigned int DestroyBaseContact = (1 << 8);
|
static const unsigned int DestroyBaseContact ; // = (1 << 8);
|
||||||
static const unsigned int DestroyBaseSegment = (1 << 9);
|
static const unsigned int DestroyBaseSegment ; // = (1 << 9);
|
||||||
// Flags for NetDatas objects states only.
|
// Flags for NetDatas objects states only.
|
||||||
static const unsigned int GlobalRouted = (1 << 5);
|
static const unsigned int GlobalRouted ; // = (1 << 5);
|
||||||
// Masks.
|
// Masks.
|
||||||
static const unsigned int WestSide = Horizontal|Target;
|
static const unsigned int WestSide ; // = Horizontal|Target;
|
||||||
static const unsigned int EastSide = Horizontal|Source;
|
static const unsigned int EastSide ; // = Horizontal|Source;
|
||||||
static const unsigned int SouthSide = Vertical |Target;
|
static const unsigned int SouthSide ; // = Vertical |Target;
|
||||||
static const unsigned int NorthSide = Vertical |Source;
|
static const unsigned int NorthSide ; // = Vertical |Source;
|
||||||
static const unsigned int AllSides = WestSide|EastSide|SouthSide|NorthSide ;
|
static const unsigned int AllSides ; // = WestSide|EastSide|SouthSide|NorthSide ;
|
||||||
static const unsigned int EndsMask = Source|Target;
|
static const unsigned int EndsMask ; // = Source|Target;
|
||||||
static const unsigned int DirectionMask = Horizontal|Vertical;
|
static const unsigned int DirectionMask ; // = Horizontal|Vertical;
|
||||||
static const unsigned int DestroyMask = DestroyGCell|DestroyBaseContact|DestroyBaseSegment;
|
static const unsigned int DestroyMask ; // = DestroyGCell|DestroyBaseContact|DestroyBaseSegment;
|
||||||
static const unsigned int GCellTypeMask = DeviceGCell|ChannelGCell|StrutGCell|MatrixGCell|IoPadGCell;
|
static const unsigned int GCellTypeMask ; // = DeviceGCell|ChannelGCell|StrutGCell|MatrixGCell|IoPadGCell;
|
||||||
// Flags for functions arguments only.
|
// Flags for functions arguments only.
|
||||||
static const unsigned int AboveLayer = (1 << 5);
|
static const unsigned int Create ; // = (1 << 5);
|
||||||
static const unsigned int BelowLayer = (1 << 6);
|
static const unsigned int WithPerpands ;
|
||||||
static const unsigned int OpenSession = (1 << 7);
|
static const unsigned int WithSelf ;
|
||||||
static const unsigned int Realignate = (1 << 8);
|
static const unsigned int AboveLayer ;
|
||||||
static const unsigned int NativeConstraints = (1 << 9);
|
static const unsigned int BelowLayer ;
|
||||||
static const unsigned int ForceMove = (1 << 10);
|
static const unsigned int OpenSession ;
|
||||||
static const unsigned int WithPerpands = (1 << 11);
|
static const unsigned int Realignate ;
|
||||||
static const unsigned int WarnOnError = (1 << 12);
|
static const unsigned int NativeConstraints ;
|
||||||
static const unsigned int Topology = (1 << 13);
|
static const unsigned int ForceMove ;
|
||||||
static const unsigned int GlobalSegment = (1 << 14);
|
static const unsigned int WarnOnError ;
|
||||||
static const unsigned int AllowTerminal = (1 << 15);
|
static const unsigned int Topology ;
|
||||||
static const unsigned int AllowLocal = (1 << 16);
|
static const unsigned int GlobalSegment ;
|
||||||
static const unsigned int IgnoreContacts = (1 << 17);
|
static const unsigned int AllowTerminal ;
|
||||||
static const unsigned int Propagate = (1 << 18);
|
static const unsigned int AllowLocal ;
|
||||||
static const unsigned int Superior = (1 << 19);
|
static const unsigned int IgnoreContacts ;
|
||||||
static const unsigned int DoglegOnLeft = (1 << 20);
|
static const unsigned int Propagate ;
|
||||||
static const unsigned int DoglegOnRight = (1 << 21);
|
static const unsigned int Superior ;
|
||||||
static const unsigned int WithNeighbors = (1 << 22);
|
static const unsigned int DoglegOnLeft ;
|
||||||
static const unsigned int NoCheckLayer = (1 << 23);
|
static const unsigned int DoglegOnRight ;
|
||||||
static const unsigned int HalfSlacken = (1 << 24);
|
static const unsigned int WithNeighbors ;
|
||||||
static const unsigned int NoGCellShrink = (1 << 25);
|
static const unsigned int NoCheckLayer ;
|
||||||
static const unsigned int CParanoid = (1 << 26);
|
static const unsigned int HalfSlacken ;
|
||||||
static const unsigned int Create = (1 << 27);
|
static const unsigned int NoGCellShrink ;
|
||||||
static const unsigned int CheckLowDensity = (1 << 28);
|
static const unsigned int CParanoid ;
|
||||||
static const unsigned int NoUpdate = (1 << 29);
|
static const unsigned int CheckLowDensity ;
|
||||||
|
static const unsigned int NoUpdate ;
|
||||||
public:
|
public:
|
||||||
inline Flags ( unsigned int flags = NoFlags );
|
inline Flags ( unsigned int flags = NoFlags );
|
||||||
inline Flags ( BaseFlags );
|
inline Flags ( BaseFlags );
|
||||||
|
@ -111,6 +112,13 @@ namespace Anabatic {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
inline Flags perpandicularTo ( Flags direction )
|
||||||
|
{
|
||||||
|
if (direction & Flags::Horizontal) return Flags::Vertical;
|
||||||
|
if (direction & Flags::Vertical ) return Flags::Horizontal;
|
||||||
|
return Flags::NoFlags;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} // Anabatic namespace.
|
} // Anabatic namespace.
|
||||||
|
|
||||||
|
|
|
@ -147,7 +147,7 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Vertex::~Vertex () { }
|
inline Vertex::~Vertex () { _gcell->setObserver( GCell::Observable::Vertex, NULL ); }
|
||||||
inline Contact* Vertex::hasGContact ( Net* net ) { return _gcell->hasGContact(net); }
|
inline Contact* Vertex::hasGContact ( Net* net ) { return _gcell->hasGContact(net); }
|
||||||
inline unsigned int Vertex::getId () const { return _id; }
|
inline unsigned int Vertex::getId () const { return _id; }
|
||||||
inline GCell* Vertex::getGCell () const { return _gcell; }
|
inline GCell* Vertex::getGCell () const { return _gcell; }
|
||||||
|
|
|
@ -164,6 +164,7 @@ namespace Anabatic {
|
||||||
GCell* getEast ( DbU::Unit y ) const;
|
GCell* getEast ( DbU::Unit y ) const;
|
||||||
GCell* getSouth ( DbU::Unit x ) const;
|
GCell* getSouth ( DbU::Unit x ) const;
|
||||||
GCell* getNorth ( DbU::Unit x ) const;
|
GCell* getNorth ( DbU::Unit x ) const;
|
||||||
|
GCell* getNeighborAt ( Flags side, DbU::Unit axis ) const;
|
||||||
GCell* getUnder ( DbU::Unit x, DbU::Unit y ) const;
|
GCell* getUnder ( DbU::Unit x, DbU::Unit y ) const;
|
||||||
inline GCell* getUnder ( Point p ) const;
|
inline GCell* getUnder ( Point p ) const;
|
||||||
GCell* hcut ( DbU::Unit y );
|
GCell* hcut ( DbU::Unit y );
|
||||||
|
@ -215,6 +216,7 @@ namespace Anabatic {
|
||||||
void updateContacts ();
|
void updateContacts ();
|
||||||
size_t updateDensity ();
|
size_t updateDensity ();
|
||||||
inline void updateKey ( size_t depth );
|
inline void updateKey ( size_t depth );
|
||||||
|
void truncDensities ();
|
||||||
bool stepBalance ( size_t depth, Set& invalidateds );
|
bool stepBalance ( size_t depth, Set& invalidateds );
|
||||||
void rpDesaturate ( set<Net*>& );
|
void rpDesaturate ( set<Net*>& );
|
||||||
bool stepDesaturate ( size_t depth
|
bool stepDesaturate ( size_t depth
|
||||||
|
@ -445,6 +447,8 @@ namespace Anabatic {
|
||||||
// Utilities.
|
// Utilities.
|
||||||
|
|
||||||
string getVectorString ( float*, size_t );
|
string getVectorString ( float*, size_t );
|
||||||
|
bool isLess ( const GCell* lhs, const GCell* rhs, Flags direction );
|
||||||
|
bool isGreater ( const GCell* lhs, const GCell* rhs, Flags direction );
|
||||||
|
|
||||||
|
|
||||||
} // Anabatic namespace.
|
} // Anabatic namespace.
|
||||||
|
|
|
@ -69,83 +69,83 @@ namespace Anabatic {
|
||||||
class Session {
|
class Session {
|
||||||
public:
|
public:
|
||||||
// Static Methods.
|
// Static Methods.
|
||||||
static inline bool doDestroyBaseContact ();
|
static inline bool doDestroyBaseContact ();
|
||||||
static inline bool doDestroyBaseSegment ();
|
static inline bool doDestroyBaseSegment ();
|
||||||
static inline bool doDestroyTool ();
|
static inline bool doDestroyTool ();
|
||||||
static bool isInDemoMode ();
|
static bool isInDemoMode ();
|
||||||
static bool doWarnGCellOverload ();
|
static bool doWarnGCellOverload ();
|
||||||
static Session* get ( const char* message=NULL );
|
static Session* get ( const char* message=NULL );
|
||||||
static inline Technology* getTechnology ();
|
static inline Technology* getTechnology ();
|
||||||
static inline AnabaticEngine* getAnabatic ();
|
static inline AnabaticEngine* getAnabatic ();
|
||||||
static inline const Configuration* getConfiguration ();
|
static inline const Configuration* getConfiguration ();
|
||||||
static float getSaturateRatio ();
|
static float getSaturateRatio ();
|
||||||
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 CellGauge* getCellGauge ();
|
||||||
static inline DbU::Unit getSliceHeight ();
|
static inline DbU::Unit getSliceHeight ();
|
||||||
static inline DbU::Unit getSliceStep ();
|
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 ();
|
||||||
static inline size_t getViaDepth ( const Layer* layer );
|
static inline size_t getViaDepth ( const Layer* layer );
|
||||||
static inline size_t getLayerDepth ( const Layer* layer );
|
static inline size_t getLayerDepth ( const Layer* layer );
|
||||||
static inline const Layer* getRoutingLayer ( size_t );
|
static inline const Layer* getRoutingLayer ( size_t );
|
||||||
static inline const Layer* getContactLayer ( size_t );
|
static inline const Layer* getContactLayer ( size_t );
|
||||||
static unsigned int getDirection ( size_t depth );
|
static unsigned int getDirection ( size_t depth );
|
||||||
static inline DbU::Unit getPitch ( size_t depth, unsigned int flags );
|
static inline DbU::Unit getPitch ( size_t depth, unsigned int flags );
|
||||||
static inline DbU::Unit getOffset ( size_t depth );
|
static inline DbU::Unit getOffset ( size_t depth );
|
||||||
static inline DbU::Unit getWireWidth ( size_t depth );
|
static inline DbU::Unit getWireWidth ( size_t depth );
|
||||||
static inline DbU::Unit getViaWidth ( size_t depth );
|
static inline DbU::Unit getViaWidth ( size_t depth );
|
||||||
static inline unsigned int getDirection ( const Layer* );
|
static inline unsigned int getDirection ( const Layer* );
|
||||||
static inline DbU::Unit getPitch ( const Layer*, unsigned int flags );
|
static inline DbU::Unit getPitch ( const Layer*, unsigned int flags );
|
||||||
static inline DbU::Unit getOffset ( const Layer* );
|
static inline DbU::Unit getOffset ( const Layer* );
|
||||||
static inline DbU::Unit getWireWidth ( const Layer* );
|
static inline DbU::Unit getWireWidth ( const Layer* );
|
||||||
static inline DbU::Unit getViaWidth ( const Layer* );
|
static inline DbU::Unit getViaWidth ( const Layer* );
|
||||||
static inline DbU::Unit getExtensionCap ( const Layer* );
|
static inline DbU::Unit getExtensionCap ( const Layer* );
|
||||||
static inline size_t getSegmentStackSize ();
|
static inline size_t getSegmentStackSize ();
|
||||||
static inline size_t getContactStackSize ();
|
static inline size_t getContactStackSize ();
|
||||||
static inline const vector<AutoSegment*>& getInvalidateds ();
|
static inline const vector<AutoSegment*>& getInvalidateds ();
|
||||||
static inline const vector<AutoSegment*>& getRevalidateds ();
|
static inline const vector<AutoSegment*>& getRevalidateds ();
|
||||||
static inline const set<AutoSegment*>& getDestroyeds ();
|
static inline const set<AutoSegment*>& getDestroyeds ();
|
||||||
static inline const vector<AutoSegment*>& getDoglegs ();
|
static inline const vector<AutoSegment*>& getDoglegs ();
|
||||||
static inline const set<Net*>& getNetsModificateds ();
|
static inline const set<Net*>& getNetsModificateds ();
|
||||||
static Session* open ( AnabaticEngine* );
|
static void close ();
|
||||||
static void close ();
|
static void setAnabaticFlags ( unsigned int );
|
||||||
static void setAnabaticFlags ( unsigned int );
|
static inline void dogleg ( AutoSegment* );
|
||||||
static inline void dogleg ( AutoSegment* );
|
static inline void doglegReset ();
|
||||||
static inline void doglegReset ();
|
static inline void revalidateTopology ();
|
||||||
static inline void revalidateTopology ();
|
static inline void setInvalidateMask ( unsigned int );
|
||||||
static inline void setInvalidateMask ( unsigned int );
|
static inline void invalidate ( Net* );
|
||||||
static inline void invalidate ( Net* );
|
static inline void invalidate ( AutoContact* );
|
||||||
static inline void invalidate ( AutoContact* );
|
static inline void invalidate ( AutoSegment* );
|
||||||
static inline void invalidate ( AutoSegment* );
|
static inline size_t revalidate ();
|
||||||
static inline size_t revalidate ();
|
static void link ( AutoContact* );
|
||||||
static void link ( AutoContact* );
|
static void link ( AutoSegment* );
|
||||||
static void link ( AutoSegment* );
|
static void unlink ( AutoContact* );
|
||||||
static void unlink ( AutoContact* );
|
static void unlink ( AutoSegment* );
|
||||||
static void unlink ( AutoSegment* );
|
static AutoContact* lookup ( Contact* );
|
||||||
static AutoContact* lookup ( Contact* );
|
static AutoSegment* lookup ( Segment* );
|
||||||
static AutoSegment* lookup ( Segment* );
|
static inline void destroyRequest ( AutoSegment* );
|
||||||
static inline void destroyRequest ( AutoSegment* );
|
|
||||||
// Methods.
|
// Methods.
|
||||||
bool _doDestroyBaseContact ();
|
static Session* _open ( AnabaticEngine* );
|
||||||
bool _doDestroyBaseSegment ();
|
bool _doDestroyBaseContact ();
|
||||||
bool _doDestroyTool ();
|
bool _doDestroyBaseSegment ();
|
||||||
virtual Configuration* _getConfiguration ();
|
bool _doDestroyTool ();
|
||||||
inline void _dogleg ( AutoSegment* );
|
virtual Configuration* _getConfiguration ();
|
||||||
inline void _doglegReset ();
|
inline void _dogleg ( AutoSegment* );
|
||||||
void _invalidate ( Net* );
|
inline void _doglegReset ();
|
||||||
inline void _invalidate ( AutoContact* );
|
void _invalidate ( Net* );
|
||||||
inline void _invalidate ( AutoSegment* );
|
inline void _invalidate ( AutoContact* );
|
||||||
inline void _destroyRequest ( AutoSegment* );
|
inline void _invalidate ( AutoSegment* );
|
||||||
void _canonize ();
|
inline void _destroyRequest ( AutoSegment* );
|
||||||
void _revalidateTopology ();
|
void _canonize ();
|
||||||
size_t _revalidate ();
|
void _revalidateTopology ();
|
||||||
DbU::Unit _getPitch ( size_t depth, unsigned int flags ) const;
|
virtual size_t _revalidate ();
|
||||||
Record* _getRecord () const;
|
DbU::Unit _getPitch ( size_t depth, unsigned int flags ) const;
|
||||||
string _getString () const;
|
Record* _getRecord () const;
|
||||||
inline string _getTypeName () const;
|
string _getString () const;
|
||||||
|
inline string _getTypeName () const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static Session* _session;
|
static Session* _session;
|
||||||
|
|
|
@ -20,6 +20,7 @@ projects = [
|
||||||
#, "metis"
|
#, "metis"
|
||||||
#, "mauka"
|
#, "mauka"
|
||||||
, "anabatic"
|
, "anabatic"
|
||||||
|
, "katana"
|
||||||
, "knik"
|
, "knik"
|
||||||
, "katabatic"
|
, "katabatic"
|
||||||
, "kite"
|
, "kite"
|
||||||
|
|
|
@ -0,0 +1,98 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import os.path
|
||||||
|
import optparse
|
||||||
|
import re
|
||||||
|
|
||||||
|
|
||||||
|
cppPattern = re.compile( r".*\.(h|cpp)$" )
|
||||||
|
refactorPattern = re.compile( r"^\s*(?P<orig>[^\s]*)\s*-->\s*(?P<replace>[^\s]*)\s*$" )
|
||||||
|
|
||||||
|
|
||||||
|
class Refactor:
|
||||||
|
|
||||||
|
def __init__ ( self ):
|
||||||
|
self._substitutions = []
|
||||||
|
return
|
||||||
|
|
||||||
|
def _addRefactor ( self, original, replacement ):
|
||||||
|
self._substitutions.append( ( re.compile(original), replacement ) )
|
||||||
|
return
|
||||||
|
|
||||||
|
def doLineRefactor ( self, line ):
|
||||||
|
pline = line
|
||||||
|
for (original,replacement) in self._substitutions:
|
||||||
|
pline = original.sub( replacement, pline )
|
||||||
|
return pline
|
||||||
|
|
||||||
|
def doFileRefactor ( self, file ):
|
||||||
|
oldFile = file + '.noRefactor'
|
||||||
|
if not os.path.isfile(oldFile):
|
||||||
|
os.rename( file, oldFile )
|
||||||
|
|
||||||
|
fdold = open( oldFile, 'r' )
|
||||||
|
fdnew = open( file , 'w' )
|
||||||
|
|
||||||
|
while True:
|
||||||
|
oldline = fdold.readline()
|
||||||
|
if oldline == '': break
|
||||||
|
|
||||||
|
newline = self.doLineRefactor( oldline )
|
||||||
|
fdnew.write( newline )
|
||||||
|
|
||||||
|
fdnew.close()
|
||||||
|
fdold.close()
|
||||||
|
return
|
||||||
|
|
||||||
|
def loadPatterns ( self, file ):
|
||||||
|
fd = open( file, "r" )
|
||||||
|
if fd:
|
||||||
|
while True:
|
||||||
|
line = fd.readline()
|
||||||
|
if line == "" : break
|
||||||
|
if line[0] == '#' : continue
|
||||||
|
if line[0] == '\n': continue
|
||||||
|
|
||||||
|
m = refactorPattern.match( line )
|
||||||
|
if m:
|
||||||
|
print "o:\"%s\" r:\"%s\"" % ( m.group("orig"), m.group("replace") )
|
||||||
|
self._addRefactor( m.group("orig"), m.group("replace") )
|
||||||
|
fd.close ()
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__' :
|
||||||
|
|
||||||
|
parser = optparse.OptionParser ()
|
||||||
|
parser.add_option( '-t', '--tree' , action='store' , type='string', dest='tree' )
|
||||||
|
parser.add_option( '-p', '--patterns', action='store' , type='string', dest='patterns' )
|
||||||
|
parser.add_option( '-f', '--file' , action='append', type='string', dest='files' )
|
||||||
|
|
||||||
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
|
if not options.patterns and not options.files: sys.exit( 1 )
|
||||||
|
|
||||||
|
refactor = Refactor()
|
||||||
|
refactor.loadPatterns( options.patterns )
|
||||||
|
|
||||||
|
rfiles = []
|
||||||
|
if options.patterns:
|
||||||
|
if options.tree:
|
||||||
|
for (root,dirs,tfiles) in os.walk(options.tree):
|
||||||
|
if 'CVS' in dirs: dirs.remove( 'CVS' )
|
||||||
|
if '.svn' in dirs: dirs.remove( '.svn' )
|
||||||
|
for file in tfiles:
|
||||||
|
if cppPattern.match( file ):
|
||||||
|
rfiles.append( os.path.join(root,file) )
|
||||||
|
|
||||||
|
allFiles = []
|
||||||
|
if options.files: allFiles += options.files
|
||||||
|
allFiles += rfiles
|
||||||
|
|
||||||
|
for file in allFiles:
|
||||||
|
print file
|
||||||
|
refactor.doFileRefactor( file )
|
||||||
|
|
||||||
|
sys.exit( 0 )
|
|
@ -2230,42 +2230,41 @@ endobj
|
||||||
482 0 obj
|
482 0 obj
|
||||||
<</Subtype/Type1C/Filter/FlateDecode/Length 5628>>
|
<</Subtype/Type1C/Filter/FlateDecode/Length 5628>>
|
||||||
stream
|
stream
|
||||||
xз╜XwXUW╤?х=E╪х∙╚─┼4%┬hh!T@:JS░"╫╠▀-&ov&cЛ!┼─lXPЯb└hT▄█⌠дcT┬q²{в┘ВЖ╧и╪ВfФЩЯ╬Ы├o÷С]ны{М╣жчКВШМёгхd▄···qL``ЮЭ▌аyи9А 9┘рЁ─1┐ы'v√└ЭВ▐║Э─Fш╕4╗T
|
xÚXwXUW¶?È=E¼È•«€Š4%ˆhh!D@¤*MAŠô^Ä.¶˜¼Ù™Œ±‡(°aA@Å‹¢Q1V4NKŒQ!Æuî]ÞÛç&óÞ›™÷Çûæ¾}Îw9gïµ×Z{¯ßï·<C3AF>#“1zzzÆAA¾ÑŽÁyÉ9á 9…Ò³À1ƒÙ'v–„ü÷<C3BC>¡ü€FÛ¦4¨T
|
||||||
┴╛hа┬J=qТ q╢╬(≈█f╫E&Тнэ0▓Нg▄╔╩9╫█╡нХКИ╠сЩ&;MvЖIOM/J_≥╪дjIBQ┌URnч┼┌Тт╢"+╩${+Гин⌠ХmРD╚╧╧╧╘YиVЁrРr┼рss°$О╛tН1zC8FЮG
цXСф23qLSMgДf03└йc#ф≤╠`■лhф▓к▄cф36лф√╠cЛGf"3┴qbчc°≥и▄3┘qe╕2с≤В7ф²Я`<≥ИлLfЦцлfФ0s_ф▐ЯgФ1L д3!L(ф└3С≥LиD1яLЁ░Yлт0ъ0k≤9┐=f°·╔ч2╫К┐r6(~пНAGТКGК/въ╔K√*Ш┴
gьO93Н}╝░╚ЮNpЩ╪7ЪH≤"<6ЬюЮГаЗ┐ёЪyПю░)C╒├╛B├зmf;Л■А├К█Ж╫5~ъx©Яф}&╚M╝▐чk╨ыТР┬ЛГЕ╕Р╧РСР╥fаfyf╥мyscs/╔Л*,P╡Mr╔ф_Щ░ЧЮШ≈*5гДJыSУ0%▌Б
∙ЛяE)ш&'Ж6╜m╗=Вe╧Dн╛╙о<▓╠'│D▒Ы+cр2Б┐c╖F┤v$╤·,<Qr┼°Ю╫│CР╘dNeД≥╗сЫWх=р╢УXИ▒р#╣5у5┤ш▌~{ZТсz≥[▐GEN%┌v|&'hrлА│о=░╔а8Р <-М╘И╘yпrЪ&БsXаa°zЗЙ:▄?
А
|
‰¬hÁˆJ=qô q´¾(—<>f½E&ôÎÜ0’îgŒ¥»9½<39>²Îèëé±Óý';MvöIOM/J_™¼ÄjIBQ‚URnÞŠ‚ôÔ´"+»${+çÉΓèmòD«9¹¹©YÉV³ròrŠÒssœ$ï¬tî1zC8FàG
ÃXóÆ23qLSMgäf03„Êc#Ƙ±`”ÌhÆ’ËŒcÆ36ÌÆ–±cìGf"3‰qbÞcœ™ÉŒ3…qe¦2Ó˜÷7Æ<37>ñ`<™éÌLfãÃÌf|™9ŒãÏ0s™@fÄ3!L(Æ„3ó™LÉD1ÑL³<>YÌÔ0ß0kßAŒ3NÏRo™ÞõAƒ9
|
||||||
ТБVШ-*
|
?h÷ #úƒõ£õ—ëïÒ¿%K•ýĆ³ì§œ÷>WÈUp'¸~Þ›$L|`ðó`ýÁQƒÿ<x`È”!QCV!Cm†6³vÊðÃõF{<7B>Þ¿o¼ßøã>“Õ&W‡Gï5ÝlzyDöˆórSùùyù[³`³<³Ûæ¼¹±¹—Rv(Ù&¹R ~HðýK•šcr¥ì©z˜Gñ†JöŽè¢”m““{›ŽÖ6Ôžû²ƒ\"gVÕgÉØ“@¢Èü•1é ñÁ±S£C;[
|
||||||
_:?;&%QК(Z≤©╫rШ╚с_²╬\y∙э$╞╡Н╤^°V┘AБ°КН·Я╠%и÷╖ЛJш∙ЖeЗ╬║<ЦХбK8t╝⌡О"ъXъ╒┴╚`(Ж=Uтё≥ЯЩVt╓М6*~AV |