Correct way too slow clock-tree. Backport Katana fixes to Kite.

* Bug: In Hurricane::Net::setExternal(), do not perform an UpdateSession
    inside this function, it leads to unbearibly slow operation in the
    clock-tree plugin.
* Bug: In Kite, backport corrections done in Katana and also relevant
    for Kite.
* New: In Cumulus.ChipPlugin.py add support for Python profiling with
    cProfile. Disabled under normal operation, but will certainly come in
    handy sometimes.
This commit is contained in:
Jean-Paul Chaput 2016-12-02 00:13:17 +01:00
parent 10098e1371
commit d175e1b27a
4 changed files with 38 additions and 16 deletions

View File

@ -20,6 +20,8 @@ try:
import os.path
import optparse
import math
import cProfile
import pstats
import Cfg
import Hurricane
from Hurricane import DataBase
@ -151,10 +153,18 @@ class PlaceCore ( chip.Configuration.ChipConfWrapper ):
etesian.place()
etesian.destroy()
#profile = cProfile.Profile()
#profile.enable()
ht.connectLeaf()
#ht.prune()
ht.route()
ht.save( self.cell )
#profile.disable()
#stats = pstats.Stats( profile, stream=sys.stderr )
#stats.strip_dirs()
#stats.sort_stats( 'cumtime' )
#stats.print_stats()
else:
if Cfg.getParamString('clockTree.placerEngine').asString() != 'Etesian':
mauka = Mauka.MaukaEngine.create( coreCell )

View File

@ -465,23 +465,23 @@ void Net::setGlobal(bool isGlobal)
void Net::setExternal(bool isExternal)
// ***********************************
{
if (isExternal != _isExternal) {
if (!isExternal) {
if (!getConnectedSlavePlugs().isEmpty())
throw Error("Can't set internal : has connected slave plugs");
_direction = Direction::UNDEFINED;
}
_isExternal = isExternal;
if (_isExternal) {
UpdateSession::open();
setPosition(Point(0,0));
for_each_instance(instance, _cell->getSlaveInstances()) {
Plug::_create(instance, this);
end_for;
}
UpdateSession::close();
}
if (isExternal != _isExternal) {
if (not isExternal) {
if (not getConnectedSlavePlugs().isEmpty())
throw Error( "Net::setExternal(): Cannot set \"%s\" of \"%s\" internal, has connected slave plugs"
, getString(getName()).c_str()
, getString(getCell()->getName()).c_str()
);
_direction = Direction::UNDEFINED;
}
_isExternal = isExternal;
if (_isExternal) {
setPosition( Point(0,0) );
for ( Instance* instance : _cell->getSlaveInstances() ) {
Plug::_create( instance, this );
}
}
}
}
void Net::setAutomatic(bool isAutomatic)

View File

@ -426,6 +426,16 @@ namespace Katabatic {
if (spinFlags & SegSourceBottom) setFlags( SegTargetBottom );
if (spinFlags & SegTargetTop ) setFlags( SegSourceTop );
if (spinFlags & SegTargetBottom) setFlags( SegSourceBottom );
unsigned int invalidatedFlags = _flags & (SegInvalidatedSource|SegInvalidatedTarget);
unsetFlags( SegInvalidatedSource|SegInvalidatedTarget );
if (invalidatedFlags & SegInvalidatedSource) setFlags( SegInvalidatedTarget );
if (invalidatedFlags & SegInvalidatedTarget) setFlags( SegInvalidatedSource );
unsigned int terminalFlags = _flags & SegStrongTerminal;
unsetFlags( SegStrongTerminal );
if (terminalFlags & SegSourceTerminal) setFlags( SegTargetTerminal );
if (terminalFlags & SegTargetTerminal) setFlags( SegSourceTerminal );
}
}

View File

@ -245,6 +245,8 @@ namespace Kite {
}
_doRemovalEvents();
for ( Track* track : _sortEvents ) track->doReorder();
_sortEvents.clear();
cdebug_tabw(159,-1);
return count;