2016-05-23 09:15:25 -05:00
|
|
|
// -*- C++ -*-
|
|
|
|
//
|
|
|
|
// This file is part of the Coriolis Software.
|
2018-01-06 10:55:44 -06:00
|
|
|
// Copyright (c) UPMC 2016-2018, All Rights Reserved
|
2016-05-23 09:15:25 -05:00
|
|
|
//
|
|
|
|
// +-----------------------------------------------------------------+
|
|
|
|
// | C O R I O L I S |
|
|
|
|
// | A n a b a t i c - Global Routing Toolbox |
|
|
|
|
// | |
|
|
|
|
// | Author : Jean-Paul CHAPUT |
|
|
|
|
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
|
|
|
// | =============================================================== |
|
|
|
|
// | C++ Module : "./AnabaticEngine.cpp" |
|
|
|
|
// +-----------------------------------------------------------------+
|
|
|
|
|
|
|
|
|
|
|
|
#include <sstream>
|
|
|
|
#include <iostream>
|
2016-07-31 11:43:44 -05:00
|
|
|
#include "hurricane/Bug.h"
|
2016-05-23 09:15:25 -05:00
|
|
|
#include "hurricane/Error.h"
|
Basic support for FreePDK 45 completed.
* New: In Commons, inspector support for std::pair<T,U>.
* New: In Hurricane::Layer, ContactLayer & ViaLayer, support for non
square VIAs. The hole (cut) remains square, but the various metal
extensions can now be different in X and Y. The ::getEnclosure()
method now takes a flag EnclosureH / EnclosureV.
* New: In Hurricane::DbU, inspector support for:
std::pair<DbU::Unit,DbU::Unit>
std::array<DbU::Unit,3>
Must be defined here as DbU do not exists yet in Commons.h
* Bug: In Hurricane::Interval::getSize(), when the interval is "full span",
do not return the difference between min and max, but directly DbU::Max.
(the previous result was -1 !)
* New: In CRL Core Python/Technology.py, support for non square VIAs in
the configuration files. Applied to FreePDK 45.
* New: In CRL::RoutingGauge, added a "symbolic" flag to tell if a gauge
is for symbolic layout or not. Exported to Python.
* New: In Anabatic::AutoHorizontal::updatePosition(), differentiated
computation for soure or target taking account of the VIA extension
in the right segment metal (due to non-square VIAs).
* Change: In Anabatic::AutoHorizontal::_makeDogleg(), the dogleg is
UP for HV gauges and DOWN for VH.
* New: In Anabatic::AutoSegment::_initialize(), create a cache of the
various extension length for each layer (viaToTop, viaToBottom,
viaToSame).
New implementation of getExtensionCap() using the previous cached
extension table. See updatePositions().
New static functions to access the extension cache in the header:
getViaTotopCap() ...
* Change: In Anabatic::AutoSegment, in various update methods, updateOrient()
must always be called *before* updatePositions() as extensions are
dependant on source/target.
* New: In Anabatic::AutoSegment::getEndAxes() compute the position of the
first source and last target position (center/axes) on an *aligned*
set of segments.
* New: In Anabatic::AutoSegment, add a new state flag SegAxisFixed to
signal segments that can be put on only one track. Specific case
to VH gauge for a M1 vertical terminal with a M2 vertical segment.
The M2 is effectively bound to the M1 axis position.
* Bug: In Anabatic::NetBuilderVH::_do_xG_xM1_xM3(), in case of E/W global
and only one RoutingPad the connexion to the RoutingPad was duplicated.
It was valid, but totally stupid.
* Bug: In Anabatic::Session::_canonize(), for an aligned segment set,
intersect the user constraints from all segments instead of only
considering the canonical one.
Issue a warning about too tight constraints only for symbolic
gauges. It may be correct for the real ones.
* New: In Katata::DataNegociate::update(), more accurate computation
of the perpandicular free interval. Use segment extension cap
calculation. Create a special case for fixed axis segments allowing
them to find alternative free interval, try under source and under
target as they are likely to be draggable segments.
* Change: In Katana::Manipulator::relax(), use the extension cap value
to compute the axis of the perpandicular segemnts.
* Change: In Katana::Manipulator::moveUp(), now move up the whole set
of aligned segments instead of just the canonical one.
* Change: In Katana::NegociateWindow::loadRoutingPads(), more accurate
TrackMarkers insertions for fixed terminals.
* New: In Katana::RoutingEvent::Key::Compare::operator(), segments with
fixed axis are processed prior to any others.
* New: In Katana::RoutingEventLoop, store segment pointers instead of
ids to generate more accurate error messages.
* Change: In Katana::RoutingPlane::create(), perform local track
assignment only for HV gauges.
* Change: In Katana::SegmentFsm::_slackenLocal(), add a "dragMinimize"
step in the automaton. Mutliple states transitions can occurs in
a row if an action fails.
* New: In Katana::Session::_toIntervalAxis(), normalize interval
bounds so they are on track positions (by shrinking the interval).
* Bug: In Katana::TrackMarker CTOR, the weigh computation was wrong.
2018-02-17 13:27:38 -06:00
|
|
|
#include "hurricane/Warning.h"
|
2016-08-10 16:48:06 -05:00
|
|
|
#include "hurricane/Breakpoint.h"
|
2016-05-26 06:56:16 -05:00
|
|
|
#include "hurricane/RegularLayer.h"
|
Anabatic transient commit 10. Ripup & reroute support in Dijsktra.
* New: In Anabatic:
- In AnabaticEngine, keep track of overflowed edges.
- In AnabaticEngine, getNetsFromedge() to lookup all nets going
through an Edge.
- In Configuration, read the Kite "reserved local" parameter to
decrease the Edge capacity (it's a guessing of the cost of the
local routing).
- In Edge, add an attribute to know if there is an associated
segment of the current net (set by Dijkstra::_traceback()).
Transparently manage the overflowed edges.
- In GCell_Edges, correct a filtering bug when not all sides are
selecteds.
- New GCell::getEdgeTo() to find the edge between two adjacent
GCells.
- New GCell::unrefContact() to automatically removes global contacts
no longer used by any global segments (used during the ripup
step).
- In Dijkstra::load(), now able to "reload" and already partially
or completly routed net (look for Contact of "gcontact" layer
and their attached segments).
- In Dijkstra, keep the last net loaded until the next one is.
Put the cleanup operations in an isolated function "_cleanup()".
- In Dijkstra::_selectFirstsource() and run(), load first source
component made of multiple vertexes.
- In Dijkstra::_trackback(), link the Net segments to the Edges.
- New Dijkstra::ripup(), Dijkstra::_propagateRipup() to perform
the ripup of one edge of a Net (must be loaded in Dijkstra first).
Dijkstra::_tagConnecteds() setup the connexId of a set of Vertexes
- that are connecteds through edges *with* segments.
- In GraphicAnabaticengine & GlobalRoute.cpp, embryo of a global
routing tool with ripup & reroute.
2016-06-26 07:32:32 -05:00
|
|
|
#include "hurricane/Horizontal.h"
|
2016-07-30 05:15:49 -05:00
|
|
|
#include "hurricane/RoutingPad.h"
|
Anabatic transient commit 10. Ripup & reroute support in Dijsktra.
* New: In Anabatic:
- In AnabaticEngine, keep track of overflowed edges.
- In AnabaticEngine, getNetsFromedge() to lookup all nets going
through an Edge.
- In Configuration, read the Kite "reserved local" parameter to
decrease the Edge capacity (it's a guessing of the cost of the
local routing).
- In Edge, add an attribute to know if there is an associated
segment of the current net (set by Dijkstra::_traceback()).
Transparently manage the overflowed edges.
- In GCell_Edges, correct a filtering bug when not all sides are
selecteds.
- New GCell::getEdgeTo() to find the edge between two adjacent
GCells.
- New GCell::unrefContact() to automatically removes global contacts
no longer used by any global segments (used during the ripup
step).
- In Dijkstra::load(), now able to "reload" and already partially
or completly routed net (look for Contact of "gcontact" layer
and their attached segments).
- In Dijkstra, keep the last net loaded until the next one is.
Put the cleanup operations in an isolated function "_cleanup()".
- In Dijkstra::_selectFirstsource() and run(), load first source
component made of multiple vertexes.
- In Dijkstra::_trackback(), link the Net segments to the Edges.
- New Dijkstra::ripup(), Dijkstra::_propagateRipup() to perform
the ripup of one edge of a Net (must be loaded in Dijkstra first).
Dijkstra::_tagConnecteds() setup the connexId of a set of Vertexes
- that are connecteds through edges *with* segments.
- In GraphicAnabaticengine & GlobalRoute.cpp, embryo of a global
routing tool with ripup & reroute.
2016-06-26 07:32:32 -05:00
|
|
|
#include "hurricane/Vertical.h"
|
2016-05-23 09:15:25 -05:00
|
|
|
#include "hurricane/Cell.h"
|
2016-07-18 07:48:37 -05:00
|
|
|
#include "hurricane/DebugSession.h"
|
2016-05-23 09:15:25 -05:00
|
|
|
#include "hurricane/UpdateSession.h"
|
2016-05-26 06:56:16 -05:00
|
|
|
#include "crlcore/RoutingGauge.h"
|
2017-12-16 17:13:19 -06:00
|
|
|
#include "crlcore/Measures.h"
|
2016-05-23 09:15:25 -05:00
|
|
|
#include "anabatic/GCell.h"
|
Basic support for FreePDK 45 completed.
* New: In Commons, inspector support for std::pair<T,U>.
* New: In Hurricane::Layer, ContactLayer & ViaLayer, support for non
square VIAs. The hole (cut) remains square, but the various metal
extensions can now be different in X and Y. The ::getEnclosure()
method now takes a flag EnclosureH / EnclosureV.
* New: In Hurricane::DbU, inspector support for:
std::pair<DbU::Unit,DbU::Unit>
std::array<DbU::Unit,3>
Must be defined here as DbU do not exists yet in Commons.h
* Bug: In Hurricane::Interval::getSize(), when the interval is "full span",
do not return the difference between min and max, but directly DbU::Max.
(the previous result was -1 !)
* New: In CRL Core Python/Technology.py, support for non square VIAs in
the configuration files. Applied to FreePDK 45.
* New: In CRL::RoutingGauge, added a "symbolic" flag to tell if a gauge
is for symbolic layout or not. Exported to Python.
* New: In Anabatic::AutoHorizontal::updatePosition(), differentiated
computation for soure or target taking account of the VIA extension
in the right segment metal (due to non-square VIAs).
* Change: In Anabatic::AutoHorizontal::_makeDogleg(), the dogleg is
UP for HV gauges and DOWN for VH.
* New: In Anabatic::AutoSegment::_initialize(), create a cache of the
various extension length for each layer (viaToTop, viaToBottom,
viaToSame).
New implementation of getExtensionCap() using the previous cached
extension table. See updatePositions().
New static functions to access the extension cache in the header:
getViaTotopCap() ...
* Change: In Anabatic::AutoSegment, in various update methods, updateOrient()
must always be called *before* updatePositions() as extensions are
dependant on source/target.
* New: In Anabatic::AutoSegment::getEndAxes() compute the position of the
first source and last target position (center/axes) on an *aligned*
set of segments.
* New: In Anabatic::AutoSegment, add a new state flag SegAxisFixed to
signal segments that can be put on only one track. Specific case
to VH gauge for a M1 vertical terminal with a M2 vertical segment.
The M2 is effectively bound to the M1 axis position.
* Bug: In Anabatic::NetBuilderVH::_do_xG_xM1_xM3(), in case of E/W global
and only one RoutingPad the connexion to the RoutingPad was duplicated.
It was valid, but totally stupid.
* Bug: In Anabatic::Session::_canonize(), for an aligned segment set,
intersect the user constraints from all segments instead of only
considering the canonical one.
Issue a warning about too tight constraints only for symbolic
gauges. It may be correct for the real ones.
* New: In Katata::DataNegociate::update(), more accurate computation
of the perpandicular free interval. Use segment extension cap
calculation. Create a special case for fixed axis segments allowing
them to find alternative free interval, try under source and under
target as they are likely to be draggable segments.
* Change: In Katana::Manipulator::relax(), use the extension cap value
to compute the axis of the perpandicular segemnts.
* Change: In Katana::Manipulator::moveUp(), now move up the whole set
of aligned segments instead of just the canonical one.
* Change: In Katana::NegociateWindow::loadRoutingPads(), more accurate
TrackMarkers insertions for fixed terminals.
* New: In Katana::RoutingEvent::Key::Compare::operator(), segments with
fixed axis are processed prior to any others.
* New: In Katana::RoutingEventLoop, store segment pointers instead of
ids to generate more accurate error messages.
* Change: In Katana::RoutingPlane::create(), perform local track
assignment only for HV gauges.
* Change: In Katana::SegmentFsm::_slackenLocal(), add a "dragMinimize"
step in the automaton. Mutliple states transitions can occurs in
a row if an action fails.
* New: In Katana::Session::_toIntervalAxis(), normalize interval
bounds so they are on track positions (by shrinking the interval).
* Bug: In Katana::TrackMarker CTOR, the weigh computation was wrong.
2018-02-17 13:27:38 -06:00
|
|
|
#include "anabatic/AutoContactTerminal.h"
|
2017-12-18 11:15:14 -06:00
|
|
|
#include "anabatic/NetBuilderM2.h"
|
2017-12-16 17:13:19 -06:00
|
|
|
#include "anabatic/NetBuilderHV.h"
|
In Anabatic/Katana, add support for VH gauges (real technos).
* Change: In Anabatic::AutoContactTerminal::getNativeConstraintBox(),
when the anchor is a RoutingPad (which must be always the case),
perform the true computation of it's position based on the
segment occurrence. It is a important change, previously the
area was in fact the "center line" of the connector while now
it is really an area (mandatory for "half-offgrid" terminals of
real technologies).
The change is not complete yet, the area should be shrinked
by the half size of a VIA, because the area applies to the center
coordinate of the VIA (to be done quickly).
* Bug: In Anabatic::AutoContactTurn::updateTopology(), when a dogleg
is created (restore connexity after a layer change) the layer of
the VIA, based on the segments it connects to must be re-computed
*after* the dogleg has been made.
* Change: In all files of Anabatic, when comparing two layers, no longer
use the Layer pointer itself, but the layer mask. This allow a
transparent management of both real and symbolic layers (which
do share the same mask). Real metal layers (not VIAs) will be
BasicLayer and symbolic metal layers will be RegularLayer.
* New: Anabatic::Configuration::selectRpComponent(), select the best
RoutingPad component for metal1 terminals. Look for the metal1
component with the biggest accessibility on-grid.
RoutingPad using other metals are left untoucheds.
* New: New function Anabatic::Vertex::getNeighbor(Edge*) to get the
neighbor Vertex through an Edge*. This method allows to write
clearer code as we no longer need to access the neighbor through
the underlying GCell.
Also add proxies for GCell methods in Vertex.
* Bug: In Anabatic::Dijkstra::_toSources(), in the ripup stage, when
a component with multiples vertexes is reached *and* two of it's
vertexes are reached *at the same time* (one from which we backtrack
and one still in the queue) extraneous edges may be created by
_materialize(). Case occurs on snx/c35b4, "abc_5360_n903_1".
To solve this, Dijkstra::_toSource() is modificated, the "from"
edges of the newly reacheds vertexes are reset to NULL, *except*
for the one we will be backtracking from. That is, the one given
in the source argument.
* Change: In Anabatic::NetBuilder class, put the various Hooks and
RoutingPad sorting functions as class ones.
* Bug: In AutoSegment::setLayer(), raise the SegInvalidatedFayer flag.
This unset flag was causing AutoContactTurn::updateTopology()
to not work as expected and making gaps, this was the cause of
the last remaining warnings about layer connexity.
2018-01-06 09:55:53 -06:00
|
|
|
#include "anabatic/NetBuilderVH.h"
|
2016-05-23 09:15:25 -05:00
|
|
|
#include "anabatic/AnabaticEngine.h"
|
|
|
|
|
|
|
|
|
Basic support for FreePDK 45 completed.
* New: In Commons, inspector support for std::pair<T,U>.
* New: In Hurricane::Layer, ContactLayer & ViaLayer, support for non
square VIAs. The hole (cut) remains square, but the various metal
extensions can now be different in X and Y. The ::getEnclosure()
method now takes a flag EnclosureH / EnclosureV.
* New: In Hurricane::DbU, inspector support for:
std::pair<DbU::Unit,DbU::Unit>
std::array<DbU::Unit,3>
Must be defined here as DbU do not exists yet in Commons.h
* Bug: In Hurricane::Interval::getSize(), when the interval is "full span",
do not return the difference between min and max, but directly DbU::Max.
(the previous result was -1 !)
* New: In CRL Core Python/Technology.py, support for non square VIAs in
the configuration files. Applied to FreePDK 45.
* New: In CRL::RoutingGauge, added a "symbolic" flag to tell if a gauge
is for symbolic layout or not. Exported to Python.
* New: In Anabatic::AutoHorizontal::updatePosition(), differentiated
computation for soure or target taking account of the VIA extension
in the right segment metal (due to non-square VIAs).
* Change: In Anabatic::AutoHorizontal::_makeDogleg(), the dogleg is
UP for HV gauges and DOWN for VH.
* New: In Anabatic::AutoSegment::_initialize(), create a cache of the
various extension length for each layer (viaToTop, viaToBottom,
viaToSame).
New implementation of getExtensionCap() using the previous cached
extension table. See updatePositions().
New static functions to access the extension cache in the header:
getViaTotopCap() ...
* Change: In Anabatic::AutoSegment, in various update methods, updateOrient()
must always be called *before* updatePositions() as extensions are
dependant on source/target.
* New: In Anabatic::AutoSegment::getEndAxes() compute the position of the
first source and last target position (center/axes) on an *aligned*
set of segments.
* New: In Anabatic::AutoSegment, add a new state flag SegAxisFixed to
signal segments that can be put on only one track. Specific case
to VH gauge for a M1 vertical terminal with a M2 vertical segment.
The M2 is effectively bound to the M1 axis position.
* Bug: In Anabatic::NetBuilderVH::_do_xG_xM1_xM3(), in case of E/W global
and only one RoutingPad the connexion to the RoutingPad was duplicated.
It was valid, but totally stupid.
* Bug: In Anabatic::Session::_canonize(), for an aligned segment set,
intersect the user constraints from all segments instead of only
considering the canonical one.
Issue a warning about too tight constraints only for symbolic
gauges. It may be correct for the real ones.
* New: In Katata::DataNegociate::update(), more accurate computation
of the perpandicular free interval. Use segment extension cap
calculation. Create a special case for fixed axis segments allowing
them to find alternative free interval, try under source and under
target as they are likely to be draggable segments.
* Change: In Katana::Manipulator::relax(), use the extension cap value
to compute the axis of the perpandicular segemnts.
* Change: In Katana::Manipulator::moveUp(), now move up the whole set
of aligned segments instead of just the canonical one.
* Change: In Katana::NegociateWindow::loadRoutingPads(), more accurate
TrackMarkers insertions for fixed terminals.
* New: In Katana::RoutingEvent::Key::Compare::operator(), segments with
fixed axis are processed prior to any others.
* New: In Katana::RoutingEventLoop, store segment pointers instead of
ids to generate more accurate error messages.
* Change: In Katana::RoutingPlane::create(), perform local track
assignment only for HV gauges.
* Change: In Katana::SegmentFsm::_slackenLocal(), add a "dragMinimize"
step in the automaton. Mutliple states transitions can occurs in
a row if an action fails.
* New: In Katana::Session::_toIntervalAxis(), normalize interval
bounds so they are on track positions (by shrinking the interval).
* Bug: In Katana::TrackMarker CTOR, the weigh computation was wrong.
2018-02-17 13:27:38 -06:00
|
|
|
namespace {
|
|
|
|
|
|
|
|
using namespace Hurricane;
|
|
|
|
using namespace Anabatic;
|
|
|
|
|
|
|
|
|
|
|
|
class SortAcByXY {
|
|
|
|
public:
|
|
|
|
inline bool operator() ( AutoContactTerminal* contact1, AutoContactTerminal* contact2 );
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
inline bool SortAcByXY::operator() ( AutoContactTerminal* contact1, AutoContactTerminal* contact2 )
|
|
|
|
{
|
|
|
|
DbU::Unit x1 = contact1->getX();
|
|
|
|
DbU::Unit x2 = contact2->getX();
|
|
|
|
|
|
|
|
if (x1 == x2) {
|
|
|
|
DbU::Unit y1 = contact1->getY();
|
|
|
|
DbU::Unit y2 = contact2->getY();
|
|
|
|
|
|
|
|
if (y1 == y2) return false;
|
|
|
|
return (y1 < y2);
|
|
|
|
}
|
|
|
|
return (x1 < x2);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void shear ( AutoSegment* segment )
|
|
|
|
{
|
|
|
|
AutoContact* source = segment->getAutoSource();
|
|
|
|
AutoContact* target = segment->getAutoTarget();
|
|
|
|
bool useSource = true;
|
|
|
|
|
|
|
|
if (segment->isHorizontal()) {
|
|
|
|
if (not source->isTurn() and target->isTurn()) useSource = false;
|
|
|
|
} else {
|
|
|
|
if (not source->isTurn() and target->isTurn()) useSource = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
segment->makeDogleg( (useSource ? source->getGCell() : target->getGCell()) );
|
|
|
|
Session::getDoglegs()[ Session::getDoglegs().size()-2 ]->unsetFlags( AutoSegment::SegAxisSet );
|
|
|
|
|
|
|
|
#if BAD_RESULTS
|
|
|
|
AutoContact* source = segment->getAutoSource();
|
|
|
|
AutoContact* target = segment->getAutoTarget();
|
|
|
|
AutoSegment* perpandicular = NULL;
|
|
|
|
bool useSource = true;
|
|
|
|
|
|
|
|
if (segment->isHorizontal()) {
|
|
|
|
if (source->isTurn()) perpandicular = source->getPerpandicular( segment );
|
|
|
|
else {
|
|
|
|
if (target->isTurn()) { perpandicular = target->getPerpandicular( segment ); useSource = false; }
|
|
|
|
else {
|
|
|
|
if (source->isHTee()) perpandicular = source->getPerpandicular( segment );
|
|
|
|
else {
|
|
|
|
if (target->isHTee()) { perpandicular = target->getPerpandicular( segment ); useSource = false; }
|
|
|
|
else
|
|
|
|
perpandicular = segment;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if (source->isTurn()) perpandicular = source->getPerpandicular( segment );
|
|
|
|
else {
|
|
|
|
if (target->isTurn()) { perpandicular = target->getPerpandicular( segment ); useSource = false; }
|
|
|
|
else {
|
|
|
|
if (source->isVTee()) perpandicular = source->getPerpandicular( segment );
|
|
|
|
else {
|
|
|
|
if (target->isVTee()) { perpandicular = target->getPerpandicular( segment ); useSource = false; }
|
|
|
|
else
|
|
|
|
perpandicular = segment;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
perpandicular->makeDogleg( (useSource ? source->getGCell() : target->getGCell()) );
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // Anonymous namespace.
|
|
|
|
|
|
|
|
|
2016-05-23 09:15:25 -05:00
|
|
|
namespace Anabatic {
|
|
|
|
|
|
|
|
using std::cerr;
|
|
|
|
using std::cout;
|
|
|
|
using std::endl;
|
Basic support for FreePDK 45 completed.
* New: In Commons, inspector support for std::pair<T,U>.
* New: In Hurricane::Layer, ContactLayer & ViaLayer, support for non
square VIAs. The hole (cut) remains square, but the various metal
extensions can now be different in X and Y. The ::getEnclosure()
method now takes a flag EnclosureH / EnclosureV.
* New: In Hurricane::DbU, inspector support for:
std::pair<DbU::Unit,DbU::Unit>
std::array<DbU::Unit,3>
Must be defined here as DbU do not exists yet in Commons.h
* Bug: In Hurricane::Interval::getSize(), when the interval is "full span",
do not return the difference between min and max, but directly DbU::Max.
(the previous result was -1 !)
* New: In CRL Core Python/Technology.py, support for non square VIAs in
the configuration files. Applied to FreePDK 45.
* New: In CRL::RoutingGauge, added a "symbolic" flag to tell if a gauge
is for symbolic layout or not. Exported to Python.
* New: In Anabatic::AutoHorizontal::updatePosition(), differentiated
computation for soure or target taking account of the VIA extension
in the right segment metal (due to non-square VIAs).
* Change: In Anabatic::AutoHorizontal::_makeDogleg(), the dogleg is
UP for HV gauges and DOWN for VH.
* New: In Anabatic::AutoSegment::_initialize(), create a cache of the
various extension length for each layer (viaToTop, viaToBottom,
viaToSame).
New implementation of getExtensionCap() using the previous cached
extension table. See updatePositions().
New static functions to access the extension cache in the header:
getViaTotopCap() ...
* Change: In Anabatic::AutoSegment, in various update methods, updateOrient()
must always be called *before* updatePositions() as extensions are
dependant on source/target.
* New: In Anabatic::AutoSegment::getEndAxes() compute the position of the
first source and last target position (center/axes) on an *aligned*
set of segments.
* New: In Anabatic::AutoSegment, add a new state flag SegAxisFixed to
signal segments that can be put on only one track. Specific case
to VH gauge for a M1 vertical terminal with a M2 vertical segment.
The M2 is effectively bound to the M1 axis position.
* Bug: In Anabatic::NetBuilderVH::_do_xG_xM1_xM3(), in case of E/W global
and only one RoutingPad the connexion to the RoutingPad was duplicated.
It was valid, but totally stupid.
* Bug: In Anabatic::Session::_canonize(), for an aligned segment set,
intersect the user constraints from all segments instead of only
considering the canonical one.
Issue a warning about too tight constraints only for symbolic
gauges. It may be correct for the real ones.
* New: In Katata::DataNegociate::update(), more accurate computation
of the perpandicular free interval. Use segment extension cap
calculation. Create a special case for fixed axis segments allowing
them to find alternative free interval, try under source and under
target as they are likely to be draggable segments.
* Change: In Katana::Manipulator::relax(), use the extension cap value
to compute the axis of the perpandicular segemnts.
* Change: In Katana::Manipulator::moveUp(), now move up the whole set
of aligned segments instead of just the canonical one.
* Change: In Katana::NegociateWindow::loadRoutingPads(), more accurate
TrackMarkers insertions for fixed terminals.
* New: In Katana::RoutingEvent::Key::Compare::operator(), segments with
fixed axis are processed prior to any others.
* New: In Katana::RoutingEventLoop, store segment pointers instead of
ids to generate more accurate error messages.
* Change: In Katana::RoutingPlane::create(), perform local track
assignment only for HV gauges.
* Change: In Katana::SegmentFsm::_slackenLocal(), add a "dragMinimize"
step in the automaton. Mutliple states transitions can occurs in
a row if an action fails.
* New: In Katana::Session::_toIntervalAxis(), normalize interval
bounds so they are on track positions (by shrinking the interval).
* Bug: In Katana::TrackMarker CTOR, the weigh computation was wrong.
2018-02-17 13:27:38 -06:00
|
|
|
using std::multiset;
|
2016-05-23 09:15:25 -05:00
|
|
|
using std::ostringstream;
|
2016-07-31 11:43:44 -05:00
|
|
|
using Hurricane::Bug;
|
2016-05-23 09:15:25 -05:00
|
|
|
using Hurricane::Error;
|
Basic support for FreePDK 45 completed.
* New: In Commons, inspector support for std::pair<T,U>.
* New: In Hurricane::Layer, ContactLayer & ViaLayer, support for non
square VIAs. The hole (cut) remains square, but the various metal
extensions can now be different in X and Y. The ::getEnclosure()
method now takes a flag EnclosureH / EnclosureV.
* New: In Hurricane::DbU, inspector support for:
std::pair<DbU::Unit,DbU::Unit>
std::array<DbU::Unit,3>
Must be defined here as DbU do not exists yet in Commons.h
* Bug: In Hurricane::Interval::getSize(), when the interval is "full span",
do not return the difference between min and max, but directly DbU::Max.
(the previous result was -1 !)
* New: In CRL Core Python/Technology.py, support for non square VIAs in
the configuration files. Applied to FreePDK 45.
* New: In CRL::RoutingGauge, added a "symbolic" flag to tell if a gauge
is for symbolic layout or not. Exported to Python.
* New: In Anabatic::AutoHorizontal::updatePosition(), differentiated
computation for soure or target taking account of the VIA extension
in the right segment metal (due to non-square VIAs).
* Change: In Anabatic::AutoHorizontal::_makeDogleg(), the dogleg is
UP for HV gauges and DOWN for VH.
* New: In Anabatic::AutoSegment::_initialize(), create a cache of the
various extension length for each layer (viaToTop, viaToBottom,
viaToSame).
New implementation of getExtensionCap() using the previous cached
extension table. See updatePositions().
New static functions to access the extension cache in the header:
getViaTotopCap() ...
* Change: In Anabatic::AutoSegment, in various update methods, updateOrient()
must always be called *before* updatePositions() as extensions are
dependant on source/target.
* New: In Anabatic::AutoSegment::getEndAxes() compute the position of the
first source and last target position (center/axes) on an *aligned*
set of segments.
* New: In Anabatic::AutoSegment, add a new state flag SegAxisFixed to
signal segments that can be put on only one track. Specific case
to VH gauge for a M1 vertical terminal with a M2 vertical segment.
The M2 is effectively bound to the M1 axis position.
* Bug: In Anabatic::NetBuilderVH::_do_xG_xM1_xM3(), in case of E/W global
and only one RoutingPad the connexion to the RoutingPad was duplicated.
It was valid, but totally stupid.
* Bug: In Anabatic::Session::_canonize(), for an aligned segment set,
intersect the user constraints from all segments instead of only
considering the canonical one.
Issue a warning about too tight constraints only for symbolic
gauges. It may be correct for the real ones.
* New: In Katata::DataNegociate::update(), more accurate computation
of the perpandicular free interval. Use segment extension cap
calculation. Create a special case for fixed axis segments allowing
them to find alternative free interval, try under source and under
target as they are likely to be draggable segments.
* Change: In Katana::Manipulator::relax(), use the extension cap value
to compute the axis of the perpandicular segemnts.
* Change: In Katana::Manipulator::moveUp(), now move up the whole set
of aligned segments instead of just the canonical one.
* Change: In Katana::NegociateWindow::loadRoutingPads(), more accurate
TrackMarkers insertions for fixed terminals.
* New: In Katana::RoutingEvent::Key::Compare::operator(), segments with
fixed axis are processed prior to any others.
* New: In Katana::RoutingEventLoop, store segment pointers instead of
ids to generate more accurate error messages.
* Change: In Katana::RoutingPlane::create(), perform local track
assignment only for HV gauges.
* Change: In Katana::SegmentFsm::_slackenLocal(), add a "dragMinimize"
step in the automaton. Mutliple states transitions can occurs in
a row if an action fails.
* New: In Katana::Session::_toIntervalAxis(), normalize interval
bounds so they are on track positions (by shrinking the interval).
* Bug: In Katana::TrackMarker CTOR, the weigh computation was wrong.
2018-02-17 13:27:38 -06:00
|
|
|
using Hurricane::Warning;
|
2016-08-10 16:48:06 -05:00
|
|
|
using Hurricane::Breakpoint;
|
2016-05-26 06:56:16 -05:00
|
|
|
using Hurricane::RegularLayer;
|
Anabatic transient commit 10. Ripup & reroute support in Dijsktra.
* New: In Anabatic:
- In AnabaticEngine, keep track of overflowed edges.
- In AnabaticEngine, getNetsFromedge() to lookup all nets going
through an Edge.
- In Configuration, read the Kite "reserved local" parameter to
decrease the Edge capacity (it's a guessing of the cost of the
local routing).
- In Edge, add an attribute to know if there is an associated
segment of the current net (set by Dijkstra::_traceback()).
Transparently manage the overflowed edges.
- In GCell_Edges, correct a filtering bug when not all sides are
selecteds.
- New GCell::getEdgeTo() to find the edge between two adjacent
GCells.
- New GCell::unrefContact() to automatically removes global contacts
no longer used by any global segments (used during the ripup
step).
- In Dijkstra::load(), now able to "reload" and already partially
or completly routed net (look for Contact of "gcontact" layer
and their attached segments).
- In Dijkstra, keep the last net loaded until the next one is.
Put the cleanup operations in an isolated function "_cleanup()".
- In Dijkstra::_selectFirstsource() and run(), load first source
component made of multiple vertexes.
- In Dijkstra::_trackback(), link the Net segments to the Edges.
- New Dijkstra::ripup(), Dijkstra::_propagateRipup() to perform
the ripup of one edge of a Net (must be loaded in Dijkstra first).
Dijkstra::_tagConnecteds() setup the connexId of a set of Vertexes
- that are connecteds through edges *with* segments.
- In GraphicAnabaticengine & GlobalRoute.cpp, embryo of a global
routing tool with ripup & reroute.
2016-06-26 07:32:32 -05:00
|
|
|
using Hurricane::Component;
|
|
|
|
using Hurricane::Horizontal;
|
|
|
|
using Hurricane::Vertical;
|
2016-07-21 17:14:17 -05:00
|
|
|
using Hurricane::NetRoutingExtension;
|
2016-05-23 09:15:25 -05:00
|
|
|
using Hurricane::Cell;
|
2016-07-18 07:48:37 -05:00
|
|
|
using Hurricane::DebugSession;
|
2016-05-23 09:15:25 -05:00
|
|
|
using Hurricane::UpdateSession;
|
2016-05-26 06:56:16 -05:00
|
|
|
using CRL::RoutingGauge;
|
|
|
|
using CRL::RoutingLayerGauge;
|
2017-12-16 17:13:19 -06:00
|
|
|
using CRL::addMeasure;
|
|
|
|
using CRL::getMeasure;
|
2016-05-23 09:15:25 -05:00
|
|
|
|
|
|
|
|
2016-07-18 07:48:37 -05:00
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Error messages.
|
|
|
|
|
|
|
|
const char* missingAnbt =
|
|
|
|
"%s :\n\n"
|
|
|
|
" Cell %s do not have any Anabatic (or not yet created).\n";
|
|
|
|
|
|
|
|
const char* badMethod =
|
|
|
|
"%s :\n\n"
|
|
|
|
" No method id %ud (Cell %s).\n";
|
|
|
|
|
|
|
|
const char* lookupFailed =
|
|
|
|
"Anabatic::Extension::getDatas(Segment*) :\n\n"
|
|
|
|
" Cannot find AutoSegment associated to %s (internal error).\n";
|
|
|
|
|
|
|
|
|
2016-07-30 05:15:49 -05:00
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "Anabatic::RawGCellsUnder".
|
|
|
|
|
|
|
|
RawGCellsUnder::RawGCellsUnder ( const AnabaticEngine* engine, Segment* segment )
|
|
|
|
{
|
|
|
|
cdebug_log(112,1) << "RawGCellsUnder::RawGCellsUnder(): " << segment << endl;
|
|
|
|
|
Anabatic transient commit 18. Port of Kite (Katana), Yeah, Baby! Yeah!
* Bug: In Hurricane, in StaticObservable::getObserver(), if the slot
pointer is NULL, do not try to access the owner. Returns NULL, so
the caller can be aware of the situation...
* Change: In Hurricane, in BreakpointWidget & ExceptionWidget some
cosmetic changes (fonts and window sizes).
* Bug: In Anabatic, In AutoHorizontal::getConstraints(), take into account
the constraints from the source AutoContact, as it holds the constraints
transmitted by the RoutingPads and sets up by propageConstraintsFromRp().
It is likely to be a bug affecting the original Katabatic as well.
* Change: In Anabatic, in RawGCellsUnder(), check that the segment is not
completly oustside the cell abutment box and truncate the coordinates
to the part that is inside. Use the "shrink" if we reach the east/north
border.
* Change: In Anabatic, in Configuration, no more decorator because we will
use a true derived relationship. Katana *derives* from *Anabatic* and do
not *decorate* it, so the Configuration can do the same. It also implies
that we directly create a Katana engine, not an Anabatic one.
* Change: In Anabatic, in Session, do not allow the opening of the Session
in a standalone fashion (with a static method). Instead it must be opened
using the relevant method of the Anabatic/Katana engine. This ensure we
are opening the right Session type.
* Change: In Anabatic, in AutoSegment_Aligneds() collection the seed segment
is not part of the collection by default, but will be included if the
Flags::WithSelf is set.
* Change: In Configuration, all the flags value are now defined in two steps.
Declared in the header and initialized in the module. This is to prevent
the fact that on some cases, in relation with the Python "extern C" part
modules, we need a true allocated variable. It was causing weird linking
problems.
A side effect is that they can no longer be used as entry is switches,
have to replace them by if/else.
* New: In Anabatic, new GCell::getNeighborAt() utility function.
* Bug: In Anabatic, in GCell::doGrid(), tag all the GCells of the grid with
the grid type... Back annote all the edges capacity (north & east) with
the reserved local capacity.
* New: Complete portage of Kite over Anabatic. The new engine is christened
"Katana" for Kite-Analogic. When it's capabilities and performances
will be on a part with Kite, it is to completly replace it (and take
back the "Kite" name). Preliminary tests seems to show that, contrary
to intuition (because built on a more complex/slower grid), it is even
slightly faster than Kite 8-).
2016-08-15 09:30:13 -05:00
|
|
|
Box gcellsArea = engine->getCell()->getAbutmentBox();
|
|
|
|
Point sourcePosition = segment->getSourcePosition();
|
|
|
|
Point targetPosition = segment->getTargetPosition();
|
|
|
|
|
2016-09-10 11:49:48 -05:00
|
|
|
if ( (sourcePosition.getX() > gcellsArea.getXMax())
|
|
|
|
or (sourcePosition.getY() > gcellsArea.getYMax())
|
Anabatic transient commit 18. Port of Kite (Katana), Yeah, Baby! Yeah!
* Bug: In Hurricane, in StaticObservable::getObserver(), if the slot
pointer is NULL, do not try to access the owner. Returns NULL, so
the caller can be aware of the situation...
* Change: In Hurricane, in BreakpointWidget & ExceptionWidget some
cosmetic changes (fonts and window sizes).
* Bug: In Anabatic, In AutoHorizontal::getConstraints(), take into account
the constraints from the source AutoContact, as it holds the constraints
transmitted by the RoutingPads and sets up by propageConstraintsFromRp().
It is likely to be a bug affecting the original Katabatic as well.
* Change: In Anabatic, in RawGCellsUnder(), check that the segment is not
completly oustside the cell abutment box and truncate the coordinates
to the part that is inside. Use the "shrink" if we reach the east/north
border.
* Change: In Anabatic, in Configuration, no more decorator because we will
use a true derived relationship. Katana *derives* from *Anabatic* and do
not *decorate* it, so the Configuration can do the same. It also implies
that we directly create a Katana engine, not an Anabatic one.
* Change: In Anabatic, in Session, do not allow the opening of the Session
in a standalone fashion (with a static method). Instead it must be opened
using the relevant method of the Anabatic/Katana engine. This ensure we
are opening the right Session type.
* Change: In Anabatic, in AutoSegment_Aligneds() collection the seed segment
is not part of the collection by default, but will be included if the
Flags::WithSelf is set.
* Change: In Configuration, all the flags value are now defined in two steps.
Declared in the header and initialized in the module. This is to prevent
the fact that on some cases, in relation with the Python "extern C" part
modules, we need a true allocated variable. It was causing weird linking
problems.
A side effect is that they can no longer be used as entry is switches,
have to replace them by if/else.
* New: In Anabatic, new GCell::getNeighborAt() utility function.
* Bug: In Anabatic, in GCell::doGrid(), tag all the GCells of the grid with
the grid type... Back annote all the edges capacity (north & east) with
the reserved local capacity.
* New: Complete portage of Kite over Anabatic. The new engine is christened
"Katana" for Kite-Analogic. When it's capabilities and performances
will be on a part with Kite, it is to completly replace it (and take
back the "Kite" name). Preliminary tests seems to show that, contrary
to intuition (because built on a more complex/slower grid), it is even
slightly faster than Kite 8-).
2016-08-15 09:30:13 -05:00
|
|
|
or (targetPosition.getX() <= gcellsArea.getXMin())
|
|
|
|
or (targetPosition.getY() <= gcellsArea.getYMin()) ) {
|
|
|
|
cerr << Error( "RawGCellsUnder::RawGCellsUnder(): %s is completly outside the GCells area (ignored)."
|
2016-07-30 05:15:49 -05:00
|
|
|
, getString(segment).c_str()
|
|
|
|
) << endl;
|
|
|
|
cdebug_tabw(112,-1);
|
|
|
|
DebugSession::close();
|
|
|
|
return;
|
|
|
|
}
|
Anabatic transient commit 18. Port of Kite (Katana), Yeah, Baby! Yeah!
* Bug: In Hurricane, in StaticObservable::getObserver(), if the slot
pointer is NULL, do not try to access the owner. Returns NULL, so
the caller can be aware of the situation...
* Change: In Hurricane, in BreakpointWidget & ExceptionWidget some
cosmetic changes (fonts and window sizes).
* Bug: In Anabatic, In AutoHorizontal::getConstraints(), take into account
the constraints from the source AutoContact, as it holds the constraints
transmitted by the RoutingPads and sets up by propageConstraintsFromRp().
It is likely to be a bug affecting the original Katabatic as well.
* Change: In Anabatic, in RawGCellsUnder(), check that the segment is not
completly oustside the cell abutment box and truncate the coordinates
to the part that is inside. Use the "shrink" if we reach the east/north
border.
* Change: In Anabatic, in Configuration, no more decorator because we will
use a true derived relationship. Katana *derives* from *Anabatic* and do
not *decorate* it, so the Configuration can do the same. It also implies
that we directly create a Katana engine, not an Anabatic one.
* Change: In Anabatic, in Session, do not allow the opening of the Session
in a standalone fashion (with a static method). Instead it must be opened
using the relevant method of the Anabatic/Katana engine. This ensure we
are opening the right Session type.
* Change: In Anabatic, in AutoSegment_Aligneds() collection the seed segment
is not part of the collection by default, but will be included if the
Flags::WithSelf is set.
* Change: In Configuration, all the flags value are now defined in two steps.
Declared in the header and initialized in the module. This is to prevent
the fact that on some cases, in relation with the Python "extern C" part
modules, we need a true allocated variable. It was causing weird linking
problems.
A side effect is that they can no longer be used as entry is switches,
have to replace them by if/else.
* New: In Anabatic, new GCell::getNeighborAt() utility function.
* Bug: In Anabatic, in GCell::doGrid(), tag all the GCells of the grid with
the grid type... Back annote all the edges capacity (north & east) with
the reserved local capacity.
* New: Complete portage of Kite over Anabatic. The new engine is christened
"Katana" for Kite-Analogic. When it's capabilities and performances
will be on a part with Kite, it is to completly replace it (and take
back the "Kite" name). Preliminary tests seems to show that, contrary
to intuition (because built on a more complex/slower grid), it is even
slightly faster than Kite 8-).
2016-08-15 09:30:13 -05:00
|
|
|
|
|
|
|
DbU::Unit xsource = std::max( sourcePosition.getX(), gcellsArea.getXMin() );
|
|
|
|
DbU::Unit ysource = std::max( sourcePosition.getY(), gcellsArea.getYMin() );
|
|
|
|
DbU::Unit xtarget = std::min( targetPosition.getX(), gcellsArea.getXMax() );
|
|
|
|
DbU::Unit ytarget = std::min( targetPosition.getY(), gcellsArea.getYMax() );
|
|
|
|
|
|
|
|
if (xtarget == gcellsArea.getXMax()) --xtarget;
|
|
|
|
if (ytarget == gcellsArea.getYMax()) --ytarget;
|
|
|
|
|
|
|
|
GCell* gsource = engine->getGCellUnder( xsource, ysource );
|
|
|
|
GCell* gtarget = engine->getGCellUnder( xtarget, ytarget );
|
|
|
|
|
|
|
|
if (not gsource) {
|
|
|
|
cerr << Bug( "RawGCellsUnder::RawGCellsUnder(): %s source not under a GCell (ignored)."
|
|
|
|
, getString(segment).c_str()
|
|
|
|
) << endl;
|
|
|
|
cdebug_tabw(112,-1);
|
|
|
|
DebugSession::close();
|
|
|
|
return;
|
|
|
|
}
|
2016-07-30 05:15:49 -05:00
|
|
|
if (not gtarget) {
|
Anabatic transient commit 18. Port of Kite (Katana), Yeah, Baby! Yeah!
* Bug: In Hurricane, in StaticObservable::getObserver(), if the slot
pointer is NULL, do not try to access the owner. Returns NULL, so
the caller can be aware of the situation...
* Change: In Hurricane, in BreakpointWidget & ExceptionWidget some
cosmetic changes (fonts and window sizes).
* Bug: In Anabatic, In AutoHorizontal::getConstraints(), take into account
the constraints from the source AutoContact, as it holds the constraints
transmitted by the RoutingPads and sets up by propageConstraintsFromRp().
It is likely to be a bug affecting the original Katabatic as well.
* Change: In Anabatic, in RawGCellsUnder(), check that the segment is not
completly oustside the cell abutment box and truncate the coordinates
to the part that is inside. Use the "shrink" if we reach the east/north
border.
* Change: In Anabatic, in Configuration, no more decorator because we will
use a true derived relationship. Katana *derives* from *Anabatic* and do
not *decorate* it, so the Configuration can do the same. It also implies
that we directly create a Katana engine, not an Anabatic one.
* Change: In Anabatic, in Session, do not allow the opening of the Session
in a standalone fashion (with a static method). Instead it must be opened
using the relevant method of the Anabatic/Katana engine. This ensure we
are opening the right Session type.
* Change: In Anabatic, in AutoSegment_Aligneds() collection the seed segment
is not part of the collection by default, but will be included if the
Flags::WithSelf is set.
* Change: In Configuration, all the flags value are now defined in two steps.
Declared in the header and initialized in the module. This is to prevent
the fact that on some cases, in relation with the Python "extern C" part
modules, we need a true allocated variable. It was causing weird linking
problems.
A side effect is that they can no longer be used as entry is switches,
have to replace them by if/else.
* New: In Anabatic, new GCell::getNeighborAt() utility function.
* Bug: In Anabatic, in GCell::doGrid(), tag all the GCells of the grid with
the grid type... Back annote all the edges capacity (north & east) with
the reserved local capacity.
* New: Complete portage of Kite over Anabatic. The new engine is christened
"Katana" for Kite-Analogic. When it's capabilities and performances
will be on a part with Kite, it is to completly replace it (and take
back the "Kite" name). Preliminary tests seems to show that, contrary
to intuition (because built on a more complex/slower grid), it is even
slightly faster than Kite 8-).
2016-08-15 09:30:13 -05:00
|
|
|
cerr << Bug( "RawGCellsUnder::RawGCellsUnder(): %s target not under a GCell (ignored)."
|
|
|
|
, getString(segment).c_str()
|
|
|
|
) << endl;
|
2016-07-30 05:15:49 -05:00
|
|
|
cdebug_tabw(112,-1);
|
|
|
|
DebugSession::close();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (gsource == gtarget) {
|
|
|
|
_elements.push_back( Element(gsource,NULL) );
|
|
|
|
cdebug_tabw(112,-1);
|
|
|
|
DebugSession::close();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
Flags side = Flags::NoFlags;
|
|
|
|
DbU::Unit axis = 0;
|
|
|
|
Horizontal* horizontal = dynamic_cast<Horizontal*>( segment );
|
|
|
|
if (horizontal) {
|
|
|
|
side = Flags::EastSide;
|
|
|
|
axis = horizontal->getY();
|
|
|
|
|
|
|
|
if (horizontal->getSourceX() > horizontal->getTargetX())
|
|
|
|
std::swap( gsource, gtarget );
|
|
|
|
} else {
|
|
|
|
Vertical* vertical = dynamic_cast<Vertical*>( segment );
|
|
|
|
side = Flags::NorthSide;
|
|
|
|
axis = vertical->getX();
|
|
|
|
|
|
|
|
if (vertical->getSourceY() > vertical->getTargetY())
|
|
|
|
std::swap( gsource, gtarget );
|
|
|
|
}
|
|
|
|
|
|
|
|
Edge* edge = gsource->getEdgeAt( side, axis );
|
|
|
|
while ( edge ) {
|
|
|
|
_elements.push_back( Element(edge->getSource(),edge) );
|
|
|
|
|
|
|
|
if (edge->getTarget() == gtarget) break;
|
|
|
|
edge = edge->getTarget()->getEdgeAt( side, axis );
|
|
|
|
}
|
|
|
|
_elements.push_back( Element(gtarget,NULL) );
|
|
|
|
|
|
|
|
cdebug_tabw(112,-1);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-07-31 11:43:44 -05:00
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "Anabatic::NetData".
|
|
|
|
|
|
|
|
NetData::NetData ( Net* net )
|
|
|
|
: _net (net)
|
|
|
|
, _state (NetRoutingExtension::get(net))
|
|
|
|
, _searchArea()
|
|
|
|
, _rpCount (0)
|
|
|
|
, _sparsity (0)
|
|
|
|
, _flags ()
|
|
|
|
{
|
|
|
|
if (_state and _state->isMixedPreRoute()) return;
|
|
|
|
|
|
|
|
for ( RoutingPad* rp : _net->getRoutingPads() ) {
|
|
|
|
_searchArea.merge( rp->getBoundingBox() );
|
|
|
|
++_rpCount;
|
|
|
|
}
|
|
|
|
_update();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-05-23 09:15:25 -05:00
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "Anabatic::AnabaticEngine".
|
|
|
|
|
|
|
|
Name AnabaticEngine::_toolName = "Anabatic";
|
|
|
|
|
|
|
|
|
|
|
|
AnabaticEngine* AnabaticEngine::get ( const Cell* cell )
|
|
|
|
{ return static_cast<AnabaticEngine*>(ToolEngine::get(cell,staticGetName())); }
|
|
|
|
|
|
|
|
|
|
|
|
const Name& AnabaticEngine::staticGetName ()
|
|
|
|
{ return _toolName; }
|
|
|
|
|
|
|
|
|
|
|
|
const Name& AnabaticEngine::getName () const
|
|
|
|
{ return _toolName; }
|
|
|
|
|
|
|
|
|
|
|
|
AnabaticEngine::AnabaticEngine ( Cell* cell )
|
|
|
|
: Super(cell)
|
Anabatic transient commit 18. Port of Kite (Katana), Yeah, Baby! Yeah!
* Bug: In Hurricane, in StaticObservable::getObserver(), if the slot
pointer is NULL, do not try to access the owner. Returns NULL, so
the caller can be aware of the situation...
* Change: In Hurricane, in BreakpointWidget & ExceptionWidget some
cosmetic changes (fonts and window sizes).
* Bug: In Anabatic, In AutoHorizontal::getConstraints(), take into account
the constraints from the source AutoContact, as it holds the constraints
transmitted by the RoutingPads and sets up by propageConstraintsFromRp().
It is likely to be a bug affecting the original Katabatic as well.
* Change: In Anabatic, in RawGCellsUnder(), check that the segment is not
completly oustside the cell abutment box and truncate the coordinates
to the part that is inside. Use the "shrink" if we reach the east/north
border.
* Change: In Anabatic, in Configuration, no more decorator because we will
use a true derived relationship. Katana *derives* from *Anabatic* and do
not *decorate* it, so the Configuration can do the same. It also implies
that we directly create a Katana engine, not an Anabatic one.
* Change: In Anabatic, in Session, do not allow the opening of the Session
in a standalone fashion (with a static method). Instead it must be opened
using the relevant method of the Anabatic/Katana engine. This ensure we
are opening the right Session type.
* Change: In Anabatic, in AutoSegment_Aligneds() collection the seed segment
is not part of the collection by default, but will be included if the
Flags::WithSelf is set.
* Change: In Configuration, all the flags value are now defined in two steps.
Declared in the header and initialized in the module. This is to prevent
the fact that on some cases, in relation with the Python "extern C" part
modules, we need a true allocated variable. It was causing weird linking
problems.
A side effect is that they can no longer be used as entry is switches,
have to replace them by if/else.
* New: In Anabatic, new GCell::getNeighborAt() utility function.
* Bug: In Anabatic, in GCell::doGrid(), tag all the GCells of the grid with
the grid type... Back annote all the edges capacity (north & east) with
the reserved local capacity.
* New: Complete portage of Kite over Anabatic. The new engine is christened
"Katana" for Kite-Analogic. When it's capabilities and performances
will be on a part with Kite, it is to completly replace it (and take
back the "Kite" name). Preliminary tests seems to show that, contrary
to intuition (because built on a more complex/slower grid), it is even
slightly faster than Kite 8-).
2016-08-15 09:30:13 -05:00
|
|
|
, _configuration (new Configuration())
|
2016-07-21 17:14:17 -05:00
|
|
|
, _chipTools (cell)
|
|
|
|
, _state (EngineCreation)
|
|
|
|
, _matrix ()
|
|
|
|
, _gcells ()
|
|
|
|
, _ovEdges ()
|
2016-07-31 11:43:44 -05:00
|
|
|
, _netOrdering ()
|
|
|
|
, _netDatas ()
|
2016-07-21 17:14:17 -05:00
|
|
|
, _viewer (NULL)
|
|
|
|
, _flags (Flags::DestroyBaseContact)
|
|
|
|
, _stamp (-1)
|
|
|
|
, _densityMode (MaxDensity)
|
|
|
|
, _autoSegmentLut ()
|
|
|
|
, _autoContactLut ()
|
|
|
|
, _blockageNet (cell->getNet("blockagenet"))
|
2016-05-23 09:15:25 -05:00
|
|
|
{
|
2016-05-30 04:30:29 -05:00
|
|
|
_matrix.setCell( cell, _configuration->getSliceHeight() );
|
|
|
|
Edge::unity = _configuration->getSliceHeight();
|
2016-07-21 17:14:17 -05:00
|
|
|
|
|
|
|
if (not _blockageNet) _blockageNet = Net::create( cell, "blockagenet" );
|
2016-05-23 09:15:25 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void AnabaticEngine::_postCreate ()
|
|
|
|
{
|
|
|
|
Super::_postCreate();
|
|
|
|
|
|
|
|
UpdateSession::open();
|
2016-05-26 06:56:16 -05:00
|
|
|
GCell::create( this );
|
2016-05-23 09:15:25 -05:00
|
|
|
UpdateSession::close();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
AnabaticEngine* AnabaticEngine::create ( Cell* cell )
|
|
|
|
{
|
|
|
|
if (not cell) throw Error( "AnabaticEngine::create(): NULL cell argument." );
|
|
|
|
if (cell->getAbutmentBox().isEmpty())
|
|
|
|
throw Error( "AnabaticEngine::create(): %s has no abutment box." , getString(cell).c_str() );
|
|
|
|
|
|
|
|
AnabaticEngine* engine = new AnabaticEngine ( cell );
|
|
|
|
engine->_postCreate();
|
|
|
|
return engine;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
AnabaticEngine::~AnabaticEngine ()
|
|
|
|
{
|
|
|
|
delete _configuration;
|
2016-07-31 11:43:44 -05:00
|
|
|
for ( pair<unsigned int,NetData*> data : _netDatas ) delete data.second;
|
2016-05-23 09:15:25 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void AnabaticEngine::_preDestroy ()
|
|
|
|
{
|
2016-07-18 07:48:37 -05:00
|
|
|
cdebug_log(145,1) << "Anabatic::_preDestroy ()" << endl;
|
|
|
|
|
|
|
|
if (getState() < EngineGutted)
|
|
|
|
setState( EnginePreDestroying );
|
|
|
|
|
|
|
|
_gutAnabatic();
|
|
|
|
_state = EngineGutted;
|
|
|
|
|
|
|
|
cdebug_log(145,0) << "About to delete base class ToolEngine." << endl;
|
2016-05-23 09:15:25 -05:00
|
|
|
Super::_preDestroy();
|
2016-07-18 07:48:37 -05:00
|
|
|
|
|
|
|
//cmess2 << " - GCells := " << GCell::getAllocateds() << endl;
|
|
|
|
cmess2 << " - AutoContacts := " << AutoContact::getAllocateds() << endl;
|
|
|
|
cmess2 << " - AutoSegments := " << AutoSegment::getAllocateds() << endl;
|
|
|
|
|
|
|
|
cdebug_log(145,0) << "Exiting Anabatic::_preDestroy()." << endl;
|
|
|
|
cdebug_tabw(145,-1);
|
2016-05-23 09:15:25 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-07-18 07:48:37 -05:00
|
|
|
void AnabaticEngine::_gutAnabatic ()
|
2016-05-26 11:30:03 -05:00
|
|
|
{
|
Anabatic transient commit 18. Port of Kite (Katana), Yeah, Baby! Yeah!
* Bug: In Hurricane, in StaticObservable::getObserver(), if the slot
pointer is NULL, do not try to access the owner. Returns NULL, so
the caller can be aware of the situation...
* Change: In Hurricane, in BreakpointWidget & ExceptionWidget some
cosmetic changes (fonts and window sizes).
* Bug: In Anabatic, In AutoHorizontal::getConstraints(), take into account
the constraints from the source AutoContact, as it holds the constraints
transmitted by the RoutingPads and sets up by propageConstraintsFromRp().
It is likely to be a bug affecting the original Katabatic as well.
* Change: In Anabatic, in RawGCellsUnder(), check that the segment is not
completly oustside the cell abutment box and truncate the coordinates
to the part that is inside. Use the "shrink" if we reach the east/north
border.
* Change: In Anabatic, in Configuration, no more decorator because we will
use a true derived relationship. Katana *derives* from *Anabatic* and do
not *decorate* it, so the Configuration can do the same. It also implies
that we directly create a Katana engine, not an Anabatic one.
* Change: In Anabatic, in Session, do not allow the opening of the Session
in a standalone fashion (with a static method). Instead it must be opened
using the relevant method of the Anabatic/Katana engine. This ensure we
are opening the right Session type.
* Change: In Anabatic, in AutoSegment_Aligneds() collection the seed segment
is not part of the collection by default, but will be included if the
Flags::WithSelf is set.
* Change: In Configuration, all the flags value are now defined in two steps.
Declared in the header and initialized in the module. This is to prevent
the fact that on some cases, in relation with the Python "extern C" part
modules, we need a true allocated variable. It was causing weird linking
problems.
A side effect is that they can no longer be used as entry is switches,
have to replace them by if/else.
* New: In Anabatic, new GCell::getNeighborAt() utility function.
* Bug: In Anabatic, in GCell::doGrid(), tag all the GCells of the grid with
the grid type... Back annote all the edges capacity (north & east) with
the reserved local capacity.
* New: Complete portage of Kite over Anabatic. The new engine is christened
"Katana" for Kite-Analogic. When it's capabilities and performances
will be on a part with Kite, it is to completly replace it (and take
back the "Kite" name). Preliminary tests seems to show that, contrary
to intuition (because built on a more complex/slower grid), it is even
slightly faster than Kite 8-).
2016-08-15 09:30:13 -05:00
|
|
|
openSession();
|
2016-07-18 07:48:37 -05:00
|
|
|
|
|
|
|
_flags.reset( Flags::DestroyBaseContact|Flags::DestroyBaseSegment );
|
|
|
|
|
|
|
|
if (_state == EngineDriving) {
|
|
|
|
cdebug_log(145,1) << "Saving AutoContacts/AutoSegments." << endl;
|
|
|
|
|
|
|
|
size_t fixedSegments = 0;
|
|
|
|
size_t sameLayerDoglegs = 0;
|
|
|
|
for ( auto isegment : _autoSegmentLut ) {
|
|
|
|
if (isegment.second->isFixed()) ++fixedSegments;
|
|
|
|
if (isegment.second->reduceDoglegLayer()) ++sameLayerDoglegs;
|
|
|
|
}
|
|
|
|
|
|
|
|
cmess1 << " o Driving Hurricane data-base." << endl;
|
|
|
|
cmess1 << Dots::asSizet(" - Active AutoSegments",AutoSegment::getAllocateds()-fixedSegments) << endl;
|
|
|
|
cmess1 << Dots::asSizet(" - Active AutoContacts",AutoContact::getAllocateds()-fixedSegments*2) << endl;
|
|
|
|
cmess1 << Dots::asSizet(" - AutoSegments" ,AutoSegment::getAllocateds()) << endl;
|
|
|
|
cmess1 << Dots::asSizet(" - AutoContacts" ,AutoContact::getAllocateds()) << endl;
|
|
|
|
cmess1 << Dots::asSizet(" - Same Layer doglegs" ,sameLayerDoglegs) << endl;
|
|
|
|
|
|
|
|
//for ( Net* net : _cell->getNets() ) _saveNet( net );
|
|
|
|
|
|
|
|
cdebug_tabw(145,-1);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (_state < EngineGutted ) {
|
|
|
|
cdebug_log(145,0) << "Gutting Anabatic." << endl;
|
|
|
|
_state = EngineGutted;
|
|
|
|
_flags |= Flags::DestroyBaseContact;
|
2016-05-26 11:30:03 -05:00
|
|
|
|
2016-07-18 07:48:37 -05:00
|
|
|
_destroyAutoSegments();
|
|
|
|
_destroyAutoContacts();
|
|
|
|
|
|
|
|
_flags |= Flags::DestroyGCell;
|
|
|
|
|
|
|
|
for ( GCell* gcell : _gcells ) gcell->_destroyEdges();
|
|
|
|
for ( GCell* gcell : _gcells ) gcell->destroy();
|
|
|
|
_gcells.clear();
|
|
|
|
_ovEdges.clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
Session::close();
|
2016-05-26 11:30:03 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-05-23 09:15:25 -05:00
|
|
|
Configuration* AnabaticEngine::getConfiguration ()
|
|
|
|
{ return _configuration; }
|
|
|
|
|
|
|
|
|
Anabatic transient commit 18. Port of Kite (Katana), Yeah, Baby! Yeah!
* Bug: In Hurricane, in StaticObservable::getObserver(), if the slot
pointer is NULL, do not try to access the owner. Returns NULL, so
the caller can be aware of the situation...
* Change: In Hurricane, in BreakpointWidget & ExceptionWidget some
cosmetic changes (fonts and window sizes).
* Bug: In Anabatic, In AutoHorizontal::getConstraints(), take into account
the constraints from the source AutoContact, as it holds the constraints
transmitted by the RoutingPads and sets up by propageConstraintsFromRp().
It is likely to be a bug affecting the original Katabatic as well.
* Change: In Anabatic, in RawGCellsUnder(), check that the segment is not
completly oustside the cell abutment box and truncate the coordinates
to the part that is inside. Use the "shrink" if we reach the east/north
border.
* Change: In Anabatic, in Configuration, no more decorator because we will
use a true derived relationship. Katana *derives* from *Anabatic* and do
not *decorate* it, so the Configuration can do the same. It also implies
that we directly create a Katana engine, not an Anabatic one.
* Change: In Anabatic, in Session, do not allow the opening of the Session
in a standalone fashion (with a static method). Instead it must be opened
using the relevant method of the Anabatic/Katana engine. This ensure we
are opening the right Session type.
* Change: In Anabatic, in AutoSegment_Aligneds() collection the seed segment
is not part of the collection by default, but will be included if the
Flags::WithSelf is set.
* Change: In Configuration, all the flags value are now defined in two steps.
Declared in the header and initialized in the module. This is to prevent
the fact that on some cases, in relation with the Python "extern C" part
modules, we need a true allocated variable. It was causing weird linking
problems.
A side effect is that they can no longer be used as entry is switches,
have to replace them by if/else.
* New: In Anabatic, new GCell::getNeighborAt() utility function.
* Bug: In Anabatic, in GCell::doGrid(), tag all the GCells of the grid with
the grid type... Back annote all the edges capacity (north & east) with
the reserved local capacity.
* New: Complete portage of Kite over Anabatic. The new engine is christened
"Katana" for Kite-Analogic. When it's capabilities and performances
will be on a part with Kite, it is to completly replace it (and take
back the "Kite" name). Preliminary tests seems to show that, contrary
to intuition (because built on a more complex/slower grid), it is even
slightly faster than Kite 8-).
2016-08-15 09:30:13 -05:00
|
|
|
Interval AnabaticEngine::getUSide ( Flags direction ) const
|
|
|
|
{
|
|
|
|
Interval side;
|
|
|
|
Box bBox ( getCell()->getBoundingBox() );
|
|
|
|
|
|
|
|
if (direction & Flags::Horizontal) side = Interval( bBox.getXMin(), bBox.getXMax() );
|
|
|
|
else if (direction & Flags::Vertical ) side = Interval( bBox.getYMin(), bBox.getYMax() );
|
|
|
|
else {
|
|
|
|
cerr << Error( "AnabaticEngine::getUSide(): Unknown direction flag \"%i\""
|
|
|
|
, getString(direction).c_str() ) << endl;
|
|
|
|
}
|
|
|
|
return side;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-05-26 06:56:16 -05:00
|
|
|
int AnabaticEngine::getCapacity ( Interval span, Flags flags ) const
|
|
|
|
{
|
|
|
|
int capacity = 0;
|
|
|
|
Box ab = getCell()->getAbutmentBox();
|
|
|
|
RoutingGauge* rg = _configuration->getRoutingGauge();
|
|
|
|
|
2016-05-26 11:54:57 -05:00
|
|
|
span.inflate( 0, -1 );
|
|
|
|
if (span.isEmpty()) return 0;
|
|
|
|
|
2016-05-26 06:56:16 -05:00
|
|
|
const vector<RoutingLayerGauge*>& layerGauges = rg->getLayerGauges();
|
|
|
|
for ( size_t depth=0 ; depth <= _configuration->getAllowedDepth() ; ++depth ) {
|
|
|
|
if (layerGauges[depth]->getType() != Constant::Default) continue;
|
|
|
|
|
|
|
|
if (flags & Flags::Horizontal) {
|
|
|
|
if (layerGauges[depth]->getDirection() != Constant::Horizontal) continue;
|
|
|
|
capacity += layerGauges[depth]->getTrackNumber( span.getVMin() - ab.getYMin()
|
|
|
|
, span.getVMax() - ab.getYMin() );
|
2016-06-17 06:09:34 -05:00
|
|
|
//cdebug_log(110,0) << "Horizontal edge capacity:" << capacity << endl;
|
2016-05-26 06:56:16 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
if (flags & Flags::Vertical) {
|
|
|
|
if (layerGauges[depth]->getDirection() != Constant::Vertical) continue;
|
|
|
|
capacity += layerGauges[depth]->getTrackNumber( span.getVMin() - ab.getXMin()
|
|
|
|
, span.getVMax() - ab.getXMin() );
|
2016-06-17 06:09:34 -05:00
|
|
|
//cdebug_log(110,0) << "Vertical edge capacity:" << capacity << endl;
|
2016-05-26 06:56:16 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return capacity;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
Anabatic transient commit 18. Port of Kite (Katana), Yeah, Baby! Yeah!
* Bug: In Hurricane, in StaticObservable::getObserver(), if the slot
pointer is NULL, do not try to access the owner. Returns NULL, so
the caller can be aware of the situation...
* Change: In Hurricane, in BreakpointWidget & ExceptionWidget some
cosmetic changes (fonts and window sizes).
* Bug: In Anabatic, In AutoHorizontal::getConstraints(), take into account
the constraints from the source AutoContact, as it holds the constraints
transmitted by the RoutingPads and sets up by propageConstraintsFromRp().
It is likely to be a bug affecting the original Katabatic as well.
* Change: In Anabatic, in RawGCellsUnder(), check that the segment is not
completly oustside the cell abutment box and truncate the coordinates
to the part that is inside. Use the "shrink" if we reach the east/north
border.
* Change: In Anabatic, in Configuration, no more decorator because we will
use a true derived relationship. Katana *derives* from *Anabatic* and do
not *decorate* it, so the Configuration can do the same. It also implies
that we directly create a Katana engine, not an Anabatic one.
* Change: In Anabatic, in Session, do not allow the opening of the Session
in a standalone fashion (with a static method). Instead it must be opened
using the relevant method of the Anabatic/Katana engine. This ensure we
are opening the right Session type.
* Change: In Anabatic, in AutoSegment_Aligneds() collection the seed segment
is not part of the collection by default, but will be included if the
Flags::WithSelf is set.
* Change: In Configuration, all the flags value are now defined in two steps.
Declared in the header and initialized in the module. This is to prevent
the fact that on some cases, in relation with the Python "extern C" part
modules, we need a true allocated variable. It was causing weird linking
problems.
A side effect is that they can no longer be used as entry is switches,
have to replace them by if/else.
* New: In Anabatic, new GCell::getNeighborAt() utility function.
* Bug: In Anabatic, in GCell::doGrid(), tag all the GCells of the grid with
the grid type... Back annote all the edges capacity (north & east) with
the reserved local capacity.
* New: Complete portage of Kite over Anabatic. The new engine is christened
"Katana" for Kite-Analogic. When it's capabilities and performances
will be on a part with Kite, it is to completly replace it (and take
back the "Kite" name). Preliminary tests seems to show that, contrary
to intuition (because built on a more complex/slower grid), it is even
slightly faster than Kite 8-).
2016-08-15 09:30:13 -05:00
|
|
|
void AnabaticEngine::openSession ()
|
|
|
|
{ Session::_open(this); }
|
|
|
|
|
|
|
|
|
2016-05-26 11:30:03 -05:00
|
|
|
void AnabaticEngine::reset ()
|
2016-05-23 09:15:25 -05:00
|
|
|
{
|
2016-07-18 07:48:37 -05:00
|
|
|
_gutAnabatic();
|
|
|
|
_flags.reset( Flags::DestroyMask );
|
|
|
|
_state = EngineCreation;
|
2016-05-26 11:30:03 -05:00
|
|
|
|
|
|
|
UpdateSession::open();
|
|
|
|
GCell::create( this );
|
|
|
|
UpdateSession::close();
|
2016-05-23 09:15:25 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-07-31 11:43:44 -05:00
|
|
|
void AnabaticEngine::setupNetDatas ()
|
|
|
|
{
|
|
|
|
size_t oindex = _netOrdering.size();
|
|
|
|
for ( Net* net : _cell->getNets() ) {
|
|
|
|
if (_netDatas.find(net->getId()) != _netDatas.end()) continue;
|
|
|
|
_netOrdering.push_back( new NetData(net) );
|
|
|
|
}
|
|
|
|
|
|
|
|
for ( ; oindex < _netOrdering.size() ; ++oindex ) {
|
|
|
|
_netDatas.insert( make_pair( _netOrdering[oindex]->getNet()->getId()
|
|
|
|
, _netOrdering[oindex] ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
sort( _netOrdering.begin(), _netOrdering.end(), SparsityOrder() );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-08-18 04:59:19 -05:00
|
|
|
void AnabaticEngine::updateMatrix()
|
|
|
|
{
|
|
|
|
_matrix.setCell( getCell(), Session::getSliceHeight() );
|
Added support for 2-Metal block routing in Anabatic & Katana.
* New: In AnabaticEngine::invalidateRoutingPads() this method is a temporary
workaround for a Hurricane problems. When an instance is moved, the
RoutingPads that use it must be moved accordingly, but they are not
invalidated so they stay in the wrong QuadTree.
New method ::_resizeMatrix() to be called when the associated Cell
is resized.
* Bug: In AutoHorizontal::getConstraints() and AutoVertical::getConstraints(),
the *target* constraints where never merged.
* Change: In AutoHorizontal::getCells() and AutoVertical::getGCells(),
now return a boolean to tell if it was ok (must not encounter a NULL
GCell while progessing from source to target).
* New: In Anabatic::Configuration and Anabatic:Session, create new methods:
- getDHorizontalLayer()
- getDhorizontalDepth()
- getDHorizontalWidth()
- getDHorizontalPitch()
And so on for Vertical and Contact.
They supply depth-independant informations about the H/V layers to
build the initial detailed routing.
The AutoSegment::create() methods have been modificated accordingly.
* New: In Anabatic::GCell, add two new types "StdCellRow" and "ChannelRow"
for implementing 2-Metal blocks.
Rename the GCell::setXY() method in GCell::setSouthWestCorner(),
move the contents of GCell::updateContactsPosition() into it and
suppress it.
WARNING: In case of a GCell shrink this may cause problems. But for
now we only expand...
New method GCell::getNetCount() to count the number of Net going
though the GCell.
* Change: In Anabatic::Edge, add specific support for capacity of 2-Metal
routing channels.
* Change: In Anabatic::Dijsktra various methods, replace the "gcell->isMatrix()"
calls by "not gcell->isAnalog()". Add more check so that the methods
pertaining to the analog routing (GRData) are not called in digital
mode.
* New: In Anabatic::Dijkstra::materialize(), add support for 2-Metal specific
cases. That is, always break in case of vertical pass-through or
U-turn. The global routing must always be broken in H-Channel.
* New: In Anabatic::GCell & Anabatic::Edge, make use of the Session mechanism
to ensure the revalidation. The "::revalidate()" method is then moved
as "::materialize()" (overload of Go) and "::_invalidate()" becomes
"::invalidate()"
* Change: In LoadGlobalRouting, cosmetic rename of SortHkByX in SortHookByX.
* New: In GCellTopology, added support for building 2-Metal topologies.
* ForkStack is now an object attribute as many methods do need it.
* To push segments/hook on the stack, a new method "push()" is
available. Perform NULL and fromHook checking. Can also setup
_southWestContact or _northEastContact if it is the "from" edge.
* N/S/E/W edges are now vector as in digital channel mode there
can be more than one.
* Added build topological build methods:
- doRp_2m_Access() RoutingPad stem access.
- _do_2m_1G_1M1() North or south access.
- _do_2m_2G_1M1() North AND south access.
- _do_2m_xG() H-Channel routing.
* New: In Anabatic::Matrix, new ::resize() function, as Cell can be resizeds.
* New: In Anabatic::Vertex, new static method ::getValueString() for a
friendly text rendering.
* New: In Katana::DigitalDistance, support for channel routing.
* Change: In KatanaEngine::digitalSetup() and KatanaEngine::runGlobalrouter(),
for channel routing, calls to setupPowerRails() and
protectRoutingPads() must be called after the core block has
been fully dimensionned.
::runGlobalrouter() contains the code tasked with the grid creation
and channel sizing.
* New: In KatanaEngine: Added support for core block, for 2-Metal routing.
May be expanded for over-the-cell routing in the future.
Added methods :
- isDigitalMode()
- isAnalogMode()
- isMixedMode()
- isChannelMode()
- getBlock() / addBlock()
- setupChannelMode()
- createChannel()
* New: In Katana, new class Block to manage core blocks and perform
channel routing.
* New: In Katana::Session, new convenience method "isOpen()".
2017-08-18 16:56:23 -05:00
|
|
|
for ( GCell* gcell : _gcells ) _updateLookup( gcell );
|
2016-08-18 04:59:19 -05:00
|
|
|
}
|
|
|
|
|
Basic support for FreePDK 45 completed.
* New: In Commons, inspector support for std::pair<T,U>.
* New: In Hurricane::Layer, ContactLayer & ViaLayer, support for non
square VIAs. The hole (cut) remains square, but the various metal
extensions can now be different in X and Y. The ::getEnclosure()
method now takes a flag EnclosureH / EnclosureV.
* New: In Hurricane::DbU, inspector support for:
std::pair<DbU::Unit,DbU::Unit>
std::array<DbU::Unit,3>
Must be defined here as DbU do not exists yet in Commons.h
* Bug: In Hurricane::Interval::getSize(), when the interval is "full span",
do not return the difference between min and max, but directly DbU::Max.
(the previous result was -1 !)
* New: In CRL Core Python/Technology.py, support for non square VIAs in
the configuration files. Applied to FreePDK 45.
* New: In CRL::RoutingGauge, added a "symbolic" flag to tell if a gauge
is for symbolic layout or not. Exported to Python.
* New: In Anabatic::AutoHorizontal::updatePosition(), differentiated
computation for soure or target taking account of the VIA extension
in the right segment metal (due to non-square VIAs).
* Change: In Anabatic::AutoHorizontal::_makeDogleg(), the dogleg is
UP for HV gauges and DOWN for VH.
* New: In Anabatic::AutoSegment::_initialize(), create a cache of the
various extension length for each layer (viaToTop, viaToBottom,
viaToSame).
New implementation of getExtensionCap() using the previous cached
extension table. See updatePositions().
New static functions to access the extension cache in the header:
getViaTotopCap() ...
* Change: In Anabatic::AutoSegment, in various update methods, updateOrient()
must always be called *before* updatePositions() as extensions are
dependant on source/target.
* New: In Anabatic::AutoSegment::getEndAxes() compute the position of the
first source and last target position (center/axes) on an *aligned*
set of segments.
* New: In Anabatic::AutoSegment, add a new state flag SegAxisFixed to
signal segments that can be put on only one track. Specific case
to VH gauge for a M1 vertical terminal with a M2 vertical segment.
The M2 is effectively bound to the M1 axis position.
* Bug: In Anabatic::NetBuilderVH::_do_xG_xM1_xM3(), in case of E/W global
and only one RoutingPad the connexion to the RoutingPad was duplicated.
It was valid, but totally stupid.
* Bug: In Anabatic::Session::_canonize(), for an aligned segment set,
intersect the user constraints from all segments instead of only
considering the canonical one.
Issue a warning about too tight constraints only for symbolic
gauges. It may be correct for the real ones.
* New: In Katata::DataNegociate::update(), more accurate computation
of the perpandicular free interval. Use segment extension cap
calculation. Create a special case for fixed axis segments allowing
them to find alternative free interval, try under source and under
target as they are likely to be draggable segments.
* Change: In Katana::Manipulator::relax(), use the extension cap value
to compute the axis of the perpandicular segemnts.
* Change: In Katana::Manipulator::moveUp(), now move up the whole set
of aligned segments instead of just the canonical one.
* Change: In Katana::NegociateWindow::loadRoutingPads(), more accurate
TrackMarkers insertions for fixed terminals.
* New: In Katana::RoutingEvent::Key::Compare::operator(), segments with
fixed axis are processed prior to any others.
* New: In Katana::RoutingEventLoop, store segment pointers instead of
ids to generate more accurate error messages.
* Change: In Katana::RoutingPlane::create(), perform local track
assignment only for HV gauges.
* Change: In Katana::SegmentFsm::_slackenLocal(), add a "dragMinimize"
step in the automaton. Mutliple states transitions can occurs in
a row if an action fails.
* New: In Katana::Session::_toIntervalAxis(), normalize interval
bounds so they are on track positions (by shrinking the interval).
* Bug: In Katana::TrackMarker CTOR, the weigh computation was wrong.
2018-02-17 13:27:38 -06:00
|
|
|
|
Anabatic transient commit 10. Ripup & reroute support in Dijsktra.
* New: In Anabatic:
- In AnabaticEngine, keep track of overflowed edges.
- In AnabaticEngine, getNetsFromedge() to lookup all nets going
through an Edge.
- In Configuration, read the Kite "reserved local" parameter to
decrease the Edge capacity (it's a guessing of the cost of the
local routing).
- In Edge, add an attribute to know if there is an associated
segment of the current net (set by Dijkstra::_traceback()).
Transparently manage the overflowed edges.
- In GCell_Edges, correct a filtering bug when not all sides are
selecteds.
- New GCell::getEdgeTo() to find the edge between two adjacent
GCells.
- New GCell::unrefContact() to automatically removes global contacts
no longer used by any global segments (used during the ripup
step).
- In Dijkstra::load(), now able to "reload" and already partially
or completly routed net (look for Contact of "gcontact" layer
and their attached segments).
- In Dijkstra, keep the last net loaded until the next one is.
Put the cleanup operations in an isolated function "_cleanup()".
- In Dijkstra::_selectFirstsource() and run(), load first source
component made of multiple vertexes.
- In Dijkstra::_trackback(), link the Net segments to the Edges.
- New Dijkstra::ripup(), Dijkstra::_propagateRipup() to perform
the ripup of one edge of a Net (must be loaded in Dijkstra first).
Dijkstra::_tagConnecteds() setup the connexId of a set of Vertexes
- that are connecteds through edges *with* segments.
- In GraphicAnabaticengine & GlobalRoute.cpp, embryo of a global
routing tool with ripup & reroute.
2016-06-26 07:32:32 -05:00
|
|
|
size_t AnabaticEngine::getNetsFromEdge ( const Edge* edge, NetSet& nets )
|
|
|
|
{
|
|
|
|
size_t count = 0;
|
|
|
|
GCell* source = edge->getSource();
|
|
|
|
GCell* target = edge->getTarget();
|
|
|
|
const vector<Contact*>& contacts = source->getGContacts();
|
|
|
|
|
|
|
|
for ( Contact* contact : contacts ) {
|
|
|
|
for ( Component* component : contact->getSlaveComponents() ) {
|
|
|
|
if (edge->isHorizontal()) {
|
|
|
|
Horizontal* horizontal = dynamic_cast<Horizontal*>( component );
|
|
|
|
if (horizontal
|
|
|
|
and (horizontal->getSource() == contact)
|
|
|
|
and (target->hasGContact(dynamic_cast<Contact*>(horizontal->getTarget())))) {
|
|
|
|
nets.insert( horizontal->getNet() );
|
|
|
|
++count;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (edge->isVertical()) {
|
|
|
|
Vertical* vertical = dynamic_cast<Vertical*>( component );
|
|
|
|
if (vertical
|
|
|
|
and (vertical->getSource() == contact)
|
|
|
|
and (target->hasGContact(dynamic_cast<Contact*>(vertical->getTarget())))) {
|
|
|
|
nets.insert( vertical->getNet() );
|
|
|
|
++count;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return count;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
Replace "unsigned int" by "Flags" in all AutoSegments collections.
* Change: In Anabatic::AutoSegments collections, change the type of all
the flags that where in "unsigned int" (32 bits) to Flags (uint64_t)
as there is now more than 32 flags for functions.
* New: In Ababatic::Constants, added new flag Flags::WithPerpands, which
makes the number of flags tip over 32 bits, thus making mandatory
to uses Flags and not unsigned int.
* New: In Anabatic::AutoSegments_Perpandiculars, manage a new flag
Flags::WithDoglegs to allow to propagate through global segments that
are connecteds via doglegs on local segments. Meaning that there is
a good chance that they could be aligned.
Slighly change the way we propagate on aligned segments: no longer
check for VTee or HTee, but only for same direction and layer as
master.
* New: In Anabatic & Katana, replace all the "int", "long" and their
variants by the less implementation ambiguous "int32_t", "int64_t"
(and variant). This should help to better detect bit trucation in
flags.
Use the type to give a hint about the flags kind:
- Type "Flags", for flags shared among Anabatic & Katana
functions/methods (may also appear in some objects states).
- Type "uint32_t" for flags belonging to an object internal
state of from Hurricane functions flags (those should be
grouped in a Flag subclass in a perfect world).
2017-05-16 07:53:33 -05:00
|
|
|
NetData* AnabaticEngine::getNetData ( Net* net, Flags flags )
|
2016-07-21 17:14:17 -05:00
|
|
|
{
|
2016-07-31 11:43:44 -05:00
|
|
|
NetData* data = NULL;
|
|
|
|
NetDatas::iterator idata = _netDatas.find( net->getId() );
|
|
|
|
if (idata == _netDatas.end()) {
|
|
|
|
data = new NetData( net );
|
|
|
|
_netDatas.insert( make_pair(net->getId(),data) );
|
|
|
|
_netOrdering.push_back( data );
|
|
|
|
// cerr << Bug( "AnabaticEngine::getNetData() - %s is missing in NetDatas table."
|
|
|
|
// , getString(net->getName()).c_str()
|
|
|
|
// ) << endl;
|
|
|
|
// return NULL;
|
|
|
|
} else
|
|
|
|
data = idata->second;
|
|
|
|
|
|
|
|
if ((flags & Flags::Create) and not data->getNetRoutingState()) {
|
|
|
|
data->setNetRoutingState( NetRoutingExtension::create(net) );
|
2016-07-21 17:14:17 -05:00
|
|
|
}
|
|
|
|
|
2016-07-31 11:43:44 -05:00
|
|
|
return data;
|
2016-07-21 17:14:17 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-07-30 05:15:49 -05:00
|
|
|
Contact* AnabaticEngine::breakAt ( Segment* segment, GCell* breakGCell )
|
|
|
|
{
|
|
|
|
size_t i = 0;
|
|
|
|
GCellsUnder gcells ( new RawGCellsUnder(this,segment) );
|
|
|
|
for ( ; i<gcells->size() ; ++i ) {
|
|
|
|
if (gcells->gcellAt(i) == breakGCell) break;
|
|
|
|
}
|
|
|
|
|
|
|
|
Contact* breakContact = breakGCell->getGContact( segment->getNet() );
|
|
|
|
|
|
|
|
if (i == gcells->size()) {
|
|
|
|
cerr << Error( "AnabaticEngine::breakAt(): %s is *not* over %s."
|
|
|
|
, getString(segment).c_str()
|
|
|
|
, getString(breakGCell).c_str()
|
|
|
|
) << endl;
|
|
|
|
return breakContact;
|
|
|
|
}
|
|
|
|
|
|
|
|
Component* targetContact = segment->getTarget();
|
|
|
|
segment->getTargetHook()->detach();
|
|
|
|
segment->getTargetHook()->attach( breakContact->getBodyHook() );
|
|
|
|
|
|
|
|
Segment* splitted = NULL;
|
|
|
|
Horizontal* horizontal = dynamic_cast<Horizontal*>(segment);
|
|
|
|
if (horizontal) {
|
|
|
|
splitted = Horizontal::create( breakContact
|
|
|
|
, targetContact
|
|
|
|
, getConfiguration()->getGHorizontalLayer()
|
|
|
|
, horizontal->getY()
|
|
|
|
, DbU::fromLambda(2.0)
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
Vertical* vertical = dynamic_cast<Vertical*>(segment);
|
|
|
|
if (vertical) {
|
|
|
|
splitted = Vertical::create( breakContact
|
|
|
|
, targetContact
|
|
|
|
, getConfiguration()->getGVerticalLayer()
|
|
|
|
, vertical->getX()
|
|
|
|
, DbU::fromLambda(2.0)
|
|
|
|
);
|
|
|
|
} else
|
|
|
|
return breakContact;
|
|
|
|
}
|
|
|
|
|
|
|
|
for ( ; i<gcells->size()-1 ; ++i ) gcells->edgeAt(i)->replace( segment, splitted );
|
|
|
|
|
|
|
|
return breakContact;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool AnabaticEngine::unify ( Contact* contact )
|
|
|
|
{
|
|
|
|
size_t hCount = 0;
|
|
|
|
size_t vCount = 0;
|
|
|
|
Horizontal* horizontals[2];
|
|
|
|
Vertical* verticals [2];
|
|
|
|
|
|
|
|
for ( Component* slave : contact->getSlaveComponents() ) {
|
|
|
|
Horizontal* h = dynamic_cast<Horizontal*>( slave );
|
|
|
|
if (h) {
|
|
|
|
if (vCount or (hCount > 1)) return false;
|
|
|
|
horizontals[hCount++] = h;
|
|
|
|
} else {
|
|
|
|
Vertical* v = dynamic_cast<Vertical*>( slave );
|
|
|
|
if (v) {
|
|
|
|
if (hCount or (vCount > 1)) return false;
|
|
|
|
verticals[vCount++] = v;
|
|
|
|
} else {
|
|
|
|
// Something else depends on this contact.
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (hCount == 2) {
|
|
|
|
if (horizontals[0]->getTarget() != contact) std::swap( horizontals[0], horizontals[1] );
|
|
|
|
Interval constraints ( false );
|
|
|
|
GCellsUnder gcells0 = getGCellsUnder( horizontals[0] );
|
|
|
|
if (not gcells0->empty()) {
|
|
|
|
for ( size_t i=0 ; i<gcells0->size() ; ++i )
|
|
|
|
constraints.intersection( gcells0->gcellAt(i)->getSide(Flags::Vertical) );
|
|
|
|
}
|
|
|
|
|
|
|
|
GCellsUnder gcells1 = getGCellsUnder( horizontals[1] );
|
|
|
|
if (not gcells1->empty()) {
|
|
|
|
for ( size_t i=0 ; i<gcells1->size() ; ++i ) {
|
|
|
|
constraints.intersection( gcells1->gcellAt(i)->getSide(Flags::Vertical) );
|
|
|
|
if (constraints.isEmpty()) return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (not gcells1->empty()) {
|
|
|
|
for ( size_t i=0 ; i<gcells1->size()-1 ; ++i )
|
|
|
|
gcells1->edgeAt(i)->replace( horizontals[1], horizontals[0] );
|
|
|
|
}
|
|
|
|
|
|
|
|
Component* target = horizontals[1]->getTarget();
|
|
|
|
horizontals[1]->destroy();
|
|
|
|
horizontals[0]->getTargetHook()->detach();
|
|
|
|
horizontals[0]->getTargetHook()->attach( target->getBodyHook() );
|
|
|
|
}
|
|
|
|
|
|
|
|
if (vCount == 2) {
|
|
|
|
if (verticals[0]->getTarget() != contact) std::swap( verticals[0], verticals[1] );
|
|
|
|
Interval constraints ( false );
|
|
|
|
GCellsUnder gcells0 = getGCellsUnder( verticals[0] );
|
|
|
|
if (not gcells0->empty()) {
|
|
|
|
for ( size_t i=0 ; i<gcells0->size() ; ++i )
|
|
|
|
constraints.intersection( gcells0->gcellAt(i)->getSide(Flags::Horizontal) );
|
|
|
|
}
|
|
|
|
|
|
|
|
GCellsUnder gcells1 = getGCellsUnder( verticals[1] );
|
|
|
|
if (not gcells1->empty()) {
|
|
|
|
for ( size_t i=0 ; i<gcells1->size() ; ++i ) {
|
|
|
|
constraints.intersection( gcells1->gcellAt(i)->getSide(Flags::Horizontal) );
|
|
|
|
if (constraints.isEmpty()) return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (not gcells1->empty()) {
|
|
|
|
for ( size_t i=0 ; i<gcells1->size()-1 ; ++i )
|
|
|
|
gcells1->edgeAt(i)->replace( verticals[1], verticals[0] );
|
|
|
|
}
|
|
|
|
|
|
|
|
Component* target = verticals[1]->getTarget();
|
|
|
|
verticals[1]->destroy();
|
|
|
|
verticals[0]->getTargetHook()->detach();
|
|
|
|
verticals[0]->getTargetHook()->attach( target->getBodyHook() );
|
|
|
|
}
|
|
|
|
|
|
|
|
getGCellUnder( contact->getPosition() )->unrefContact( contact );
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void AnabaticEngine::ripup ( Segment* seed, Flags flags )
|
|
|
|
{
|
2016-07-31 11:43:44 -05:00
|
|
|
Net* net = seed->getNet();
|
|
|
|
|
|
|
|
DebugSession::open( net, 112, 120 );
|
2016-07-30 05:15:49 -05:00
|
|
|
cdebug_log(112,1) << "AnabaticEngine::ripup(): " << seed << endl;
|
|
|
|
|
|
|
|
Contact* end0 = NULL;
|
|
|
|
Contact* end1 = NULL;
|
|
|
|
|
|
|
|
vector<Segment*> ripups;
|
|
|
|
ripups.push_back( seed );
|
|
|
|
|
|
|
|
vector< pair<Segment*,Component*> > stack;
|
|
|
|
if (flags & Flags::Propagate) {
|
|
|
|
stack.push_back( make_pair(seed,seed->getSource()) );
|
|
|
|
stack.push_back( make_pair(seed,seed->getTarget()) );
|
|
|
|
}
|
|
|
|
|
|
|
|
while ( not stack.empty() ) {
|
|
|
|
Contact* contact = dynamic_cast<Contact*>( stack.back().second );
|
|
|
|
Segment* from = stack.back().first;
|
|
|
|
stack.pop_back();
|
|
|
|
if (not contact) continue;
|
|
|
|
|
|
|
|
Segment* connected = NULL;
|
|
|
|
size_t slaveCount = 0;
|
|
|
|
for ( Hook* hook : contact->getBodyHook()->getHooks() ) {
|
|
|
|
Component* linked = hook->getComponent();
|
|
|
|
if ((linked == contact) or (linked == from)) continue;
|
|
|
|
|
|
|
|
if (dynamic_cast<RoutingPad*>(linked)) { ++slaveCount; continue; }
|
|
|
|
|
|
|
|
connected = dynamic_cast<Segment*>( linked );
|
|
|
|
if (connected) ++slaveCount;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((slaveCount == 1) and (connected)) {
|
|
|
|
stack .push_back( make_pair(connected,connected->getOppositeAnchor(contact)) );
|
|
|
|
ripups.push_back( connected );
|
|
|
|
} else {
|
|
|
|
if (not end0) {
|
|
|
|
end0 = contact;
|
|
|
|
cdebug_log(112,0) << "end0:" << contact << endl;
|
|
|
|
} else {
|
|
|
|
end1 = contact;
|
|
|
|
cdebug_log(112,0) << "end1:" << contact << endl;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for ( Segment* segment : ripups ) {
|
|
|
|
cdebug_log(112,1) << "| Destroy:" << segment << endl;
|
|
|
|
|
|
|
|
GCellsUnder gcells = getGCellsUnder( segment );
|
|
|
|
if (not gcells->empty()) {
|
|
|
|
for ( size_t i=0 ; i<gcells->size()-1 ; ++i )
|
|
|
|
gcells->edgeAt(i)->remove( segment );
|
|
|
|
}
|
|
|
|
|
|
|
|
Contact* source = dynamic_cast<Contact*>( segment->getSource() );
|
|
|
|
Contact* target = dynamic_cast<Contact*>( segment->getTarget() );
|
2016-08-10 16:48:06 -05:00
|
|
|
segment->getSourceHook()->detach();
|
|
|
|
segment->getTargetHook()->detach();
|
2016-07-30 05:15:49 -05:00
|
|
|
segment->destroy();
|
|
|
|
bool deletedSource = gcells->gcellAt( 0 )->unrefContact( source );
|
|
|
|
bool deletedTarget = gcells->gcellAt( gcells->size()-1 )->unrefContact( target );
|
|
|
|
|
|
|
|
if (deletedSource) {
|
|
|
|
if (source == end0) end0 = NULL;
|
|
|
|
if (source == end1) end1 = NULL;
|
|
|
|
}
|
|
|
|
if (deletedTarget) {
|
|
|
|
if (target == end0) end0 = NULL;
|
|
|
|
if (target == end1) end1 = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
cdebug_tabw(112,-1);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (end0) unify( end0 );
|
|
|
|
if (end1) unify( end1 );
|
|
|
|
|
2016-07-31 11:43:44 -05:00
|
|
|
getNetData( net )->setGlobalRouted( false );
|
|
|
|
|
2016-08-10 16:48:06 -05:00
|
|
|
cdebug_tabw(112,-1);
|
2016-07-30 05:15:49 -05:00
|
|
|
DebugSession::close();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-07-18 07:48:37 -05:00
|
|
|
void AnabaticEngine::cleanupGlobal ()
|
|
|
|
{
|
|
|
|
UpdateSession::open();
|
|
|
|
for ( GCell* gcell : _gcells ) gcell->cleanupGlobal();
|
|
|
|
UpdateSession::close();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
Replace "unsigned int" by "Flags" in all AutoSegments collections.
* Change: In Anabatic::AutoSegments collections, change the type of all
the flags that where in "unsigned int" (32 bits) to Flags (uint64_t)
as there is now more than 32 flags for functions.
* New: In Ababatic::Constants, added new flag Flags::WithPerpands, which
makes the number of flags tip over 32 bits, thus making mandatory
to uses Flags and not unsigned int.
* New: In Anabatic::AutoSegments_Perpandiculars, manage a new flag
Flags::WithDoglegs to allow to propagate through global segments that
are connecteds via doglegs on local segments. Meaning that there is
a good chance that they could be aligned.
Slighly change the way we propagate on aligned segments: no longer
check for VTee or HTee, but only for same direction and layer as
master.
* New: In Anabatic & Katana, replace all the "int", "long" and their
variants by the less implementation ambiguous "int32_t", "int64_t"
(and variant). This should help to better detect bit trucation in
flags.
Use the type to give a hint about the flags kind:
- Type "Flags", for flags shared among Anabatic & Katana
functions/methods (may also appear in some objects states).
- Type "uint32_t" for flags belonging to an object internal
state of from Hurricane functions flags (those should be
grouped in a Flag subclass in a perfect world).
2017-05-16 07:53:33 -05:00
|
|
|
void AnabaticEngine::loadGlobalRouting ( uint32_t method )
|
2016-07-18 07:48:37 -05:00
|
|
|
{
|
|
|
|
if (_state < EngineGlobalLoaded)
|
|
|
|
throw Error ("AnabaticEngine::loadGlobalRouting() : global routing not present yet.");
|
|
|
|
|
|
|
|
if (_state > EngineGlobalLoaded)
|
|
|
|
throw Error ("AnabaticEngine::loadGlobalRouting() : global routing already loaded.");
|
|
|
|
|
Replace "unsigned int" by "Flags" in all AutoSegments collections.
* Change: In Anabatic::AutoSegments collections, change the type of all
the flags that where in "unsigned int" (32 bits) to Flags (uint64_t)
as there is now more than 32 flags for functions.
* New: In Ababatic::Constants, added new flag Flags::WithPerpands, which
makes the number of flags tip over 32 bits, thus making mandatory
to uses Flags and not unsigned int.
* New: In Anabatic::AutoSegments_Perpandiculars, manage a new flag
Flags::WithDoglegs to allow to propagate through global segments that
are connecteds via doglegs on local segments. Meaning that there is
a good chance that they could be aligned.
Slighly change the way we propagate on aligned segments: no longer
check for VTee or HTee, but only for same direction and layer as
master.
* New: In Anabatic & Katana, replace all the "int", "long" and their
variants by the less implementation ambiguous "int32_t", "int64_t"
(and variant). This should help to better detect bit trucation in
flags.
Use the type to give a hint about the flags kind:
- Type "Flags", for flags shared among Anabatic & Katana
functions/methods (may also appear in some objects states).
- Type "uint32_t" for flags belonging to an object internal
state of from Hurricane functions flags (those should be
grouped in a Flag subclass in a perfect world).
2017-05-16 07:53:33 -05:00
|
|
|
if (method == EngineLoadGrByNet ) { _loadGrByNet(); }
|
|
|
|
else {
|
|
|
|
throw Error( badMethod, "Anabatic::loadGlobalRouting()", method, getString(_cell).c_str() );
|
2016-07-18 07:48:37 -05:00
|
|
|
}
|
|
|
|
cleanupGlobal();
|
Basic support for FreePDK 45 completed.
* New: In Commons, inspector support for std::pair<T,U>.
* New: In Hurricane::Layer, ContactLayer & ViaLayer, support for non
square VIAs. The hole (cut) remains square, but the various metal
extensions can now be different in X and Y. The ::getEnclosure()
method now takes a flag EnclosureH / EnclosureV.
* New: In Hurricane::DbU, inspector support for:
std::pair<DbU::Unit,DbU::Unit>
std::array<DbU::Unit,3>
Must be defined here as DbU do not exists yet in Commons.h
* Bug: In Hurricane::Interval::getSize(), when the interval is "full span",
do not return the difference between min and max, but directly DbU::Max.
(the previous result was -1 !)
* New: In CRL Core Python/Technology.py, support for non square VIAs in
the configuration files. Applied to FreePDK 45.
* New: In CRL::RoutingGauge, added a "symbolic" flag to tell if a gauge
is for symbolic layout or not. Exported to Python.
* New: In Anabatic::AutoHorizontal::updatePosition(), differentiated
computation for soure or target taking account of the VIA extension
in the right segment metal (due to non-square VIAs).
* Change: In Anabatic::AutoHorizontal::_makeDogleg(), the dogleg is
UP for HV gauges and DOWN for VH.
* New: In Anabatic::AutoSegment::_initialize(), create a cache of the
various extension length for each layer (viaToTop, viaToBottom,
viaToSame).
New implementation of getExtensionCap() using the previous cached
extension table. See updatePositions().
New static functions to access the extension cache in the header:
getViaTotopCap() ...
* Change: In Anabatic::AutoSegment, in various update methods, updateOrient()
must always be called *before* updatePositions() as extensions are
dependant on source/target.
* New: In Anabatic::AutoSegment::getEndAxes() compute the position of the
first source and last target position (center/axes) on an *aligned*
set of segments.
* New: In Anabatic::AutoSegment, add a new state flag SegAxisFixed to
signal segments that can be put on only one track. Specific case
to VH gauge for a M1 vertical terminal with a M2 vertical segment.
The M2 is effectively bound to the M1 axis position.
* Bug: In Anabatic::NetBuilderVH::_do_xG_xM1_xM3(), in case of E/W global
and only one RoutingPad the connexion to the RoutingPad was duplicated.
It was valid, but totally stupid.
* Bug: In Anabatic::Session::_canonize(), for an aligned segment set,
intersect the user constraints from all segments instead of only
considering the canonical one.
Issue a warning about too tight constraints only for symbolic
gauges. It may be correct for the real ones.
* New: In Katata::DataNegociate::update(), more accurate computation
of the perpandicular free interval. Use segment extension cap
calculation. Create a special case for fixed axis segments allowing
them to find alternative free interval, try under source and under
target as they are likely to be draggable segments.
* Change: In Katana::Manipulator::relax(), use the extension cap value
to compute the axis of the perpandicular segemnts.
* Change: In Katana::Manipulator::moveUp(), now move up the whole set
of aligned segments instead of just the canonical one.
* Change: In Katana::NegociateWindow::loadRoutingPads(), more accurate
TrackMarkers insertions for fixed terminals.
* New: In Katana::RoutingEvent::Key::Compare::operator(), segments with
fixed axis are processed prior to any others.
* New: In Katana::RoutingEventLoop, store segment pointers instead of
ids to generate more accurate error messages.
* Change: In Katana::RoutingPlane::create(), perform local track
assignment only for HV gauges.
* Change: In Katana::SegmentFsm::_slackenLocal(), add a "dragMinimize"
step in the automaton. Mutliple states transitions can occurs in
a row if an action fails.
* New: In Katana::Session::_toIntervalAxis(), normalize interval
bounds so they are on track positions (by shrinking the interval).
* Bug: In Katana::TrackMarker CTOR, the weigh computation was wrong.
2018-02-17 13:27:38 -06:00
|
|
|
relaxOverConstraineds();
|
2016-07-18 07:48:37 -05:00
|
|
|
|
|
|
|
_state = EngineActive;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
Basic support for FreePDK 45 completed.
* New: In Commons, inspector support for std::pair<T,U>.
* New: In Hurricane::Layer, ContactLayer & ViaLayer, support for non
square VIAs. The hole (cut) remains square, but the various metal
extensions can now be different in X and Y. The ::getEnclosure()
method now takes a flag EnclosureH / EnclosureV.
* New: In Hurricane::DbU, inspector support for:
std::pair<DbU::Unit,DbU::Unit>
std::array<DbU::Unit,3>
Must be defined here as DbU do not exists yet in Commons.h
* Bug: In Hurricane::Interval::getSize(), when the interval is "full span",
do not return the difference between min and max, but directly DbU::Max.
(the previous result was -1 !)
* New: In CRL Core Python/Technology.py, support for non square VIAs in
the configuration files. Applied to FreePDK 45.
* New: In CRL::RoutingGauge, added a "symbolic" flag to tell if a gauge
is for symbolic layout or not. Exported to Python.
* New: In Anabatic::AutoHorizontal::updatePosition(), differentiated
computation for soure or target taking account of the VIA extension
in the right segment metal (due to non-square VIAs).
* Change: In Anabatic::AutoHorizontal::_makeDogleg(), the dogleg is
UP for HV gauges and DOWN for VH.
* New: In Anabatic::AutoSegment::_initialize(), create a cache of the
various extension length for each layer (viaToTop, viaToBottom,
viaToSame).
New implementation of getExtensionCap() using the previous cached
extension table. See updatePositions().
New static functions to access the extension cache in the header:
getViaTotopCap() ...
* Change: In Anabatic::AutoSegment, in various update methods, updateOrient()
must always be called *before* updatePositions() as extensions are
dependant on source/target.
* New: In Anabatic::AutoSegment::getEndAxes() compute the position of the
first source and last target position (center/axes) on an *aligned*
set of segments.
* New: In Anabatic::AutoSegment, add a new state flag SegAxisFixed to
signal segments that can be put on only one track. Specific case
to VH gauge for a M1 vertical terminal with a M2 vertical segment.
The M2 is effectively bound to the M1 axis position.
* Bug: In Anabatic::NetBuilderVH::_do_xG_xM1_xM3(), in case of E/W global
and only one RoutingPad the connexion to the RoutingPad was duplicated.
It was valid, but totally stupid.
* Bug: In Anabatic::Session::_canonize(), for an aligned segment set,
intersect the user constraints from all segments instead of only
considering the canonical one.
Issue a warning about too tight constraints only for symbolic
gauges. It may be correct for the real ones.
* New: In Katata::DataNegociate::update(), more accurate computation
of the perpandicular free interval. Use segment extension cap
calculation. Create a special case for fixed axis segments allowing
them to find alternative free interval, try under source and under
target as they are likely to be draggable segments.
* Change: In Katana::Manipulator::relax(), use the extension cap value
to compute the axis of the perpandicular segemnts.
* Change: In Katana::Manipulator::moveUp(), now move up the whole set
of aligned segments instead of just the canonical one.
* Change: In Katana::NegociateWindow::loadRoutingPads(), more accurate
TrackMarkers insertions for fixed terminals.
* New: In Katana::RoutingEvent::Key::Compare::operator(), segments with
fixed axis are processed prior to any others.
* New: In Katana::RoutingEventLoop, store segment pointers instead of
ids to generate more accurate error messages.
* Change: In Katana::RoutingPlane::create(), perform local track
assignment only for HV gauges.
* Change: In Katana::SegmentFsm::_slackenLocal(), add a "dragMinimize"
step in the automaton. Mutliple states transitions can occurs in
a row if an action fails.
* New: In Katana::Session::_toIntervalAxis(), normalize interval
bounds so they are on track positions (by shrinking the interval).
* Bug: In Katana::TrackMarker CTOR, the weigh computation was wrong.
2018-02-17 13:27:38 -06:00
|
|
|
void AnabaticEngine::relaxOverConstraineds ()
|
|
|
|
{
|
|
|
|
openSession();
|
|
|
|
|
|
|
|
DbU::Unit pitch3 = Session::getPitch( 2 );
|
|
|
|
AutoSegment::IdSet constraineds;
|
|
|
|
AutoSegment::IdSet processeds;
|
|
|
|
|
|
|
|
for ( GCell* gcell : _gcells ) {
|
|
|
|
//cerr << "@ " << gcell << endl;
|
|
|
|
|
|
|
|
multiset<AutoContactTerminal*,SortAcByXY> acTerminals;
|
|
|
|
for ( AutoContact* contact : gcell->getContacts() ) {
|
|
|
|
if (contact->isTerminal() and (Session::getViaDepth(contact->getLayer()) == 0) )
|
|
|
|
acTerminals.insert( dynamic_cast<AutoContactTerminal*>(contact) );
|
|
|
|
}
|
|
|
|
|
|
|
|
AutoContactTerminal* south = NULL;
|
|
|
|
for ( AutoContactTerminal* north : acTerminals ) {
|
|
|
|
//cerr << "@ " << north << endl;
|
|
|
|
if (south) {
|
|
|
|
if ( south->canDrag()
|
|
|
|
and north->canDrag()
|
|
|
|
and (south->getNet() != north->getNet())
|
|
|
|
and (south->getX () == north->getX ()) ) {
|
|
|
|
//Interval constraints ( north->getCBYMax() - pitch3, gcell->getYMin() );
|
|
|
|
Interval constraints ( north->getCBYMin() - pitch3, gcell->getYMin() );
|
|
|
|
AutoSegment* terminal = south->getSegment();
|
|
|
|
AutoContact* opposite = terminal->getOppositeAnchor( south );
|
|
|
|
|
|
|
|
for ( AutoSegment* segment : AutoSegments_OnContact(terminal,opposite->base()) ) {
|
|
|
|
segment->mergeUserConstraints( constraints );
|
|
|
|
constraineds.insert( segment );
|
|
|
|
//cerr << "Apply " << constraints << " to " << segment << endl;
|
|
|
|
}
|
|
|
|
|
|
|
|
//constraints = Interval( south->getCBYMin() + pitch3, gcell->getYMax() );
|
|
|
|
constraints = Interval( south->getCBYMax() + pitch3, gcell->getYMax() );
|
|
|
|
terminal = north->getSegment();
|
|
|
|
opposite = terminal->getOppositeAnchor( north );
|
|
|
|
|
|
|
|
for ( AutoSegment* segment : AutoSegments_OnContact(terminal,opposite->base()) ) {
|
|
|
|
segment->mergeUserConstraints( constraints );
|
|
|
|
constraineds.insert( segment );
|
|
|
|
//cerr << "Apply " << constraints << " to " << segment << endl;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//if (south->getConstraintBox().getHeight() < pitch3*2) metal2protect( south );
|
|
|
|
//if (north->getConstraintBox().getHeight() < pitch3*2) metal2protect( north );
|
|
|
|
}
|
|
|
|
south = north;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Session::revalidate();
|
|
|
|
|
|
|
|
for ( AutoSegment* constrained : constraineds ) {
|
|
|
|
if (processeds.find(constrained) != processeds.end()) continue;
|
|
|
|
processeds.insert( constrained );
|
|
|
|
|
|
|
|
Interval userConstraints ( false );
|
|
|
|
vector<AutoSegment*> aligneds;
|
|
|
|
|
|
|
|
aligneds.push_back( constrained );
|
|
|
|
|
|
|
|
for ( AutoSegment* aligned : constrained->getAligneds() ) {
|
|
|
|
aligneds.push_back( aligned );
|
|
|
|
processeds.insert( aligned );
|
|
|
|
}
|
|
|
|
|
|
|
|
sort( aligneds.begin(), aligneds.end(), AutoSegment::CompareBySourceU() );
|
|
|
|
|
|
|
|
AutoSegment* previous = NULL;
|
|
|
|
for ( AutoSegment* aligned : aligneds ) {
|
|
|
|
Interval constraints = userConstraints.getIntersection( aligned->getUserConstraints() );
|
|
|
|
cerr << "aligned: " << aligned << " " << aligned->getUserConstraints() << endl;
|
|
|
|
|
|
|
|
if (constraints.getSize() < Session::getPitch(1)) {
|
|
|
|
if (not previous) {
|
|
|
|
cerr << Warning( "protectAlignedAccesses(): Shearing constraints between S/T on\n"
|
|
|
|
" %s\n"
|
|
|
|
" S:%s\n"
|
|
|
|
" T:%s\n"
|
|
|
|
" Combined user constraints are too tight [%s : %s]."
|
|
|
|
, getString(aligned ).c_str()
|
|
|
|
, getString(aligned->getAutoSource()->getConstraintBox()).c_str()
|
|
|
|
, getString(aligned->getAutoTarget()->getConstraintBox()).c_str()
|
|
|
|
, DbU::getValueString(constraints.getVMin()).c_str()
|
|
|
|
, DbU::getValueString(constraints.getVMax()).c_str()
|
|
|
|
) << endl;
|
|
|
|
} else {
|
|
|
|
cerr << Warning( "protectAlignedAccesses(): Shearing constraints between\n"
|
|
|
|
" %s\n"
|
|
|
|
" %s\n"
|
|
|
|
" Combined user constraints are too tight [%s : %s]."
|
|
|
|
, getString(previous).c_str()
|
|
|
|
, getString(aligned ).c_str()
|
|
|
|
, DbU::getValueString(constraints.getVMin()).c_str()
|
|
|
|
, DbU::getValueString(constraints.getVMax()).c_str()
|
|
|
|
) << endl;
|
|
|
|
}
|
|
|
|
//if (previous) {
|
|
|
|
// if (previous->getAutoTarget() == aligned->getAutoSource()) {
|
|
|
|
// cerr << "Found a shared contact: " << aligned->getAutoSource() << endl;
|
|
|
|
shear( aligned );
|
|
|
|
// }
|
|
|
|
//}
|
|
|
|
|
|
|
|
userConstraints = aligned->getUserConstraints();
|
|
|
|
} else {
|
|
|
|
userConstraints = constraints;
|
|
|
|
}
|
|
|
|
|
|
|
|
previous = aligned;
|
|
|
|
}
|
|
|
|
|
|
|
|
cerr << "Final user constraints:" << userConstraints << endl;
|
|
|
|
}
|
|
|
|
|
|
|
|
Session::close();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-16 17:13:19 -06:00
|
|
|
void AnabaticEngine::_loadGrByNet ()
|
|
|
|
{
|
In Anabatic/Katana, add support for VH gauges (real technos).
* Change: In Anabatic::AutoContactTerminal::getNativeConstraintBox(),
when the anchor is a RoutingPad (which must be always the case),
perform the true computation of it's position based on the
segment occurrence. It is a important change, previously the
area was in fact the "center line" of the connector while now
it is really an area (mandatory for "half-offgrid" terminals of
real technologies).
The change is not complete yet, the area should be shrinked
by the half size of a VIA, because the area applies to the center
coordinate of the VIA (to be done quickly).
* Bug: In Anabatic::AutoContactTurn::updateTopology(), when a dogleg
is created (restore connexity after a layer change) the layer of
the VIA, based on the segments it connects to must be re-computed
*after* the dogleg has been made.
* Change: In all files of Anabatic, when comparing two layers, no longer
use the Layer pointer itself, but the layer mask. This allow a
transparent management of both real and symbolic layers (which
do share the same mask). Real metal layers (not VIAs) will be
BasicLayer and symbolic metal layers will be RegularLayer.
* New: Anabatic::Configuration::selectRpComponent(), select the best
RoutingPad component for metal1 terminals. Look for the metal1
component with the biggest accessibility on-grid.
RoutingPad using other metals are left untoucheds.
* New: New function Anabatic::Vertex::getNeighbor(Edge*) to get the
neighbor Vertex through an Edge*. This method allows to write
clearer code as we no longer need to access the neighbor through
the underlying GCell.
Also add proxies for GCell methods in Vertex.
* Bug: In Anabatic::Dijkstra::_toSources(), in the ripup stage, when
a component with multiples vertexes is reached *and* two of it's
vertexes are reached *at the same time* (one from which we backtrack
and one still in the queue) extraneous edges may be created by
_materialize(). Case occurs on snx/c35b4, "abc_5360_n903_1".
To solve this, Dijkstra::_toSource() is modificated, the "from"
edges of the newly reacheds vertexes are reset to NULL, *except*
for the one we will be backtracking from. That is, the one given
in the source argument.
* Change: In Anabatic::NetBuilder class, put the various Hooks and
RoutingPad sorting functions as class ones.
* Bug: In AutoSegment::setLayer(), raise the SegInvalidatedFayer flag.
This unset flag was causing AutoContactTurn::updateTopology()
to not work as expected and making gaps, this was the cause of
the last remaining warnings about layer connexity.
2018-01-06 09:55:53 -06:00
|
|
|
cmess1 << " o Building detailed routing from global. " << endl;
|
2017-12-16 17:13:19 -06:00
|
|
|
|
|
|
|
startMeasures();
|
|
|
|
openSession();
|
|
|
|
|
2017-12-18 11:15:14 -06:00
|
|
|
int gaugeKind = 3;
|
|
|
|
if (getConfiguration()->isTwoMetals()) gaugeKind = 0;
|
|
|
|
if (getConfiguration()->isHV ()) gaugeKind = 1;
|
|
|
|
if (getConfiguration()->isVH ()) gaugeKind = 2;
|
|
|
|
|
In Anabatic/Katana, add support for VH gauges (real technos).
* Change: In Anabatic::AutoContactTerminal::getNativeConstraintBox(),
when the anchor is a RoutingPad (which must be always the case),
perform the true computation of it's position based on the
segment occurrence. It is a important change, previously the
area was in fact the "center line" of the connector while now
it is really an area (mandatory for "half-offgrid" terminals of
real technologies).
The change is not complete yet, the area should be shrinked
by the half size of a VIA, because the area applies to the center
coordinate of the VIA (to be done quickly).
* Bug: In Anabatic::AutoContactTurn::updateTopology(), when a dogleg
is created (restore connexity after a layer change) the layer of
the VIA, based on the segments it connects to must be re-computed
*after* the dogleg has been made.
* Change: In all files of Anabatic, when comparing two layers, no longer
use the Layer pointer itself, but the layer mask. This allow a
transparent management of both real and symbolic layers (which
do share the same mask). Real metal layers (not VIAs) will be
BasicLayer and symbolic metal layers will be RegularLayer.
* New: Anabatic::Configuration::selectRpComponent(), select the best
RoutingPad component for metal1 terminals. Look for the metal1
component with the biggest accessibility on-grid.
RoutingPad using other metals are left untoucheds.
* New: New function Anabatic::Vertex::getNeighbor(Edge*) to get the
neighbor Vertex through an Edge*. This method allows to write
clearer code as we no longer need to access the neighbor through
the underlying GCell.
Also add proxies for GCell methods in Vertex.
* Bug: In Anabatic::Dijkstra::_toSources(), in the ripup stage, when
a component with multiples vertexes is reached *and* two of it's
vertexes are reached *at the same time* (one from which we backtrack
and one still in the queue) extraneous edges may be created by
_materialize(). Case occurs on snx/c35b4, "abc_5360_n903_1".
To solve this, Dijkstra::_toSource() is modificated, the "from"
edges of the newly reacheds vertexes are reset to NULL, *except*
for the one we will be backtracking from. That is, the one given
in the source argument.
* Change: In Anabatic::NetBuilder class, put the various Hooks and
RoutingPad sorting functions as class ones.
* Bug: In AutoSegment::setLayer(), raise the SegInvalidatedFayer flag.
This unset flag was causing AutoContactTurn::updateTopology()
to not work as expected and making gaps, this was the cause of
the last remaining warnings about layer connexity.
2018-01-06 09:55:53 -06:00
|
|
|
if (gaugeKind < 3) {
|
2017-12-18 11:15:14 -06:00
|
|
|
for ( Net* net : getCell()->getNets() ) {
|
|
|
|
if (NetRoutingExtension::isAutomaticGlobalRoute(net)) {
|
In Anabatic/Katana, add support for VH gauges (real technos).
* Change: In Anabatic::AutoContactTerminal::getNativeConstraintBox(),
when the anchor is a RoutingPad (which must be always the case),
perform the true computation of it's position based on the
segment occurrence. It is a important change, previously the
area was in fact the "center line" of the connector while now
it is really an area (mandatory for "half-offgrid" terminals of
real technologies).
The change is not complete yet, the area should be shrinked
by the half size of a VIA, because the area applies to the center
coordinate of the VIA (to be done quickly).
* Bug: In Anabatic::AutoContactTurn::updateTopology(), when a dogleg
is created (restore connexity after a layer change) the layer of
the VIA, based on the segments it connects to must be re-computed
*after* the dogleg has been made.
* Change: In all files of Anabatic, when comparing two layers, no longer
use the Layer pointer itself, but the layer mask. This allow a
transparent management of both real and symbolic layers (which
do share the same mask). Real metal layers (not VIAs) will be
BasicLayer and symbolic metal layers will be RegularLayer.
* New: Anabatic::Configuration::selectRpComponent(), select the best
RoutingPad component for metal1 terminals. Look for the metal1
component with the biggest accessibility on-grid.
RoutingPad using other metals are left untoucheds.
* New: New function Anabatic::Vertex::getNeighbor(Edge*) to get the
neighbor Vertex through an Edge*. This method allows to write
clearer code as we no longer need to access the neighbor through
the underlying GCell.
Also add proxies for GCell methods in Vertex.
* Bug: In Anabatic::Dijkstra::_toSources(), in the ripup stage, when
a component with multiples vertexes is reached *and* two of it's
vertexes are reached *at the same time* (one from which we backtrack
and one still in the queue) extraneous edges may be created by
_materialize(). Case occurs on snx/c35b4, "abc_5360_n903_1".
To solve this, Dijkstra::_toSource() is modificated, the "from"
edges of the newly reacheds vertexes are reset to NULL, *except*
for the one we will be backtracking from. That is, the one given
in the source argument.
* Change: In Anabatic::NetBuilder class, put the various Hooks and
RoutingPad sorting functions as class ones.
* Bug: In AutoSegment::setLayer(), raise the SegInvalidatedFayer flag.
This unset flag was causing AutoContactTurn::updateTopology()
to not work as expected and making gaps, this was the cause of
the last remaining warnings about layer connexity.
2018-01-06 09:55:53 -06:00
|
|
|
DebugSession::open( net, 145, 150 );
|
2017-12-18 11:15:14 -06:00
|
|
|
AutoSegment::setAnalogMode( NetRoutingExtension::isAnalog(net) );
|
|
|
|
|
|
|
|
switch ( gaugeKind ) {
|
|
|
|
case 0: NetBuilder::load<NetBuilderM2>( this, net ); break;
|
|
|
|
case 1: NetBuilder::load<NetBuilderHV>( this, net ); break;
|
In Anabatic/Katana, add support for VH gauges (real technos).
* Change: In Anabatic::AutoContactTerminal::getNativeConstraintBox(),
when the anchor is a RoutingPad (which must be always the case),
perform the true computation of it's position based on the
segment occurrence. It is a important change, previously the
area was in fact the "center line" of the connector while now
it is really an area (mandatory for "half-offgrid" terminals of
real technologies).
The change is not complete yet, the area should be shrinked
by the half size of a VIA, because the area applies to the center
coordinate of the VIA (to be done quickly).
* Bug: In Anabatic::AutoContactTurn::updateTopology(), when a dogleg
is created (restore connexity after a layer change) the layer of
the VIA, based on the segments it connects to must be re-computed
*after* the dogleg has been made.
* Change: In all files of Anabatic, when comparing two layers, no longer
use the Layer pointer itself, but the layer mask. This allow a
transparent management of both real and symbolic layers (which
do share the same mask). Real metal layers (not VIAs) will be
BasicLayer and symbolic metal layers will be RegularLayer.
* New: Anabatic::Configuration::selectRpComponent(), select the best
RoutingPad component for metal1 terminals. Look for the metal1
component with the biggest accessibility on-grid.
RoutingPad using other metals are left untoucheds.
* New: New function Anabatic::Vertex::getNeighbor(Edge*) to get the
neighbor Vertex through an Edge*. This method allows to write
clearer code as we no longer need to access the neighbor through
the underlying GCell.
Also add proxies for GCell methods in Vertex.
* Bug: In Anabatic::Dijkstra::_toSources(), in the ripup stage, when
a component with multiples vertexes is reached *and* two of it's
vertexes are reached *at the same time* (one from which we backtrack
and one still in the queue) extraneous edges may be created by
_materialize(). Case occurs on snx/c35b4, "abc_5360_n903_1".
To solve this, Dijkstra::_toSource() is modificated, the "from"
edges of the newly reacheds vertexes are reset to NULL, *except*
for the one we will be backtracking from. That is, the one given
in the source argument.
* Change: In Anabatic::NetBuilder class, put the various Hooks and
RoutingPad sorting functions as class ones.
* Bug: In AutoSegment::setLayer(), raise the SegInvalidatedFayer flag.
This unset flag was causing AutoContactTurn::updateTopology()
to not work as expected and making gaps, this was the cause of
the last remaining warnings about layer connexity.
2018-01-06 09:55:53 -06:00
|
|
|
case 2: NetBuilder::load<NetBuilderVH>( this, net ); break;
|
2017-12-18 11:15:14 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
Session::revalidate();
|
|
|
|
DebugSession::close();
|
|
|
|
}
|
2017-12-16 17:13:19 -06:00
|
|
|
}
|
2017-12-18 11:15:14 -06:00
|
|
|
AutoSegment::setAnalogMode( false );
|
2017-12-16 17:13:19 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
#if defined(CHECK_DATABASE)
|
|
|
|
_check ( "after Anabatic loading" );
|
|
|
|
#endif
|
|
|
|
|
|
|
|
Session::close();
|
|
|
|
stopMeasures();
|
2017-12-18 11:15:14 -06:00
|
|
|
|
In Anabatic/Katana, add support for VH gauges (real technos).
* Change: In Anabatic::AutoContactTerminal::getNativeConstraintBox(),
when the anchor is a RoutingPad (which must be always the case),
perform the true computation of it's position based on the
segment occurrence. It is a important change, previously the
area was in fact the "center line" of the connector while now
it is really an area (mandatory for "half-offgrid" terminals of
real technologies).
The change is not complete yet, the area should be shrinked
by the half size of a VIA, because the area applies to the center
coordinate of the VIA (to be done quickly).
* Bug: In Anabatic::AutoContactTurn::updateTopology(), when a dogleg
is created (restore connexity after a layer change) the layer of
the VIA, based on the segments it connects to must be re-computed
*after* the dogleg has been made.
* Change: In all files of Anabatic, when comparing two layers, no longer
use the Layer pointer itself, but the layer mask. This allow a
transparent management of both real and symbolic layers (which
do share the same mask). Real metal layers (not VIAs) will be
BasicLayer and symbolic metal layers will be RegularLayer.
* New: Anabatic::Configuration::selectRpComponent(), select the best
RoutingPad component for metal1 terminals. Look for the metal1
component with the biggest accessibility on-grid.
RoutingPad using other metals are left untoucheds.
* New: New function Anabatic::Vertex::getNeighbor(Edge*) to get the
neighbor Vertex through an Edge*. This method allows to write
clearer code as we no longer need to access the neighbor through
the underlying GCell.
Also add proxies for GCell methods in Vertex.
* Bug: In Anabatic::Dijkstra::_toSources(), in the ripup stage, when
a component with multiples vertexes is reached *and* two of it's
vertexes are reached *at the same time* (one from which we backtrack
and one still in the queue) extraneous edges may be created by
_materialize(). Case occurs on snx/c35b4, "abc_5360_n903_1".
To solve this, Dijkstra::_toSource() is modificated, the "from"
edges of the newly reacheds vertexes are reset to NULL, *except*
for the one we will be backtracking from. That is, the one given
in the source argument.
* Change: In Anabatic::NetBuilder class, put the various Hooks and
RoutingPad sorting functions as class ones.
* Bug: In AutoSegment::setLayer(), raise the SegInvalidatedFayer flag.
This unset flag was causing AutoContactTurn::updateTopology()
to not work as expected and making gaps, this was the cause of
the last remaining warnings about layer connexity.
2018-01-06 09:55:53 -06:00
|
|
|
if (gaugeKind > 2) {
|
2017-12-18 11:15:14 -06:00
|
|
|
throw Error( "AnabaticEngine::_loadGrByNet(): Unsupported kind of routing gauge \"%s\"."
|
|
|
|
, getString(getConfiguration()->getRoutingGauge()->getName()).c_str() );
|
|
|
|
}
|
|
|
|
|
2017-12-16 17:13:19 -06:00
|
|
|
printMeasures( "load" );
|
|
|
|
|
|
|
|
addMeasure<size_t>( getCell(), "Globals", AutoSegment::getGlobalsCount() );
|
|
|
|
addMeasure<size_t>( getCell(), "Edges" , AutoSegment::getAllocateds() );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-07-18 07:48:37 -05:00
|
|
|
void AnabaticEngine::updateNetTopology ( Net* net )
|
|
|
|
{
|
|
|
|
DebugSession::open( net, 140, 150 );
|
|
|
|
|
|
|
|
cdebug_log(149,0) << "Anabatic::updateNetTopology( " << net << " )" << endl;
|
|
|
|
cdebug_tabw(145,1);
|
|
|
|
|
|
|
|
vector<AutoContact*> contacts;
|
|
|
|
for ( Component* component : net->getComponents() ) {
|
|
|
|
Contact* contact = dynamic_cast<Contact*>( component );
|
|
|
|
if (contact) {
|
|
|
|
AutoContact* autoContact = Session::lookup( contact );
|
|
|
|
if (autoContact and autoContact->isInvalidatedCache())
|
|
|
|
contacts.push_back( autoContact );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for ( size_t i=0 ; i<contacts.size() ; ++i )
|
|
|
|
contacts[i]->updateTopology();
|
|
|
|
|
|
|
|
cdebug_tabw(145,-1);
|
|
|
|
DebugSession::close();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void AnabaticEngine::finalizeLayout ()
|
|
|
|
{
|
|
|
|
cdebug_log(145,0) << "Anabatic::finalizeLayout()" << endl;
|
|
|
|
if (_state > EngineDriving) return;
|
|
|
|
|
|
|
|
_state = EngineDriving;
|
|
|
|
|
|
|
|
startMeasures();
|
|
|
|
_gutAnabatic();
|
|
|
|
stopMeasures ();
|
|
|
|
printMeasures( "fin" );
|
|
|
|
|
|
|
|
_state = EngineGutted;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void AnabaticEngine::_alignate ( Net* net )
|
|
|
|
{
|
|
|
|
DebugSession::open( net, 140, 150 );
|
|
|
|
|
|
|
|
cdebug_log(149,0) << "Anabatic::_alignate( " << net << " )" << endl;
|
|
|
|
cdebug_tabw(145,1);
|
|
|
|
|
|
|
|
//cmess2 << " - " << getString(net) << endl;
|
|
|
|
|
|
|
|
set<Segment*> exploredSegments;
|
|
|
|
vector<AutoSegment*> unexploreds;
|
|
|
|
vector<AutoSegment*> aligneds;
|
|
|
|
|
|
|
|
for ( Component* component : net->getComponents() ) {
|
|
|
|
Segment* segment = dynamic_cast<Segment*>(component);
|
|
|
|
if (segment) {
|
|
|
|
AutoSegment* seedSegment = Session::lookup( segment );
|
|
|
|
if (seedSegment) unexploreds.push_back( seedSegment );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sort( unexploreds.begin(), unexploreds.end(), AutoSegment::CompareId() );
|
|
|
|
|
|
|
|
for ( size_t i=0 ; i<unexploreds.size() ; i++ ) {
|
|
|
|
AutoSegment* seedSegment = unexploreds[i];
|
|
|
|
|
|
|
|
if (exploredSegments.find(seedSegment->base()) == exploredSegments.end()) {
|
|
|
|
cdebug_log(145,0) << "New chunk from: " << seedSegment << endl;
|
|
|
|
aligneds.push_back( seedSegment );
|
|
|
|
|
|
|
|
for ( AutoSegment* collapsed : seedSegment->getAligneds() ) {
|
|
|
|
cdebug_log(145,0) << "Aligned: " << collapsed << endl;
|
|
|
|
aligneds.push_back( collapsed );
|
|
|
|
exploredSegments.insert( collapsed->base() );
|
|
|
|
}
|
|
|
|
|
|
|
|
cdebug_tabw(145,1);
|
|
|
|
sort( aligneds.begin(), aligneds.end(), AutoSegment::CompareId() );
|
|
|
|
|
|
|
|
cdebug_log(145,0) << "Seed: " << (void*)aligneds[0]->base() << " " << aligneds[0] << endl;
|
|
|
|
for ( size_t j=1 ; j<aligneds.size() ; j++ ) {
|
|
|
|
cdebug_log(145,0) << "Secondary: " << (void*)(aligneds[j]->base()) << " " << aligneds[j] << endl;
|
|
|
|
}
|
|
|
|
|
|
|
|
cdebug_log(149,0) << "Align on " << aligneds[0]
|
First intergration of the Analogic router parts.
* New: In Anabatic::AutoSegment, introduce a the kind (associated to a
flag) "LongLocal". Analog GCells can be very wide, so at least some
carefuly choosen long local segments must be took into account as
attractors in the computation of the optimal axis.
* New: In Anabatic::AutoSegment::computeOptimal(), take LongLocal into
account as attractors.
* Change: In ::GCellTopology constructors compare the layers of the
RoutingPads using layer masks instead of Layer pointers. Allows to
find both "METALx" (symbolic) and "metalX" (real).
* Change: In ::GCellTopology::_doHChannel(), _doChannel(), _doStrut()
and _doDevice(), tag long locals as "LongLocal". This need to be
reviewed as it as bind done a bit too quickly.
* Change: In Anabatic::AutoSegment, due too a much bigger span of the
analogic GCells the _optimalMin & _optimalMax bitfields must use
16 bits instead of 8 (they where overflowed).
* New: In Katana, reorganisation of the initialization procedure to fit
both digital and analogic cases. Create an analogInit() method.
* Change: In Katana::RoutingEvent, the _tracksNb and _tracksFree bitfields
where too short for the Analog GCell size, now uses 16 bits instead of
6.
* Bug: In Katana::GraphicKatanEngine::drawGCell(), skip drawing of a
GCell if *both* width and height are under 150 pixels.
* New: In Katana::Session, add a new isOpen() method.
2016-10-04 10:12:58 -05:00
|
|
|
<< " " << DbU::getValueString(aligneds[0]->getAxis()) << endl;
|
2016-07-18 07:48:37 -05:00
|
|
|
aligneds[0]->setAxis( aligneds[0]->getAxis(), Flags::Realignate );
|
|
|
|
aligneds.clear();
|
|
|
|
|
|
|
|
cdebug_tabw(145,-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
cdebug_tabw(145,-1);
|
|
|
|
|
|
|
|
DebugSession::close();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void AnabaticEngine::_computeNetTerminals ( Net* net )
|
|
|
|
{
|
|
|
|
DebugSession::open( net, 140, 150 );
|
|
|
|
|
|
|
|
cdebug_log(149,0) << "Anabatic::_computeNetTerminals( " << net << " )" << endl;
|
|
|
|
cdebug_tabw(145,1);
|
|
|
|
|
|
|
|
for ( Segment* segment : net->getSegments() ) {
|
|
|
|
AutoSegment* autoSegment = Session::lookup( segment );
|
|
|
|
if (autoSegment == NULL) continue;
|
|
|
|
if (autoSegment->isInvalidated()) autoSegment->computeTerminal();
|
|
|
|
}
|
|
|
|
|
|
|
|
cdebug_tabw(145,-1);
|
|
|
|
|
|
|
|
DebugSession::close();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void AnabaticEngine::_saveNet ( Net* net )
|
|
|
|
{
|
|
|
|
DebugSession::open( net, 140, 150 );
|
|
|
|
|
|
|
|
cdebug_log(145,0) << "Anabatic::_saveNet() " << net << endl;
|
|
|
|
cdebug_tabw(145,1);
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
cdebug_log(145,0) << "Deleting zero-length segments." << endl;
|
|
|
|
|
|
|
|
vector<Segment*> nullSegments;
|
|
|
|
set<const Layer*> connectedLayers;
|
|
|
|
|
|
|
|
forEach ( Segment*, segment, net->getSegments() ) {
|
|
|
|
if (segment->getLength()) {
|
|
|
|
if (net->isExternal()) {
|
|
|
|
NetExternalComponents::setExternal( *segment );
|
|
|
|
}
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Session::lookup(*segment) == NULL) {
|
|
|
|
cdebug_log(145,0) << "* Not associated to an AutoSegment: " << *segment << endl;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (not isTopAndBottomConnected(*segment,connectedLayers)) {
|
|
|
|
nullSegments.push_back( *segment );
|
|
|
|
cdebug_log(145,0) << "* Null Length: " << *segment << endl;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
setFlags( EngineDestroyBaseSegment );
|
|
|
|
for ( size_t i = 0 ; i < nullSegments.size() ; i++ ) {
|
|
|
|
Contact* source = dynamic_cast<Contact*>(nullSegments[i]->getSource());
|
|
|
|
Contact* target = dynamic_cast<Contact*>(nullSegments[i]->getTarget());
|
|
|
|
|
|
|
|
if ( (source == NULL) or (target == NULL) ) {
|
|
|
|
cerr << Error("Unconnected source/target on %s.",getString(nullSegments[i]).c_str()) << endl;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (source->getAnchor()) {
|
|
|
|
if (target->getAnchor()) {
|
|
|
|
continue;
|
|
|
|
//cerr << Bug("Both source & target are anchored while deleting zero-length segment:\n"
|
|
|
|
// " %s.",getString(nullSegments[i]).c_str()) << endl;
|
|
|
|
} else
|
|
|
|
swap( source, target );
|
|
|
|
}
|
|
|
|
|
|
|
|
cdebug_log(145,0) << "Deleting: " << nullSegments[i] << endl;
|
|
|
|
if (isTopAndBottomConnected(nullSegments[i],connectedLayers)) {
|
|
|
|
cdebug_log(145,0) << "Deletion cancelled, no longer top or bottom connected." << endl;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
cdebug_log(145,0) << "* Source: " << (void*)source << " " << source << endl;
|
|
|
|
cdebug_log(145,0) << "* Target: " << (void*)target << " " << target << endl;
|
|
|
|
|
|
|
|
const Layer* layer = DataBase::getDB()->getTechnology()
|
|
|
|
->getViaBetween( *connectedLayers.begin(), *connectedLayers.rbegin() );
|
|
|
|
|
|
|
|
cdebug_log(145,0) << *connectedLayers.begin() << " + " << *connectedLayers.rbegin() << endl;
|
|
|
|
cdebug_log(145,0) << "* Shrink layer: " << layer << endl;
|
|
|
|
if ( !layer ) {
|
|
|
|
cerr << Error("NULL contact layer while deleting %s."
|
|
|
|
,getString(nullSegments[i]).c_str()) << endl;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
Session::lookup( nullSegments[i] )->destroy ();
|
|
|
|
|
|
|
|
vector<Hook*> slaveHooks;
|
|
|
|
Hook* masterHook = source->getBodyHook()->getPreviousMasterHook();
|
|
|
|
|
|
|
|
while ( masterHook->getNextHook() != source->getBodyHook() ) {
|
|
|
|
slaveHooks.push_back( masterHook->getNextHook() );
|
|
|
|
cdebug_log(145,0) << "* detach: "
|
|
|
|
<< (void*)masterHook->getNextHook()->getComponent()
|
|
|
|
<< " " << masterHook->getNextHook()->getComponent() << endl;
|
|
|
|
masterHook->getNextHook()->detach();
|
|
|
|
}
|
|
|
|
source->destroy();
|
|
|
|
|
|
|
|
masterHook = target->getBodyHook();
|
|
|
|
for ( size_t j=0 ; j < slaveHooks.size() ; j++ ) {
|
|
|
|
slaveHooks[j]->attach( masterHook );
|
|
|
|
}
|
|
|
|
|
|
|
|
cdebug_log(145,0) << (void*)target << " " << target << " setLayer: " << layer << endl;
|
|
|
|
target->setLayer( layer );
|
|
|
|
}
|
|
|
|
unsetFlags( EngineDestroyBaseSegment );
|
|
|
|
#endif
|
|
|
|
|
|
|
|
cdebug_tabw(145,-1);
|
|
|
|
DebugSession::close();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
Added support for 2-Metal block routing in Anabatic & Katana.
* New: In AnabaticEngine::invalidateRoutingPads() this method is a temporary
workaround for a Hurricane problems. When an instance is moved, the
RoutingPads that use it must be moved accordingly, but they are not
invalidated so they stay in the wrong QuadTree.
New method ::_resizeMatrix() to be called when the associated Cell
is resized.
* Bug: In AutoHorizontal::getConstraints() and AutoVertical::getConstraints(),
the *target* constraints where never merged.
* Change: In AutoHorizontal::getCells() and AutoVertical::getGCells(),
now return a boolean to tell if it was ok (must not encounter a NULL
GCell while progessing from source to target).
* New: In Anabatic::Configuration and Anabatic:Session, create new methods:
- getDHorizontalLayer()
- getDhorizontalDepth()
- getDHorizontalWidth()
- getDHorizontalPitch()
And so on for Vertical and Contact.
They supply depth-independant informations about the H/V layers to
build the initial detailed routing.
The AutoSegment::create() methods have been modificated accordingly.
* New: In Anabatic::GCell, add two new types "StdCellRow" and "ChannelRow"
for implementing 2-Metal blocks.
Rename the GCell::setXY() method in GCell::setSouthWestCorner(),
move the contents of GCell::updateContactsPosition() into it and
suppress it.
WARNING: In case of a GCell shrink this may cause problems. But for
now we only expand...
New method GCell::getNetCount() to count the number of Net going
though the GCell.
* Change: In Anabatic::Edge, add specific support for capacity of 2-Metal
routing channels.
* Change: In Anabatic::Dijsktra various methods, replace the "gcell->isMatrix()"
calls by "not gcell->isAnalog()". Add more check so that the methods
pertaining to the analog routing (GRData) are not called in digital
mode.
* New: In Anabatic::Dijkstra::materialize(), add support for 2-Metal specific
cases. That is, always break in case of vertical pass-through or
U-turn. The global routing must always be broken in H-Channel.
* New: In Anabatic::GCell & Anabatic::Edge, make use of the Session mechanism
to ensure the revalidation. The "::revalidate()" method is then moved
as "::materialize()" (overload of Go) and "::_invalidate()" becomes
"::invalidate()"
* Change: In LoadGlobalRouting, cosmetic rename of SortHkByX in SortHookByX.
* New: In GCellTopology, added support for building 2-Metal topologies.
* ForkStack is now an object attribute as many methods do need it.
* To push segments/hook on the stack, a new method "push()" is
available. Perform NULL and fromHook checking. Can also setup
_southWestContact or _northEastContact if it is the "from" edge.
* N/S/E/W edges are now vector as in digital channel mode there
can be more than one.
* Added build topological build methods:
- doRp_2m_Access() RoutingPad stem access.
- _do_2m_1G_1M1() North or south access.
- _do_2m_2G_1M1() North AND south access.
- _do_2m_xG() H-Channel routing.
* New: In Anabatic::Matrix, new ::resize() function, as Cell can be resizeds.
* New: In Anabatic::Vertex, new static method ::getValueString() for a
friendly text rendering.
* New: In Katana::DigitalDistance, support for channel routing.
* Change: In KatanaEngine::digitalSetup() and KatanaEngine::runGlobalrouter(),
for channel routing, calls to setupPowerRails() and
protectRoutingPads() must be called after the core block has
been fully dimensionned.
::runGlobalrouter() contains the code tasked with the grid creation
and channel sizing.
* New: In KatanaEngine: Added support for core block, for 2-Metal routing.
May be expanded for over-the-cell routing in the future.
Added methods :
- isDigitalMode()
- isAnalogMode()
- isMixedMode()
- isChannelMode()
- getBlock() / addBlock()
- setupChannelMode()
- createChannel()
* New: In Katana, new class Block to manage core blocks and perform
channel routing.
* New: In Katana::Session, new convenience method "isOpen()".
2017-08-18 16:56:23 -05:00
|
|
|
void AnabaticEngine::invalidateRoutingPads ()
|
|
|
|
{
|
|
|
|
// This a flaw in the Hurricane Session update mechanism
|
|
|
|
// and needs to be fixed in the future.
|
|
|
|
for ( Net* net : getCell()->getNets() ) {
|
|
|
|
for ( RoutingPad* rp : net->getRoutingPads() ) {
|
|
|
|
rp->invalidate( false );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-07-18 07:48:37 -05:00
|
|
|
void AnabaticEngine::updateDensity ()
|
|
|
|
{ for ( GCell* gcell : _gcells ) gcell->updateDensity(); }
|
|
|
|
|
|
|
|
|
2016-07-21 17:14:17 -05:00
|
|
|
size_t AnabaticEngine::checkGCellDensities ()
|
|
|
|
{
|
|
|
|
size_t saturateds = 0;
|
|
|
|
for ( GCell* gcell : _gcells ) saturateds += gcell->checkDensity();
|
|
|
|
return saturateds;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-07-18 07:48:37 -05:00
|
|
|
AutoSegment* AnabaticEngine::_lookup ( Segment* segment ) const
|
|
|
|
{
|
|
|
|
AutoSegmentLut::const_iterator it = _autoSegmentLut.find( segment );
|
|
|
|
if (it == _autoSegmentLut.end()) return NULL;
|
|
|
|
|
|
|
|
return (*it).second;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void AnabaticEngine::_link ( AutoSegment* autoSegment )
|
|
|
|
{
|
|
|
|
if (_state > EngineActive) return;
|
|
|
|
_autoSegmentLut[ autoSegment->base() ] = autoSegment;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void AnabaticEngine::_unlink ( AutoSegment* autoSegment )
|
|
|
|
{
|
|
|
|
if (_state > EngineDriving) return;
|
|
|
|
|
|
|
|
AutoSegmentLut::iterator it = _autoSegmentLut.find( autoSegment->base() );
|
|
|
|
if (it != _autoSegmentLut.end())
|
|
|
|
_autoSegmentLut.erase( it );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
AutoContact* AnabaticEngine::_lookup ( Contact* contact ) const
|
|
|
|
{
|
|
|
|
AutoContactLut::const_iterator it = _autoContactLut.find( contact );
|
|
|
|
if (it == _autoContactLut.end()) {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
return (*it).second;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void AnabaticEngine::_link ( AutoContact* autoContact )
|
|
|
|
{
|
|
|
|
if (_state > EngineActive) return;
|
|
|
|
_autoContactLut [ autoContact->base() ] = autoContact;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void AnabaticEngine::_unlink ( AutoContact* autoContact )
|
|
|
|
{
|
|
|
|
if ( _state > EngineActive ) return;
|
|
|
|
|
|
|
|
AutoContactLut::iterator it = _autoContactLut.find( autoContact->base() );
|
|
|
|
if (it != _autoContactLut.end())
|
|
|
|
_autoContactLut.erase( it );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void AnabaticEngine::_destroyAutoSegments ()
|
|
|
|
{
|
|
|
|
cdebug_log(145,0) << "Anabatic::_destroyAutoSegments ()" << endl;
|
|
|
|
|
|
|
|
size_t expandeds = 0;
|
|
|
|
for ( auto sasp : _autoSegmentLut ) {
|
|
|
|
expandeds++;
|
|
|
|
sasp.second->destroy();
|
|
|
|
}
|
|
|
|
if (_state == EngineDriving)
|
|
|
|
cmess2 << " - Expandeds := " << expandeds << endl;
|
|
|
|
|
|
|
|
_autoSegmentLut.clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void AnabaticEngine::_destroyAutoContacts ()
|
|
|
|
{
|
|
|
|
cdebug_log(145,0) << "Anabatic::_destroyAutoContacts ()" << endl;
|
|
|
|
|
|
|
|
for ( auto cacp : _autoContactLut ) cacp.second->destroy();
|
|
|
|
_autoContactLut.clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
Anabatic transient commit 18. Port of Kite (Katana), Yeah, Baby! Yeah!
* Bug: In Hurricane, in StaticObservable::getObserver(), if the slot
pointer is NULL, do not try to access the owner. Returns NULL, so
the caller can be aware of the situation...
* Change: In Hurricane, in BreakpointWidget & ExceptionWidget some
cosmetic changes (fonts and window sizes).
* Bug: In Anabatic, In AutoHorizontal::getConstraints(), take into account
the constraints from the source AutoContact, as it holds the constraints
transmitted by the RoutingPads and sets up by propageConstraintsFromRp().
It is likely to be a bug affecting the original Katabatic as well.
* Change: In Anabatic, in RawGCellsUnder(), check that the segment is not
completly oustside the cell abutment box and truncate the coordinates
to the part that is inside. Use the "shrink" if we reach the east/north
border.
* Change: In Anabatic, in Configuration, no more decorator because we will
use a true derived relationship. Katana *derives* from *Anabatic* and do
not *decorate* it, so the Configuration can do the same. It also implies
that we directly create a Katana engine, not an Anabatic one.
* Change: In Anabatic, in Session, do not allow the opening of the Session
in a standalone fashion (with a static method). Instead it must be opened
using the relevant method of the Anabatic/Katana engine. This ensure we
are opening the right Session type.
* Change: In Anabatic, in AutoSegment_Aligneds() collection the seed segment
is not part of the collection by default, but will be included if the
Flags::WithSelf is set.
* Change: In Configuration, all the flags value are now defined in two steps.
Declared in the header and initialized in the module. This is to prevent
the fact that on some cases, in relation with the Python "extern C" part
modules, we need a true allocated variable. It was causing weird linking
problems.
A side effect is that they can no longer be used as entry is switches,
have to replace them by if/else.
* New: In Anabatic, new GCell::getNeighborAt() utility function.
* Bug: In Anabatic, in GCell::doGrid(), tag all the GCells of the grid with
the grid type... Back annote all the edges capacity (north & east) with
the reserved local capacity.
* New: Complete portage of Kite over Anabatic. The new engine is christened
"Katana" for Kite-Analogic. When it's capabilities and performances
will be on a part with Kite, it is to completly replace it (and take
back the "Kite" name). Preliminary tests seems to show that, contrary
to intuition (because built on a more complex/slower grid), it is even
slightly faster than Kite 8-).
2016-08-15 09:30:13 -05:00
|
|
|
void AnabaticEngine::_check ( Net* net ) const
|
|
|
|
{
|
|
|
|
cdebug_log(149,1) << "Checking " << net << endl;
|
|
|
|
for ( Segment* segment : net->getComponents().getSubSet<Segment*>() ) {
|
|
|
|
AutoSegment* autoSegment = _lookup( segment );
|
|
|
|
cdebug_log(149,0) << autoSegment << endl;
|
|
|
|
if (autoSegment) {
|
|
|
|
AutoContact* autoContact = autoSegment->getAutoSource();
|
|
|
|
cdebug_log(149,0) << autoContact << endl;
|
|
|
|
if (autoContact) autoContact->checkTopology();
|
|
|
|
|
|
|
|
autoContact = autoSegment->getAutoTarget();
|
|
|
|
cdebug_log(149,0) << autoContact << endl;
|
|
|
|
if (autoContact) autoContact->checkTopology();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cdebug_tabw(149,-1);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool AnabaticEngine::_check ( const char* message ) const
|
|
|
|
{
|
|
|
|
bool coherency = true;
|
|
|
|
if (message)
|
|
|
|
cerr << " o checking Anabatic DB (" << message << ")." << endl;
|
|
|
|
|
|
|
|
for ( auto element : _autoSegmentLut )
|
|
|
|
coherency = element.second->_check() and coherency;
|
|
|
|
|
|
|
|
for ( GCell* gcell : _gcells ) {
|
|
|
|
for ( AutoContact* contact : gcell->getContacts() )
|
|
|
|
contact->checkTopology();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (message) cerr << " - completed." << endl;
|
|
|
|
|
|
|
|
return coherency;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
Apaired segments building for symmetric routing (step 1).
* Change: In Hurricane::BaseFlags, store flags in uint64_t instead of
unsigned int because we start to need more than 32 different flags
in some tools.
* New: In ::getString() & ::getRecord() templates, add support for
std::array<>.
* Change: In CRL::ToolEngine, add support for timer (time & memory
measurements) displaced from Katabatic. This way all ToolEngine
can use this feature. The _postCreate() method display the
memory just after ToolEngine allocation.
* Change: In Etesian::EtesianEngine, make use of the ToolEngine
builtin timer (remove the local one). Forgot to call the base
class _postCreate() and _preDestroy().
* Change: In Anabatic::AnabaticEngine, make use of the ToolEngine
builtin timer (remove the local one).
* New: In Anabatic, new AutoSegments_Connecteds() collection. This
Collection allows a deterministic walkthough *all* the AutoSegments
connected either to source or target of one AutoSegment.
* New: In Anabatic::AutoContactTerminal::isEndPoint() to check if an
AutoContactTerminal is the *only one* anchored on a RoutingPad,
thus being a true "end point" and not a kind of feed-through.
* New: In Katana::KatanaEngine, added support for symmetric nets.
Created new class DataSymmetric to store symmetric information
of a net (mainly the paired AutoSegments).
Added KatanaEngine::runSymmetricRouter(), for now only build
the DataSymmetric informations. More to come...
* Change: In Katana::GraphicKatanaEngine::_runTest(), now perform
symmetric information building the non-symmetric routing.
2017-03-12 13:34:12 -05:00
|
|
|
void AnabaticEngine::printMeasures ( const string& tag ) const
|
|
|
|
{
|
|
|
|
Super::printMeasures();
|
|
|
|
|
|
|
|
// if (not tag.empty()) {
|
|
|
|
// addMeasure<double>( getCell(), tag+"T", getTimer().getCombTime () );
|
|
|
|
// addMeasure<size_t>( getCell(), tag+"S", (getTimer().getMemorySize() >> 20) );
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-05-23 09:15:25 -05:00
|
|
|
string AnabaticEngine::_getTypeName () const
|
|
|
|
{ return getString(_toolName); }
|
|
|
|
|
|
|
|
|
|
|
|
string AnabaticEngine::_getString () const
|
|
|
|
{
|
|
|
|
ostringstream os;
|
|
|
|
os << "<" << _toolName << " " << _cell->getName() << ">";
|
|
|
|
return os.str();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Record* AnabaticEngine::_getRecord () const
|
|
|
|
{
|
|
|
|
Record* record = Super::_getRecord();
|
2016-05-26 06:56:16 -05:00
|
|
|
record->add( getSlot("_configuration", _configuration) );
|
|
|
|
record->add( getSlot("_gcells" , &_gcells ) );
|
|
|
|
record->add( getSlot("_matrix" , &_matrix ) );
|
2016-05-26 11:30:03 -05:00
|
|
|
record->add( getSlot("_flags" , &_flags ) );
|
2016-05-23 09:15:25 -05:00
|
|
|
return record;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // Anabatic namespace.
|