* ./kite:

- Bug: In RoutingEvent::Manipulator::forceToTrack(), wrong return code,
        was always return true, blocking the explorations of least good
        Track.
    - Bug: In RoutingEvent::_processNegociate(), must reset the "insert state"
        while looping on candidate. This bug was having the same effect as
        (and masking) the previous one!
    - Bug: In TrackSegment::moveUp(), reset the ripup count after the move
        up...
    - Change: At various DebugSession opening points, sets the debug level to
        200 to avoid extraneous debugging output.
    - New: KiteEngine::dumpMeasures() to create a data file for later uses
        by gnuplot. In interactive mode, this function is called in the
        "finalize layout" stage.
    - New: Adds measurments "algo", "fin" & "Segs".
This commit is contained in:
Jean-Paul Chaput 2010-04-17 10:14:46 +00:00
parent d98b31a856
commit 3f8e8459fc
6 changed files with 58 additions and 8 deletions

View File

@ -54,7 +54,7 @@ namespace {
size_t depth = Session::getConfiguration()->getLayerDepth ( rp->getLayer() );
if ( depth > 2 ) return NULL;
DebugSession::open ( rp->getNet() );
DebugSession::open ( rp->getNet(), 200 );
//if ( (depth != 0) and (depth != 2) ) return NULL;

View File

@ -2,7 +2,7 @@
// -*- C++ -*-
//
// This file is part of the Coriolis Software.
// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
//
// ===================================================================
//
@ -217,6 +217,7 @@ namespace Kite {
KiteEngine* kite = KiteEngine::get ( getCell() );
if ( kite ) {
kite->finalizeLayout ();
kite->dumpMeasures ();
kite->destroy ();
}
emit cellPostModificated ();

View File

@ -24,6 +24,7 @@
#include <sstream>
#include <fstream>
#include <iomanip>
#include "hurricane/Bug.h"
@ -39,6 +40,7 @@
#include "hurricane/Horizontal.h"
#include "hurricane/UpdateSession.h"
#include "crlcore/Measures.h"
#include "knik/KnikEngine.h"
#include "katabatic/AutoContact.h"
#include "kite/DataNegociate.h"
@ -58,6 +60,7 @@ namespace Kite {
using std::endl;
using std::setw;
using std::left;
using std::ofstream;
using std::ostringstream;
using std::setprecision;
using Hurricane::tab;
@ -70,6 +73,9 @@ namespace Kite {
using Hurricane::Warning;
using Hurricane::Layer;
using Hurricane::Cell;
using CRL::addMeasure;
using CRL::Measures;
using CRL::MeasuresSet;
using Knik::KnikEngine;
@ -405,7 +411,7 @@ namespace Kite {
//if ( _editor ) _editor->refresh ();
stopMeasures ();
printMeasures ();
printMeasures ( "algo" );
printCompletion ();
Session::open ( this );
@ -474,6 +480,41 @@ namespace Kite {
}
_toolSuccess = (unrouteds == 0);
addMeasure<size_t> ( getCell(), "Segs", routeds+unrouteds );
}
void KiteEngine::dumpMeasures ( ostream& out ) const
{
vector<Name> measuresLabels;
measuresLabels.push_back ( "Gates" );
measuresLabels.push_back ( "GCells" );
measuresLabels.push_back ( "loadT" );
measuresLabels.push_back ( "loadS" );
measuresLabels.push_back ( "assignT" );
measuresLabels.push_back ( "algoT" );
measuresLabels.push_back ( "algoS" );
measuresLabels.push_back ( "finT" );
measuresLabels.push_back ( "Segs" );
const MeasuresSet* measures = Measures::get(getCell());
out << "#" << endl;
out << "# " << getCell()->getName() << endl;
out << measures->toStringHeaders(measuresLabels) << endl;
out << measures->toStringDatas (measuresLabels) << endl;
}
void KiteEngine::dumpMeasures () const
{
ostringstream path;
path << getCell()->getName() << ".knik-kite.dat";
ofstream sfile ( path.str().c_str() );
dumpMeasures ( sfile );
sfile.close ();
}

View File

@ -1365,7 +1365,7 @@ namespace {
bool State::slackenTopology ( TrackElement* segment, unsigned int flags )
{
DebugSession::open ( segment->getNet() );
DebugSession::open ( segment->getNet(), 200 );
bool success = false;
bool blocked = false;
@ -1650,7 +1650,7 @@ namespace {
if ( !_segment )
throw Error("Manipulator::Manipulator(): cannot build upon a NULL TrackElement.");
DebugSession::open ( _segment->getNet() );
DebugSession::open ( _segment->getNet(), 200 );
_data = _segment->getDataNegociate();
if ( _data )
@ -2464,7 +2464,7 @@ namespace {
_segment->setAxis ( _S.getCost(itrack).getTrack()->getAxis() );
}
return true;
return success;
}
@ -3458,6 +3458,7 @@ namespace Kite {
for ( itrack=0 ; itrack<S.getCosts().size() ; itrack++ ) {
if ( S.getCost(itrack).isInfinite() ) break;
if ( S.insertInTrack(itrack) ) break;
resetInsertState ();
}
//if ( S.getCosts().size() and not S.getCost(itrack).isInfinite() )

View File

@ -652,8 +652,11 @@ namespace Kite {
for ( size_t i=0 ; i<segments.size() ; i++ ) {
ltrace(200) << "moved: " << segments[i] << endl;
}
}
if ( _data ) _data->setState ( DataNegociate::ConflictSolve1, true );
if ( _data ) {
_data->setState ( DataNegociate::ConflictSolve1, true );
_data->resetRipupCount ();
}
ltraceout(200);

View File

@ -2,7 +2,7 @@
// -*- C++ -*-
//
// This file is part of the Coriolis Software.
// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
//
// ===================================================================
//
@ -26,6 +26,8 @@
#ifndef __KITE_KITE_ENGINE__
#define __KITE_KITE_ENGINE__
#include <iostream>
#include "hurricane/Name.h"
namespace Hurricane {
class Layer;
@ -99,6 +101,8 @@ namespace Kite {
RoutingPlane* getRoutingPlaneByLayer ( const Layer* ) const;
Track* getTrackByPosition ( const Layer*, DbU::Unit axis, unsigned int mode=Constant::Nearest ) const;
void printCompletion () const;
void dumpMeasures ( std::ostream& ) const;
void dumpMeasures () const;
inline void setPostEventCb ( Configuration::PostEventCb_t );
inline void setMinimumWL ( double );
inline void setRipupLimit ( unsigned int, unsigned int type );