diff --git a/crlcore/src/ccore/crlcore/Measures.h b/crlcore/src/ccore/crlcore/Measures.h index 40148bd5..b3279a6a 100644 --- a/crlcore/src/ccore/crlcore/Measures.h +++ b/crlcore/src/ccore/crlcore/Measures.h @@ -1,15 +1,9 @@ - // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC 2008-2014, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | Alliance / Hurricane Interface | // | | @@ -17,21 +11,18 @@ // | E-mail : Jean-Paul.Chaput@lip6.fr | // | =============================================================== | // | C++ Header : "./Measures.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ -#ifndef __CRL_MEASURES_PROPERTY__ -#define __CRL_MEASURES_PROPERTY__ +#ifndef CRL_MEASURES_PROPERTY_H +#define CRL_MEASURES_PROPERTY_H -#include -#include -#include -#include +#include +#include +#include +#include -#include "hurricane/Property.h" +#include "hurricane/Property.h" namespace Hurricane { class DBo; @@ -168,16 +159,28 @@ namespace CRL { template inline void addMeasure ( DBo* object, const Name& name, const Data& data, unsigned int width ) { - Measures::Extension* extension = Measures::_getOrCreate ( object ); - extension->getValue()._measures.insert ( std::make_pair(name,new Measure(name,data,width)) ); + Measures::Extension* extension = Measures::_getOrCreate( object ); + MeasuresSet::iterator imeasure = extension->getValue()._measures.find(name); + + if (imeasure == extension->getValue()._measures.end()) { + extension->getValue()._measures.insert ( std::make_pair(name,new Measure(name,data,width)) ); + } else { + static_cast< Measure* >( (*imeasure).second )->setData( data ); + } } template inline void addMeasure ( DBo* object, const Name& name, Data* data ) { - Measures::Extension* extension = Measures::_getOrCreate ( object ); - extension->getValue()._measures.insert ( std::make_pair(name,new Measure(name,data)) ); + Measures::Extension* extension = Measures::_getOrCreate( object ); + MeasuresSet::iterator imeasure = extension->getValue()._measures.find(name); + + if (imeasure == extension->getValue()._measures.end()) { + extension->getValue()._measures.insert( std::make_pair(name,new Measure(name,data)) ); + } else { + static_cast< Measure* >( (*imeasure).second )->setData( data ); + } } @@ -201,4 +204,4 @@ INSPECTOR_P_SUPPORT(CRL::BaseMeasure); INSPECTOR_P_SUPPORT(CRL::MeasuresDatas); -#endif // __CRL_MEASURES_PROPERTY__ +#endif // CRL_MEASURES_PROPERTY_H diff --git a/kite/src/KiteEngine.cpp b/kite/src/KiteEngine.cpp index 0d74dd65..278555e2 100644 --- a/kite/src/KiteEngine.cpp +++ b/kite/src/KiteEngine.cpp @@ -576,7 +576,6 @@ namespace Kite { _negociateWindow->setGCells( *(getGCellGrid()->getGCellVector()) ); _computeCagedConstraints(); _negociateWindow->run( flags ); - _negociateWindow->printStatistics(); _negociateWindow->destroy(); _negociateWindow = NULL; diff --git a/kite/src/NegociateWindow.cpp b/kite/src/NegociateWindow.cpp index ee61f76b..2ab97db4 100644 --- a/kite/src/NegociateWindow.cpp +++ b/kite/src/NegociateWindow.cpp @@ -493,6 +493,7 @@ namespace Kite { _flags |= flags; _negociate(); + printStatistics(); if (flags & KtPreRoutedStage) { _kite->setFixedPreRouted(); diff --git a/kite/src/PreProcess.cpp b/kite/src/PreProcess.cpp index 9b6a2374..5533d870 100644 --- a/kite/src/PreProcess.cpp +++ b/kite/src/PreProcess.cpp @@ -233,6 +233,7 @@ namespace { const Layer* metal2 = configuration->getRoutingLayer( 1 ); const Layer* metal3 = configuration->getRoutingLayer( 2 ); Net* neighborNet = NULL; + RoutingPlane* metal3plane = track->getRoutingPlane()->getTop(); if (track->getLayer() != metal2) { ltraceout(150); @@ -249,7 +250,7 @@ namespace { //if (freeInterval.getSize() < ppitch*6) { if ( (segment->getSourceU() - freeInterval.getVMin() < ppitch*3) or (freeInterval.getVMax() - segment->getTargetU() < ppitch*3) ) { - cinfo << "Caged terminal: " << segment << endl; + cparanoid << "[INFO] Caged terminal: " << segment << endl; if ( (segment->getLayer () != metal2) or (segment->getLength() >= ppitch) or (segment->getNet () == neighborNet) ) { @@ -257,6 +258,15 @@ namespace { continue; } + Katabatic::AutoContact* support = segment->base()->getAutoSource(); + RoutingPad* rp = dynamic_cast(support->getAnchor()); + Track* metal3track = metal3plane->getTrackByPosition( rp->getSourcePosition().getX() ); + + if (metal3track->getFreeInterval(segment->getAxis(),segment->getNet()).isEmpty()) { + cparanoid << "[INFO] Cannot protect caged terminal because top layer (metal3) is obstructed." << endl; + continue; + } + if (segment->getSourceU() - lastMovedUp < ppitch*4) { ++moveUpCount; if (moveUpCount % 2 == 0) { @@ -266,9 +276,6 @@ namespace { moveUpCount = 0; } lastMovedUp = segment->getSourceU(); - - Katabatic::AutoContact* support = segment->base()->getAutoSource(); - RoutingPad* rp = dynamic_cast(support->getAnchor()); Katabatic::AutoContact* source = Katabatic::AutoContactTerminal::create( support->getGCell() diff --git a/kite/src/kite/Track.h b/kite/src/kite/Track.h index e3008733..1285c8ed 100644 --- a/kite/src/kite/Track.h +++ b/kite/src/kite/Track.h @@ -2,7 +2,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC 2008-2013, All Rights Reserved +// Copyright (c) UPMC 2008-2014, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S |