In protectCagedTerminal() check that the METAL3 track is free.

* New: In Kite, in protectCagedTerminal(), check that the perpandicular
    top METAL3 track is free before inserting the fixed protection.
    They are added *after* the Pre-Routed stage and therefore we have
    to check they do not cross.
* Change: In Kite, in NegociateWindow, print statistics before fixing
    segment in the pre-routed stage to get correct results.
* Change, In CRL Core, in Measures when an addMeasure is performed
    twice, let the new data erase the previous one (instead of keeping
    the previous one).
This commit is contained in:
Jean-Paul Chaput 2014-07-03 00:26:15 +02:00
parent 20d25b2053
commit 2b243fc0ca
5 changed files with 40 additions and 30 deletions

View File

@ -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,14 +11,11 @@
// | 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 <string>
#include <sstream>
@ -168,16 +159,28 @@ namespace CRL {
template<typename Data>
inline void addMeasure ( DBo* object, const Name& name, const Data& data, unsigned int width )
{
Measures::Extension* extension = Measures::_getOrCreate ( object );
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<Data>(name,data,width)) );
} else {
static_cast< Measure<Data>* >( (*imeasure).second )->setData( data );
}
}
template<typename Data>
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<Data>(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<Data>(name,data)) );
} else {
static_cast< Measure<Data>* >( (*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

View File

@ -576,7 +576,6 @@ namespace Kite {
_negociateWindow->setGCells( *(getGCellGrid()->getGCellVector()) );
_computeCagedConstraints();
_negociateWindow->run( flags );
_negociateWindow->printStatistics();
_negociateWindow->destroy();
_negociateWindow = NULL;

View File

@ -493,6 +493,7 @@ namespace Kite {
_flags |= flags;
_negociate();
printStatistics();
if (flags & KtPreRoutedStage) {
_kite->setFixedPreRouted();

View File

@ -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<RoutingPad*>(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) {
@ -267,9 +277,6 @@ namespace {
}
lastMovedUp = segment->getSourceU();
Katabatic::AutoContact* support = segment->base()->getAutoSource();
RoutingPad* rp = dynamic_cast<RoutingPad*>(support->getAnchor());
Katabatic::AutoContact* source
= Katabatic::AutoContactTerminal::create( support->getGCell()
, rp

View File

@ -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 |