2010-03-09 09:24:55 -06:00
|
|
|
// -*- C++ -*-
|
|
|
|
//
|
|
|
|
// This file is part of the Coriolis Software.
|
2018-01-06 10:55:44 -06:00
|
|
|
// Copyright (c) UPMC 2008-2018, All Rights Reserved
|
2010-03-09 09:24:55 -06:00
|
|
|
//
|
2013-12-03 18:59:29 -06:00
|
|
|
// +-----------------------------------------------------------------+
|
2010-03-09 09:24:55 -06:00
|
|
|
// | C O R I O L I S |
|
|
|
|
// | K i t e - D e t a i l e d R o u t e r |
|
|
|
|
// | |
|
|
|
|
// | Author : Jean-Paul CHAPUT |
|
|
|
|
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
|
|
|
// | =============================================================== |
|
|
|
|
// | C++ Module : "./PreProcess.cpp" |
|
2013-12-03 18:59:29 -06:00
|
|
|
// +-----------------------------------------------------------------+
|
|
|
|
|
|
|
|
|
|
|
|
#include <sstream>
|
|
|
|
#include "hurricane/DebugSession.h"
|
|
|
|
#include "hurricane/Bug.h"
|
|
|
|
#include "hurricane/Warning.h"
|
|
|
|
#include "hurricane/Net.h"
|
|
|
|
#include "hurricane/Name.h"
|
|
|
|
#include "hurricane/RoutingPad.h"
|
|
|
|
#include "hurricane/Horizontal.h"
|
|
|
|
#include "katabatic/AutoContactTerminal.h"
|
|
|
|
#include "kite/DataNegociate.h"
|
|
|
|
#include "kite/TrackElement.h"
|
|
|
|
#include "kite/Track.h"
|
|
|
|
#include "kite/RoutingPlane.h"
|
|
|
|
#include "kite/NegociateWindow.h"
|
|
|
|
#include "kite/Session.h"
|
|
|
|
#include "kite/KiteEngine.h"
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
using namespace Hurricane;
|
|
|
|
using namespace CRL;
|
|
|
|
using namespace Kite;
|
2013-12-03 18:59:29 -06:00
|
|
|
using Katabatic::perpandicularTo;
|
|
|
|
using Katabatic::AutoContactTerminal;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
|
2010-12-12 15:42:57 -06:00
|
|
|
void getPerpandiculars ( TrackElement* segment
|
|
|
|
, Katabatic::AutoContact* from
|
|
|
|
, unsigned int direction
|
|
|
|
, vector<TrackElement*>& perpandiculars
|
2010-03-09 09:24:55 -06:00
|
|
|
)
|
|
|
|
{
|
|
|
|
TrackElement* perpandicular;
|
2015-05-26 07:31:38 -05:00
|
|
|
for( Segment* osegment : segment->base()->getAutoSource()->getSlaveComponents().getSubSet<Segment*>() ) {
|
|
|
|
perpandicular = Session::lookup ( osegment );
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(159,0) << "S " << perpandicular << endl;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
if ( not perpandicular or (perpandicular->getDirection() == direction) ) continue;
|
|
|
|
|
|
|
|
perpandiculars.push_back ( perpandicular );
|
|
|
|
}
|
|
|
|
|
2015-05-26 07:31:38 -05:00
|
|
|
for( Segment* osegment : segment->base()->getAutoTarget()->getSlaveComponents().getSubSet<Segment*>() ) {
|
|
|
|
perpandicular = Session::lookup ( osegment );
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(159,0) << "T " << perpandicular << endl;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
if ( not perpandicular or (perpandicular->getDirection() == direction) ) continue;
|
|
|
|
|
|
|
|
perpandiculars.push_back ( perpandicular );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-11 06:04:47 -05:00
|
|
|
void findFailedPerpandiculars ( RoutingPad* rp, unsigned int direction, set<TrackElement*>& faileds )
|
|
|
|
{
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(159,0) << "Find failed caging: " << rp << endl;
|
2010-05-11 06:04:47 -05:00
|
|
|
|
|
|
|
TrackElement* parallel;
|
2015-05-26 07:31:38 -05:00
|
|
|
for( Segment* osegment : rp->getSlaveComponents().getSubSet<Segment*>() ) {
|
|
|
|
parallel = Session::lookup ( osegment );
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(159,0) << "* " << parallel << endl;
|
2010-05-11 06:04:47 -05:00
|
|
|
|
|
|
|
if ( parallel->isFixed () ) continue;
|
|
|
|
if ( parallel->getDirection() != direction ) continue;
|
|
|
|
|
2010-12-12 15:42:57 -06:00
|
|
|
Katabatic::AutoContact* contact = parallel->base()->getAutoSource();
|
2010-05-11 06:04:47 -05:00
|
|
|
if ( contact->base()->getAnchor() != rp ) contact = NULL;
|
|
|
|
|
|
|
|
if ( contact == NULL ) contact = parallel->base()->getAutoTarget();
|
|
|
|
if ( contact->base()->getAnchor() != rp ) continue;
|
|
|
|
|
|
|
|
//parallel->makeDogLeg ( contact->getGCell() );
|
|
|
|
faileds.insert ( parallel );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void propagateCagedConstraints ( TrackElement* segment, set<TrackElement*>& faileds )
|
2010-03-09 09:24:55 -06:00
|
|
|
{
|
2013-12-03 18:59:29 -06:00
|
|
|
if (not segment->isFixed()) return;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(159,0) << "Propagate caging: " << segment << endl;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2010-12-12 15:42:57 -06:00
|
|
|
Track* track = segment->getTrack();
|
2013-12-03 18:59:29 -06:00
|
|
|
//unsigned int direction = Session::getRoutingGauge()->getLayerDirection(segment->getLayer());
|
|
|
|
unsigned int direction = segment->getDirection();
|
2010-12-12 15:42:57 -06:00
|
|
|
Katabatic::AutoContact* source = segment->base()->getAutoSource();
|
|
|
|
RoutingPad* rp = NULL;
|
2013-12-03 18:59:29 -06:00
|
|
|
Interval uside = source->getGCell()->getSide(direction);
|
2010-12-12 15:42:57 -06:00
|
|
|
DbU::Unit minConstraint = DbU::Min;
|
|
|
|
DbU::Unit maxConstraint = DbU::Max;
|
|
|
|
vector<TrackElement*> perpandiculars;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
if ( not track ) {
|
2013-12-03 18:59:29 -06:00
|
|
|
cerr << Bug( "%s is not inserted in a <Track>", getString(segment).c_str() ) << endl;
|
2010-03-09 09:24:55 -06:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Computing constraints from fixed only TrackElements (caging).
|
|
|
|
TrackElement* parallel;
|
|
|
|
size_t i = segment->getIndex();
|
|
|
|
while ( i > 0 ) {
|
2013-12-03 18:59:29 -06:00
|
|
|
parallel = track->getSegment( --i );
|
|
|
|
if (not parallel) continue;
|
|
|
|
if (parallel->getTargetU() < uside.getVMin()) break;
|
|
|
|
if (parallel->getNet() == segment->getNet()) continue;
|
|
|
|
if (not parallel->isFixed()) continue;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(159,0) << "Min Constraint from: " << parallel << endl;
|
2013-12-03 18:59:29 -06:00
|
|
|
minConstraint = max( minConstraint, parallel->getTargetU() );
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
i = segment->getIndex();
|
|
|
|
while ( i < track->getSize()-1 ) {
|
2013-12-03 18:59:29 -06:00
|
|
|
parallel = track->getSegment( ++i );
|
|
|
|
if (not parallel) continue;
|
|
|
|
if (parallel->getSourceU() > uside.getVMax()) break;
|
|
|
|
if (parallel->getNet() == segment->getNet()) continue;
|
|
|
|
if (not parallel->isFixed()) continue;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(159,0) << "Max Constraint from: " << parallel << endl;
|
2013-12-03 18:59:29 -06:00
|
|
|
maxConstraint = min( maxConstraint, parallel->getSourceU() );
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
if (minConstraint > maxConstraint) {
|
|
|
|
cerr << Bug( "%s have too tight caging constraints.", getString(segment).c_str() ) << endl;
|
2010-03-09 09:24:55 -06:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
if ( (minConstraint <= uside.getVMin()) and (maxConstraint >= uside.getVMax()) ) {
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(159,0) << "No constraints [" << DbU::getValueString(minConstraint)
|
2010-03-09 09:24:55 -06:00
|
|
|
<< ":" << DbU::getValueString(maxConstraint)
|
|
|
|
<< " vs. " << uside << endl;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Finding perpandiculars, by way of the source & target RoutingPad.
|
2013-12-03 18:59:29 -06:00
|
|
|
if (source->getAnchor()) {
|
2010-05-11 06:04:47 -05:00
|
|
|
rp = dynamic_cast<RoutingPad*>(source->getAnchor());
|
2013-12-03 18:59:29 -06:00
|
|
|
if (rp) {
|
2010-03-09 09:24:55 -06:00
|
|
|
TrackElement* parallel;
|
2015-05-26 07:31:38 -05:00
|
|
|
for( Segment* osegment : rp->getSlaveComponents().getSubSet<Segment*>() ) {
|
|
|
|
parallel = Session::lookup( osegment );
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(159,0) << "* " << parallel << endl;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
if (parallel->isFixed ()) continue;
|
|
|
|
if (parallel->isGlobal()) continue;
|
|
|
|
getPerpandiculars( parallel, source, direction, perpandiculars );
|
|
|
|
getPerpandiculars( parallel, segment->base()->getAutoTarget(), direction, perpandiculars );
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
} else {
|
2013-12-03 18:59:29 -06:00
|
|
|
cerr << Bug( "%s is not anchored on a <RoutingPad>\n (%s)"
|
|
|
|
, getString(source).c_str()
|
|
|
|
, getString(source->getAnchor()).c_str() ) << endl;
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Apply caging constraints to perpandiculars.
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_tabw(159,1);
|
2013-12-03 18:59:29 -06:00
|
|
|
if (perpandiculars.size() == 0) {
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(159,0) << "No perpandiculars to " << segment << endl;
|
|
|
|
cdebug_tabw(159,-1);
|
2010-05-11 06:04:47 -05:00
|
|
|
return;
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
Interval constraints ( minConstraint, maxConstraint );
|
|
|
|
for ( size_t iperpand=0 ; iperpand<perpandiculars.size() ; iperpand++ ) {
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(159,0) << "Caged: " << constraints << " " << perpandiculars[iperpand] << endl;
|
2013-12-03 18:59:29 -06:00
|
|
|
perpandiculars[iperpand]->base()->mergeUserConstraints( constraints );
|
|
|
|
if (perpandiculars[iperpand]->base()->getUserConstraints().isEmpty()) {
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(159,0) << "Cumulative caged constraints are too tight on " << perpandiculars[iperpand] << endl;
|
2013-12-03 18:59:29 -06:00
|
|
|
findFailedPerpandiculars( rp, direction, faileds );
|
2010-05-11 06:04:47 -05:00
|
|
|
}
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
2010-05-11 06:04:47 -05:00
|
|
|
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_tabw(159,-1);
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-02 07:25:03 -06:00
|
|
|
#if THIS_IS_DISABLED
|
2013-12-03 18:59:29 -06:00
|
|
|
void moveUpCaged ( TrackElement* segment )
|
|
|
|
{
|
2016-05-17 16:00:06 -05:00
|
|
|
DebugSession::open( segment->getNet(), 150, 160 );
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(159,1) << "::moveUpCaged() " << segment << endl;
|
2013-12-03 18:59:29 -06:00
|
|
|
|
|
|
|
//Configuration* configuration = Session::getConfiguration();
|
|
|
|
//const Layer* metal2 = configuration->getRoutingLayer( 1 );
|
|
|
|
//const Layer* metal3 = configuration->getRoutingLayer( 2 );
|
|
|
|
|
|
|
|
Katabatic::AutoContact* support = segment->base()->getAutoSource();
|
|
|
|
RoutingPad* rp = dynamic_cast<RoutingPad*>(support->getAnchor());
|
|
|
|
|
2015-05-26 07:31:38 -05:00
|
|
|
for( Component* component : rp->getSlaveComponents() ) {
|
|
|
|
Horizontal* baseSegment = dynamic_cast<Horizontal*>( component );
|
2013-12-03 18:59:29 -06:00
|
|
|
TrackElement* accessSegment = Session::lookup( baseSegment );
|
|
|
|
|
|
|
|
if (accessSegment and not accessSegment->isFixed()) {
|
|
|
|
accessSegment->moveUp( Katabatic::KbNoFlags );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_tabw(159,-1);
|
2013-12-03 18:59:29 -06:00
|
|
|
DebugSession::close();
|
|
|
|
}
|
2017-12-02 07:25:03 -06:00
|
|
|
#endif
|
2013-12-03 18:59:29 -06:00
|
|
|
|
|
|
|
|
2010-05-11 06:04:47 -05:00
|
|
|
void protectCagedTerminals ( Track* track )
|
2010-03-09 09:24:55 -06:00
|
|
|
{
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(159,1) << "protectCagedTerminals() " << track << endl;
|
2013-12-03 18:59:29 -06:00
|
|
|
|
More clever way of taking into account constraints on caged terminals.
* Change: In vlsispad, in Dots, add an enable/disable flag because when printing
into a cmess, it is only the base class ostream which is took into account
as none of it's methods are virtuals (silly me).
* Bug: In Etesian, print into cmess instead of cout and make use of the Dots
enabling feature.
* New: In Katabatic, added AutoContact::migrateConstraintBox() to transfert
constraint from one contact to another.
New flag for AutoContact, CntWeakTerminal for AutoContact which are at
the other of a segment directly connected to a terminal. They may hold
special constraints in case of caged terminals (computed in Kite).
In AutoHorizontal & AutoVertical, in ::_makeDogleg(), transfert flags
and constraints when breaking a segment directly connected to a terminal.
* New: In Kite, in protectCagedTerminals(), uses cross constraint on the
AutoContact opposite to the ContactTerminal (CntWeakTerminal) instead
of moving up one terminal over two consecutives. This is simpler without
degrading the routing quality.
2015-08-18 08:42:28 -05:00
|
|
|
DbU::Unit lastMovedUp = track->getMin();
|
|
|
|
unsigned int moveUpCount = 0;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
Configuration* configuration = Session::getConfiguration();
|
|
|
|
const Layer* metal2 = configuration->getRoutingLayer( 1 );
|
|
|
|
const Layer* metal3 = configuration->getRoutingLayer( 2 );
|
|
|
|
Net* neighborNet = NULL;
|
2014-07-02 17:26:15 -05:00
|
|
|
RoutingPlane* metal3plane = track->getRoutingPlane()->getTop();
|
2013-12-03 18:59:29 -06:00
|
|
|
|
|
|
|
if (track->getLayer() != metal2) {
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_tabw(159,-1);
|
2013-12-03 18:59:29 -06:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
for ( size_t i=0 ; i<track->getSize() ; ++i ) {
|
|
|
|
TrackElement* segment = track->getSegment(i);
|
Implementation of pre-routing support (for clock-tree compliance).
* New: In Katabatic, in <AutoContact>, this class is no longer derived
from ExtentionGo. With the simplificated AutoContacts, there is no
reason to do so, and it will save some QuadTree insertions/deletions.
New factory function AutoContact::createFrom(Contact*) which try to
build an AutoContact on top of a Hurricane::Contact. Of course that
base contact *must fit* into one of the predefined Contact
configurations (Terminal, Turn, HTee or VTee).
NOTE: This implies that the pre-routed segments & contacts *are*
correctly articulated, which is not the case when a Cell is read
from disk in "ap" format. The pre-routing feature must be used for
now without any re-read from disk. We will implement a re-articulating
pre-process in the future.
* Change: In Katabatic, in <AutoContact> derived classes, the ::updateCache()
method now display an accurate error message if a segment is connected
but has no AutoSegment conterpart (i.e. the lookup fails).
* New: In Katabatic, in <AutoSegment>, the ::computeOptimal() method is
short-circuited for pre-routed segments, the optimal axis position is
considered to be the one it is currently on (i.e. we trust the designer).
* New: In Katabatic, in <KatabaticEngine>, the ::loadGlobalRouting()
method now accept a map of excluded nets (same as Knik). This map is
the one of pre-routed nets.
* New: In Katabatic, in layer assignment, do not try to displace fixed
segments...
* New: In Katabatic, in <AutoSegment>, new flag SegUserDefined and related
methods to know if a segment comes from the global router (Knik) or
is pre-routed (supplied by the user).
* New: In Kite, In <BuildPowerRails>, support (exclusion) for pre-routed
nets.
* New: In Kite, In <GraphicKiteEngine> new menu entry for running the
router on pre-routed nets ("Detailed Pre-Route"), also integrated
in the all-on-one route command.
* New: In Kite, In KiteEngine, new method ::_initDataBase() that group
all the initialisation steps. It is a mix of calls between Knik and
Kite initializations which are intertwinneds (may have to devellop
a shared common base at a later point). It creates the Knik grid,
then the Katabatic grid, then load pre-routed wires and power rails
and protect isolated RoutingPads.
Add support for a map of pre-routed nets (to be excluded for
Knik calls).
The method "::run()" now uses function flags, firstly to know if
it is managing pre-routed wires or general purposes ones.
* New: In Kite, in <NegociateWindow>, the "::run()" methods has now two
modes. The normal one and the 'KtPreRoutedStage' that is for routing
pre-routed nets. When in pre-route stage, the wires are fixed at the
end of this step.
* New: In Kite, in <TrackElement> add decorator for AutoSegment
isUsedDefined().
* New: In Kite, in <TrackSegment>, the various ::canDogleg() methods
returns false for a pre-routed (user-defined segment).
* New: In Kite, in PyKiteEngine, added new method runNegociatePreRouted().
2014-06-21 13:16:47 -05:00
|
|
|
if (not segment or segment->isRouted()) continue;
|
|
|
|
if (segment and segment->isFixed() and segment->isTerminal()) {
|
Support of RoutingGauge, part 2.
In Katabatic & Kite, remove all hard-coded values related to track pitches.
* New: In <Session>, add more convenience function to access RoutingGauge
characteristics.
* New: In <AutoSegment>, <AutoContact>, add support for the "depth spin",
that is, if the source/target contacts are going "top" or "down".
Used to compute the perpandicular pitch. Need a small modification
of the revalidation mechanism. The observers of <AutoSegment> are
notified when the spin changes.
* New: In <AutoSegment>, the getPPitch() method allow to compute the
"perpandicular pitch". For now it is simply the greatest from the
source perpandicular pitch and the target perpandicular pitch.
Make uses of the "depth spin".
* New: In <TrackElement>, <TrackSegment>, cache the perpandicular pitch.
Updated through the notification from the observable.
2014-05-19 10:58:38 -05:00
|
|
|
Interval freeInterval = track->getFreeInterval( segment->getSourceU(), segment->getNet() );
|
|
|
|
DbU::Unit ppitch = segment->getPPitch();
|
2010-03-09 09:24:55 -06:00
|
|
|
|
Support of RoutingGauge, part 2.
In Katabatic & Kite, remove all hard-coded values related to track pitches.
* New: In <Session>, add more convenience function to access RoutingGauge
characteristics.
* New: In <AutoSegment>, <AutoContact>, add support for the "depth spin",
that is, if the source/target contacts are going "top" or "down".
Used to compute the perpandicular pitch. Need a small modification
of the revalidation mechanism. The observers of <AutoSegment> are
notified when the spin changes.
* New: In <AutoSegment>, the getPPitch() method allow to compute the
"perpandicular pitch". For now it is simply the greatest from the
source perpandicular pitch and the target perpandicular pitch.
Make uses of the "depth spin".
* New: In <TrackElement>, <TrackSegment>, cache the perpandicular pitch.
Updated through the notification from the observable.
2014-05-19 10:58:38 -05:00
|
|
|
//if (freeInterval.getSize() < ppitch*6) {
|
|
|
|
if ( (segment->getSourceU() - freeInterval.getVMin() < ppitch*3)
|
|
|
|
or (freeInterval.getVMax() - segment->getTargetU() < ppitch*3) ) {
|
2014-07-02 17:26:15 -05:00
|
|
|
cparanoid << "[INFO] Caged terminal: " << segment << endl;
|
Support of RoutingGauge, part 2.
In Katabatic & Kite, remove all hard-coded values related to track pitches.
* New: In <Session>, add more convenience function to access RoutingGauge
characteristics.
* New: In <AutoSegment>, <AutoContact>, add support for the "depth spin",
that is, if the source/target contacts are going "top" or "down".
Used to compute the perpandicular pitch. Need a small modification
of the revalidation mechanism. The observers of <AutoSegment> are
notified when the spin changes.
* New: In <AutoSegment>, the getPPitch() method allow to compute the
"perpandicular pitch". For now it is simply the greatest from the
source perpandicular pitch and the target perpandicular pitch.
Make uses of the "depth spin".
* New: In <TrackElement>, <TrackSegment>, cache the perpandicular pitch.
Updated through the notification from the observable.
2014-05-19 10:58:38 -05:00
|
|
|
if ( (segment->getLayer () != metal2)
|
|
|
|
or (segment->getLength() >= ppitch)
|
|
|
|
or (segment->getNet () == neighborNet) ) {
|
2013-12-03 18:59:29 -06:00
|
|
|
neighborNet = segment->getNet();
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
More clever way of taking into account constraints on caged terminals.
* Change: In vlsispad, in Dots, add an enable/disable flag because when printing
into a cmess, it is only the base class ostream which is took into account
as none of it's methods are virtuals (silly me).
* Bug: In Etesian, print into cmess instead of cout and make use of the Dots
enabling feature.
* New: In Katabatic, added AutoContact::migrateConstraintBox() to transfert
constraint from one contact to another.
New flag for AutoContact, CntWeakTerminal for AutoContact which are at
the other of a segment directly connected to a terminal. They may hold
special constraints in case of caged terminals (computed in Kite).
In AutoHorizontal & AutoVertical, in ::_makeDogleg(), transfert flags
and constraints when breaking a segment directly connected to a terminal.
* New: In Kite, in protectCagedTerminals(), uses cross constraint on the
AutoContact opposite to the ContactTerminal (CntWeakTerminal) instead
of moving up one terminal over two consecutives. This is simpler without
degrading the routing quality.
2015-08-18 08:42:28 -05:00
|
|
|
Katabatic::AutoContact* support = NULL;
|
|
|
|
Katabatic::AutoContact* turn = NULL;
|
|
|
|
if (segment->base()->isSourceTerminal()) {
|
|
|
|
support = segment->base()->getAutoSource();
|
|
|
|
turn = segment->base()->getAutoTarget();
|
|
|
|
} else {
|
|
|
|
support = segment->base()->getAutoTarget();
|
|
|
|
turn = segment->base()->getAutoSource();
|
|
|
|
}
|
|
|
|
|
|
|
|
RoutingPad* rp = dynamic_cast<RoutingPad*>(support->getAnchor());
|
|
|
|
Track* metal3track = metal3plane->getTrackByPosition( rp->getSourcePosition().getX() );
|
|
|
|
|
|
|
|
turn->restrictConstraintBox( freeInterval.getVMin()
|
|
|
|
, freeInterval.getVMax()
|
|
|
|
, KbVertical );
|
2014-07-02 17:26:15 -05:00
|
|
|
|
|
|
|
if (metal3track->getFreeInterval(segment->getAxis(),segment->getNet()).isEmpty()) {
|
|
|
|
cparanoid << "[INFO] Cannot protect caged terminal because top layer (metal3) is obstructed." << endl;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
Support of RoutingGauge, part 2.
In Katabatic & Kite, remove all hard-coded values related to track pitches.
* New: In <Session>, add more convenience function to access RoutingGauge
characteristics.
* New: In <AutoSegment>, <AutoContact>, add support for the "depth spin",
that is, if the source/target contacts are going "top" or "down".
Used to compute the perpandicular pitch. Need a small modification
of the revalidation mechanism. The observers of <AutoSegment> are
notified when the spin changes.
* New: In <AutoSegment>, the getPPitch() method allow to compute the
"perpandicular pitch". For now it is simply the greatest from the
source perpandicular pitch and the target perpandicular pitch.
Make uses of the "depth spin".
* New: In <TrackElement>, <TrackSegment>, cache the perpandicular pitch.
Updated through the notification from the observable.
2014-05-19 10:58:38 -05:00
|
|
|
if (segment->getSourceU() - lastMovedUp < ppitch*4) {
|
2013-12-03 18:59:29 -06:00
|
|
|
++moveUpCount;
|
|
|
|
if (moveUpCount % 2 == 0) {
|
More clever way of taking into account constraints on caged terminals.
* Change: In vlsispad, in Dots, add an enable/disable flag because when printing
into a cmess, it is only the base class ostream which is took into account
as none of it's methods are virtuals (silly me).
* Bug: In Etesian, print into cmess instead of cout and make use of the Dots
enabling feature.
* New: In Katabatic, added AutoContact::migrateConstraintBox() to transfert
constraint from one contact to another.
New flag for AutoContact, CntWeakTerminal for AutoContact which are at
the other of a segment directly connected to a terminal. They may hold
special constraints in case of caged terminals (computed in Kite).
In AutoHorizontal & AutoVertical, in ::_makeDogleg(), transfert flags
and constraints when breaking a segment directly connected to a terminal.
* New: In Kite, in protectCagedTerminals(), uses cross constraint on the
AutoContact opposite to the ContactTerminal (CntWeakTerminal) instead
of moving up one terminal over two consecutives. This is simpler without
degrading the routing quality.
2015-08-18 08:42:28 -05:00
|
|
|
//moveUpCaged( segment );
|
2013-12-03 18:59:29 -06:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
moveUpCount = 0;
|
|
|
|
}
|
|
|
|
lastMovedUp = segment->getSourceU();
|
|
|
|
|
2010-12-12 15:42:57 -06:00
|
|
|
Katabatic::AutoContact* source
|
2013-12-03 18:59:29 -06:00
|
|
|
= Katabatic::AutoContactTerminal::create( support->getGCell()
|
|
|
|
, rp
|
|
|
|
, metal3
|
|
|
|
, rp->getSourcePosition()
|
Support of RoutingGauge, part 2.
In Katabatic & Kite, remove all hard-coded values related to track pitches.
* New: In <Session>, add more convenience function to access RoutingGauge
characteristics.
* New: In <AutoSegment>, <AutoContact>, add support for the "depth spin",
that is, if the source/target contacts are going "top" or "down".
Used to compute the perpandicular pitch. Need a small modification
of the revalidation mechanism. The observers of <AutoSegment> are
notified when the spin changes.
* New: In <AutoSegment>, the getPPitch() method allow to compute the
"perpandicular pitch". For now it is simply the greatest from the
source perpandicular pitch and the target perpandicular pitch.
Make uses of the "depth spin".
* New: In <TrackElement>, <TrackSegment>, cache the perpandicular pitch.
Updated through the notification from the observable.
2014-05-19 10:58:38 -05:00
|
|
|
, DbU::fromLambda(1.0), DbU::fromLambda(1.0)
|
2013-12-03 18:59:29 -06:00
|
|
|
);
|
|
|
|
source->setFlags( Katabatic::CntIgnoreAnchor );
|
|
|
|
|
2010-12-12 15:42:57 -06:00
|
|
|
Katabatic::AutoContact* target =
|
2013-12-03 18:59:29 -06:00
|
|
|
Katabatic::AutoContactTerminal::create( support->getGCell()
|
|
|
|
, rp
|
|
|
|
, metal3
|
|
|
|
, rp->getSourcePosition()
|
Support of RoutingGauge, part 2.
In Katabatic & Kite, remove all hard-coded values related to track pitches.
* New: In <Session>, add more convenience function to access RoutingGauge
characteristics.
* New: In <AutoSegment>, <AutoContact>, add support for the "depth spin",
that is, if the source/target contacts are going "top" or "down".
Used to compute the perpandicular pitch. Need a small modification
of the revalidation mechanism. The observers of <AutoSegment> are
notified when the spin changes.
* New: In <AutoSegment>, the getPPitch() method allow to compute the
"perpandicular pitch". For now it is simply the greatest from the
source perpandicular pitch and the target perpandicular pitch.
Make uses of the "depth spin".
* New: In <TrackElement>, <TrackSegment>, cache the perpandicular pitch.
Updated through the notification from the observable.
2014-05-19 10:58:38 -05:00
|
|
|
, DbU::fromLambda(1.0), DbU::fromLambda(1.0)
|
2013-12-03 18:59:29 -06:00
|
|
|
);
|
|
|
|
target->setFlags( Katabatic::CntIgnoreAnchor );
|
|
|
|
|
|
|
|
AutoSegment* fixedSegment = AutoSegment::create( source, target, Katabatic::KbVertical );
|
|
|
|
fixedSegment->setFlags( Katabatic::SegFixed );
|
|
|
|
Session::getNegociateWindow()->createTrackSegment( fixedSegment, KtLoadingStage );
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
2013-12-03 18:59:29 -06:00
|
|
|
|
|
|
|
neighborNet = segment->getNet();
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
}
|
2013-12-03 18:59:29 -06:00
|
|
|
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_tabw(159,-1);
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // End of local namespace.
|
|
|
|
|
|
|
|
|
|
|
|
namespace Kite {
|
|
|
|
|
|
|
|
|
|
|
|
using Hurricane::Bug;
|
|
|
|
using Hurricane::Net;
|
|
|
|
using Hurricane::Name;
|
2013-12-03 18:59:29 -06:00
|
|
|
using Katabatic::AutoSegmentLut;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
|
|
|
|
void KiteEngine::preProcess ()
|
|
|
|
{
|
2013-12-03 18:59:29 -06:00
|
|
|
for ( size_t i=0 ; i<_routingPlanes.size() ; ++i ) {
|
2010-03-09 09:24:55 -06:00
|
|
|
RoutingPlane* plane = _routingPlanes[i];
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
Track* track = plane->getTrackByIndex( 0 );
|
2010-03-09 09:24:55 -06:00
|
|
|
while ( track ) {
|
2013-12-03 18:59:29 -06:00
|
|
|
protectCagedTerminals( track );
|
|
|
|
track = track->getNextTrack();
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
Session::revalidate ();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KiteEngine::_computeCagedConstraints ()
|
|
|
|
{
|
2010-05-11 06:04:47 -05:00
|
|
|
set<TrackElement*> faileds;
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
TrackElement* segment = NULL;
|
|
|
|
AutoSegmentLut::const_iterator isegment = _getAutoSegmentLut().begin();
|
|
|
|
for ( ; isegment != _getAutoSegmentLut().end() ; isegment++ ) {
|
|
|
|
segment = _lookup( isegment->second );
|
|
|
|
if (not segment or not segment->isFixed()) continue;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2016-05-17 16:00:06 -05:00
|
|
|
DebugSession::open( segment->getNet(), 150, 160 );
|
2013-12-03 18:59:29 -06:00
|
|
|
propagateCagedConstraints( segment, faileds );
|
|
|
|
DebugSession::close();
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
} // Kite namespace.
|