coriolis/kite/src/KiteEngine.cpp

902 lines
29 KiB
C++
Raw Normal View History

// -*- C++ -*-
//
// This file is part of the Coriolis Software.
// Copyright (c) UPMC 2008-2016, All Rights Reserved
//
// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | K i t e - D e t a i l e d R o u t e r |
// | |
// | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
// | =============================================================== |
// | C++ Module : "./KiteEngine.cpp" |
// +-----------------------------------------------------------------+
#include <Python.h>
#include <sstream>
#include <fstream>
#include <iomanip>
#include "vlsisapd/utilities/Path.h"
#include "hurricane/DebugSession.h"
#include "hurricane/UpdateSession.h"
#include "hurricane/Bug.h"
#include "hurricane/Error.h"
#include "hurricane/Warning.h"
#include "hurricane/Breakpoint.h"
#include "hurricane/Layer.h"
#include "hurricane/Net.h"
#include "hurricane/Pad.h"
#include "hurricane/Plug.h"
#include "hurricane/Cell.h"
#include "hurricane/Instance.h"
#include "hurricane/Vertical.h"
#include "hurricane/Horizontal.h"
#include "hurricane/viewer/Script.h"
#include "crlcore/Measures.h"
#include "knik/Vertex.h"
#include "knik/Edge.h"
#include "knik/Graph.h"
#include "knik/KnikEngine.h"
#include "katabatic/AutoContact.h"
#include "katabatic/GCellGrid.h"
#include "kite/DataNegociate.h"
#include "kite/RoutingPlane.h"
#include "kite/Session.h"
#include "kite/TrackSegment.h"
#include "kite/NegociateWindow.h"
#include "kite/KiteEngine.h"
#include "kite/PyKiteEngine.h"
namespace Kite {
using std::cout;
using std::cerr;
using std::endl;
using std::dec;
using std::setw;
using std::left;
using std::ostream;
using std::ofstream;
using std::ostringstream;
using std::setprecision;
using std::vector;
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
using std::make_pair;
using Hurricane::dbo_ptr;
using Hurricane::UpdateSession;
using Hurricane::DebugSession;
using Hurricane::tab;
using Hurricane::ForEachIterator;
using Hurricane::Bug;
using Hurricane::Error;
using Hurricane::Warning;
using Hurricane::Breakpoint;
using Hurricane::Box;
* ./kite: - Change: Propagate renaming "obstacle" -> "blockage". - Bug/Change: In Configuration, the value of the extensionCap was too big (1.5 lambda), reduce to 0.5 lambda. This is a problem, the extension should be coupled to the layer as it is not the same for each METAL. - Bug: When using TrackElement, always uses the virtual "->isFixed()" method instead of trying to access to "->base()->isFixed()" as the base may be NULL in case of blockage/fixed segment. - Change: Merge PowerRails & Blockage trans-hierarchical construction (into PowerRails). All blockages are groupeds under "blockagenet". Allows to remove TrackBlockage & BuildBlockages. - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, ring power segments around the core must completly saturate the edges in their segment direction. This is to prevent the global router to use paths under the power/ground ring (may generate unsolvable configs). - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, distinguish three areas: the core (65%), the corona (90%) and the pads (100%). Capacities on the edges are sets accordingly. - Change: In RoutingEvent, introduce an alternative algorithm for conflictSolve1, FindPath which try to deduce the breakpoints from a truly explorated path. Unfortunatly this gives worst results than the Cs1Candidates method. The why should be investigated as it's a critical point in the algorithm. - Change: In Manipulator::ripupPerpandicular(), when a caged perpandicular is encountered, instead of just "stopping", rip it up and change is axis hint (actually increase) it's axis hint so it stands a chance to go outside the track with an obstacle. - Change: In RoutingEvent/State::slackenTopology(), allow move up of local segments when they are tightly constrained *and* blocked (cageds). Partial modification of functions calls from booleans to flags. - Bug: In NegociateWindow::NegociateOverlapCost, check for fixed segments before trying to get DataNegociate. The lack of DataNegociate cause the TrackElement to be discarted. It's a failsafe behavior, but it leads to overlaps. - Bug: In ProtectRoutingPad, in Pad Cells only, *do not* protect RoutingPad to avoid the edge capacity over the pad to decrease to zero. This is due to unused RoutingPads being accounted as blockages.
2010-12-04 09:25:48 -06:00
using Hurricane::Torus;
using Hurricane::Layer;
using Hurricane::Horizontal;
using Hurricane::Vertical;
using Hurricane::NetRoutingExtension;
using Hurricane::Cell;
using CRL::System;
using CRL::addMeasure;
using CRL::Measures;
using CRL::MeasuresSet;
using Knik::KnikEngine;
using Katabatic::AutoContact;
using Katabatic::AutoSegmentLut;
* ./kite: - Change: Propagate renaming "obstacle" -> "blockage". - Bug/Change: In Configuration, the value of the extensionCap was too big (1.5 lambda), reduce to 0.5 lambda. This is a problem, the extension should be coupled to the layer as it is not the same for each METAL. - Bug: When using TrackElement, always uses the virtual "->isFixed()" method instead of trying to access to "->base()->isFixed()" as the base may be NULL in case of blockage/fixed segment. - Change: Merge PowerRails & Blockage trans-hierarchical construction (into PowerRails). All blockages are groupeds under "blockagenet". Allows to remove TrackBlockage & BuildBlockages. - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, ring power segments around the core must completly saturate the edges in their segment direction. This is to prevent the global router to use paths under the power/ground ring (may generate unsolvable configs). - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, distinguish three areas: the core (65%), the corona (90%) and the pads (100%). Capacities on the edges are sets accordingly. - Change: In RoutingEvent, introduce an alternative algorithm for conflictSolve1, FindPath which try to deduce the breakpoints from a truly explorated path. Unfortunatly this gives worst results than the Cs1Candidates method. The why should be investigated as it's a critical point in the algorithm. - Change: In Manipulator::ripupPerpandicular(), when a caged perpandicular is encountered, instead of just "stopping", rip it up and change is axis hint (actually increase) it's axis hint so it stands a chance to go outside the track with an obstacle. - Change: In RoutingEvent/State::slackenTopology(), allow move up of local segments when they are tightly constrained *and* blocked (cageds). Partial modification of functions calls from booleans to flags. - Bug: In NegociateWindow::NegociateOverlapCost, check for fixed segments before trying to get DataNegociate. The lack of DataNegociate cause the TrackElement to be discarted. It's a failsafe behavior, but it leads to overlaps. - Bug: In ProtectRoutingPad, in Pad Cells only, *do not* protect RoutingPad to avoid the edge capacity over the pad to decrease to zero. This is due to unused RoutingPads being accounted as blockages.
2010-12-04 09:25:48 -06:00
using Katabatic::ChipTools;
const char* missingRW =
"%s :\n\n"
" Cell %s do not have any KiteEngine (or not yet created).\n";
// -------------------------------------------------------------------
// Class : "Kite::KiteEngine".
Name KiteEngine::_toolName = "Kite";
const Name& KiteEngine::staticGetName ()
{ return _toolName; }
KiteEngine* KiteEngine::get ( const Cell* cell )
{ return static_cast<KiteEngine*>(ToolEngine::get(cell,staticGetName())); }
KiteEngine::KiteEngine ( Cell* 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
: KatabaticEngine (cell)
, _viewer (NULL)
, _knik (NULL)
Etesian integration with Chip & ClockTree plugins. * New: In Hurricane, in DebugSession, add a new method to activate the trace inconditionally with a certain level. * New: In Hurricane, in HyperNet, allow copy construction as there is no reason to disallow it and we need it now. * New: In Hurricane, in Cell::flattenNets(), add a new option to prevent the flattening of the clock net(s). For more safety perform the DeepNet creation *outside* the Collection loop. * Bug: In Hurricane, in Cell_HyperNetRootNetOccurrences, skip the DeepNets because they are the result of another flattening operation. * New: In Isobar, in PyBasicLayer, export C++ method getBlockageLayer(). * New: In Isobar, in PyRoutingGauge, export C++ method getLayerPitch(), needed by Cumulus plugins. * New: In Etesian, EtesianEngine::findYSpin() to look for the Y orientation if some cells are already placed. Typically the buffers of a clock tree. Pass the correct orienation to row_compatible_orientation(). Do not try to add feeds in the ISPD05 benchmarks. For now the benchmarks are detected through their names (unreliable). * Change: In Knik, in KnikEngine::initGlobalRouting(), allow the clock to be routed as an ordinary signal when the clock tree is not used. * New: In Kite, in BuildPowerRails, management & detection for the pre-routed clock. In KiteEngine constructor, early initialization of the blockage net to avoid later troubles in BuildPowerRails. * New: In Cumulus, in ChipPlugin, add support for Etesian plus new configuration parameter 'clockTree.placerEngine' to select between Mauka and Etesian. * New: In Cumulus, in BlockCorona, add blockages in the vertical sides in the vertical layer to prevent the router to use the vertical tracks in under the prower lines (for example, blockage in M3 with power line M5). In Cumulus, in ChipConf add attribute to access the blockage net. * New: In Cumulus, when the clock tree is disabled, do not generate the last rail around the block (the clock rail). * Bug: In Cumulus, in ChipConf use the clock pad to guess the clock signals and *not* the power pad. Add more meaningful error messages if a pad global signal is not found (implicit connexion by name). * Bug: In Cumulus, in ClockTree, compute correctly the cells Y spin, that is *from the bottom of the cell AB* (not from 'zero').
2015-02-24 06:13:17 -06:00
, _blockageNet (cell->getNet("blockagenet"))
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
, _configuration (new Configuration(getKatabaticConfiguration()))
, _routingPlanes ()
, _negociateWindow (NULL)
, _minimumWL (0.0)
, _toolSuccess (false)
{ }
void KiteEngine::_postCreate ()
{
KatabaticEngine::_postCreate ();
Implementation of pre-routing support (for clock-tree compliance). * New: In Katabatic, in <AutoContact>, this class is no longer derived from ExtentionGo. With the simplificated AutoContacts, there is no reason to do so, and it will save some QuadTree insertions/deletions. New factory function AutoContact::createFrom(Contact*) which try to build an AutoContact on top of a Hurricane::Contact. Of course that base contact *must fit* into one of the predefined Contact configurations (Terminal, Turn, HTee or VTee). NOTE: This implies that the pre-routed segments & contacts *are* correctly articulated, which is not the case when a Cell is read from disk in "ap" format. The pre-routing feature must be used for now without any re-read from disk. We will implement a re-articulating pre-process in the future. * Change: In Katabatic, in <AutoContact> derived classes, the ::updateCache() method now display an accurate error message if a segment is connected but has no AutoSegment conterpart (i.e. the lookup fails). * New: In Katabatic, in <AutoSegment>, the ::computeOptimal() method is short-circuited for pre-routed segments, the optimal axis position is considered to be the one it is currently on (i.e. we trust the designer). * New: In Katabatic, in <KatabaticEngine>, the ::loadGlobalRouting() method now accept a map of excluded nets (same as Knik). This map is the one of pre-routed nets. * New: In Katabatic, in layer assignment, do not try to displace fixed segments... * New: In Katabatic, in <AutoSegment>, new flag SegUserDefined and related methods to know if a segment comes from the global router (Knik) or is pre-routed (supplied by the user). * New: In Kite, In <BuildPowerRails>, support (exclusion) for pre-routed nets. * New: In Kite, In <GraphicKiteEngine> new menu entry for running the router on pre-routed nets ("Detailed Pre-Route"), also integrated in the all-on-one route command. * New: In Kite, In KiteEngine, new method ::_initDataBase() that group all the initialisation steps. It is a mix of calls between Knik and Kite initializations which are intertwinneds (may have to devellop a shared common base at a later point). It creates the Knik grid, then the Katabatic grid, then load pre-routed wires and power rails and protect isolated RoutingPads. Add support for a map of pre-routed nets (to be excluded for Knik calls). The method "::run()" now uses function flags, firstly to know if it is managing pre-routed wires or general purposes ones. * New: In Kite, in <NegociateWindow>, the "::run()" methods has now two modes. The normal one and the 'KtPreRoutedStage' that is for routing pre-routed nets. When in pre-route stage, the wires are fixed at the end of this step. * New: In Kite, in <TrackElement> add decorator for AutoSegment isUsedDefined(). * New: In Kite, in <TrackSegment>, the various ::canDogleg() methods returns false for a pre-routed (user-defined segment). * New: In Kite, in PyKiteEngine, added new method runNegociatePreRouted().
2014-06-21 13:16:47 -05:00
}
void KiteEngine::_runKiteInit ()
{
Utilities::Path pythonSitePackages = System::getPath("pythonSitePackages");
Utilities::Path systemConfDir = pythonSitePackages / "kite";
Utilities::Path systemConfFile = systemConfDir / "kiteInit.py";
if (systemConfFile.exists()) {
New Library Manager Widget. Access with Tools menu or CTRL+M. * New: In CRL Core, created a LibraryManager widget. It provides a composite information based on what is present, for each Alliance library: 1. - A Cell in memory, without Catalog::State. 2. - A Catalog::State, with or whithout the Cell in memory. 3. - The files of the Cell in the librariy's directory. 4. - A file with a format referenced for one of the importers. File type recognition is based *only* on the file extension, so it may easily confused. Be careful about what you put in the library's directory. One of the big limitation is that it will not display Hurricane libraries that do not have the AllianceLibrary extension. This widget is put in a separate library <libmanager>, included in the default CRLCORE_LIBRARIES. * Change: In CRL Core, in State (through the loader), now sets the InMemory flag (event if nobody uses it yet...). Display it in the state _getString(). In AllianceFramework, new getAllianceLibraries() method. In CatalogExtension, make the static method "get()" publicly accessible, for sometimes we want the whole State. * Bug: In vlsisapd, in Path, the pathcache was not rebuild when it should, leading to incorrect results. * New: In vlsisapd, in Path, added a listdir() method to access the contents of a directory and a stat() method to poll the status of a file/directory. Rename the ".string()" method in ".toString()" to avoid tricky name resolution with std::string, refactor in all the other tools. * Change: In Hurricane, in Controller, no longer oversize the fonts of the table's headers. * New: In Unicorn, in UnicornGui, integrate LibraryManager.
2015-05-09 10:03:17 -05:00
Isobar::Script::addPath( systemConfDir.toString() );
New Library Manager Widget. Access with Tools menu or CTRL+M. * New: In CRL Core, created a LibraryManager widget. It provides a composite information based on what is present, for each Alliance library: 1. - A Cell in memory, without Catalog::State. 2. - A Catalog::State, with or whithout the Cell in memory. 3. - The files of the Cell in the librariy's directory. 4. - A file with a format referenced for one of the importers. File type recognition is based *only* on the file extension, so it may easily confused. Be careful about what you put in the library's directory. One of the big limitation is that it will not display Hurricane libraries that do not have the AllianceLibrary extension. This widget is put in a separate library <libmanager>, included in the default CRLCORE_LIBRARIES. * Change: In CRL Core, in State (through the loader), now sets the InMemory flag (event if nobody uses it yet...). Display it in the state _getString(). In AllianceFramework, new getAllianceLibraries() method. In CatalogExtension, make the static method "get()" publicly accessible, for sometimes we want the whole State. * Bug: In vlsisapd, in Path, the pathcache was not rebuild when it should, leading to incorrect results. * New: In vlsisapd, in Path, added a listdir() method to access the contents of a directory and a stat() method to poll the status of a file/directory. Rename the ".string()" method in ".toString()" to avoid tricky name resolution with std::string, refactor in all the other tools. * Change: In Hurricane, in Controller, no longer oversize the fonts of the table's headers. * New: In Unicorn, in UnicornGui, integrate LibraryManager.
2015-05-09 10:03:17 -05:00
dbo_ptr<Isobar::Script> script = Isobar::Script::create( systemConfFile.stem().toString() );
script->addKwArgument( "kite" , (PyObject*)PyKiteEngine_Link(this) );
script->runFunction ( "kiteHook", getCell() );
New Library Manager Widget. Access with Tools menu or CTRL+M. * New: In CRL Core, created a LibraryManager widget. It provides a composite information based on what is present, for each Alliance library: 1. - A Cell in memory, without Catalog::State. 2. - A Catalog::State, with or whithout the Cell in memory. 3. - The files of the Cell in the librariy's directory. 4. - A file with a format referenced for one of the importers. File type recognition is based *only* on the file extension, so it may easily confused. Be careful about what you put in the library's directory. One of the big limitation is that it will not display Hurricane libraries that do not have the AllianceLibrary extension. This widget is put in a separate library <libmanager>, included in the default CRLCORE_LIBRARIES. * Change: In CRL Core, in State (through the loader), now sets the InMemory flag (event if nobody uses it yet...). Display it in the state _getString(). In AllianceFramework, new getAllianceLibraries() method. In CatalogExtension, make the static method "get()" publicly accessible, for sometimes we want the whole State. * Bug: In vlsisapd, in Path, the pathcache was not rebuild when it should, leading to incorrect results. * New: In vlsisapd, in Path, added a listdir() method to access the contents of a directory and a stat() method to poll the status of a file/directory. Rename the ".string()" method in ".toString()" to avoid tricky name resolution with std::string, refactor in all the other tools. * Change: In Hurricane, in Controller, no longer oversize the fonts of the table's headers. * New: In Unicorn, in UnicornGui, integrate LibraryManager.
2015-05-09 10:03:17 -05:00
Isobar::Script::removePath( systemConfDir.toString() );
} else {
cerr << Warning("Kite system configuration file:\n <%s> not found."
New Library Manager Widget. Access with Tools menu or CTRL+M. * New: In CRL Core, created a LibraryManager widget. It provides a composite information based on what is present, for each Alliance library: 1. - A Cell in memory, without Catalog::State. 2. - A Catalog::State, with or whithout the Cell in memory. 3. - The files of the Cell in the librariy's directory. 4. - A file with a format referenced for one of the importers. File type recognition is based *only* on the file extension, so it may easily confused. Be careful about what you put in the library's directory. One of the big limitation is that it will not display Hurricane libraries that do not have the AllianceLibrary extension. This widget is put in a separate library <libmanager>, included in the default CRLCORE_LIBRARIES. * Change: In CRL Core, in State (through the loader), now sets the InMemory flag (event if nobody uses it yet...). Display it in the state _getString(). In AllianceFramework, new getAllianceLibraries() method. In CatalogExtension, make the static method "get()" publicly accessible, for sometimes we want the whole State. * Bug: In vlsisapd, in Path, the pathcache was not rebuild when it should, leading to incorrect results. * New: In vlsisapd, in Path, added a listdir() method to access the contents of a directory and a stat() method to poll the status of a file/directory. Rename the ".string()" method in ".toString()" to avoid tricky name resolution with std::string, refactor in all the other tools. * Change: In Hurricane, in Controller, no longer oversize the fonts of the table's headers. * New: In Unicorn, in UnicornGui, integrate LibraryManager.
2015-05-09 10:03:17 -05:00
,systemConfFile.toString().c_str()) << endl;
}
}
Implementation of pre-routing support (for clock-tree compliance). * New: In Katabatic, in <AutoContact>, this class is no longer derived from ExtentionGo. With the simplificated AutoContacts, there is no reason to do so, and it will save some QuadTree insertions/deletions. New factory function AutoContact::createFrom(Contact*) which try to build an AutoContact on top of a Hurricane::Contact. Of course that base contact *must fit* into one of the predefined Contact configurations (Terminal, Turn, HTee or VTee). NOTE: This implies that the pre-routed segments & contacts *are* correctly articulated, which is not the case when a Cell is read from disk in "ap" format. The pre-routing feature must be used for now without any re-read from disk. We will implement a re-articulating pre-process in the future. * Change: In Katabatic, in <AutoContact> derived classes, the ::updateCache() method now display an accurate error message if a segment is connected but has no AutoSegment conterpart (i.e. the lookup fails). * New: In Katabatic, in <AutoSegment>, the ::computeOptimal() method is short-circuited for pre-routed segments, the optimal axis position is considered to be the one it is currently on (i.e. we trust the designer). * New: In Katabatic, in <KatabaticEngine>, the ::loadGlobalRouting() method now accept a map of excluded nets (same as Knik). This map is the one of pre-routed nets. * New: In Katabatic, in layer assignment, do not try to displace fixed segments... * New: In Katabatic, in <AutoSegment>, new flag SegUserDefined and related methods to know if a segment comes from the global router (Knik) or is pre-routed (supplied by the user). * New: In Kite, In <BuildPowerRails>, support (exclusion) for pre-routed nets. * New: In Kite, In <GraphicKiteEngine> new menu entry for running the router on pre-routed nets ("Detailed Pre-Route"), also integrated in the all-on-one route command. * New: In Kite, In KiteEngine, new method ::_initDataBase() that group all the initialisation steps. It is a mix of calls between Knik and Kite initializations which are intertwinneds (may have to devellop a shared common base at a later point). It creates the Knik grid, then the Katabatic grid, then load pre-routed wires and power rails and protect isolated RoutingPads. Add support for a map of pre-routed nets (to be excluded for Knik calls). The method "::run()" now uses function flags, firstly to know if it is managing pre-routed wires or general purposes ones. * New: In Kite, in <NegociateWindow>, the "::run()" methods has now two modes. The normal one and the 'KtPreRoutedStage' that is for routing pre-routed nets. When in pre-route stage, the wires are fixed at the end of this step. * New: In Kite, in <TrackElement> add decorator for AutoSegment isUsedDefined(). * New: In Kite, in <TrackSegment>, the various ::canDogleg() methods returns false for a pre-routed (user-defined segment). * New: In Kite, in PyKiteEngine, added new method runNegociatePreRouted().
2014-06-21 13:16:47 -05:00
void KiteEngine::_initDataBase ()
{
cdebug_log(155,1) << "KiteEngine::_initDataBase()" << endl;
Implementation of pre-routing support (for clock-tree compliance). * New: In Katabatic, in <AutoContact>, this class is no longer derived from ExtentionGo. With the simplificated AutoContacts, there is no reason to do so, and it will save some QuadTree insertions/deletions. New factory function AutoContact::createFrom(Contact*) which try to build an AutoContact on top of a Hurricane::Contact. Of course that base contact *must fit* into one of the predefined Contact configurations (Terminal, Turn, HTee or VTee). NOTE: This implies that the pre-routed segments & contacts *are* correctly articulated, which is not the case when a Cell is read from disk in "ap" format. The pre-routing feature must be used for now without any re-read from disk. We will implement a re-articulating pre-process in the future. * Change: In Katabatic, in <AutoContact> derived classes, the ::updateCache() method now display an accurate error message if a segment is connected but has no AutoSegment conterpart (i.e. the lookup fails). * New: In Katabatic, in <AutoSegment>, the ::computeOptimal() method is short-circuited for pre-routed segments, the optimal axis position is considered to be the one it is currently on (i.e. we trust the designer). * New: In Katabatic, in <KatabaticEngine>, the ::loadGlobalRouting() method now accept a map of excluded nets (same as Knik). This map is the one of pre-routed nets. * New: In Katabatic, in layer assignment, do not try to displace fixed segments... * New: In Katabatic, in <AutoSegment>, new flag SegUserDefined and related methods to know if a segment comes from the global router (Knik) or is pre-routed (supplied by the user). * New: In Kite, In <BuildPowerRails>, support (exclusion) for pre-routed nets. * New: In Kite, In <GraphicKiteEngine> new menu entry for running the router on pre-routed nets ("Detailed Pre-Route"), also integrated in the all-on-one route command. * New: In Kite, In KiteEngine, new method ::_initDataBase() that group all the initialisation steps. It is a mix of calls between Knik and Kite initializations which are intertwinneds (may have to devellop a shared common base at a later point). It creates the Knik grid, then the Katabatic grid, then load pre-routed wires and power rails and protect isolated RoutingPads. Add support for a map of pre-routed nets (to be excluded for Knik calls). The method "::run()" now uses function flags, firstly to know if it is managing pre-routed wires or general purposes ones. * New: In Kite, in <NegociateWindow>, the "::run()" methods has now two modes. The normal one and the 'KtPreRoutedStage' that is for routing pre-routed nets. When in pre-route stage, the wires are fixed at the end of this step. * New: In Kite, in <TrackElement> add decorator for AutoSegment isUsedDefined(). * New: In Kite, in <TrackSegment>, the various ::canDogleg() methods returns false for a pre-routed (user-defined segment). * New: In Kite, in PyKiteEngine, added new method runNegociatePreRouted().
2014-06-21 13:16:47 -05:00
Session::open( this );
createGlobalGraph( KtNoFlags );
createDetailedGrid();
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
findSpecialNets();
Implementation of pre-routing support (for clock-tree compliance). * New: In Katabatic, in <AutoContact>, this class is no longer derived from ExtentionGo. With the simplificated AutoContacts, there is no reason to do so, and it will save some QuadTree insertions/deletions. New factory function AutoContact::createFrom(Contact*) which try to build an AutoContact on top of a Hurricane::Contact. Of course that base contact *must fit* into one of the predefined Contact configurations (Terminal, Turn, HTee or VTee). NOTE: This implies that the pre-routed segments & contacts *are* correctly articulated, which is not the case when a Cell is read from disk in "ap" format. The pre-routing feature must be used for now without any re-read from disk. We will implement a re-articulating pre-process in the future. * Change: In Katabatic, in <AutoContact> derived classes, the ::updateCache() method now display an accurate error message if a segment is connected but has no AutoSegment conterpart (i.e. the lookup fails). * New: In Katabatic, in <AutoSegment>, the ::computeOptimal() method is short-circuited for pre-routed segments, the optimal axis position is considered to be the one it is currently on (i.e. we trust the designer). * New: In Katabatic, in <KatabaticEngine>, the ::loadGlobalRouting() method now accept a map of excluded nets (same as Knik). This map is the one of pre-routed nets. * New: In Katabatic, in layer assignment, do not try to displace fixed segments... * New: In Katabatic, in <AutoSegment>, new flag SegUserDefined and related methods to know if a segment comes from the global router (Knik) or is pre-routed (supplied by the user). * New: In Kite, In <BuildPowerRails>, support (exclusion) for pre-routed nets. * New: In Kite, In <GraphicKiteEngine> new menu entry for running the router on pre-routed nets ("Detailed Pre-Route"), also integrated in the all-on-one route command. * New: In Kite, In KiteEngine, new method ::_initDataBase() that group all the initialisation steps. It is a mix of calls between Knik and Kite initializations which are intertwinneds (may have to devellop a shared common base at a later point). It creates the Knik grid, then the Katabatic grid, then load pre-routed wires and power rails and protect isolated RoutingPads. Add support for a map of pre-routed nets (to be excluded for Knik calls). The method "::run()" now uses function flags, firstly to know if it is managing pre-routed wires or general purposes ones. * New: In Kite, in <NegociateWindow>, the "::run()" methods has now two modes. The normal one and the 'KtPreRoutedStage' that is for routing pre-routed nets. When in pre-route stage, the wires are fixed at the end of this step. * New: In Kite, in <TrackElement> add decorator for AutoSegment isUsedDefined(). * New: In Kite, in <TrackSegment>, the various ::canDogleg() methods returns false for a pre-routed (user-defined segment). * New: In Kite, in PyKiteEngine, added new method runNegociatePreRouted().
2014-06-21 13:16:47 -05:00
buildPreRouteds();
buildPowerRails();
protectRoutingPads();
Session::close();
_runKiteInit();
Implementation of pre-routing support (for clock-tree compliance). * New: In Katabatic, in <AutoContact>, this class is no longer derived from ExtentionGo. With the simplificated AutoContacts, there is no reason to do so, and it will save some QuadTree insertions/deletions. New factory function AutoContact::createFrom(Contact*) which try to build an AutoContact on top of a Hurricane::Contact. Of course that base contact *must fit* into one of the predefined Contact configurations (Terminal, Turn, HTee or VTee). NOTE: This implies that the pre-routed segments & contacts *are* correctly articulated, which is not the case when a Cell is read from disk in "ap" format. The pre-routing feature must be used for now without any re-read from disk. We will implement a re-articulating pre-process in the future. * Change: In Katabatic, in <AutoContact> derived classes, the ::updateCache() method now display an accurate error message if a segment is connected but has no AutoSegment conterpart (i.e. the lookup fails). * New: In Katabatic, in <AutoSegment>, the ::computeOptimal() method is short-circuited for pre-routed segments, the optimal axis position is considered to be the one it is currently on (i.e. we trust the designer). * New: In Katabatic, in <KatabaticEngine>, the ::loadGlobalRouting() method now accept a map of excluded nets (same as Knik). This map is the one of pre-routed nets. * New: In Katabatic, in layer assignment, do not try to displace fixed segments... * New: In Katabatic, in <AutoSegment>, new flag SegUserDefined and related methods to know if a segment comes from the global router (Knik) or is pre-routed (supplied by the user). * New: In Kite, In <BuildPowerRails>, support (exclusion) for pre-routed nets. * New: In Kite, In <GraphicKiteEngine> new menu entry for running the router on pre-routed nets ("Detailed Pre-Route"), also integrated in the all-on-one route command. * New: In Kite, In KiteEngine, new method ::_initDataBase() that group all the initialisation steps. It is a mix of calls between Knik and Kite initializations which are intertwinneds (may have to devellop a shared common base at a later point). It creates the Knik grid, then the Katabatic grid, then load pre-routed wires and power rails and protect isolated RoutingPads. Add support for a map of pre-routed nets (to be excluded for Knik calls). The method "::run()" now uses function flags, firstly to know if it is managing pre-routed wires or general purposes ones. * New: In Kite, in <NegociateWindow>, the "::run()" methods has now two modes. The normal one and the 'KtPreRoutedStage' that is for routing pre-routed nets. When in pre-route stage, the wires are fixed at the end of this step. * New: In Kite, in <TrackElement> add decorator for AutoSegment isUsedDefined(). * New: In Kite, in <TrackSegment>, the various ::canDogleg() methods returns false for a pre-routed (user-defined segment). * New: In Kite, in PyKiteEngine, added new method runNegociatePreRouted().
2014-06-21 13:16:47 -05:00
cdebug_tabw(155,-1);
}
KiteEngine* KiteEngine::create ( Cell* cell )
{
KiteEngine* kite = new KiteEngine ( cell );
kite->_postCreate();
Implementation of pre-routing support (for clock-tree compliance). * New: In Katabatic, in <AutoContact>, this class is no longer derived from ExtentionGo. With the simplificated AutoContacts, there is no reason to do so, and it will save some QuadTree insertions/deletions. New factory function AutoContact::createFrom(Contact*) which try to build an AutoContact on top of a Hurricane::Contact. Of course that base contact *must fit* into one of the predefined Contact configurations (Terminal, Turn, HTee or VTee). NOTE: This implies that the pre-routed segments & contacts *are* correctly articulated, which is not the case when a Cell is read from disk in "ap" format. The pre-routing feature must be used for now without any re-read from disk. We will implement a re-articulating pre-process in the future. * Change: In Katabatic, in <AutoContact> derived classes, the ::updateCache() method now display an accurate error message if a segment is connected but has no AutoSegment conterpart (i.e. the lookup fails). * New: In Katabatic, in <AutoSegment>, the ::computeOptimal() method is short-circuited for pre-routed segments, the optimal axis position is considered to be the one it is currently on (i.e. we trust the designer). * New: In Katabatic, in <KatabaticEngine>, the ::loadGlobalRouting() method now accept a map of excluded nets (same as Knik). This map is the one of pre-routed nets. * New: In Katabatic, in layer assignment, do not try to displace fixed segments... * New: In Katabatic, in <AutoSegment>, new flag SegUserDefined and related methods to know if a segment comes from the global router (Knik) or is pre-routed (supplied by the user). * New: In Kite, In <BuildPowerRails>, support (exclusion) for pre-routed nets. * New: In Kite, In <GraphicKiteEngine> new menu entry for running the router on pre-routed nets ("Detailed Pre-Route"), also integrated in the all-on-one route command. * New: In Kite, In KiteEngine, new method ::_initDataBase() that group all the initialisation steps. It is a mix of calls between Knik and Kite initializations which are intertwinneds (may have to devellop a shared common base at a later point). It creates the Knik grid, then the Katabatic grid, then load pre-routed wires and power rails and protect isolated RoutingPads. Add support for a map of pre-routed nets (to be excluded for Knik calls). The method "::run()" now uses function flags, firstly to know if it is managing pre-routed wires or general purposes ones. * New: In Kite, in <NegociateWindow>, the "::run()" methods has now two modes. The normal one and the 'KtPreRoutedStage' that is for routing pre-routed nets. When in pre-route stage, the wires are fixed at the end of this step. * New: In Kite, in <TrackElement> add decorator for AutoSegment isUsedDefined(). * New: In Kite, in <TrackSegment>, the various ::canDogleg() methods returns false for a pre-routed (user-defined segment). * New: In Kite, in PyKiteEngine, added new method runNegociatePreRouted().
2014-06-21 13:16:47 -05:00
kite->_initDataBase();
return kite;
}
void KiteEngine::_preDestroy ()
{
cdebug_log(155,1) << "KiteEngine::_preDestroy()" << endl;
cmess1 << " o Deleting ToolEngine<" << getName() << "> from Cell <"
<< _cell->getName() << ">" << endl;
if (getState() < Katabatic::EngineGutted)
setState( Katabatic::EnginePreDestroying );
_gutKite();
KatabaticEngine::_preDestroy();
cmess2 << " - RoutingEvents := " << RoutingEvent::getAllocateds() << endl;
if (not ToolEngine::inDestroyAll()) {
KnikEngine* attachedKnik = KnikEngine::get( getCell() );
if (_knik != attachedKnik) {
cerr << Error("Knik attribute differs from the Cell attached one (must be the same)\n"
" On: <%s>."
,getString(getCell()->getName()).c_str()) << endl;
_knik = attachedKnik;
}
_knik->destroy();
}
cdebug_tabw(155,-1);
}
void KiteEngine::wipeoutRouting ( Cell * cell )
{
if ( (KiteEngine::get(cell) != NULL) or (KatabaticEngine::get(cell) != NULL) )
throw Error( "KiteEngine::wipeoutRouting(): KiteEngine still active on %s"
, getString(cell->getName()).c_str() );
UpdateSession::open();
for ( Net* net : cell->getNets() ) {
if (NetRoutingExtension::isManualGlobalRoute(net)) continue;
// First pass: destroy the contacts
std::vector<Contact*> contacts;
for ( Component* component : net->getComponents() ) {
Contact* contact = dynamic_cast<Contact*>(component);
if (contact and not contact->getAnchorHook()->isAttached())
contacts.push_back( contact );
}
for ( Contact* contact : contacts )
contact->destroy();
// Second pass: destroy unconnected segments added by Knik as blockages
std::vector<Component*> segments;
for ( Component* component : net->getComponents() ) {
Horizontal* horizontal = dynamic_cast<Horizontal*>(component);
if (horizontal) segments.push_back( horizontal );
Vertical* vertical = dynamic_cast<Vertical*>(component);
if (vertical) segments.push_back( vertical );
}
for ( Component* segment : segments )
segment->destroy();
}
UpdateSession::close();
}
KiteEngine::~KiteEngine ()
{ delete _configuration; }
const Name& KiteEngine::getName () const
{ return _toolName; }
Configuration* KiteEngine::getConfiguration ()
{ return _configuration; }
unsigned int KiteEngine::getRipupLimit ( const TrackElement* segment ) const
{
if (segment->isBlockage()) return 0;
if (segment->isStrap ()) return _configuration->getRipupLimit( Configuration::StrapRipupLimit );
if (segment->isGlobal()) {
Katabatic::GCellVector gcells;
segment->getGCells( gcells );
if (gcells.size() > 2)
return _configuration->getRipupLimit( Configuration::LongGlobalRipupLimit );
return _configuration->getRipupLimit( Configuration::GlobalRipupLimit );
}
return _configuration->getRipupLimit( Configuration::LocalRipupLimit );
}
RoutingPlane* KiteEngine::getRoutingPlaneByIndex ( size_t index ) const
{
if (index >= getRoutingPlanesSize() ) return NULL;
return _routingPlanes[index];
}
RoutingPlane* KiteEngine::getRoutingPlaneByLayer ( const Layer* layer ) const
{
for ( size_t index=0 ; index < getRoutingPlanesSize() ; index++ ) {
if (_routingPlanes[index]->getLayer() == layer)
return _routingPlanes[index];
}
return NULL;
}
Track* KiteEngine::getTrackByPosition ( const Layer* layer, DbU::Unit axis, unsigned int mode ) const
{
RoutingPlane* plane = getRoutingPlaneByLayer( layer );
if (not plane) return NULL;
return plane->getTrackByPosition( axis, mode );
}
void KiteEngine::setInterrupt ( bool state )
{
if (_negociateWindow) {
_negociateWindow->setInterrupt( state );
cerr << "Interrupt [CRTL+C] of " << this << endl;
}
}
void KiteEngine::createGlobalGraph ( unsigned int mode )
{
* ./kite: - Change: Propagate renaming "obstacle" -> "blockage". - Bug/Change: In Configuration, the value of the extensionCap was too big (1.5 lambda), reduce to 0.5 lambda. This is a problem, the extension should be coupled to the layer as it is not the same for each METAL. - Bug: When using TrackElement, always uses the virtual "->isFixed()" method instead of trying to access to "->base()->isFixed()" as the base may be NULL in case of blockage/fixed segment. - Change: Merge PowerRails & Blockage trans-hierarchical construction (into PowerRails). All blockages are groupeds under "blockagenet". Allows to remove TrackBlockage & BuildBlockages. - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, ring power segments around the core must completly saturate the edges in their segment direction. This is to prevent the global router to use paths under the power/ground ring (may generate unsolvable configs). - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, distinguish three areas: the core (65%), the corona (90%) and the pads (100%). Capacities on the edges are sets accordingly. - Change: In RoutingEvent, introduce an alternative algorithm for conflictSolve1, FindPath which try to deduce the breakpoints from a truly explorated path. Unfortunatly this gives worst results than the Cs1Candidates method. The why should be investigated as it's a critical point in the algorithm. - Change: In Manipulator::ripupPerpandicular(), when a caged perpandicular is encountered, instead of just "stopping", rip it up and change is axis hint (actually increase) it's axis hint so it stands a chance to go outside the track with an obstacle. - Change: In RoutingEvent/State::slackenTopology(), allow move up of local segments when they are tightly constrained *and* blocked (cageds). Partial modification of functions calls from booleans to flags. - Bug: In NegociateWindow::NegociateOverlapCost, check for fixed segments before trying to get DataNegociate. The lack of DataNegociate cause the TrackElement to be discarted. It's a failsafe behavior, but it leads to overlaps. - Bug: In ProtectRoutingPad, in Pad Cells only, *do not* protect RoutingPad to avoid the edge capacity over the pad to decrease to zero. This is due to unused RoutingPads being accounted as blockages.
2010-12-04 09:25:48 -06:00
Cell* cell = getCell();
//Box cellBb = cell->getBoundingBox();
if (not _knik) {
unsigned int flags = Cell::Flags::WarnOnUnplacedInstances;
flags |= (mode & KtBuildGlobalRouting) ? Cell::Flags::BuildRings : 0;
cell->flattenNets( flags );
cell->createRoutingPadRings( Cell::Flags::BuildRings );
KatabaticEngine::chipPrep();
KnikEngine::setHEdgeReservedLocal( 0 );
KnikEngine::setVEdgeReservedLocal( 0 );
_knik = KnikEngine::create( cell
, 1 // _congestion
, 2 // _preCongestion
, false // _benchMode
, true // _useSegments
, 2.5 // _edgeCost
);
Improved UpdateSession & exception catching. Start of RoutingGauge implem. Miscellaneous: * Change: In <crlcore>, in display.conf use the same display threshold for both METAL2 & METAL3. In alliance.conf, the side of VIAs in the gauge is 2l (not 3l). In kite.conf, separate edge densities for H/V. * Change: In <Cell>, in flattenNets() use flag as argument, not a boolean. Do not create rings for clock or supply nets. * Change: In <DeepNet>, in _createRoutingPads() do not create rings for clock or supply net (duplicated policy as in Cell::flattenNets()). * Bug: In <ControllerWidget>, at last find the bad signal disconnect that was causing ungraceful messages. * Change: In <knik>, in Edge display occupancy/capacity in the string name. Improved display progress and debugging capabilities. Improved exception catch & breakpoint managment: * Bug: In <PaletteWidget>, in updateExtensions() replace the calls to deleteLayer() by delete. This cause the widget to be immediatly erased instead of waiting for the event queue to be completly processed. This was causing the widget to be left in a incoherent state when stoping at a breakpoint. * Bug: In <BreakpointWidget>, in execNoModal(), flush the main event loop (QApplication::flush()) *before* lauching the *local* event loop. This is to ensure all widgets are in their final state when waiting (especially <PaletteWidget>). * Change: In <ExceptionWidget>, new method catchAllWrapper() to execute any std::function< void() > function/method with a "try"/ "catch" wraparound and lauch the widget in case something is catch. * New: In <hurricane>, support for a oberver pattern, backported from <katabatic> with an Obervable capable of being linked to any number of Obervers. * New: In <Cell>, made it observable to detect Cell change, currently emit two kind of signals: - Cell::CellAboutToChange : *before* any change. - Cell::CellChanged : *after* the change has been completed. * New: In <UpdateSession>, in Go::invalidate() add the Cell owning the Go to the UPDATOR_STACK (of course the cell is added only once). In addition, when the Cell is added, send a notification of Cell::CellAboutToChange to all it's observers. The slave instances are also invalidated. Conversely in UpdateSession::_preDestroy() for each invalidated Cell send a Cell::CellChanged notification to all observer. The UPDATOR_STACK has been slightly amended to accept Cell which are not Gos. Prior to this, the Cell where completly excluded from the UpdateSession mechanism, so it's instances where never actualised of anything referring to the Cell for that matter. Note: we use two different mechanisms to transmit a Cell change, observers and the slave instance map. I think at some point it should be unificated. * Change: In <CellViewer>, make it a Cell observer to redraw when the cell is modificated (also update the palette). Uses the catchAllWrapper() to protect all critical actions. * Change: In <GraphicTool>, no longer need of cellPreModificated and cellPostModificated signals. Now done through the Cell obersvers. * Change: In <mauka>, <etesian> & <kite> now uses the catchAllWrapper method for protection (need to split methods in two, to be able to pass it as argument). No longer emit cellPreModificated and cellPostModificated. Support for RoutingGauge in P&R: * Bug: In <placeandroute.py>, the connection from the internal power ring to the connectors was not done correctly. Wrong contact layers leading to a gap. * Change: In <BuildPowerRails>, detection of the corona signals based on how the "pck_px" pad is connected. No longer based on name matching. * Change: In <placeandroute.py>, support for 2 routing metal only (3 metal in the technology). * Change: In <katabatic> & <kite> support for a "top layer" limitation on the routing gauge, this allows to use only two routing metals (METAL2 & METAL3). Work in progress.
2014-04-20 12:25:08 -05:00
_knik->setRoutingGauge( getConfiguration()->getRoutingGauge() );
_knik->setAllowedDepth( getConfiguration()->getAllowedDepth() );
_knik->createRoutingGraph();
KnikEngine::setHEdgeReservedLocal( getHTracksReservedLocal() );
KnikEngine::setVEdgeReservedLocal( getVTracksReservedLocal() );
* ./kite: - Change: Propagate renaming "obstacle" -> "blockage". - Bug/Change: In Configuration, the value of the extensionCap was too big (1.5 lambda), reduce to 0.5 lambda. This is a problem, the extension should be coupled to the layer as it is not the same for each METAL. - Bug: When using TrackElement, always uses the virtual "->isFixed()" method instead of trying to access to "->base()->isFixed()" as the base may be NULL in case of blockage/fixed segment. - Change: Merge PowerRails & Blockage trans-hierarchical construction (into PowerRails). All blockages are groupeds under "blockagenet". Allows to remove TrackBlockage & BuildBlockages. - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, ring power segments around the core must completly saturate the edges in their segment direction. This is to prevent the global router to use paths under the power/ground ring (may generate unsolvable configs). - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, distinguish three areas: the core (65%), the corona (90%) and the pads (100%). Capacities on the edges are sets accordingly. - Change: In RoutingEvent, introduce an alternative algorithm for conflictSolve1, FindPath which try to deduce the breakpoints from a truly explorated path. Unfortunatly this gives worst results than the Cs1Candidates method. The why should be investigated as it's a critical point in the algorithm. - Change: In Manipulator::ripupPerpandicular(), when a caged perpandicular is encountered, instead of just "stopping", rip it up and change is axis hint (actually increase) it's axis hint so it stands a chance to go outside the track with an obstacle. - Change: In RoutingEvent/State::slackenTopology(), allow move up of local segments when they are tightly constrained *and* blocked (cageds). Partial modification of functions calls from booleans to flags. - Bug: In NegociateWindow::NegociateOverlapCost, check for fixed segments before trying to get DataNegociate. The lack of DataNegociate cause the TrackElement to be discarted. It's a failsafe behavior, but it leads to overlaps. - Bug: In ProtectRoutingPad, in Pad Cells only, *do not* protect RoutingPad to avoid the edge capacity over the pad to decrease to zero. This is due to unused RoutingPads being accounted as blockages.
2010-12-04 09:25:48 -06:00
// Decrease the edge's capacity only under the core area.
const ChipTools& chipTools = getChipTools();
size_t coreReserved = 0;
size_t coronaReserved = 4;
for( Knik::Vertex* vertex : _knik->getRoutingGraph()->getVertexes() ) {
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 ( chipTools.isChip()
and ( chipTools.hPadsEnclosed(Box(vertex->getPosition()))
or chipTools.vPadsEnclosed(Box(vertex->getPosition()))) )
vertex->setBlocked();
* ./kite: - Change: Propagate renaming "obstacle" -> "blockage". - Bug/Change: In Configuration, the value of the extensionCap was too big (1.5 lambda), reduce to 0.5 lambda. This is a problem, the extension should be coupled to the layer as it is not the same for each METAL. - Bug: When using TrackElement, always uses the virtual "->isFixed()" method instead of trying to access to "->base()->isFixed()" as the base may be NULL in case of blockage/fixed segment. - Change: Merge PowerRails & Blockage trans-hierarchical construction (into PowerRails). All blockages are groupeds under "blockagenet". Allows to remove TrackBlockage & BuildBlockages. - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, ring power segments around the core must completly saturate the edges in their segment direction. This is to prevent the global router to use paths under the power/ground ring (may generate unsolvable configs). - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, distinguish three areas: the core (65%), the corona (90%) and the pads (100%). Capacities on the edges are sets accordingly. - Change: In RoutingEvent, introduce an alternative algorithm for conflictSolve1, FindPath which try to deduce the breakpoints from a truly explorated path. Unfortunatly this gives worst results than the Cs1Candidates method. The why should be investigated as it's a critical point in the algorithm. - Change: In Manipulator::ripupPerpandicular(), when a caged perpandicular is encountered, instead of just "stopping", rip it up and change is axis hint (actually increase) it's axis hint so it stands a chance to go outside the track with an obstacle. - Change: In RoutingEvent/State::slackenTopology(), allow move up of local segments when they are tightly constrained *and* blocked (cageds). Partial modification of functions calls from booleans to flags. - Bug: In NegociateWindow::NegociateOverlapCost, check for fixed segments before trying to get DataNegociate. The lack of DataNegociate cause the TrackElement to be discarted. It's a failsafe behavior, but it leads to overlaps. - Bug: In ProtectRoutingPad, in Pad Cells only, *do not* protect RoutingPad to avoid the edge capacity over the pad to decrease to zero. This is due to unused RoutingPads being accounted as blockages.
2010-12-04 09:25:48 -06:00
for ( int i=0 ; i<2 ; ++i ) {
* ./kite: - New: In NegociateWindow/RoutingEvent, adds a more comprehensive stage "Repair". Perform in three stage: first try to place with a relaxed constraint (one GCell on each side). Second try to minimize the faulty segment. Third perform another "repack perpandicular" but this time the faulty segment is re-inserted *before* any of it's perpandiculars. - New: In RoutingEvent::cacheAxisHint(), when a segment has a parent, that is comes for a "moveUp()", uses the parent axis hint as it's own. - New: In State::slackenTopology(), in the global FSM, adds a special operation when reaching MaximumSlack: forceOverLocals(), try to insert the global on track containing only local segments. Should tend to concentrate locals on a small set of shared tracks. Most useful on the highest layers. - New: In State::slackenTopology(), in the "MoveUp" state, try to find the more appropriate segment to move up (Manipulator::desaturate()). Effectively move up the longest segment fully enclosing the one we are processing. - New: In State::slackenTopology(), add a check for fully blocked segments in the local segment FSM. Calls State::solveFullBlocked(). - New: In KiteEngine::createGlobalGraph(), decrease the vertical capacity of one track inside the core. Helps smooth the vertical density. - Change: In Manipulator::insertInTrack(), when a track is freed for a to be inserted changes the priorities so that the segment is immediatly inserted. Parallels ripeds and theirs perpandiculars are replaced only *after*. This is the opposite of the previous behavior. - Change: In NegociateWindow::NegociateOverlapCost(), account the costs of terminals only for deep depth layers (M1, M2 & M3). - Change: In RoutingEvent::insertInTrack(), expand the excluded interval by a half-pitch (2.5l) instead of one lambda. - Change: In State::State(), do not uses DiscardGlobal if the ripup count exceed 5. Case of the "Strap" segments that can be ripped a lot before changing state. - Change: In State::_processNegociate(), no longer lock into position (fixed) the local terminal segments as a last resort. - Change: In RoutingEvent::_processNegociate(), no longer ripup perpandiculars when a segment is inserted in a free space. Reduce the number of events whithout degrading the routing quality. - Change: In State::conflictSolve1_v1b(), if getLongestConflict() is nul, ignore the track, the conflict must occurs on another track. - Change: In TrackCost, add a flag support. First uses, a flags to prevent a local of the topmost layer to ripup a global which is in moveUp state. - Bug: In State::solveFullBlockage(), after have been freed, reset the segment state to "moveUp". - Bug: In manipulator::minimize(), the axisHint was miscalculated if the punctual span was empty.
2011-01-25 11:16:50 -06:00
Knik::Edge* edge = NULL;
if (i==0) {
edge = vertex->getHEdgeOut();
if (not edge) continue;
Improved UpdateSession & exception catching. Start of RoutingGauge implem. Miscellaneous: * Change: In <crlcore>, in display.conf use the same display threshold for both METAL2 & METAL3. In alliance.conf, the side of VIAs in the gauge is 2l (not 3l). In kite.conf, separate edge densities for H/V. * Change: In <Cell>, in flattenNets() use flag as argument, not a boolean. Do not create rings for clock or supply nets. * Change: In <DeepNet>, in _createRoutingPads() do not create rings for clock or supply net (duplicated policy as in Cell::flattenNets()). * Bug: In <ControllerWidget>, at last find the bad signal disconnect that was causing ungraceful messages. * Change: In <knik>, in Edge display occupancy/capacity in the string name. Improved display progress and debugging capabilities. Improved exception catch & breakpoint managment: * Bug: In <PaletteWidget>, in updateExtensions() replace the calls to deleteLayer() by delete. This cause the widget to be immediatly erased instead of waiting for the event queue to be completly processed. This was causing the widget to be left in a incoherent state when stoping at a breakpoint. * Bug: In <BreakpointWidget>, in execNoModal(), flush the main event loop (QApplication::flush()) *before* lauching the *local* event loop. This is to ensure all widgets are in their final state when waiting (especially <PaletteWidget>). * Change: In <ExceptionWidget>, new method catchAllWrapper() to execute any std::function< void() > function/method with a "try"/ "catch" wraparound and lauch the widget in case something is catch. * New: In <hurricane>, support for a oberver pattern, backported from <katabatic> with an Obervable capable of being linked to any number of Obervers. * New: In <Cell>, made it observable to detect Cell change, currently emit two kind of signals: - Cell::CellAboutToChange : *before* any change. - Cell::CellChanged : *after* the change has been completed. * New: In <UpdateSession>, in Go::invalidate() add the Cell owning the Go to the UPDATOR_STACK (of course the cell is added only once). In addition, when the Cell is added, send a notification of Cell::CellAboutToChange to all it's observers. The slave instances are also invalidated. Conversely in UpdateSession::_preDestroy() for each invalidated Cell send a Cell::CellChanged notification to all observer. The UPDATOR_STACK has been slightly amended to accept Cell which are not Gos. Prior to this, the Cell where completly excluded from the UpdateSession mechanism, so it's instances where never actualised of anything referring to the Cell for that matter. Note: we use two different mechanisms to transmit a Cell change, observers and the slave instance map. I think at some point it should be unificated. * Change: In <CellViewer>, make it a Cell observer to redraw when the cell is modificated (also update the palette). Uses the catchAllWrapper() to protect all critical actions. * Change: In <GraphicTool>, no longer need of cellPreModificated and cellPostModificated signals. Now done through the Cell obersvers. * Change: In <mauka>, <etesian> & <kite> now uses the catchAllWrapper method for protection (need to split methods in two, to be able to pass it as argument). No longer emit cellPreModificated and cellPostModificated. Support for RoutingGauge in P&R: * Bug: In <placeandroute.py>, the connection from the internal power ring to the connectors was not done correctly. Wrong contact layers leading to a gap. * Change: In <BuildPowerRails>, detection of the corona signals based on how the "pck_px" pad is connected. No longer based on name matching. * Change: In <placeandroute.py>, support for 2 routing metal only (3 metal in the technology). * Change: In <katabatic> & <kite> support for a "top layer" limitation on the routing gauge, this allows to use only two routing metals (METAL2 & METAL3). Work in progress.
2014-04-20 12:25:08 -05:00
if (chipTools.hPadsEnclosed(edge->getBoundingBox())) {
edge->setCapacity( 0 );
* ./kite: - Change: Propagate renaming "obstacle" -> "blockage". - Bug/Change: In Configuration, the value of the extensionCap was too big (1.5 lambda), reduce to 0.5 lambda. This is a problem, the extension should be coupled to the layer as it is not the same for each METAL. - Bug: When using TrackElement, always uses the virtual "->isFixed()" method instead of trying to access to "->base()->isFixed()" as the base may be NULL in case of blockage/fixed segment. - Change: Merge PowerRails & Blockage trans-hierarchical construction (into PowerRails). All blockages are groupeds under "blockagenet". Allows to remove TrackBlockage & BuildBlockages. - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, ring power segments around the core must completly saturate the edges in their segment direction. This is to prevent the global router to use paths under the power/ground ring (may generate unsolvable configs). - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, distinguish three areas: the core (65%), the corona (90%) and the pads (100%). Capacities on the edges are sets accordingly. - Change: In RoutingEvent, introduce an alternative algorithm for conflictSolve1, FindPath which try to deduce the breakpoints from a truly explorated path. Unfortunatly this gives worst results than the Cs1Candidates method. The why should be investigated as it's a critical point in the algorithm. - Change: In Manipulator::ripupPerpandicular(), when a caged perpandicular is encountered, instead of just "stopping", rip it up and change is axis hint (actually increase) it's axis hint so it stands a chance to go outside the track with an obstacle. - Change: In RoutingEvent/State::slackenTopology(), allow move up of local segments when they are tightly constrained *and* blocked (cageds). Partial modification of functions calls from booleans to flags. - Bug: In NegociateWindow::NegociateOverlapCost, check for fixed segments before trying to get DataNegociate. The lack of DataNegociate cause the TrackElement to be discarted. It's a failsafe behavior, but it leads to overlaps. - Bug: In ProtectRoutingPad, in Pad Cells only, *do not* protect RoutingPad to avoid the edge capacity over the pad to decrease to zero. This is due to unused RoutingPads being accounted as blockages.
2010-12-04 09:25:48 -06:00
continue;
}
coreReserved = getHTracksReservedLocal();
* ./kite: - Change: Propagate renaming "obstacle" -> "blockage". - Bug/Change: In Configuration, the value of the extensionCap was too big (1.5 lambda), reduce to 0.5 lambda. This is a problem, the extension should be coupled to the layer as it is not the same for each METAL. - Bug: When using TrackElement, always uses the virtual "->isFixed()" method instead of trying to access to "->base()->isFixed()" as the base may be NULL in case of blockage/fixed segment. - Change: Merge PowerRails & Blockage trans-hierarchical construction (into PowerRails). All blockages are groupeds under "blockagenet". Allows to remove TrackBlockage & BuildBlockages. - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, ring power segments around the core must completly saturate the edges in their segment direction. This is to prevent the global router to use paths under the power/ground ring (may generate unsolvable configs). - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, distinguish three areas: the core (65%), the corona (90%) and the pads (100%). Capacities on the edges are sets accordingly. - Change: In RoutingEvent, introduce an alternative algorithm for conflictSolve1, FindPath which try to deduce the breakpoints from a truly explorated path. Unfortunatly this gives worst results than the Cs1Candidates method. The why should be investigated as it's a critical point in the algorithm. - Change: In Manipulator::ripupPerpandicular(), when a caged perpandicular is encountered, instead of just "stopping", rip it up and change is axis hint (actually increase) it's axis hint so it stands a chance to go outside the track with an obstacle. - Change: In RoutingEvent/State::slackenTopology(), allow move up of local segments when they are tightly constrained *and* blocked (cageds). Partial modification of functions calls from booleans to flags. - Bug: In NegociateWindow::NegociateOverlapCost, check for fixed segments before trying to get DataNegociate. The lack of DataNegociate cause the TrackElement to be discarted. It's a failsafe behavior, but it leads to overlaps. - Bug: In ProtectRoutingPad, in Pad Cells only, *do not* protect RoutingPad to avoid the edge capacity over the pad to decrease to zero. This is due to unused RoutingPads being accounted as blockages.
2010-12-04 09:25:48 -06:00
} else {
edge = vertex->getVEdgeOut();
if (not edge) continue;
Improved UpdateSession & exception catching. Start of RoutingGauge implem. Miscellaneous: * Change: In <crlcore>, in display.conf use the same display threshold for both METAL2 & METAL3. In alliance.conf, the side of VIAs in the gauge is 2l (not 3l). In kite.conf, separate edge densities for H/V. * Change: In <Cell>, in flattenNets() use flag as argument, not a boolean. Do not create rings for clock or supply nets. * Change: In <DeepNet>, in _createRoutingPads() do not create rings for clock or supply net (duplicated policy as in Cell::flattenNets()). * Bug: In <ControllerWidget>, at last find the bad signal disconnect that was causing ungraceful messages. * Change: In <knik>, in Edge display occupancy/capacity in the string name. Improved display progress and debugging capabilities. Improved exception catch & breakpoint managment: * Bug: In <PaletteWidget>, in updateExtensions() replace the calls to deleteLayer() by delete. This cause the widget to be immediatly erased instead of waiting for the event queue to be completly processed. This was causing the widget to be left in a incoherent state when stoping at a breakpoint. * Bug: In <BreakpointWidget>, in execNoModal(), flush the main event loop (QApplication::flush()) *before* lauching the *local* event loop. This is to ensure all widgets are in their final state when waiting (especially <PaletteWidget>). * Change: In <ExceptionWidget>, new method catchAllWrapper() to execute any std::function< void() > function/method with a "try"/ "catch" wraparound and lauch the widget in case something is catch. * New: In <hurricane>, support for a oberver pattern, backported from <katabatic> with an Obervable capable of being linked to any number of Obervers. * New: In <Cell>, made it observable to detect Cell change, currently emit two kind of signals: - Cell::CellAboutToChange : *before* any change. - Cell::CellChanged : *after* the change has been completed. * New: In <UpdateSession>, in Go::invalidate() add the Cell owning the Go to the UPDATOR_STACK (of course the cell is added only once). In addition, when the Cell is added, send a notification of Cell::CellAboutToChange to all it's observers. The slave instances are also invalidated. Conversely in UpdateSession::_preDestroy() for each invalidated Cell send a Cell::CellChanged notification to all observer. The UPDATOR_STACK has been slightly amended to accept Cell which are not Gos. Prior to this, the Cell where completly excluded from the UpdateSession mechanism, so it's instances where never actualised of anything referring to the Cell for that matter. Note: we use two different mechanisms to transmit a Cell change, observers and the slave instance map. I think at some point it should be unificated. * Change: In <CellViewer>, make it a Cell observer to redraw when the cell is modificated (also update the palette). Uses the catchAllWrapper() to protect all critical actions. * Change: In <GraphicTool>, no longer need of cellPreModificated and cellPostModificated signals. Now done through the Cell obersvers. * Change: In <mauka>, <etesian> & <kite> now uses the catchAllWrapper method for protection (need to split methods in two, to be able to pass it as argument). No longer emit cellPreModificated and cellPostModificated. Support for RoutingGauge in P&R: * Bug: In <placeandroute.py>, the connection from the internal power ring to the connectors was not done correctly. Wrong contact layers leading to a gap. * Change: In <BuildPowerRails>, detection of the corona signals based on how the "pck_px" pad is connected. No longer based on name matching. * Change: In <placeandroute.py>, support for 2 routing metal only (3 metal in the technology). * Change: In <katabatic> & <kite> support for a "top layer" limitation on the routing gauge, this allows to use only two routing metals (METAL2 & METAL3). Work in progress.
2014-04-20 12:25:08 -05:00
if (chipTools.vPadsEnclosed(edge->getBoundingBox())) {
edge->setCapacity( 0 );
* ./kite: - Change: Propagate renaming "obstacle" -> "blockage". - Bug/Change: In Configuration, the value of the extensionCap was too big (1.5 lambda), reduce to 0.5 lambda. This is a problem, the extension should be coupled to the layer as it is not the same for each METAL. - Bug: When using TrackElement, always uses the virtual "->isFixed()" method instead of trying to access to "->base()->isFixed()" as the base may be NULL in case of blockage/fixed segment. - Change: Merge PowerRails & Blockage trans-hierarchical construction (into PowerRails). All blockages are groupeds under "blockagenet". Allows to remove TrackBlockage & BuildBlockages. - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, ring power segments around the core must completly saturate the edges in their segment direction. This is to prevent the global router to use paths under the power/ground ring (may generate unsolvable configs). - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, distinguish three areas: the core (65%), the corona (90%) and the pads (100%). Capacities on the edges are sets accordingly. - Change: In RoutingEvent, introduce an alternative algorithm for conflictSolve1, FindPath which try to deduce the breakpoints from a truly explorated path. Unfortunatly this gives worst results than the Cs1Candidates method. The why should be investigated as it's a critical point in the algorithm. - Change: In Manipulator::ripupPerpandicular(), when a caged perpandicular is encountered, instead of just "stopping", rip it up and change is axis hint (actually increase) it's axis hint so it stands a chance to go outside the track with an obstacle. - Change: In RoutingEvent/State::slackenTopology(), allow move up of local segments when they are tightly constrained *and* blocked (cageds). Partial modification of functions calls from booleans to flags. - Bug: In NegociateWindow::NegociateOverlapCost, check for fixed segments before trying to get DataNegociate. The lack of DataNegociate cause the TrackElement to be discarted. It's a failsafe behavior, but it leads to overlaps. - Bug: In ProtectRoutingPad, in Pad Cells only, *do not* protect RoutingPad to avoid the edge capacity over the pad to decrease to zero. This is due to unused RoutingPads being accounted as blockages.
2010-12-04 09:25:48 -06:00
continue;
}
coreReserved = getVTracksReservedLocal();
* ./kite: - Change: Propagate renaming "obstacle" -> "blockage". - Bug/Change: In Configuration, the value of the extensionCap was too big (1.5 lambda), reduce to 0.5 lambda. This is a problem, the extension should be coupled to the layer as it is not the same for each METAL. - Bug: When using TrackElement, always uses the virtual "->isFixed()" method instead of trying to access to "->base()->isFixed()" as the base may be NULL in case of blockage/fixed segment. - Change: Merge PowerRails & Blockage trans-hierarchical construction (into PowerRails). All blockages are groupeds under "blockagenet". Allows to remove TrackBlockage & BuildBlockages. - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, ring power segments around the core must completly saturate the edges in their segment direction. This is to prevent the global router to use paths under the power/ground ring (may generate unsolvable configs). - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, distinguish three areas: the core (65%), the corona (90%) and the pads (100%). Capacities on the edges are sets accordingly. - Change: In RoutingEvent, introduce an alternative algorithm for conflictSolve1, FindPath which try to deduce the breakpoints from a truly explorated path. Unfortunatly this gives worst results than the Cs1Candidates method. The why should be investigated as it's a critical point in the algorithm. - Change: In Manipulator::ripupPerpandicular(), when a caged perpandicular is encountered, instead of just "stopping", rip it up and change is axis hint (actually increase) it's axis hint so it stands a chance to go outside the track with an obstacle. - Change: In RoutingEvent/State::slackenTopology(), allow move up of local segments when they are tightly constrained *and* blocked (cageds). Partial modification of functions calls from booleans to flags. - Bug: In NegociateWindow::NegociateOverlapCost, check for fixed segments before trying to get DataNegociate. The lack of DataNegociate cause the TrackElement to be discarted. It's a failsafe behavior, but it leads to overlaps. - Bug: In ProtectRoutingPad, in Pad Cells only, *do not* protect RoutingPad to avoid the edge capacity over the pad to decrease to zero. This is due to unused RoutingPads being accounted as blockages.
2010-12-04 09:25:48 -06:00
}
size_t edgeReserved = 0;
if (chipTools.getCorona().getInnerBox().contains(edge->getBoundingBox())) {
edgeReserved = coreReserved;
} else if (chipTools.getCorona().getOuterBox().contains(edge->getBoundingBox())) {
edgeReserved = coronaReserved;
* ./kite: - New: In NegociateWindow/RoutingEvent, adds a more comprehensive stage "Repair". Perform in three stage: first try to place with a relaxed constraint (one GCell on each side). Second try to minimize the faulty segment. Third perform another "repack perpandicular" but this time the faulty segment is re-inserted *before* any of it's perpandiculars. - New: In RoutingEvent::cacheAxisHint(), when a segment has a parent, that is comes for a "moveUp()", uses the parent axis hint as it's own. - New: In State::slackenTopology(), in the global FSM, adds a special operation when reaching MaximumSlack: forceOverLocals(), try to insert the global on track containing only local segments. Should tend to concentrate locals on a small set of shared tracks. Most useful on the highest layers. - New: In State::slackenTopology(), in the "MoveUp" state, try to find the more appropriate segment to move up (Manipulator::desaturate()). Effectively move up the longest segment fully enclosing the one we are processing. - New: In State::slackenTopology(), add a check for fully blocked segments in the local segment FSM. Calls State::solveFullBlocked(). - New: In KiteEngine::createGlobalGraph(), decrease the vertical capacity of one track inside the core. Helps smooth the vertical density. - Change: In Manipulator::insertInTrack(), when a track is freed for a to be inserted changes the priorities so that the segment is immediatly inserted. Parallels ripeds and theirs perpandiculars are replaced only *after*. This is the opposite of the previous behavior. - Change: In NegociateWindow::NegociateOverlapCost(), account the costs of terminals only for deep depth layers (M1, M2 & M3). - Change: In RoutingEvent::insertInTrack(), expand the excluded interval by a half-pitch (2.5l) instead of one lambda. - Change: In State::State(), do not uses DiscardGlobal if the ripup count exceed 5. Case of the "Strap" segments that can be ripped a lot before changing state. - Change: In State::_processNegociate(), no longer lock into position (fixed) the local terminal segments as a last resort. - Change: In RoutingEvent::_processNegociate(), no longer ripup perpandiculars when a segment is inserted in a free space. Reduce the number of events whithout degrading the routing quality. - Change: In State::conflictSolve1_v1b(), if getLongestConflict() is nul, ignore the track, the conflict must occurs on another track. - Change: In TrackCost, add a flag support. First uses, a flags to prevent a local of the topmost layer to ripup a global which is in moveUp state. - Bug: In State::solveFullBlockage(), after have been freed, reset the segment state to "moveUp". - Bug: In manipulator::minimize(), the axisHint was miscalculated if the punctual span was empty.
2011-01-25 11:16:50 -06:00
}
size_t capacity = (edge->getCapacity()>edgeReserved)
? (edge->getCapacity()-edgeReserved) : 0;
//cerr << "Setting capacity " << capacity << " ("
Improved UpdateSession & exception catching. Start of RoutingGauge implem. Miscellaneous: * Change: In <crlcore>, in display.conf use the same display threshold for both METAL2 & METAL3. In alliance.conf, the side of VIAs in the gauge is 2l (not 3l). In kite.conf, separate edge densities for H/V. * Change: In <Cell>, in flattenNets() use flag as argument, not a boolean. Do not create rings for clock or supply nets. * Change: In <DeepNet>, in _createRoutingPads() do not create rings for clock or supply net (duplicated policy as in Cell::flattenNets()). * Bug: In <ControllerWidget>, at last find the bad signal disconnect that was causing ungraceful messages. * Change: In <knik>, in Edge display occupancy/capacity in the string name. Improved display progress and debugging capabilities. Improved exception catch & breakpoint managment: * Bug: In <PaletteWidget>, in updateExtensions() replace the calls to deleteLayer() by delete. This cause the widget to be immediatly erased instead of waiting for the event queue to be completly processed. This was causing the widget to be left in a incoherent state when stoping at a breakpoint. * Bug: In <BreakpointWidget>, in execNoModal(), flush the main event loop (QApplication::flush()) *before* lauching the *local* event loop. This is to ensure all widgets are in their final state when waiting (especially <PaletteWidget>). * Change: In <ExceptionWidget>, new method catchAllWrapper() to execute any std::function< void() > function/method with a "try"/ "catch" wraparound and lauch the widget in case something is catch. * New: In <hurricane>, support for a oberver pattern, backported from <katabatic> with an Obervable capable of being linked to any number of Obervers. * New: In <Cell>, made it observable to detect Cell change, currently emit two kind of signals: - Cell::CellAboutToChange : *before* any change. - Cell::CellChanged : *after* the change has been completed. * New: In <UpdateSession>, in Go::invalidate() add the Cell owning the Go to the UPDATOR_STACK (of course the cell is added only once). In addition, when the Cell is added, send a notification of Cell::CellAboutToChange to all it's observers. The slave instances are also invalidated. Conversely in UpdateSession::_preDestroy() for each invalidated Cell send a Cell::CellChanged notification to all observer. The UPDATOR_STACK has been slightly amended to accept Cell which are not Gos. Prior to this, the Cell where completly excluded from the UpdateSession mechanism, so it's instances where never actualised of anything referring to the Cell for that matter. Note: we use two different mechanisms to transmit a Cell change, observers and the slave instance map. I think at some point it should be unificated. * Change: In <CellViewer>, make it a Cell observer to redraw when the cell is modificated (also update the palette). Uses the catchAllWrapper() to protect all critical actions. * Change: In <GraphicTool>, no longer need of cellPreModificated and cellPostModificated signals. Now done through the Cell obersvers. * Change: In <mauka>, <etesian> & <kite> now uses the catchAllWrapper method for protection (need to split methods in two, to be able to pass it as argument). No longer emit cellPreModificated and cellPostModificated. Support for RoutingGauge in P&R: * Bug: In <placeandroute.py>, the connection from the internal power ring to the connectors was not done correctly. Wrong contact layers leading to a gap. * Change: In <BuildPowerRails>, detection of the corona signals based on how the "pck_px" pad is connected. No longer based on name matching. * Change: In <placeandroute.py>, support for 2 routing metal only (3 metal in the technology). * Change: In <katabatic> & <kite> support for a "top layer" limitation on the routing gauge, this allows to use only two routing metals (METAL2 & METAL3). Work in progress.
2014-04-20 12:25:08 -05:00
// << capacity << ") on: " << edge << endl;
edge->setCapacity( capacity );
* ./kite: - Change: Propagate renaming "obstacle" -> "blockage". - Bug/Change: In Configuration, the value of the extensionCap was too big (1.5 lambda), reduce to 0.5 lambda. This is a problem, the extension should be coupled to the layer as it is not the same for each METAL. - Bug: When using TrackElement, always uses the virtual "->isFixed()" method instead of trying to access to "->base()->isFixed()" as the base may be NULL in case of blockage/fixed segment. - Change: Merge PowerRails & Blockage trans-hierarchical construction (into PowerRails). All blockages are groupeds under "blockagenet". Allows to remove TrackBlockage & BuildBlockages. - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, ring power segments around the core must completly saturate the edges in their segment direction. This is to prevent the global router to use paths under the power/ground ring (may generate unsolvable configs). - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, distinguish three areas: the core (65%), the corona (90%) and the pads (100%). Capacities on the edges are sets accordingly. - Change: In RoutingEvent, introduce an alternative algorithm for conflictSolve1, FindPath which try to deduce the breakpoints from a truly explorated path. Unfortunatly this gives worst results than the Cs1Candidates method. The why should be investigated as it's a critical point in the algorithm. - Change: In Manipulator::ripupPerpandicular(), when a caged perpandicular is encountered, instead of just "stopping", rip it up and change is axis hint (actually increase) it's axis hint so it stands a chance to go outside the track with an obstacle. - Change: In RoutingEvent/State::slackenTopology(), allow move up of local segments when they are tightly constrained *and* blocked (cageds). Partial modification of functions calls from booleans to flags. - Bug: In NegociateWindow::NegociateOverlapCost, check for fixed segments before trying to get DataNegociate. The lack of DataNegociate cause the TrackElement to be discarted. It's a failsafe behavior, but it leads to overlaps. - Bug: In ProtectRoutingPad, in Pad Cells only, *do not* protect RoutingPad to avoid the edge capacity over the pad to decrease to zero. This is due to unused RoutingPads being accounted as blockages.
2010-12-04 09:25:48 -06:00
}
}
}
}
void KiteEngine::createDetailedGrid ()
{
KatabaticEngine::createDetailedGrid();
size_t maxDepth = getRoutingGauge()->getDepth();
_routingPlanes.reserve( maxDepth );
for ( size_t depth=0 ; depth < maxDepth ; depth++ ) {
_routingPlanes.push_back( RoutingPlane::create ( this, depth ) );
}
}
void KiteEngine::saveGlobalSolution ()
{
if (getState() < Katabatic::EngineGlobalLoaded)
throw Error ("KiteEngine::saveGlobalSolution(): Global routing not present yet.");
if (getState() > Katabatic::EngineGlobalLoaded)
throw Error ("KiteEngine::saveGlobalSolution(): Cannot save after detailed routing.");
_knik->saveSolution();
}
void KiteEngine::annotateGlobalGraph ()
{
cmess1 << " o Back annotate global routing graph." << endl;
//const Torus& chipCorona = getChipTools().getCorona();
* ./kite: - Change: Propagate renaming "obstacle" -> "blockage". - Bug/Change: In Configuration, the value of the extensionCap was too big (1.5 lambda), reduce to 0.5 lambda. This is a problem, the extension should be coupled to the layer as it is not the same for each METAL. - Bug: When using TrackElement, always uses the virtual "->isFixed()" method instead of trying to access to "->base()->isFixed()" as the base may be NULL in case of blockage/fixed segment. - Change: Merge PowerRails & Blockage trans-hierarchical construction (into PowerRails). All blockages are groupeds under "blockagenet". Allows to remove TrackBlockage & BuildBlockages. - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, ring power segments around the core must completly saturate the edges in their segment direction. This is to prevent the global router to use paths under the power/ground ring (may generate unsolvable configs). - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, distinguish three areas: the core (65%), the corona (90%) and the pads (100%). Capacities on the edges are sets accordingly. - Change: In RoutingEvent, introduce an alternative algorithm for conflictSolve1, FindPath which try to deduce the breakpoints from a truly explorated path. Unfortunatly this gives worst results than the Cs1Candidates method. The why should be investigated as it's a critical point in the algorithm. - Change: In Manipulator::ripupPerpandicular(), when a caged perpandicular is encountered, instead of just "stopping", rip it up and change is axis hint (actually increase) it's axis hint so it stands a chance to go outside the track with an obstacle. - Change: In RoutingEvent/State::slackenTopology(), allow move up of local segments when they are tightly constrained *and* blocked (cageds). Partial modification of functions calls from booleans to flags. - Bug: In NegociateWindow::NegociateOverlapCost, check for fixed segments before trying to get DataNegociate. The lack of DataNegociate cause the TrackElement to be discarted. It's a failsafe behavior, but it leads to overlaps. - Bug: In ProtectRoutingPad, in Pad Cells only, *do not* protect RoutingPad to avoid the edge capacity over the pad to decrease to zero. This is due to unused RoutingPads being accounted as blockages.
2010-12-04 09:25:48 -06:00
int hEdgeCapacity = 0;
int vEdgeCapacity = 0;
for ( size_t depth=0 ; depth<_routingPlanes.size() ; ++depth ) {
RoutingPlane* rp = _routingPlanes[depth];
Improved UpdateSession & exception catching. Start of RoutingGauge implem. Miscellaneous: * Change: In <crlcore>, in display.conf use the same display threshold for both METAL2 & METAL3. In alliance.conf, the side of VIAs in the gauge is 2l (not 3l). In kite.conf, separate edge densities for H/V. * Change: In <Cell>, in flattenNets() use flag as argument, not a boolean. Do not create rings for clock or supply nets. * Change: In <DeepNet>, in _createRoutingPads() do not create rings for clock or supply net (duplicated policy as in Cell::flattenNets()). * Bug: In <ControllerWidget>, at last find the bad signal disconnect that was causing ungraceful messages. * Change: In <knik>, in Edge display occupancy/capacity in the string name. Improved display progress and debugging capabilities. Improved exception catch & breakpoint managment: * Bug: In <PaletteWidget>, in updateExtensions() replace the calls to deleteLayer() by delete. This cause the widget to be immediatly erased instead of waiting for the event queue to be completly processed. This was causing the widget to be left in a incoherent state when stoping at a breakpoint. * Bug: In <BreakpointWidget>, in execNoModal(), flush the main event loop (QApplication::flush()) *before* lauching the *local* event loop. This is to ensure all widgets are in their final state when waiting (especially <PaletteWidget>). * Change: In <ExceptionWidget>, new method catchAllWrapper() to execute any std::function< void() > function/method with a "try"/ "catch" wraparound and lauch the widget in case something is catch. * New: In <hurricane>, support for a oberver pattern, backported from <katabatic> with an Obervable capable of being linked to any number of Obervers. * New: In <Cell>, made it observable to detect Cell change, currently emit two kind of signals: - Cell::CellAboutToChange : *before* any change. - Cell::CellChanged : *after* the change has been completed. * New: In <UpdateSession>, in Go::invalidate() add the Cell owning the Go to the UPDATOR_STACK (of course the cell is added only once). In addition, when the Cell is added, send a notification of Cell::CellAboutToChange to all it's observers. The slave instances are also invalidated. Conversely in UpdateSession::_preDestroy() for each invalidated Cell send a Cell::CellChanged notification to all observer. The UPDATOR_STACK has been slightly amended to accept Cell which are not Gos. Prior to this, the Cell where completly excluded from the UpdateSession mechanism, so it's instances where never actualised of anything referring to the Cell for that matter. Note: we use two different mechanisms to transmit a Cell change, observers and the slave instance map. I think at some point it should be unificated. * Change: In <CellViewer>, make it a Cell observer to redraw when the cell is modificated (also update the palette). Uses the catchAllWrapper() to protect all critical actions. * Change: In <GraphicTool>, no longer need of cellPreModificated and cellPostModificated signals. Now done through the Cell obersvers. * Change: In <mauka>, <etesian> & <kite> now uses the catchAllWrapper method for protection (need to split methods in two, to be able to pass it as argument). No longer emit cellPreModificated and cellPostModificated. Support for RoutingGauge in P&R: * Bug: In <placeandroute.py>, the connection from the internal power ring to the connectors was not done correctly. Wrong contact layers leading to a gap. * Change: In <BuildPowerRails>, detection of the corona signals based on how the "pck_px" pad is connected. No longer based on name matching. * Change: In <placeandroute.py>, support for 2 routing metal only (3 metal in the technology). * Change: In <katabatic> & <kite> support for a "top layer" limitation on the routing gauge, this allows to use only two routing metals (METAL2 & METAL3). Work in progress.
2014-04-20 12:25:08 -05:00
if (rp->getLayerGauge()->getType() == Constant::PinOnly ) continue;
if (rp->getLayerGauge()->getDepth() > getConfiguration()->getAllowedDepth() ) continue;
* ./kite: - Change: Propagate renaming "obstacle" -> "blockage". - Bug/Change: In Configuration, the value of the extensionCap was too big (1.5 lambda), reduce to 0.5 lambda. This is a problem, the extension should be coupled to the layer as it is not the same for each METAL. - Bug: When using TrackElement, always uses the virtual "->isFixed()" method instead of trying to access to "->base()->isFixed()" as the base may be NULL in case of blockage/fixed segment. - Change: Merge PowerRails & Blockage trans-hierarchical construction (into PowerRails). All blockages are groupeds under "blockagenet". Allows to remove TrackBlockage & BuildBlockages. - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, ring power segments around the core must completly saturate the edges in their segment direction. This is to prevent the global router to use paths under the power/ground ring (may generate unsolvable configs). - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, distinguish three areas: the core (65%), the corona (90%) and the pads (100%). Capacities on the edges are sets accordingly. - Change: In RoutingEvent, introduce an alternative algorithm for conflictSolve1, FindPath which try to deduce the breakpoints from a truly explorated path. Unfortunatly this gives worst results than the Cs1Candidates method. The why should be investigated as it's a critical point in the algorithm. - Change: In Manipulator::ripupPerpandicular(), when a caged perpandicular is encountered, instead of just "stopping", rip it up and change is axis hint (actually increase) it's axis hint so it stands a chance to go outside the track with an obstacle. - Change: In RoutingEvent/State::slackenTopology(), allow move up of local segments when they are tightly constrained *and* blocked (cageds). Partial modification of functions calls from booleans to flags. - Bug: In NegociateWindow::NegociateOverlapCost, check for fixed segments before trying to get DataNegociate. The lack of DataNegociate cause the TrackElement to be discarted. It's a failsafe behavior, but it leads to overlaps. - Bug: In ProtectRoutingPad, in Pad Cells only, *do not* protect RoutingPad to avoid the edge capacity over the pad to decrease to zero. This is due to unused RoutingPads being accounted as blockages.
2010-12-04 09:25:48 -06:00
if (rp->getDirection() == KbHorizontal) ++hEdgeCapacity;
* ./kite: - Change: Propagate renaming "obstacle" -> "blockage". - Bug/Change: In Configuration, the value of the extensionCap was too big (1.5 lambda), reduce to 0.5 lambda. This is a problem, the extension should be coupled to the layer as it is not the same for each METAL. - Bug: When using TrackElement, always uses the virtual "->isFixed()" method instead of trying to access to "->base()->isFixed()" as the base may be NULL in case of blockage/fixed segment. - Change: Merge PowerRails & Blockage trans-hierarchical construction (into PowerRails). All blockages are groupeds under "blockagenet". Allows to remove TrackBlockage & BuildBlockages. - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, ring power segments around the core must completly saturate the edges in their segment direction. This is to prevent the global router to use paths under the power/ground ring (may generate unsolvable configs). - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, distinguish three areas: the core (65%), the corona (90%) and the pads (100%). Capacities on the edges are sets accordingly. - Change: In RoutingEvent, introduce an alternative algorithm for conflictSolve1, FindPath which try to deduce the breakpoints from a truly explorated path. Unfortunatly this gives worst results than the Cs1Candidates method. The why should be investigated as it's a critical point in the algorithm. - Change: In Manipulator::ripupPerpandicular(), when a caged perpandicular is encountered, instead of just "stopping", rip it up and change is axis hint (actually increase) it's axis hint so it stands a chance to go outside the track with an obstacle. - Change: In RoutingEvent/State::slackenTopology(), allow move up of local segments when they are tightly constrained *and* blocked (cageds). Partial modification of functions calls from booleans to flags. - Bug: In NegociateWindow::NegociateOverlapCost, check for fixed segments before trying to get DataNegociate. The lack of DataNegociate cause the TrackElement to be discarted. It's a failsafe behavior, but it leads to overlaps. - Bug: In ProtectRoutingPad, in Pad Cells only, *do not* protect RoutingPad to avoid the edge capacity over the pad to decrease to zero. This is due to unused RoutingPads being accounted as blockages.
2010-12-04 09:25:48 -06:00
else ++vEdgeCapacity;
}
for ( size_t depth=0 ; depth<_routingPlanes.size() ; ++depth ) {
RoutingPlane* rp = _routingPlanes[depth];
if (rp->getLayerGauge()->getType() == Constant::PinOnly ) continue;
Improved UpdateSession & exception catching. Start of RoutingGauge implem. Miscellaneous: * Change: In <crlcore>, in display.conf use the same display threshold for both METAL2 & METAL3. In alliance.conf, the side of VIAs in the gauge is 2l (not 3l). In kite.conf, separate edge densities for H/V. * Change: In <Cell>, in flattenNets() use flag as argument, not a boolean. Do not create rings for clock or supply nets. * Change: In <DeepNet>, in _createRoutingPads() do not create rings for clock or supply net (duplicated policy as in Cell::flattenNets()). * Bug: In <ControllerWidget>, at last find the bad signal disconnect that was causing ungraceful messages. * Change: In <knik>, in Edge display occupancy/capacity in the string name. Improved display progress and debugging capabilities. Improved exception catch & breakpoint managment: * Bug: In <PaletteWidget>, in updateExtensions() replace the calls to deleteLayer() by delete. This cause the widget to be immediatly erased instead of waiting for the event queue to be completly processed. This was causing the widget to be left in a incoherent state when stoping at a breakpoint. * Bug: In <BreakpointWidget>, in execNoModal(), flush the main event loop (QApplication::flush()) *before* lauching the *local* event loop. This is to ensure all widgets are in their final state when waiting (especially <PaletteWidget>). * Change: In <ExceptionWidget>, new method catchAllWrapper() to execute any std::function< void() > function/method with a "try"/ "catch" wraparound and lauch the widget in case something is catch. * New: In <hurricane>, support for a oberver pattern, backported from <katabatic> with an Obervable capable of being linked to any number of Obervers. * New: In <Cell>, made it observable to detect Cell change, currently emit two kind of signals: - Cell::CellAboutToChange : *before* any change. - Cell::CellChanged : *after* the change has been completed. * New: In <UpdateSession>, in Go::invalidate() add the Cell owning the Go to the UPDATOR_STACK (of course the cell is added only once). In addition, when the Cell is added, send a notification of Cell::CellAboutToChange to all it's observers. The slave instances are also invalidated. Conversely in UpdateSession::_preDestroy() for each invalidated Cell send a Cell::CellChanged notification to all observer. The UPDATOR_STACK has been slightly amended to accept Cell which are not Gos. Prior to this, the Cell where completly excluded from the UpdateSession mechanism, so it's instances where never actualised of anything referring to the Cell for that matter. Note: we use two different mechanisms to transmit a Cell change, observers and the slave instance map. I think at some point it should be unificated. * Change: In <CellViewer>, make it a Cell observer to redraw when the cell is modificated (also update the palette). Uses the catchAllWrapper() to protect all critical actions. * Change: In <GraphicTool>, no longer need of cellPreModificated and cellPostModificated signals. Now done through the Cell obersvers. * Change: In <mauka>, <etesian> & <kite> now uses the catchAllWrapper method for protection (need to split methods in two, to be able to pass it as argument). No longer emit cellPreModificated and cellPostModificated. Support for RoutingGauge in P&R: * Bug: In <placeandroute.py>, the connection from the internal power ring to the connectors was not done correctly. Wrong contact layers leading to a gap. * Change: In <BuildPowerRails>, detection of the corona signals based on how the "pck_px" pad is connected. No longer based on name matching. * Change: In <placeandroute.py>, support for 2 routing metal only (3 metal in the technology). * Change: In <katabatic> & <kite> support for a "top layer" limitation on the routing gauge, this allows to use only two routing metals (METAL2 & METAL3). Work in progress.
2014-04-20 12:25:08 -05:00
if (rp->getLayerGauge()->getDepth() > getConfiguration()->getAllowedDepth() ) continue;
size_t tracksSize = rp->getTracksSize();
for ( size_t itrack=0 ; itrack<tracksSize ; ++itrack ) {
Track* track = rp->getTrackByIndex ( itrack );
cdebug_log(159,0) << "Capacity from: " << track << endl;
if (track->getDirection() == KbHorizontal) {
for ( size_t ielement=0 ; ielement<track->getSize() ; ++ielement ) {
TrackElement* element = track->getSegment( ielement );
if (element->getNet() == NULL) {
cdebug_log(159,0) << "Reject capacity from (not Net): " << element << endl;
continue;
}
Implementation of pre-routing support (for clock-tree compliance). * New: In Katabatic, in <AutoContact>, this class is no longer derived from ExtentionGo. With the simplificated AutoContacts, there is no reason to do so, and it will save some QuadTree insertions/deletions. New factory function AutoContact::createFrom(Contact*) which try to build an AutoContact on top of a Hurricane::Contact. Of course that base contact *must fit* into one of the predefined Contact configurations (Terminal, Turn, HTee or VTee). NOTE: This implies that the pre-routed segments & contacts *are* correctly articulated, which is not the case when a Cell is read from disk in "ap" format. The pre-routing feature must be used for now without any re-read from disk. We will implement a re-articulating pre-process in the future. * Change: In Katabatic, in <AutoContact> derived classes, the ::updateCache() method now display an accurate error message if a segment is connected but has no AutoSegment conterpart (i.e. the lookup fails). * New: In Katabatic, in <AutoSegment>, the ::computeOptimal() method is short-circuited for pre-routed segments, the optimal axis position is considered to be the one it is currently on (i.e. we trust the designer). * New: In Katabatic, in <KatabaticEngine>, the ::loadGlobalRouting() method now accept a map of excluded nets (same as Knik). This map is the one of pre-routed nets. * New: In Katabatic, in layer assignment, do not try to displace fixed segments... * New: In Katabatic, in <AutoSegment>, new flag SegUserDefined and related methods to know if a segment comes from the global router (Knik) or is pre-routed (supplied by the user). * New: In Kite, In <BuildPowerRails>, support (exclusion) for pre-routed nets. * New: In Kite, In <GraphicKiteEngine> new menu entry for running the router on pre-routed nets ("Detailed Pre-Route"), also integrated in the all-on-one route command. * New: In Kite, In KiteEngine, new method ::_initDataBase() that group all the initialisation steps. It is a mix of calls between Knik and Kite initializations which are intertwinneds (may have to devellop a shared common base at a later point). It creates the Knik grid, then the Katabatic grid, then load pre-routed wires and power rails and protect isolated RoutingPads. Add support for a map of pre-routed nets (to be excluded for Knik calls). The method "::run()" now uses function flags, firstly to know if it is managing pre-routed wires or general purposes ones. * New: In Kite, in <NegociateWindow>, the "::run()" methods has now two modes. The normal one and the 'KtPreRoutedStage' that is for routing pre-routed nets. When in pre-route stage, the wires are fixed at the end of this step. * New: In Kite, in <TrackElement> add decorator for AutoSegment isUsedDefined(). * New: In Kite, in <TrackSegment>, the various ::canDogleg() methods returns false for a pre-routed (user-defined segment). * New: In Kite, in PyKiteEngine, added new method runNegociatePreRouted().
2014-06-21 13:16:47 -05:00
if ( (not element->isFixed())
and (not element->isBlockage())
and (not element->isUserDefined()) ) {
cmess2 << "Reject capacity from (neither fixed, blockage nor user defined): " << element << endl;
//cdebug_log(159,0) << "Reject capacity from (neither fixed nor blockage): " << element << endl;
continue;
}
* ./kite: - Change: Propagate renaming "obstacle" -> "blockage". - Bug/Change: In Configuration, the value of the extensionCap was too big (1.5 lambda), reduce to 0.5 lambda. This is a problem, the extension should be coupled to the layer as it is not the same for each METAL. - Bug: When using TrackElement, always uses the virtual "->isFixed()" method instead of trying to access to "->base()->isFixed()" as the base may be NULL in case of blockage/fixed segment. - Change: Merge PowerRails & Blockage trans-hierarchical construction (into PowerRails). All blockages are groupeds under "blockagenet". Allows to remove TrackBlockage & BuildBlockages. - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, ring power segments around the core must completly saturate the edges in their segment direction. This is to prevent the global router to use paths under the power/ground ring (may generate unsolvable configs). - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, distinguish three areas: the core (65%), the corona (90%) and the pads (100%). Capacities on the edges are sets accordingly. - Change: In RoutingEvent, introduce an alternative algorithm for conflictSolve1, FindPath which try to deduce the breakpoints from a truly explorated path. Unfortunatly this gives worst results than the Cs1Candidates method. The why should be investigated as it's a critical point in the algorithm. - Change: In Manipulator::ripupPerpandicular(), when a caged perpandicular is encountered, instead of just "stopping", rip it up and change is axis hint (actually increase) it's axis hint so it stands a chance to go outside the track with an obstacle. - Change: In RoutingEvent/State::slackenTopology(), allow move up of local segments when they are tightly constrained *and* blocked (cageds). Partial modification of functions calls from booleans to flags. - Bug: In NegociateWindow::NegociateOverlapCost, check for fixed segments before trying to get DataNegociate. The lack of DataNegociate cause the TrackElement to be discarted. It's a failsafe behavior, but it leads to overlaps. - Bug: In ProtectRoutingPad, in Pad Cells only, *do not* protect RoutingPad to avoid the edge capacity over the pad to decrease to zero. This is due to unused RoutingPads being accounted as blockages.
2010-12-04 09:25:48 -06:00
//Box elementBb = element->getBoundingBox();
//int elementCapacity = (chipCorona.contains(elementBb)) ? -hEdgeCapacity : -1;
int elementCapacity = -1;
* ./kite: - Change: Propagate renaming "obstacle" -> "blockage". - Bug/Change: In Configuration, the value of the extensionCap was too big (1.5 lambda), reduce to 0.5 lambda. This is a problem, the extension should be coupled to the layer as it is not the same for each METAL. - Bug: When using TrackElement, always uses the virtual "->isFixed()" method instead of trying to access to "->base()->isFixed()" as the base may be NULL in case of blockage/fixed segment. - Change: Merge PowerRails & Blockage trans-hierarchical construction (into PowerRails). All blockages are groupeds under "blockagenet". Allows to remove TrackBlockage & BuildBlockages. - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, ring power segments around the core must completly saturate the edges in their segment direction. This is to prevent the global router to use paths under the power/ground ring (may generate unsolvable configs). - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, distinguish three areas: the core (65%), the corona (90%) and the pads (100%). Capacities on the edges are sets accordingly. - Change: In RoutingEvent, introduce an alternative algorithm for conflictSolve1, FindPath which try to deduce the breakpoints from a truly explorated path. Unfortunatly this gives worst results than the Cs1Candidates method. The why should be investigated as it's a critical point in the algorithm. - Change: In Manipulator::ripupPerpandicular(), when a caged perpandicular is encountered, instead of just "stopping", rip it up and change is axis hint (actually increase) it's axis hint so it stands a chance to go outside the track with an obstacle. - Change: In RoutingEvent/State::slackenTopology(), allow move up of local segments when they are tightly constrained *and* blocked (cageds). Partial modification of functions calls from booleans to flags. - Bug: In NegociateWindow::NegociateOverlapCost, check for fixed segments before trying to get DataNegociate. The lack of DataNegociate cause the TrackElement to be discarted. It's a failsafe behavior, but it leads to overlaps. - Bug: In ProtectRoutingPad, in Pad Cells only, *do not* protect RoutingPad to avoid the edge capacity over the pad to decrease to zero. This is due to unused RoutingPads being accounted as blockages.
2010-12-04 09:25:48 -06:00
cdebug_log(159,0) << "Capacity from: " << element << ":" << elementCapacity << endl;
Katabatic::GCell* gcell = getGCellGrid()->getGCell( Point(element->getSourceU(),track->getAxis()) );
Katabatic::GCell* end = getGCellGrid()->getGCell( Point(element->getTargetU(),track->getAxis()) );
Katabatic::GCell* right = NULL;
if (not gcell) {
cerr << Warning("annotageGlobalGraph(): TrackElement outside GCell grid.") << endl;
continue;
}
* ./kite: - Change: Propagate renaming "obstacle" -> "blockage". - Bug/Change: In Configuration, the value of the extensionCap was too big (1.5 lambda), reduce to 0.5 lambda. This is a problem, the extension should be coupled to the layer as it is not the same for each METAL. - Bug: When using TrackElement, always uses the virtual "->isFixed()" method instead of trying to access to "->base()->isFixed()" as the base may be NULL in case of blockage/fixed segment. - Change: Merge PowerRails & Blockage trans-hierarchical construction (into PowerRails). All blockages are groupeds under "blockagenet". Allows to remove TrackBlockage & BuildBlockages. - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, ring power segments around the core must completly saturate the edges in their segment direction. This is to prevent the global router to use paths under the power/ground ring (may generate unsolvable configs). - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, distinguish three areas: the core (65%), the corona (90%) and the pads (100%). Capacities on the edges are sets accordingly. - Change: In RoutingEvent, introduce an alternative algorithm for conflictSolve1, FindPath which try to deduce the breakpoints from a truly explorated path. Unfortunatly this gives worst results than the Cs1Candidates method. The why should be investigated as it's a critical point in the algorithm. - Change: In Manipulator::ripupPerpandicular(), when a caged perpandicular is encountered, instead of just "stopping", rip it up and change is axis hint (actually increase) it's axis hint so it stands a chance to go outside the track with an obstacle. - Change: In RoutingEvent/State::slackenTopology(), allow move up of local segments when they are tightly constrained *and* blocked (cageds). Partial modification of functions calls from booleans to flags. - Bug: In NegociateWindow::NegociateOverlapCost, check for fixed segments before trying to get DataNegociate. The lack of DataNegociate cause the TrackElement to be discarted. It's a failsafe behavior, but it leads to overlaps. - Bug: In ProtectRoutingPad, in Pad Cells only, *do not* protect RoutingPad to avoid the edge capacity over the pad to decrease to zero. This is due to unused RoutingPads being accounted as blockages.
2010-12-04 09:25:48 -06:00
while ( gcell and (gcell != end) ) {
right = gcell->getRight();
if (right == NULL) break;
_knik->increaseEdgeCapacity( gcell->getColumn()
, gcell->getRow()
, right->getColumn()
, right->getRow()
, elementCapacity );
gcell = right;
}
}
} else {
for ( size_t ielement=0 ; ielement<track->getSize() ; ++ielement ) {
TrackElement* element = track->getSegment( ielement );
if (element->getNet() == NULL) {
cdebug_log(159,0) << "Reject capacity from (not Net): " << element << endl;
continue;
}
* ./kite: - Change: Propagate renaming "obstacle" -> "blockage". - Bug/Change: In Configuration, the value of the extensionCap was too big (1.5 lambda), reduce to 0.5 lambda. This is a problem, the extension should be coupled to the layer as it is not the same for each METAL. - Bug: When using TrackElement, always uses the virtual "->isFixed()" method instead of trying to access to "->base()->isFixed()" as the base may be NULL in case of blockage/fixed segment. - Change: Merge PowerRails & Blockage trans-hierarchical construction (into PowerRails). All blockages are groupeds under "blockagenet". Allows to remove TrackBlockage & BuildBlockages. - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, ring power segments around the core must completly saturate the edges in their segment direction. This is to prevent the global router to use paths under the power/ground ring (may generate unsolvable configs). - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, distinguish three areas: the core (65%), the corona (90%) and the pads (100%). Capacities on the edges are sets accordingly. - Change: In RoutingEvent, introduce an alternative algorithm for conflictSolve1, FindPath which try to deduce the breakpoints from a truly explorated path. Unfortunatly this gives worst results than the Cs1Candidates method. The why should be investigated as it's a critical point in the algorithm. - Change: In Manipulator::ripupPerpandicular(), when a caged perpandicular is encountered, instead of just "stopping", rip it up and change is axis hint (actually increase) it's axis hint so it stands a chance to go outside the track with an obstacle. - Change: In RoutingEvent/State::slackenTopology(), allow move up of local segments when they are tightly constrained *and* blocked (cageds). Partial modification of functions calls from booleans to flags. - Bug: In NegociateWindow::NegociateOverlapCost, check for fixed segments before trying to get DataNegociate. The lack of DataNegociate cause the TrackElement to be discarted. It's a failsafe behavior, but it leads to overlaps. - Bug: In ProtectRoutingPad, in Pad Cells only, *do not* protect RoutingPad to avoid the edge capacity over the pad to decrease to zero. This is due to unused RoutingPads being accounted as blockages.
2010-12-04 09:25:48 -06:00
if ( (not element->isFixed()) and not (element->isBlockage()) ) {
cdebug_log(159,0) << "Reject capacity from (neither fixed nor blockage): " << element << endl;
continue;
}
* ./kite: - Change: Propagate renaming "obstacle" -> "blockage". - Bug/Change: In Configuration, the value of the extensionCap was too big (1.5 lambda), reduce to 0.5 lambda. This is a problem, the extension should be coupled to the layer as it is not the same for each METAL. - Bug: When using TrackElement, always uses the virtual "->isFixed()" method instead of trying to access to "->base()->isFixed()" as the base may be NULL in case of blockage/fixed segment. - Change: Merge PowerRails & Blockage trans-hierarchical construction (into PowerRails). All blockages are groupeds under "blockagenet". Allows to remove TrackBlockage & BuildBlockages. - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, ring power segments around the core must completly saturate the edges in their segment direction. This is to prevent the global router to use paths under the power/ground ring (may generate unsolvable configs). - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, distinguish three areas: the core (65%), the corona (90%) and the pads (100%). Capacities on the edges are sets accordingly. - Change: In RoutingEvent, introduce an alternative algorithm for conflictSolve1, FindPath which try to deduce the breakpoints from a truly explorated path. Unfortunatly this gives worst results than the Cs1Candidates method. The why should be investigated as it's a critical point in the algorithm. - Change: In Manipulator::ripupPerpandicular(), when a caged perpandicular is encountered, instead of just "stopping", rip it up and change is axis hint (actually increase) it's axis hint so it stands a chance to go outside the track with an obstacle. - Change: In RoutingEvent/State::slackenTopology(), allow move up of local segments when they are tightly constrained *and* blocked (cageds). Partial modification of functions calls from booleans to flags. - Bug: In NegociateWindow::NegociateOverlapCost, check for fixed segments before trying to get DataNegociate. The lack of DataNegociate cause the TrackElement to be discarted. It's a failsafe behavior, but it leads to overlaps. - Bug: In ProtectRoutingPad, in Pad Cells only, *do not* protect RoutingPad to avoid the edge capacity over the pad to decrease to zero. This is due to unused RoutingPads being accounted as blockages.
2010-12-04 09:25:48 -06:00
//Box elementBb = element->getBoundingBox();
//int elementCapacity = (chipCorona.contains(elementBb)) ? -vEdgeCapacity : -1;
int elementCapacity = -1;
* ./kite: - Change: Propagate renaming "obstacle" -> "blockage". - Bug/Change: In Configuration, the value of the extensionCap was too big (1.5 lambda), reduce to 0.5 lambda. This is a problem, the extension should be coupled to the layer as it is not the same for each METAL. - Bug: When using TrackElement, always uses the virtual "->isFixed()" method instead of trying to access to "->base()->isFixed()" as the base may be NULL in case of blockage/fixed segment. - Change: Merge PowerRails & Blockage trans-hierarchical construction (into PowerRails). All blockages are groupeds under "blockagenet". Allows to remove TrackBlockage & BuildBlockages. - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, ring power segments around the core must completly saturate the edges in their segment direction. This is to prevent the global router to use paths under the power/ground ring (may generate unsolvable configs). - Change: In KiteEngine::annotateGloblalGraph(), when routing a full chip, distinguish three areas: the core (65%), the corona (90%) and the pads (100%). Capacities on the edges are sets accordingly. - Change: In RoutingEvent, introduce an alternative algorithm for conflictSolve1, FindPath which try to deduce the breakpoints from a truly explorated path. Unfortunatly this gives worst results than the Cs1Candidates method. The why should be investigated as it's a critical point in the algorithm. - Change: In Manipulator::ripupPerpandicular(), when a caged perpandicular is encountered, instead of just "stopping", rip it up and change is axis hint (actually increase) it's axis hint so it stands a chance to go outside the track with an obstacle. - Change: In RoutingEvent/State::slackenTopology(), allow move up of local segments when they are tightly constrained *and* blocked (cageds). Partial modification of functions calls from booleans to flags. - Bug: In NegociateWindow::NegociateOverlapCost, check for fixed segments before trying to get DataNegociate. The lack of DataNegociate cause the TrackElement to be discarted. It's a failsafe behavior, but it leads to overlaps. - Bug: In ProtectRoutingPad, in Pad Cells only, *do not* protect RoutingPad to avoid the edge capacity over the pad to decrease to zero. This is due to unused RoutingPads being accounted as blockages.
2010-12-04 09:25:48 -06:00
cdebug_log(159,0) << "Capacity from: " << element << ":" << elementCapacity << endl;
Katabatic::GCell* gcell = getGCellGrid()->getGCell( Point(track->getAxis(),element->getSourceU()) );
Katabatic::GCell* end = getGCellGrid()->getGCell( Point(track->getAxis(),element->getTargetU()) );
Katabatic::GCell* up = NULL;
if (not gcell) {
cerr << Warning("annotageGlobalGraph(): TrackElement outside GCell grid.") << endl;
continue;
}
while ( gcell and (gcell != end) ) {
up = gcell->getUp();
if (up == NULL) break;
_knik->increaseEdgeCapacity( gcell->getColumn()
, gcell->getRow()
, up->getColumn()
, up->getRow()
, elementCapacity );
gcell = up;
}
}
}
}
}
#if DISABLED
const Box& coreBox = chipCorona.getInnerBox();
Katabatic::GCell* gcell = NULL;
Katabatic::GCell* end = NULL;
Katabatic::GCell* hneighbor = NULL;
for ( size_t i=0 ; i<6 ; ++i ) {
switch ( i ) {
case 0:
case 1:
case 2:
gcell = getGCellGrid()->getGCell( Point(coreBox.getXMin(),coreBox.getYMin()) );
end = getGCellGrid()->getGCell( Point(coreBox.getXMin(),coreBox.getYMax()) );
break;
case 3:
case 4:
case 5:
gcell = getGCellGrid()->getGCell( Point(coreBox.getXMax(),coreBox.getYMin()) );
end = getGCellGrid()->getGCell( Point(coreBox.getXMax(),coreBox.getYMax()) );
break;
}
if (i % 3 == 0) {
gcell = gcell->getLeft();
end = end ->getLeft();
} else if (i % 3 == 2) {
gcell = gcell->getRight();
end = end ->getRight();
}
while ( gcell and (gcell != end) ) {
hneighbor = (i<3) ? gcell->getLeft() : gcell->getRight();
if (hneighbor == NULL) break;
_knik->updateEdgeCapacity( gcell->getColumn()
, gcell->getRow()
, hneighbor->getColumn()
, hneighbor->getRow()
, 3 );
cerr << "Decrease capacity of " << gcell << " (side) by " << hEdgeCapacity << "/2" << endl;
gcell = gcell->getUp();
}
}
#endif
}
void KiteEngine::runGlobalRouter ( unsigned int mode )
{
if (getState() >= Katabatic::EngineGlobalLoaded)
throw Error ("KiteEngine::runGlobalRouter(): Global routing already done or loaded.");
Implementation of pre-routing support (for clock-tree compliance). * New: In Katabatic, in <AutoContact>, this class is no longer derived from ExtentionGo. With the simplificated AutoContacts, there is no reason to do so, and it will save some QuadTree insertions/deletions. New factory function AutoContact::createFrom(Contact*) which try to build an AutoContact on top of a Hurricane::Contact. Of course that base contact *must fit* into one of the predefined Contact configurations (Terminal, Turn, HTee or VTee). NOTE: This implies that the pre-routed segments & contacts *are* correctly articulated, which is not the case when a Cell is read from disk in "ap" format. The pre-routing feature must be used for now without any re-read from disk. We will implement a re-articulating pre-process in the future. * Change: In Katabatic, in <AutoContact> derived classes, the ::updateCache() method now display an accurate error message if a segment is connected but has no AutoSegment conterpart (i.e. the lookup fails). * New: In Katabatic, in <AutoSegment>, the ::computeOptimal() method is short-circuited for pre-routed segments, the optimal axis position is considered to be the one it is currently on (i.e. we trust the designer). * New: In Katabatic, in <KatabaticEngine>, the ::loadGlobalRouting() method now accept a map of excluded nets (same as Knik). This map is the one of pre-routed nets. * New: In Katabatic, in layer assignment, do not try to displace fixed segments... * New: In Katabatic, in <AutoSegment>, new flag SegUserDefined and related methods to know if a segment comes from the global router (Knik) or is pre-routed (supplied by the user). * New: In Kite, In <BuildPowerRails>, support (exclusion) for pre-routed nets. * New: In Kite, In <GraphicKiteEngine> new menu entry for running the router on pre-routed nets ("Detailed Pre-Route"), also integrated in the all-on-one route command. * New: In Kite, In KiteEngine, new method ::_initDataBase() that group all the initialisation steps. It is a mix of calls between Knik and Kite initializations which are intertwinneds (may have to devellop a shared common base at a later point). It creates the Knik grid, then the Katabatic grid, then load pre-routed wires and power rails and protect isolated RoutingPads. Add support for a map of pre-routed nets (to be excluded for Knik calls). The method "::run()" now uses function flags, firstly to know if it is managing pre-routed wires or general purposes ones. * New: In Kite, in <NegociateWindow>, the "::run()" methods has now two modes. The normal one and the 'KtPreRoutedStage' that is for routing pre-routed nets. When in pre-route stage, the wires are fixed at the end of this step. * New: In Kite, in <TrackElement> add decorator for AutoSegment isUsedDefined(). * New: In Kite, in <TrackSegment>, the various ::canDogleg() methods returns false for a pre-routed (user-defined segment). * New: In Kite, in PyKiteEngine, added new method runNegociatePreRouted().
2014-06-21 13:16:47 -05:00
Session::open( this );
if (mode & KtLoadGlobalRouting) {
_knik->loadSolution();
} else {
annotateGlobalGraph();
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
map<Name,Net*> preRouteds;
for ( auto istate : getNetRoutingStates() ) {
if (istate.second->isMixedPreRoute())
preRouteds.insert( make_pair(istate.first, istate.second->getNet()) );
}
_knik->run( preRouteds );
}
setState( Katabatic::EngineGlobalLoaded );
Session::close();
}
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 KiteEngine::loadGlobalRouting ( unsigned int method )
{
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
KatabaticEngine::loadGlobalRouting( method );
Session::open( this );
getGCellGrid()->checkEdgeOverflow( getHTracksReservedLocal(), getVTracksReservedLocal() );
Session::close();
}
Implementation of pre-routing support (for clock-tree compliance). * New: In Katabatic, in <AutoContact>, this class is no longer derived from ExtentionGo. With the simplificated AutoContacts, there is no reason to do so, and it will save some QuadTree insertions/deletions. New factory function AutoContact::createFrom(Contact*) which try to build an AutoContact on top of a Hurricane::Contact. Of course that base contact *must fit* into one of the predefined Contact configurations (Terminal, Turn, HTee or VTee). NOTE: This implies that the pre-routed segments & contacts *are* correctly articulated, which is not the case when a Cell is read from disk in "ap" format. The pre-routing feature must be used for now without any re-read from disk. We will implement a re-articulating pre-process in the future. * Change: In Katabatic, in <AutoContact> derived classes, the ::updateCache() method now display an accurate error message if a segment is connected but has no AutoSegment conterpart (i.e. the lookup fails). * New: In Katabatic, in <AutoSegment>, the ::computeOptimal() method is short-circuited for pre-routed segments, the optimal axis position is considered to be the one it is currently on (i.e. we trust the designer). * New: In Katabatic, in <KatabaticEngine>, the ::loadGlobalRouting() method now accept a map of excluded nets (same as Knik). This map is the one of pre-routed nets. * New: In Katabatic, in layer assignment, do not try to displace fixed segments... * New: In Katabatic, in <AutoSegment>, new flag SegUserDefined and related methods to know if a segment comes from the global router (Knik) or is pre-routed (supplied by the user). * New: In Kite, In <BuildPowerRails>, support (exclusion) for pre-routed nets. * New: In Kite, In <GraphicKiteEngine> new menu entry for running the router on pre-routed nets ("Detailed Pre-Route"), also integrated in the all-on-one route command. * New: In Kite, In KiteEngine, new method ::_initDataBase() that group all the initialisation steps. It is a mix of calls between Knik and Kite initializations which are intertwinneds (may have to devellop a shared common base at a later point). It creates the Knik grid, then the Katabatic grid, then load pre-routed wires and power rails and protect isolated RoutingPads. Add support for a map of pre-routed nets (to be excluded for Knik calls). The method "::run()" now uses function flags, firstly to know if it is managing pre-routed wires or general purposes ones. * New: In Kite, in <NegociateWindow>, the "::run()" methods has now two modes. The normal one and the 'KtPreRoutedStage' that is for routing pre-routed nets. When in pre-route stage, the wires are fixed at the end of this step. * New: In Kite, in <TrackElement> add decorator for AutoSegment isUsedDefined(). * New: In Kite, in <TrackSegment>, the various ::canDogleg() methods returns false for a pre-routed (user-defined segment). * New: In Kite, in PyKiteEngine, added new method runNegociatePreRouted().
2014-06-21 13:16:47 -05:00
void KiteEngine::runNegociate ( unsigned int flags )
{
if (_negociateWindow) return;
startMeasures();
Session::open( this );
_negociateWindow = NegociateWindow::create( this );
_negociateWindow->setGCells( *(getGCellGrid()->getGCellVector()) );
_computeCagedConstraints();
Implementation of pre-routing support (for clock-tree compliance). * New: In Katabatic, in <AutoContact>, this class is no longer derived from ExtentionGo. With the simplificated AutoContacts, there is no reason to do so, and it will save some QuadTree insertions/deletions. New factory function AutoContact::createFrom(Contact*) which try to build an AutoContact on top of a Hurricane::Contact. Of course that base contact *must fit* into one of the predefined Contact configurations (Terminal, Turn, HTee or VTee). NOTE: This implies that the pre-routed segments & contacts *are* correctly articulated, which is not the case when a Cell is read from disk in "ap" format. The pre-routing feature must be used for now without any re-read from disk. We will implement a re-articulating pre-process in the future. * Change: In Katabatic, in <AutoContact> derived classes, the ::updateCache() method now display an accurate error message if a segment is connected but has no AutoSegment conterpart (i.e. the lookup fails). * New: In Katabatic, in <AutoSegment>, the ::computeOptimal() method is short-circuited for pre-routed segments, the optimal axis position is considered to be the one it is currently on (i.e. we trust the designer). * New: In Katabatic, in <KatabaticEngine>, the ::loadGlobalRouting() method now accept a map of excluded nets (same as Knik). This map is the one of pre-routed nets. * New: In Katabatic, in layer assignment, do not try to displace fixed segments... * New: In Katabatic, in <AutoSegment>, new flag SegUserDefined and related methods to know if a segment comes from the global router (Knik) or is pre-routed (supplied by the user). * New: In Kite, In <BuildPowerRails>, support (exclusion) for pre-routed nets. * New: In Kite, In <GraphicKiteEngine> new menu entry for running the router on pre-routed nets ("Detailed Pre-Route"), also integrated in the all-on-one route command. * New: In Kite, In KiteEngine, new method ::_initDataBase() that group all the initialisation steps. It is a mix of calls between Knik and Kite initializations which are intertwinneds (may have to devellop a shared common base at a later point). It creates the Knik grid, then the Katabatic grid, then load pre-routed wires and power rails and protect isolated RoutingPads. Add support for a map of pre-routed nets (to be excluded for Knik calls). The method "::run()" now uses function flags, firstly to know if it is managing pre-routed wires or general purposes ones. * New: In Kite, in <NegociateWindow>, the "::run()" methods has now two modes. The normal one and the 'KtPreRoutedStage' that is for routing pre-routed nets. When in pre-route stage, the wires are fixed at the end of this step. * New: In Kite, in <TrackElement> add decorator for AutoSegment isUsedDefined(). * New: In Kite, in <TrackSegment>, the various ::canDogleg() methods returns false for a pre-routed (user-defined segment). * New: In Kite, in PyKiteEngine, added new method runNegociatePreRouted().
2014-06-21 13:16:47 -05:00
_negociateWindow->run( flags );
_negociateWindow->destroy();
_negociateWindow = NULL;
Session::close();
stopMeasures();
//if ( _editor ) _editor->refresh ();
printMeasures( "algo" );
Session::open( this );
unsigned int overlaps = 0;
size_t hTracksReservedLocal = getHTracksReservedLocal();
size_t vTracksReservedLocal = getVTracksReservedLocal();
KnikEngine* knik = KnikEngine::get( getCell() );
if (knik) {
hTracksReservedLocal = knik->getHEdgeReservedLocal();
vTracksReservedLocal = knik->getVEdgeReservedLocal();
}
if (cparanoid.enabled()) {
cparanoid << " o Post-checking Knik capacity overload h:" << hTracksReservedLocal
<< " v:." << vTracksReservedLocal << endl;
getGCellGrid()->checkEdgeOverflow( hTracksReservedLocal, vTracksReservedLocal );
}
_check( overlaps );
Session::close();
_toolSuccess = _toolSuccess and (overlaps == 0);
}
void KiteEngine::printCompletion () const
{
size_t routeds = 0;
unsigned long long totalWireLength = 0;
unsigned long long routedWireLength = 0;
vector<TrackElement*> unrouteds;
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
vector<TrackElement*> reduceds;
ostringstream result;
AutoSegmentLut::const_iterator ilut = _getAutoSegmentLut().begin();
for ( ; ilut != _getAutoSegmentLut().end() ; ilut++ ) {
TrackElement* segment = _lookup( ilut->second );
if (segment == NULL) continue;
unsigned long long wl = (unsigned long long)DbU::toLambda( segment->getLength() );
if (wl > 100000) {
cerr << Error("KiteEngine::printCompletion(): Suspiciously long wire: %llu for %p:%s"
,wl,ilut->first,getString(segment).c_str()) << endl;
continue;
}
if (segment->isFixed() or segment->isBlockage()) continue;
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 (segment->isReduced()) reduceds.push_back( segment );
totalWireLength += wl;
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 ( (segment->getTrack() != NULL) or (segment->isReduced()) ) {
routeds++;
routedWireLength += wl;
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
continue;
}
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
unrouteds.push_back( segment );
}
float segmentRatio = (float)(routeds) / (float)(routeds+unrouteds.size()) * 100.0;
float wireLengthRatio = (float)(routedWireLength) / (float)(totalWireLength) * 100.0;
_toolSuccess = (unrouteds.empty());
if (not unrouteds.empty()) {
cerr << " o Routing did not complete, unrouted segments:" << endl;
for ( size_t i=0; i<unrouteds.size() ; ++i ) {
cerr << " " << dec << setw(4) << (i+1) << "| " << unrouteds[i] << 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
// if (not reduceds.empty()) {
// cerr << " o Reduced segments:" << endl;
// for ( size_t i=0; i<reduceds.size() ; ++i ) {
// cerr << " " << dec << setw(4) << (i+1) << "| " << reduceds[i] << endl;
// }
// }
result << setprecision(4) << segmentRatio
<< "% [" << routeds << "+" << unrouteds.size() << "]";
cmess1 << Dots::asString( " - Track Segment Completion Ratio", result.str() ) << endl;
result.str("");
result << setprecision(4) << wireLengthRatio
<< "% [" << totalWireLength << "+"
<< (totalWireLength - routedWireLength) << "]";
cmess1 << Dots::asString( " - Wire Length Completion Ratio", result.str() ) << endl;
float expandRatio = 1.0;
if (_minimumWL != 0.0) {
* ./kite: - New: In NegociateWindow/RoutingEvent, adds a more comprehensive stage "Repair". Perform in three stage: first try to place with a relaxed constraint (one GCell on each side). Second try to minimize the faulty segment. Third perform another "repack perpandicular" but this time the faulty segment is re-inserted *before* any of it's perpandiculars. - New: In RoutingEvent::cacheAxisHint(), when a segment has a parent, that is comes for a "moveUp()", uses the parent axis hint as it's own. - New: In State::slackenTopology(), in the global FSM, adds a special operation when reaching MaximumSlack: forceOverLocals(), try to insert the global on track containing only local segments. Should tend to concentrate locals on a small set of shared tracks. Most useful on the highest layers. - New: In State::slackenTopology(), in the "MoveUp" state, try to find the more appropriate segment to move up (Manipulator::desaturate()). Effectively move up the longest segment fully enclosing the one we are processing. - New: In State::slackenTopology(), add a check for fully blocked segments in the local segment FSM. Calls State::solveFullBlocked(). - New: In KiteEngine::createGlobalGraph(), decrease the vertical capacity of one track inside the core. Helps smooth the vertical density. - Change: In Manipulator::insertInTrack(), when a track is freed for a to be inserted changes the priorities so that the segment is immediatly inserted. Parallels ripeds and theirs perpandiculars are replaced only *after*. This is the opposite of the previous behavior. - Change: In NegociateWindow::NegociateOverlapCost(), account the costs of terminals only for deep depth layers (M1, M2 & M3). - Change: In RoutingEvent::insertInTrack(), expand the excluded interval by a half-pitch (2.5l) instead of one lambda. - Change: In State::State(), do not uses DiscardGlobal if the ripup count exceed 5. Case of the "Strap" segments that can be ripped a lot before changing state. - Change: In State::_processNegociate(), no longer lock into position (fixed) the local terminal segments as a last resort. - Change: In RoutingEvent::_processNegociate(), no longer ripup perpandiculars when a segment is inserted in a free space. Reduce the number of events whithout degrading the routing quality. - Change: In State::conflictSolve1_v1b(), if getLongestConflict() is nul, ignore the track, the conflict must occurs on another track. - Change: In TrackCost, add a flag support. First uses, a flags to prevent a local of the topmost layer to ripup a global which is in moveUp state. - Bug: In State::solveFullBlockage(), after have been freed, reset the segment state to "moveUp". - Bug: In manipulator::minimize(), the axisHint was miscalculated if the punctual span was empty.
2011-01-25 11:16:50 -06:00
expandRatio = ((totalWireLength-_minimumWL) / _minimumWL) * 100.0;
result.str("");
result << setprecision(3) << expandRatio << "% [min:" << setprecision(9) << _minimumWL << "]";
cmess1 << Dots::asString( " - Wire Length Expand Ratio", result.str() ) << endl;
}
addMeasure<size_t> ( getCell(), "Segs" , routeds+unrouteds.size() );
addMeasure<unsigned long long>( getCell(), "DWL(l)" , totalWireLength , 12 );
addMeasure<unsigned long long>( getCell(), "fWL(l)" , totalWireLength-routedWireLength , 12 );
addMeasure<double> ( getCell(), "WLER(%)", (expandRatio-1.0)*100.0 );
}
void KiteEngine::dumpMeasures ( ostream& out ) const
{
vector<Name> measuresLabels;
measuresLabels.push_back( "Gates" );
measuresLabels.push_back( "GCells" );
measuresLabels.push_back( "knikT" );
measuresLabels.push_back( "knikS" );
measuresLabels.push_back( "GWL(l)" );
measuresLabels.push_back( "Area(l2)");
measuresLabels.push_back( "Sat." );
measuresLabels.push_back( "loadT" );
measuresLabels.push_back( "loadS" );
measuresLabels.push_back( "Globals" );
measuresLabels.push_back( "Edges" );
measuresLabels.push_back( "assignT" );
measuresLabels.push_back( "algoT" );
measuresLabels.push_back( "algoS" );
measuresLabels.push_back( "finT" );
measuresLabels.push_back( "Segs" );
measuresLabels.push_back( "DWL(l)" );
measuresLabels.push_back( "fWL(l)" );
measuresLabels.push_back( "WLER(%)" );
measuresLabels.push_back( "Events" );
measuresLabels.push_back( "UEvents" );
const MeasuresSet* measures = Measures::get( getCell() );
out << "#" << endl;
out << "# " << getCell()->getName() << endl;
out << measures->toStringHeaders(measuresLabels) << endl;
out << measures->toStringDatas (measuresLabels) << endl;
measures->toGnuplot( "GCells Density Histogram", getString(getCell()->getName()) );
}
void KiteEngine::dumpMeasures () const
{
ostringstream path;
path << getCell()->getName() << ".knik-kite.dat";
ofstream sfile ( path.str().c_str() );
dumpMeasures( sfile );
sfile.close();
}
bool KiteEngine::_check ( unsigned int& overlap, const char* message ) const
{
cmess1 << " o Checking Kite Database coherency." << endl;
bool coherency = true;
coherency = coherency and KatabaticEngine::_check( message );
for ( size_t i=0 ; i<_routingPlanes.size() ; i++ )
* ./Kite: - New: In BuildPowerRails, special processing for the power ring segments. The "diagonal" of vias at each corner is causing a misbehavior of the routing algorithm (due to fully saturated GCells in one direction). As a temporary fix, extend the segments so they form a "square corner". (problem arise on "d_in_i(22)"). - New: In RoutingEvent::_processNegociate, disable the "isForcedToHint()" feature. No noticeable loss of quality or speed. - New: In TrackElement/TrackSegment, wraps the AutoSegment parent's mechanism. Allows to gets the DataNegociate of either the segment or it's parent. - New: State::solveFullBlockages(), dedicated method to solves the case when all the allowed tracks of a segment are blocked, tries to moves up local segments and to break-up global ones. - New: RoutingEventLoop, a more sophisticated way to detect looping. Maintain a dynamic histogram of the last N (default 10) segments routeds, with the count of how many times they have occurred. If that count exeed 40, we *may* be facing a loop. - Change: In State::conflictSolve1, implement new policy. The global segments no more can be broken by local ones. The idea behind is that breaking a global on the request of a local will only produce more cluttering in the GCell. Globals must be keep straigth pass through, especially inside near-saturated GCells. Globals breaking however can occurs at another global's request. - Change: In TrackCost, implement the new policy about locals segments that cannot break globals segments. The sorting class now accept flags to modulate the sorting function. Two options avalaibles: IgnoreAxisWeigth (to uses for strap segments) and DiscardGlobals (to uses with locals). - Change: In TrackCost, the "distance to fixed" have now an upper bound of 50 lambdas (no need to be greater because it means it's outside the begin & en GCells). Take account not only of fixed segment, but also of placed segments which makes bound. - Bug: In Track::_check(), while calling each individual TrackSegment check, uses it as the *first* argument of the "or", otherwise it may not be called. - Bug: In ProtectRoutingPad, loop over segment Collections while modificating it was producing non-deterministic results. The fact that a collection must be not modificated while beeing iterated is becoming a more and more painful problem.
2010-12-30 12:42:17 -06:00
coherency = _routingPlanes[i]->_check(overlap) and coherency;
Katabatic::Session* ktbtSession = Session::base ();
for( Net* net : getCell()->getNets() ) {
for( Segment* segment : net->getComponents().getSubSet<Segment*>() ) {
AutoSegment* autoSegment = ktbtSession->lookup( segment );
if (not autoSegment) continue;
if (not autoSegment->isCanonical()) continue;
TrackElement* trackSegment = Session::lookup( segment );
if (not trackSegment) {
coherency = false;
cerr << Bug( "%p %s without Track Segment"
, autoSegment
, getString(autoSegment).c_str() ) << endl;
} else
trackSegment->_check();
}
}
return coherency;
}
void KiteEngine::finalizeLayout ()
{
cdebug_log(155,0) << "KiteEngine::finalizeLayout()" << endl;
if (getState() > Katabatic::EngineDriving) return;
cdebug_tabw(155,1);
setState( Katabatic::EngineDriving );
_gutKite();
KatabaticEngine::finalizeLayout();
cdebug_log(155,0) << "State: " << getState() << endl;
getCell()->setFlags( Cell::Flags::Routed );
cdebug_tabw(155,-1);
}
void KiteEngine::_gutKite ()
{
cdebug_log(155,1) << "KiteEngine::_gutKite()" << endl;
cdebug_log(155,0) << "State: " << getState() << endl;
if (getState() < Katabatic::EngineGutted) {
Session::open( this );
size_t maxDepth = getRoutingGauge()->getDepth();
for ( size_t depth=0 ; depth < maxDepth ; depth++ ) {
_routingPlanes[depth]->destroy();
}
Session::close();
}
cdebug_tabw(155,-1);
}
TrackElement* KiteEngine::_lookup ( Segment* segment ) const
{
AutoSegment* autoSegment = KatabaticEngine::_lookup( segment );
if (not autoSegment or not autoSegment->isCanonical()) return NULL;
return _lookup( autoSegment );
}
void KiteEngine::_check ( Net* net ) const
{
cerr << " o Checking " << net << endl;
for( Segment* segment : net->getComponents().getSubSet<Segment*>() ) {
TrackElement* trackSegment = _lookup( segment );
if (trackSegment) {
trackSegment->_check();
AutoContact* autoContact = trackSegment->base()->getAutoSource();
if (autoContact) autoContact->checkTopology ();
autoContact = trackSegment->base()->getAutoTarget();
if (autoContact) autoContact->checkTopology ();
}
}
}
string KiteEngine::_getTypeName () const
{ return "Kite::KiteEngine"; }
string KiteEngine::_getString () const
{
ostringstream os;
os << "<" << "KiteEngine " << _cell->getName () << ">";
return os.str();
}
Record* KiteEngine::_getRecord () const
{
Record* record = KatabaticEngine::_getRecord ();
if (record) {
record->add( getSlot( "_routingPlanes", &_routingPlanes ) );
record->add( getSlot( "_configuration", _configuration ) );
* ./Kite: - New: In BuildPowerRails, special processing for the power ring segments. The "diagonal" of vias at each corner is causing a misbehavior of the routing algorithm (due to fully saturated GCells in one direction). As a temporary fix, extend the segments so they form a "square corner". (problem arise on "d_in_i(22)"). - New: In RoutingEvent::_processNegociate, disable the "isForcedToHint()" feature. No noticeable loss of quality or speed. - New: In TrackElement/TrackSegment, wraps the AutoSegment parent's mechanism. Allows to gets the DataNegociate of either the segment or it's parent. - New: State::solveFullBlockages(), dedicated method to solves the case when all the allowed tracks of a segment are blocked, tries to moves up local segments and to break-up global ones. - New: RoutingEventLoop, a more sophisticated way to detect looping. Maintain a dynamic histogram of the last N (default 10) segments routeds, with the count of how many times they have occurred. If that count exeed 40, we *may* be facing a loop. - Change: In State::conflictSolve1, implement new policy. The global segments no more can be broken by local ones. The idea behind is that breaking a global on the request of a local will only produce more cluttering in the GCell. Globals must be keep straigth pass through, especially inside near-saturated GCells. Globals breaking however can occurs at another global's request. - Change: In TrackCost, implement the new policy about locals segments that cannot break globals segments. The sorting class now accept flags to modulate the sorting function. Two options avalaibles: IgnoreAxisWeigth (to uses for strap segments) and DiscardGlobals (to uses with locals). - Change: In TrackCost, the "distance to fixed" have now an upper bound of 50 lambdas (no need to be greater because it means it's outside the begin & en GCells). Take account not only of fixed segment, but also of placed segments which makes bound. - Bug: In Track::_check(), while calling each individual TrackSegment check, uses it as the *first* argument of the "or", otherwise it may not be called. - Bug: In ProtectRoutingPad, loop over segment Collections while modificating it was producing non-deterministic results. The fact that a collection must be not modificated while beeing iterated is becoming a more and more painful problem.
2010-12-30 12:42:17 -06:00
}
return record;
}
} // Kite namespace.