2016-07-18 07:48:37 -05:00
|
|
|
|
|
|
|
// -*- C++ -*-
|
|
|
|
//
|
|
|
|
// This file is part of the Coriolis Software.
|
|
|
|
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
|
|
|
//
|
|
|
|
// +-----------------------------------------------------------------+
|
|
|
|
// | C O R I O L I S |
|
|
|
|
// | A n a b a t i c - Routing Toolbox |
|
|
|
|
// | |
|
|
|
|
// | Author : Jean-Paul CHAPUT |
|
|
|
|
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
|
|
|
// | =============================================================== |
|
|
|
|
// | C++ Module : "./NetOptimals.cpp" |
|
|
|
|
// +-----------------------------------------------------------------+
|
|
|
|
|
|
|
|
|
|
|
|
#include <cstdlib>
|
|
|
|
#include <sstream>
|
|
|
|
#include "hurricane/DebugSession.h"
|
|
|
|
#include "hurricane/Net.h"
|
|
|
|
#include "hurricane/Segment.h"
|
|
|
|
#include "anabatic/Session.h"
|
|
|
|
#include "anabatic/AutoSegment.h"
|
|
|
|
#include "anabatic/AnabaticEngine.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace Anabatic {
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
using Hurricane::tab;
|
|
|
|
using Hurricane::ForEachIterator;
|
|
|
|
using Hurricane::Net;
|
|
|
|
using Hurricane::Segment;
|
|
|
|
using Hurricane::DebugSession;
|
|
|
|
|
|
|
|
|
|
|
|
void AnabaticEngine::_computeNetOptimals ( Net* net )
|
|
|
|
{
|
Added analog type on segment NetRoutingProperty.
* New: In Anabatic_AutoSegments collection, added a Flag to the constructors
to allow different behavior between digital and analog modes.
For "Aligneds" and "Perpandiculars" collections, now manage a new
Flag WithDoglegs to follow aligned globals through local doglegs
(for analog nets).
Adjust the log level of collections to 144 (formerly 145).
* New: In Anabatic::AutoSegment, new flag SegAnalog for segments that are
part of an analog net.
Note that with this flag, we reach the 32 bits limit...
* Change: In Anabatic::Constants, Flags are now declared as BaseFlags
objects and *not* uint64_t. This avoids overload resolution problems with
arithmetical overload of the operators.
The BaseFlags/Flags types are now completly "isolated" from the
uint64_t, it has the advantage of showing where unwanted previous implicit
conversions where occuring.
* Change: In Katana::Constants, Flags values are now of BaseFlags type instead
of uint64_t.
* Change: In Anabatic::Dijkstra, lots of log cleanup.
* Change: In Anabatic::GCell::getSide(), make the "shrink" parameter visible
to allow to substract the topmost and rightmost track for axis span
computation in AutoSegment::computeOptimal(). Used for analog mode.
* Change: In NetRoutingState, added a flag for analog mode. Use uint32_t
for the flags type.
* New: In Isobar, export the NetRoutingState and NetRoutingExtension objects.
2017-05-20 05:33:12 -05:00
|
|
|
DebugSession::open( net, 144, 150 );
|
2016-07-18 07:48:37 -05:00
|
|
|
cdebug_log(149,0) << "Anabatic::_computeNetOptimals( " << net << " )" << endl;
|
|
|
|
cdebug_tabw(145,1);
|
|
|
|
|
|
|
|
vector<AutoSegment*> segments;
|
|
|
|
forEach ( Segment*, segment, net->getSegments() ) {
|
|
|
|
AutoSegment* autoSegment = Session::lookup( *segment );
|
|
|
|
if (autoSegment) segments.push_back( autoSegment );
|
|
|
|
}
|
|
|
|
sort( segments.begin(), segments.end(), AutoSegment::CompareId() );
|
|
|
|
|
|
|
|
set<AutoSegment*> processeds;
|
|
|
|
for ( size_t i=0 ; i<segments.size() ; i++ )
|
|
|
|
segments[i]->computeOptimal( processeds );
|
|
|
|
|
|
|
|
cdebug_tabw(145,-1);
|
|
|
|
DebugSession::close();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void AnabaticEngine::toOptimals ( Net* net )
|
|
|
|
{
|
|
|
|
DebugSession::open( net, 140, 150 );
|
|
|
|
cdebug_log(149,0) << "Anabatic::_toOptimals( " << net << " )" << endl;
|
|
|
|
cdebug_tabw(145,1);
|
|
|
|
|
|
|
|
vector<AutoSegment*> segments;
|
|
|
|
forEach ( Segment*, segment, net->getSegments() ) {
|
|
|
|
AutoSegment* autoSegment = Session::lookup( *segment );
|
|
|
|
if (autoSegment) segments.push_back( autoSegment );
|
|
|
|
}
|
|
|
|
sort( segments.begin(), segments.end(), AutoSegment::CompareId() );
|
|
|
|
|
|
|
|
for ( size_t i=0 ; i<segments.size() ; i++ ) {
|
|
|
|
if (segments[i]->isCanonical()) segments[i]->toOptimalAxis();
|
|
|
|
}
|
|
|
|
|
|
|
|
cdebug_tabw(145,-1);
|
|
|
|
DebugSession::close();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // Anabatic namespace.
|