Merge branch 'devel_anabatic' of ssh://bop.soc.lip6.fr/users/largo2/git/coriolis into devel_anabatic

This commit is contained in:
EricLaoGitHub 2017-02-14 15:52:08 +01:00
commit 4559ec38b9
12 changed files with 95 additions and 52 deletions

View File

@ -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() );

View File

@ -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<typename DistanceT>
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<typename DistanceT>
inline DistanceT* Dijkstra::setDistance ( DistanceT cb ) { _distanceCb = cb; return _distanceCb.target<DistanceT>(); }
} // Anabatic namespace.

View File

@ -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 )

View File

@ -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')

View File

@ -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 )

View File

@ -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<int>::max()) {
throw Error( "PyAny_AsLong(): Suspiciously big int %s, db:%li"
, DbU::getValueString(value).c_str(), value
);
}
//if (value > numeric_limits<int>::max()) {
// throw Error( "PyAny_AsLong(): Suspiciously big int %s, db:%lli"
// , DbU::getValueString(value).c_str(), value
// );
//}
return value;
}

View File

@ -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;

View File

@ -1,4 +1,4 @@
// -*- C++ -*-
// -*- mode: C++; explicit-buffer-name: "RoutingEvent.cpp<katana>" -*-
//
// 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.

View File

@ -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();

View File

@ -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<Contact*>(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<Component*> segments;

View File

@ -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.

View File

@ -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();