coriolis/deprecated/knik/src/LoadSolution.cpp

458 lines
14 KiB
C++
Raw Normal View History

// -*- C++ -*-
//
// This file is part of the Coriolis Software.
// Copyright (c) UPMC 2008-2018, All Rights Reserved
//
// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | K n i k - Global Router |
// | |
// | Author : Damien Dupuis |
// | E-mail : Damien.Dupuis@lip6.fr |
// | =============================================================== |
// | C++ Module : "./LoadSolution.cpp" |
// +-----------------------------------------------------------------+
#include <iostream>
#include "hurricane/Error.h"
#include "hurricane/Warning.h"
#include "hurricane/DataBase.h"
#include "hurricane/Technology.h"
#include "hurricane/Layer.h"
Bug fixes for MOSIS SCMOS_DEEP support. * Change: In Hurricane, the NetRoutingProperty is moved into Hurricane from Katabatic. Needed for Knik to be able to access thoses informations. * Change: In Hurricane, in RoutingPad::setOnBestComponent(), now in case of identical area, select the component of lowest id. This should not be needed if the component ordering was fully deterministic as it should be (will investigate later). This is to ensure that the choosen component is always the same, especially between save/load of a global routing. * Bug: In Katabatic, in AutoContactHTee::updateTopology(), invalidate the segments only if the topology is valid (no NULL in the cached segments). * Bug: In Katabatic, in GCellTopology::construct(), throw an error if the topology is bad instead of trying to continue (and core dump later... ). * Bug: In Kite, in BuildPowerRails, distinguish the name of the master net in the pad (for vddi, vssi, vdde, vsse, ck, cki & cko) and the name of the net in the *chip* netlist. Must use the later to make comparison as they may differs. * Change: In Knik, in save/load solution, exclude nets that are not globally routed by Knik. That is which NetRoutingProperty is not *Automatic*. * Bug: In Cumulus, in chip.BlockPower take account of the layer width extention to sligthy shrink the connector thus avoiding a notch with standart cell in some cases. * Change: In Cumulus, in chip.ClockTree disable the use of fixed Steiner trees for the leaf clocks, as it seems overconstrained for the router. First move was to lower them in M2/M3 (instead of M3/M4) but that was not sufficent. * New: In Cumulus, RSavePlugin for recursively saving a physical hierarchy. * New: In documentation, first embryo for RDS file. Should have been in Alliance git, but I prefer to keep newest doc in Coriolis.
2014-09-21 09:44:37 -05:00
#include "hurricane/NetRoutingProperty.h"
#include "hurricane/Contact.h"
#include "hurricane/Vertical.h"
#include "hurricane/Horizontal.h"
#include "hurricane/RoutingPad.h"
#include "hurricane/Cell.h"
#include "hurricane/UpdateSession.h"
#include "crlcore/Utilities.h"
#include "crlcore/Measures.h"
Bug fixes for MOSIS SCMOS_DEEP support. * Change: In Hurricane, the NetRoutingProperty is moved into Hurricane from Katabatic. Needed for Knik to be able to access thoses informations. * Change: In Hurricane, in RoutingPad::setOnBestComponent(), now in case of identical area, select the component of lowest id. This should not be needed if the component ordering was fully deterministic as it should be (will investigate later). This is to ensure that the choosen component is always the same, especially between save/load of a global routing. * Bug: In Katabatic, in AutoContactHTee::updateTopology(), invalidate the segments only if the topology is valid (no NULL in the cached segments). * Bug: In Katabatic, in GCellTopology::construct(), throw an error if the topology is bad instead of trying to continue (and core dump later... ). * Bug: In Kite, in BuildPowerRails, distinguish the name of the master net in the pad (for vddi, vssi, vdde, vsse, ck, cki & cko) and the name of the net in the *chip* netlist. Must use the later to make comparison as they may differs. * Change: In Knik, in save/load solution, exclude nets that are not globally routed by Knik. That is which NetRoutingProperty is not *Automatic*. * Bug: In Cumulus, in chip.BlockPower take account of the layer width extention to sligthy shrink the connector thus avoiding a notch with standart cell in some cases. * Change: In Cumulus, in chip.ClockTree disable the use of fixed Steiner trees for the leaf clocks, as it seems overconstrained for the router. First move was to lower them in M2/M3 (instead of M3/M4) but that was not sufficent. * New: In Cumulus, RSavePlugin for recursively saving a physical hierarchy. * New: In documentation, first embryo for RDS file. Should have been in Alliance git, but I prefer to keep newest doc in Coriolis.
2014-09-21 09:44:37 -05:00
#include "crlcore/AllianceFramework.h"
#include "crlcore/CellGauge.h"
#include "knik/Configuration.h"
#include "knik/Graph.h"
#include "knik/KnikEngine.h"
namespace {
using std::string;
using std::cerr;
using std::endl;
using std::vector;
using std::map;
using std::make_pair;
using CRL::IoFile;
Bug fixes for MOSIS SCMOS_DEEP support. * Change: In Hurricane, the NetRoutingProperty is moved into Hurricane from Katabatic. Needed for Knik to be able to access thoses informations. * Change: In Hurricane, in RoutingPad::setOnBestComponent(), now in case of identical area, select the component of lowest id. This should not be needed if the component ordering was fully deterministic as it should be (will investigate later). This is to ensure that the choosen component is always the same, especially between save/load of a global routing. * Bug: In Katabatic, in AutoContactHTee::updateTopology(), invalidate the segments only if the topology is valid (no NULL in the cached segments). * Bug: In Katabatic, in GCellTopology::construct(), throw an error if the topology is bad instead of trying to continue (and core dump later... ). * Bug: In Kite, in BuildPowerRails, distinguish the name of the master net in the pad (for vddi, vssi, vdde, vsse, ck, cki & cko) and the name of the net in the *chip* netlist. Must use the later to make comparison as they may differs. * Change: In Knik, in save/load solution, exclude nets that are not globally routed by Knik. That is which NetRoutingProperty is not *Automatic*. * Bug: In Cumulus, in chip.BlockPower take account of the layer width extention to sligthy shrink the connector thus avoiding a notch with standart cell in some cases. * Change: In Cumulus, in chip.ClockTree disable the use of fixed Steiner trees for the leaf clocks, as it seems overconstrained for the router. First move was to lower them in M2/M3 (instead of M3/M4) but that was not sufficent. * New: In Cumulus, RSavePlugin for recursively saving a physical hierarchy. * New: In documentation, first embryo for RDS file. Should have been in Alliance git, but I prefer to keep newest doc in Coriolis.
2014-09-21 09:44:37 -05:00
using CRL::AllianceFramework;
using Hurricane::ForEachIterator;
using Hurricane::Error;
using Hurricane::Warning;
using Hurricane::DbU;
using Hurricane::Point;
using Hurricane::Box;
using Hurricane::Name;
using Hurricane::DataBase;
using Hurricane::Technology;
using Hurricane::Layer;
using Hurricane::Net;
Bug fixes for MOSIS SCMOS_DEEP support. * Change: In Hurricane, the NetRoutingProperty is moved into Hurricane from Katabatic. Needed for Knik to be able to access thoses informations. * Change: In Hurricane, in RoutingPad::setOnBestComponent(), now in case of identical area, select the component of lowest id. This should not be needed if the component ordering was fully deterministic as it should be (will investigate later). This is to ensure that the choosen component is always the same, especially between save/load of a global routing. * Bug: In Katabatic, in AutoContactHTee::updateTopology(), invalidate the segments only if the topology is valid (no NULL in the cached segments). * Bug: In Katabatic, in GCellTopology::construct(), throw an error if the topology is bad instead of trying to continue (and core dump later... ). * Bug: In Kite, in BuildPowerRails, distinguish the name of the master net in the pad (for vddi, vssi, vdde, vsse, ck, cki & cko) and the name of the net in the *chip* netlist. Must use the later to make comparison as they may differs. * Change: In Knik, in save/load solution, exclude nets that are not globally routed by Knik. That is which NetRoutingProperty is not *Automatic*. * Bug: In Cumulus, in chip.BlockPower take account of the layer width extention to sligthy shrink the connector thus avoiding a notch with standart cell in some cases. * Change: In Cumulus, in chip.ClockTree disable the use of fixed Steiner trees for the leaf clocks, as it seems overconstrained for the router. First move was to lower them in M2/M3 (instead of M3/M4) but that was not sufficent. * New: In Cumulus, RSavePlugin for recursively saving a physical hierarchy. * New: In documentation, first embryo for RDS file. Should have been in Alliance git, but I prefer to keep newest doc in Coriolis.
2014-09-21 09:44:37 -05:00
using Hurricane::NetRoutingExtension;
using Hurricane::NetRoutingState;
using Hurricane::Contact;
using Hurricane::Segment;
using Hurricane::Vertical;
using Hurricane::Horizontal;
using Hurricane::RoutingPad;
using Hurricane::Cell;
using Hurricane::UpdateSession;
using Knik::Configuration;
using Knik::KnikEngine;
using Knik::Vertex;
const char* LoadError = "KnikEngine::LoadSolution(): %s.\n (file: %s, at line: %d)";
const char* NotManhattan =
"KnikEngine::LoadSolution(): Encountered a Segment neither Horizontal nor Vertical.\n"
" ([%s %s] [%s %s], file: %s, at line: %d)";
const char* BadLong =
"KnikEngine::LoadSolution(): Incomplete string to integer conversion for \"%s\" (%ld).\n"
" (file: %s, at line: %d)";
struct PointCompare {
bool operator() ( const Point& lhs, const Point& rhs ) const;
};
bool PointCompare::operator() ( const Point& lhs, const Point& rhs ) const
{
if ( lhs.getX() < rhs.getX() ) return true;
if ( lhs.getX() > rhs.getX() ) return false;
if ( lhs.getY() < rhs.getY() ) return true;
return false;
}
class GContactMap {
public:
GContactMap ( KnikEngine* knik
, const Layer* gmetalh
, const Layer* gmetalv
);
void setNet ( Net* );
const Layer* getLayer ( unsigned int z );
Contact* find ( DbU::Unit x, DbU::Unit y, unsigned int z );
Contact* findVertexContact ( const Box& );
size_t size () const;
void clear ();
private:
void _mergeLayer ( Contact*, unsigned int );
private:
KnikEngine* _knik;
Technology* _technology;
Net* _net;
map<Point,Contact*,PointCompare> _contactMap;
map<Vertex*,Contact*> _vertexMap;
const Layer* _gmetalh;
const Layer* _gmetalv;
};
GContactMap::GContactMap ( KnikEngine* knik
, const Layer* gmetalh
, const Layer* gmetalv
)
: _knik (knik)
, _technology(DataBase::getDB()->getTechnology())
, _net (NULL)
, _contactMap()
, _vertexMap ()
, _gmetalh (gmetalh)
, _gmetalv (gmetalv)
{ }
void GContactMap::setNet ( Net* net )
{ _net = net; }
const Layer* GContactMap::getLayer ( unsigned int z )
{ return (z%2) ? _gmetalh : _gmetalv; }
Contact* GContactMap::find ( DbU::Unit x, DbU::Unit y, unsigned int z )
{
map<Point,Contact*,PointCompare>::iterator icontact = _contactMap.find ( Point(x,y) );
Contact* contact;
if ( icontact == _contactMap.end() ) {
contact = Contact::create ( _net, getLayer(z), x, y, DbU::lambda(3.0), DbU::lambda(3.0) );
Vertex* vertex = _knik->getVertex ( x, y );
_contactMap.insert ( make_pair(Point(x,y),contact) );
_vertexMap .insert ( make_pair(vertex ,contact) );
} else {
contact = icontact->second;
}
_mergeLayer ( contact, z );
return contact;
}
Contact* GContactMap::findVertexContact ( const Box& boundingBox )
{
Point reference = boundingBox.getCenter();
Vertex* vertex = _knik->getVertex ( reference );
if ( !vertex ) return NULL;
map<Vertex*,Contact*>::iterator icontact = _vertexMap.find ( vertex );
if ( icontact == _vertexMap.end() ) return NULL;
return icontact->second;
}
size_t GContactMap::size () const
{ return _contactMap.size(); }
void GContactMap::clear ()
{
_contactMap.clear();
_vertexMap.clear();
}
void GContactMap::_mergeLayer ( Contact* contact, unsigned int z )
{
const Layer* mergeLayer = getLayer ( z );
const Layer* contactLayer = contact->getLayer();
if ( contactLayer->contains(mergeLayer) ) return;
contactLayer = _technology->getViaBetween ( contactLayer, mergeLayer );
if ( contactLayer )
contact->setLayer ( contactLayer );
}
class SolutionParser {
public:
SolutionParser ( KnikEngine*, const string& loadFileName );
void load ();
private:
long _getLong ( const char* );
vector<char*> _splitSegmentString ( char* );
vector<char*> _splitString ( char* );
private:
enum Constants { RawLineSize = 4096 };
private:
char _rawLine [ RawLineSize ];
size_t _lineNumber;
string _fileName;
KnikEngine* _knik;
const Layer* _gmetalh;
const Layer* _gmetalv;
const Layer* _gcontact;
};
SolutionParser::SolutionParser ( KnikEngine* knik, const string& fileName )
: _lineNumber(0)
, _fileName (fileName)
, _knik (knik)
, _gmetalh (Configuration::getGMetalH())
, _gmetalv (Configuration::getGMetalV())
, _gcontact (Configuration::getGContact())
{ }
long SolutionParser::_getLong ( const char* s )
{
char* end;
long value = strtol ( s, &end, 10 );
if ( *end != '\0' )
cerr << Error(BadLong,s,value,_fileName.c_str(),_lineNumber) << endl;
return value;
}
vector<char*> SolutionParser::_splitString ( char* s )
{
vector<char*> fields;
fields.push_back ( s );
while ( *s != '\0' ) {
unsigned i = 0;
if ( (*s == ' ') || (*s == '\t') ) {
i++;
*s = '\0';
while ( (*(s+i) == ' ') || (*(s+i) == '\t') ) i++;
fields.push_back ( s+i );
s += i;
} else
s++;
}
return fields;
}
vector<char*> SolutionParser::_splitSegmentString ( char* s )
{
vector<char*> fields;
while ( *s != '\0' ) {
switch ( *s ) {
case '(':
case ',': *s = '\0'; ++s; break;
case ')':
*s = '\0'; ++s;
if ( *s == '-' ) { *s = '\0'; ++s; }
break;
default:
fields.push_back ( s );
while ( *s && ( (*s != ')') && (*s != ',') ) ) ++s;
}
}
return fields;
}
void SolutionParser::load ()
{
UpdateSession::open();
try {
cmess1 << " o Loading solution: \"" << _fileName << "\"." << endl;
Bug fixes for MOSIS SCMOS_DEEP support. * Change: In Hurricane, the NetRoutingProperty is moved into Hurricane from Katabatic. Needed for Knik to be able to access thoses informations. * Change: In Hurricane, in RoutingPad::setOnBestComponent(), now in case of identical area, select the component of lowest id. This should not be needed if the component ordering was fully deterministic as it should be (will investigate later). This is to ensure that the choosen component is always the same, especially between save/load of a global routing. * Bug: In Katabatic, in AutoContactHTee::updateTopology(), invalidate the segments only if the topology is valid (no NULL in the cached segments). * Bug: In Katabatic, in GCellTopology::construct(), throw an error if the topology is bad instead of trying to continue (and core dump later... ). * Bug: In Kite, in BuildPowerRails, distinguish the name of the master net in the pad (for vddi, vssi, vdde, vsse, ck, cki & cko) and the name of the net in the *chip* netlist. Must use the later to make comparison as they may differs. * Change: In Knik, in save/load solution, exclude nets that are not globally routed by Knik. That is which NetRoutingProperty is not *Automatic*. * Bug: In Cumulus, in chip.BlockPower take account of the layer width extention to sligthy shrink the connector thus avoiding a notch with standart cell in some cases. * Change: In Cumulus, in chip.ClockTree disable the use of fixed Steiner trees for the leaf clocks, as it seems overconstrained for the router. First move was to lower them in M2/M3 (instead of M3/M4) but that was not sufficent. * New: In Cumulus, RSavePlugin for recursively saving a physical hierarchy. * New: In documentation, first embryo for RDS file. Should have been in Alliance git, but I prefer to keep newest doc in Coriolis.
2014-09-21 09:44:37 -05:00
DbU::Unit sliceHeight = AllianceFramework::get()->getCellGauge()->getSliceHeight();
CRL::IoFile fileStream ( _fileName );
fileStream.open( "r" );
if (not fileStream.isOpen())
throw Error( "Can't open/read file: %s.", _fileName.c_str() );
unsigned int missingGlobalRouting = 0;
unsigned int contactCount = 0;
unsigned int segmentCount = 0;
GContactMap contactMap ( _knik, _gmetalh, _gmetalv );
while ( not fileStream.eof() ) {
fileStream.readLine( _rawLine, RawLineSize );
_lineNumber++;
if (_rawLine[0] == '\0') break;
if (_rawLine[0] == '\n') continue;
vector<char*> fields = _splitString( _rawLine );
if ( fields.size() != 3 )
throw Error( LoadError, "Malformed Net Line", _fileName.c_str(), _lineNumber );
else {
Name netName = Name ( fields[0] );
unsigned int nbPins = _getLong( fields[2] );
unsigned int nbSegments = 0;
unsigned int nbRoutingPad = 0;
Net* net = _knik->getCell()->getNet( netName );
if (not net) {
string message = "Cell has no Net: ";
message += getString(netName);
throw Error( LoadError, message.c_str(), _fileName.c_str(), _lineNumber );
}
contactMap.setNet( net );
for ( unsigned i = 0 ; i < nbPins ; i++ ) {
fileStream.readLine( _rawLine, RawLineSize );
_lineNumber++;
fields = _splitSegmentString( _rawLine );
if (fields.size() != 6)
throw Error( LoadError, "Malformed Net Line", _fileName.c_str(), _lineNumber );
else {
DbU::Unit xSource = DbU::lambda( _getLong(fields[0]) );
DbU::Unit ySource = DbU::lambda( _getLong(fields[1]) );
unsigned int zSource = (unsigned) ( _getLong(fields[2]) );
DbU::Unit xTarget = DbU::lambda( _getLong(fields[3]) );
DbU::Unit yTarget = DbU::lambda( _getLong(fields[4]) );
unsigned int zTarget = (unsigned) ( _getLong(fields[5]) );
Contact* source = contactMap.find( xSource, ySource, zSource );
Contact* target = contactMap.find( xTarget, yTarget, zTarget );
Segment* segment = NULL;
unsigned int type = ((ySource == yTarget)?1:0) + ((xSource == xTarget)?2:0);
switch ( type ) {
case 0:
throw Error( NotManhattan
, DbU::getValueString(xSource).c_str()
, DbU::getValueString(ySource).c_str()
, DbU::getValueString(xTarget).c_str()
, DbU::getValueString(yTarget).c_str()
, _fileName.c_str()
, _lineNumber
);
case 1:
segment = Horizontal::create( source, target, _gmetalh, ySource, DbU::lambda(2.0) );
++nbSegments;
break;
case 2:
segment = Vertical::create( source, target, _gmetalv, xSource, DbU::lambda(2.0) );
++nbSegments;
break;
case 3:
break;
}
if (segment) _knik->insertSegment( segment );
}
}
fileStream.readLine( _rawLine, RawLineSize );
_lineNumber++;
if (_rawLine[0] != '!')
throw Error( "KnikEngine::loadSolution(): Tu t'es vu quand t'as bu! (%ld)."
, getString(_lineNumber).c_str());
Box rpBox;
RoutingPad* previousRp = NULL;
Bug fixes for MOSIS SCMOS_DEEP support. * Change: In Hurricane, the NetRoutingProperty is moved into Hurricane from Katabatic. Needed for Knik to be able to access thoses informations. * Change: In Hurricane, in RoutingPad::setOnBestComponent(), now in case of identical area, select the component of lowest id. This should not be needed if the component ordering was fully deterministic as it should be (will investigate later). This is to ensure that the choosen component is always the same, especially between save/load of a global routing. * Bug: In Katabatic, in AutoContactHTee::updateTopology(), invalidate the segments only if the topology is valid (no NULL in the cached segments). * Bug: In Katabatic, in GCellTopology::construct(), throw an error if the topology is bad instead of trying to continue (and core dump later... ). * Bug: In Kite, in BuildPowerRails, distinguish the name of the master net in the pad (for vddi, vssi, vdde, vsse, ck, cki & cko) and the name of the net in the *chip* netlist. Must use the later to make comparison as they may differs. * Change: In Knik, in save/load solution, exclude nets that are not globally routed by Knik. That is which NetRoutingProperty is not *Automatic*. * Bug: In Cumulus, in chip.BlockPower take account of the layer width extention to sligthy shrink the connector thus avoiding a notch with standart cell in some cases. * Change: In Cumulus, in chip.ClockTree disable the use of fixed Steiner trees for the leaf clocks, as it seems overconstrained for the router. First move was to lower them in M2/M3 (instead of M3/M4) but that was not sufficent. * New: In Cumulus, RSavePlugin for recursively saving a physical hierarchy. * New: In documentation, first embryo for RDS file. Should have been in Alliance git, but I prefer to keep newest doc in Coriolis.
2014-09-21 09:44:37 -05:00
if (NetRoutingExtension::isAutomaticGlobalRoute(net)) {
forEach ( RoutingPad*, rp, net->getRoutingPads() ) {
rpBox.merge( rp->getBoundingBox() );
Contact* gcontact = contactMap.findVertexContact( rp->getBoundingBox() );
if (gcontact) {
rp->getBodyHook()->attach( gcontact->getBodyHook() );
} else {
if (previousRp)
rp->getBodyHook()->attach( previousRp->getBodyHook() );
}
previousRp = *rp;
++nbRoutingPad;
//cerr << rp->_getString() << " should be attached to " << gcontact << endl;
}
}
Bug fixes for MOSIS SCMOS_DEEP support. * Change: In Hurricane, the NetRoutingProperty is moved into Hurricane from Katabatic. Needed for Knik to be able to access thoses informations. * Change: In Hurricane, in RoutingPad::setOnBestComponent(), now in case of identical area, select the component of lowest id. This should not be needed if the component ordering was fully deterministic as it should be (will investigate later). This is to ensure that the choosen component is always the same, especially between save/load of a global routing. * Bug: In Katabatic, in AutoContactHTee::updateTopology(), invalidate the segments only if the topology is valid (no NULL in the cached segments). * Bug: In Katabatic, in GCellTopology::construct(), throw an error if the topology is bad instead of trying to continue (and core dump later... ). * Bug: In Kite, in BuildPowerRails, distinguish the name of the master net in the pad (for vddi, vssi, vdde, vsse, ck, cki & cko) and the name of the net in the *chip* netlist. Must use the later to make comparison as they may differs. * Change: In Knik, in save/load solution, exclude nets that are not globally routed by Knik. That is which NetRoutingProperty is not *Automatic*. * Bug: In Cumulus, in chip.BlockPower take account of the layer width extention to sligthy shrink the connector thus avoiding a notch with standart cell in some cases. * Change: In Cumulus, in chip.ClockTree disable the use of fixed Steiner trees for the leaf clocks, as it seems overconstrained for the router. First move was to lower them in M2/M3 (instead of M3/M4) but that was not sufficent. * New: In Cumulus, RSavePlugin for recursively saving a physical hierarchy. * New: In documentation, first embryo for RDS file. Should have been in Alliance git, but I prefer to keep newest doc in Coriolis.
2014-09-21 09:44:37 -05:00
if ( (nbRoutingPad > 1)
and (not contactMap.size())
Bug fixes for MOSIS SCMOS_DEEP support. * Change: In Hurricane, the NetRoutingProperty is moved into Hurricane from Katabatic. Needed for Knik to be able to access thoses informations. * Change: In Hurricane, in RoutingPad::setOnBestComponent(), now in case of identical area, select the component of lowest id. This should not be needed if the component ordering was fully deterministic as it should be (will investigate later). This is to ensure that the choosen component is always the same, especially between save/load of a global routing. * Bug: In Katabatic, in AutoContactHTee::updateTopology(), invalidate the segments only if the topology is valid (no NULL in the cached segments). * Bug: In Katabatic, in GCellTopology::construct(), throw an error if the topology is bad instead of trying to continue (and core dump later... ). * Bug: In Kite, in BuildPowerRails, distinguish the name of the master net in the pad (for vddi, vssi, vdde, vsse, ck, cki & cko) and the name of the net in the *chip* netlist. Must use the later to make comparison as they may differs. * Change: In Knik, in save/load solution, exclude nets that are not globally routed by Knik. That is which NetRoutingProperty is not *Automatic*. * Bug: In Cumulus, in chip.BlockPower take account of the layer width extention to sligthy shrink the connector thus avoiding a notch with standart cell in some cases. * Change: In Cumulus, in chip.ClockTree disable the use of fixed Steiner trees for the leaf clocks, as it seems overconstrained for the router. First move was to lower them in M2/M3 (instead of M3/M4) but that was not sufficent. * New: In Cumulus, RSavePlugin for recursively saving a physical hierarchy. * New: In documentation, first embryo for RDS file. Should have been in Alliance git, but I prefer to keep newest doc in Coriolis.
2014-09-21 09:44:37 -05:00
and ( (rpBox.getHeight() > sliceHeight)
or (rpBox.getWidth () > sliceHeight) ) ) {
++missingGlobalRouting;
cerr << Warning( "Net <%s> is missing global routing."
, getString(net->getName()).c_str() ) << endl;
}
segmentCount += nbSegments;
contactCount += contactMap.size();
contactMap.clear();
}
}
fileStream.close();
if (missingGlobalRouting)
throw Error( "At least %d nets are missing global routing. Maybe a corrupted <.kgr> file?"
, missingGlobalRouting
);
}
catch ( Error& e ) {
UpdateSession::close ();
//cerr << e << endl;
throw;
}
UpdateSession::close ();
}
} // End of anonymous namespace.
namespace Knik {
using CRL::addMeasure;
void KnikEngine::loadSolution ( const string& fileName )
{
string loadFileName = fileName;
if ( loadFileName.empty() )
loadFileName = _getSolutionName();
SolutionParser parser ( this, loadFileName );
parser.load ();
Groudwork for routing density driven placement. Compliance with clang 5.0.1. This commit contains two set of features that should have been commited separately. 1. Compliance with clang 5.0.1, tested with the RedHat collection llvm-toolset-7. This allow Coriolis to be compiled under Darwin (MacOS) with Xcode & macports. The bootstrap install system has been modificated accordingly. 2. The basic support for routing density driven placement. Related features are: * Bloat property. Each Occurrence of an Instance can be individually bloated. This property not attached to any tool to allow the placer and router to share it as wanted. Nevertheless, it is defined in Etesian. * BloatProfile in Katana, add individual Bloat properties to Instances occurrences based on the East & North overflowed edges of each GCell. * Support in ToolEngine for a "pass number" of a tool. This pass number is mainly used to make "per pass" measurements. The MeasureSet system is improved accordingly to support multiple values of a same measure. * Embryo of "P&R Conductor" to perform the place & route loop until the design is successfully placed. May be the first brick of a Silicon Compiler. * Change: In boostrap/FindBoostrap.cmake, in setup_boost(), added tag to the python component for macport (ex: python27). * Change: In boostrap/build.conf, put etesian before anabatic for instance occurrence BloatProperty dependency. Added option support for the "llvm-toolset-7" collection to build against clang 5.0.1. * Bug: In Hurricane::getRecord( const pair<T,U>& ), the getSlot<> templates for first & second arguments must be called with <const T> and <const U> as the pair itself is const (and not simply <T> & <U>). * Change: In Hurricane::getSlot() temlate, only use "string" arguments and not const string&, simpler for template argument deduction. * Bug: In Hurricane::AnalogCellExtension, the StandardPrivateProperty<> template has a static member "_name". Clang did show that the template for this static number has to be put inside the namespace where the template *is defined* (i.e. Hurricane) instead of the namespace where it is instanciated (i.e. Analog). * Bug: In Isobar, Matrix_FromListOfList(), PyInt_AsPlacementStatus() must be put outside the C linkage back in the Isobar C++ namespace (clang). * Bug: In Hurricane::DBo::~DBo, and derived add a throw() specification (clang). * Bug: In Hurricane::RegularLayer::getEnclosure() & setEnclosure(), change signature so it matches the one of the base class (clang). * Bug: In Hurricane::CellPrinter, use double brackets for initializer list (clang). * Change: In Hurricane::Breakpoint, reverse the meaning of the error level. Only error level *lesser or equal* than the stop level will be enabled. * Bug: In CRL/python/helpers/__init__.loadUserSettings(), must put the current working directory in the sys.path as in certain configuration it may not be included. * Bug: In CRL::ApDriver, DumpSegments(), no longer generate segments when encountering a RoutingPad on a top-level Pin Occurrence. The segment was generated in the wrong direction, creating DRC violations on the "mips_core_flat" example. * Change: In CRL::Measures, partial re-design of the measurements management. Now, each kind of measure can accept multiple values put in a vector. The index is intented to match a tool run number. * Change: In CRL::Histogram, add support for multiple sets of datas, indexeds with tool run number. * Change: In CRL::ToolEngine, add support for multiple pass number, add addMeasure<> templates for the various data-types. * Change: In CRL::gdsDriver & CRL::gdsParser(), comment out unused GDS record name constants. * New: Etesian::BloatProperty, property to attach to Instance occurrences that contains the extra number of pitch to add to the cell width. * Bug: In AutoSegment::CompareByDepthLength, the segment length comparison was wrong, it was always returning true, which broke the "strick weak ordering" of the comparison. This was producing a core-dump in GCell::updateDensity() when sorting a vector<>. The end() iterator was being dereferenced, leading to the problem. * Bug: In Katana::DataSymmetric::checkPairing(), the test for segments whose axis is perpandicular to the symmetry axis was wrong ("!=" instead of "-"). * New: In Katana/GlobalRoute, new ::selectSegments(), selectOverloadedgcells() and selectBloatedInstances() to automatically select segments from overloaded edges, overloaded GCells and bloated cells. * Change: In KatanaEngine, return a more detailed success state, distinguish between global and detailed. Add support for multiple routing iterations. * New: In cumulus/python/plugins/ConductorPlugin.py, embryo of routing driven placement.
2019-12-08 18:57:44 -06:00
addMeasure<double> ( "knikT", 0.0, 8 );
addMeasure<size_t> ( "knikS", 0 , 8 );
computeSymbolicWireLength ();
}
} // End of Knik namespace.