diff --git a/crlcore/etc/display.xml b/crlcore/etc/display.xml
index 2d77c1bb..72579b15 100644
--- a/crlcore/etc/display.xml
+++ b/crlcore/etc/display.xml
@@ -28,7 +28,7 @@
-
+
@@ -251,5 +251,73 @@
+
+ Coriolis Look for Printers
+ 3.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/crlcore/etc/technology.symbolic.xml b/crlcore/etc/technology.symbolic.xml
index 92c0bd70..d62b5af2 100644
--- a/crlcore/etc/technology.symbolic.xml
+++ b/crlcore/etc/technology.symbolic.xml
@@ -183,7 +183,7 @@
-
+
@@ -257,11 +257,11 @@
-
+
-
+
-
+
diff --git a/crlcore/etc/tools.configuration.xml b/crlcore/etc/tools.configuration.xml
index 3782a5e8..3f8937fc 100644
--- a/crlcore/etc/tools.configuration.xml
+++ b/crlcore/etc/tools.configuration.xml
@@ -2,10 +2,10 @@
-
+
-
+
@@ -132,7 +132,7 @@
-
+
diff --git a/crlcore/src/ccore/Environment.cpp b/crlcore/src/ccore/Environment.cpp
index f553fbf9..2cee9ea8 100644
--- a/crlcore/src/ccore/Environment.cpp
+++ b/crlcore/src/ccore/Environment.cpp
@@ -535,6 +535,7 @@ namespace CRL {
setGROUND ( "vss" );
setCLOCK ( "^ck$" );
setOBSTACLE ( "^obs$" );
+ setPad ( "^.*_px$" );
_LIBRARIES.append ( "." );
@@ -548,6 +549,7 @@ namespace CRL {
regfree ( &_GroundRegex );
regfree ( &_ClockRegex );
regfree ( &_ObstacleRegex );
+ regfree ( &_padRegex );
}
@@ -591,6 +593,12 @@ namespace CRL {
}
+ bool Environment::isPad ( const char* name ) const
+ {
+ return regexec ( &_padRegex, name, 0, NULL, 0 ) == 0;
+ }
+
+
void Environment::setPOWER ( const char* value )
{
_POWER = value;
@@ -619,6 +627,13 @@ namespace CRL {
}
+ void Environment::setPad ( const char* value )
+ {
+ _pad = value;
+ _setRegex ( &_padRegex , _pad , "Pad" );
+ }
+
+
string Environment::getPrint () const
{
ostringstream s;
@@ -657,7 +672,9 @@ namespace CRL {
<< " - Power Signal := \"" << _POWER << "\"\n"
<< " - Ground Signal := \"" << _GROUND << "\"\n"
<< " - Clock Signal := \"" << _CLOCK << "\"\n"
- << " - Obstacles := \"" << _OBSTACLE << "\"\n\n";
+ << " - Obstacles := \"" << _OBSTACLE << "\"\n"
+ << " o Special Cells.\n"
+ << " - Pads := \"" << _pad << "\"\n\n";
return s.str();
}
diff --git a/crlcore/src/ccore/Utilities.cpp b/crlcore/src/ccore/Utilities.cpp
index dcc1da90..4f4a6eab 100644
--- a/crlcore/src/ccore/Utilities.cpp
+++ b/crlcore/src/ccore/Utilities.cpp
@@ -33,6 +33,7 @@
namespace boptions = boost::program_options;
#include "vlsisapd/configuration/Configuration.h"
+#include "hurricane/Backtrace.h"
#include "hurricane/Warning.h"
#include "hurricane/viewer/Script.h"
#include "crlcore/Utilities.h"
@@ -247,10 +248,19 @@ namespace CRL {
if ( bfs::path::default_name_check_writable() )
bfs::path::default_name_check ( bfs::portable_posix_name );
+ // Check for duplicated type_info initialization.
+ const boptions::variable_value& value = arguments["coriolis_top"];
+ if ( value.value().type() != typeid(string) ) {
+ throw Error("type_info RTTI tree has been initialized twice.\n\n"
+ " This may be due to incorrect import of Python modules, please ensure\n"
+ " that the CRL module is always imported first."
+ );
+ }
+
bfs::path sysConfDir ( SYS_CONF_DIR );
if ( not sysConfDir.has_root_path() ) {
if ( arguments.count("coriolis_top") ) {
- // const boptions::variable_value& value = arguments["coriolis_top"];
+ const boptions::variable_value& value = arguments["coriolis_top"];
// cerr << "value:"
// << " empty:" << boolalpha << value.empty()
// << " defaulted:" << boolalpha << value.defaulted()
@@ -283,7 +293,7 @@ namespace CRL {
Cfg::getParamBool ("misc.verboseLevel1" ,true )->registerCb ( verboseLevel1Changed );
Cfg::getParamBool ("misc.verboseLevel2" ,true )->registerCb ( verboseLevel2Changed );
Cfg::getParamBool ("misc.info" ,false)->registerCb ( infoChanged );
- Cfg::getParamBool ("misc.logMode" ,true )->registerCb ( logModeChanged );
+ Cfg::getParamBool ("misc.logMode" ,false)->registerCb ( logModeChanged );
Cfg::getParamInt ("misc.traceLevel" ,1000 )->registerCb ( traceLevelChanged );
Cfg::getParamString("stratus1.mappingName","./stratus2sxlib.xml")->registerCb ( stratus1MappingNameChanged );
@@ -348,6 +358,7 @@ namespace CRL {
void System::_trapSig ( int sig )
{
cerr << "\n\n[CRL ERROR] System::_trapSig():\n" << endl;
+ cerr << "Program stack:\n" << Backtrace().textWhere() << endl;
switch ( sig ) {
case SIGINT:
diff --git a/crlcore/src/ccore/alliance/ap/ApDriver.cpp b/crlcore/src/ccore/alliance/ap/ApDriver.cpp
index 1e4b5f22..3df0ab6c 100644
--- a/crlcore/src/ccore/alliance/ap/ApDriver.cpp
+++ b/crlcore/src/ccore/alliance/ap/ApDriver.cpp
@@ -36,6 +36,7 @@ using namespace std;
#include "hurricane/RoutingPad.h"
#include "hurricane/Cell.h"
#include "hurricane/Layer.h"
+#include "hurricane/RegularLayer.h"
#include "hurricane/Warning.h"
#include "Ap.h"
@@ -209,12 +210,16 @@ void DumpContacts(ofstream& ccell, Cell *cell)
}
else
{
+ DbU::Unit expand = 0;
+ if ( not dynamic_cast(contact->getLayer()) )
+ expand = DbU::lambda(1.0);
+
if (toMBKLayer(mbkLayer,contact->getLayer()->getName(),true))
ccell << "B "
<< toMBKlambda(contact->getX()) << ","
<< toMBKlambda(contact->getY()) << ","
- << toMBKlambda(contact->getWidth()) << ","
- << toMBKlambda(contact->getHeight()) << ","
+ << toMBKlambda(contact->getWidth () + expand) << ","
+ << toMBKlambda(contact->getHeight() + expand) << ","
<< mbkLayer << ","
<< toMBKName(contact->getNet()->getName())
<< endl;
@@ -260,6 +265,9 @@ void DumpContacts(ofstream& ccell, Cell *cell)
} else
continue;
+ const char* direction = "RIGHT";
+ if ( (x1 == x2) and (y1 != y2) ) direction = "UP";
+
if ( x1 > x2 ) swap ( x1, x2 );
if ( y1 > y2 ) swap ( y1, y2 );
@@ -270,8 +278,8 @@ void DumpContacts(ofstream& ccell, Cell *cell)
<< toMBKlambda(x2) << ","
<< toMBKlambda(y2) << ","
<< toMBKlambda(width) << ","
- << toMBKName(component->getNet()->getName())
- << ",RIGHT,"
+ << toMBKName(component->getNet()->getName()) << ","
+ << direction << ","
<< mbkLayer
<< endl;
}
diff --git a/crlcore/src/ccore/alliance/ap/ApParser.cpp b/crlcore/src/ccore/alliance/ap/ApParser.cpp
index bce17885..37858e4a 100644
--- a/crlcore/src/ccore/alliance/ap/ApParser.cpp
+++ b/crlcore/src/ccore/alliance/ap/ApParser.cpp
@@ -59,6 +59,7 @@
#include
#include "hurricane/DataBase.h"
+#include "hurricane/RegularLayer.h"
#include "hurricane/Technology.h"
#include "hurricane/Pin.h"
#include "hurricane/Contact.h"
@@ -172,23 +173,30 @@ namespace {
class ApParser {
public:
- // Methods.
ApParser ( AllianceFramework* af );
void loadFromFile ( const string& cellPath, Cell* cell );
private:
- // Internal: enum.
- enum ParserState { StateVersion
- , StateHeader
- , StateBody
- , StateEOF
- };
- // Internal: static Attributes.
+ enum ParserState { StateVersion
+ , StateHeader
+ , StateBody
+ , StateEOF
+ };
+ enum SegmentDirection { DirectionHorizontal=0x1
+ , DirectionVertical =0x2
+ , DirectionIncrease =0x4
+ , DirectionDecrease =0x8
+ , DirectionUndefined =0
+ , DirectionUp =DirectionVertical |DirectionIncrease
+ , DirectionDown =DirectionVertical |DirectionDecrease
+ , DirectionLeft =DirectionHorizontal|DirectionDecrease
+ , DirectionRight =DirectionHorizontal|DirectionIncrease
+ };
static LayerInformations _layerInformations;
- // Internal: Attributes.
AllianceFramework* _framework;
string _cellPath;
Cell* _cell;
+ Catalog::State* _state;
double _scaleRatio;
unsigned int _anonymousId;
int _parserState;
@@ -204,6 +212,7 @@ namespace {
Net* _getNet ( const char* apName );
Net* _getAnonymousNet ();
Net* _safeGetNet ( const char* apName );
+ SegmentDirection _getApSegDirection ( const char* segDir );
void _parseVersion ();
void _parseHeader ();
void _parseAbutmentBox ();
@@ -222,13 +231,14 @@ namespace {
ApParser::ApParser ( AllianceFramework* framework )
- : _framework(framework)
- , _cellPath()
- , _cell(NULL)
- , _scaleRatio(100.0)
+ : _framework (framework)
+ , _cellPath ()
+ , _cell (NULL)
+ , _state (NULL)
+ , _scaleRatio (100.0)
, _anonymousId(0)
, _parserState(StateVersion)
- , _lineNumber(0)
+ , _lineNumber (0)
{
if ( _layerInformations.empty() ) {
_layerInformations.setTechnology ( DataBase::getDB()->getTechnology() );
@@ -333,6 +343,19 @@ namespace {
}
+ inline ApParser::SegmentDirection ApParser::_getApSegDirection ( const char* value )
+ {
+ if ( *value == '\0' ) return DirectionUndefined;
+
+ if ( string("UP" ).compare(value) == 0 ) return DirectionUp;
+ if ( string("DOWN" ).compare(value) == 0 ) return DirectionDown;
+ if ( string("LEFT" ).compare(value) == 0 ) return DirectionLeft;
+ if ( string("RIGHT").compare(value) == 0 ) return DirectionRight;
+
+ return DirectionUndefined;
+ }
+
+
Net* ApParser::_getNet ( const char* apName )
{
string hName = apName;
@@ -559,9 +582,14 @@ namespace {
net = _safeGetNet ( fields[5] );
layerInfo = _getLayerInformation ( fields[4] );
- if ( layerInfo )
- Contact::create ( net, layerInfo->getLayer(), XVIA, YVIA, WIDTH, HEIGHT );
- else
+
+ if ( layerInfo ) {
+ DbU::Unit shrink = 0;
+ if ( not dynamic_cast(layerInfo->getLayer()) )
+ shrink = DbU::lambda(1.0);
+
+ Contact::create ( net, layerInfo->getLayer(), XVIA, YVIA, WIDTH-shrink, HEIGHT-shrink );
+ } else
_printError ( false, "Unknown layer name %s.", fields[4] );
}
}
@@ -572,6 +600,7 @@ namespace {
static DbU::Unit X1, Y1, X2, Y2, WIDTH;
static Net* net;
static LayerInformation* layerInfo;
+ static SegmentDirection segDir;
vector fields = _splitString ( _rawLine+2, ',' );
if ( fields.size() < 8 )
@@ -583,20 +612,33 @@ namespace {
Y2 = _getUnit ( fields[3] );
WIDTH = _getUnit ( fields[4] );
net = _safeGetNet ( fields[5] );
+ segDir = _getApSegDirection ( fields[6] );
layerInfo = _getLayerInformation ( fields[7] );
if ( layerInfo ) {
Segment* segment = NULL;
- if ( X1 == X2 ) {
- segment = Vertical::create ( net, layerInfo->getLayer(), X1, WIDTH, Y1, Y2 );
- } else if ( Y1 == Y2 ) {
- segment = Horizontal::create ( net, layerInfo->getLayer(), Y1, WIDTH, X1, X2 );
- } else {
- _printError ( false, "Segment neither horizontal nor vertical." );
+ if ( (X1 == X2) and (Y1 == Y2) ) {
+ if ( segDir & DirectionVertical )
+ segment = Vertical::create ( net, layerInfo->getLayer(), X1, WIDTH, Y1, Y2 );
+ else
+ segment = Horizontal::create ( net, layerInfo->getLayer(), Y1, WIDTH, X1, X2 );
+ } else {
+ if ( X1 == X2 ) {
+ segment = Vertical::create ( net, layerInfo->getLayer(), X1, WIDTH, Y1, Y2 );
+ if ( segDir & DirectionHorizontal )
+ _printWarning ( "Inconsistent direction on Horizontal segment (neither UP nor DOWN)." );
+ } else if ( Y1 == Y2 ) {
+ segment = Horizontal::create ( net, layerInfo->getLayer(), Y1, WIDTH, X1, X2 );
+ if ( segDir & DirectionVertical )
+ _printWarning ( "Inconsistent direction on Horizontal segment (neither LEFT nor RIGHT)." );
+ } else {
+ _printError ( false, "Segment neither horizontal nor vertical." );
+ }
}
if ( layerInfo->isConnector()) {
if ( not net->isExternal() ) {
- _printWarning ( "External component on non-external net %s", getString(net->getName()).c_str() );
+ if ( _state->isLogical() )
+ _printWarning ( "External component on non-external net %s", getString(net->getName()).c_str() );
net->setExternal ( true );
}
NetExternalComponents::setExternal(segment);
@@ -624,6 +666,7 @@ namespace {
static Name ROT_M = "ROT_M";
static Name SY_RM = "SY_RM";
static Name SY_RP = "SY_RP";
+ static Name padreal = "padreal";
vector fields = _splitString ( _rawLine+2, ',' );
if ( fields.size() < 5 )
@@ -658,7 +701,7 @@ namespace {
instance->setPlacementStatus ( Instance::PlacementStatus::FIXED );
} else {
Catalog::State* instanceState = _framework->getCatalog()->getState ( masterCellName );
- if ( !instanceState || (!instanceState->isFeed()) ) {
+ if ( (masterCellName != padreal) and ( not instanceState or (not instanceState->isFeed()) ) ) {
_printError ( false
, "No logical instance associated to physical instance %s."
, getString(instanceName).c_str()
@@ -740,10 +783,9 @@ namespace {
if ( catalogProperty == NULL )
throw Error ( "Missing CatalogProperty in cell %s.\n" , getString(cell->getName()).c_str() );
- Catalog::State *state = catalogProperty->getState ();
-
- state->setPhysical ( true );
- if ( state->isFlattenLeaf() ) _cell->setFlattenLeaf ( true );
+ _state = catalogProperty->getState ();
+ _state->setPhysical ( true );
+ if ( _state->isFlattenLeaf() ) _cell->setFlattenLeaf ( true );
IoFile fileStream ( cellPath );
fileStream.open ( "r" );
diff --git a/crlcore/src/ccore/alliance/vst/VstParserGrammar.yy b/crlcore/src/ccore/alliance/vst/VstParserGrammar.yy
index e2af9ef8..5c1c1cf6 100644
--- a/crlcore/src/ccore/alliance/vst/VstParserGrammar.yy
+++ b/crlcore/src/ccore/alliance/vst/VstParserGrammar.yy
@@ -905,7 +905,8 @@ association_element
);
for ( unsigned int i=0 ; i < __ys->_masterNets.size() ; i++ )
- if ( !__ys->_masterNets[i]->isGlobal() )
+ if ( not __ys->_masterNets[i]->isGlobal()
+ or (__ys->_masterNets[i]->getName() != __ys->_instanceNets[i]->getName()) )
__ys->_instance->getPlug ( __ys->_masterNets[i] )->setNet ( __ys->_instanceNets[i] );
__ys->_masterPort = true;
diff --git a/crlcore/src/ccore/crlcore/AllianceFramework.h b/crlcore/src/ccore/crlcore/AllianceFramework.h
index 0e1f345f..49aa4112 100644
--- a/crlcore/src/ccore/crlcore/AllianceFramework.h
+++ b/crlcore/src/ccore/crlcore/AllianceFramework.h
@@ -29,7 +29,7 @@
#include