2010-03-09 09:24:29 -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:29 -06:00
|
|
|
//
|
2012-12-03 02:28:43 -06:00
|
|
|
// +-----------------------------------------------------------------+
|
2010-03-09 09:24:29 -06:00
|
|
|
// | C O R I O L I S |
|
|
|
|
// | K a t a b a t i c - Routing Toolbox |
|
|
|
|
// | |
|
|
|
|
// | Author : Jean-Paul CHAPUT |
|
2013-12-03 18:58:58 -06:00
|
|
|
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
2010-03-09 09:24:29 -06:00
|
|
|
// | =============================================================== |
|
|
|
|
// | C++ Module : "./AutoHorizontal.cpp" |
|
2012-12-03 02:28:43 -06:00
|
|
|
// +-----------------------------------------------------------------+
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
|
|
|
#include <algorithm>
|
|
|
|
#include "hurricane/Bug.h"
|
|
|
|
#include "hurricane/Error.h"
|
|
|
|
#include "hurricane/DebugSession.h"
|
2013-12-03 18:58:58 -06:00
|
|
|
#include "hurricane/RoutingPad.h"
|
2010-03-09 09:24:29 -06:00
|
|
|
#include "crlcore/RoutingGauge.h"
|
|
|
|
#include "katabatic/Configuration.h"
|
2013-12-03 18:58:58 -06:00
|
|
|
#include "katabatic/AutoContactTerminal.h"
|
|
|
|
#include "katabatic/AutoContactTurn.h"
|
2010-03-09 09:24:29 -06:00
|
|
|
#include "katabatic/AutoHorizontal.h"
|
|
|
|
#include "katabatic/AutoVertical.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace Katabatic {
|
|
|
|
|
|
|
|
|
|
|
|
using std::min;
|
|
|
|
using std::max;
|
|
|
|
using Hurricane::Error;
|
|
|
|
using Hurricane::Bug;
|
|
|
|
using Hurricane::DebugSession;
|
2013-12-03 18:58:58 -06:00
|
|
|
using Hurricane::RoutingPad;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "Katabatic::AutoHorizontal".
|
|
|
|
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
Segment* AutoHorizontal::base () { return _horizontal; }
|
|
|
|
Segment* AutoHorizontal::base () const { return _horizontal; }
|
|
|
|
Horizontal* AutoHorizontal::getHorizontal () { return _horizontal; }
|
|
|
|
DbU::Unit AutoHorizontal::getSourceU () const { return _horizontal->getSourceX(); }
|
|
|
|
DbU::Unit AutoHorizontal::getTargetU () const { return _horizontal->getTargetX(); }
|
|
|
|
DbU::Unit AutoHorizontal::getDuSource () const { return _horizontal->getDxSource(); }
|
|
|
|
DbU::Unit AutoHorizontal::getDuTarget () const { return _horizontal->getDxTarget(); }
|
|
|
|
Interval AutoHorizontal::getSpanU () const { return Interval(_horizontal->getSourceX(),_horizontal->getTargetX()); }
|
|
|
|
void AutoHorizontal::setDuSource ( DbU::Unit du ) { _horizontal->setDxSource(du); }
|
|
|
|
void AutoHorizontal::setDuTarget ( DbU::Unit du ) { _horizontal->setDxTarget(du); }
|
|
|
|
string AutoHorizontal::_getTypeName () const { return "AutoHorizontal"; }
|
|
|
|
|
|
|
|
|
|
|
|
AutoHorizontal::AutoHorizontal ( Horizontal* horizontal )
|
|
|
|
: AutoSegment(horizontal)
|
2010-03-09 09:24:29 -06:00
|
|
|
, _horizontal(horizontal)
|
|
|
|
{
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(145,0) << "CTOR AutoHorizontal " << this << endl;
|
|
|
|
cdebug_log(145,0) << " over " << horizontal << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void AutoHorizontal::_postCreate ()
|
|
|
|
{
|
|
|
|
AutoSegment::_postCreate ();
|
|
|
|
|
|
|
|
AutoContact* source = getAutoSource();
|
2013-12-03 18:58:58 -06:00
|
|
|
if (source->isTerminal()) source->setY( _horizontal->getY() );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
AutoContact* target = getAutoTarget();
|
2013-12-03 18:58:58 -06:00
|
|
|
if (target->isTerminal()) target->setY( _horizontal->getY() );
|
|
|
|
|
|
|
|
if (source->getGCell() != target->getGCell()) {
|
|
|
|
setFlags( SegGlobal );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
GCell* gcell;
|
|
|
|
GCell* end;
|
|
|
|
|
|
|
|
if ( source->getGCell()->getX() < target->getGCell()->getX() ) {
|
|
|
|
gcell = source->getGCell()->getRight();
|
|
|
|
end = target->getGCell();
|
|
|
|
} else {
|
|
|
|
gcell = target->getGCell()->getRight();
|
|
|
|
end = source->getGCell();
|
|
|
|
}
|
|
|
|
|
|
|
|
for ( ; gcell != end ; gcell = gcell->getRight() ) {
|
|
|
|
if ( !gcell ) {
|
New relation for slaved ABs. Do *not* delete blockage nets.
* Change: In Hurricane, in DataBase::CellDepths() the recursion stop
criterion must be Cell::isLeaf() and not Cell::isTerminal() as
the second one can be used to hide some levels of hierarchy,
and we want all of them in a blob.
* New: In Hurricane, in Cell, create a new Slaveds relation to keep
track of all the Cells with a slaved abutment box. This work is
incomplete as we do not manage the behavior in case of merge or
Cell destruction or slaving Cells with aready slaveds ones.
Modify Cell::setAbutmentBox() to work in both autonomous and
slaved mode.
* New: In Hurricane, in Net, add a new type of Net: BLOCKAGE this
avoid us to be dependant on the framework pattern recognition.
(change propagated to the Python support)
* New: In CRL Core, in the various drivers, recognize blockage nets
as such and set their type accordingly.
* Change: In CRL, in Toolbox::deleteEmptyNets(), preserve blockage
Nets. This was the cause of crashs in Kite::BuildPowerRails() as
we where trying to use a deleted blockage net...
* Bug: In Hurricane, in NetAlias, do not write NetAlias as a name
but as a type. They were not read back and moreover staying in
the JSON parser stack.
2016-03-30 10:47:00 -05:00
|
|
|
cerr << Error( "AutoHorizontal::create() : NULL GCell under %s\n"
|
|
|
|
" begin:%s\n"
|
|
|
|
" end: %s"
|
|
|
|
, getString(this).c_str()
|
|
|
|
, getString(source->getGCell()).c_str()
|
|
|
|
, getString(target->getGCell()).c_str()
|
|
|
|
) << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
gcell->addHSegment ( this );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void AutoHorizontal::_preDestroy ()
|
|
|
|
{
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(149,0) << "AutoHorizontal::_preDestroy() - <id:" << getId() << "> " << endl;
|
|
|
|
cdebug_log(149,0) << " " << _getString() << endl;
|
|
|
|
cdebug_tabw(145,1);
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
if ( not Session::doDestroyTool() ) {
|
|
|
|
AutoContact* source = getAutoSource();
|
|
|
|
AutoContact* target = getAutoTarget();
|
|
|
|
|
|
|
|
if ( source and target and (source->getGCell() != target->getGCell()) ) {
|
|
|
|
GCell* gcell;
|
|
|
|
GCell* end;
|
|
|
|
|
|
|
|
if ( source->getGCell()->getX() < target->getGCell()->getX() ) {
|
|
|
|
gcell = source->getGCell()->getRight();
|
|
|
|
end = target->getGCell();
|
|
|
|
} else {
|
|
|
|
gcell = target->getGCell()->getRight();
|
|
|
|
end = source->getGCell();
|
|
|
|
}
|
|
|
|
|
|
|
|
for ( ; gcell != end ; gcell = gcell->getRight() ) {
|
|
|
|
if ( !gcell ) {
|
|
|
|
cerr << Error("AutoHorizontal::_preDestroy() : NULL GCell.") << endl;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
gcell->removeHSegment ( this );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
AutoSegment::_preDestroy ();
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_tabw(145,-1);
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
AutoHorizontal::~AutoHorizontal ()
|
|
|
|
{
|
|
|
|
if ( Session::doDestroyBaseSegment() and not Session::doDestroyTool() ) {
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(149,0) << "~AutoHorizontal() - " << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
_horizontal->destroy ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
Interval AutoHorizontal::getSourceConstraints ( unsigned int flags ) const
|
2010-03-09 09:24:29 -06:00
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
if (flags & KbNativeConstraints) {
|
2010-03-09 09:24:29 -06:00
|
|
|
Box nativeBox ( getAutoSource()->getNativeConstraintBox() );
|
|
|
|
return Interval ( nativeBox.getYMin(), nativeBox.getYMax() );
|
|
|
|
}
|
|
|
|
return Interval ( getAutoSource()->getCBYMin(), getAutoSource()->getCBYMax() );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
Interval AutoHorizontal::getTargetConstraints ( unsigned int flags ) const
|
2010-03-09 09:24:29 -06:00
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
if (flags & KbNativeConstraints) {
|
2010-03-09 09:24:29 -06:00
|
|
|
Box nativeBox ( getAutoTarget()->getNativeConstraintBox() );
|
|
|
|
return Interval ( nativeBox.getYMin(), nativeBox.getYMax() );
|
|
|
|
}
|
|
|
|
return Interval ( getAutoTarget()->getCBYMin(), getAutoTarget()->getCBYMax() );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool AutoHorizontal::getConstraints ( DbU::Unit& constraintMin, DbU::Unit& constraintMax ) const
|
|
|
|
{
|
|
|
|
AutoContact* contact = getAutoSource();
|
|
|
|
constraintMin = contact->getCBYMin();
|
|
|
|
constraintMax = contact->getCBYMax();
|
|
|
|
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(149,0) << "Source constraints: " << contact << " ["
|
2010-03-09 09:24:29 -06:00
|
|
|
<< DbU::getValueString(constraintMin) << ":"
|
|
|
|
<< DbU::getValueString(constraintMax) << "]"
|
|
|
|
<< endl;
|
|
|
|
|
|
|
|
contact = getAutoTarget();
|
|
|
|
constraintMin = max ( constraintMin, contact->getCBYMin() );
|
|
|
|
constraintMax = min ( constraintMax, contact->getCBYMax() );
|
|
|
|
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(149,0) << "Merge with target constraints: " << contact << " ["
|
2016-04-22 15:43:53 -05:00
|
|
|
<< DbU::getValueString(contact->getCBYMin()) << ":"
|
|
|
|
<< DbU::getValueString(contact->getCBYMax()) << "]"
|
2010-03-09 09:24:29 -06:00
|
|
|
<< endl;
|
|
|
|
|
|
|
|
constraintMin = max ( constraintMin, getUserConstraints().getVMin() );
|
|
|
|
constraintMax = min ( constraintMax, getUserConstraints().getVMax() );
|
|
|
|
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(149,0) << "Merge with user constraints: " << getUserConstraints() << " ["
|
2016-04-22 15:43:53 -05:00
|
|
|
<< DbU::getValueString(getUserConstraints().getVMin()) << ":"
|
|
|
|
<< DbU::getValueString(getUserConstraints().getVMax()) << "]"
|
|
|
|
<< endl;
|
|
|
|
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(149,0) << "Resulting constraints: " << " ["
|
2010-03-09 09:24:29 -06:00
|
|
|
<< DbU::getValueString(constraintMin) << ":"
|
|
|
|
<< DbU::getValueString(constraintMax) << "]"
|
|
|
|
<< endl;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
unsigned int AutoHorizontal::getDirection () const
|
2013-12-03 18:58:58 -06:00
|
|
|
{ return KbHorizontal; }
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
|
|
|
size_t AutoHorizontal::getGCells ( vector<GCell*>& gcells ) const
|
|
|
|
{
|
|
|
|
vector<GCell*>().swap ( gcells );
|
|
|
|
gcells.push_back ( getAutoSource()->getGCell() );
|
|
|
|
|
|
|
|
GCell* gcell = gcells.front();
|
|
|
|
GCell* end = getAutoTarget()->getGCell();
|
|
|
|
|
|
|
|
while ( gcell != end ) {
|
|
|
|
gcell = gcell->getRight ();
|
|
|
|
if ( !gcell ) break;
|
|
|
|
|
|
|
|
gcells.push_back ( gcell );
|
|
|
|
}
|
|
|
|
|
|
|
|
return gcells.size();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool AutoHorizontal::_canSlacken () const
|
|
|
|
{
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_tabw(149,1);
|
2013-12-03 18:58:58 -06:00
|
|
|
|
Improved UpdateSession & exception catching. Start of RoutingGauge implem.
Miscellaneous:
* Change: In <crlcore>, in display.conf use the same display threshold
for both METAL2 & METAL3.
In alliance.conf, the side of VIAs in the gauge is 2l (not 3l).
In kite.conf, separate edge densities for H/V.
* Change: In <Cell>, in flattenNets() use flag as argument, not a
boolean. Do not create rings for clock or supply nets.
* Change: In <DeepNet>, in _createRoutingPads() do not create rings
for clock or supply net (duplicated policy as in Cell::flattenNets()).
* Bug: In <ControllerWidget>, at last find the bad signal disconnect
that was causing ungraceful messages.
* Change: In <knik>, in Edge display occupancy/capacity in the string
name. Improved display progress and debugging capabilities.
Improved exception catch & breakpoint managment:
* Bug: In <PaletteWidget>, in updateExtensions() replace the calls to
deleteLayer() by delete. This cause the widget to be immediatly
erased instead of waiting for the event queue to be completly
processed. This was causing the widget to be left in a incoherent
state when stoping at a breakpoint.
* Bug: In <BreakpointWidget>, in execNoModal(), flush the main event
loop (QApplication::flush()) *before* lauching the *local* event
loop. This is to ensure all widgets are in their final state when
waiting (especially <PaletteWidget>).
* Change: In <ExceptionWidget>, new method catchAllWrapper() to
execute any std::function< void() > function/method with a "try"/
"catch" wraparound and lauch the widget in case something is catch.
* New: In <hurricane>, support for a oberver pattern, backported from
<katabatic> with an Obervable capable of being linked to any
number of Obervers.
* New: In <Cell>, made it observable to detect Cell change, currently
emit two kind of signals:
- Cell::CellAboutToChange : *before* any change.
- Cell::CellChanged : *after* the change has been completed.
* New: In <UpdateSession>, in Go::invalidate() add the Cell owning the
Go to the UPDATOR_STACK (of course the cell is added only once).
In addition, when the Cell is added, send a notification of
Cell::CellAboutToChange to all it's observers. The slave instances
are also invalidated.
Conversely in UpdateSession::_preDestroy() for each invalidated
Cell send a Cell::CellChanged notification to all observer.
The UPDATOR_STACK has been slightly amended to accept Cell which
are not Gos. Prior to this, the Cell where completly excluded from
the UpdateSession mechanism, so it's instances where never actualised
of anything referring to the Cell for that matter.
Note: we use two different mechanisms to transmit a Cell change,
observers and the slave instance map. I think at some point it
should be unificated.
* Change: In <CellViewer>, make it a Cell observer to redraw when the
cell is modificated (also update the palette).
Uses the catchAllWrapper() to protect all critical actions.
* Change: In <GraphicTool>, no longer need of cellPreModificated and
cellPostModificated signals. Now done through the Cell obersvers.
* Change: In <mauka>, <etesian> & <kite> now uses the catchAllWrapper
method for protection (need to split methods in two, to be able
to pass it as argument). No longer emit cellPreModificated and
cellPostModificated.
Support for RoutingGauge in P&R:
* Bug: In <placeandroute.py>, the connection from the internal power
ring to the connectors was not done correctly. Wrong contact layers
leading to a gap.
* Change: In <BuildPowerRails>, detection of the corona signals based
on how the "pck_px" pad is connected. No longer based on name
matching.
* Change: In <placeandroute.py>, support for 2 routing metal only
(3 metal in the technology).
* Change: In <katabatic> & <kite> support for a "top layer" limitation
on the routing gauge, this allows to use only two routing metals
(METAL2 & METAL3). Work in progress.
2014-04-20 12:25:08 -05:00
|
|
|
Interval sourceSide = getAutoSource()->getGCell()->getSide( KbVertical );
|
|
|
|
Interval targetSide = getAutoTarget()->getGCell()->getSide( KbVertical );
|
2010-03-09 09:24:29 -06:00
|
|
|
Interval sourceConstraints = Interval(getAutoSource()->getCBYMin(),getAutoSource()->getCBYMax());
|
|
|
|
Interval targetConstraints = Interval(getAutoTarget()->getCBYMin(),getAutoTarget()->getCBYMax());
|
|
|
|
|
Improved UpdateSession & exception catching. Start of RoutingGauge implem.
Miscellaneous:
* Change: In <crlcore>, in display.conf use the same display threshold
for both METAL2 & METAL3.
In alliance.conf, the side of VIAs in the gauge is 2l (not 3l).
In kite.conf, separate edge densities for H/V.
* Change: In <Cell>, in flattenNets() use flag as argument, not a
boolean. Do not create rings for clock or supply nets.
* Change: In <DeepNet>, in _createRoutingPads() do not create rings
for clock or supply net (duplicated policy as in Cell::flattenNets()).
* Bug: In <ControllerWidget>, at last find the bad signal disconnect
that was causing ungraceful messages.
* Change: In <knik>, in Edge display occupancy/capacity in the string
name. Improved display progress and debugging capabilities.
Improved exception catch & breakpoint managment:
* Bug: In <PaletteWidget>, in updateExtensions() replace the calls to
deleteLayer() by delete. This cause the widget to be immediatly
erased instead of waiting for the event queue to be completly
processed. This was causing the widget to be left in a incoherent
state when stoping at a breakpoint.
* Bug: In <BreakpointWidget>, in execNoModal(), flush the main event
loop (QApplication::flush()) *before* lauching the *local* event
loop. This is to ensure all widgets are in their final state when
waiting (especially <PaletteWidget>).
* Change: In <ExceptionWidget>, new method catchAllWrapper() to
execute any std::function< void() > function/method with a "try"/
"catch" wraparound and lauch the widget in case something is catch.
* New: In <hurricane>, support for a oberver pattern, backported from
<katabatic> with an Obervable capable of being linked to any
number of Obervers.
* New: In <Cell>, made it observable to detect Cell change, currently
emit two kind of signals:
- Cell::CellAboutToChange : *before* any change.
- Cell::CellChanged : *after* the change has been completed.
* New: In <UpdateSession>, in Go::invalidate() add the Cell owning the
Go to the UPDATOR_STACK (of course the cell is added only once).
In addition, when the Cell is added, send a notification of
Cell::CellAboutToChange to all it's observers. The slave instances
are also invalidated.
Conversely in UpdateSession::_preDestroy() for each invalidated
Cell send a Cell::CellChanged notification to all observer.
The UPDATOR_STACK has been slightly amended to accept Cell which
are not Gos. Prior to this, the Cell where completly excluded from
the UpdateSession mechanism, so it's instances where never actualised
of anything referring to the Cell for that matter.
Note: we use two different mechanisms to transmit a Cell change,
observers and the slave instance map. I think at some point it
should be unificated.
* Change: In <CellViewer>, make it a Cell observer to redraw when the
cell is modificated (also update the palette).
Uses the catchAllWrapper() to protect all critical actions.
* Change: In <GraphicTool>, no longer need of cellPreModificated and
cellPostModificated signals. Now done through the Cell obersvers.
* Change: In <mauka>, <etesian> & <kite> now uses the catchAllWrapper
method for protection (need to split methods in two, to be able
to pass it as argument). No longer emit cellPreModificated and
cellPostModificated.
Support for RoutingGauge in P&R:
* Bug: In <placeandroute.py>, the connection from the internal power
ring to the connectors was not done correctly. Wrong contact layers
leading to a gap.
* Change: In <BuildPowerRails>, detection of the corona signals based
on how the "pck_px" pad is connected. No longer based on name
matching.
* Change: In <placeandroute.py>, support for 2 routing metal only
(3 metal in the technology).
* Change: In <katabatic> & <kite> support for a "top layer" limitation
on the routing gauge, this allows to use only two routing metals
(METAL2 & METAL3). Work in progress.
2014-04-20 12:25:08 -05:00
|
|
|
// Expand by a tiny amount for the "contains" to work for sure.
|
|
|
|
sourceConstraints.inflate( 1 );
|
|
|
|
targetConstraints.inflate( 1 );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(149,0) << "source " << getAutoSource() << endl;
|
|
|
|
cdebug_log(149,0) << "source constraints: " << sourceConstraints
|
2010-03-09 09:24:29 -06:00
|
|
|
<< " " << DbU::getValueString(sourceConstraints.getSize()) << endl;
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(149,0) << "target " << getAutoTarget() << endl;
|
|
|
|
cdebug_log(149,0) << "target constraints: " << targetConstraints
|
2010-03-09 09:24:29 -06:00
|
|
|
<< " " << DbU::getValueString(targetConstraints.getSize()) << endl;
|
|
|
|
|
2016-06-11 14:56:12 -05:00
|
|
|
if (not sourceConstraints.contains(sourceSide)) { cdebug_tabw(149,-1); return true; }
|
|
|
|
if (not targetConstraints.contains(targetSide)) { cdebug_tabw(149,-1); return true; }
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_tabw(149,-1);
|
2010-03-09 09:24:29 -06:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
bool AutoHorizontal::_slacken ( unsigned int flags )
|
2010-03-09 09:24:29 -06:00
|
|
|
{
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(149,0) << "AutoHorizontal::_slacken() " << this << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (not isStrongTerminal()) return false;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
const Configuration* configuration = Session::getConfiguration();
|
|
|
|
const Layer* metal2 = configuration->getRoutingLayer( 1 );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
bool success = false;
|
|
|
|
bool isMetal2Source = false;
|
|
|
|
bool isMetal2Target = false;
|
|
|
|
DbU::Unit height = 0;
|
|
|
|
AutoContact* source = getAutoSource();
|
|
|
|
AutoContact* target = getAutoTarget();
|
|
|
|
if (source->isTerminal()) {
|
|
|
|
height = (static_cast<RoutingPad*>(source->getAnchor()))->getBoundingBox().getHeight();
|
|
|
|
isMetal2Source = (source->getLayer() == metal2);
|
|
|
|
}
|
|
|
|
if (target->isTerminal()) {
|
|
|
|
height = std::min( height, (static_cast<RoutingPad*>(target->getAnchor()))->getBoundingBox().getHeight() );
|
|
|
|
isMetal2Target = (target->getLayer() == metal2);
|
|
|
|
}
|
|
|
|
|
Improved UpdateSession & exception catching. Start of RoutingGauge implem.
Miscellaneous:
* Change: In <crlcore>, in display.conf use the same display threshold
for both METAL2 & METAL3.
In alliance.conf, the side of VIAs in the gauge is 2l (not 3l).
In kite.conf, separate edge densities for H/V.
* Change: In <Cell>, in flattenNets() use flag as argument, not a
boolean. Do not create rings for clock or supply nets.
* Change: In <DeepNet>, in _createRoutingPads() do not create rings
for clock or supply net (duplicated policy as in Cell::flattenNets()).
* Bug: In <ControllerWidget>, at last find the bad signal disconnect
that was causing ungraceful messages.
* Change: In <knik>, in Edge display occupancy/capacity in the string
name. Improved display progress and debugging capabilities.
Improved exception catch & breakpoint managment:
* Bug: In <PaletteWidget>, in updateExtensions() replace the calls to
deleteLayer() by delete. This cause the widget to be immediatly
erased instead of waiting for the event queue to be completly
processed. This was causing the widget to be left in a incoherent
state when stoping at a breakpoint.
* Bug: In <BreakpointWidget>, in execNoModal(), flush the main event
loop (QApplication::flush()) *before* lauching the *local* event
loop. This is to ensure all widgets are in their final state when
waiting (especially <PaletteWidget>).
* Change: In <ExceptionWidget>, new method catchAllWrapper() to
execute any std::function< void() > function/method with a "try"/
"catch" wraparound and lauch the widget in case something is catch.
* New: In <hurricane>, support for a oberver pattern, backported from
<katabatic> with an Obervable capable of being linked to any
number of Obervers.
* New: In <Cell>, made it observable to detect Cell change, currently
emit two kind of signals:
- Cell::CellAboutToChange : *before* any change.
- Cell::CellChanged : *after* the change has been completed.
* New: In <UpdateSession>, in Go::invalidate() add the Cell owning the
Go to the UPDATOR_STACK (of course the cell is added only once).
In addition, when the Cell is added, send a notification of
Cell::CellAboutToChange to all it's observers. The slave instances
are also invalidated.
Conversely in UpdateSession::_preDestroy() for each invalidated
Cell send a Cell::CellChanged notification to all observer.
The UPDATOR_STACK has been slightly amended to accept Cell which
are not Gos. Prior to this, the Cell where completly excluded from
the UpdateSession mechanism, so it's instances where never actualised
of anything referring to the Cell for that matter.
Note: we use two different mechanisms to transmit a Cell change,
observers and the slave instance map. I think at some point it
should be unificated.
* Change: In <CellViewer>, make it a Cell observer to redraw when the
cell is modificated (also update the palette).
Uses the catchAllWrapper() to protect all critical actions.
* Change: In <GraphicTool>, no longer need of cellPreModificated and
cellPostModificated signals. Now done through the Cell obersvers.
* Change: In <mauka>, <etesian> & <kite> now uses the catchAllWrapper
method for protection (need to split methods in two, to be able
to pass it as argument). No longer emit cellPreModificated and
cellPostModificated.
Support for RoutingGauge in P&R:
* Bug: In <placeandroute.py>, the connection from the internal power
ring to the connectors was not done correctly. Wrong contact layers
leading to a gap.
* Change: In <BuildPowerRails>, detection of the corona signals based
on how the "pck_px" pad is connected. No longer based on name
matching.
* Change: In <placeandroute.py>, support for 2 routing metal only
(3 metal in the technology).
* Change: In <katabatic> & <kite> support for a "top layer" limitation
on the routing gauge, this allows to use only two routing metals
(METAL2 & METAL3). Work in progress.
2014-04-20 12:25:08 -05:00
|
|
|
if (height >= 4*getPitch()) {
|
|
|
|
if (not (_flags & (SegGlobal|SegWeakGlobal)) and (getLength() < 5*getPitch()))
|
2013-12-03 18:58:58 -06:00
|
|
|
return false;
|
|
|
|
}
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_tabw(149,1);
|
|
|
|
cdebug_log(149,0) << "_flags:" << (_flags & (SegGlobal|SegWeakGlobal)) << endl;
|
|
|
|
cdebug_log(149,0) << "test:" << (getLength() < 5*getPitch()) << endl;
|
|
|
|
cdebug_log(149,0) << "length:" << DbU::getValueString(getLength()) << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
|
|
|
|
int lowSlack = (flags & KbHalfSlacken) ? 3 : 10;
|
|
|
|
bool slackened = false;
|
|
|
|
bool halfSlackened = false;
|
|
|
|
DbU::Unit targetPosition = getTargetPosition();
|
|
|
|
AutoSegment* parallel = this;
|
|
|
|
|
|
|
|
if (source->isTerminal()) {
|
|
|
|
Interval perpandConstraints = getAutoTarget()->getUConstraints(KbHorizontal);
|
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 constraints = source->getUConstraints (KbVertical|KbNoGCellShrink);
|
|
|
|
Interval nativeConstraints = source->getNativeUConstraints(KbVertical|KbNoGCellShrink);
|
Improved UpdateSession & exception catching. Start of RoutingGauge implem.
Miscellaneous:
* Change: In <crlcore>, in display.conf use the same display threshold
for both METAL2 & METAL3.
In alliance.conf, the side of VIAs in the gauge is 2l (not 3l).
In kite.conf, separate edge densities for H/V.
* Change: In <Cell>, in flattenNets() use flag as argument, not a
boolean. Do not create rings for clock or supply nets.
* Change: In <DeepNet>, in _createRoutingPads() do not create rings
for clock or supply net (duplicated policy as in Cell::flattenNets()).
* Bug: In <ControllerWidget>, at last find the bad signal disconnect
that was causing ungraceful messages.
* Change: In <knik>, in Edge display occupancy/capacity in the string
name. Improved display progress and debugging capabilities.
Improved exception catch & breakpoint managment:
* Bug: In <PaletteWidget>, in updateExtensions() replace the calls to
deleteLayer() by delete. This cause the widget to be immediatly
erased instead of waiting for the event queue to be completly
processed. This was causing the widget to be left in a incoherent
state when stoping at a breakpoint.
* Bug: In <BreakpointWidget>, in execNoModal(), flush the main event
loop (QApplication::flush()) *before* lauching the *local* event
loop. This is to ensure all widgets are in their final state when
waiting (especially <PaletteWidget>).
* Change: In <ExceptionWidget>, new method catchAllWrapper() to
execute any std::function< void() > function/method with a "try"/
"catch" wraparound and lauch the widget in case something is catch.
* New: In <hurricane>, support for a oberver pattern, backported from
<katabatic> with an Obervable capable of being linked to any
number of Obervers.
* New: In <Cell>, made it observable to detect Cell change, currently
emit two kind of signals:
- Cell::CellAboutToChange : *before* any change.
- Cell::CellChanged : *after* the change has been completed.
* New: In <UpdateSession>, in Go::invalidate() add the Cell owning the
Go to the UPDATOR_STACK (of course the cell is added only once).
In addition, when the Cell is added, send a notification of
Cell::CellAboutToChange to all it's observers. The slave instances
are also invalidated.
Conversely in UpdateSession::_preDestroy() for each invalidated
Cell send a Cell::CellChanged notification to all observer.
The UPDATOR_STACK has been slightly amended to accept Cell which
are not Gos. Prior to this, the Cell where completly excluded from
the UpdateSession mechanism, so it's instances where never actualised
of anything referring to the Cell for that matter.
Note: we use two different mechanisms to transmit a Cell change,
observers and the slave instance map. I think at some point it
should be unificated.
* Change: In <CellViewer>, make it a Cell observer to redraw when the
cell is modificated (also update the palette).
Uses the catchAllWrapper() to protect all critical actions.
* Change: In <GraphicTool>, no longer need of cellPreModificated and
cellPostModificated signals. Now done through the Cell obersvers.
* Change: In <mauka>, <etesian> & <kite> now uses the catchAllWrapper
method for protection (need to split methods in two, to be able
to pass it as argument). No longer emit cellPreModificated and
cellPostModificated.
Support for RoutingGauge in P&R:
* Bug: In <placeandroute.py>, the connection from the internal power
ring to the connectors was not done correctly. Wrong contact layers
leading to a gap.
* Change: In <BuildPowerRails>, detection of the corona signals based
on how the "pck_px" pad is connected. No longer based on name
matching.
* Change: In <placeandroute.py>, support for 2 routing metal only
(3 metal in the technology).
* Change: In <katabatic> & <kite> support for a "top layer" limitation
on the routing gauge, this allows to use only two routing metals
(METAL2 & METAL3). Work in progress.
2014-04-20 12:25:08 -05:00
|
|
|
int slack = constraints.getSize() / getPitch();
|
|
|
|
int nativeSlack = nativeConstraints.getSize() / getPitch();
|
2013-12-03 18:58:58 -06:00
|
|
|
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(149,0) << "Source constraint: " << constraints
|
2013-12-03 18:58:58 -06:00
|
|
|
<< " slack:" << slack
|
|
|
|
<< " native slack:" << nativeSlack << endl;
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(149,0) << "Perpand constraints on target: " << perpandConstraints << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
// Ugly: GCell's track number is hardwired.
|
|
|
|
if ((nativeSlack < lowSlack) or (nativeSlack - slack < 3)) {
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(149,0) << "Slackening from Source: " << source << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
_makeDogleg( source->getGCell(), KbNoFlags );
|
|
|
|
slackened = true;
|
|
|
|
} else if (slack < 10) {
|
|
|
|
halfSlackened = true;
|
|
|
|
}
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
const vector<AutoSegment*>& doglegs = Session::getDoglegs();
|
|
|
|
if (doglegs.size() >= 2) {
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(149,0) << "AutoSegment::_slaken(): Source @" << DbU::getValueString(getSourcePosition()) << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
doglegs[doglegs.size()-2]->setAxis( getSourcePosition() );
|
|
|
|
success = true;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (isMetal2Source) {
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(149,0) << "Fixing on source terminal contact."
|
2016-04-22 15:43:53 -05:00
|
|
|
<< doglegs[doglegs.size()-2]->getAutoSource() << endl;
|
|
|
|
//doglegs[doglegs.size()-2]->getAutoSource()->setFlags( CntFixed );
|
|
|
|
doglegs[doglegs.size()-2]->getAutoSource()->setConstraintBox( source->getConstraintBox() );
|
|
|
|
doglegs[doglegs.size()-2]->getAutoSource()->setFlags( CntUserNativeConstraints );
|
2013-12-03 18:58:58 -06:00
|
|
|
}
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
parallel = doglegs[ doglegs.size()-1 ];
|
|
|
|
}
|
|
|
|
}
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (parallel) target = parallel->getAutoTarget();
|
|
|
|
|
|
|
|
if (target->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 constraints = target->getUConstraints (KbVertical|KbNoGCellShrink);
|
|
|
|
Interval nativeConstraints = target->getNativeUConstraints(KbVertical|KbNoGCellShrink);
|
Improved UpdateSession & exception catching. Start of RoutingGauge implem.
Miscellaneous:
* Change: In <crlcore>, in display.conf use the same display threshold
for both METAL2 & METAL3.
In alliance.conf, the side of VIAs in the gauge is 2l (not 3l).
In kite.conf, separate edge densities for H/V.
* Change: In <Cell>, in flattenNets() use flag as argument, not a
boolean. Do not create rings for clock or supply nets.
* Change: In <DeepNet>, in _createRoutingPads() do not create rings
for clock or supply net (duplicated policy as in Cell::flattenNets()).
* Bug: In <ControllerWidget>, at last find the bad signal disconnect
that was causing ungraceful messages.
* Change: In <knik>, in Edge display occupancy/capacity in the string
name. Improved display progress and debugging capabilities.
Improved exception catch & breakpoint managment:
* Bug: In <PaletteWidget>, in updateExtensions() replace the calls to
deleteLayer() by delete. This cause the widget to be immediatly
erased instead of waiting for the event queue to be completly
processed. This was causing the widget to be left in a incoherent
state when stoping at a breakpoint.
* Bug: In <BreakpointWidget>, in execNoModal(), flush the main event
loop (QApplication::flush()) *before* lauching the *local* event
loop. This is to ensure all widgets are in their final state when
waiting (especially <PaletteWidget>).
* Change: In <ExceptionWidget>, new method catchAllWrapper() to
execute any std::function< void() > function/method with a "try"/
"catch" wraparound and lauch the widget in case something is catch.
* New: In <hurricane>, support for a oberver pattern, backported from
<katabatic> with an Obervable capable of being linked to any
number of Obervers.
* New: In <Cell>, made it observable to detect Cell change, currently
emit two kind of signals:
- Cell::CellAboutToChange : *before* any change.
- Cell::CellChanged : *after* the change has been completed.
* New: In <UpdateSession>, in Go::invalidate() add the Cell owning the
Go to the UPDATOR_STACK (of course the cell is added only once).
In addition, when the Cell is added, send a notification of
Cell::CellAboutToChange to all it's observers. The slave instances
are also invalidated.
Conversely in UpdateSession::_preDestroy() for each invalidated
Cell send a Cell::CellChanged notification to all observer.
The UPDATOR_STACK has been slightly amended to accept Cell which
are not Gos. Prior to this, the Cell where completly excluded from
the UpdateSession mechanism, so it's instances where never actualised
of anything referring to the Cell for that matter.
Note: we use two different mechanisms to transmit a Cell change,
observers and the slave instance map. I think at some point it
should be unificated.
* Change: In <CellViewer>, make it a Cell observer to redraw when the
cell is modificated (also update the palette).
Uses the catchAllWrapper() to protect all critical actions.
* Change: In <GraphicTool>, no longer need of cellPreModificated and
cellPostModificated signals. Now done through the Cell obersvers.
* Change: In <mauka>, <etesian> & <kite> now uses the catchAllWrapper
method for protection (need to split methods in two, to be able
to pass it as argument). No longer emit cellPreModificated and
cellPostModificated.
Support for RoutingGauge in P&R:
* Bug: In <placeandroute.py>, the connection from the internal power
ring to the connectors was not done correctly. Wrong contact layers
leading to a gap.
* Change: In <BuildPowerRails>, detection of the corona signals based
on how the "pck_px" pad is connected. No longer based on name
matching.
* Change: In <placeandroute.py>, support for 2 routing metal only
(3 metal in the technology).
* Change: In <katabatic> & <kite> support for a "top layer" limitation
on the routing gauge, this allows to use only two routing metals
(METAL2 & METAL3). Work in progress.
2014-04-20 12:25:08 -05:00
|
|
|
int slack = constraints.getSize() / getPitch();
|
|
|
|
int nativeSlack = nativeConstraints.getSize() / getPitch();
|
2013-12-03 18:58:58 -06:00
|
|
|
|
|
|
|
// Ugly: GCell's track number is hardwired.
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(149,0) << "Target constraint: " << constraints
|
2013-12-03 18:58:58 -06:00
|
|
|
<< " slack:" << slack
|
|
|
|
<< " native slack:" << nativeSlack << endl;
|
|
|
|
if ((nativeSlack < lowSlack) or (nativeSlack - slack < 3)) {
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(149,0) << "Slackening from Target: " << target << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
parallel->_makeDogleg( target->getGCell(), KbNoFlags );
|
|
|
|
slackened = true;
|
|
|
|
} else if (slack < 10) {
|
|
|
|
halfSlackened = true;
|
|
|
|
}
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (halfSlackened) {
|
|
|
|
setFlags( SegHalfSlackened );
|
|
|
|
} else if (slackened) {
|
|
|
|
setFlags ( SegSlackened );
|
|
|
|
unsetFlags( SegHalfSlackened );
|
|
|
|
}
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
const vector<AutoSegment*>& doglegs = Session::getDoglegs();
|
|
|
|
if (doglegs.size() >= 2) {
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(149,0) << "AutoSegment::_slaken(): Target @" << DbU::getValueString(targetPosition) << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
doglegs[doglegs.size()-2]->setAxis( targetPosition );
|
|
|
|
success = true;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (isMetal2Target) {
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(149,0) << "Fixing on target terminal contact: "
|
2016-04-22 15:43:53 -05:00
|
|
|
<< doglegs[doglegs.size()-2]->getAutoTarget() << endl;
|
|
|
|
//doglegs[doglegs.size()-2]->getAutoTarget()->setFlags( CntFixed );
|
|
|
|
doglegs[doglegs.size()-2]->getAutoTarget()->setConstraintBox( target->getConstraintBox() );
|
|
|
|
doglegs[doglegs.size()-2]->getAutoTarget()->setFlags( CntUserNativeConstraints );
|
2013-12-03 18:58:58 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_tabw(149,-1);
|
2013-12-03 18:58:58 -06:00
|
|
|
|
|
|
|
return success;
|
|
|
|
}
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
void AutoHorizontal::_setAxis ( DbU::Unit axis )
|
2010-03-09 09:24:29 -06:00
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
setFlags( SegAxisSet );
|
|
|
|
|
|
|
|
if ((axis != getAxis()) and isFixed()) {
|
|
|
|
cerr << Error( "AutoHorizontal::setAxis(): Cannot move fixed segment to %s.\n"
|
|
|
|
" (on: %s)"
|
|
|
|
, DbU::getValueString(axis).c_str()
|
|
|
|
, _getString().c_str()
|
|
|
|
) << endl;
|
|
|
|
}
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (_horizontal->getY() == axis) return;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(145,0) << "_setAxis() @Y " << DbU::toLambda(axis) << " " << this << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
|
|
|
|
_horizontal->setY( axis );
|
|
|
|
invalidate();
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
AutoContact* anchor = getAutoSource();
|
2013-12-03 18:58:58 -06:00
|
|
|
anchor->invalidate();
|
|
|
|
if (anchor->isTerminal()) anchor->setY( axis );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
anchor = getAutoTarget();
|
2013-12-03 18:58:58 -06:00
|
|
|
anchor->invalidate();
|
|
|
|
if (anchor->isTerminal()) anchor->setY( axis );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
void AutoHorizontal::updateOrient ()
|
2010-03-09 09:24:29 -06:00
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
if (_horizontal->getTargetX() < _horizontal->getSourceX()) {
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(145,0) << "updateOrient() " << this << " (before S/T swap)" << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
_horizontal->invert();
|
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
|
|
|
|
|
|
|
unsigned int spinFlags = _flags & SegDepthSpin;
|
|
|
|
unsetFlags( SegDepthSpin );
|
|
|
|
if (spinFlags & SegSourceTop ) setFlags( SegTargetTop );
|
|
|
|
if (spinFlags & SegSourceBottom) setFlags( SegTargetBottom );
|
|
|
|
if (spinFlags & SegTargetTop ) setFlags( SegSourceTop );
|
|
|
|
if (spinFlags & SegTargetBottom) setFlags( SegSourceBottom );
|
2016-12-01 17:13:17 -06:00
|
|
|
|
|
|
|
unsigned int invalidatedFlags = _flags & (SegInvalidatedSource|SegInvalidatedTarget);
|
|
|
|
unsetFlags( SegInvalidatedSource|SegInvalidatedTarget );
|
|
|
|
if (invalidatedFlags & SegInvalidatedSource) setFlags( SegInvalidatedTarget );
|
|
|
|
if (invalidatedFlags & SegInvalidatedTarget) setFlags( SegInvalidatedSource );
|
|
|
|
|
|
|
|
unsigned int terminalFlags = _flags & SegStrongTerminal;
|
|
|
|
unsetFlags( SegStrongTerminal );
|
|
|
|
if (terminalFlags & SegSourceTerminal) setFlags( SegTargetTerminal );
|
|
|
|
if (terminalFlags & SegTargetTerminal) setFlags( SegSourceTerminal );
|
2013-12-03 18:58:58 -06:00
|
|
|
}
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
void AutoHorizontal::updatePositions ()
|
2010-03-09 09:24:29 -06:00
|
|
|
{
|
ExtensionCap support and source/target terminal flags in Katabatic & Kite.
Placement management:
* Change: In <metis>, always disable the hMetis support regardless of
it being detected or not as the placer is still unable manage the
final bin contents.
Routing gauge management:
* Bug: In CRL Core, <vsclib/alliance.conf>, set the correct pitches and
size for the routing layers and the cell gauge.
* Change: In Katabatic & Kite, extract the correct extension cap for each
routing layer from the layers characteristics (cache then in
Katabatic::Configuration).
* Change: In Katabatic, <AutoSegment>, create segment with the wire width
defined in the gauge. For AutoSegment created on already existing
Segment from the global routing, adjust the width.
* Change: In Katabatic, <AutoSegment>, more accurate information about how
a segment is connected to terminal via source and/or target.
The flag SegStrongTerminal is splitted into SegSourceTerminal and
SegSourceTarget (but still used as a mask). So now we can know by
which end an AutoSegment is connected to a terminal.
* Change: In Katabatic, ::doRp_Access(), create constraint freeing segments
not only when HSmall but also when VSmall (more critical for <vsclib>).
Otherwise we may see AutoSegments with incompatible source/target
constraints.
* Change: In Kite, BuildPowerRails, do not create blockage on PinOnly
layers *but* still create power rails planes. This is a temporary
workaround for <vsclib> where the METAL1 blockages overlaps the
terminals (it was fine for Nero, but they shouldn't for Kite).
* Change: In Kite, <RoutingEvent>, if a TrackSegment is overconstrained,
directly bybass it's slackening state to DataNegociate::Slacken.
Also rename the flag "_canHandleConstraints" to "_overConstrained",
seems clearer to me.
Miscellaneous:
* Change: In CRL Core, <Utilities>, add a "pass-though" capability on the
mstream to temporarily make them print everything.
2014-05-25 08:00:35 -05:00
|
|
|
_sourcePosition = _horizontal->getSourceX() - Session::getExtensionCap(getLayer());
|
|
|
|
_targetPosition = _horizontal->getTargetX() + Session::getExtensionCap(getLayer());
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool AutoHorizontal::checkPositions () const
|
|
|
|
{
|
|
|
|
bool coherency = true;
|
ExtensionCap support and source/target terminal flags in Katabatic & Kite.
Placement management:
* Change: In <metis>, always disable the hMetis support regardless of
it being detected or not as the placer is still unable manage the
final bin contents.
Routing gauge management:
* Bug: In CRL Core, <vsclib/alliance.conf>, set the correct pitches and
size for the routing layers and the cell gauge.
* Change: In Katabatic & Kite, extract the correct extension cap for each
routing layer from the layers characteristics (cache then in
Katabatic::Configuration).
* Change: In Katabatic, <AutoSegment>, create segment with the wire width
defined in the gauge. For AutoSegment created on already existing
Segment from the global routing, adjust the width.
* Change: In Katabatic, <AutoSegment>, more accurate information about how
a segment is connected to terminal via source and/or target.
The flag SegStrongTerminal is splitted into SegSourceTerminal and
SegSourceTarget (but still used as a mask). So now we can know by
which end an AutoSegment is connected to a terminal.
* Change: In Katabatic, ::doRp_Access(), create constraint freeing segments
not only when HSmall but also when VSmall (more critical for <vsclib>).
Otherwise we may see AutoSegments with incompatible source/target
constraints.
* Change: In Kite, BuildPowerRails, do not create blockage on PinOnly
layers *but* still create power rails planes. This is a temporary
workaround for <vsclib> where the METAL1 blockages overlaps the
terminals (it was fine for Nero, but they shouldn't for Kite).
* Change: In Kite, <RoutingEvent>, if a TrackSegment is overconstrained,
directly bybass it's slackening state to DataNegociate::Slacken.
Also rename the flag "_canHandleConstraints" to "_overConstrained",
seems clearer to me.
Miscellaneous:
* Change: In CRL Core, <Utilities>, add a "pass-though" capability on the
mstream to temporarily make them print everything.
2014-05-25 08:00:35 -05:00
|
|
|
DbU::Unit sourcePosition = _horizontal->getSourceX() - Session::getExtensionCap(getLayer());
|
|
|
|
DbU::Unit targetPosition = _horizontal->getTargetX() + Session::getExtensionCap(getLayer());
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
if ( _sourcePosition != sourcePosition ) {
|
|
|
|
cerr << Error ( "%s\n Source position incoherency: "
|
|
|
|
"shadow: %s, real: %s."
|
|
|
|
, _getString().c_str()
|
|
|
|
, DbU::getValueString(_sourcePosition).c_str()
|
|
|
|
, DbU::getValueString( sourcePosition).c_str()
|
|
|
|
) << endl;
|
|
|
|
coherency = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( _targetPosition != targetPosition ) {
|
|
|
|
cerr << Error ( "%s\n Target position incoherency: "
|
|
|
|
"shadow: %s, real: %s."
|
|
|
|
, _getString().c_str()
|
|
|
|
, DbU::getValueString(_targetPosition).c_str()
|
|
|
|
, DbU::getValueString( targetPosition).c_str()
|
|
|
|
) << endl;
|
|
|
|
coherency = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return coherency;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool AutoHorizontal::checkConstraints () const
|
|
|
|
{
|
|
|
|
Interval sourceConstraints = Interval(getAutoSource()->getCBYMin(),getAutoSource()->getCBYMax());
|
|
|
|
Interval targetConstraints = Interval(getAutoTarget()->getCBYMin(),getAutoTarget()->getCBYMax());
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
|
|
|
|
if (not sourceConstraints.intersect(targetConstraints)) {
|
|
|
|
cerr << Error ( "%s\n Constraints incoherency:\n"
|
|
|
|
" S:%s %s\n"
|
|
|
|
" T:%s %s"
|
2010-03-09 09:24:29 -06:00
|
|
|
, _getString().c_str()
|
|
|
|
, getString(sourceConstraints).c_str()
|
2013-12-03 18:58:58 -06:00
|
|
|
, getString(getAutoSource()).c_str()
|
2010-03-09 09:24:29 -06:00
|
|
|
, getString(targetConstraints).c_str()
|
2013-12-03 18:58:58 -06:00
|
|
|
, getString(getAutoTarget()).c_str()
|
2010-03-09 09:24:29 -06:00
|
|
|
) << endl;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
bool AutoHorizontal::canMoveULeft ( float reserve ) const
|
* ./katabatic:
- New: ChipTools, regroup all datas and utilities to manage a full-chip
design.
- Change: In LoadGrByNet/GCellConfiguration::_GCell_xG_1Pad(), uses straight
perpandicular wires on top & right pads. The GCells under those connectors
are fully saturated, wires must go out as straight as possible.
- Change: In AutoHorizontal/AutoVertical, update the "terminal" flag after
slackening. This is to avoid global that are no longer connected to
terminals behave as such.
- Change: In AutoSegment::canMoveUp() & canPivotUp(), prevent all local segments
to go up. This is to avoid cluttering upper levels with small segments.
- Change: In GCellConfiguration, for xG_xL3, detect straight vertical topologies
and for them to be fixed (new flag FIXED_GLOBAL set by the topological
builder instead of the constructor). This prevent the router to do
stupid things...
To sets the "Fixed" flag *after* the axis of global segments have been
positionned correctly adds a "_toFixGlobals" static table lookup.
- Change: In GCell::stepDesaturate(), if less than one free track remains in
the upper layer, do not move up the segment. This allows from a minimum
free room for expansion.
- Change: In GCell::_getString(), display indexes and layer names in various
saturation tables.
- Change: In AutoSegment, allow move up of local Segment. ::moveUp() and
::canMoveUp() arguments go from booleans to flags, which are more
explicits.
2010-12-04 09:25:18 -06:00
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
//cerr << "canMoveULeft() " << this << endl;
|
|
|
|
|
|
|
|
if (not isGlobal()) return false;
|
|
|
|
if (not getAutoSource()->isTurn() or not getAutoTarget()->isTurn()) return false;
|
|
|
|
if (not getAutoSource()->getGCell()->getDown()) return false;
|
|
|
|
|
|
|
|
AutoContact* autoSource = getAutoSource();
|
|
|
|
AutoContact* autoTarget = getAutoTarget();
|
|
|
|
AutoSegment* perpandiculars[2] = { autoSource->getSegment(0), autoTarget->getSegment(0) };
|
|
|
|
|
|
|
|
if ( ( (not perpandiculars[0]->isGlobal()) or (perpandiculars[0]->getAutoSource() == autoSource) )
|
|
|
|
and ( (not perpandiculars[1]->isGlobal()) or (perpandiculars[1]->getAutoSource() == autoTarget) ) )
|
|
|
|
return false;
|
|
|
|
|
|
|
|
GCell* begin = autoSource->getGCell();
|
|
|
|
GCell* end = autoTarget->getGCell();
|
|
|
|
unsigned int depth = Session::getRoutingGauge()->getLayerDepth( getLayer() );
|
|
|
|
float currMaxDensity = 0.0;
|
|
|
|
float leftMaxDensity = 0.0;
|
|
|
|
|
|
|
|
//cerr << "| begin:" << begin << endl;
|
|
|
|
//cerr << "| end: " << end << endl;
|
|
|
|
for ( GCell* gcell=begin ; gcell and gcell!=end ; gcell=gcell->getRight() ) {
|
|
|
|
//cerr << "| gcell:" << gcell << endl;
|
|
|
|
if (currMaxDensity < gcell->getWDensity(depth)) currMaxDensity = gcell->getWDensity( depth );
|
|
|
|
}
|
|
|
|
|
|
|
|
begin = begin->getDown();
|
|
|
|
end = end ->getDown();
|
|
|
|
|
|
|
|
for ( GCell* gcell=begin ; gcell and gcell!=end ; gcell=gcell->getRight() ) {
|
|
|
|
if (leftMaxDensity < gcell->getWDensity(depth)) leftMaxDensity = gcell->getWDensity( depth );
|
|
|
|
}
|
* ./katabatic:
- New: ChipTools, regroup all datas and utilities to manage a full-chip
design.
- Change: In LoadGrByNet/GCellConfiguration::_GCell_xG_1Pad(), uses straight
perpandicular wires on top & right pads. The GCells under those connectors
are fully saturated, wires must go out as straight as possible.
- Change: In AutoHorizontal/AutoVertical, update the "terminal" flag after
slackening. This is to avoid global that are no longer connected to
terminals behave as such.
- Change: In AutoSegment::canMoveUp() & canPivotUp(), prevent all local segments
to go up. This is to avoid cluttering upper levels with small segments.
- Change: In GCellConfiguration, for xG_xL3, detect straight vertical topologies
and for them to be fixed (new flag FIXED_GLOBAL set by the topological
builder instead of the constructor). This prevent the router to do
stupid things...
To sets the "Fixed" flag *after* the axis of global segments have been
positionned correctly adds a "_toFixGlobals" static table lookup.
- Change: In GCell::stepDesaturate(), if less than one free track remains in
the upper layer, do not move up the segment. This allows from a minimum
free room for expansion.
- Change: In GCell::_getString(), display indexes and layer names in various
saturation tables.
- Change: In AutoSegment, allow move up of local Segment. ::moveUp() and
::canMoveUp() arguments go from booleans to flags, which are more
explicits.
2010-12-04 09:25:18 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
return (leftMaxDensity + reserve < currMaxDensity);
|
* ./katabatic:
- New: ChipTools, regroup all datas and utilities to manage a full-chip
design.
- Change: In LoadGrByNet/GCellConfiguration::_GCell_xG_1Pad(), uses straight
perpandicular wires on top & right pads. The GCells under those connectors
are fully saturated, wires must go out as straight as possible.
- Change: In AutoHorizontal/AutoVertical, update the "terminal" flag after
slackening. This is to avoid global that are no longer connected to
terminals behave as such.
- Change: In AutoSegment::canMoveUp() & canPivotUp(), prevent all local segments
to go up. This is to avoid cluttering upper levels with small segments.
- Change: In GCellConfiguration, for xG_xL3, detect straight vertical topologies
and for them to be fixed (new flag FIXED_GLOBAL set by the topological
builder instead of the constructor). This prevent the router to do
stupid things...
To sets the "Fixed" flag *after* the axis of global segments have been
positionned correctly adds a "_toFixGlobals" static table lookup.
- Change: In GCell::stepDesaturate(), if less than one free track remains in
the upper layer, do not move up the segment. This allows from a minimum
free room for expansion.
- Change: In GCell::_getString(), display indexes and layer names in various
saturation tables.
- Change: In AutoSegment, allow move up of local Segment. ::moveUp() and
::canMoveUp() arguments go from booleans to flags, which are more
explicits.
2010-12-04 09:25:18 -06:00
|
|
|
}
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
bool AutoHorizontal::canMoveURight ( float reserve ) const
|
2010-03-09 09:24:29 -06:00
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
//cerr << "canMoveURight() " << this << endl;
|
|
|
|
|
|
|
|
if (not isGlobal()) return false;
|
|
|
|
if (not getAutoSource()->isTurn() or not getAutoTarget()->isTurn()) return false;
|
|
|
|
if (not getAutoSource()->getGCell()->getUp()) return false;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
AutoContact* autoSource = getAutoSource();
|
|
|
|
AutoContact* autoTarget = getAutoTarget();
|
|
|
|
AutoSegment* perpandiculars[2] = { autoSource->getSegment(0), autoTarget->getSegment(0) };
|
|
|
|
|
|
|
|
if ( ( (not perpandiculars[0]->isGlobal()) or (perpandiculars[0]->getAutoTarget() == autoSource) )
|
|
|
|
and ( (not perpandiculars[1]->isGlobal()) or (perpandiculars[1]->getAutoTarget() == autoTarget) ) )
|
|
|
|
return false;
|
|
|
|
|
|
|
|
GCell* begin = autoSource->getGCell();
|
|
|
|
GCell* end = autoTarget->getGCell();
|
|
|
|
unsigned int depth = Session::getRoutingGauge()->getLayerDepth( getLayer() );
|
|
|
|
float currMaxDensity = 0.0;
|
|
|
|
float leftMaxDensity = 0.0;
|
|
|
|
|
|
|
|
//cerr << "| begin:" << begin << endl;
|
|
|
|
//cerr << "| end: " << end << endl;
|
|
|
|
|
|
|
|
for ( GCell* gcell=begin ; gcell and gcell!=end ; gcell=gcell->getRight() ) {
|
|
|
|
//cerr << "| gcell: " << gcell << endl;
|
|
|
|
if (currMaxDensity < gcell->getWDensity(depth)) currMaxDensity = gcell->getWDensity( depth );
|
|
|
|
}
|
|
|
|
|
|
|
|
begin = begin->getUp();
|
|
|
|
end = end ->getUp();
|
|
|
|
|
|
|
|
for ( GCell* gcell=begin ; gcell and gcell!=end ; gcell=gcell->getRight() ) {
|
|
|
|
if (leftMaxDensity < gcell->getWDensity(depth)) leftMaxDensity = gcell->getWDensity( depth );
|
|
|
|
}
|
|
|
|
|
|
|
|
return (leftMaxDensity + reserve < currMaxDensity);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool AutoHorizontal::moveULeft ()
|
|
|
|
{
|
|
|
|
if (not getAutoSource()->isTurn() or not getAutoTarget()->isTurn()) return false;
|
|
|
|
if (not getAutoSource()->getGCell()->getDown()) return false;
|
|
|
|
|
|
|
|
AutoContact* autoSource = getAutoSource();
|
|
|
|
AutoContact* autoTarget = getAutoTarget();
|
|
|
|
GCell* begin = autoSource->getGCell();
|
|
|
|
GCell* end = autoTarget->getGCell();
|
|
|
|
AutoSegment* perpandicular = autoSource->getSegment(2);
|
|
|
|
|
|
|
|
if (perpandicular->isLocal()) {
|
|
|
|
perpandicular->setFlags( Katabatic::SegGlobal );
|
|
|
|
} else {
|
|
|
|
if (perpandicular->getAutoSource() == autoSource) {
|
|
|
|
begin->addVSegment( perpandicular );
|
2010-03-09 09:24:29 -06:00
|
|
|
} else {
|
2013-12-03 18:58:58 -06:00
|
|
|
if (begin->getDown() == perpandicular->getAutoSource()->getGCell()) {
|
|
|
|
perpandicular->unsetFlags( Katabatic::SegGlobal );
|
2010-03-09 09:24:29 -06:00
|
|
|
} else
|
2013-12-03 18:58:58 -06:00
|
|
|
begin->getDown()->removeVSegment( perpandicular );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
perpandicular = autoTarget->getSegment(2);
|
|
|
|
if (perpandicular->isLocal()) {
|
|
|
|
perpandicular->setFlags( Katabatic::SegGlobal );
|
|
|
|
} else {
|
|
|
|
if (perpandicular->getAutoSource() == autoTarget) {
|
|
|
|
end->addVSegment( perpandicular );
|
2010-03-09 09:24:29 -06:00
|
|
|
} else {
|
2013-12-03 18:58:58 -06:00
|
|
|
if (end->getDown() == perpandicular->getAutoSource()->getGCell()) {
|
|
|
|
perpandicular->unsetFlags( Katabatic::SegGlobal );
|
2010-03-09 09:24:29 -06:00
|
|
|
} else
|
2013-12-03 18:58:58 -06:00
|
|
|
end->getDown()->removeVSegment( perpandicular );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (begin != end) {
|
|
|
|
for ( GCell* gcell=begin->getRight() ; gcell and gcell!=end ; gcell=gcell->getRight() )
|
|
|
|
gcell->removeHSegment( this );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
begin = begin->getDown();
|
|
|
|
end = end ->getDown();
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
autoSource->setGCell( begin );
|
|
|
|
autoTarget->setGCell( end );
|
|
|
|
if (begin != end) {
|
|
|
|
for ( GCell* gcell=begin->getRight() ; gcell and gcell!=end ; gcell=gcell->getRight() )
|
|
|
|
gcell->addHSegment( this );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
DbU::Unit y = begin->getSide(KbVertical).getVMax();
|
|
|
|
setAxis( y );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
return true;
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
bool AutoHorizontal::moveURight ()
|
2010-03-09 09:24:29 -06:00
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
//cerr << "moveURight() " << this << endl;
|
|
|
|
|
|
|
|
if (not getAutoSource()->isTurn() or not getAutoTarget()->isTurn()) return false;
|
|
|
|
if (not getAutoSource()->getGCell()->getUp()) return false;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
AutoContact* autoSource = getAutoSource();
|
|
|
|
AutoContact* autoTarget = getAutoTarget();
|
|
|
|
GCell* begin = autoSource->getGCell();
|
|
|
|
GCell* end = autoTarget->getGCell();
|
|
|
|
AutoSegment* perpandicular = autoSource->getSegment(2);
|
|
|
|
|
|
|
|
if (perpandicular->isLocal()) {
|
|
|
|
perpandicular->setFlags( Katabatic::SegGlobal );
|
|
|
|
} else {
|
|
|
|
if (perpandicular->getAutoTarget() == autoSource) {
|
|
|
|
begin->addVSegment( perpandicular );
|
2010-03-09 09:24:29 -06:00
|
|
|
} else {
|
2013-12-03 18:58:58 -06:00
|
|
|
if (begin->getUp() == perpandicular->getAutoTarget()->getGCell()) {
|
|
|
|
perpandicular->unsetFlags( Katabatic::SegGlobal );
|
2010-03-09 09:24:29 -06:00
|
|
|
} else
|
2013-12-03 18:58:58 -06:00
|
|
|
begin->getUp()->removeVSegment( perpandicular );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
perpandicular = autoTarget->getSegment(2);
|
|
|
|
if (perpandicular->isLocal()) {
|
|
|
|
perpandicular->setFlags( Katabatic::SegGlobal );
|
|
|
|
} else {
|
|
|
|
if (perpandicular->getAutoTarget() == autoTarget) {
|
|
|
|
end->addVSegment( perpandicular );
|
2010-03-09 09:24:29 -06:00
|
|
|
} else {
|
2013-12-03 18:58:58 -06:00
|
|
|
if (end->getUp() == perpandicular->getAutoTarget()->getGCell()) {
|
|
|
|
perpandicular->unsetFlags( Katabatic::SegGlobal );
|
2010-03-09 09:24:29 -06:00
|
|
|
} else
|
2013-12-03 18:58:58 -06:00
|
|
|
end->getUp()->removeVSegment( perpandicular );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
//cerr << "| begin:" << begin << endl;
|
|
|
|
//cerr << "| end: " << end << endl;
|
|
|
|
|
|
|
|
//cerr << "* remove" << endl;
|
|
|
|
if (begin != end) {
|
|
|
|
for ( GCell* gcell=begin->getRight() ; gcell and gcell!=end ; gcell=gcell->getRight() ) {
|
|
|
|
//cerr << "| gcell: " << end << endl;
|
|
|
|
gcell->removeHSegment( this );
|
|
|
|
}
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
begin = begin->getUp();
|
|
|
|
end = end ->getUp();
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
autoSource->setGCell( begin );
|
|
|
|
autoTarget->setGCell( end );
|
|
|
|
//cerr << "* add" << endl;
|
|
|
|
if (begin != end) {
|
|
|
|
for ( GCell* gcell=begin->getRight() ; gcell and gcell!=end ; gcell=gcell->getRight() ) {
|
|
|
|
//cerr << "| gcell: " << end << endl;
|
|
|
|
gcell->addHSegment( this );
|
|
|
|
}
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
DbU::Unit y = begin->getSide( KbVertical ).getVMin();
|
|
|
|
setAxis( y );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
return true;
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
unsigned int AutoHorizontal::_makeDogleg ( GCell* doglegGCell, unsigned int flags )
|
2010-03-09 09:24:29 -06:00
|
|
|
{
|
2016-05-17 16:00:06 -05:00
|
|
|
DebugSession::open( getNet(), 140, 150 );
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(149,0) << "AutoHorizontal::_makeDogleg(GCell*)" << endl;
|
|
|
|
cdebug_tabw(149,1);
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
//Session::doglegReset();
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
AutoContact* autoTarget = getAutoTarget();
|
|
|
|
AutoContact* autoSource = getAutoSource();
|
|
|
|
GCell* begin = autoSource->getGCell();
|
|
|
|
GCell* end = autoTarget->getGCell();
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
DbU::Unit doglegAxis = (doglegGCell->getXMax() + doglegGCell->getX()) / 2;
|
|
|
|
if (isLocal())
|
|
|
|
doglegAxis = (getSourceX() + getTargetX()) / 2;
|
|
|
|
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(149,0) << "Detaching from Target AutoContact " << autoTarget << "." << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (doglegGCell == begin) unsetFlags( SegGlobal );
|
|
|
|
if (doglegGCell != end) {
|
|
|
|
GCell* gcell = doglegGCell;
|
2010-03-09 09:24:29 -06:00
|
|
|
do {
|
2013-12-03 18:58:58 -06:00
|
|
|
if (gcell != begin)
|
|
|
|
gcell->removeHSegment( this );
|
|
|
|
gcell = gcell->getRight();
|
|
|
|
} while ( gcell and (gcell != end) );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
size_t depth = Session::getRoutingGauge()->getLayerDepth( _horizontal->getLayer() );
|
Improved UpdateSession & exception catching. Start of RoutingGauge implem.
Miscellaneous:
* Change: In <crlcore>, in display.conf use the same display threshold
for both METAL2 & METAL3.
In alliance.conf, the side of VIAs in the gauge is 2l (not 3l).
In kite.conf, separate edge densities for H/V.
* Change: In <Cell>, in flattenNets() use flag as argument, not a
boolean. Do not create rings for clock or supply nets.
* Change: In <DeepNet>, in _createRoutingPads() do not create rings
for clock or supply net (duplicated policy as in Cell::flattenNets()).
* Bug: In <ControllerWidget>, at last find the bad signal disconnect
that was causing ungraceful messages.
* Change: In <knik>, in Edge display occupancy/capacity in the string
name. Improved display progress and debugging capabilities.
Improved exception catch & breakpoint managment:
* Bug: In <PaletteWidget>, in updateExtensions() replace the calls to
deleteLayer() by delete. This cause the widget to be immediatly
erased instead of waiting for the event queue to be completly
processed. This was causing the widget to be left in a incoherent
state when stoping at a breakpoint.
* Bug: In <BreakpointWidget>, in execNoModal(), flush the main event
loop (QApplication::flush()) *before* lauching the *local* event
loop. This is to ensure all widgets are in their final state when
waiting (especially <PaletteWidget>).
* Change: In <ExceptionWidget>, new method catchAllWrapper() to
execute any std::function< void() > function/method with a "try"/
"catch" wraparound and lauch the widget in case something is catch.
* New: In <hurricane>, support for a oberver pattern, backported from
<katabatic> with an Obervable capable of being linked to any
number of Obervers.
* New: In <Cell>, made it observable to detect Cell change, currently
emit two kind of signals:
- Cell::CellAboutToChange : *before* any change.
- Cell::CellChanged : *after* the change has been completed.
* New: In <UpdateSession>, in Go::invalidate() add the Cell owning the
Go to the UPDATOR_STACK (of course the cell is added only once).
In addition, when the Cell is added, send a notification of
Cell::CellAboutToChange to all it's observers. The slave instances
are also invalidated.
Conversely in UpdateSession::_preDestroy() for each invalidated
Cell send a Cell::CellChanged notification to all observer.
The UPDATOR_STACK has been slightly amended to accept Cell which
are not Gos. Prior to this, the Cell where completly excluded from
the UpdateSession mechanism, so it's instances where never actualised
of anything referring to the Cell for that matter.
Note: we use two different mechanisms to transmit a Cell change,
observers and the slave instance map. I think at some point it
should be unificated.
* Change: In <CellViewer>, make it a Cell observer to redraw when the
cell is modificated (also update the palette).
Uses the catchAllWrapper() to protect all critical actions.
* Change: In <GraphicTool>, no longer need of cellPreModificated and
cellPostModificated signals. Now done through the Cell obersvers.
* Change: In <mauka>, <etesian> & <kite> now uses the catchAllWrapper
method for protection (need to split methods in two, to be able
to pass it as argument). No longer emit cellPreModificated and
cellPostModificated.
Support for RoutingGauge in P&R:
* Bug: In <placeandroute.py>, the connection from the internal power
ring to the connectors was not done correctly. Wrong contact layers
leading to a gap.
* Change: In <BuildPowerRails>, detection of the corona signals based
on how the "pck_px" pad is connected. No longer based on name
matching.
* Change: In <placeandroute.py>, support for 2 routing metal only
(3 metal in the technology).
* Change: In <katabatic> & <kite> support for a "top layer" limitation
on the routing gauge, this allows to use only two routing metals
(METAL2 & METAL3). Work in progress.
2014-04-20 12:25:08 -05:00
|
|
|
bool upLayer = (depth+1 <= Session::getConfiguration()->getAllowedDepth());
|
2013-12-03 18:58:58 -06:00
|
|
|
Layer* contactLayer = Session::getRoutingGauge()->getContactLayer( depth + ((upLayer)?0:-1) );
|
|
|
|
const Layer* doglegLayer = Session::getRoutingGauge()->getRoutingLayer( depth + ((upLayer)?1:-1) );
|
|
|
|
|
|
|
|
Session::dogleg( this );
|
|
|
|
targetDetach();
|
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
|
|
|
invalidate( KbTopology );
|
2013-12-03 18:58:58 -06:00
|
|
|
autoTarget->invalidate( KbTopology );
|
|
|
|
AutoContact* dlContact1 = AutoContactTurn::create( doglegGCell, _horizontal->getNet(), contactLayer );
|
|
|
|
AutoContact* dlContact2 = AutoContactTurn::create( doglegGCell, _horizontal->getNet(), contactLayer );
|
|
|
|
AutoSegment* segment1 = AutoSegment::create( dlContact1 , dlContact2, KbVertical );
|
|
|
|
segment1->setLayer( doglegLayer );
|
|
|
|
segment1->_setAxis( doglegAxis );
|
|
|
|
segment1->setFlags( SegDogleg|SegSlackened|SegCanonical|SegNotAligned );
|
|
|
|
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(149,0) << "New " << dlContact1 << endl;
|
|
|
|
cdebug_log(149,0) << "New " << dlContact2 << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
Session::dogleg( segment1 );
|
|
|
|
|
|
|
|
targetAttach( dlContact1 );
|
|
|
|
AutoSegment* segment2 = AutoSegment::create( dlContact2 , autoTarget, KbHorizontal );
|
|
|
|
autoTarget->cacheAttach( segment2 );
|
|
|
|
segment2->setLayer( getLayer() );
|
|
|
|
segment2->_setAxis( getY() );
|
|
|
|
segment2->setFlags( (isSlackened()?SegSlackened:0) );
|
|
|
|
Session::dogleg( segment2 );
|
|
|
|
|
2016-04-22 15:43:53 -05:00
|
|
|
if (autoSource->isTerminal()) {
|
ExtensionCap support and source/target terminal flags in Katabatic & Kite.
Placement management:
* Change: In <metis>, always disable the hMetis support regardless of
it being detected or not as the placer is still unable manage the
final bin contents.
Routing gauge management:
* Bug: In CRL Core, <vsclib/alliance.conf>, set the correct pitches and
size for the routing layers and the cell gauge.
* Change: In Katabatic & Kite, extract the correct extension cap for each
routing layer from the layers characteristics (cache then in
Katabatic::Configuration).
* Change: In Katabatic, <AutoSegment>, create segment with the wire width
defined in the gauge. For AutoSegment created on already existing
Segment from the global routing, adjust the width.
* Change: In Katabatic, <AutoSegment>, more accurate information about how
a segment is connected to terminal via source and/or target.
The flag SegStrongTerminal is splitted into SegSourceTerminal and
SegSourceTarget (but still used as a mask). So now we can know by
which end an AutoSegment is connected to a terminal.
* Change: In Katabatic, ::doRp_Access(), create constraint freeing segments
not only when HSmall but also when VSmall (more critical for <vsclib>).
Otherwise we may see AutoSegments with incompatible source/target
constraints.
* Change: In Kite, BuildPowerRails, do not create blockage on PinOnly
layers *but* still create power rails planes. This is a temporary
workaround for <vsclib> where the METAL1 blockages overlaps the
terminals (it was fine for Nero, but they shouldn't for Kite).
* Change: In Kite, <RoutingEvent>, if a TrackSegment is overconstrained,
directly bybass it's slackening state to DataNegociate::Slacken.
Also rename the flag "_canHandleConstraints" to "_overConstrained",
seems clearer to me.
Miscellaneous:
* Change: In CRL Core, <Utilities>, add a "pass-though" capability on the
mstream to temporarily make them print everything.
2014-05-25 08:00:35 -05:00
|
|
|
segment1->setFlags( SegWeakTerminal1 );
|
|
|
|
segment2->setFlags( SegWeakTerminal1 );
|
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
|
|
|
autoTarget->unsetFlags( CntWeakTerminal );
|
|
|
|
dlContact1->setFlags ( CntWeakTerminal );
|
|
|
|
if (autoTarget->getGCell() == doglegGCell)
|
|
|
|
dlContact1->migrateConstraintBox( autoTarget );
|
2016-04-22 15:43:53 -05:00
|
|
|
} else if (autoTarget->isTerminal()) {
|
ExtensionCap support and source/target terminal flags in Katabatic & Kite.
Placement management:
* Change: In <metis>, always disable the hMetis support regardless of
it being detected or not as the placer is still unable manage the
final bin contents.
Routing gauge management:
* Bug: In CRL Core, <vsclib/alliance.conf>, set the correct pitches and
size for the routing layers and the cell gauge.
* Change: In Katabatic & Kite, extract the correct extension cap for each
routing layer from the layers characteristics (cache then in
Katabatic::Configuration).
* Change: In Katabatic, <AutoSegment>, create segment with the wire width
defined in the gauge. For AutoSegment created on already existing
Segment from the global routing, adjust the width.
* Change: In Katabatic, <AutoSegment>, more accurate information about how
a segment is connected to terminal via source and/or target.
The flag SegStrongTerminal is splitted into SegSourceTerminal and
SegSourceTarget (but still used as a mask). So now we can know by
which end an AutoSegment is connected to a terminal.
* Change: In Katabatic, ::doRp_Access(), create constraint freeing segments
not only when HSmall but also when VSmall (more critical for <vsclib>).
Otherwise we may see AutoSegments with incompatible source/target
constraints.
* Change: In Kite, BuildPowerRails, do not create blockage on PinOnly
layers *but* still create power rails planes. This is a temporary
workaround for <vsclib> where the METAL1 blockages overlaps the
terminals (it was fine for Nero, but they shouldn't for Kite).
* Change: In Kite, <RoutingEvent>, if a TrackSegment is overconstrained,
directly bybass it's slackening state to DataNegociate::Slacken.
Also rename the flag "_canHandleConstraints" to "_overConstrained",
seems clearer to me.
Miscellaneous:
* Change: In CRL Core, <Utilities>, add a "pass-though" capability on the
mstream to temporarily make them print everything.
2014-05-25 08:00:35 -05:00
|
|
|
unsetFlags( SegTargetTerminal );
|
|
|
|
setFlags( SegWeakTerminal1 );
|
|
|
|
segment1->setFlags( SegWeakTerminal1 );
|
|
|
|
segment2->setFlags( SegTargetTerminal );
|
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
|
|
|
autoSource->unsetFlags( CntWeakTerminal );
|
|
|
|
dlContact2->setFlags ( CntWeakTerminal );
|
|
|
|
if (autoSource->getGCell() == doglegGCell)
|
|
|
|
dlContact2->migrateConstraintBox( autoSource );
|
2013-12-03 18:58:58 -06:00
|
|
|
} else if (isWeakTerminal()) {
|
|
|
|
segment1->setFlags( SegWeakTerminal1 );
|
|
|
|
segment2->setFlags( SegWeakTerminal1 );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_log(149,0) << "Session::dogleg[x+1] perpand: " << segment1 << endl;
|
|
|
|
cdebug_log(149,0) << "Session::dogleg[x+2] new paral: " << segment2 << endl;
|
|
|
|
cdebug_log(149,0) << "Session::dogleg[x+0] original: " << this << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
dlContact1->updateCache();
|
|
|
|
dlContact2->updateCache();
|
|
|
|
//autoTarget->updateCache();
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
segment2->canonize( flags );
|
|
|
|
if (not isCanonical()) canonize( flags );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2016-06-11 14:56:12 -05:00
|
|
|
cdebug_tabw(149,-1);
|
2013-12-03 18:58:58 -06:00
|
|
|
DebugSession::close();
|
|
|
|
|
|
|
|
return (upLayer) ? KbUseAboveLayer : KbUseBelowLayer;
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string AutoHorizontal::_getString () const
|
|
|
|
{
|
|
|
|
string s = AutoSegment::_getString();
|
|
|
|
return s;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Record* AutoHorizontal::_getRecord () const
|
|
|
|
{
|
|
|
|
Record* record = AutoSegment::_getRecord ();
|
|
|
|
record->add ( getSlot ( "_horizontal", _horizontal ) );
|
|
|
|
|
|
|
|
return record;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // End of Katabatic namespace.
|