Added missing UpdateSession in Stratus & Plugins.

* Bug: In Cumulus & Stratus, now that creation of Hurricane objects must be
    enclosed in UpdateSession, has to adds them into Python code.
* Bug: In Anabatic & Katana, in the global routing stage suspend the timed
    bewteen ripup steps instead of resetting it.
This commit is contained in:
Jean-Paul Chaput 2016-09-11 13:20:05 +02:00
parent ce00b37cbf
commit 5435ca1933
6 changed files with 22 additions and 3 deletions

View File

@ -958,6 +958,14 @@ namespace Anabatic {
{ _timer.stop(); } { _timer.stop(); }
void AnabaticEngine::suspendMeasures ()
{ _timer.suspend(); }
void AnabaticEngine::resumeMeasures ()
{ _timer.resume(); }
void AnabaticEngine::printMeasures ( const string& tag ) const void AnabaticEngine::printMeasures ( const string& tag ) const
{ {
ostringstream result; ostringstream result;

View File

@ -278,6 +278,8 @@ namespace Anabatic {
inline const Timer& getTimer () const; inline const Timer& getTimer () const;
void startMeasures (); void startMeasures ();
void stopMeasures (); void stopMeasures ();
void suspendMeasures ();
void resumeMeasures ();
void printMeasures ( const string& ) const; void printMeasures ( const string& ) const;
inline void _add ( GCell* ); inline void _add ( GCell* );
inline void _remove ( GCell* ); inline void _remove ( GCell* );

View File

@ -538,6 +538,7 @@ class Corona ( object ):
if self.horizontalDepth > self.verticalDepth: if self.horizontalDepth > self.verticalDepth:
contactDepth = self.verticalDepth contactDepth = self.verticalDepth
UpdateSession.open()
for i in range(self._railsNb): for i in range(self._railsNb):
xBL = self._westSide .getRail(i).axis xBL = self._westSide .getRail(i).axis
yBL = self._southSide.getRail(i).axis yBL = self._southSide.getRail(i).axis
@ -582,4 +583,5 @@ class Corona ( object ):
self._westSide.addBlockages() self._westSide.addBlockages()
self._eastSide.addBlockages() self._eastSide.addBlockages()
UpdateSession.close()
return return

View File

@ -105,6 +105,7 @@ class HTree ( GaugeConfWrapper ):
raise ErrorMessage( 3, 'ClockTree: clockTree.minimumSide (%g) is less than 100 lambda.' \ raise ErrorMessage( 3, 'ClockTree: clockTree.minimumSide (%g) is less than 100 lambda.' \
% DbU.toLambda(self.minSide) ) % DbU.toLambda(self.minSide) )
UpdateSession.open()
self.framework = CRL.AllianceFramework.get() self.framework = CRL.AllianceFramework.get()
self.cell = cell self.cell = cell
self.area = area self.area = area
@ -126,6 +127,7 @@ class HTree ( GaugeConfWrapper ):
if not self.masterClock: if not self.masterClock:
raise ErrorMessage( 3, 'ClockTree: Cell %s has no clock net.' % cell.getName() ) raise ErrorMessage( 3, 'ClockTree: Cell %s has no clock net.' % cell.getName() )
self._createChildNet( self.topBuffer, 'ck_htree' ) self._createChildNet( self.topBuffer, 'ck_htree' )
UpdateSession.close()
return return
@ -371,6 +373,7 @@ class HTreeNode ( object ):
DownBranch = 0x0010 DownBranch = 0x0010
def __init__ ( self, topTree, sourceBuffer, area, prefix, flags ): def __init__ ( self, topTree, sourceBuffer, area, prefix, flags ):
UpdateSession.open()
self.topTree = topTree self.topTree = topTree
self.childs = [] self.childs = []
self.blLeafs = [] self.blLeafs = []
@ -406,6 +409,7 @@ class HTreeNode ( object ):
self.childs.append( HTreeNode( self.topTree, self.tlBuffer, self.tlArea(), self.prefix+'_tl', 0 ) ) self.childs.append( HTreeNode( self.topTree, self.tlBuffer, self.tlArea(), self.prefix+'_tl', 0 ) )
self.childs.append( HTreeNode( self.topTree, self.trBuffer, self.trArea(), self.prefix+'_tr', 0 ) ) self.childs.append( HTreeNode( self.topTree, self.trBuffer, self.trArea(), self.prefix+'_tr', 0 ) )
UpdateSession.close()
return return
def xmin ( self ): return self.area.getXMin() def xmin ( self ): return self.area.getXMin()

View File

@ -150,7 +150,7 @@ namespace Katana {
annotateGlobalGraph(); annotateGlobalGraph();
startMeasures(); startMeasures();
cmess1 << " o Running global routing..." << endl; cmess1 << " o Running global routing." << endl;
float edgeHInc = getConfiguration()->getEdgeHInc(); float edgeHInc = getConfiguration()->getEdgeHInc();
@ -198,10 +198,10 @@ namespace Katana {
dijkstra->setSearchAreaHalo( Session::getSliceHeight()*3 ); dijkstra->setSearchAreaHalo( Session::getSliceHeight()*3 );
cmess2 << " ripup:" << setw(4) << netCount << right; cmess2 << " ripup:" << setw(4) << netCount << right;
stopMeasures(); suspendMeasures();
cmess2 << " " << setw(10) << Timer::getStringTime (getTimer().getCombTime()) cmess2 << " " << setw(10) << Timer::getStringTime (getTimer().getCombTime())
<< " " << setw( 6) << Timer::getStringMemory(getTimer().getIncrease()) << endl; << " " << setw( 6) << Timer::getStringMemory(getTimer().getIncrease()) << endl;
startMeasures(); resumeMeasures();
++iteration; ++iteration;
} while ( (netCount > 0) and (iteration < 5) ); } while ( (netCount > 0) and (iteration < 5) );

View File

@ -32,6 +32,7 @@ try:
print ' - Netlist format: <%s>.' % Cfg.getParamString('stratus1.format').asString() print ' - Netlist format: <%s>.' % Cfg.getParamString('stratus1.format').asString()
print ' - Simulator: <%s>.' % Cfg.getParamString('stratus1.simulator').asString() print ' - Simulator: <%s>.' % Cfg.getParamString('stratus1.simulator').asString()
from Hurricane import UpdateSession
from st_model import * from st_model import *
from st_net import * from st_net import *
from st_instance import * from st_instance import *
@ -82,6 +83,7 @@ def buildModel ( moduleName, flags, className=None, modelName=None, parameters={
print '[ERROR] Stratus module <%s> do not contains a design named <%s>.' % (moduleName,className) print '[ERROR] Stratus module <%s> do not contains a design named <%s>.' % (moduleName,className)
sys.exit(1) sys.exit(1)
UpdateSession.open()
print ' - Generating Stratus Model <%s> (generator:<%s>).' % (modelName, className) print ' - Generating Stratus Model <%s> (generator:<%s>).' % (modelName, className)
model = module.__dict__[className](modelName,parameters) model = module.__dict__[className](modelName,parameters)
model.Interface() model.Interface()
@ -93,6 +95,7 @@ def buildModel ( moduleName, flags, className=None, modelName=None, parameters={
if flags & DoStop: stopLevel = 1 if flags & DoStop: stopLevel = 1
model.View(stopLevel, 'Model %s' % modelName) model.View(stopLevel, 'Model %s' % modelName)
model.Save(LOGICAL|PHYSICAL) model.Save(LOGICAL|PHYSICAL)
UpdateSession.close()
except ImportError, e: except ImportError, e:
module = str(e).split()[-1] module = str(e).split()[-1]