2010-03-09 09:24:29 -06:00
|
|
|
// -*- C++ -*-
|
|
|
|
//
|
|
|
|
// This file is part of the Coriolis Software.
|
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
|
|
|
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
2010-03-09 09:24:29 -06:00
|
|
|
//
|
2013-12-03 18:58:58 -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 : "./AutoVertical.cpp" |
|
2013-12-03 18:58:58 -06:00
|
|
|
// +-----------------------------------------------------------------+
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
|
|
|
#include <algorithm>
|
|
|
|
#include "hurricane/Bug.h"
|
|
|
|
#include "hurricane/Vertical.h"
|
|
|
|
#include "crlcore/RoutingGauge.h"
|
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
|
|
|
#include "katabatic/Configuration.h"
|
2013-12-03 18:58:58 -06:00
|
|
|
#include "katabatic/AutoContactTurn.h"
|
2010-03-09 09:24:29 -06:00
|
|
|
#include "katabatic/AutoVertical.h"
|
|
|
|
#include "katabatic/AutoHorizontal.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace Katabatic {
|
|
|
|
|
|
|
|
|
|
|
|
using std::min;
|
|
|
|
using std::max;
|
|
|
|
using Hurricane::ltracein;
|
|
|
|
using Hurricane::ltraceout;
|
|
|
|
using Hurricane::Error;
|
|
|
|
using Hurricane::Bug;
|
|
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "Katabatic::AutoVertical".
|
|
|
|
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
Segment* AutoVertical::base () { return _vertical; }
|
|
|
|
Segment* AutoVertical::base () const { return _vertical; }
|
|
|
|
Vertical* AutoVertical::getVertical () { return _vertical; }
|
|
|
|
DbU::Unit AutoVertical::getSourceU () const { return _vertical->getSourceY(); }
|
|
|
|
DbU::Unit AutoVertical::getTargetU () const { return _vertical->getTargetY(); }
|
|
|
|
DbU::Unit AutoVertical::getDuSource () const { return _vertical->getDySource(); }
|
|
|
|
DbU::Unit AutoVertical::getDuTarget () const { return _vertical->getDyTarget(); }
|
|
|
|
Interval AutoVertical::getSpanU () const { return Interval(_vertical->getSourceY(),_vertical->getTargetY()); }
|
|
|
|
void AutoVertical::setDuSource ( DbU::Unit du ) { _vertical->setDySource(du); }
|
|
|
|
void AutoVertical::setDuTarget ( DbU::Unit du ) { _vertical->setDyTarget(du); }
|
|
|
|
string AutoVertical::_getTypeName () const { return "AutoVertical"; }
|
|
|
|
|
|
|
|
|
|
|
|
AutoVertical::AutoVertical ( Vertical* vertical )
|
|
|
|
: AutoSegment(vertical)
|
2010-03-09 09:24:29 -06:00
|
|
|
, _vertical(vertical)
|
2013-12-03 18:58:58 -06:00
|
|
|
{
|
|
|
|
ltrace(99) << "CTOR AutoVertical " << this << endl;
|
|
|
|
ltrace(99) << " over " << vertical << endl;
|
|
|
|
}
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
|
|
|
void AutoVertical::_postCreate ()
|
|
|
|
{
|
|
|
|
AutoSegment::_postCreate ();
|
|
|
|
|
|
|
|
AutoContact* source = getAutoSource();
|
2013-12-03 18:58:58 -06:00
|
|
|
if (source->isTerminal()) source->setX( _vertical->getX() );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
AutoContact* target = getAutoTarget();
|
2013-12-03 18:58:58 -06:00
|
|
|
if (target->isTerminal()) target->setX( _vertical->getX() );
|
|
|
|
|
|
|
|
if ( source->getGCell() != target->getGCell() ) {
|
|
|
|
setFlags( SegGlobal );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
GCell* gcell;
|
|
|
|
GCell* end;
|
|
|
|
|
|
|
|
if ( source->getGCell()->getY() < target->getGCell()->getY() ) {
|
|
|
|
gcell = source->getGCell()->getUp();
|
|
|
|
end = target->getGCell();
|
|
|
|
} else {
|
|
|
|
gcell = target->getGCell()->getUp();
|
|
|
|
end = source->getGCell();
|
|
|
|
}
|
|
|
|
for ( ; gcell != end ; gcell = gcell->getUp() ) {
|
|
|
|
if ( !gcell ) {
|
|
|
|
cerr << Error("AutoSegment::create() : NULL GCell.") << endl;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
gcell->addVSegment ( this );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void AutoVertical::_preDestroy ()
|
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
ltrace(200) << "AutoVertical::_preDestroy() - <id:" << getId() << "> " << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
ltrace(200) << " " << _getString() << endl;
|
|
|
|
ltracein(90);
|
|
|
|
|
|
|
|
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()->getY() < target->getGCell()->getY() ) {
|
|
|
|
gcell = source->getGCell()->getUp();
|
|
|
|
end = target->getGCell();
|
|
|
|
} else {
|
|
|
|
gcell = target->getGCell()->getUp();
|
|
|
|
end = source->getGCell();
|
|
|
|
}
|
|
|
|
for ( ; gcell != end ; gcell = gcell->getUp() ) {
|
|
|
|
if ( !gcell ) {
|
|
|
|
cerr << Error("AutoSegment::_preDestroy() : NULL GCell.") << endl;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
gcell->removeVSegment ( this );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
AutoSegment::_preDestroy ();
|
|
|
|
ltraceout(90);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
AutoVertical::~AutoVertical ()
|
|
|
|
{
|
|
|
|
if ( Session::doDestroyBaseSegment() and not Session::doDestroyTool() ) {
|
2013-12-03 18:58:58 -06:00
|
|
|
ltrace(200) << "~AutoVertical() - " << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
_vertical->destroy ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
Interval AutoVertical::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.getXMin(), nativeBox.getXMax() );
|
|
|
|
}
|
|
|
|
return Interval ( getAutoSource()->getCBXMin(), getAutoSource()->getCBXMax() );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
Interval AutoVertical::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.getXMin(), nativeBox.getXMax() );
|
|
|
|
}
|
|
|
|
return Interval ( getAutoTarget()->getCBXMin(), getAutoTarget()->getCBXMax() );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool AutoVertical::getConstraints ( DbU::Unit& constraintMin, DbU::Unit& constraintMax ) const
|
|
|
|
{
|
|
|
|
AutoContact* contact = getAutoSource();
|
|
|
|
constraintMin = contact->getCBXMin();
|
|
|
|
constraintMax = contact->getCBXMax();
|
|
|
|
|
2010-05-11 06:04:23 -05:00
|
|
|
ltrace(148) << "Source constraints: " << contact << " ["
|
|
|
|
<< DbU::getValueString(constraintMin) << ":"
|
|
|
|
<< DbU::getValueString(constraintMax) << "]"
|
|
|
|
<< endl;
|
|
|
|
|
2010-03-09 09:24:29 -06:00
|
|
|
contact = getAutoTarget();
|
|
|
|
constraintMin = max ( constraintMin, contact->getCBXMin() );
|
|
|
|
constraintMax = min ( constraintMax, contact->getCBXMax() );
|
|
|
|
|
2010-05-11 06:04:23 -05:00
|
|
|
ltrace(148) << "Merge with target constraints: " << contact << " ["
|
|
|
|
<< DbU::getValueString(constraintMin) << ":"
|
|
|
|
<< DbU::getValueString(constraintMax) << "]"
|
|
|
|
<< endl;
|
|
|
|
|
2010-03-09 09:24:29 -06:00
|
|
|
constraintMin = max ( constraintMin, getUserConstraints().getVMin() );
|
|
|
|
constraintMax = min ( constraintMax, getUserConstraints().getVMax() );
|
2010-05-11 06:04:23 -05:00
|
|
|
|
|
|
|
ltrace(148) << "Merge with user constraints: " << getUserConstraints() << " ["
|
|
|
|
<< DbU::getValueString(constraintMin) << ":"
|
|
|
|
<< DbU::getValueString(constraintMax) << "]"
|
|
|
|
<< endl;
|
|
|
|
|
2010-03-09 09:24:29 -06:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
unsigned int AutoVertical::getDirection () const
|
2013-12-03 18:58:58 -06:00
|
|
|
{ return KbVertical; }
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
|
|
|
size_t AutoVertical::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->getUp ();
|
|
|
|
if ( !gcell ) break;
|
|
|
|
|
|
|
|
gcells.push_back ( gcell );
|
|
|
|
}
|
|
|
|
|
|
|
|
return gcells.size();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool AutoVertical::_canSlacken () const
|
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
ltraceout(200);
|
|
|
|
|
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( KbHorizontal );
|
|
|
|
Interval targetSide = getAutoTarget()->getGCell()->getSide( KbHorizontal );
|
2010-03-09 09:24:29 -06:00
|
|
|
Interval sourceConstraints = Interval(getAutoSource()->getCBXMin(),getAutoSource()->getCBXMax());
|
|
|
|
Interval targetConstraints = Interval(getAutoTarget()->getCBXMin(),getAutoTarget()->getCBXMax());
|
|
|
|
|
|
|
|
// Ugly: should uses topRightShrink from GCell.
|
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
|
|
|
//sourceConstraints.inflate( 0, /*Katabatic::GCell::getTopRightShrink()*/ DbU::lambda(1.0) );
|
|
|
|
//targetConstraints.inflate( 0, /*Katabatic::GCell::getTopRightShrink()*/ DbU::lambda(1.0) );
|
|
|
|
// 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
|
|
|
|
|
|
|
// Ugly: GCell's track number is hardwired.
|
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 (sourceConstraints.getSize() / DbU::lambda(5.0) < 10) { ltraceout(200); return true; }
|
|
|
|
//if (targetConstraints.getSize() / DbU::lambda(5.0) < 10) { ltraceout(200); return true; }
|
|
|
|
if (not sourceConstraints.contains(sourceSide)) { ltraceout(200); return true; }
|
|
|
|
if (not targetConstraints.contains(targetSide)) { ltraceout(200); return true; }
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
ltraceout(200);
|
2010-03-09 09:24:29 -06:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
bool AutoVertical::_slacken ( unsigned int flags )
|
2010-03-09 09:24:29 -06:00
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
ltrace(200) << "AutoVertical::_slacken() " << this << endl;
|
|
|
|
ltracein(200);
|
|
|
|
|
|
|
|
if ( not isStrongTerminal()
|
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
|
|
|
or (not (_flags & (SegGlobal|SegWeakGlobal)) and (getLength() < getPitch()*5)) )
|
2013-12-03 18:58:58 -06:00
|
|
|
{ ltraceout(200); return false; }
|
|
|
|
|
|
|
|
ltrace(200) << "_flags:" << (_flags & (SegGlobal|SegWeakGlobal)) << endl;
|
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
|
|
|
ltrace(200) << "test:" << (getLength() < getPitch()*5) << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
ltrace(200) << "length:" << DbU::getValueString(getLength()) << endl;
|
|
|
|
|
|
|
|
bool success = false;
|
|
|
|
bool slackened = false;
|
|
|
|
bool halfSlackened = false;
|
|
|
|
int lowSlack = (flags & KbHalfSlacken) ? 3 : 10;
|
|
|
|
AutoContact* source = getAutoSource();
|
|
|
|
AutoSegment* parallel = this;
|
|
|
|
|
|
|
|
if (source->isTerminal()) {
|
|
|
|
Interval constraints = source->getUConstraints (KbHorizontal).inflate( 0, /*Katabatic::GCell::getTopRightShrink()*/ DbU::lambda(1.0) );
|
|
|
|
Interval nativeConstraints = source->getNativeUConstraints(KbHorizontal).inflate( 0, /*Katabatic::GCell::getTopRightShrink()*/ DbU::lambda(1.0) );
|
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.
|
|
|
|
if ((slack < lowSlack) or (nativeSlack - slack < 3)) {
|
|
|
|
_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) {
|
|
|
|
ltrace(200) << "AutoSegment::_slaken(): Source @" << DbU::getValueString(getSourcePosition()) << endl;
|
|
|
|
doglegs[doglegs.size()-2]->_setAxis( getSourcePosition() );
|
|
|
|
success = true;
|
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
|
|
|
AutoContact* target = NULL;
|
|
|
|
if (parallel) {
|
|
|
|
target = parallel->getAutoTarget();
|
|
|
|
} else {
|
|
|
|
target = getAutoTarget();
|
|
|
|
}
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (target->isTerminal()) {
|
|
|
|
Interval constraints = target->getUConstraints (KbHorizontal).inflate( 0, /*Katabatic::GCell::getTopRightShrink()*/ DbU::lambda(1.0) );
|
|
|
|
Interval nativeConstraints = target->getNativeUConstraints(KbHorizontal).inflate( 0, /*Katabatic::GCell::getTopRightShrink()*/ DbU::lambda(1.0) );
|
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.
|
|
|
|
if ((slack < lowSlack) or (nativeSlack - slack < 3)) {
|
|
|
|
_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
|
|
|
const vector<AutoSegment*>& doglegs = Session::getDoglegs();
|
|
|
|
if (doglegs.size() >= 2) {
|
|
|
|
ltrace(200) << "AutoSegment::_slaken(): Source @" << DbU::getValueString(getTargetPosition()) << endl;
|
|
|
|
doglegs[doglegs.size()-2]->_setAxis( getTargetPosition() );
|
|
|
|
success = 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 );
|
|
|
|
}
|
|
|
|
ltraceout(200);
|
2010-03-09 09:24:29 -06:00
|
|
|
|
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 AutoVertical::_setAxis ( DbU::Unit axis )
|
2010-03-09 09:24:29 -06:00
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
setFlags( SegAxisSet );
|
|
|
|
|
|
|
|
if (_vertical->getX() == axis) return;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
ltrace(159) << "_setAxis() @X " << DbU::getLambda(axis) << " " << this << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
_vertical->setX( 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->setX( 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->setX( axis );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
void AutoVertical::updateOrient ()
|
2010-03-09 09:24:29 -06:00
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
if (_vertical->getTargetY() < _vertical->getSourceY()) {
|
|
|
|
ltrace(80) << "updateOrient() " << this << " (before S/T swap)" << endl;
|
|
|
|
_vertical->invert();
|
|
|
|
}
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
void AutoVertical::updatePositions ()
|
2010-03-09 09:24:29 -06:00
|
|
|
{
|
|
|
|
_sourcePosition = _vertical->getSourceY() - Session::getExtensionCap();
|
|
|
|
_targetPosition = _vertical->getTargetY() + Session::getExtensionCap();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool AutoVertical::checkPositions () const
|
|
|
|
{
|
|
|
|
bool coherency = true;
|
|
|
|
DbU::Unit sourcePosition = _vertical->getSourceY() - Session::getExtensionCap();
|
|
|
|
DbU::Unit targetPosition = _vertical->getTargetY() + Session::getExtensionCap();
|
|
|
|
|
|
|
|
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 AutoVertical::checkConstraints () const
|
|
|
|
{
|
|
|
|
Interval sourceConstraints = Interval(getAutoSource()->getCBXMin(),getAutoSource()->getCBXMax());
|
|
|
|
Interval targetConstraints = Interval(getAutoTarget()->getCBXMin(),getAutoTarget()->getCBXMax());
|
|
|
|
|
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 AutoVertical::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
|
|
|
if (not isGlobal()) return false;
|
|
|
|
if (not getAutoSource()->isTurn() or not getAutoTarget()->isTurn()) return false;
|
|
|
|
if (not getAutoSource()->getGCell()->getLeft()) return false;
|
* ./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
|
|
|
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;
|
|
|
|
|
|
|
|
for ( GCell* gcell=begin ; gcell and gcell!=end ; gcell=gcell->getUp() ) {
|
|
|
|
if (currMaxDensity < gcell->getWDensity(depth)) currMaxDensity = gcell->getWDensity( depth );
|
|
|
|
}
|
|
|
|
|
|
|
|
begin = begin->getLeft();
|
|
|
|
end = end ->getLeft();
|
|
|
|
|
|
|
|
for ( GCell* gcell=begin ; gcell and gcell!=end ; gcell=gcell->getUp() ) {
|
|
|
|
if (leftMaxDensity < gcell->getWDensity(depth)) leftMaxDensity = gcell->getWDensity( depth );
|
|
|
|
}
|
|
|
|
|
|
|
|
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 AutoVertical::canMoveURight ( float reserve ) const
|
2010-03-09 09:24:29 -06:00
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
if (not isGlobal()) return false;
|
|
|
|
if (not getAutoSource()->isTurn() or not getAutoTarget()->isTurn()) return false;
|
|
|
|
if (not getAutoSource()->getGCell()->getRight()) 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]->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;
|
|
|
|
|
|
|
|
for ( GCell* gcell=begin ; gcell and gcell!=end ; gcell=gcell->getUp() ) {
|
|
|
|
if (currMaxDensity < gcell->getWDensity(depth)) currMaxDensity = gcell->getWDensity( depth );
|
|
|
|
}
|
|
|
|
|
|
|
|
begin = begin->getRight();
|
|
|
|
end = end ->getRight();
|
|
|
|
|
|
|
|
for ( GCell* gcell=begin ; gcell and gcell!=end ; gcell=gcell->getUp() ) {
|
|
|
|
if (leftMaxDensity < gcell->getWDensity(depth)) leftMaxDensity = gcell->getWDensity( depth );
|
|
|
|
}
|
|
|
|
|
|
|
|
return (leftMaxDensity + reserve < currMaxDensity);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool AutoVertical::moveULeft ()
|
|
|
|
{
|
|
|
|
if (not getAutoSource()->isTurn() or not getAutoTarget()->isTurn()) return false;
|
|
|
|
if (not getAutoSource()->getGCell()->getLeft()) 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(0);
|
|
|
|
|
|
|
|
if (perpandicular->isLocal()) {
|
|
|
|
perpandicular->setFlags( Katabatic::SegGlobal );
|
|
|
|
} else {
|
|
|
|
if (perpandicular->getAutoSource() == autoSource) {
|
|
|
|
begin->addHSegment( perpandicular );
|
2010-03-09 09:24:29 -06:00
|
|
|
} else {
|
2013-12-03 18:58:58 -06:00
|
|
|
if (begin->getLeft() == 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->getLeft()->removeHSegment( perpandicular );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
perpandicular = autoTarget->getSegment(0);
|
|
|
|
if (perpandicular->isLocal()) {
|
|
|
|
perpandicular->setFlags( Katabatic::SegGlobal );
|
|
|
|
} else {
|
|
|
|
if (perpandicular->getAutoSource() == autoTarget) {
|
|
|
|
end->addHSegment( perpandicular );
|
2010-03-09 09:24:29 -06:00
|
|
|
} else {
|
2013-12-03 18:58:58 -06:00
|
|
|
if (end->getLeft() == 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->getLeft()->removeHSegment( perpandicular );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (begin != end) {
|
|
|
|
for ( GCell* gcell=begin->getUp() ; gcell and gcell!=end ; gcell=gcell->getUp() )
|
|
|
|
gcell->removeVSegment( this );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
begin = begin->getLeft();
|
|
|
|
end = end ->getLeft();
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
autoSource->setGCell( begin );
|
|
|
|
autoTarget->setGCell( end );
|
|
|
|
if (begin != end) {
|
|
|
|
for ( GCell* gcell=begin->getUp() ; gcell and gcell!=end ; gcell=gcell->getUp() )
|
|
|
|
gcell->addVSegment( this );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
DbU::Unit x = begin->getSide( KbHorizontal ).getVMax();
|
|
|
|
setAxis( x );
|
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 AutoVertical::moveURight ()
|
2010-03-09 09:24:29 -06:00
|
|
|
{
|
|
|
|
ltrace(200) << "AutoVertical::moveURight()" << endl;
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (not getAutoSource()->isTurn() or not getAutoTarget()->isTurn()) return true;
|
|
|
|
if (not getAutoSource()->getGCell()->getRight()) return true;
|
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(0);
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (perpandicular->isLocal()) {
|
|
|
|
perpandicular->setFlags( Katabatic::SegGlobal );
|
|
|
|
} else {
|
|
|
|
if (perpandicular->getAutoTarget() == autoSource) {
|
|
|
|
begin->addHSegment( perpandicular );
|
2010-03-09 09:24:29 -06:00
|
|
|
} else {
|
2013-12-03 18:58:58 -06:00
|
|
|
if (begin->getRight() == 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->getRight()->removeHSegment( perpandicular );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
perpandicular = autoTarget->getSegment(0);
|
|
|
|
if (perpandicular->isLocal()) {
|
|
|
|
perpandicular->setFlags( Katabatic::SegGlobal );
|
|
|
|
} else {
|
|
|
|
if (perpandicular->getAutoTarget() == autoTarget) {
|
|
|
|
end->addHSegment( perpandicular );
|
2010-03-09 09:24:29 -06:00
|
|
|
} else {
|
2013-12-03 18:58:58 -06:00
|
|
|
if (end->getRight() == 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->getRight()->removeHSegment( perpandicular );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (begin != end) {
|
|
|
|
for ( GCell* gcell=begin->getUp() ; gcell and gcell!=end ; gcell=gcell->getUp() )
|
|
|
|
gcell->removeVSegment( this );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
begin = begin->getRight();
|
|
|
|
end = end ->getRight();
|
2013-12-03 18:58:58 -06:00
|
|
|
autoSource->setGCell( begin );
|
|
|
|
autoTarget->setGCell( end );
|
|
|
|
if (begin != end) {
|
|
|
|
for ( GCell* gcell=begin->getUp() ; gcell and gcell!=end ; gcell=gcell->getUp() )
|
|
|
|
gcell->addVSegment( this );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
DbU::Unit x = begin->getSide( KbHorizontal ).getVMin();
|
|
|
|
setAxis( x );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
ltrace(200) << "Moved to axis: " << DbU::getValueString(x) << endl;
|
|
|
|
|
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 AutoVertical::_makeDogleg ( GCell* doglegGCell, unsigned int flags )
|
2010-03-09 09:24:29 -06:00
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
ltrace(200) << "AutoVertical::_makeDogleg(GCell*)" << endl;
|
|
|
|
|
|
|
|
AutoContact* autoSource = getAutoSource();
|
|
|
|
AutoContact* autoTarget = getAutoTarget();
|
|
|
|
GCell* begin = autoSource->getGCell();
|
|
|
|
GCell* end = autoTarget->getGCell();
|
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
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
DbU::Unit doglegAxis = (doglegGCell->getYMax() + doglegGCell->getY()) / 2;
|
|
|
|
if (isLocal())
|
|
|
|
doglegAxis = (getSourceY() + getTargetY()) / 2;
|
|
|
|
|
|
|
|
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->removeVSegment( this );
|
|
|
|
gcell = gcell->getUp();
|
|
|
|
} while ( gcell and (gcell != end) );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
size_t depth = Session::getRoutingGauge()->getLayerDepth ( _vertical->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());
|
2010-03-09 09:24:29 -06:00
|
|
|
Layer* contactLayer = Session::getRoutingGauge()->getContactLayer ( depth + ((upLayer)?0:-1) );
|
2013-12-03 18:58:58 -06:00
|
|
|
const Layer* doglegLayer = Session::getRoutingGauge()->getRoutingLayer ( depth + ((upLayer)?1:-1) );
|
|
|
|
|
|
|
|
Session::dogleg( this );
|
|
|
|
targetDetach();
|
|
|
|
invalidate();
|
|
|
|
autoTarget->invalidate( KbTopology );
|
|
|
|
AutoContact* dlContact1 = AutoContactTurn::create( doglegGCell, _vertical->getNet(), contactLayer );
|
|
|
|
ltrace(200) << dlContact1 << endl;
|
|
|
|
AutoContact* dlContact2 = AutoContactTurn::create( doglegGCell, _vertical->getNet(), contactLayer );
|
|
|
|
ltrace(200) << dlContact2 << endl;
|
|
|
|
AutoSegment* segment1 = AutoSegment::create( dlContact1 , dlContact2, KbHorizontal );
|
|
|
|
ltrace(200) << segment1 << endl;
|
|
|
|
segment1->setLayer( doglegLayer );
|
|
|
|
segment1->_setAxis( doglegAxis );
|
|
|
|
segment1->setFlags( SegDogleg|SegSlackened|SegCanonical|SegNotAligned );
|
|
|
|
ltrace(200) << "New " << dlContact1->base() << "." << endl;
|
|
|
|
ltrace(200) << "New " << dlContact2->base() << "." << endl;
|
|
|
|
Session::dogleg( segment1 );
|
|
|
|
|
|
|
|
targetAttach( dlContact1 );
|
|
|
|
AutoSegment* segment2 = AutoVertical::create ( dlContact2, autoTarget, KbVertical );
|
|
|
|
autoTarget->cacheAttach( segment2 );
|
|
|
|
segment2->setLayer( getLayer() );
|
|
|
|
segment2->_setAxis( getX() );
|
|
|
|
segment2->setFlags( (isSlackened()?SegSlackened:0) );
|
|
|
|
Session::dogleg( segment2 );
|
|
|
|
|
|
|
|
if (isStrongTerminal()) {
|
|
|
|
if (autoSource->getAnchor()) {
|
|
|
|
segment1->setFlags( SegWeakTerminal1 );
|
|
|
|
segment2->setFlags( SegWeakTerminal1 );
|
|
|
|
} else {
|
|
|
|
unsetFlags( SegStrongTerminal );
|
|
|
|
setFlags( SegWeakTerminal1 );
|
|
|
|
segment1->setFlags( SegWeakTerminal1 );
|
|
|
|
segment2->setFlags( SegStrongTerminal );
|
|
|
|
}
|
|
|
|
} else if (isWeakTerminal()) {
|
|
|
|
segment1->setFlags( SegWeakTerminal1 );
|
|
|
|
segment2->setFlags( SegWeakTerminal1 );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
ltrace(200) << "Session::dogleg[x+1] perpand: " << segment1 << endl;
|
|
|
|
ltrace(200) << "Session::dogleg[x+2] new paral: " << segment2 << endl;
|
|
|
|
ltrace(200) << "Session::dogleg[x+0] original: " << this << endl;
|
|
|
|
|
|
|
|
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
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
return (upLayer) ? KbUseAboveLayer : KbUseBelowLayer;
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string AutoVertical::_getString () const
|
|
|
|
{
|
|
|
|
string s = AutoSegment::_getString();
|
|
|
|
return s;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Record* AutoVertical::_getRecord () const
|
|
|
|
{
|
|
|
|
Record* record = AutoSegment::_getRecord ();
|
|
|
|
record->add ( getSlot ( "_vertical", _vertical ) );
|
|
|
|
return record;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // End of Katabatic namespace.
|