* ./katabatic:

- Bug: In GCell, bad cast between <size_t> and <unsigned int>, showed only
        under 64 bits.
    - New: In KatabaticEngine::printMeasures(), adds a support for measurments,
        both time and memory size in Mb are stored for each tag.
    - New: Adds measurements "Gates", "GCells", "load" & "assign".
This commit is contained in:
Jean-Paul Chaput 2010-04-17 10:14:22 +00:00
parent 9a90f87c65
commit d98b31a856
6 changed files with 23 additions and 22 deletions

View File

@ -711,25 +711,13 @@ namespace Katabatic {
if ( rpNets.size() < 8 ) return;
cerr << "[WARNING] " << this << " has " << rps.size() << " terminals h:"
<< _hsegments.size() << endl;
irp = rps.begin();
for ( ; irp != rps.end() ; ++irp )
cerr << " " << *irp << endl;
cerr << "[WARNING] " << this << " has " << rps.size() << " terminals (h:"
<< _hsegments.size() << ")" << endl;
AutoSegment* segment;
while ( stepDesaturate ( 1, globalNets, segment, true ) ) {
//cerr << "Moved up: " << segment << endl;
ltrace(200) << "Moved up: " << segment << endl;
}
#if 0
set<RoutingPad*>::iterator ipad = rps.begin();
for ( ; ipad != rps.end() ; ++ipad ) {
forEach ( Segment*, isegment, (*ipad)->getSlaveComponents().getSubSet<Segment*>() ) {
}
}
#endif
}

View File

@ -38,6 +38,7 @@
#include "hurricane/Cell.h"
#include "crlcore/Utilities.h"
#include "crlcore/Measures.h"
#include "crlcore/AllianceFramework.h"
#include "katabatic/Session.h"
@ -169,6 +170,9 @@ namespace Katabatic {
using Hurricane::BasicLayer;
using Hurricane::NetExternalComponents;
using CRL::AllianceFramework;
using CRL::Measures;
using CRL::addMeasure;
using CRL::getMeasure;
// -------------------------------------------------------------------
@ -225,7 +229,9 @@ namespace Katabatic {
, _configuration (gauge)
, _gcellGrid (NULL)
, _routingNets ()
{ }
{
addMeasure<size_t> ( cell, "Gates", cell->getInstances().getSize() );
}
void KatabaticEngine::_postCreate ()
@ -238,6 +244,8 @@ namespace Katabatic {
{
_gcellGrid = GCellGrid::create ( this );
Session::revalidate ();
addMeasure<size_t> ( getCell(), "GCells", _gcellGrid->getGCellVector()->size() );
}
@ -407,13 +415,18 @@ namespace Katabatic {
}
void KatabaticEngine::printMeasures () const
void KatabaticEngine::printMeasures ( const string& tag ) const
{
cmess1 << " - Done in " << Timer::getStringTime(_timer.getCombTime())
<< " [+" << Timer::getStringMemory(_timer.getIncrease()) << "]." << endl;
cmess1 << " (raw measurements : " << _timer.getCombTime()
<< "s [+" << (_timer.getIncrease()>>10) << "Ko/"
<< (_timer.getMemorySize()>>10) << "Ko])" << endl;
if ( not tag.empty() ) {
addMeasure<double> ( getCell(), tag+"T", _timer.getCombTime () );
addMeasure<size_t> ( getCell(), tag+"S", (_timer.getMemorySize() >> 20) );
}
}
@ -542,7 +555,7 @@ namespace Katabatic {
startMeasures ();
_gutKatabatic ();
stopMeasures ();
printMeasures ();
printMeasures ( "fin" );
_state = StateGutted;
}

View File

@ -314,7 +314,7 @@ namespace Katabatic {
Session::close ();
stopMeasures ();
printMeasures ();
printMeasures ( "assign" );
cmess2 << " - Total segments : " << total << endl;
cmess2 << " - Global segments : " << global << endl;

View File

@ -2315,7 +2315,7 @@ namespace Katabatic {
Session::close ();
stopMeasures ();
printMeasures ();
printMeasures ( "load" );
}

View File

@ -267,7 +267,7 @@ namespace Katabatic {
inline float GCell::Key::getDensity () const { return _density; }
inline unsigned int GCell::Key::getIndex () const { return _index; }
inline void GCell::Key::update ( GCell* gcell, unsigned int depth )
{ _density=gcell->getDensity(depth); _index=gcell->getIndex(); }
{ _density=gcell->getDensity((size_t)depth); _index=gcell->getIndex(); }
inline bool operator< ( const GCell::Key& lhs, const GCell::Key& rhs )
{

View File

@ -138,7 +138,7 @@ namespace Katabatic {
inline void setSaturateRatio ( float );
void startMeasures ();
void stopMeasures ();
void printMeasures () const;
void printMeasures ( const string& ) const;
void refresh ( bool openSession=true );
void makePowerRails ();
virtual void createDetailedGrid ();