diff --git a/anabatic/src/LoadGlobalRouting.cpp b/anabatic/src/LoadGlobalRouting.cpp index a18752de..38fdc6dc 100644 --- a/anabatic/src/LoadGlobalRouting.cpp +++ b/anabatic/src/LoadGlobalRouting.cpp @@ -2171,6 +2171,12 @@ namespace { return; } + if (rpM1s.empty()) { + cerr << Error( "No METAL1 in Single GCell for Net \"%s\".", getString(net->getName()).c_str() ) << endl; + cdebug_tabw(145,-1); + return; + } + sort( rpM1s.begin(), rpM1s.end(), SortRpByX(NoFlags) ); // increasing X. GCell* gcell1 = anbt->getGCellUnder( (*rpM1s.begin ())->getCenter() ); diff --git a/anabatic/src/anabatic/Dijkstra.h b/anabatic/src/anabatic/Dijkstra.h index 333147a8..8a05fa7f 100644 --- a/anabatic/src/anabatic/Dijkstra.h +++ b/anabatic/src/anabatic/Dijkstra.h @@ -407,7 +407,8 @@ namespace Anabatic { inline bool isSourceVertex ( Vertex* ) const; inline bool isTargetVertex ( Vertex* ) const; inline DbU::Unit getSearchAreaHalo () const; - inline void setDistance ( distance_t ); + template + inline DistanceT* setDistance ( DistanceT ); inline void setSearchAreaHalo ( DbU::Unit ); void load ( Net* ); void run ( Mode mode=Mode::Standart ); @@ -449,9 +450,10 @@ namespace Anabatic { inline bool Dijkstra::isSourceVertex ( Vertex* v ) const { return (_sources.find(v) != _sources.end()); } inline bool Dijkstra::isTargetVertex ( Vertex* v ) const { return (_targets.find(v) != _targets.end()); } inline DbU::Unit Dijkstra::getSearchAreaHalo () const { return _searchAreaHalo; } - inline void Dijkstra::setDistance ( distance_t cb ) { _distanceCb = cb; } inline void Dijkstra::setSearchAreaHalo ( DbU::Unit halo ) { _searchAreaHalo = halo; } + template + inline DistanceT* Dijkstra::setDistance ( DistanceT cb ) { _distanceCb = cb; return _distanceCb.target(); } } // Anabatic namespace. diff --git a/bootstrap/coriolisEnv.py b/bootstrap/coriolisEnv.py index b6ba9261..8bfc0f9c 100755 --- a/bootstrap/coriolisEnv.py +++ b/bootstrap/coriolisEnv.py @@ -129,7 +129,27 @@ def guessOs (): libDir = 'lib' return (osType,libDir,useDevtoolset2) - + + +def guessCsh (): + cshBins = [ '/usr/bin/tcsh' + , '/bin/tcsh' + , '/usr/pkg/bin/tcsh' + , '/usr/bin/csh' + , '/bin/csh' + , '/usr/pkg/bin/csh' + ] + for cshBin in cshBins: + if os.path.isfile(cshBin): return cshBin + return None + + +def guessShell (): + if os.environ.has_key('SHELL'): return os.environ['SHELL'] + + # If SHELL is not set, it is likely we are under C-Shell variant. + # Look for standard places where the binaries are expecteds. + return guessCsh() @@ -139,6 +159,7 @@ if __name__ == "__main__": buildType = "Release" linkType = "Shared" rootDir = None + shellBin = guessShell() parser = optparse.OptionParser () # Build relateds. @@ -155,12 +176,17 @@ if __name__ == "__main__": parser.add_option ( "--root" , action="store" , type="string", dest="rootDir" ) ( options, args ) = parser.parse_args () - if options.release: buildType = "Release" - if options.debug: buildType = "Debug" - if options.devel: buildType = "Debug" - if options.static: linkType = "Static" - if options.shared: linkType = "Shared" - if options.rootDir: rootDir = options.rootDir + if options.csh: shellBin = guessCsh() + if options.release: buildType = "Release" + if options.debug: buildType = "Debug" + if options.devel: buildType = "Debug" + if options.static: linkType = "Static" + if options.shared: linkType = "Shared" + if options.rootDir: rootDir = options.rootDir + + if not shellBin: + print 'echo "[ERROR] coriolisEnv.py was not able to guess/find the current shell interpeter."' + sys.exit( 1 ) strippedPath = stripPath ( "PATH" ) strippedLibraryPath = stripPath ( "LD_LIBRARY_PATH" ) @@ -246,11 +272,11 @@ if __name__ == "__main__": if osType == "Darwin": shellScriptSh += 'DYLD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";' \ 'export DYLD_LIBRARY_PATH;' - shellScriptCsh += 'setenv DYLD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";' + shellScriptCsh += 'setenv DYLD_LIBRARY_PATH "%(LD_LIBRARY_PATH)s";' else: shellScriptSh += 'LD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";' \ 'export LD_LIBRARY_PATH;' - shellScriptCsh += 'setenv LD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";' + shellScriptCsh += 'setenv LD_LIBRARY_PATH "%(LD_LIBRARY_PATH)s";' shellScriptSh += "hash -r;" shellScriptCsh += "rehash;" @@ -258,6 +284,9 @@ if __name__ == "__main__": if options.csh: shellScript = shellScriptCsh else: shellScript = shellScriptSh + if useDevtoolset2: + shellScript += ' scl enable devtoolset-2 %(SHELL)s' + evalScript = shellScript % { "PATH" : strippedPath , "LD_LIBRARY_PATH" : strippedLibraryPath , "PYTHONPATH" : strippedPythonPath @@ -266,10 +295,8 @@ if __name__ == "__main__": , "SYSCONF_DIR" : sysconfDir , "MESSAGE" : shellMessage , "buildDir" : buildDir + , 'SHELL' : shellBin } - if useDevtoolset2: - evalScript = '%s scl enable devtoolset-2 ${SHELL}' % evalScript - if options.queryISysRoot: print '%s/%s' % (rootDir,osType) sys.exit( 0 ) @@ -279,3 +306,4 @@ if __name__ == "__main__": sys.exit( 0 ) print evalScript + sys.exit( 0 ) diff --git a/crlcore/etc/common/display.conf b/crlcore/etc/common/display.conf index 215131c8..ca855467 100644 --- a/crlcore/etc/common/display.conf +++ b/crlcore/etc/common/display.conf @@ -63,10 +63,10 @@ stylesTable = \ # Group: MIM6. , (Group , 'MIM6') - #, (Drawing, 'topmim6', { 'color':'Blue' , 'pattern':'poids2.8' , 'threshold':0.80*scale }) - , (Drawing, 'metbot' , { 'color':'Aqua' , 'pattern':'light_antihash0.8', 'threshold':0.80*scale }) - , (Drawing, 'cut6' , { 'color':'LightPink', 'pattern':'light_antihash1.8', 'threshold':0.80*scale }) - , (Drawing, 'metal7' , { 'color':'Green' , 'pattern':'light_antihash2.8', 'threshold':0.80*scale }) + #, (Drawing, 'topmim6' , { 'color':'Blue' , 'pattern':'poids2.8' , 'threshold':0.80*scale }) + , (Drawing, 'metbot_r', { 'color':'Aqua' , 'pattern':'light_antihash0.8', 'threshold':0.80*scale }) + , (Drawing, 'cut6' , { 'color':'LightPink', 'pattern':'light_antihash1.8', 'threshold':0.80*scale }) + , (Drawing, 'metal7' , { 'color':'Green' , 'pattern':'light_antihash2.8', 'threshold':0.80*scale }) # Group: Blockages. , (Group , 'Blockages') @@ -168,10 +168,10 @@ stylesTable = \ # MIM6. , (Group , 'MIM6') - #, (Drawing, 'topmim6', { 'color':'Blue' , 'pattern':'poids2.32' , 'threshold':0.80*scale }) - , (Drawing, 'metbot' , { 'color':'Aqua' , 'pattern':'light_antihash0.8' , 'threshold':0.80*scale }) - #, (Drawing, 'padopen', { 'color':'LightPink', 'pattern':'light_antihash1.8' , 'threshold':0.80*scale }) - , (Drawing, 'metal7' , { 'color':'Green' , 'pattern':'light_antihash2.8' , 'threshold':0.80*scale }) + #, (Drawing, 'topmim6' , { 'color':'Blue' , 'pattern':'poids2.32' , 'threshold':0.80*scale }) + , (Drawing, 'metbot_r', { 'color':'Aqua' , 'pattern':'light_antihash0.8' , 'threshold':0.80*scale }) + #, (Drawing, 'padopen' , { 'color':'LightPink', 'pattern':'light_antihash1.8' , 'threshold':0.80*scale }) + , (Drawing, 'metal7' , { 'color':'Green' , 'pattern':'light_antihash2.8' , 'threshold':0.80*scale }) # Blockages. , (Group , 'Blockages') @@ -344,10 +344,10 @@ stylesTable = \ # Group: MIM6. , (Group , 'MIM6') - #, (Drawing, 'topmim6', { 'color':'Blue' , 'pattern':'poids2.8' , 'threshold':0.80*scale }) - , (Drawing, 'metbot' , { 'color':'Aqua' , 'pattern':'light_antihash0.8', 'threshold':0.80*scale }) - , (Drawing, 'cut6' , { 'color':'LightPink', 'pattern':'light_antihash1.8', 'threshold':0.80*scale }) - , (Drawing, 'metal7' , { 'color':'Green' , 'pattern':'light_antihash2.8', 'threshold':0.80*scale }) + #, (Drawing, 'topmim6' , { 'color':'Blue' , 'pattern':'poids2.8' , 'threshold':0.80*scale }) + , (Drawing, 'metbot_r', { 'color':'Aqua' , 'pattern':'light_antihash0.8', 'threshold':0.80*scale }) + , (Drawing, 'cut6' , { 'color':'LightPink', 'pattern':'light_antihash1.8', 'threshold':0.80*scale }) + , (Drawing, 'metal7' , { 'color':'Green' , 'pattern':'light_antihash2.8', 'threshold':0.80*scale }) # Group: Blockages. , (Group , 'Blockages') diff --git a/crlcore/etc/common/technology.conf b/crlcore/etc/common/technology.conf index a122865e..cde97b73 100644 --- a/crlcore/etc/common/technology.conf +++ b/crlcore/etc/common/technology.conf @@ -54,7 +54,7 @@ realLayersTable = \ , ('cut7' , BasicLayer.Material.cut ) , ('metal8' , BasicLayer.Material.metal ) #, ('topmim6' , BasicLayer.Material.other ) # For Capacitances & Pads. - #, ('metbot' , BasicLayer.Material.other ) + , ('metbot_r' , BasicLayer.Material.other ) #, ('padopen' , BasicLayer.Material.other ) #, ('alucap' , BasicLayer.Material.other ) diff --git a/hurricane/src/isobar/hurricane/isobar/PyHurricane.h b/hurricane/src/isobar/hurricane/isobar/PyHurricane.h index e01b91c6..aa1e266c 100644 --- a/hurricane/src/isobar/hurricane/isobar/PyHurricane.h +++ b/hurricane/src/isobar/hurricane/isobar/PyHurricane.h @@ -136,11 +136,11 @@ namespace Isobar { if (PyObject_IsInstance(object,(PyObject*)&PyInt_Type )) value = PyInt_AsLong ( object ); else if (PyObject_IsInstance(object,(PyObject*)&PyLong_Type)) value = PyLong_AsLongLong( object ); - if (value > numeric_limits::max()) { - throw Error( "PyAny_AsLong(): Suspiciously big int %s, db:%li" - , DbU::getValueString(value).c_str(), value - ); - } + //if (value > numeric_limits::max()) { + // throw Error( "PyAny_AsLong(): Suspiciously big int %s, db:%lli" + // , DbU::getValueString(value).c_str(), value + // ); + //} return value; } diff --git a/katana/src/GlobalRoute.cpp b/katana/src/GlobalRoute.cpp index 27fc582f..a5758363 100644 --- a/katana/src/GlobalRoute.cpp +++ b/katana/src/GlobalRoute.cpp @@ -154,10 +154,10 @@ namespace Katana { float edgeHInc = getConfiguration()->getEdgeHInc(); openSession(); - Dijkstra* dijkstra = new Dijkstra ( this ); - DigitalDistance distance ( getConfiguration()->getEdgeCostH() - , getConfiguration()->getEdgeCostK() ); - dijkstra->setDistance( distance ); + Dijkstra* dijkstra = new Dijkstra ( this ); + DigitalDistance* distance = + dijkstra->setDistance( DigitalDistance( getConfiguration()->getEdgeCostH() + , getConfiguration()->getEdgeCostK() )); size_t iteration = 0; size_t netCount = 0; @@ -168,7 +168,7 @@ namespace Katana { for ( NetData* netData : getNetOrdering() ) { if (netData->isGlobalRouted()) continue; - distance.setNet( netData->getNet() ); + distance->setNet( netData->getNet() ); dijkstra->load( netData->getNet() ); dijkstra->run(); ++netCount; diff --git a/katana/src/RoutingEvent.cpp b/katana/src/RoutingEvent.cpp index 1f3bbc18..79c9dfc4 100644 --- a/katana/src/RoutingEvent.cpp +++ b/katana/src/RoutingEvent.cpp @@ -1,4 +1,4 @@ -// -*- C++ -*- +// -*- mode: C++; explicit-buffer-name: "RoutingEvent.cpp" -*- // // This file is part of the Coriolis Software. // Copyright (c) UPMC 2008-2016, All Rights Reserved @@ -476,8 +476,7 @@ namespace Katana { _axisHistory = _segment->getAxis(); _eventLevel = 0; cdebug_log(9000,0) << "Deter| addInsertEvent() @" << fsm.getCost(itrack).getTrack() << endl; - if (not _segment->isReduced()) - Session::addInsertEvent( _segment, fsm.getCost(itrack).getTrack() ); + Session::addInsertEvent( _segment, fsm.getCost(itrack).getTrack() ); fsm.setState( SegmentFsm::SelfInserted ); } else { // Do ripup. diff --git a/katana/src/Session.cpp b/katana/src/Session.cpp index 1c912158..051d168c 100644 --- a/katana/src/Session.cpp +++ b/katana/src/Session.cpp @@ -153,11 +153,12 @@ namespace Katana { _doRemovalEvents(); - for ( size_t i=0 ; i<_insertEvents.size() ; ++i ) { - if (_insertEvents[i]._segment) { - _insertEvents[i]._track->insert( _insertEvents[i]._segment ); + for ( const Event& event : _insertEvents ) { + if (event._segment) { + if (event._segment->isReduced()) event._segment->setAxis( event._track->getAxis() ); + else event._track->insert( event._segment ); } - if (_insertEvents[i]._marker) _insertEvents[i]._track->insert( _insertEvents[i]._marker ); + if (event._marker) event._track->insert( event._marker ); } _insertEvents.clear(); diff --git a/kite/src/KiteEngine.cpp b/kite/src/KiteEngine.cpp index d4fc36ef..493ef554 100644 --- a/kite/src/KiteEngine.cpp +++ b/kite/src/KiteEngine.cpp @@ -218,6 +218,7 @@ namespace Kite { UpdateSession::open(); for ( Net* net : cell->getNets() ) { + if (net->isClock() or net->isSupply()) continue; if (NetRoutingExtension::isManualGlobalRoute(net)) continue; // First pass: destroy the contacts @@ -227,8 +228,14 @@ namespace Kite { if (contact and not contact->getAnchorHook()->isAttached()) contacts.push_back( contact ); } - for ( Contact* contact : contacts ) - contact->destroy(); + for ( Contact* contact : contacts ) contact->destroy(); + + contacts.clear(); + for ( Component* component : net->getComponents() ) { + Contact* contact = dynamic_cast(component); + if (contact) contacts.push_back( contact ); + } + for ( Contact* contact : contacts ) contact->destroy(); // Second pass: destroy unconnected segments added by Knik as blockages std::vector segments; diff --git a/kite/src/RoutingEvent.cpp b/kite/src/RoutingEvent.cpp index a1c4f37c..bbe1dc27 100644 --- a/kite/src/RoutingEvent.cpp +++ b/kite/src/RoutingEvent.cpp @@ -476,8 +476,7 @@ namespace Kite { _axisHistory = _segment->getAxis(); _eventLevel = 0; cdebug_log(9000,0) << "Deter| addInsertEvent() @" << fsm.getCost(itrack).getTrack() << endl; - if (not _segment->isReduced()) - Session::addInsertEvent( _segment, fsm.getCost(itrack).getTrack() ); + Session::addInsertEvent( _segment, fsm.getCost(itrack).getTrack() ); fsm.setState( SegmentFsm::SelfInserted ); } else { // Do ripup. diff --git a/kite/src/Session.cpp b/kite/src/Session.cpp index 978d7616..930d1341 100644 --- a/kite/src/Session.cpp +++ b/kite/src/Session.cpp @@ -155,11 +155,12 @@ namespace Kite { _doRemovalEvents(); - for ( size_t i=0 ; i<_insertEvents.size() ; ++i ) { - if (_insertEvents[i]._segment) { - _insertEvents[i]._track->insert( _insertEvents[i]._segment ); + for ( const Event& event : _insertEvents ) { + if (event._segment) { + if (event._segment->isReduced()) event._segment->setAxis( event._track->getAxis() ); + else event._track->insert( event._segment ); } - if (_insertEvents[i]._marker) _insertEvents[i]._track->insert( _insertEvents[i]._marker ); + if (event._marker) event._track->insert( event._marker ); } _insertEvents.clear();