* ./katabatic:
- Change: In Grid/BaseGrid, add an Abutment Box attribute (to facilitate segment truncation in Kite::TrackFixedSegment. - Change: In Grid/BaseGrid::Axis, when computing a row/column index using the graduation table, if the coordinate is exactly on the last graduation, return the last GCell instead of "out of bound". - Change: In GCell::hasFreeTrack(), AutoSegment::canMoveUp() & AutoSegment::canPivotUp() adds a "reserve" parameter to modify the amount of wirelength to remains free after the insertion.
This commit is contained in:
parent
92e55924c4
commit
e7b1a5de6e
|
@ -2,7 +2,7 @@
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2008, All Rights Reserved
|
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
|
||||||
//
|
//
|
||||||
// ===================================================================
|
// ===================================================================
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2008, All Rights Reserved
|
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
|
||||||
//
|
//
|
||||||
// ===================================================================
|
// ===================================================================
|
||||||
//
|
//
|
||||||
|
@ -300,8 +300,9 @@ namespace Katabatic {
|
||||||
// Class : "Katabatic::AutoSegment".
|
// Class : "Katabatic::AutoSegment".
|
||||||
|
|
||||||
|
|
||||||
size_t AutoSegment::_allocateds = 0;
|
size_t AutoSegment::_allocateds = 0;
|
||||||
unsigned long AutoSegment::_maxId = 0;
|
size_t AutoSegment::_globalsCount = 0;
|
||||||
|
unsigned long AutoSegment::_maxId = 0;
|
||||||
|
|
||||||
|
|
||||||
DbU::Unit AutoSegment::getX () const
|
DbU::Unit AutoSegment::getX () const
|
||||||
|
@ -831,11 +832,11 @@ namespace Katabatic {
|
||||||
#if defined(CHECK_DETERMINISM)
|
#if defined(CHECK_DETERMINISM)
|
||||||
cerr << "Order: AutoSegment::AutoSegment() - <id:" << _id << ">" << endl;
|
cerr << "Order: AutoSegment::AutoSegment() - <id:" << _id << ">" << endl;
|
||||||
#endif
|
#endif
|
||||||
_allocateds++;
|
|
||||||
|
|
||||||
AutoContact* source = Session::lookup(dynamic_cast<Contact*>(segment->getSource()));
|
AutoContact* source = Session::lookup(dynamic_cast<Contact*>(segment->getSource()));
|
||||||
AutoContact* target = Session::lookup(dynamic_cast<Contact*>(segment->getTarget()));
|
AutoContact* target = Session::lookup(dynamic_cast<Contact*>(segment->getTarget()));
|
||||||
|
|
||||||
|
_allocateds++;
|
||||||
|
|
||||||
_gcell = source->getGCell();
|
_gcell = source->getGCell();
|
||||||
setOptimalMax ( (_isHorizontal) ? _gcell->getBoundingBox().getYMax()
|
setOptimalMax ( (_isHorizontal) ? _gcell->getBoundingBox().getYMax()
|
||||||
: _gcell->getBoundingBox().getXMax() );
|
: _gcell->getBoundingBox().getXMax() );
|
||||||
|
@ -847,8 +848,8 @@ namespace Katabatic {
|
||||||
_isGlobal = ( source->getGCell() != target->getGCell() );
|
_isGlobal = ( source->getGCell() != target->getGCell() );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
_globalsCount += (_isGlobal) ? 1 : 0;
|
||||||
_isCanonicalLocal = !_isGlobal;
|
_isCanonicalLocal = not _isGlobal;
|
||||||
|
|
||||||
_computeTerminal ( segment );
|
_computeTerminal ( segment );
|
||||||
//if ( source->isTerminal() or target->isTerminal() ) _isTerminal = true;
|
//if ( source->isTerminal() or target->isTerminal() ) _isTerminal = true;
|
||||||
|
@ -907,6 +908,7 @@ namespace Katabatic {
|
||||||
AutoSegment::~AutoSegment ()
|
AutoSegment::~AutoSegment ()
|
||||||
{
|
{
|
||||||
_allocateds--;
|
_allocateds--;
|
||||||
|
if ( _isGlobal and (_globalsCount > 0) ) _globalsCount--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1238,7 +1240,7 @@ namespace Katabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool AutoSegment::canPivotUp ( bool propagate )
|
bool AutoSegment::canPivotUp ( bool propagate, float reserve )
|
||||||
{
|
{
|
||||||
ltrace(200) << "AutoSegment::canPivotUp()" << endl;
|
ltrace(200) << "AutoSegment::canPivotUp()" << endl;
|
||||||
|
|
||||||
|
@ -1250,7 +1252,7 @@ namespace Katabatic {
|
||||||
vector<GCell*> gcells;
|
vector<GCell*> gcells;
|
||||||
getGCells ( gcells );
|
getGCells ( gcells );
|
||||||
for ( size_t i=0 ; i<gcells.size() ; i++ ) {
|
for ( size_t i=0 ; i<gcells.size() ; i++ ) {
|
||||||
if ( !gcells[i]->hasFreeTrack(depth) ) return false;
|
if ( !gcells[i]->hasFreeTrack(depth,reserve) ) return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ltrace(200) << getAutoSource() << endl;
|
ltrace(200) << getAutoSource() << endl;
|
||||||
|
@ -1270,7 +1272,7 @@ namespace Katabatic {
|
||||||
forEach ( AutoSegment*, isegment, getCollapseds() ) {
|
forEach ( AutoSegment*, isegment, getCollapseds() ) {
|
||||||
isegment->getGCells ( gcells );
|
isegment->getGCells ( gcells );
|
||||||
for ( size_t i=0 ; i<gcells.size() ; i++ ) {
|
for ( size_t i=0 ; i<gcells.size() ; i++ ) {
|
||||||
if ( !gcells[i]->hasFreeTrack(depth) ) return false;
|
if ( !gcells[i]->hasFreeTrack(depth,reserve) ) return false;
|
||||||
}
|
}
|
||||||
if ( isegment->getAutoSource()->getMinDepth() < depth ) return false;
|
if ( isegment->getAutoSource()->getMinDepth() < depth ) return false;
|
||||||
if ( isegment->getAutoTarget()->getMinDepth() < depth ) return false;
|
if ( isegment->getAutoTarget()->getMinDepth() < depth ) return false;
|
||||||
|
@ -1283,7 +1285,7 @@ namespace Katabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool AutoSegment::canMoveUp ( bool propagate )
|
bool AutoSegment::canMoveUp ( bool propagate, float reserve )
|
||||||
{
|
{
|
||||||
ltrace(200) << "AutoSegment::canMoveUp()" << endl;
|
ltrace(200) << "AutoSegment::canMoveUp()" << endl;
|
||||||
|
|
||||||
|
@ -1296,7 +1298,7 @@ namespace Katabatic {
|
||||||
vector<GCell*> gcells;
|
vector<GCell*> gcells;
|
||||||
getGCells ( gcells );
|
getGCells ( gcells );
|
||||||
for ( size_t i=0 ; i<gcells.size() ; i++ ) {
|
for ( size_t i=0 ; i<gcells.size() ; i++ ) {
|
||||||
if ( not gcells[i]->hasFreeTrack(depth) ) return false;
|
if ( not gcells[i]->hasFreeTrack(depth,reserve) ) return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( isLocal() and not propagate ) {
|
if ( isLocal() and not propagate ) {
|
||||||
|
@ -1314,7 +1316,7 @@ namespace Katabatic {
|
||||||
|
|
||||||
isegment->getGCells ( gcells );
|
isegment->getGCells ( gcells );
|
||||||
for ( size_t i=0 ; i<gcells.size() ; i++ ) {
|
for ( size_t i=0 ; i<gcells.size() ; i++ ) {
|
||||||
if ( not gcells[i]->hasFreeTrack(depth) ) {
|
if ( not gcells[i]->hasFreeTrack(depth,reserve) ) {
|
||||||
ltrace(200) << "Not enough free track in " << gcells[i] << endl;
|
ltrace(200) << "Not enough free track in " << gcells[i] << endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1523,9 +1525,9 @@ namespace Katabatic {
|
||||||
|
|
||||||
Contact* contact = dynamic_cast<Contact*>(hurricaneSegment->getSource());
|
Contact* contact = dynamic_cast<Contact*>(hurricaneSegment->getSource());
|
||||||
AutoContact* autoContact = Session::lookup(contact);
|
AutoContact* autoContact = Session::lookup(contact);
|
||||||
if ( !contact ) {
|
if ( contact == NULL ) {
|
||||||
throw Error ( badSegmentSource, getString(hurricaneSegment).c_str() );
|
throw Error ( badSegmentSource, getString(hurricaneSegment).c_str() );
|
||||||
if ( autoContact && ( autoContact != source ) )
|
if ( autoContact and ( autoContact != source ) )
|
||||||
throw Error ( mismatchSegmentSource
|
throw Error ( mismatchSegmentSource
|
||||||
, getString(hurricaneSegment).c_str()
|
, getString(hurricaneSegment).c_str()
|
||||||
, getString(contact).c_str() );
|
, getString(contact).c_str() );
|
||||||
|
@ -1533,9 +1535,9 @@ namespace Katabatic {
|
||||||
|
|
||||||
contact = dynamic_cast<Contact*>(hurricaneSegment->getTarget());
|
contact = dynamic_cast<Contact*>(hurricaneSegment->getTarget());
|
||||||
autoContact = Session::lookup(contact);
|
autoContact = Session::lookup(contact);
|
||||||
if ( !contact ) {
|
if ( contact == NULL ) {
|
||||||
throw Error ( badSegmentTarget, getString(hurricaneSegment).c_str() );
|
throw Error ( badSegmentTarget, getString(hurricaneSegment).c_str() );
|
||||||
if ( autoContact && ( autoContact != target ) )
|
if ( autoContact and ( autoContact != target ) )
|
||||||
throw Error ( mismatchSegmentTarget
|
throw Error ( mismatchSegmentTarget
|
||||||
, getString(hurricaneSegment).c_str()
|
, getString(hurricaneSegment).c_str()
|
||||||
, getString(contact).c_str() );
|
, getString(contact).c_str() );
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2008, All Rights Reserved
|
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
|
||||||
//
|
//
|
||||||
// ===================================================================
|
// ===================================================================
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2008, All Rights Reserved
|
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
|
||||||
//
|
//
|
||||||
// ===================================================================
|
// ===================================================================
|
||||||
//
|
//
|
||||||
|
|
|
@ -721,7 +721,7 @@ namespace Katabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool GCell::hasFreeTrack ( size_t depth ) const
|
bool GCell::hasFreeTrack ( size_t depth, float reserve ) const
|
||||||
{
|
{
|
||||||
if (_invalid) const_cast<GCell*>(this)->updateDensity();
|
if (_invalid) const_cast<GCell*>(this)->updateDensity();
|
||||||
|
|
||||||
|
@ -765,7 +765,7 @@ namespace Katabatic {
|
||||||
<< " " << (_saturateDensities[depth]*capacity) << " vs. " << capacity
|
<< " " << (_saturateDensities[depth]*capacity) << " vs. " << capacity
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
return (_saturateDensities[depth]*capacity + 1.0 <= capacity);
|
return (_saturateDensities[depth]*capacity + 1.0 + reserve <= capacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ namespace Katabatic {
|
||||||
|
|
||||||
|
|
||||||
GCellGrid::GCellGrid ( KatabaticEngine* ktbt )
|
GCellGrid::GCellGrid ( KatabaticEngine* ktbt )
|
||||||
: Grid<GCell>()
|
: Grid<GCell>(ktbt->getCell()->getAbutmentBox())
|
||||||
, _katabatic(ktbt)
|
, _katabatic(ktbt)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
@ -140,6 +140,18 @@ namespace Katabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Interval GCellGrid::getUSide ( unsigned int direction ) const
|
||||||
|
{
|
||||||
|
Interval side;
|
||||||
|
switch ( direction ) {
|
||||||
|
default:
|
||||||
|
case Constant::Horizontal: side = Interval(_boundingBox.getXMin(),_boundingBox.getXMax()); break;
|
||||||
|
case Constant::Vertical: side = Interval(_boundingBox.getYMin(),_boundingBox.getYMax()); break;
|
||||||
|
}
|
||||||
|
return side;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void GCellGrid::updateContacts ( bool openSession )
|
void GCellGrid::updateContacts ( bool openSession )
|
||||||
{
|
{
|
||||||
if ( openSession ) Session::open ( _katabatic );
|
if ( openSession ) Session::open ( _katabatic );
|
||||||
|
|
|
@ -49,6 +49,11 @@ namespace Katabatic {
|
||||||
|
|
||||||
unsigned int BaseGrid::Axis::getGraduationNumber ( DbU::Unit position, bool& onGraduation ) const
|
unsigned int BaseGrid::Axis::getGraduationNumber ( DbU::Unit position, bool& onGraduation ) const
|
||||||
{
|
{
|
||||||
|
if ( position == _graduations[_graduations.size()-1] ) {
|
||||||
|
onGraduation = true;
|
||||||
|
return _graduations.size()-2;
|
||||||
|
}
|
||||||
|
|
||||||
vector<DbU::Unit>::const_iterator it = lower_bound ( _graduations.begin()
|
vector<DbU::Unit>::const_iterator it = lower_bound ( _graduations.begin()
|
||||||
, _graduations.end()
|
, _graduations.end()
|
||||||
, position+1
|
, position+1
|
||||||
|
@ -99,11 +104,13 @@ namespace Katabatic {
|
||||||
// Class : "Katabatic::BaseGrid::Axis".
|
// Class : "Katabatic::BaseGrid::Axis".
|
||||||
|
|
||||||
|
|
||||||
BaseGrid::BaseGrid () : _xGraduations()
|
BaseGrid::BaseGrid ( const Box& bb )
|
||||||
, _yGraduations()
|
: _boundingBox (bb)
|
||||||
, _rows(0)
|
, _xGraduations()
|
||||||
, _columns(0)
|
, _yGraduations()
|
||||||
, _rawSize(0)
|
, _rows (0)
|
||||||
|
, _columns (0)
|
||||||
|
, _rawSize (0)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2008, All Rights Reserved
|
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
|
||||||
//
|
//
|
||||||
// ===================================================================
|
// ===================================================================
|
||||||
//
|
//
|
||||||
|
@ -38,6 +38,7 @@
|
||||||
#include "hurricane/Cell.h"
|
#include "hurricane/Cell.h"
|
||||||
|
|
||||||
#include "crlcore/Utilities.h"
|
#include "crlcore/Utilities.h"
|
||||||
|
#include "crlcore/Catalog.h"
|
||||||
#include "crlcore/Measures.h"
|
#include "crlcore/Measures.h"
|
||||||
#include "crlcore/AllianceFramework.h"
|
#include "crlcore/AllianceFramework.h"
|
||||||
|
|
||||||
|
@ -170,6 +171,8 @@ namespace Katabatic {
|
||||||
using Hurricane::BasicLayer;
|
using Hurricane::BasicLayer;
|
||||||
using Hurricane::NetExternalComponents;
|
using Hurricane::NetExternalComponents;
|
||||||
using CRL::AllianceFramework;
|
using CRL::AllianceFramework;
|
||||||
|
using CRL::Catalog;
|
||||||
|
using CRL::CatalogProperty;
|
||||||
using CRL::Measures;
|
using CRL::Measures;
|
||||||
using CRL::addMeasure;
|
using CRL::addMeasure;
|
||||||
using CRL::getMeasure;
|
using CRL::getMeasure;
|
||||||
|
@ -230,7 +233,9 @@ namespace Katabatic {
|
||||||
, _gcellGrid (NULL)
|
, _gcellGrid (NULL)
|
||||||
, _routingNets ()
|
, _routingNets ()
|
||||||
{
|
{
|
||||||
addMeasure<size_t> ( cell, "Gates", cell->getInstances().getSize() );
|
addMeasure<size_t> ( cell, "Gates"
|
||||||
|
, AllianceFramework::getInstancesCount(cell,AllianceFramework::IgnoreFeeds
|
||||||
|
|AllianceFramework::Recursive) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2008, All Rights Reserved
|
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
|
||||||
//
|
//
|
||||||
// ===================================================================
|
// ===================================================================
|
||||||
//
|
//
|
||||||
|
@ -39,11 +39,13 @@
|
||||||
#include "hurricane/RoutingPads.h"
|
#include "hurricane/RoutingPads.h"
|
||||||
#include "hurricane/Pad.h"
|
#include "hurricane/Pad.h"
|
||||||
#include "hurricane/Plug.h"
|
#include "hurricane/Plug.h"
|
||||||
|
#include "hurricane/Cell.h"
|
||||||
#include "hurricane/Instance.h"
|
#include "hurricane/Instance.h"
|
||||||
#include "hurricane/Vertical.h"
|
#include "hurricane/Vertical.h"
|
||||||
#include "hurricane/Horizontal.h"
|
#include "hurricane/Horizontal.h"
|
||||||
|
|
||||||
#include "crlcore/RoutingGauge.h"
|
#include "crlcore/RoutingGauge.h"
|
||||||
|
#include "crlcore/Measures.h"
|
||||||
|
|
||||||
#include "katabatic/AutoContact.h"
|
#include "katabatic/AutoContact.h"
|
||||||
#include "katabatic/AutoSegment.h"
|
#include "katabatic/AutoSegment.h"
|
||||||
|
@ -2217,16 +2219,18 @@ namespace {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( routingPads.size() > 2 ) {
|
// if ( routingPads.size() > 2 ) {
|
||||||
cerr << Error("For %s, more than two Plugs/Pins (%d) in single GCell."
|
// cerr << Error("For %s, more than two Plugs/Pins (%d) in single GCell."
|
||||||
,getString(net).c_str()
|
// ,getString(net).c_str()
|
||||||
,routingPads.size()) << endl;
|
// ,routingPads.size()) << endl;
|
||||||
ltraceout(99);
|
// ltraceout(99);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
GCell* gcell = ktbt->getGCellGrid()->getGCell ( routingPads[0]->getCenter()
|
sort ( routingPads.begin(), routingPads.end(), SortRpByX(false) ); // increasing X.
|
||||||
, routingPads[1]->getCenter() );
|
|
||||||
|
GCell* gcell = ktbt->getGCellGrid()->getGCell ( (*routingPads.begin ())->getCenter()
|
||||||
|
, (*routingPads.rbegin())->getCenter() );
|
||||||
|
|
||||||
if ( !gcell ) {
|
if ( !gcell ) {
|
||||||
cerr << Error("No GCell under %s.",getString(routingPads[0]).c_str()) << endl;
|
cerr << Error("No GCell under %s.",getString(routingPads[0]).c_str()) << endl;
|
||||||
|
@ -2239,36 +2243,30 @@ namespace {
|
||||||
AutoContact* dummy = NULL;
|
AutoContact* dummy = NULL;
|
||||||
AutoContact* source = NULL;
|
AutoContact* source = NULL;
|
||||||
AutoContact* target = NULL;
|
AutoContact* target = NULL;
|
||||||
GCellConfiguration::_GCell_rp_AutoContacts ( gcell, routingPads[0], source, dummy, true );
|
|
||||||
GCellConfiguration::_GCell_rp_AutoContacts ( gcell, routingPads[1], target, dummy, true );
|
|
||||||
|
|
||||||
// AutoContact* source = AutoContact::fromRp ( gcell
|
for ( size_t irp=1 ; irp<routingPads.size() ; ++irp ) {
|
||||||
// , routingPads[0]
|
GCellConfiguration::_GCell_rp_AutoContacts ( gcell, routingPads[irp-1], source, dummy, true );
|
||||||
// , Session::getContactLayer(0)
|
GCellConfiguration::_GCell_rp_AutoContacts ( gcell, routingPads[irp ], target, dummy, true );
|
||||||
// , routingPads[0]->getCenter()
|
|
||||||
// , DbU::lambda(1.0), DbU::lambda(1.0)
|
|
||||||
// );
|
|
||||||
// AutoContact* target = AutoContact::fromRp ( gcell
|
|
||||||
// , routingPads[1]
|
|
||||||
// , Session::getContactLayer(0)
|
|
||||||
// , routingPads[1]->getCenter()
|
|
||||||
// , DbU::lambda(1.0), DbU::lambda(1.0)
|
|
||||||
// );
|
|
||||||
|
|
||||||
Box sourceBox = source->getNativeConstraintBox ();
|
|
||||||
Box targetBox = target->getNativeConstraintBox ();
|
|
||||||
|
|
||||||
if ( ( sourceBox.getYMax() < targetBox.getYMin() )
|
|
||||||
|| ( sourceBox.getYMin() > targetBox.getYMax() ) ) {
|
|
||||||
AutoContact* subContact1 = AutoContact::create ( gcell, net, Session::getContactLayer(1) );
|
|
||||||
AutoSegment::create ( source, subContact1, Constant::Vertical, AutoSegment::Local, true );
|
|
||||||
|
|
||||||
AutoContact* subContact2 = AutoContact::create ( gcell, net, Session::getContactLayer(1) );
|
|
||||||
AutoSegment::create ( target, subContact2, Constant::Vertical, AutoSegment::Local, true );
|
|
||||||
|
|
||||||
AutoSegment::create ( subContact1, subContact2, Constant::Horizontal, AutoSegment::Local, false );
|
|
||||||
} else
|
|
||||||
AutoSegment::create ( source, target, Constant::Horizontal, AutoSegment::Local, true );
|
AutoSegment::create ( source, target, Constant::Horizontal, AutoSegment::Local, true );
|
||||||
|
}
|
||||||
|
|
||||||
|
// GCellConfiguration::_GCell_rp_AutoContacts ( gcell, routingPads[0], source, dummy, true );
|
||||||
|
// GCellConfiguration::_GCell_rp_AutoContacts ( gcell, routingPads[1], target, dummy, true );
|
||||||
|
|
||||||
|
// Box sourceBox = source->getNativeConstraintBox ();
|
||||||
|
// Box targetBox = target->getNativeConstraintBox ();
|
||||||
|
|
||||||
|
// if ( ( sourceBox.getYMax() < targetBox.getYMin() )
|
||||||
|
// || ( sourceBox.getYMin() > targetBox.getYMax() ) ) {
|
||||||
|
// AutoContact* subContact1 = AutoContact::create ( gcell, net, Session::getContactLayer(1) );
|
||||||
|
// AutoSegment::create ( source, subContact1, Constant::Vertical, AutoSegment::Local, true );
|
||||||
|
|
||||||
|
// AutoContact* subContact2 = AutoContact::create ( gcell, net, Session::getContactLayer(1) );
|
||||||
|
// AutoSegment::create ( target, subContact2, Constant::Vertical, AutoSegment::Local, true );
|
||||||
|
|
||||||
|
// AutoSegment::create ( subContact1, subContact2, Constant::Horizontal, AutoSegment::Local, false );
|
||||||
|
// } else
|
||||||
|
// AutoSegment::create ( source, target, Constant::Horizontal, AutoSegment::Local, true );
|
||||||
|
|
||||||
ltraceout(99);
|
ltraceout(99);
|
||||||
}
|
}
|
||||||
|
@ -2282,10 +2280,12 @@ namespace {
|
||||||
namespace Katabatic {
|
namespace Katabatic {
|
||||||
|
|
||||||
|
|
||||||
|
using Hurricane::Name;
|
||||||
using Hurricane::DebugSession;
|
using Hurricane::DebugSession;
|
||||||
using Hurricane::Error;
|
using Hurricane::Error;
|
||||||
using Hurricane::Warning;
|
using Hurricane::Warning;
|
||||||
using Hurricane::Bug;
|
using Hurricane::Bug;
|
||||||
|
using CRL::addMeasure;
|
||||||
|
|
||||||
|
|
||||||
void KatabaticEngine::_loadGrByNet ()
|
void KatabaticEngine::_loadGrByNet ()
|
||||||
|
@ -2316,6 +2316,9 @@ namespace Katabatic {
|
||||||
|
|
||||||
stopMeasures ();
|
stopMeasures ();
|
||||||
printMeasures ( "load" );
|
printMeasures ( "load" );
|
||||||
|
|
||||||
|
addMeasure<size_t> ( getCell(), "Globals", AutoSegment::getGlobalsCount() );
|
||||||
|
addMeasure<size_t> ( getCell(), "Edges" , AutoSegment::getAllocateds() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2008, All Rights Reserved
|
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
|
||||||
//
|
//
|
||||||
// ===================================================================
|
// ===================================================================
|
||||||
//
|
//
|
||||||
|
@ -131,7 +131,8 @@ namespace Katabatic {
|
||||||
, vector<AutoSegment*>& collapseds
|
, vector<AutoSegment*>& collapseds
|
||||||
);
|
);
|
||||||
static inline int getTerminalCount ( AutoSegment* seed );
|
static inline int getTerminalCount ( AutoSegment* seed );
|
||||||
static size_t getAllocateds () { return _allocateds; };
|
static inline size_t getGlobalsCount ();
|
||||||
|
static inline size_t getAllocateds ();
|
||||||
static inline unsigned long getMaxId ();
|
static inline unsigned long getMaxId ();
|
||||||
// Constructors & Destructor.
|
// Constructors & Destructor.
|
||||||
static AutoSegment* create ( AutoContact* source
|
static AutoSegment* create ( AutoContact* source
|
||||||
|
@ -195,8 +196,8 @@ namespace Katabatic {
|
||||||
inline bool allowOutsideGCell () const;
|
inline bool allowOutsideGCell () const;
|
||||||
bool canDesalignate ();
|
bool canDesalignate ();
|
||||||
virtual bool canDesalignate ( AutoContact* ) const = 0;
|
virtual bool canDesalignate ( AutoContact* ) const = 0;
|
||||||
bool canMoveUp ( bool propagate=false );
|
bool canMoveUp ( bool propagate=false, float reserve=0.0 );
|
||||||
bool canPivotUp ( bool propagate=false );
|
bool canPivotUp ( bool propagate=false, float reserve=0.0 );
|
||||||
bool canSlacken ( bool propagate=false );
|
bool canSlacken ( bool propagate=false );
|
||||||
virtual bool _canSlacken () const = 0;
|
virtual bool _canSlacken () const = 0;
|
||||||
bool canGoOutsideGCell () const;
|
bool canGoOutsideGCell () const;
|
||||||
|
@ -302,6 +303,7 @@ namespace Katabatic {
|
||||||
protected:
|
protected:
|
||||||
// Internal: Static Attributes.
|
// Internal: Static Attributes.
|
||||||
static size_t _allocateds;
|
static size_t _allocateds;
|
||||||
|
static size_t _globalsCount;
|
||||||
static bool _destroyBase;
|
static bool _destroyBase;
|
||||||
static bool _destroyTool;
|
static bool _destroyTool;
|
||||||
static unsigned long _maxId;
|
static unsigned long _maxId;
|
||||||
|
@ -469,6 +471,10 @@ namespace Katabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline size_t AutoSegment::getGlobalsCount () { return _globalsCount; }
|
||||||
|
inline size_t AutoSegment::getAllocateds () { return _allocateds; }
|
||||||
|
|
||||||
|
|
||||||
} // End of Katabatic namespace.
|
} // End of Katabatic namespace.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2008, All Rights Reserved
|
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
|
||||||
//
|
//
|
||||||
// ===================================================================
|
// ===================================================================
|
||||||
//
|
//
|
||||||
|
|
|
@ -110,7 +110,7 @@ namespace Katabatic {
|
||||||
bool isSaturated ( size_t depth ) const;
|
bool isSaturated ( size_t depth ) const;
|
||||||
inline bool isValid () const;
|
inline bool isValid () const;
|
||||||
bool isAboveDensity ( float threshold ) const;
|
bool isAboveDensity ( float threshold ) const;
|
||||||
bool hasFreeTrack ( size_t depth ) const;
|
bool hasFreeTrack ( size_t depth, float reserve ) const;
|
||||||
inline GCellGrid* getGCellGrid () const;
|
inline GCellGrid* getGCellGrid () const;
|
||||||
inline unsigned int getDepth () const;
|
inline unsigned int getDepth () const;
|
||||||
inline unsigned int getIndex () const;
|
inline unsigned int getIndex () const;
|
||||||
|
|
|
@ -50,15 +50,16 @@ namespace Katabatic {
|
||||||
class GCellGrid : public Grid<GCell> {
|
class GCellGrid : public Grid<GCell> {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Cell* getCell () const;
|
Cell* getCell () const;
|
||||||
void updateContacts ( bool openSession=true );
|
Interval getUSide ( unsigned int ) const;
|
||||||
size_t checkDensity () const;
|
void updateContacts ( bool openSession=true );
|
||||||
size_t updateDensity ();
|
size_t checkDensity () const;
|
||||||
bool checkEdgeSaturation ( float threshold ) const;
|
size_t updateDensity ();
|
||||||
void _xmlWrite ( ostream& );
|
bool checkEdgeSaturation ( float threshold ) const;
|
||||||
virtual Record* _getRecord () const;
|
void _xmlWrite ( ostream& );
|
||||||
virtual string _getString () const;
|
virtual Record* _getRecord () const;
|
||||||
virtual string _getTypeName () const;
|
virtual string _getString () const;
|
||||||
|
virtual string _getTypeName () const;
|
||||||
|
|
||||||
// Attributes.
|
// Attributes.
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -58,19 +58,20 @@ namespace Katabatic {
|
||||||
public:
|
public:
|
||||||
class Axis;
|
class Axis;
|
||||||
public:
|
public:
|
||||||
inline void destroy ();
|
inline void destroy ();
|
||||||
// Accessors.
|
// Accessors.
|
||||||
inline unsigned int getColumns () const;
|
inline const Box& getBoundingBox () const;
|
||||||
inline unsigned int getRows () const;
|
inline unsigned int getColumns () const;
|
||||||
inline unsigned int getRawSize () const;
|
inline unsigned int getRows () const;
|
||||||
inline unsigned int getIndex ( unsigned int c, unsigned int r ) const;
|
inline unsigned int getRawSize () const;
|
||||||
inline unsigned int getRow ( unsigned int ) const;
|
inline unsigned int getIndex ( unsigned int c, unsigned int r ) const;
|
||||||
inline unsigned int getColumn ( unsigned int ) const;
|
inline unsigned int getRow ( unsigned int ) const;
|
||||||
inline const Axis& getXGrads () const;
|
inline unsigned int getColumn ( unsigned int ) const;
|
||||||
inline const Axis& getYGrads () const;
|
inline const Axis& getXGrads () const;
|
||||||
// Inspector Managment.
|
inline const Axis& getYGrads () const;
|
||||||
virtual Record* _getRecord () const;
|
// Inspector Managment.
|
||||||
virtual string _getString () const = 0;
|
virtual Record* _getRecord () const;
|
||||||
|
virtual string _getString () const = 0;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Sub-Class Grid::Axis.
|
// Sub-Class Grid::Axis.
|
||||||
|
@ -96,6 +97,7 @@ namespace Katabatic {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Attributes.
|
// Attributes.
|
||||||
|
Box _boundingBox;
|
||||||
Axis _xGraduations;
|
Axis _xGraduations;
|
||||||
Axis _yGraduations;
|
Axis _yGraduations;
|
||||||
unsigned int _rows;
|
unsigned int _rows;
|
||||||
|
@ -104,7 +106,7 @@ namespace Katabatic {
|
||||||
|
|
||||||
// Constructors & Destructors.
|
// Constructors & Destructors.
|
||||||
protected:
|
protected:
|
||||||
BaseGrid ();
|
BaseGrid ( const Box& );
|
||||||
virtual ~BaseGrid ();
|
virtual ~BaseGrid ();
|
||||||
virtual void _postCreate ();
|
virtual void _postCreate ();
|
||||||
virtual void _preDestroy ();
|
virtual void _preDestroy ();
|
||||||
|
@ -120,13 +122,14 @@ namespace Katabatic {
|
||||||
inline DbU::Unit& BaseGrid::Axis::operator[] ( unsigned int i ) { return _graduations[i]; }
|
inline DbU::Unit& BaseGrid::Axis::operator[] ( unsigned int i ) { return _graduations[i]; }
|
||||||
inline string BaseGrid::Axis::_getTypeName () const { return _TName("BaseGrid::Axis"); }
|
inline string BaseGrid::Axis::_getTypeName () const { return _TName("BaseGrid::Axis"); }
|
||||||
|
|
||||||
inline void BaseGrid::destroy () { _preDestroy(); delete this; }
|
inline void BaseGrid::destroy () { _preDestroy(); delete this; }
|
||||||
inline unsigned int BaseGrid::getColumns () const { return _columns; };
|
inline const Box& BaseGrid::getBoundingBox () const { return _boundingBox; };
|
||||||
inline unsigned int BaseGrid::getRows () const { return _rows; };
|
inline unsigned int BaseGrid::getColumns () const { return _columns; };
|
||||||
inline unsigned int BaseGrid::getRawSize () const { return getColumns() * getRows(); }
|
inline unsigned int BaseGrid::getRows () const { return _rows; };
|
||||||
inline unsigned int BaseGrid::getIndex ( unsigned int c, unsigned int r ) const { return c+(r*getColumns()); }
|
inline unsigned int BaseGrid::getRawSize () const { return getColumns() * getRows(); }
|
||||||
inline unsigned int BaseGrid::getRow ( unsigned int i ) const { return i / getColumns(); }
|
inline unsigned int BaseGrid::getIndex ( unsigned int c, unsigned int r ) const { return c+(r*getColumns()); }
|
||||||
inline unsigned int BaseGrid::getColumn ( unsigned int i ) const { return i % getColumns(); }
|
inline unsigned int BaseGrid::getRow ( unsigned int i ) const { return i / getColumns(); }
|
||||||
|
inline unsigned int BaseGrid::getColumn ( unsigned int i ) const { return i % getColumns(); }
|
||||||
|
|
||||||
inline const BaseGrid::Axis& BaseGrid::getXGrads () const { return _xGraduations; }
|
inline const BaseGrid::Axis& BaseGrid::getXGrads () const { return _xGraduations; }
|
||||||
inline const BaseGrid::Axis& BaseGrid::getYGrads () const { return _yGraduations; }
|
inline const BaseGrid::Axis& BaseGrid::getYGrads () const { return _yGraduations; }
|
||||||
|
@ -166,7 +169,7 @@ namespace Katabatic {
|
||||||
|
|
||||||
// Constructors & Destructors.
|
// Constructors & Destructors.
|
||||||
protected:
|
protected:
|
||||||
inline Grid ();
|
inline Grid ( const Box& );
|
||||||
virtual ~Grid ();
|
virtual ~Grid ();
|
||||||
private:
|
private:
|
||||||
Grid ( const Grid& );
|
Grid ( const Grid& );
|
||||||
|
@ -187,8 +190,9 @@ namespace Katabatic {
|
||||||
// Inline Functions.
|
// Inline Functions.
|
||||||
|
|
||||||
template<typename GCellT>
|
template<typename GCellT>
|
||||||
Grid<GCellT>::Grid () : BaseGrid()
|
Grid<GCellT>::Grid ( const Box& bb )
|
||||||
, _gcells()
|
: BaseGrid(bb)
|
||||||
|
, _gcells ()
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue