2010-03-09 09:24:29 -06:00
|
|
|
// -*- C++ -*-
|
|
|
|
//
|
|
|
|
// This file is part of the Coriolis Software.
|
2016-03-06 05:36:18 -06:00
|
|
|
// Copyright (c) UPMC/LIP6 2008-2016, All Rights Reserved
|
2010-03-09 09:24:29 -06:00
|
|
|
//
|
2012-12-03 02:28:43 -06:00
|
|
|
// +-----------------------------------------------------------------+
|
2010-03-09 09:24:29 -06:00
|
|
|
// | C O R I O L I S |
|
|
|
|
// | K a t a b a t i c - Routing Toolbox |
|
|
|
|
// | |
|
|
|
|
// | Author : Jean-Paul CHAPUT |
|
2013-12-03 18:58:58 -06:00
|
|
|
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
2010-03-09 09:24:29 -06:00
|
|
|
// | =============================================================== |
|
|
|
|
// | C++ Module : "./KatabaticEngine.cpp" |
|
2012-12-03 02:28:43 -06:00
|
|
|
// +-----------------------------------------------------------------+
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
#include <iostream>
|
|
|
|
#include <fstream>
|
|
|
|
#include "hurricane/DebugSession.h"
|
|
|
|
#include "hurricane/Bug.h"
|
|
|
|
#include "hurricane/Error.h"
|
|
|
|
#include "hurricane/Warning.h"
|
|
|
|
#include "hurricane/DataBase.h"
|
|
|
|
#include "hurricane/Technology.h"
|
|
|
|
#include "hurricane/Layer.h"
|
|
|
|
#include "hurricane/BasicLayer.h"
|
|
|
|
#include "hurricane/NetExternalComponents.h"
|
|
|
|
#include "hurricane/Cell.h"
|
|
|
|
#include "crlcore/Utilities.h"
|
|
|
|
#include "crlcore/Catalog.h"
|
|
|
|
#include "crlcore/Measures.h"
|
|
|
|
#include "crlcore/AllianceFramework.h"
|
|
|
|
#include "katabatic/Session.h"
|
|
|
|
#include "katabatic/AutoContact.h"
|
|
|
|
#include "katabatic/AutoSegment.h"
|
|
|
|
#include "katabatic/GCell.h"
|
|
|
|
#include "katabatic/GCellGrid.h"
|
|
|
|
#include "katabatic/KatabaticEngine.h"
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
using namespace Hurricane;
|
|
|
|
|
|
|
|
|
2014-12-09 16:49:46 -06:00
|
|
|
#if 0
|
2010-03-09 09:24:29 -06:00
|
|
|
bool isTopAndBottomConnected ( Segment* segment, set<const Layer*>& layers )
|
|
|
|
{
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145,1) << "* Potential Null Length: " << segment << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
Contact* source = dynamic_cast<Contact*>(segment->getSource());
|
|
|
|
Contact* target = dynamic_cast<Contact*>(segment->getTarget());
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
layers.clear();
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (source != NULL) {
|
2010-03-09 09:24:29 -06:00
|
|
|
forEach ( Hook*, ihook, source->getBodyHook()->getSlaveHooks() ) {
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "* Slave: " << (*ihook)->getComponent() << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
if ((*ihook)->getComponent() == segment) continue;
|
|
|
|
layers.insert( (*ihook)->getComponent()->getLayer() );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (target != NULL) {
|
2010-03-09 09:24:29 -06:00
|
|
|
forEach ( Hook*, ihook, target->getBodyHook()->getSlaveHooks() ) {
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "* Slave: " << (*ihook)->getComponent() << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
if ((*ihook)->getComponent() == segment) continue;
|
|
|
|
layers.insert( (*ihook)->getComponent()->getLayer() );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
size_t supplemental = (layers.find(segment->getLayer()) == layers.end()) ? 1 : 0;
|
* ./katabatic:
- Change: In loadGlobalRouting(), more exlicit message as to why a net is
filtered out the routing set (POWER, GROUND, CLOCK or BLOCKAGE).
- New: ChipTool, module with utilities specific to chip routing. Containing
a function to pre-break wires around a block.
- New: In loadGlobalRouting/GCellConfiguration, adds supports for RoutingPad
connected on chip's pad.
- New: In GCellGrid/GCell, can compute the density in three modes: average,
max of H/V and max of layer. Currently implemented in getMaxHVDensity(),
should be unificated with getDensity(). Used for display purposes.
- Bug: In AutoContact, when splitting a contact, add a specific check for
"one layer span".
- Bug: In AutoSegment::canMoveUp(), do not move up fixed segments.
2010-11-16 07:59:38 -06:00
|
|
|
if ( (source->getAnchor() != NULL) or (target->getAnchor() != NULL) ) supplemental++;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.tabw(145,-1);
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
return layers.size()+supplemental > 2;
|
|
|
|
}
|
2014-12-09 16:49:46 -06:00
|
|
|
#endif
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
|
|
|
} // End of anonymous namespace.
|
|
|
|
|
|
|
|
|
|
|
|
namespace Katabatic {
|
|
|
|
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
using Hurricane::tab;
|
|
|
|
using Hurricane::DebugSession;
|
|
|
|
using Hurricane::ForEachIterator;
|
|
|
|
using Hurricane::Bug;
|
|
|
|
using Hurricane::Error;
|
|
|
|
using Hurricane::Warning;
|
|
|
|
using Hurricane::DataBase;
|
|
|
|
using Hurricane::Technology;
|
|
|
|
using Hurricane::Layer;
|
|
|
|
using Hurricane::BasicLayer;
|
|
|
|
using Hurricane::NetExternalComponents;
|
|
|
|
using CRL::AllianceFramework;
|
2010-04-23 08:13:54 -05:00
|
|
|
using CRL::Catalog;
|
|
|
|
using CRL::CatalogProperty;
|
2010-04-17 05:14:22 -05:00
|
|
|
using CRL::Measures;
|
|
|
|
using CRL::addMeasure;
|
|
|
|
using CRL::getMeasure;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Global Variables.
|
|
|
|
|
|
|
|
|
|
|
|
const char* missingKTBT =
|
|
|
|
"%s :\n\n"
|
|
|
|
" Cell %s do not have any Katabatic (or not yet created).\n";
|
|
|
|
|
|
|
|
const char* badMethod =
|
|
|
|
"%s :\n\n"
|
|
|
|
" No method id %ud (Cell %s).\n";
|
|
|
|
|
|
|
|
const char* lookupFailed =
|
|
|
|
"Katabatic::Extension::getDatas(Segment*) :\n\n"
|
|
|
|
" Cannot find AutoSegment associated to %s (internal error).\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "Katabatic::KatabaticEngine".
|
|
|
|
|
|
|
|
Name KatabaticEngine::_toolName = "Katabatic";
|
|
|
|
|
|
|
|
|
|
|
|
KatabaticEngine* KatabaticEngine::get ( const Cell* cell )
|
2013-12-03 18:58:58 -06:00
|
|
|
{ return static_cast<KatabaticEngine*>(ToolEngine::get(cell,staticGetName())); }
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
|
|
|
const Name& KatabaticEngine::staticGetName ()
|
2013-12-03 18:58:58 -06:00
|
|
|
{ return _toolName; }
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
|
|
|
const Name& KatabaticEngine::getName () const
|
2013-12-03 18:58:58 -06:00
|
|
|
{ return _toolName; }
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
2010-04-28 10:43:30 -05:00
|
|
|
KatabaticEngine::KatabaticEngine ( Cell* cell )
|
2010-03-09 09:24:29 -06:00
|
|
|
: ToolEngine (cell)
|
|
|
|
, _timer ()
|
2013-12-03 18:58:58 -06:00
|
|
|
, _state (EngineCreation)
|
|
|
|
, _flags (EngineDestroyBaseContact)
|
2010-06-18 09:03:16 -05:00
|
|
|
, _configuration (new ConfigurationConcrete())
|
2010-03-09 09:24:29 -06:00
|
|
|
, _gcellGrid (NULL)
|
* ./katabatic:
- New: ChipTools, regroup all datas and utilities to manage a full-chip
design.
- Change: In LoadGrByNet/GCellConfiguration::_GCell_xG_1Pad(), uses straight
perpandicular wires on top & right pads. The GCells under those connectors
are fully saturated, wires must go out as straight as possible.
- Change: In AutoHorizontal/AutoVertical, update the "terminal" flag after
slackening. This is to avoid global that are no longer connected to
terminals behave as such.
- Change: In AutoSegment::canMoveUp() & canPivotUp(), prevent all local segments
to go up. This is to avoid cluttering upper levels with small segments.
- Change: In GCellConfiguration, for xG_xL3, detect straight vertical topologies
and for them to be fixed (new flag FIXED_GLOBAL set by the topological
builder instead of the constructor). This prevent the router to do
stupid things...
To sets the "Fixed" flag *after* the axis of global segments have been
positionned correctly adds a "_toFixGlobals" static table lookup.
- Change: In GCell::stepDesaturate(), if less than one free track remains in
the upper layer, do not move up the segment. This allows from a minimum
free room for expansion.
- Change: In GCell::_getString(), display indexes and layer names in various
saturation tables.
- Change: In AutoSegment, allow move up of local Segment. ::moveUp() and
::canMoveUp() arguments go from booleans to flags, which are more
explicits.
2010-12-04 09:25:18 -06:00
|
|
|
, _chipTools (cell)
|
Add NetRoutingState (Property) on Nets to tell Kite what to do.
* New: In Katabatic, add the ability to decorate some (i.e. few) nets
with a state that indicate to Katabatic & Kite what to do with it.
The possible states are:
1. Fixed : all the wire are in fixed positions. The router cannot
move them and account them as obstacles.
2. ManualGlobalRoute : a user-defined topology is supplied. The
wires still have to be detailed route in "Detailed Pre-Route"
but will be skipped for the global routing and fixed for the
general Detailed route.
3. AutomaticGlobalRoute : ordinary nets, to be global routed then
detail routed.
4. Excluded : do not try to global or detail route thoses nets.
5. MixedPreRoute : mask combining Fixed and ManualGlobalRoute.
Not all nets have this property, only those that needs a special
processing.
To ease the access to the state, it is nested inside a
PrivateProperty in the net (NetRoutingProperty), with an extension
access class (NetRoutingExtension).
* New: In Kite, take account of NetRoutingState. Pointers to the
net's states are strored inside an internal map for faster access.
The property is *not* deleted when Kite is destroyed. The property
will remains until the Net itself is destroyed.
As a consequence, the lists that where passed to high level
function are removed as the information can now be accessed directly
through the net NetRoutingProperty.
* New: In Unicorn, in CgtMain, comply with the update interface.
* New: In documentation, update the User's Guide to explain the Pre-routed
step of Kite.
2014-07-02 07:36:58 -05:00
|
|
|
, _autoSegmentLut ()
|
|
|
|
, _autoContactLut ()
|
|
|
|
, _netRoutingStates ()
|
2010-04-17 05:14:22 -05:00
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
addMeasure<size_t>( cell, "Gates"
|
|
|
|
, AllianceFramework::getInstancesCount(cell,AllianceFramework::IgnoreFeeds
|
|
|
|
|AllianceFramework::Recursive) );
|
2010-04-17 05:14:22 -05:00
|
|
|
}
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::_postCreate ()
|
2013-12-03 18:58:58 -06:00
|
|
|
{ ToolEngine::_postCreate(); }
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::createDetailedGrid ()
|
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
_gcellGrid = GCellGrid::create( this );
|
|
|
|
Session::revalidate();
|
|
|
|
|
|
|
|
addMeasure<size_t>( getCell(), "GCells", _gcellGrid->getGCellVector()->size() );
|
|
|
|
|
|
|
|
if (getChipTools().isChip()) {
|
|
|
|
unsigned int columns = _gcellGrid->getColumns();
|
|
|
|
unsigned int rows = _gcellGrid->getRows();
|
2010-04-17 05:14:22 -05:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
for ( unsigned int depth=0 ; depth<8 ; ++depth ) {
|
|
|
|
// West.
|
|
|
|
forEach( GCell*, igcell, _gcellGrid->getGCellsColumn(depth,0,rows-1)) {
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "Setting as West Pad:" << (*igcell) << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
igcell->setUnderIoPad();
|
|
|
|
}
|
|
|
|
// East.
|
|
|
|
forEach( GCell*, igcell, _gcellGrid->getGCellsColumn(columns-1-depth,0,rows-1)) {
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "Setting as East Pad:" << (*igcell) << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
igcell->setUnderIoPad();
|
|
|
|
}
|
|
|
|
// South.
|
|
|
|
forEach( GCell*, igcell, _gcellGrid->getGCellsRow(depth,0,columns-1)) {
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "Setting as South Pad:" << (*igcell) << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
igcell->setUnderIoPad();
|
|
|
|
}
|
|
|
|
// North.
|
|
|
|
forEach( GCell*, igcell, _gcellGrid->getGCellsRow(rows-1-depth,0,columns-1)) {
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "Setting as North Pad:" << (*igcell) << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
igcell->setUnderIoPad();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-04-28 10:43:30 -05:00
|
|
|
KatabaticEngine* KatabaticEngine::create ( Cell* cell )
|
2010-03-09 09:24:29 -06:00
|
|
|
{
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "KatabaticEngine::create() - " << cell << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
KatabaticEngine* katabatic = new KatabaticEngine( cell );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
katabatic->_postCreate();
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
return katabatic;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
KatabaticEngine::~KatabaticEngine ()
|
2013-12-03 18:58:58 -06:00
|
|
|
{ delete _configuration; }
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::_preDestroy ()
|
|
|
|
{
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145,1) << "Katabatic::_preDestroy ()" << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (getState() < Katabatic::EngineGutted)
|
|
|
|
setState( Katabatic::EnginePreDestroying );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
_gutKatabatic();
|
|
|
|
_state = EngineGutted;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "About to delete base class ToolEngine." << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
ToolEngine::_preDestroy();
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "Exiting Katabatic::_preDestroy()." << endl;
|
|
|
|
cdebug.tabw(145,-1);
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
cmess2 << " - GCells := " << GCell::getAllocateds() << endl;
|
|
|
|
cmess2 << " - AutoContacts := " << AutoContact::getAllocateds() << endl;
|
|
|
|
cmess2 << " - AutoSegments := " << AutoSegment::getAllocateds() << endl;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::_gutKatabatic ()
|
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
Session::open( this );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
unsetFlags( EngineDestroyBaseContact|EngineDestroyBaseSegment );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (_state == EngineDriving) {
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145,1) << "Saving AutoContacts/AutoSegments." << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
Added support for "same layer" dogleg. Big fix for pad routing.
* Change: In Knik, in Vertex, add a "blocked" flag to signal disabled
vertexes in the grid (must not be used by the global router).
Modificate the Graph::getVertex() method so that when a vertex
is geometrically queried, if is a blocked one, return a non-blocked
neighbor. This mechanism is introduced to, at last, prevent the
global router to go *under* the pad in case of a commplete chip.
* New: In Katabatic, in AutoSegment, a new state has been added: "reduced".
A reduced segment is in the same layer as it's perpandiculars.
To be reduced, a segments has to be connected on source & target to
AutoContactTurn, both of the perpandiculars must be of the same layer
(below or above) and it's length must not exceed one pitch in the
perpandicular direction.
To reduce an AutoSegment, call ::reduce() and to revert the state,
call ::raise(). Two associated predicates are associated:
::canReduce() and ::mustRaise().
Note: No two adjacent segments can be reduced at the same time.
* Bug: In Katabatic, in GCellTopology, add a new method ::doRp_AccessPad()
to connect to the pads. Create wiring, fixed and non managed by
Katabatic, to connect the pad connector layer to the lowest routing
layers (depth 1 & 2). The former implementation was sometimes leading
to gaps (sheared contact) that *must not* occurs during the building
stage.
Remark: This bug did put under the light the fact that the initial
wiring must be created without gaps. Gaps are closed by making doglegs
on contacts. But this mechanism could only work when the database if
fully initialised (the cache is up to date). Otherwise various problems
arise, in the canonization process for example.
* New: In Katabatic, in AutoContactTerminal::getNativeConstraintBox(),
when anchored on a RoutingPad, now take account the potential rotation
of the Path's transformation. Here again, for the chip's pads.
* New: In Kite, support for reduced AutoSegment. TrackSegment associateds
to reduced AutoSegment are *not* inserted into track to become
effectively invisibles. When a segment becomes reduced, a TrackEvent
is generated to remove it. Conversely when it is raised a RoutingEvent
is created/rescheduled to insert it. All this is mostly managed inside
the Session::revalidate() method.
* New: In Kite, in KiteEngine::createGlobalGraph(), in case of a chip,
mark all global routing vertexes (Knik) that are under a pad, as blockeds.
* Bug: In Cumulus, in PadsCorona.Side.getAxis(), inversion between X and
Y coordinate of the chip size. Did not show until a non-square chip
was routed (i.e. our MIPS R3000).
* Change: In Stratus1, in st_placement.py add the ClockBuffer class for
backward compatibility with the MIPS32 bench. Have to review this
functionnality coming from the deprecated placeAndroute.py.
In st_instance.py, no longer creates the Plug ring of a Net.
In my opinion it just clutter the display until the P&R is called.
Can re-enable later as an option (in Unicorn).
* Change: In Unicorn, in cgt.py, more reliable way of loading then running
user supplied scripts. Borrowed from alliance-checker-toolkit doChip.py .
2015-08-16 16:29:28 -05:00
|
|
|
size_t fixedSegments = 0;
|
|
|
|
size_t sameLayerDoglegs = 0;
|
2013-12-03 18:58:58 -06:00
|
|
|
AutoSegmentLut::const_iterator isegment = _autoSegmentLut.begin();
|
|
|
|
for ( ; isegment != _autoSegmentLut.end() ; ++isegment ) {
|
Added support for "same layer" dogleg. Big fix for pad routing.
* Change: In Knik, in Vertex, add a "blocked" flag to signal disabled
vertexes in the grid (must not be used by the global router).
Modificate the Graph::getVertex() method so that when a vertex
is geometrically queried, if is a blocked one, return a non-blocked
neighbor. This mechanism is introduced to, at last, prevent the
global router to go *under* the pad in case of a commplete chip.
* New: In Katabatic, in AutoSegment, a new state has been added: "reduced".
A reduced segment is in the same layer as it's perpandiculars.
To be reduced, a segments has to be connected on source & target to
AutoContactTurn, both of the perpandiculars must be of the same layer
(below or above) and it's length must not exceed one pitch in the
perpandicular direction.
To reduce an AutoSegment, call ::reduce() and to revert the state,
call ::raise(). Two associated predicates are associated:
::canReduce() and ::mustRaise().
Note: No two adjacent segments can be reduced at the same time.
* Bug: In Katabatic, in GCellTopology, add a new method ::doRp_AccessPad()
to connect to the pads. Create wiring, fixed and non managed by
Katabatic, to connect the pad connector layer to the lowest routing
layers (depth 1 & 2). The former implementation was sometimes leading
to gaps (sheared contact) that *must not* occurs during the building
stage.
Remark: This bug did put under the light the fact that the initial
wiring must be created without gaps. Gaps are closed by making doglegs
on contacts. But this mechanism could only work when the database if
fully initialised (the cache is up to date). Otherwise various problems
arise, in the canonization process for example.
* New: In Katabatic, in AutoContactTerminal::getNativeConstraintBox(),
when anchored on a RoutingPad, now take account the potential rotation
of the Path's transformation. Here again, for the chip's pads.
* New: In Kite, support for reduced AutoSegment. TrackSegment associateds
to reduced AutoSegment are *not* inserted into track to become
effectively invisibles. When a segment becomes reduced, a TrackEvent
is generated to remove it. Conversely when it is raised a RoutingEvent
is created/rescheduled to insert it. All this is mostly managed inside
the Session::revalidate() method.
* New: In Kite, in KiteEngine::createGlobalGraph(), in case of a chip,
mark all global routing vertexes (Knik) that are under a pad, as blockeds.
* Bug: In Cumulus, in PadsCorona.Side.getAxis(), inversion between X and
Y coordinate of the chip size. Did not show until a non-square chip
was routed (i.e. our MIPS R3000).
* Change: In Stratus1, in st_placement.py add the ClockBuffer class for
backward compatibility with the MIPS32 bench. Have to review this
functionnality coming from the deprecated placeAndroute.py.
In st_instance.py, no longer creates the Plug ring of a Net.
In my opinion it just clutter the display until the P&R is called.
Can re-enable later as an option (in Unicorn).
* Change: In Unicorn, in cgt.py, more reliable way of loading then running
user supplied scripts. Borrowed from alliance-checker-toolkit doChip.py .
2015-08-16 16:29:28 -05:00
|
|
|
if ((*isegment).second->isFixed()) ++fixedSegments;
|
|
|
|
if ((*isegment).second->reduceDoglegLayer()) ++sameLayerDoglegs;
|
2013-12-03 18:58:58 -06:00
|
|
|
}
|
|
|
|
|
2010-03-09 09:24:29 -06:00
|
|
|
cmess1 << " o Driving Hurricane data-base." << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
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;
|
Added support for "same layer" dogleg. Big fix for pad routing.
* Change: In Knik, in Vertex, add a "blocked" flag to signal disabled
vertexes in the grid (must not be used by the global router).
Modificate the Graph::getVertex() method so that when a vertex
is geometrically queried, if is a blocked one, return a non-blocked
neighbor. This mechanism is introduced to, at last, prevent the
global router to go *under* the pad in case of a commplete chip.
* New: In Katabatic, in AutoSegment, a new state has been added: "reduced".
A reduced segment is in the same layer as it's perpandiculars.
To be reduced, a segments has to be connected on source & target to
AutoContactTurn, both of the perpandiculars must be of the same layer
(below or above) and it's length must not exceed one pitch in the
perpandicular direction.
To reduce an AutoSegment, call ::reduce() and to revert the state,
call ::raise(). Two associated predicates are associated:
::canReduce() and ::mustRaise().
Note: No two adjacent segments can be reduced at the same time.
* Bug: In Katabatic, in GCellTopology, add a new method ::doRp_AccessPad()
to connect to the pads. Create wiring, fixed and non managed by
Katabatic, to connect the pad connector layer to the lowest routing
layers (depth 1 & 2). The former implementation was sometimes leading
to gaps (sheared contact) that *must not* occurs during the building
stage.
Remark: This bug did put under the light the fact that the initial
wiring must be created without gaps. Gaps are closed by making doglegs
on contacts. But this mechanism could only work when the database if
fully initialised (the cache is up to date). Otherwise various problems
arise, in the canonization process for example.
* New: In Katabatic, in AutoContactTerminal::getNativeConstraintBox(),
when anchored on a RoutingPad, now take account the potential rotation
of the Path's transformation. Here again, for the chip's pads.
* New: In Kite, support for reduced AutoSegment. TrackSegment associateds
to reduced AutoSegment are *not* inserted into track to become
effectively invisibles. When a segment becomes reduced, a TrackEvent
is generated to remove it. Conversely when it is raised a RoutingEvent
is created/rescheduled to insert it. All this is mostly managed inside
the Session::revalidate() method.
* New: In Kite, in KiteEngine::createGlobalGraph(), in case of a chip,
mark all global routing vertexes (Knik) that are under a pad, as blockeds.
* Bug: In Cumulus, in PadsCorona.Side.getAxis(), inversion between X and
Y coordinate of the chip size. Did not show until a non-square chip
was routed (i.e. our MIPS R3000).
* Change: In Stratus1, in st_placement.py add the ClockBuffer class for
backward compatibility with the MIPS32 bench. Have to review this
functionnality coming from the deprecated placeAndroute.py.
In st_instance.py, no longer creates the Plug ring of a Net.
In my opinion it just clutter the display until the P&R is called.
Can re-enable later as an option (in Unicorn).
* Change: In Unicorn, in cgt.py, more reliable way of loading then running
user supplied scripts. Borrowed from alliance-checker-toolkit doChip.py .
2015-08-16 16:29:28 -05:00
|
|
|
cmess1 << Dots::asSizet(" - Same Layer doglegs" ,sameLayerDoglegs) << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
forEach ( Net*, inet, _cell->getNets() )
|
2013-12-03 18:58:58 -06:00
|
|
|
_saveNet( *inet );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
//_autoContactLut.clear ();
|
|
|
|
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.tabw(145,-1);
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (_state < EngineGutted ) {
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "Gutting Katabatic." << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
_state = EngineGutted;
|
|
|
|
setFlags( EngineDestroyBaseContact );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
_destroyAutoSegments();
|
|
|
|
_destroyAutoContacts();
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (_gcellGrid) {
|
|
|
|
_gcellGrid->destroy();
|
2010-03-09 09:24:29 -06:00
|
|
|
_gcellGrid = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
Session::close();
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
AutoSegment* KatabaticEngine::_lookup ( Segment* segment ) const
|
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
AutoSegmentLut::const_iterator it = _autoSegmentLut.find( segment );
|
|
|
|
if (it == _autoSegmentLut.end()) return NULL;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
return (*it).second;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::_link ( AutoSegment* autoSegment )
|
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
if (_state > EngineActive) return;
|
|
|
|
_autoSegmentLut[ autoSegment->base() ] = autoSegment;
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::_unlink ( AutoSegment* autoSegment )
|
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
if (_state > EngineDriving) return;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
AutoSegmentLut::iterator it = _autoSegmentLut.find( autoSegment->base() );
|
|
|
|
if (it != _autoSegmentLut.end())
|
|
|
|
_autoSegmentLut.erase( it );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
AutoContact* KatabaticEngine::_lookup ( Contact* contact ) const
|
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
AutoContactLut::const_iterator it = _autoContactLut.find( contact );
|
|
|
|
if (it == _autoContactLut.end()) {
|
2010-03-09 09:24:29 -06:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
return (*it).second;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::_link ( AutoContact* autoContact )
|
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
if (_state > EngineActive) return;
|
2010-03-09 09:24:29 -06:00
|
|
|
_autoContactLut [ autoContact->base() ] = autoContact;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::_unlink ( AutoContact* autoContact )
|
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
if ( _state > EngineActive ) return;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
AutoContactLut::iterator it = _autoContactLut.find( autoContact->base() );
|
|
|
|
if (it != _autoContactLut.end())
|
|
|
|
_autoContactLut.erase( it );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::xmlWriteGCellGrid ( const string& fileName )
|
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
ofstream file (fileName.c_str());
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
xmlWriteGCellGrid( file );
|
2010-03-09 09:24:29 -06:00
|
|
|
file.close ();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::xmlWriteGCellGrid ( ostream& o )
|
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
if (_gcellGrid)
|
|
|
|
_gcellGrid->_xmlWrite( o );
|
2010-03-09 09:24:29 -06:00
|
|
|
else
|
|
|
|
cerr << Error("Cannot dump GCellGrid: not allocated yet.") << endl;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::startMeasures ()
|
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
_timer.resetIncrease();
|
|
|
|
_timer.start();
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::stopMeasures ()
|
2013-12-03 18:58:58 -06:00
|
|
|
{ _timer.stop(); }
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
2010-04-17 05:14:22 -05:00
|
|
|
void KatabaticEngine::printMeasures ( const string& tag ) const
|
2010-03-09 09:24:29 -06:00
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
ostringstream result;
|
|
|
|
|
|
|
|
result << Timer::getStringTime(_timer.getCombTime())
|
|
|
|
<< ", " << Timer::getStringMemory(_timer.getIncrease());
|
|
|
|
cmess1 << Dots::asString( " - Done in", result.str() ) << endl;
|
|
|
|
|
|
|
|
result.str("");
|
|
|
|
result << _timer.getCombTime()
|
|
|
|
<< "s, +" << (_timer.getIncrease()>>10) << "Kb/"
|
|
|
|
<< (_timer.getMemorySize()>>10) << "Kb";
|
|
|
|
cmess2 << Dots::asString( " - Raw measurements", result.str() ) << endl;
|
|
|
|
|
2014-07-06 17:42:38 -05:00
|
|
|
if (not tag.empty()) {
|
2013-12-03 18:58:58 -06:00
|
|
|
addMeasure<double>( getCell(), tag+"T", _timer.getCombTime () );
|
|
|
|
addMeasure<size_t>( getCell(), tag+"S", (_timer.getMemorySize() >> 20) );
|
2010-04-17 05:14:22 -05:00
|
|
|
}
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool KatabaticEngine::_check ( const char* message ) const
|
|
|
|
{
|
|
|
|
bool coherency = true;
|
2013-12-03 18:58:58 -06:00
|
|
|
if (message)
|
2010-03-09 09:24:29 -06:00
|
|
|
cerr << " o checking Katabatic DB (" << message << ")." << endl;
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
AutoSegmentLut::const_iterator it = _autoSegmentLut.begin();
|
|
|
|
AutoSegmentLut::const_iterator end = _autoSegmentLut.end ();
|
2010-03-09 09:24:29 -06:00
|
|
|
for ( ; it != end ; it++ )
|
Support of RoutingGauge, part 2.
In Katabatic & Kite, remove all hard-coded values related to track pitches.
* New: In <Session>, add more convenience function to access RoutingGauge
characteristics.
* New: In <AutoSegment>, <AutoContact>, add support for the "depth spin",
that is, if the source/target contacts are going "top" or "down".
Used to compute the perpandicular pitch. Need a small modification
of the revalidation mechanism. The observers of <AutoSegment> are
notified when the spin changes.
* New: In <AutoSegment>, the getPPitch() method allow to compute the
"perpandicular pitch". For now it is simply the greatest from the
source perpandicular pitch and the target perpandicular pitch.
Make uses of the "depth spin".
* New: In <TrackElement>, <TrackSegment>, cache the perpandicular pitch.
Updated through the notification from the observable.
2014-05-19 10:58:38 -05:00
|
|
|
coherency = it->second->_check() and coherency;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
vector<GCell*>::const_iterator itGCell = _gcellGrid->getGCellVector()->begin();
|
|
|
|
vector<GCell*>::const_iterator endGCell = _gcellGrid->getGCellVector()->end();
|
|
|
|
for ( ; itGCell != endGCell ; itGCell++ ) {
|
2013-12-03 18:58:58 -06:00
|
|
|
vector<AutoContact*>::const_iterator itAutoContact = (*itGCell)->getContacts().begin();
|
|
|
|
vector<AutoContact*>::const_iterator endAutoContact = (*itGCell)->getContacts().end();
|
2010-03-09 09:24:29 -06:00
|
|
|
for ( ; itAutoContact != endAutoContact ; itAutoContact++ ) {
|
2013-12-03 18:58:58 -06:00
|
|
|
(*itAutoContact)->checkTopology();
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (message) cerr << " - completed." << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
return coherency;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
void KatabaticEngine::refresh ( unsigned int flags )
|
|
|
|
{ if (_gcellGrid) _gcellGrid->updateContacts( flags ); }
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::_destroyAutoSegments ()
|
|
|
|
{
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "Katabatic::_destroyAutoSegments ()" << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
size_t expandeds = 0;
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
AutoSegmentLut::iterator it = _autoSegmentLut.begin();
|
|
|
|
AutoSegmentLut::iterator end = _autoSegmentLut.end ();
|
2010-03-09 09:24:29 -06:00
|
|
|
for ( ; it != end ; it++ ) {
|
2013-12-03 18:58:58 -06:00
|
|
|
expandeds++;
|
|
|
|
it->second->destroy();
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
2013-12-03 18:58:58 -06:00
|
|
|
if (_state == EngineDriving)
|
2010-03-09 09:24:29 -06:00
|
|
|
cerr << " - Expandeds := " << expandeds << endl;
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
_autoSegmentLut.clear();
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::_destroyAutoContacts ()
|
|
|
|
{
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "Katabatic::_destroyAutoContacts ()" << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
AutoContactLut::iterator it = _autoContactLut.begin();
|
|
|
|
AutoContactLut::iterator end = _autoContactLut.end ();
|
2010-03-09 09:24:29 -06:00
|
|
|
for ( ; it != end ; it++ )
|
2013-12-03 18:58:58 -06:00
|
|
|
it->second->destroy();
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
_autoContactLut.clear();
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Configuration* KatabaticEngine::getConfiguration ()
|
2010-04-28 10:43:30 -05:00
|
|
|
{ return _configuration; }
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
Add NetRoutingState (Property) on Nets to tell Kite what to do.
* New: In Katabatic, add the ability to decorate some (i.e. few) nets
with a state that indicate to Katabatic & Kite what to do with it.
The possible states are:
1. Fixed : all the wire are in fixed positions. The router cannot
move them and account them as obstacles.
2. ManualGlobalRoute : a user-defined topology is supplied. The
wires still have to be detailed route in "Detailed Pre-Route"
but will be skipped for the global routing and fixed for the
general Detailed route.
3. AutomaticGlobalRoute : ordinary nets, to be global routed then
detail routed.
4. Excluded : do not try to global or detail route thoses nets.
5. MixedPreRoute : mask combining Fixed and ManualGlobalRoute.
Not all nets have this property, only those that needs a special
processing.
To ease the access to the state, it is nested inside a
PrivateProperty in the net (NetRoutingProperty), with an extension
access class (NetRoutingExtension).
* New: In Kite, take account of NetRoutingState. Pointers to the
net's states are strored inside an internal map for faster access.
The property is *not* deleted when Kite is destroyed. The property
will remains until the Net itself is destroyed.
As a consequence, the lists that where passed to high level
function are removed as the information can now be accessed directly
through the net NetRoutingProperty.
* New: In Unicorn, in CgtMain, comply with the update interface.
* New: In documentation, update the User's Guide to explain the Pre-routed
step of Kite.
2014-07-02 07:36:58 -05:00
|
|
|
void KatabaticEngine::findSpecialNets ()
|
2010-03-09 09:24:29 -06:00
|
|
|
{
|
Add NetRoutingState (Property) on Nets to tell Kite what to do.
* New: In Katabatic, add the ability to decorate some (i.e. few) nets
with a state that indicate to Katabatic & Kite what to do with it.
The possible states are:
1. Fixed : all the wire are in fixed positions. The router cannot
move them and account them as obstacles.
2. ManualGlobalRoute : a user-defined topology is supplied. The
wires still have to be detailed route in "Detailed Pre-Route"
but will be skipped for the global routing and fixed for the
general Detailed route.
3. AutomaticGlobalRoute : ordinary nets, to be global routed then
detail routed.
4. Excluded : do not try to global or detail route thoses nets.
5. MixedPreRoute : mask combining Fixed and ManualGlobalRoute.
Not all nets have this property, only those that needs a special
processing.
To ease the access to the state, it is nested inside a
PrivateProperty in the net (NetRoutingProperty), with an extension
access class (NetRoutingExtension).
* New: In Kite, take account of NetRoutingState. Pointers to the
net's states are strored inside an internal map for faster access.
The property is *not* deleted when Kite is destroyed. The property
will remains until the Net itself is destroyed.
As a consequence, the lists that where passed to high level
function are removed as the information can now be accessed directly
through the net NetRoutingProperty.
* New: In Unicorn, in CgtMain, comply with the update interface.
* New: In documentation, update the User's Guide to explain the Pre-routed
step of Kite.
2014-07-02 07:36:58 -05:00
|
|
|
AllianceFramework* af = AllianceFramework::get();
|
|
|
|
forEach ( Net*, net, _cell->getNets() ) {
|
|
|
|
|
|
|
|
const char* excludedType = NULL;
|
|
|
|
if (net->getType() == Net::Type::POWER ) excludedType = "POWER";
|
|
|
|
if (net->getType() == Net::Type::GROUND) excludedType = "GROUND";
|
|
|
|
//if (net->getType() == Net::Type::CLOCK ) excludedType = "CLOCK";
|
|
|
|
if (excludedType) {
|
|
|
|
cparanoid << Warning( "%s is not a routable net (%s,excluded)."
|
|
|
|
, getString(*net).c_str(), excludedType ) << endl;
|
|
|
|
}
|
|
|
|
if (af->isBLOCKAGE(net->getName())) excludedType = "BLOCKAGE";
|
|
|
|
if (excludedType) {
|
|
|
|
NetRoutingState* state = getRoutingState( *net, KbCreate );
|
|
|
|
state->setFlags( NetRoutingState::Fixed );
|
|
|
|
}
|
|
|
|
} // forEach( Net* )
|
|
|
|
}
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
Add NetRoutingState (Property) on Nets to tell Kite what to do.
* New: In Katabatic, add the ability to decorate some (i.e. few) nets
with a state that indicate to Katabatic & Kite what to do with it.
The possible states are:
1. Fixed : all the wire are in fixed positions. The router cannot
move them and account them as obstacles.
2. ManualGlobalRoute : a user-defined topology is supplied. The
wires still have to be detailed route in "Detailed Pre-Route"
but will be skipped for the global routing and fixed for the
general Detailed route.
3. AutomaticGlobalRoute : ordinary nets, to be global routed then
detail routed.
4. Excluded : do not try to global or detail route thoses nets.
5. MixedPreRoute : mask combining Fixed and ManualGlobalRoute.
Not all nets have this property, only those that needs a special
processing.
To ease the access to the state, it is nested inside a
PrivateProperty in the net (NetRoutingProperty), with an extension
access class (NetRoutingExtension).
* New: In Kite, take account of NetRoutingState. Pointers to the
net's states are strored inside an internal map for faster access.
The property is *not* deleted when Kite is destroyed. The property
will remains until the Net itself is destroyed.
As a consequence, the lists that where passed to high level
function are removed as the information can now be accessed directly
through the net NetRoutingProperty.
* New: In Unicorn, in CgtMain, comply with the update interface.
* New: In documentation, update the User's Guide to explain the Pre-routed
step of Kite.
2014-07-02 07:36:58 -05:00
|
|
|
NetRoutingState* KatabaticEngine::getRoutingState ( Net* net, unsigned int flags )
|
|
|
|
{
|
|
|
|
NetRoutingState* state = NetRoutingExtension::get( net );
|
|
|
|
|
|
|
|
if (state) {
|
|
|
|
NetRoutingStates::iterator istate = _netRoutingStates.find( net->getName() );
|
|
|
|
if (istate != _netRoutingStates.end()) {
|
|
|
|
if (istate->second != state) {
|
|
|
|
cerr << Error( "KatabaticEngine::updateRoutingStates() - %s incoherency between property and LUT:\n"
|
|
|
|
" Property:%x vs. LUT:%x, re-init LUT from property."
|
|
|
|
, getString(net->getName()).c_str()
|
|
|
|
, (void*)state
|
|
|
|
, (void*)(istate->second)) << endl;
|
|
|
|
_netRoutingStates.insert( make_pair(net->getName(), state) );
|
* ./katabatic:
- Change: In loadGlobalRouting(), more exlicit message as to why a net is
filtered out the routing set (POWER, GROUND, CLOCK or BLOCKAGE).
- New: ChipTool, module with utilities specific to chip routing. Containing
a function to pre-break wires around a block.
- New: In loadGlobalRouting/GCellConfiguration, adds supports for RoutingPad
connected on chip's pad.
- New: In GCellGrid/GCell, can compute the density in three modes: average,
max of H/V and max of layer. Currently implemented in getMaxHVDensity(),
should be unificated with getDensity(). Used for display purposes.
- Bug: In AutoContact, when splitting a contact, add a specific check for
"one layer span".
- Bug: In AutoSegment::canMoveUp(), do not move up fixed segments.
2010-11-16 07:59:38 -06:00
|
|
|
}
|
Add NetRoutingState (Property) on Nets to tell Kite what to do.
* New: In Katabatic, add the ability to decorate some (i.e. few) nets
with a state that indicate to Katabatic & Kite what to do with it.
The possible states are:
1. Fixed : all the wire are in fixed positions. The router cannot
move them and account them as obstacles.
2. ManualGlobalRoute : a user-defined topology is supplied. The
wires still have to be detailed route in "Detailed Pre-Route"
but will be skipped for the global routing and fixed for the
general Detailed route.
3. AutomaticGlobalRoute : ordinary nets, to be global routed then
detail routed.
4. Excluded : do not try to global or detail route thoses nets.
5. MixedPreRoute : mask combining Fixed and ManualGlobalRoute.
Not all nets have this property, only those that needs a special
processing.
To ease the access to the state, it is nested inside a
PrivateProperty in the net (NetRoutingProperty), with an extension
access class (NetRoutingExtension).
* New: In Kite, take account of NetRoutingState. Pointers to the
net's states are strored inside an internal map for faster access.
The property is *not* deleted when Kite is destroyed. The property
will remains until the Net itself is destroyed.
As a consequence, the lists that where passed to high level
function are removed as the information can now be accessed directly
through the net NetRoutingProperty.
* New: In Unicorn, in CgtMain, comply with the update interface.
* New: In documentation, update the User's Guide to explain the Pre-routed
step of Kite.
2014-07-02 07:36:58 -05:00
|
|
|
return state;
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
} else {
|
Add NetRoutingState (Property) on Nets to tell Kite what to do.
* New: In Katabatic, add the ability to decorate some (i.e. few) nets
with a state that indicate to Katabatic & Kite what to do with it.
The possible states are:
1. Fixed : all the wire are in fixed positions. The router cannot
move them and account them as obstacles.
2. ManualGlobalRoute : a user-defined topology is supplied. The
wires still have to be detailed route in "Detailed Pre-Route"
but will be skipped for the global routing and fixed for the
general Detailed route.
3. AutomaticGlobalRoute : ordinary nets, to be global routed then
detail routed.
4. Excluded : do not try to global or detail route thoses nets.
5. MixedPreRoute : mask combining Fixed and ManualGlobalRoute.
Not all nets have this property, only those that needs a special
processing.
To ease the access to the state, it is nested inside a
PrivateProperty in the net (NetRoutingProperty), with an extension
access class (NetRoutingExtension).
* New: In Kite, take account of NetRoutingState. Pointers to the
net's states are strored inside an internal map for faster access.
The property is *not* deleted when Kite is destroyed. The property
will remains until the Net itself is destroyed.
As a consequence, the lists that where passed to high level
function are removed as the information can now be accessed directly
through the net NetRoutingProperty.
* New: In Unicorn, in CgtMain, comply with the update interface.
* New: In documentation, update the User's Guide to explain the Pre-routed
step of Kite.
2014-07-02 07:36:58 -05:00
|
|
|
if (not (flags & KbCreate)) return NULL;
|
|
|
|
|
|
|
|
state = NetRoutingExtension::create( net );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
Add NetRoutingState (Property) on Nets to tell Kite what to do.
* New: In Katabatic, add the ability to decorate some (i.e. few) nets
with a state that indicate to Katabatic & Kite what to do with it.
The possible states are:
1. Fixed : all the wire are in fixed positions. The router cannot
move them and account them as obstacles.
2. ManualGlobalRoute : a user-defined topology is supplied. The
wires still have to be detailed route in "Detailed Pre-Route"
but will be skipped for the global routing and fixed for the
general Detailed route.
3. AutomaticGlobalRoute : ordinary nets, to be global routed then
detail routed.
4. Excluded : do not try to global or detail route thoses nets.
5. MixedPreRoute : mask combining Fixed and ManualGlobalRoute.
Not all nets have this property, only those that needs a special
processing.
To ease the access to the state, it is nested inside a
PrivateProperty in the net (NetRoutingProperty), with an extension
access class (NetRoutingExtension).
* New: In Kite, take account of NetRoutingState. Pointers to the
net's states are strored inside an internal map for faster access.
The property is *not* deleted when Kite is destroyed. The property
will remains until the Net itself is destroyed.
As a consequence, the lists that where passed to high level
function are removed as the information can now be accessed directly
through the net NetRoutingProperty.
* New: In Unicorn, in CgtMain, comply with the update interface.
* New: In documentation, update the User's Guide to explain the Pre-routed
step of Kite.
2014-07-02 07:36:58 -05:00
|
|
|
_netRoutingStates.insert( make_pair(net->getName(), state) );
|
|
|
|
return state;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::loadGlobalRouting ( unsigned int method )
|
|
|
|
{
|
|
|
|
if (_state < EngineGlobalLoaded)
|
|
|
|
throw Error ("KatabaticEngine::loadGlobalRouting() : global routing not present yet.");
|
|
|
|
|
|
|
|
if (_state > EngineGlobalLoaded)
|
|
|
|
throw Error ("KatabaticEngine::loadGlobalRouting() : global routing already loaded.");
|
|
|
|
|
2010-03-09 09:24:29 -06:00
|
|
|
switch ( method ) {
|
2013-12-03 18:58:58 -06:00
|
|
|
case EngineLoadGrByNet: _loadGrByNet(); break;
|
|
|
|
case EngineLoadGrByGCell:
|
2010-03-09 09:24:29 -06:00
|
|
|
default:
|
2013-12-03 18:58:58 -06:00
|
|
|
throw Error( badMethod
|
|
|
|
, "Katabatic::loadGlobalRouting()"
|
|
|
|
, method
|
|
|
|
, getString(_cell).c_str()
|
|
|
|
);
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
_state = EngineActive;
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::finalizeLayout ()
|
|
|
|
{
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "Katabatic::finalizeLayout()" << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
if (_state > EngineDriving) return;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
_state = EngineDriving;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
startMeasures();
|
|
|
|
_gutKatabatic();
|
|
|
|
stopMeasures ();
|
|
|
|
printMeasures( "fin" );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
_state = EngineGutted;
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::_alignate ( Net* net )
|
|
|
|
{
|
2016-05-17 16:00:06 -05:00
|
|
|
DebugSession::open( net, 140, 150 );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(149) << "Katabatic::_alignate( " << net << " )" << endl;
|
|
|
|
cdebug.tabw(145,1);
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
//cmess2 << " - " << getString(net) << endl;
|
|
|
|
|
|
|
|
set<Segment*> exploredSegments;
|
|
|
|
vector<AutoSegment*> unexploreds;
|
|
|
|
vector<AutoSegment*> aligneds;
|
|
|
|
|
|
|
|
forEach ( Component*, icomponent, net->getComponents() ) {
|
|
|
|
Segment* segment = dynamic_cast<Segment*>(*icomponent);
|
2013-12-03 18:58:58 -06:00
|
|
|
if (segment) {
|
|
|
|
AutoSegment* seedSegment = Session::lookup( segment );
|
|
|
|
if (seedSegment) unexploreds.push_back( seedSegment );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
}
|
2013-12-03 18:58:58 -06:00
|
|
|
sort( unexploreds.begin(), unexploreds.end(), AutoSegment::CompareId() );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
for ( size_t i=0 ; i<unexploreds.size() ; i++ ) {
|
|
|
|
AutoSegment* seedSegment = unexploreds[i];
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (exploredSegments.find(seedSegment->base()) == exploredSegments.end()) {
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "New chunk from: " << seedSegment << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
aligneds.push_back( seedSegment );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
forEach ( AutoSegment*, collapsed, seedSegment->getAligneds() ) {
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "Aligned: " << *collapsed << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
aligneds.push_back( *collapsed );
|
|
|
|
exploredSegments.insert( collapsed->base() );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.tabw(145,1);
|
2013-12-03 18:58:58 -06:00
|
|
|
sort( aligneds.begin(), aligneds.end(), AutoSegment::CompareId() );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "Seed: " << (void*)aligneds[0]->base() << " " << aligneds[0] << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
for ( size_t j=1 ; j<aligneds.size() ; j++ ) {
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "Secondary: " << (void*)(aligneds[j]->base()) << " " << aligneds[j] << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(149) << "Align on " << aligneds[0]
|
Support of RoutingGauge, part 2.
In Katabatic & Kite, remove all hard-coded values related to track pitches.
* New: In <Session>, add more convenience function to access RoutingGauge
characteristics.
* New: In <AutoSegment>, <AutoContact>, add support for the "depth spin",
that is, if the source/target contacts are going "top" or "down".
Used to compute the perpandicular pitch. Need a small modification
of the revalidation mechanism. The observers of <AutoSegment> are
notified when the spin changes.
* New: In <AutoSegment>, the getPPitch() method allow to compute the
"perpandicular pitch". For now it is simply the greatest from the
source perpandicular pitch and the target perpandicular pitch.
Make uses of the "depth spin".
* New: In <TrackElement>, <TrackSegment>, cache the perpandicular pitch.
Updated through the notification from the observable.
2014-05-19 10:58:38 -05:00
|
|
|
<< " " << DbU::toLambda(aligneds[0]->getAxis()) << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
aligneds[0]->setAxis( aligneds[0]->getAxis(), KbRealignate );
|
|
|
|
aligneds.clear();
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.tabw(145,-1);
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.tabw(145,-1);
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
DebugSession::close();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::updateNetTopology ( Net* net )
|
|
|
|
{
|
2016-05-17 16:00:06 -05:00
|
|
|
DebugSession::open( net, 140, 150 );
|
2013-12-03 18:58:58 -06:00
|
|
|
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(149) << "Katabatic::updateNetTopology( " << net << " )" << endl;
|
|
|
|
cdebug.tabw(145,1);
|
2013-12-03 18:58:58 -06:00
|
|
|
|
|
|
|
vector<AutoContact*> contacts;
|
|
|
|
forEach ( Component*, icomponent, net->getComponents() ) {
|
|
|
|
Contact* contact = dynamic_cast<Contact*>( *icomponent );
|
|
|
|
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();
|
|
|
|
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.tabw(145,-1);
|
2013-12-03 18:58:58 -06:00
|
|
|
DebugSession::close();
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::_computeNetTerminals ( Net* net )
|
|
|
|
{
|
2016-05-17 16:00:06 -05:00
|
|
|
DebugSession::open( net, 140, 150 );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(149) << "Katabatic::_computeNetTerminals( " << net << " )" << endl;
|
|
|
|
cdebug.tabw(145,1);
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
vector<AutoSegment*> segments;
|
|
|
|
forEach ( Segment*, segment, net->getSegments() ) {
|
2013-12-03 18:58:58 -06:00
|
|
|
AutoSegment* autoSegment = Session::lookup( *segment );
|
|
|
|
if (autoSegment == NULL) continue;
|
|
|
|
if (autoSegment->isInvalidated()) autoSegment->computeTerminal();
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.tabw(145,-1);
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
DebugSession::close();
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::_saveNet ( Net* net )
|
|
|
|
{
|
2016-05-17 16:00:06 -05:00
|
|
|
DebugSession::open( net, 140, 150 );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "Katabatic::_saveNet() " << net << endl;
|
|
|
|
cdebug.tabw(145,1);
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
#if 0
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "Deleting zero-length segments." << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
vector<Segment*> nullSegments;
|
|
|
|
set<const Layer*> connectedLayers;
|
|
|
|
|
|
|
|
forEach ( Segment*, segment, net->getSegments() ) {
|
2013-12-03 18:58:58 -06:00
|
|
|
if (segment->getLength()) {
|
|
|
|
if (net->isExternal()) {
|
|
|
|
NetExternalComponents::setExternal( *segment );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (Session::lookup(*segment) == NULL) {
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "* Not associated to an AutoSegment: " << *segment << endl;
|
* ./katabatic:
- Change: In loadGlobalRouting(), more exlicit message as to why a net is
filtered out the routing set (POWER, GROUND, CLOCK or BLOCKAGE).
- New: ChipTool, module with utilities specific to chip routing. Containing
a function to pre-break wires around a block.
- New: In loadGlobalRouting/GCellConfiguration, adds supports for RoutingPad
connected on chip's pad.
- New: In GCellGrid/GCell, can compute the density in three modes: average,
max of H/V and max of layer. Currently implemented in getMaxHVDensity(),
should be unificated with getDensity(). Used for display purposes.
- Bug: In AutoContact, when splitting a contact, add a specific check for
"one layer span".
- Bug: In AutoSegment::canMoveUp(), do not move up fixed segments.
2010-11-16 07:59:38 -06:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (not isTopAndBottomConnected(*segment,connectedLayers)) {
|
|
|
|
nullSegments.push_back( *segment );
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "* Null Length: " << *segment << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
}
|
2013-12-03 18:58:58 -06:00
|
|
|
|
|
|
|
setFlags( EngineDestroyBaseSegment );
|
2010-03-09 09:24:29 -06:00
|
|
|
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());
|
|
|
|
|
* ./katabatic:
- Change: In loadGlobalRouting(), more exlicit message as to why a net is
filtered out the routing set (POWER, GROUND, CLOCK or BLOCKAGE).
- New: ChipTool, module with utilities specific to chip routing. Containing
a function to pre-break wires around a block.
- New: In loadGlobalRouting/GCellConfiguration, adds supports for RoutingPad
connected on chip's pad.
- New: In GCellGrid/GCell, can compute the density in three modes: average,
max of H/V and max of layer. Currently implemented in getMaxHVDensity(),
should be unificated with getDensity(). Used for display purposes.
- Bug: In AutoContact, when splitting a contact, add a specific check for
"one layer span".
- Bug: In AutoSegment::canMoveUp(), do not move up fixed segments.
2010-11-16 07:59:38 -06:00
|
|
|
if ( (source == NULL) or (target == NULL) ) {
|
|
|
|
cerr << Error("Unconnected source/target on %s.",getString(nullSegments[i]).c_str()) << endl;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (source->getAnchor()) {
|
|
|
|
if (target->getAnchor()) {
|
2010-03-09 09:24:29 -06:00
|
|
|
continue;
|
|
|
|
//cerr << Bug("Both source & target are anchored while deleting zero-length segment:\n"
|
|
|
|
// " %s.",getString(nullSegments[i]).c_str()) << endl;
|
|
|
|
} else
|
2013-12-03 18:58:58 -06:00
|
|
|
swap( source, target );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "Deleting: " << nullSegments[i] << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
if (isTopAndBottomConnected(nullSegments[i],connectedLayers)) {
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "Deletion cancelled, no longer top or bottom connected." << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "* Source: " << (void*)source << " " << source << endl;
|
|
|
|
cdebug.log(145) << "* Target: " << (void*)target << " " << target << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
const Layer* layer = DataBase::getDB()->getTechnology()
|
2013-12-03 18:58:58 -06:00
|
|
|
->getViaBetween( *connectedLayers.begin(), *connectedLayers.rbegin() );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << *connectedLayers.begin() << " + " << *connectedLayers.rbegin() << endl;
|
|
|
|
cdebug.log(145) << "* Shrink layer: " << layer << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
if ( !layer ) {
|
|
|
|
cerr << Error("NULL contact layer while deleting %s."
|
|
|
|
,getString(nullSegments[i]).c_str()) << endl;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
Session::lookup( nullSegments[i] )->destroy ();
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
vector<Hook*> slaveHooks;
|
|
|
|
Hook* masterHook = source->getBodyHook()->getPreviousMasterHook();
|
|
|
|
|
|
|
|
while ( masterHook->getNextHook() != source->getBodyHook() ) {
|
2013-12-03 18:58:58 -06:00
|
|
|
slaveHooks.push_back( masterHook->getNextHook() );
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << "* detach: "
|
2010-03-09 09:24:29 -06:00
|
|
|
<< (void*)masterHook->getNextHook()->getComponent()
|
|
|
|
<< " " << masterHook->getNextHook()->getComponent() << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
masterHook->getNextHook()->detach();
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
2013-12-03 18:58:58 -06:00
|
|
|
source->destroy();
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
masterHook = target->getBodyHook();
|
2010-03-09 09:24:29 -06:00
|
|
|
for ( size_t j=0 ; j < slaveHooks.size() ; j++ ) {
|
2013-12-03 18:58:58 -06:00
|
|
|
slaveHooks[j]->attach( masterHook );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(145) << (void*)target << " " << target << " setLayer: " << layer << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
target->setLayer( layer );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
2013-12-03 18:58:58 -06:00
|
|
|
unsetFlags( EngineDestroyBaseSegment );
|
|
|
|
#endif
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.tabw(145,-1);
|
2013-12-03 18:58:58 -06:00
|
|
|
DebugSession::close();
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::_check ( Net* net ) const
|
|
|
|
{
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(149,1) << "Checking " << net << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
forEach ( Segment*, isegment, net->getComponents().getSubSet<Segment*>() ) {
|
|
|
|
AutoSegment* autoSegment = _lookup ( *isegment );
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(149) << autoSegment << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
if ( autoSegment ) {
|
|
|
|
AutoContact* autoContact = autoSegment->getAutoSource();
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(149) << autoContact << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
if ( autoContact ) autoContact->checkTopology ();
|
|
|
|
|
|
|
|
autoContact = autoSegment->getAutoTarget();
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.log(149) << autoContact << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
if ( autoContact ) autoContact->checkTopology ();
|
|
|
|
}
|
|
|
|
}
|
2016-05-17 16:00:06 -05:00
|
|
|
cdebug.tabw(149,-1);
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::_print ( Net* net ) const
|
|
|
|
{
|
|
|
|
cerr << "Order: Components of " << net << endl;
|
|
|
|
|
|
|
|
vector<AutoSegment*> segments;
|
|
|
|
forEach ( Segment*, isegment, net->getComponents().getSubSet<Segment*>() ) {
|
2013-12-03 18:58:58 -06:00
|
|
|
AutoSegment* autoSegment = _lookup( *isegment );
|
|
|
|
if (autoSegment)
|
|
|
|
segments.push_back( autoSegment );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
sort ( segments.begin(), segments.end(), AutoSegment::CompareId() );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
Interval constraints;
|
|
|
|
for ( size_t i=0 ; i<segments.size() ; i++ ) {
|
2013-12-03 18:58:58 -06:00
|
|
|
segments[i]->getConstraints( constraints );
|
2010-03-09 09:24:29 -06:00
|
|
|
cerr << "Order: " << i
|
|
|
|
<< " " << segments[i]->isCanonical()
|
|
|
|
<< " " << setw(6) << DbU::getValueString(segments[i]->getSourceU())
|
|
|
|
<< " " << setw(6) << DbU::getValueString(segments[i]->getLength())
|
|
|
|
<< " " << segments[i]->isGlobal()
|
2013-12-03 18:58:58 -06:00
|
|
|
<< " " << segments[i]->isStrongTerminal()
|
2010-03-09 09:24:29 -06:00
|
|
|
<< " " << segments[i]->isHorizontal()
|
|
|
|
<< " " << setw(6) << DbU::getValueString(segments[i]->getAxis())
|
|
|
|
<< " " << segments[i]->isFixed()
|
|
|
|
<< " [" << DbU::getValueString(constraints.getVMin())
|
|
|
|
<< ":" << DbU::getValueString(constraints.getVMax())
|
|
|
|
<< "] " << segments[i]
|
|
|
|
<< endl;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::_print () const
|
|
|
|
{
|
|
|
|
vector<Net*> nets;
|
|
|
|
forEach ( Net*, inet, getCell()->getNets() ) {
|
2013-12-03 18:58:58 -06:00
|
|
|
nets.push_back( *inet );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
sort ( nets.begin(), nets.end(), NetCompareByName() );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string KatabaticEngine::_getTypeName () const
|
|
|
|
{
|
|
|
|
return "Katabatic";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string KatabaticEngine::_getString () const
|
|
|
|
{
|
|
|
|
ostringstream os;
|
|
|
|
|
2010-04-28 10:43:30 -05:00
|
|
|
os << "<" << "Katabatic " << _cell->getName () << " " << _configuration->getRoutingGauge()->getName() << ">";
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
return ( os.str() );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Record* KatabaticEngine::_getRecord () const
|
|
|
|
{
|
|
|
|
Record* record = ToolEngine::_getRecord ();
|
2013-12-03 18:58:58 -06:00
|
|
|
record->add( getSlot( "_flags" , _flags ) );
|
|
|
|
record->add( getSlot( "_state" , _state ) );
|
|
|
|
record->add( getSlot( "_configuration" , _configuration ) );
|
|
|
|
record->add( getSlot( "_gcellGrid" , _gcellGrid ) );
|
|
|
|
record->add( getSlot( "_chipTools" , _chipTools ) );
|
|
|
|
record->add( getSlot( "_autoContactLut" , &_autoContactLut ) );
|
|
|
|
record->add( getSlot( "_autoSegmentLut" , &_autoSegmentLut ) );
|
Add NetRoutingState (Property) on Nets to tell Kite what to do.
* New: In Katabatic, add the ability to decorate some (i.e. few) nets
with a state that indicate to Katabatic & Kite what to do with it.
The possible states are:
1. Fixed : all the wire are in fixed positions. The router cannot
move them and account them as obstacles.
2. ManualGlobalRoute : a user-defined topology is supplied. The
wires still have to be detailed route in "Detailed Pre-Route"
but will be skipped for the global routing and fixed for the
general Detailed route.
3. AutomaticGlobalRoute : ordinary nets, to be global routed then
detail routed.
4. Excluded : do not try to global or detail route thoses nets.
5. MixedPreRoute : mask combining Fixed and ManualGlobalRoute.
Not all nets have this property, only those that needs a special
processing.
To ease the access to the state, it is nested inside a
PrivateProperty in the net (NetRoutingProperty), with an extension
access class (NetRoutingExtension).
* New: In Kite, take account of NetRoutingState. Pointers to the
net's states are strored inside an internal map for faster access.
The property is *not* deleted when Kite is destroyed. The property
will remains until the Net itself is destroyed.
As a consequence, the lists that where passed to high level
function are removed as the information can now be accessed directly
through the net NetRoutingProperty.
* New: In Unicorn, in CgtMain, comply with the update interface.
* New: In documentation, update the User's Guide to explain the Pre-routed
step of Kite.
2014-07-02 07:36:58 -05:00
|
|
|
record->add( getSlot( "_netRoutingStates", &_netRoutingStates) );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
return record;
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // End of Katabatic namespace.
|