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;
|
||||
|
||||
GCell* gsource = engine->getGCellUnder( segment->getSourcePosition() );
|
||||
GCell* gtarget = engine->getGCellUnder( segment->getTargetPosition() );
|
||||
Box gcellsArea = engine->getCell()->getAbutmentBox();
|
||||
Point sourcePosition = segment->getSourcePosition();
|
||||
Point targetPosition = segment->getTargetPosition();
|
||||
|
||||
if (not gsource) {
|
||||
cerr << Error( "RawGCellsUnder::RawGCellsUnder(): %s source not over a GCell (ignored)."
|
||||
if ( (sourcePosition.getX() >= gcellsArea.getXMax())
|
||||
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()
|
||||
) << endl;
|
||||
cdebug_tabw(112,-1);
|
||||
DebugSession::close();
|
||||
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) {
|
||||
cerr << Error( "RawGCellsUnder::RawGCellsUnder(): %s target not over a GCell (ignored)."
|
||||
, getString(segment).c_str()
|
||||
) << endl;
|
||||
cerr << Bug( "RawGCellsUnder::RawGCellsUnder(): %s target not under a GCell (ignored)."
|
||||
, getString(segment).c_str()
|
||||
) << endl;
|
||||
cdebug_tabw(112,-1);
|
||||
DebugSession::close();
|
||||
return;
|
||||
|
@ -175,7 +199,7 @@ namespace Anabatic {
|
|||
AnabaticEngine::AnabaticEngine ( Cell* cell )
|
||||
: Super(cell)
|
||||
, _timer ()
|
||||
, _configuration (new ConfigurationConcrete())
|
||||
, _configuration (new Configuration())
|
||||
, _chipTools (cell)
|
||||
, _state (EngineCreation)
|
||||
, _matrix ()
|
||||
|
@ -251,7 +275,7 @@ namespace Anabatic {
|
|||
|
||||
void AnabaticEngine::_gutAnabatic ()
|
||||
{
|
||||
Session::open( this );
|
||||
openSession();
|
||||
|
||||
_flags.reset( Flags::DestroyBaseContact|Flags::DestroyBaseSegment );
|
||||
|
||||
|
@ -301,6 +325,21 @@ namespace Anabatic {
|
|||
{ 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 capacity = 0;
|
||||
|
@ -333,6 +372,10 @@ namespace Anabatic {
|
|||
}
|
||||
|
||||
|
||||
void AnabaticEngine::openSession ()
|
||||
{ Session::_open(this); }
|
||||
|
||||
|
||||
void AnabaticEngine::reset ()
|
||||
{
|
||||
_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
|
||||
{ return getString(_toolName); }
|
||||
|
||||
|
|
|
@ -335,6 +335,10 @@ namespace Anabatic {
|
|||
message << "Terminal horizontal segment Y " << DbU::getValueString(_segment->getY())
|
||||
<< " axis is outside RoutingPad " << getUConstraints(Flags::Vertical) << ".";
|
||||
|
||||
Interval intv;
|
||||
_segment->getConstraints( intv );
|
||||
message << "\n Segment constraints: " << intv << endl;
|
||||
|
||||
unsigned int flags = 0;
|
||||
if (_segment->isCreated()) flags |= Flags::CParanoid;
|
||||
showTopologyError( message.str(), flags );
|
||||
|
|
|
@ -146,28 +146,34 @@ namespace Anabatic {
|
|||
constraintMax = getNativeMax();
|
||||
|
||||
cdebug_log(149,0) << "Native constraints: ["
|
||||
<< DbU::getValueString(constraintMin) << ":"
|
||||
<< DbU::getValueString(constraintMax) << "]"
|
||||
<< endl;
|
||||
<< DbU::getValueString(constraintMin) << ":"
|
||||
<< DbU::getValueString(constraintMax) << "]"
|
||||
<< endl;
|
||||
|
||||
constraintMin = max ( constraintMin, getUserConstraints().getVMin() );
|
||||
constraintMax = min ( constraintMax, getUserConstraints().getVMax() );
|
||||
constraintMin = std::max ( constraintMin, getAutoSource()->getCBYMin() );
|
||||
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() << " ["
|
||||
<< DbU::getValueString(getUserConstraints().getVMin()) << ":"
|
||||
<< DbU::getValueString(getUserConstraints().getVMax()) << "]"
|
||||
<< endl;
|
||||
constraintMin = std::max ( constraintMin, getUserConstraints().getVMin() );
|
||||
constraintMax = std::min ( constraintMax, getUserConstraints().getVMax() );
|
||||
cdebug_log(149,0) << "Merge with user constraints: ["
|
||||
<< DbU::getValueString(getUserConstraints().getVMin()) << ":"
|
||||
<< DbU::getValueString(getUserConstraints().getVMax()) << "]"
|
||||
<< endl;
|
||||
|
||||
cdebug_log(149,0) << "Resulting constraints: " << " ["
|
||||
<< DbU::getValueString(constraintMin) << ":"
|
||||
<< DbU::getValueString(constraintMax) << "]"
|
||||
<< endl;
|
||||
<< DbU::getValueString(constraintMin) << ":"
|
||||
<< DbU::getValueString(constraintMax) << "]"
|
||||
<< endl;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
unsigned int AutoHorizontal::getDirection () const
|
||||
Flags AutoHorizontal::getDirection () const
|
||||
{ return Flags::Horizontal; }
|
||||
|
||||
|
||||
|
|
|
@ -685,8 +685,8 @@ namespace Anabatic {
|
|||
{
|
||||
setFlags( flags );
|
||||
if (not isNotAligned()) {
|
||||
forEach( AutoSegment*, isegment, getAligneds() )
|
||||
isegment->setFlags( flags );
|
||||
for( AutoSegment* segment : getAligneds() )
|
||||
segment->setFlags( flags );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -846,8 +846,8 @@ namespace Anabatic {
|
|||
_setAxis( axis );
|
||||
|
||||
if (not isNotAligned()) {
|
||||
forEach( AutoSegment*, isegment, getAligneds() ) {
|
||||
isegment->_setAxis( getAxis() );
|
||||
for ( AutoSegment* segment : getAligneds() ) {
|
||||
segment->_setAxis( getAxis() );
|
||||
}
|
||||
} else {
|
||||
cdebug_log(149,0) << "No need to process parallels." << endl;
|
||||
|
@ -1009,11 +1009,11 @@ namespace Anabatic {
|
|||
setOptimalMax( optimalMax );
|
||||
processeds.insert( this );
|
||||
if (not isNotAligned()) {
|
||||
forEach ( AutoSegment*, autoSegment, getAligneds() ) {
|
||||
cdebug_log(145,0) << "Applying constraint on: " << *autoSegment << endl;
|
||||
for ( AutoSegment* autoSegment : getAligneds() ) {
|
||||
cdebug_log(145,0) << "Applying constraint on: " << autoSegment << endl;
|
||||
autoSegment->setOptimalMin( optimalMin );
|
||||
autoSegment->setOptimalMax( optimalMax );
|
||||
processeds.insert( (*autoSegment) );
|
||||
processeds.insert( autoSegment );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ namespace Anabatic {
|
|||
contact = segment->getAutoTarget();
|
||||
if (contact) _stack.push( contact, segment );
|
||||
|
||||
progress();
|
||||
if (not (_flags & Flags::WithSelf)) progress();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -139,28 +139,35 @@ namespace Anabatic {
|
|||
constraintMax = getNativeMax();
|
||||
|
||||
cdebug_log(149,0) << "Native constraints: ["
|
||||
<< DbU::getValueString(constraintMin) << ":"
|
||||
<< DbU::getValueString(constraintMax) << "]"
|
||||
<< endl;
|
||||
<< DbU::getValueString(constraintMin) << ":"
|
||||
<< DbU::getValueString(constraintMax) << "]"
|
||||
<< 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() );
|
||||
constraintMax = min ( constraintMax, getUserConstraints().getVMax() );
|
||||
|
||||
cdebug_log(149,0) << "Merge with user constraints: " << getUserConstraints() << " ["
|
||||
<< DbU::getValueString(getUserConstraints().getVMin()) << ":"
|
||||
<< DbU::getValueString(getUserConstraints().getVMax()) << "]"
|
||||
<< endl;
|
||||
cdebug_log(149,0) << "Merge with user constraints: ["
|
||||
<< DbU::getValueString(getUserConstraints().getVMin()) << ":"
|
||||
<< DbU::getValueString(getUserConstraints().getVMax()) << "]"
|
||||
<< endl;
|
||||
|
||||
cdebug_log(149,0) << "Resulting constraints: " << " ["
|
||||
<< DbU::getValueString(constraintMin) << ":"
|
||||
<< DbU::getValueString(constraintMax) << "]"
|
||||
<< endl;
|
||||
<< DbU::getValueString(constraintMin) << ":"
|
||||
<< DbU::getValueString(constraintMax) << "]"
|
||||
<< endl;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
unsigned int AutoVertical::getDirection () const
|
||||
Flags AutoVertical::getDirection () const
|
||||
{ return Flags::Vertical; }
|
||||
|
||||
|
||||
|
|
|
@ -57,17 +57,8 @@ namespace Anabatic {
|
|||
// Class : "Anabatic::Configuration".
|
||||
|
||||
|
||||
Configuration::Configuration () { }
|
||||
Configuration::~Configuration () { }
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Anabatic::ConfigurationConcrete".
|
||||
|
||||
|
||||
ConfigurationConcrete::ConfigurationConcrete ( const CellGauge* cg, const RoutingGauge* rg )
|
||||
: Configuration ()
|
||||
, _cg (NULL)
|
||||
Configuration::Configuration ( const CellGauge* cg, const RoutingGauge* rg )
|
||||
: _cg (NULL)
|
||||
, _rg (NULL)
|
||||
, _extensionCaps ()
|
||||
, _saturateRatio (Cfg::getParamPercentage("katabatic.saturateRatio",80.0)->asDouble())
|
||||
|
@ -79,8 +70,6 @@ namespace Anabatic {
|
|||
, _edgeCostH (Cfg::getParamDouble("anabatic.edgeCostH", 9.0)->asDouble())
|
||||
, _edgeCostK (Cfg::getParamDouble("anabatic.edgeCostK",-10.0)->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 (rg == NULL) rg = AllianceFramework::get()->getRoutingGauge();
|
||||
|
@ -119,9 +108,8 @@ namespace Anabatic {
|
|||
}
|
||||
|
||||
|
||||
ConfigurationConcrete::ConfigurationConcrete ( const ConfigurationConcrete& other )
|
||||
: Configuration()
|
||||
, _gmetalh (other._gmetalh)
|
||||
Configuration::Configuration ( const Configuration& other )
|
||||
: _gmetalh (other._gmetalh)
|
||||
, _gmetalv (other._gmetalv)
|
||||
, _gcontact (other._gcontact)
|
||||
, _cg (NULL)
|
||||
|
@ -139,7 +127,7 @@ namespace Anabatic {
|
|||
}
|
||||
|
||||
|
||||
ConfigurationConcrete::~ConfigurationConcrete ()
|
||||
Configuration::~Configuration ()
|
||||
{
|
||||
cdebug_log(145,0) << "About to delete attribute _rg (RoutingGauge)." << endl;
|
||||
_cg->destroy ();
|
||||
|
@ -147,99 +135,99 @@ namespace Anabatic {
|
|||
}
|
||||
|
||||
|
||||
ConfigurationConcrete* ConfigurationConcrete::clone () const
|
||||
{ return new ConfigurationConcrete(*this); }
|
||||
Configuration* Configuration::clone () const
|
||||
{ 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))); }
|
||||
|
||||
|
||||
bool ConfigurationConcrete::isGContact ( const Layer* layer ) const
|
||||
bool Configuration::isGContact ( const Layer* layer ) const
|
||||
{ return (layer and (layer == _gcontact)); }
|
||||
|
||||
const Layer* ConfigurationConcrete::getGContactLayer () const
|
||||
const Layer* Configuration::getGContactLayer () const
|
||||
{ return _gcontact; }
|
||||
|
||||
const Layer* ConfigurationConcrete::getGHorizontalLayer () const
|
||||
const Layer* Configuration::getGHorizontalLayer () const
|
||||
{ return _gmetalh; }
|
||||
|
||||
const Layer* ConfigurationConcrete::getGVerticalLayer () const
|
||||
const Layer* Configuration::getGVerticalLayer () const
|
||||
{ return _gmetalv; }
|
||||
|
||||
size_t ConfigurationConcrete::getDepth () const
|
||||
size_t Configuration::getDepth () const
|
||||
{ return _rg->getDepth(); }
|
||||
|
||||
|
||||
size_t ConfigurationConcrete::getAllowedDepth () const
|
||||
size_t Configuration::getAllowedDepth () const
|
||||
{ return _allowedDepth; }
|
||||
|
||||
|
||||
size_t ConfigurationConcrete::getLayerDepth ( const Layer* layer ) const
|
||||
size_t Configuration::getLayerDepth ( const Layer* layer ) const
|
||||
{ return _rg->getLayerDepth(layer); }
|
||||
|
||||
|
||||
CellGauge* ConfigurationConcrete::getCellGauge () const
|
||||
CellGauge* Configuration::getCellGauge () const
|
||||
{ return _cg; }
|
||||
|
||||
|
||||
RoutingGauge* ConfigurationConcrete::getRoutingGauge () const
|
||||
RoutingGauge* Configuration::getRoutingGauge () const
|
||||
{ return _rg; }
|
||||
|
||||
|
||||
RoutingLayerGauge* ConfigurationConcrete::getLayerGauge ( size_t depth ) const
|
||||
RoutingLayerGauge* Configuration::getLayerGauge ( size_t depth ) const
|
||||
{ return _rg->getLayerGauge(depth); }
|
||||
|
||||
|
||||
const Layer* ConfigurationConcrete::getRoutingLayer ( size_t depth ) const
|
||||
const Layer* Configuration::getRoutingLayer ( size_t depth ) const
|
||||
{ return _rg->getRoutingLayer(depth); }
|
||||
|
||||
|
||||
Layer* ConfigurationConcrete::getContactLayer ( size_t depth ) const
|
||||
Layer* Configuration::getContactLayer ( size_t depth ) const
|
||||
{ return _rg->getContactLayer(depth); }
|
||||
|
||||
|
||||
DbU::Unit ConfigurationConcrete::getSliceHeight () const
|
||||
DbU::Unit Configuration::getSliceHeight () const
|
||||
{ return _cg->getSliceHeight(); }
|
||||
|
||||
|
||||
DbU::Unit ConfigurationConcrete::getSliceStep () const
|
||||
DbU::Unit Configuration::getSliceStep () const
|
||||
{ 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 ); }
|
||||
|
||||
|
||||
DbU::Unit ConfigurationConcrete::getOffset ( const Layer* layer ) const
|
||||
DbU::Unit Configuration::getOffset ( const Layer* layer ) const
|
||||
{ return getOffset( getLayerDepth(layer) ); }
|
||||
|
||||
|
||||
DbU::Unit ConfigurationConcrete::getExtensionCap ( const Layer* layer ) const
|
||||
DbU::Unit Configuration::getExtensionCap ( const Layer* layer ) const
|
||||
{ return getExtensionCap( getLayerDepth(layer) ); }
|
||||
|
||||
|
||||
DbU::Unit ConfigurationConcrete::getWireWidth ( const Layer* layer ) const
|
||||
DbU::Unit Configuration::getWireWidth ( const Layer* layer ) const
|
||||
{ return getWireWidth( getLayerDepth(layer) ); }
|
||||
|
||||
|
||||
Flags ConfigurationConcrete::getDirection ( const Layer* layer ) const
|
||||
Flags Configuration::getDirection ( const Layer* layer ) const
|
||||
{ return getDirection( getLayerDepth(layer) ); }
|
||||
|
||||
|
||||
float ConfigurationConcrete::getSaturateRatio () const
|
||||
float Configuration::getSaturateRatio () const
|
||||
{ return _saturateRatio; }
|
||||
|
||||
|
||||
size_t ConfigurationConcrete::getSaturateRp () const
|
||||
size_t Configuration::getSaturateRp () const
|
||||
{ return _saturateRp; }
|
||||
|
||||
|
||||
DbU::Unit ConfigurationConcrete::getGlobalThreshold () const
|
||||
DbU::Unit Configuration::getGlobalThreshold () const
|
||||
{ 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);
|
||||
|
||||
|
@ -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); }
|
||||
|
||||
|
||||
DbU::Unit ConfigurationConcrete::getWireWidth ( size_t depth ) const
|
||||
DbU::Unit Configuration::getWireWidth ( size_t depth ) const
|
||||
{ return _rg->getLayerWireWidth(depth); }
|
||||
|
||||
|
||||
DbU::Unit ConfigurationConcrete::getExtensionCap ( size_t depth ) const
|
||||
DbU::Unit Configuration::getExtensionCap ( size_t depth ) const
|
||||
{ return _extensionCaps[depth]; }
|
||||
|
||||
|
||||
Flags ConfigurationConcrete::getDirection ( size_t depth ) const
|
||||
Flags Configuration::getDirection ( size_t depth ) const
|
||||
{ return _rg->getLayerDirection(depth); }
|
||||
|
||||
|
||||
void ConfigurationConcrete::setAllowedDepth ( size_t allowedDepth )
|
||||
void Configuration::setAllowedDepth ( size_t 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 ) {
|
||||
if (_rg->getRoutingLayer(depth)->getName() == name) {
|
||||
|
@ -301,47 +289,39 @@ namespace Anabatic {
|
|||
}
|
||||
|
||||
|
||||
void ConfigurationConcrete::setSaturateRatio ( float ratio )
|
||||
void Configuration::setSaturateRatio ( float ratio )
|
||||
{ _saturateRatio = ratio; }
|
||||
|
||||
|
||||
void ConfigurationConcrete::setSaturateRp ( size_t threshold )
|
||||
void Configuration::setSaturateRp ( size_t threshold )
|
||||
{ _saturateRp = threshold; }
|
||||
|
||||
|
||||
void ConfigurationConcrete::setGlobalThreshold ( DbU::Unit threshold )
|
||||
void Configuration::setGlobalThreshold ( DbU::Unit threshold )
|
||||
{ _globalThreshold = threshold; }
|
||||
|
||||
|
||||
DbU::Unit ConfigurationConcrete::getEdgeLength () const
|
||||
DbU::Unit Configuration::getEdgeLength () const
|
||||
{ return _edgeLength; }
|
||||
|
||||
|
||||
DbU::Unit ConfigurationConcrete::getEdgeWidth () const
|
||||
DbU::Unit Configuration::getEdgeWidth () const
|
||||
{ return _edgeWidth; }
|
||||
|
||||
|
||||
size_t ConfigurationConcrete::getHEdgeLocal () const
|
||||
{ return _hEdgeLocal; }
|
||||
|
||||
|
||||
size_t ConfigurationConcrete::getVEdgeLocal () const
|
||||
{ return _vEdgeLocal; }
|
||||
|
||||
|
||||
float ConfigurationConcrete::getEdgeCostH () const
|
||||
float Configuration::getEdgeCostH () const
|
||||
{ return _edgeCostH; }
|
||||
|
||||
|
||||
float ConfigurationConcrete::getEdgeCostK () const
|
||||
float Configuration::getEdgeCostK () const
|
||||
{ return _edgeCostK; }
|
||||
|
||||
|
||||
float ConfigurationConcrete::getEdgeHInc () const
|
||||
float Configuration::getEdgeHInc () const
|
||||
{ return _edgeHInc; }
|
||||
|
||||
|
||||
void ConfigurationConcrete::print ( Cell* cell ) const
|
||||
void Configuration::print ( Cell* cell ) const
|
||||
{
|
||||
string topLayerName = "UNKOWN";
|
||||
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;
|
||||
|
||||
|
@ -370,7 +350,7 @@ namespace Anabatic {
|
|||
}
|
||||
|
||||
|
||||
Record* ConfigurationConcrete::_getRecord () const
|
||||
Record* Configuration::_getRecord () const
|
||||
{
|
||||
Record* record = new Record ( _getString() );
|
||||
record->add ( getSlot( "_rg" , _rg ) );
|
||||
|
@ -385,5 +365,4 @@ namespace Anabatic {
|
|||
}
|
||||
|
||||
|
||||
|
||||
} // Anabatic namespace.
|
||||
|
|
|
@ -22,6 +22,66 @@ namespace Anabatic {
|
|||
|
||||
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 ()
|
||||
{ }
|
||||
|
|
|
@ -85,7 +85,6 @@ namespace Anabatic {
|
|||
|
||||
void Vertex::notify ( Vertex* vertex, unsigned int flags )
|
||||
{
|
||||
//Vertex* vertex = getOwner();
|
||||
cdebug_log(111,0) << "Vertex::notify() " << vertex << endl;
|
||||
// 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->getCell()) throw Error( "GCell::create(): AnabaticEngine has no Cell loaded." );
|
||||
|
||||
Session::open( anabatic );
|
||||
anabatic->openSession();
|
||||
GCell* gcell = new GCell ( anabatic
|
||||
, anabatic->getCell()->getAbutmentBox().getXMin()
|
||||
, 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
|
||||
{
|
||||
const GCell* current = this;
|
||||
|
@ -706,10 +716,10 @@ namespace Anabatic {
|
|||
|
||||
bool GCell::doGrid ()
|
||||
{
|
||||
Session::open( getAnabatic() );
|
||||
getAnabatic()->openSession();
|
||||
|
||||
const vector<GCell*>& gcells = getAnabatic()->getGCells();
|
||||
size_t ibegin = gcells.size();
|
||||
//const vector<GCell*>& gcells = getAnabatic()->getGCells();
|
||||
//size_t ibegin = gcells.size();
|
||||
DbU::Unit side = Session::getSliceHeight();
|
||||
|
||||
Interval hspan = getSide( Flags::Horizontal );
|
||||
|
@ -740,29 +750,32 @@ namespace Anabatic {
|
|||
for ( ; ycut < vspan.getVMax() ; ycut += side ) {
|
||||
column = row;
|
||||
row = row->hcut( ycut );
|
||||
row->setType( Flags::MatrixGCell );
|
||||
|
||||
for ( DbU::Unit xcut = hspan.getVMin()+side ; xcut < hspan.getVMax() ; xcut += side ) {
|
||||
column = column->vcut( xcut );
|
||||
column->setType( Flags::MatrixGCell );
|
||||
}
|
||||
}
|
||||
|
||||
column = row;
|
||||
for ( DbU::Unit xcut = hspan.getVMin()+side ; xcut < hspan.getVMax() ; xcut += side ) {
|
||||
column = column->vcut( xcut );
|
||||
column->setType( Flags::MatrixGCell );
|
||||
}
|
||||
|
||||
setType( Flags::MatrixGCell );
|
||||
|
||||
size_t hLocal = - getAnabatic()->getConfiguration()->getHEdgeLocal();
|
||||
size_t vLocal = - getAnabatic()->getConfiguration()->getVEdgeLocal();
|
||||
for ( ; ibegin < gcells.size() ; ++ibegin ) {
|
||||
gcells[ibegin]->setType( Flags::MatrixGCell );
|
||||
//size_t hLocal = - getAnabatic()->getConfiguration()->getHEdgeLocal();
|
||||
//size_t vLocal = - getAnabatic()->getConfiguration()->getVEdgeLocal();
|
||||
//for ( ; ibegin < gcells.size() ; ++ibegin ) {
|
||||
// gcells[ibegin]->setType( Flags::MatrixGCell );
|
||||
|
||||
for ( Edge* edge : gcells[ibegin]->getEdges(Flags::NorthSide|Flags::EastSide) ) {
|
||||
if (edge->isHorizontal()) edge->incCapacity( hLocal );
|
||||
else edge->incCapacity( vLocal );
|
||||
}
|
||||
}
|
||||
// for ( Edge* edge : gcells[ibegin]->getEdges(Flags::NorthSide|Flags::EastSide) ) {
|
||||
// if (edge->isHorizontal()) edge->incCapacity( hLocal );
|
||||
// else edge->incCapacity( vLocal );
|
||||
// }
|
||||
//}
|
||||
|
||||
Session::close();
|
||||
return true;
|
||||
|
@ -1049,13 +1062,8 @@ namespace Anabatic {
|
|||
|
||||
Interval GCell::getSide ( unsigned int direction ) const
|
||||
{
|
||||
Interval side;
|
||||
switch ( direction ) {
|
||||
default:
|
||||
case Flags::Horizontal: side = Interval(getXMin(),getXMax()); break;
|
||||
case Flags::Vertical: side = Interval(getYMin(),getYMax()); break;
|
||||
}
|
||||
return side;
|
||||
if (direction & Flags::Vertical) return Interval( getYMin(), getYMax() );
|
||||
return Interval( getXMin(), getXMax() );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1312,15 +1320,12 @@ namespace Anabatic {
|
|||
localCounts [i] = 0.0;
|
||||
_globalsCount[i] = 0.0;
|
||||
|
||||
switch ( Session::getDirection(i) ) {
|
||||
case Flags::Horizontal:
|
||||
ufragments[i].setSpan ( getXMin(), getXMax() );
|
||||
ufragments[i].setCapacity( (size_t)hcapacity );
|
||||
break;
|
||||
case Flags::Vertical:
|
||||
ufragments[i].setSpan ( getYMin(), getYMax() );
|
||||
ufragments[i].setCapacity( (size_t)vcapacity );
|
||||
break;
|
||||
if (Session::getDirection(i) & Flags::Horizontal) {
|
||||
ufragments[i].setSpan ( getXMin(), getXMax() );
|
||||
ufragments[i].setCapacity( (size_t)hcapacity );
|
||||
} else {
|
||||
ufragments[i].setSpan ( getYMin(), getYMax() );
|
||||
ufragments[i].setCapacity( (size_t)vcapacity );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1330,10 +1335,10 @@ namespace Anabatic {
|
|||
for ( size_t i=0 ; i<_depth ; i++ ) uLengths1[i] = 0;
|
||||
contact->getLengths ( uLengths1, processeds );
|
||||
for ( size_t i=0 ; i<_depth ; i++ ) {
|
||||
switch ( Session::getDirection(i) ) {
|
||||
case Flags::Horizontal: uLengths2[i] += uLengths1[i]+hpenalty; break;
|
||||
case Flags::Vertical: uLengths2[i] += uLengths1[i]+vpenalty; break;
|
||||
}
|
||||
if (Session::getDirection(i) & Flags::Horizontal)
|
||||
uLengths2[i] += uLengths1[i]+hpenalty;
|
||||
else
|
||||
uLengths2[i] += uLengths1[i]+vpenalty; break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1415,29 +1420,26 @@ namespace Anabatic {
|
|||
|
||||
// Normalize: 0 < d < 1.0 (divide by H/V capacity).
|
||||
for ( size_t i=0 ; i<_depth ; i++ ) {
|
||||
switch ( Session::getDirection(i) ) {
|
||||
case Flags::Horizontal:
|
||||
if (width) {
|
||||
_densities [i] = ((float)uLengths2[i]) / ( hcapacity * (float)width );
|
||||
_feedthroughs [i] += (float)(_blockages[i] / width);
|
||||
_fragmentations[i] = (float)ufragments[i].getMaxFree().getSize() / (float)width;
|
||||
} else {
|
||||
_densities [i] = 0;
|
||||
_feedthroughs [i] = 0;
|
||||
_fragmentations[i] = 0;
|
||||
}
|
||||
break;
|
||||
case Flags::Vertical:
|
||||
if (height) {
|
||||
_densities [i] = ((float)uLengths2[i]) / ( vcapacity * (float)height );
|
||||
_feedthroughs [i] += (float)(_blockages[i] / height);
|
||||
_fragmentations[i] = (float)ufragments[i].getMaxFree().getSize() / (float)height;
|
||||
} else {
|
||||
_densities [i] = 0;
|
||||
_feedthroughs [i] = 0;
|
||||
_fragmentations[i] = 0;
|
||||
}
|
||||
break;
|
||||
if (Session::getDirection(i) & Flags::Horizontal) {
|
||||
if (width) {
|
||||
_densities [i] = ((float)uLengths2[i]) / ( hcapacity * (float)width );
|
||||
_feedthroughs [i] += (float)(_blockages[i] / width);
|
||||
_fragmentations[i] = (float)ufragments[i].getMaxFree().getSize() / (float)width;
|
||||
} else {
|
||||
_densities [i] = 0;
|
||||
_feedthroughs [i] = 0;
|
||||
_fragmentations[i] = 0;
|
||||
}
|
||||
} else {
|
||||
if (height) {
|
||||
_densities [i] = ((float)uLengths2[i]) / ( vcapacity * (float)height );
|
||||
_feedthroughs [i] += (float)(_blockages[i] / height);
|
||||
_fragmentations[i] = (float)ufragments[i].getMaxFree().getSize() / (float)height;
|
||||
} else {
|
||||
_densities [i] = 0;
|
||||
_feedthroughs [i] = 0;
|
||||
_fragmentations[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
if (isInvalidated()) const_cast<GCell*>(this)->updateDensity();
|
||||
|
@ -1485,10 +1506,8 @@ namespace Anabatic {
|
|||
if (isInvalidated()) const_cast<GCell*>(this)->updateDensity();
|
||||
|
||||
float capacity = 0.0;
|
||||
switch ( Session::getDirection(depth) ) {
|
||||
case Flags::Horizontal: capacity = getHCapacity(); break;
|
||||
case Flags::Vertical: capacity = getVCapacity(); break;
|
||||
}
|
||||
if (Session::getDirection(depth) & Flags::Horizontal) capacity = getHCapacity();
|
||||
else capacity = getVCapacity();
|
||||
|
||||
cdebug_log(149,0) << " | hasFreeTrack [" << getId() << "] depth:" << depth << " "
|
||||
<< Session::getRoutingGauge()->getRoutingLayer(depth)->getName()
|
||||
|
@ -1543,15 +1562,12 @@ namespace Anabatic {
|
|||
vector<AutoSegment*>::iterator isegment;
|
||||
vector<AutoSegment*>::iterator iend;
|
||||
|
||||
switch ( Session::getDirection(depth) ) {
|
||||
case Flags::Horizontal:
|
||||
iend = _hsegments.end ();
|
||||
isegment = _hsegments.begin();
|
||||
break;
|
||||
case Flags::Vertical:
|
||||
iend = _vsegments.end ();
|
||||
isegment = _vsegments.begin();
|
||||
break;
|
||||
if (Session::getDirection(depth) & Flags::Horizontal) {
|
||||
iend = _hsegments.end ();
|
||||
isegment = _hsegments.begin();
|
||||
} else {
|
||||
iend = _vsegments.end ();
|
||||
isegment = _vsegments.begin();
|
||||
}
|
||||
|
||||
for ( ; (isegment != iend) ; isegment++ ) {
|
||||
|
@ -1582,15 +1598,12 @@ namespace Anabatic {
|
|||
vector<AutoSegment*>::iterator iend;
|
||||
set<Net*> globalNets;
|
||||
|
||||
switch ( Session::getDirection(depth) ) {
|
||||
case Flags::Horizontal:
|
||||
iend = _hsegments.end ();
|
||||
isegment = _hsegments.begin();
|
||||
break;
|
||||
case Flags::Vertical:
|
||||
iend = _vsegments.end ();
|
||||
isegment = _vsegments.begin();
|
||||
break;
|
||||
if (Session::getDirection(depth) & Flags::Horizontal) {
|
||||
iend = _hsegments.end ();
|
||||
isegment = _hsegments.begin();
|
||||
} else {
|
||||
iend = _vsegments.end ();
|
||||
isegment = _vsegments.begin();
|
||||
}
|
||||
|
||||
for ( ; (isegment != iend) ; isegment++ ) {
|
||||
|
@ -1626,15 +1639,12 @@ namespace Anabatic {
|
|||
vector<AutoSegment*>::iterator isegment;
|
||||
vector<AutoSegment*>::iterator iend;
|
||||
|
||||
switch ( Session::getDirection(depth) ) {
|
||||
case Flags::Horizontal:
|
||||
iend = _hsegments.end ();
|
||||
isegment = _hsegments.begin ();
|
||||
break;
|
||||
case Flags::Vertical:
|
||||
iend = _vsegments.end ();
|
||||
isegment = _vsegments.begin ();
|
||||
break;
|
||||
if (Session::getDirection(depth) & Flags::Horizontal) {
|
||||
iend = _hsegments.end ();
|
||||
isegment = _hsegments.begin ();
|
||||
} else {
|
||||
iend = _vsegments.end ();
|
||||
isegment = _vsegments.begin ();
|
||||
}
|
||||
|
||||
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.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
// -*- mode: C++; explicit-buffer-name: "GlobalRoute.cpp<anabatic>" -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2016-2016, All Rights Reserved
|
||||
|
@ -138,7 +138,6 @@ namespace Anabatic {
|
|||
|
||||
startMeasures();
|
||||
|
||||
UpdateSession::open();
|
||||
if (getGCells().size() == 1) {
|
||||
cmess1 << " o Building regular grid..." << endl;
|
||||
getSouthWestGCell()->doGrid();
|
||||
|
@ -146,24 +145,21 @@ namespace Anabatic {
|
|||
cmess1 << " o Reusing existing grid." << endl;
|
||||
}
|
||||
cmess1 << Dots::asInt(" - GCells" ,getGCells().size()) << endl;
|
||||
UpdateSession::close();
|
||||
|
||||
stopMeasures();
|
||||
printMeasures( "Anabatic Grid" );
|
||||
|
||||
Session::open( this );
|
||||
setupSpecialNets();
|
||||
setupPreRouteds ();
|
||||
setupNetDatas();
|
||||
Session::close();
|
||||
|
||||
openSession();
|
||||
startMeasures();
|
||||
|
||||
cmess1 << " o Running global routing..." << endl;
|
||||
|
||||
float edgeHInc = getConfiguration()->getEdgeHInc();
|
||||
|
||||
Session::open( this );
|
||||
Dijkstra* dijkstra = new Dijkstra ( this );
|
||||
dijkstra->setDistance( DigitalDistance( getConfiguration()->getEdgeCostH()
|
||||
, getConfiguration()->getEdgeCostK() ) );
|
||||
|
|
|
@ -377,7 +377,7 @@ namespace Anabatic {
|
|||
void AnabaticEngine::_balanceGlobalDensity ( unsigned int depth )
|
||||
{
|
||||
startMeasures();
|
||||
Session::open( this );
|
||||
openSession();
|
||||
|
||||
cmess1 << " o Balance Global Density "
|
||||
<< Session::getRoutingGauge()->getRoutingLayer(depth)->getName() << endl;
|
||||
|
@ -435,7 +435,7 @@ namespace Anabatic {
|
|||
set<Net*> globalNets;
|
||||
GCell::Set invalidateds;
|
||||
|
||||
Session::open( this );
|
||||
openSession();
|
||||
|
||||
vector<AutoSegment*> segments;
|
||||
|
||||
|
@ -482,7 +482,7 @@ namespace Anabatic {
|
|||
unsigned long global = 0;
|
||||
|
||||
startMeasures();
|
||||
Session::open( this );
|
||||
openSession();
|
||||
|
||||
if (Session::getAllowedDepth() >= 3) {
|
||||
switch ( method ) {
|
||||
|
|
|
@ -2096,7 +2096,10 @@ namespace {
|
|||
|
||||
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;
|
||||
|
||||
startMeasures();
|
||||
Session::open( this );
|
||||
openSession();
|
||||
|
||||
forEach ( Net*, inet, getCell()->getNets() ) {
|
||||
if (NetRoutingExtension::isAutomaticGlobalRoute(*inet)) {
|
||||
|
|
|
@ -63,40 +63,42 @@ namespace {
|
|||
{
|
||||
cdebug_log(145,1) << "propagateConstraintFromRp() - " << rp << endl;
|
||||
|
||||
forEach ( Component*, icomponent, rp->getSlaveComponents() ) {
|
||||
cdebug_log(145,0) << "slave component: " << *icomponent << endl;
|
||||
AutoContact* sourceContact = Session::lookup( dynamic_cast<Contact*>(*icomponent) );
|
||||
for ( Component* component : rp->getSlaveComponents() ) {
|
||||
cdebug_log(145,0) << "slave component: " << component << endl;
|
||||
AutoContact* sourceContact = Session::lookup( dynamic_cast<Contact*>(component) );
|
||||
if (sourceContact) {
|
||||
cdebug_log(145,0) << "Start slave: " << sourceContact << endl;
|
||||
|
||||
set<AutoSegment*> verticalSegments;
|
||||
set<AutoSegment*> horizontalSegments;
|
||||
|
||||
forEach ( AutoSegment*, isegment, sourceContact->getAutoSegments() ) {
|
||||
cdebug_log(145,0) << "Examining: " << (*isegment) << endl;
|
||||
AutoContact* targetContact = isegment->getOppositeAnchor(sourceContact);
|
||||
for ( AutoSegment* segment : sourceContact->getAutoSegments() ) {
|
||||
cdebug_log(145,0) << "Examining: " << segment << endl;
|
||||
AutoContact* targetContact = segment->getOppositeAnchor(sourceContact);
|
||||
|
||||
if (targetContact) {
|
||||
if (isegment->isHorizontal()) {
|
||||
cdebug_log(145,0) << "On horizontal stack " << (*isegment) << endl;
|
||||
horizontalSegments.insert( (*isegment) );
|
||||
if (segment->isHorizontal()) {
|
||||
cdebug_log(145,0) << "On horizontal stack " << segment << endl;
|
||||
horizontalSegments.insert( segment );
|
||||
} else {
|
||||
cdebug_log(145,0) << "On vertical stack " << (*isegment) << endl;
|
||||
verticalSegments.insert( (*isegment) );
|
||||
cdebug_log(145,0) << "On vertical stack " << segment << endl;
|
||||
verticalSegments.insert( segment );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Box constraintBox = sourceContact->getConstraintBox();
|
||||
cdebug_log(145,0) << "Contraint: " << constraintBox << endl;
|
||||
|
||||
// Propagate constraint through horizontally aligned segments.
|
||||
cdebug_log(145,0) << "Propagate constraint on horizontal segments" << endl;
|
||||
|
||||
set<AutoSegment*>::iterator ihorizontal = horizontalSegments.begin();
|
||||
for ( ; ihorizontal != horizontalSegments.end() ; ++ihorizontal ) {
|
||||
for ( AutoSegment* horizontal : horizontalSegments ) {
|
||||
AutoContact* contact = NULL;
|
||||
forEach ( AutoSegment*, ialigned, (*ihorizontal)->getAligneds() ) {
|
||||
contact = ialigned->getAutoTarget();
|
||||
for ( AutoSegment* aligned : horizontal->getAligneds(Flags::WithSelf) ) {
|
||||
cdebug_log(145,0) << "aligned horizontal: " << aligned << endl;
|
||||
|
||||
contact = aligned->getAutoTarget();
|
||||
cdebug_log(145,0) << "contact: " << contact << endl;
|
||||
if (contact) {
|
||||
cdebug_log(145,0) << "Apply to (target): " << contact << endl;
|
||||
|
@ -104,7 +106,7 @@ namespace {
|
|||
, constraintBox.getYMax()
|
||||
, Flags::Horizontal|Flags::WarnOnError );
|
||||
}
|
||||
contact = ialigned->getAutoSource();
|
||||
contact = aligned->getAutoSource();
|
||||
cdebug_log(145,0) << "contact: " << contact << endl;
|
||||
if (contact) {
|
||||
cdebug_log(145,0) << "Apply to (source): " << contact << endl;
|
||||
|
@ -118,18 +120,19 @@ namespace {
|
|||
// Propagate constraint through vertically aligned segments.
|
||||
cdebug_log(145,0) << "Propagate constraint on vertical segments" << endl;
|
||||
|
||||
set<AutoSegment*>::iterator ivertical = verticalSegments.begin();
|
||||
for ( ; ivertical != verticalSegments.end() ; ++ivertical ) {
|
||||
for ( AutoSegment* vertical : verticalSegments ) {
|
||||
AutoContact* contact = NULL;
|
||||
forEach ( AutoSegment*, ialigned, (*ivertical)->getAligneds() ) {
|
||||
contact = ialigned->getAutoTarget();
|
||||
for ( AutoSegment* aligned : vertical->getAligneds(Flags::WithSelf) ) {
|
||||
cdebug_log(145,0) << "aligned vertical: " << aligned << endl;
|
||||
|
||||
contact = aligned->getAutoTarget();
|
||||
if (contact) {
|
||||
cdebug_log(145,0) << "Apply to (target): " << contact << endl;
|
||||
contact->restrictConstraintBox( constraintBox.getXMin()
|
||||
, constraintBox.getXMax()
|
||||
, Flags::Vertical|Flags::WarnOnError );
|
||||
}
|
||||
contact = ialigned->getAutoSource();
|
||||
contact = aligned->getAutoSource();
|
||||
if (contact) {
|
||||
cdebug_log(145,0) << "Apply to (source): " << contact << endl;
|
||||
contact->restrictConstraintBox( constraintBox.getXMin()
|
||||
|
|
|
@ -70,6 +70,8 @@ namespace Anabatic {
|
|||
{
|
||||
cmess1 << " o Looking for fixed or manually global routed nets." << endl;
|
||||
|
||||
openSession();
|
||||
|
||||
for ( Net* net : getCell()->getNets() ) {
|
||||
if (net == _blockageNet) continue;
|
||||
if (net->getType() == Net::Type::POWER ) continue;
|
||||
|
@ -170,7 +172,7 @@ namespace Anabatic {
|
|||
}
|
||||
}
|
||||
|
||||
Session::revalidate();
|
||||
Session::close();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
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).";
|
||||
|
||||
|
||||
|
@ -96,7 +96,6 @@ namespace Anabatic {
|
|||
{
|
||||
if (_anabatic->getState() <= EngineActive) {
|
||||
_revalidate ();
|
||||
|
||||
_anabatic->updateDensity();
|
||||
}
|
||||
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->_anabatic != anbt)
|
||||
|
|
|
@ -107,6 +107,7 @@ namespace Anabatic {
|
|||
NetData ( Net* );
|
||||
inline bool isGlobalRouted () const;
|
||||
inline bool isMixedPreRoute () const;
|
||||
inline bool isFixed () const;
|
||||
inline Net* getNet () const;
|
||||
inline NetRoutingState* getNetRoutingState () const;
|
||||
inline const Box& getSearchArea () const;
|
||||
|
@ -133,6 +134,7 @@ namespace Anabatic {
|
|||
|
||||
inline bool NetData::isGlobalRouted () const { return _flags & Flags::GlobalRouted; }
|
||||
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 NetRoutingState* NetData::getNetRoutingState () const { return _state; }
|
||||
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 ( Point ) const;
|
||||
inline GCellsUnder getGCellsUnder ( Segment* ) const;
|
||||
Interval getUSide ( Flags direction ) const;
|
||||
int getCapacity ( Interval, Flags ) const;
|
||||
size_t getNetsFromEdge ( const Edge*, NetSet& );
|
||||
virtual void openSession ();
|
||||
inline void setState ( EngineState state );
|
||||
inline void setDensityMode ( unsigned int );
|
||||
inline void addOv ( Edge* );
|
||||
|
@ -225,11 +229,14 @@ namespace Anabatic {
|
|||
inline size_t getSaturateRp () const;
|
||||
inline DbU::Unit getExtensionCap () const;
|
||||
inline Net* getBlockageNet () const;
|
||||
inline const ChipTools& getChipTools () const;
|
||||
inline const vector<NetData*>& getNetOrdering () const;
|
||||
void updateDensity ();
|
||||
size_t checkGCellDensities ();
|
||||
inline void setGlobalThreshold ( DbU::Unit );
|
||||
inline void setSaturateRatio ( float );
|
||||
inline void setSaturateRp ( size_t );
|
||||
inline void setBlockageNet ( Net* );
|
||||
void chipPrep ();
|
||||
void setupSpecialNets ();
|
||||
void setupPreRouteds ();
|
||||
|
@ -261,10 +268,13 @@ namespace Anabatic {
|
|||
void _saveNet ( Net* );
|
||||
void _destroyAutoContacts ();
|
||||
void _destroyAutoSegments ();
|
||||
void _check ( Net* net ) const;
|
||||
bool _check ( const char* message ) const;
|
||||
// Misc. functions.
|
||||
inline const Flags& flags () const;
|
||||
inline Flags& flags ();
|
||||
void reset ();
|
||||
inline const Timer& getTimer () const;
|
||||
void startMeasures ();
|
||||
void stopMeasures ();
|
||||
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 unsigned int AnabaticEngine::getDensityMode () const { return _densityMode; }
|
||||
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 AutoSegmentLut& AnabaticEngine::_getAutoSegmentLut () const { return _autoSegmentLut; }
|
||||
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::setSaturateRp ( size_t threshold ) { _configuration->setSaturateRp(threshold); }
|
||||
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 const NetDatas& AnabaticEngine::getNetDatas () const { return _netDatas; }
|
||||
inline void AnabaticEngine::_updateLookup ( GCell* gcell ) { _matrix.updateLookup(gcell); }
|
||||
|
@ -356,8 +369,9 @@ namespace Anabatic {
|
|||
}
|
||||
}
|
||||
|
||||
inline int AnabaticEngine::getStamp () const { return _stamp; }
|
||||
inline int AnabaticEngine::incStamp () { return ++_stamp; }
|
||||
inline const Timer& AnabaticEngine::getTimer () const { return _timer; }
|
||||
inline int AnabaticEngine::getStamp () const { return _stamp; }
|
||||
inline int AnabaticEngine::incStamp () { return ++_stamp; }
|
||||
|
||||
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 Interval getSourceConstraints ( 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;
|
||||
// Modifiers.
|
||||
virtual void setDuSource ( DbU::Unit );
|
||||
|
|
|
@ -215,7 +215,7 @@ namespace Anabatic {
|
|||
// Accessors.
|
||||
inline unsigned long getId () const;
|
||||
inline unsigned int getFlags () const;
|
||||
virtual unsigned int getDirection () const = 0;
|
||||
virtual Flags getDirection () const = 0;
|
||||
inline GCell* getGCell () const;
|
||||
virtual size_t getGCells ( vector<GCell*>& ) const = 0;
|
||||
inline AutoContact* getAutoSource () const;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// 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 Interval getSourceConstraints ( 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;
|
||||
// Modifiers.
|
||||
virtual void setDuSource ( DbU::Unit );
|
||||
|
|
|
@ -50,121 +50,57 @@ namespace Anabatic {
|
|||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Anabatic::Configuration" (decorator).
|
||||
// Class : "Anabatic::Configuration".
|
||||
|
||||
class Configuration {
|
||||
public:
|
||||
// Constructor & Destructor.
|
||||
virtual ~Configuration ();
|
||||
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 CellGauge* cg=NULL, const RoutingGauge* rg=NULL );
|
||||
Configuration ( const Configuration& );
|
||||
Configuration& operator= ( const Configuration& );
|
||||
private:
|
||||
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;
|
||||
virtual ~Configuration ();
|
||||
virtual Configuration* clone () const;
|
||||
// Methods.
|
||||
virtual bool isGMetal ( const Layer* ) const;
|
||||
virtual bool isGContact ( const Layer* ) const;
|
||||
virtual const Layer* getGContactLayer () const;
|
||||
virtual const Layer* getGHorizontalLayer () const;
|
||||
virtual const Layer* getGVerticalLayer () const;
|
||||
virtual size_t getDepth () const;
|
||||
virtual size_t getAllowedDepth () const;
|
||||
virtual size_t getLayerDepth ( const Layer* ) const;
|
||||
virtual CellGauge* getCellGauge () const;
|
||||
virtual RoutingGauge* getRoutingGauge () const;
|
||||
virtual RoutingLayerGauge* getLayerGauge ( size_t depth ) const;
|
||||
virtual const Layer* getRoutingLayer ( size_t depth ) const;
|
||||
virtual Layer* getContactLayer ( size_t depth ) const;
|
||||
virtual DbU::Unit getSliceHeight () const;
|
||||
virtual DbU::Unit getSliceStep () const;
|
||||
virtual DbU::Unit getPitch ( size_t depth, Flags flags ) const;
|
||||
virtual DbU::Unit getOffset ( size_t depth ) const;
|
||||
virtual DbU::Unit getWireWidth ( size_t depth ) const;
|
||||
virtual DbU::Unit getExtensionCap ( size_t depth ) const;
|
||||
virtual Flags getDirection ( size_t depth ) const;
|
||||
virtual DbU::Unit getPitch ( const Layer*, Flags flags ) const;
|
||||
virtual DbU::Unit getOffset ( const Layer* ) const;
|
||||
virtual DbU::Unit getWireWidth ( const Layer* ) const;
|
||||
virtual DbU::Unit getExtensionCap ( const Layer* ) const;
|
||||
virtual Flags getDirection ( const Layer* ) const;
|
||||
virtual float getSaturateRatio () const;
|
||||
virtual size_t getSaturateRp () const;
|
||||
virtual DbU::Unit getGlobalThreshold () const;
|
||||
virtual void setAllowedDepth ( size_t );
|
||||
virtual void setSaturateRatio ( float );
|
||||
virtual void setSaturateRp ( size_t );
|
||||
virtual void setGlobalThreshold ( DbU::Unit );
|
||||
virtual DbU::Unit getEdgeLength () const;
|
||||
virtual DbU::Unit getEdgeWidth () const;
|
||||
virtual float getEdgeCostH () const;
|
||||
virtual float getEdgeCostK () const;
|
||||
virtual float getEdgeHInc () const;
|
||||
virtual size_t getHEdgeLocal () const;
|
||||
virtual size_t getVEdgeLocal () const;
|
||||
virtual void print ( Cell* ) const;
|
||||
virtual Record* _getRecord () const;
|
||||
virtual string _getString () const;
|
||||
virtual string _getTypeName () const;
|
||||
bool isGMetal ( const Layer* ) const;
|
||||
bool isGContact ( const Layer* ) const;
|
||||
const Layer* getGContactLayer () const;
|
||||
const Layer* getGHorizontalLayer () const;
|
||||
const Layer* getGVerticalLayer () const;
|
||||
size_t getDepth () const;
|
||||
size_t getAllowedDepth () const;
|
||||
size_t getLayerDepth ( const Layer* ) const;
|
||||
CellGauge* getCellGauge () const;
|
||||
RoutingGauge* getRoutingGauge () const;
|
||||
RoutingLayerGauge* getLayerGauge ( size_t depth ) const;
|
||||
const Layer* getRoutingLayer ( size_t depth ) const;
|
||||
Layer* getContactLayer ( size_t depth ) const;
|
||||
DbU::Unit getSliceHeight () const;
|
||||
DbU::Unit getSliceStep () const;
|
||||
DbU::Unit getPitch ( size_t depth, Flags flags ) const;
|
||||
DbU::Unit getOffset ( size_t depth ) const;
|
||||
DbU::Unit getWireWidth ( size_t depth ) const;
|
||||
DbU::Unit getExtensionCap ( size_t depth ) const;
|
||||
Flags getDirection ( size_t depth ) const;
|
||||
DbU::Unit getPitch ( const Layer*, Flags flags ) const;
|
||||
DbU::Unit getOffset ( const Layer* ) const;
|
||||
DbU::Unit getWireWidth ( const Layer* ) const;
|
||||
DbU::Unit getExtensionCap ( const Layer* ) const;
|
||||
Flags getDirection ( const Layer* ) const;
|
||||
float getSaturateRatio () const;
|
||||
size_t getSaturateRp () const;
|
||||
DbU::Unit getGlobalThreshold () const;
|
||||
void setAllowedDepth ( size_t );
|
||||
void setSaturateRatio ( float );
|
||||
void setSaturateRp ( size_t );
|
||||
void setGlobalThreshold ( DbU::Unit );
|
||||
DbU::Unit getEdgeLength () const;
|
||||
DbU::Unit getEdgeWidth () const;
|
||||
float getEdgeCostH () const;
|
||||
float getEdgeCostK () const;
|
||||
float getEdgeHInc () const;
|
||||
virtual void print ( Cell* ) const;
|
||||
virtual Record* _getRecord () const;
|
||||
virtual string _getString () const;
|
||||
virtual string _getTypeName () const;
|
||||
protected:
|
||||
// Attributes.
|
||||
const Layer* _gmetalh;
|
||||
|
@ -182,12 +118,9 @@ namespace Anabatic {
|
|||
float _edgeCostH;
|
||||
float _edgeCostK;
|
||||
float _edgeHInc;
|
||||
size_t _hEdgeLocal;
|
||||
size_t _vEdgeLocal;
|
||||
private:
|
||||
ConfigurationConcrete ( const ConfigurationConcrete& );
|
||||
ConfigurationConcrete& operator= ( const ConfigurationConcrete& );
|
||||
void _setTopRoutingLayer ( Name name );
|
||||
Configuration& operator= ( const Configuration& ) = delete;
|
||||
void _setTopRoutingLayer ( Name name );
|
||||
};
|
||||
|
||||
|
||||
|
@ -195,7 +128,5 @@ namespace Anabatic {
|
|||
|
||||
|
||||
INSPECTOR_P_SUPPORT(Anabatic::Configuration);
|
||||
INSPECTOR_P_SUPPORT(Anabatic::ConfigurationConcrete);
|
||||
|
||||
|
||||
#endif // ANABATIC_CONFIGURATION_H
|
||||
|
|
|
@ -24,64 +24,65 @@ namespace Anabatic {
|
|||
|
||||
class Flags : public Hurricane::BaseFlags {
|
||||
public:
|
||||
static const unsigned int NoFlags = 0;
|
||||
static const unsigned int NoFlags ; // = 0;
|
||||
// Flags used for both objects states & functions arguments.
|
||||
static const unsigned int Horizontal = (1 << 0);
|
||||
static const unsigned int Vertical = (1 << 1);
|
||||
static const unsigned int Source = (1 << 2);
|
||||
static const unsigned int Target = (1 << 3);
|
||||
static const unsigned int Invalidated = (1 << 4);
|
||||
static const unsigned int Horizontal ; // = (1 << 0);
|
||||
static const unsigned int Vertical ; // = (1 << 1);
|
||||
static const unsigned int Source ; // = (1 << 2);
|
||||
static const unsigned int Target ; // = (1 << 3);
|
||||
static const unsigned int Invalidated ; // = (1 << 4);
|
||||
// Flags for GCell objects states only.
|
||||
static const unsigned int DeviceGCell = (1 << 5);
|
||||
static const unsigned int ChannelGCell = (1 << 6);
|
||||
static const unsigned int StrutGCell = (1 << 7);
|
||||
static const unsigned int MatrixGCell = (1 << 8);
|
||||
static const unsigned int IoPadGCell = (1 << 9);
|
||||
static const unsigned int Saturated = (1 << 10);
|
||||
static const unsigned int DeviceGCell ; // = (1 << 5);
|
||||
static const unsigned int ChannelGCell ; // = (1 << 6);
|
||||
static const unsigned int StrutGCell ; // = (1 << 7);
|
||||
static const unsigned int MatrixGCell ; // = (1 << 8);
|
||||
static const unsigned int IoPadGCell ; // = (1 << 9);
|
||||
static const unsigned int Saturated ; // = (1 << 10);
|
||||
// Flags for Anabatic objects states only.
|
||||
static const unsigned int DemoMode = (1 << 5);
|
||||
static const unsigned int WarnOnGCellOverload = (1 << 6);
|
||||
static const unsigned int DestroyGCell = (1 << 7);
|
||||
static const unsigned int DestroyBaseContact = (1 << 8);
|
||||
static const unsigned int DestroyBaseSegment = (1 << 9);
|
||||
static const unsigned int DemoMode ; // = (1 << 5);
|
||||
static const unsigned int WarnOnGCellOverload ; // = (1 << 6);
|
||||
static const unsigned int DestroyGCell ; // = (1 << 7);
|
||||
static const unsigned int DestroyBaseContact ; // = (1 << 8);
|
||||
static const unsigned int DestroyBaseSegment ; // = (1 << 9);
|
||||
// Flags for NetDatas objects states only.
|
||||
static const unsigned int GlobalRouted = (1 << 5);
|
||||
static const unsigned int GlobalRouted ; // = (1 << 5);
|
||||
// Masks.
|
||||
static const unsigned int WestSide = Horizontal|Target;
|
||||
static const unsigned int EastSide = Horizontal|Source;
|
||||
static const unsigned int SouthSide = Vertical |Target;
|
||||
static const unsigned int NorthSide = Vertical |Source;
|
||||
static const unsigned int AllSides = WestSide|EastSide|SouthSide|NorthSide ;
|
||||
static const unsigned int EndsMask = Source|Target;
|
||||
static const unsigned int DirectionMask = Horizontal|Vertical;
|
||||
static const unsigned int DestroyMask = DestroyGCell|DestroyBaseContact|DestroyBaseSegment;
|
||||
static const unsigned int GCellTypeMask = DeviceGCell|ChannelGCell|StrutGCell|MatrixGCell|IoPadGCell;
|
||||
static const unsigned int WestSide ; // = Horizontal|Target;
|
||||
static const unsigned int EastSide ; // = Horizontal|Source;
|
||||
static const unsigned int SouthSide ; // = Vertical |Target;
|
||||
static const unsigned int NorthSide ; // = Vertical |Source;
|
||||
static const unsigned int AllSides ; // = WestSide|EastSide|SouthSide|NorthSide ;
|
||||
static const unsigned int EndsMask ; // = Source|Target;
|
||||
static const unsigned int DirectionMask ; // = Horizontal|Vertical;
|
||||
static const unsigned int DestroyMask ; // = DestroyGCell|DestroyBaseContact|DestroyBaseSegment;
|
||||
static const unsigned int GCellTypeMask ; // = DeviceGCell|ChannelGCell|StrutGCell|MatrixGCell|IoPadGCell;
|
||||
// Flags for functions arguments only.
|
||||
static const unsigned int AboveLayer = (1 << 5);
|
||||
static const unsigned int BelowLayer = (1 << 6);
|
||||
static const unsigned int OpenSession = (1 << 7);
|
||||
static const unsigned int Realignate = (1 << 8);
|
||||
static const unsigned int NativeConstraints = (1 << 9);
|
||||
static const unsigned int ForceMove = (1 << 10);
|
||||
static const unsigned int WithPerpands = (1 << 11);
|
||||
static const unsigned int WarnOnError = (1 << 12);
|
||||
static const unsigned int Topology = (1 << 13);
|
||||
static const unsigned int GlobalSegment = (1 << 14);
|
||||
static const unsigned int AllowTerminal = (1 << 15);
|
||||
static const unsigned int AllowLocal = (1 << 16);
|
||||
static const unsigned int IgnoreContacts = (1 << 17);
|
||||
static const unsigned int Propagate = (1 << 18);
|
||||
static const unsigned int Superior = (1 << 19);
|
||||
static const unsigned int DoglegOnLeft = (1 << 20);
|
||||
static const unsigned int DoglegOnRight = (1 << 21);
|
||||
static const unsigned int WithNeighbors = (1 << 22);
|
||||
static const unsigned int NoCheckLayer = (1 << 23);
|
||||
static const unsigned int HalfSlacken = (1 << 24);
|
||||
static const unsigned int NoGCellShrink = (1 << 25);
|
||||
static const unsigned int CParanoid = (1 << 26);
|
||||
static const unsigned int Create = (1 << 27);
|
||||
static const unsigned int CheckLowDensity = (1 << 28);
|
||||
static const unsigned int NoUpdate = (1 << 29);
|
||||
static const unsigned int Create ; // = (1 << 5);
|
||||
static const unsigned int WithPerpands ;
|
||||
static const unsigned int WithSelf ;
|
||||
static const unsigned int AboveLayer ;
|
||||
static const unsigned int BelowLayer ;
|
||||
static const unsigned int OpenSession ;
|
||||
static const unsigned int Realignate ;
|
||||
static const unsigned int NativeConstraints ;
|
||||
static const unsigned int ForceMove ;
|
||||
static const unsigned int WarnOnError ;
|
||||
static const unsigned int Topology ;
|
||||
static const unsigned int GlobalSegment ;
|
||||
static const unsigned int AllowTerminal ;
|
||||
static const unsigned int AllowLocal ;
|
||||
static const unsigned int IgnoreContacts ;
|
||||
static const unsigned int Propagate ;
|
||||
static const unsigned int Superior ;
|
||||
static const unsigned int DoglegOnLeft ;
|
||||
static const unsigned int DoglegOnRight ;
|
||||
static const unsigned int WithNeighbors ;
|
||||
static const unsigned int NoCheckLayer ;
|
||||
static const unsigned int HalfSlacken ;
|
||||
static const unsigned int NoGCellShrink ;
|
||||
static const unsigned int CParanoid ;
|
||||
static const unsigned int CheckLowDensity ;
|
||||
static const unsigned int NoUpdate ;
|
||||
public:
|
||||
inline Flags ( unsigned int flags = NoFlags );
|
||||
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.
|
||||
|
||||
|
|
|
@ -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 unsigned int Vertex::getId () const { return _id; }
|
||||
inline GCell* Vertex::getGCell () const { return _gcell; }
|
||||
|
|
|
@ -164,6 +164,7 @@ namespace Anabatic {
|
|||
GCell* getEast ( DbU::Unit y ) const;
|
||||
GCell* getSouth ( 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;
|
||||
inline GCell* getUnder ( Point p ) const;
|
||||
GCell* hcut ( DbU::Unit y );
|
||||
|
@ -215,6 +216,7 @@ namespace Anabatic {
|
|||
void updateContacts ();
|
||||
size_t updateDensity ();
|
||||
inline void updateKey ( size_t depth );
|
||||
void truncDensities ();
|
||||
bool stepBalance ( size_t depth, Set& invalidateds );
|
||||
void rpDesaturate ( set<Net*>& );
|
||||
bool stepDesaturate ( size_t depth
|
||||
|
@ -445,6 +447,8 @@ namespace Anabatic {
|
|||
// Utilities.
|
||||
|
||||
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.
|
||||
|
|
|
@ -69,83 +69,83 @@ namespace Anabatic {
|
|||
class Session {
|
||||
public:
|
||||
// Static Methods.
|
||||
static inline bool doDestroyBaseContact ();
|
||||
static inline bool doDestroyBaseSegment ();
|
||||
static inline bool doDestroyTool ();
|
||||
static bool isInDemoMode ();
|
||||
static bool doWarnGCellOverload ();
|
||||
static Session* get ( const char* message=NULL );
|
||||
static inline Technology* getTechnology ();
|
||||
static inline AnabaticEngine* getAnabatic ();
|
||||
static inline const Configuration* getConfiguration ();
|
||||
static float getSaturateRatio ();
|
||||
static size_t getSaturateRp ();
|
||||
static inline size_t getAllowedDepth ();
|
||||
static DbU::Unit getExtensionCap ();
|
||||
static inline CellGauge* getCellGauge ();
|
||||
static inline DbU::Unit getSliceHeight ();
|
||||
static inline DbU::Unit getSliceStep ();
|
||||
static inline RoutingGauge* getRoutingGauge ();
|
||||
static inline RoutingLayerGauge* getLayerGauge ( size_t depth );
|
||||
static inline size_t getDepth ();
|
||||
static inline size_t getViaDepth ( const Layer* layer );
|
||||
static inline size_t getLayerDepth ( const Layer* layer );
|
||||
static inline const Layer* getRoutingLayer ( size_t );
|
||||
static inline const Layer* getContactLayer ( size_t );
|
||||
static unsigned int getDirection ( size_t depth );
|
||||
static inline DbU::Unit getPitch ( size_t depth, unsigned int flags );
|
||||
static inline DbU::Unit getOffset ( size_t depth );
|
||||
static inline DbU::Unit getWireWidth ( size_t depth );
|
||||
static inline DbU::Unit getViaWidth ( size_t depth );
|
||||
static inline unsigned int getDirection ( const Layer* );
|
||||
static inline DbU::Unit getPitch ( const Layer*, unsigned int flags );
|
||||
static inline DbU::Unit getOffset ( const Layer* );
|
||||
static inline DbU::Unit getWireWidth ( const Layer* );
|
||||
static inline DbU::Unit getViaWidth ( const Layer* );
|
||||
static inline DbU::Unit getExtensionCap ( const Layer* );
|
||||
static inline size_t getSegmentStackSize ();
|
||||
static inline size_t getContactStackSize ();
|
||||
static inline const vector<AutoSegment*>& getInvalidateds ();
|
||||
static inline const vector<AutoSegment*>& getRevalidateds ();
|
||||
static inline const set<AutoSegment*>& getDestroyeds ();
|
||||
static inline const vector<AutoSegment*>& getDoglegs ();
|
||||
static inline const set<Net*>& getNetsModificateds ();
|
||||
static Session* open ( AnabaticEngine* );
|
||||
static void close ();
|
||||
static void setAnabaticFlags ( unsigned int );
|
||||
static inline void dogleg ( AutoSegment* );
|
||||
static inline void doglegReset ();
|
||||
static inline void revalidateTopology ();
|
||||
static inline void setInvalidateMask ( unsigned int );
|
||||
static inline void invalidate ( Net* );
|
||||
static inline void invalidate ( AutoContact* );
|
||||
static inline void invalidate ( AutoSegment* );
|
||||
static inline size_t revalidate ();
|
||||
static void link ( AutoContact* );
|
||||
static void link ( AutoSegment* );
|
||||
static void unlink ( AutoContact* );
|
||||
static void unlink ( AutoSegment* );
|
||||
static AutoContact* lookup ( Contact* );
|
||||
static AutoSegment* lookup ( Segment* );
|
||||
static inline void destroyRequest ( AutoSegment* );
|
||||
static inline bool doDestroyBaseContact ();
|
||||
static inline bool doDestroyBaseSegment ();
|
||||
static inline bool doDestroyTool ();
|
||||
static bool isInDemoMode ();
|
||||
static bool doWarnGCellOverload ();
|
||||
static Session* get ( const char* message=NULL );
|
||||
static inline Technology* getTechnology ();
|
||||
static inline AnabaticEngine* getAnabatic ();
|
||||
static inline const Configuration* getConfiguration ();
|
||||
static float getSaturateRatio ();
|
||||
static size_t getSaturateRp ();
|
||||
static inline size_t getAllowedDepth ();
|
||||
static DbU::Unit getExtensionCap ();
|
||||
static inline CellGauge* getCellGauge ();
|
||||
static inline DbU::Unit getSliceHeight ();
|
||||
static inline DbU::Unit getSliceStep ();
|
||||
static inline RoutingGauge* getRoutingGauge ();
|
||||
static inline RoutingLayerGauge* getLayerGauge ( size_t depth );
|
||||
static inline size_t getDepth ();
|
||||
static inline size_t getViaDepth ( const Layer* layer );
|
||||
static inline size_t getLayerDepth ( const Layer* layer );
|
||||
static inline const Layer* getRoutingLayer ( size_t );
|
||||
static inline const Layer* getContactLayer ( size_t );
|
||||
static unsigned int getDirection ( size_t depth );
|
||||
static inline DbU::Unit getPitch ( size_t depth, unsigned int flags );
|
||||
static inline DbU::Unit getOffset ( size_t depth );
|
||||
static inline DbU::Unit getWireWidth ( size_t depth );
|
||||
static inline DbU::Unit getViaWidth ( size_t depth );
|
||||
static inline unsigned int getDirection ( const Layer* );
|
||||
static inline DbU::Unit getPitch ( const Layer*, unsigned int flags );
|
||||
static inline DbU::Unit getOffset ( const Layer* );
|
||||
static inline DbU::Unit getWireWidth ( const Layer* );
|
||||
static inline DbU::Unit getViaWidth ( const Layer* );
|
||||
static inline DbU::Unit getExtensionCap ( const Layer* );
|
||||
static inline size_t getSegmentStackSize ();
|
||||
static inline size_t getContactStackSize ();
|
||||
static inline const vector<AutoSegment*>& getInvalidateds ();
|
||||
static inline const vector<AutoSegment*>& getRevalidateds ();
|
||||
static inline const set<AutoSegment*>& getDestroyeds ();
|
||||
static inline const vector<AutoSegment*>& getDoglegs ();
|
||||
static inline const set<Net*>& getNetsModificateds ();
|
||||
static void close ();
|
||||
static void setAnabaticFlags ( unsigned int );
|
||||
static inline void dogleg ( AutoSegment* );
|
||||
static inline void doglegReset ();
|
||||
static inline void revalidateTopology ();
|
||||
static inline void setInvalidateMask ( unsigned int );
|
||||
static inline void invalidate ( Net* );
|
||||
static inline void invalidate ( AutoContact* );
|
||||
static inline void invalidate ( AutoSegment* );
|
||||
static inline size_t revalidate ();
|
||||
static void link ( AutoContact* );
|
||||
static void link ( AutoSegment* );
|
||||
static void unlink ( AutoContact* );
|
||||
static void unlink ( AutoSegment* );
|
||||
static AutoContact* lookup ( Contact* );
|
||||
static AutoSegment* lookup ( Segment* );
|
||||
static inline void destroyRequest ( AutoSegment* );
|
||||
// Methods.
|
||||
bool _doDestroyBaseContact ();
|
||||
bool _doDestroyBaseSegment ();
|
||||
bool _doDestroyTool ();
|
||||
virtual Configuration* _getConfiguration ();
|
||||
inline void _dogleg ( AutoSegment* );
|
||||
inline void _doglegReset ();
|
||||
void _invalidate ( Net* );
|
||||
inline void _invalidate ( AutoContact* );
|
||||
inline void _invalidate ( AutoSegment* );
|
||||
inline void _destroyRequest ( AutoSegment* );
|
||||
void _canonize ();
|
||||
void _revalidateTopology ();
|
||||
size_t _revalidate ();
|
||||
DbU::Unit _getPitch ( size_t depth, unsigned int flags ) const;
|
||||
Record* _getRecord () const;
|
||||
string _getString () const;
|
||||
inline string _getTypeName () const;
|
||||
static Session* _open ( AnabaticEngine* );
|
||||
bool _doDestroyBaseContact ();
|
||||
bool _doDestroyBaseSegment ();
|
||||
bool _doDestroyTool ();
|
||||
virtual Configuration* _getConfiguration ();
|
||||
inline void _dogleg ( AutoSegment* );
|
||||
inline void _doglegReset ();
|
||||
void _invalidate ( Net* );
|
||||
inline void _invalidate ( AutoContact* );
|
||||
inline void _invalidate ( AutoSegment* );
|
||||
inline void _destroyRequest ( AutoSegment* );
|
||||
void _canonize ();
|
||||
void _revalidateTopology ();
|
||||
virtual size_t _revalidate ();
|
||||
DbU::Unit _getPitch ( size_t depth, unsigned int flags ) const;
|
||||
Record* _getRecord () const;
|
||||
string _getString () const;
|
||||
inline string _getTypeName () const;
|
||||
|
||||
protected:
|
||||
static Session* _session;
|
||||
|
|
|
@ -20,6 +20,7 @@ projects = [
|
|||
#, "metis"
|
||||
#, "mauka"
|
||||
, "anabatic"
|
||||
, "katana"
|
||||
, "knik"
|
||||
, "katabatic"
|
||||
, "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
|
||||
<</Subtype/Type1C/Filter/FlateDecode/Length 5628>>
|
||||
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
|
||||
┴╛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ЗЙ:▄?
А
|
||||
ТБVШ-*
|
||||
_:?;&%QК(Z≤©╫rШ╚с_²╬\y∙э$╞╡Н╤^°V┘AБ°КН·Я╠%и÷╖ЛJш∙ЖeЗ╬║<ЦХбK8t╝⌡О"ъXъ╒┴╚`(Ж=Uтё≥ЯЩVt╓М6*~AV |