2010-03-09 09:20:13 -06:00
|
|
|
// -*- C++ -*-
|
|
|
|
//
|
|
|
|
// This file is part of the Coriolis Software.
|
2018-01-06 10:55:44 -06:00
|
|
|
// Copyright (c) UPMC 2008-2018, All Rights Reserved
|
2010-03-09 09:20:13 -06:00
|
|
|
//
|
2012-11-16 06:49:47 -06:00
|
|
|
// +-----------------------------------------------------------------+
|
2010-03-09 09:20:13 -06:00
|
|
|
// | C O R I O L I S |
|
|
|
|
// | Alliance / Hurricane Interface |
|
|
|
|
// | |
|
|
|
|
// | Author : Jean-Paul CHAPUT |
|
|
|
|
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
|
|
|
// | =============================================================== |
|
2012-11-16 06:49:47 -06:00
|
|
|
// | C++ Module : "./Environnment.cpp" |
|
|
|
|
// +-----------------------------------------------------------------+
|
2010-03-09 09:20:13 -06:00
|
|
|
|
|
|
|
|
2013-09-16 03:28:24 -05:00
|
|
|
#include <cctype>
|
|
|
|
#include <cstdlib>
|
|
|
|
#include <map>
|
|
|
|
#include <iomanip>
|
|
|
|
#include "crlcore/Utilities.h"
|
|
|
|
#include "crlcore/Environment.h"
|
2016-01-20 17:25:39 -06:00
|
|
|
#include "crlcore/AllianceFramework.h"
|
2010-03-09 09:20:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
|
|
|
|
using namespace CRL;
|
|
|
|
|
|
|
|
|
|
|
|
const char* badRegex =
|
|
|
|
"Environment::Environment() :\n"
|
|
|
|
" Invalid regular expression for %s :\n"
|
|
|
|
" %s.\n";
|
|
|
|
const char* badSCALE_X =
|
|
|
|
"Environment::Environment() :\n"
|
|
|
|
" Only three values are allowed for SCALE : 1, 10 & 100.\n"
|
|
|
|
" (current value := %ld)";
|
|
|
|
const char* badEnvironment =
|
|
|
|
"Environment::Environment() :\n"
|
|
|
|
" %s logical format \"%s\" incoherent with physical format \"%s\".\n";
|
|
|
|
|
|
|
|
|
|
|
|
} // End of anonymous namespace.
|
|
|
|
|
|
|
|
|
|
|
|
namespace CRL {
|
|
|
|
|
2018-05-15 03:03:13 -05:00
|
|
|
using namespace std;
|
2016-01-20 17:25:39 -06:00
|
|
|
using Hurricane::Initializer;
|
|
|
|
using Hurricane::JsonTypes;
|
|
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "Environment".
|
2010-03-09 09:20:13 -06:00
|
|
|
|
|
|
|
Environment::Environment ()
|
|
|
|
: _CORIOLIS_TOP (CORIOLIS_TOP)
|
|
|
|
, _displayStyle ()
|
|
|
|
, _SCALE_X (10)
|
|
|
|
, _IN_LO ("vst")
|
|
|
|
, _IN_PH ("ap")
|
|
|
|
, _OUT_LO ("vst")
|
|
|
|
, _OUT_PH ("ap")
|
|
|
|
, _CATALOG ("CATAL")
|
|
|
|
, _inConstructor (true)
|
|
|
|
{
|
|
|
|
setPOWER ( "vdd" );
|
|
|
|
setGROUND ( "vss" );
|
|
|
|
setCLOCK ( "^ck$" );
|
2010-12-04 09:23:51 -06:00
|
|
|
setBLOCKAGE ( "^obs$" );
|
* ./crlcore/src/ccore:
- New: In Utilities, uses the new Backtrace to print the stack before
core-dumping.
- New: In Environment, pattern recognition of Pad model names.
- New: In AllianceFramework, pattern recognition of Pad model names.
- Bug: In Measures, add inspector support and uses pointer to prevent using
copy construction. Makes the inspector to core-dump.
- New: In RoutingLayerGauge, inspector support for Constant::Direction.
- Change: In ApDriver, correct managment of BIGVIA sizes. BIGVIA in one
metal keep their sizes, but BIGVIA whith cut must be expandeds to
contains their enclosure in metals. In Hurricane VIA size are relatives
to the cut but in Alliance, to the biggest metal.
Generate correct direction (always UP or RIGHT) for segments.
- Change: In ApParser, shrink BIGVIA to the size of their cut from the
Alliance format. Avoid VIA "bloating".
More thorough verification of Segment data coherency, mainly with
direction.
Suppress warning of non-existent logical instance in the special
case of "padreal".
- Change: In VstParserGrammar, perform an explicit plug connection on globals
Nets if the names of globals Nets differs.
- New: In display.xml, add style for printers (B&W).
- Bug: In technology.symbolic.xml, BLOCKAGE6 was associated to metal6 instead
of blockage6.
Correct extensions value for VIA metal layers above cut1.
- Bug: In Utilities, in System singleton constructor check of duplicated
type_info/RTTI initialization. Occurs when python modules are useds.
CRL must always be included first.
2010-11-16 07:57:57 -06:00
|
|
|
setPad ( "^.*_px$" );
|
2010-03-09 09:20:13 -06:00
|
|
|
|
Implementation of DataBase native save/restore in JSON (step 3).
* Test: post-receive hook on server should send mail [1].
* New: In VLSISAPD, in Parameter, callback have now a tag, which the
pointer to the caller. This allow for the callback removal when
the caller is destroyed.
* New: In VLSISAPD, in WidgetDescription, when associated to a parameter,
the destructor must remove the associated callback function on
the Parameter.
* New: In Hurricane, added JSON support for Configuration, separated
from vlsisapd, as the support is not available at this point.
JSON support for Configuration, Parameter & LayoutDescription.
* Change: In Hurricane, in JsonStack, the stack of JsonObjects has been
displaced here from HurricaneHandler. This way, all
JsonObject::toData() can access the JsonOjects in the context
of the parser.
* New: In Hurricane, in DBo::toJson() added support for Entity by
reference (ids).
* New: In Hurricane, added JSON support for all Layer sub-class types.
* New: In Hurricane, in Technology, export the Layers, but must be
sorted by increasing mask value.
* New: In Hurricane, in Entity, added support for Entity by reference (ids).
* New: In Hurricane, in DataBase, added technology full support.
* New: In Hurricane, In JsonNet, move the ring rebuild management from
JsonStack to JsonNet.
* New: In Hurricane, added JSON support for NetAlias, NetExternalcomponents
(not cleanly implemented as a Relation).
* New: In Hurricane, new method Cell::fromJson() to load a cell from
a JSON file.
* New: In Hurricane, In Graphics, make it an observable, for when JSON
fully reload the graphic state, it must be able to notify other
objects (namely the Controller).
* New: In Hurricane, in ControllerWidget, observe the Graphics to regenerate
the palette as needed. New method ControllerTab::graphicsUpdated().
* New: In Hurricane, in RawDrawingStyle added a destructor to release the
Qt pen/brush. Added JSON support for HSVr, DrawingStyle, DrawingGroup,
& DisplayStyle.
* New: In Hurricane, in GraphicsWidget, rewrite correctly the readGraphics()
to erase the previous widgets and re-create the new ones.
* New: In Hurricane, in PaletteWidget, correct re-creation of the layout/widgets
in case of Graphics change.
* New: In CRL Core, in System, register the parameters callbacks with
the address of the object, for later deletion.
* New: In CRL Core, in AllianceFramework, make it observable, to notify
library changes. For the AllianceFramework creation, now allow to
completly bypass the Python initialization system, when we expect
to restore it from a full blob. Added methods to sets the default
RoutingGauge & CellGauge.
* New: In CRL Core, added JSON suppport for CellGauge, RoutingLayerGauge
& RoutingGauge.
* New: In CRL Core, in LibraryManager, oberver AllianceFramework, to update
the list of libraries in case of change (for JSON full reload).
2016-02-20 14:24:44 -06:00
|
|
|
_LIBRARIES.append ( ".", "working" );
|
2010-03-09 09:20:13 -06:00
|
|
|
|
|
|
|
_inConstructor = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Environment::~Environment ()
|
|
|
|
{
|
|
|
|
regfree ( &_PowerRegex );
|
|
|
|
regfree ( &_GroundRegex );
|
|
|
|
regfree ( &_ClockRegex );
|
2010-12-04 09:23:51 -06:00
|
|
|
regfree ( &_BlockageRegex );
|
* ./crlcore/src/ccore:
- New: In Utilities, uses the new Backtrace to print the stack before
core-dumping.
- New: In Environment, pattern recognition of Pad model names.
- New: In AllianceFramework, pattern recognition of Pad model names.
- Bug: In Measures, add inspector support and uses pointer to prevent using
copy construction. Makes the inspector to core-dump.
- New: In RoutingLayerGauge, inspector support for Constant::Direction.
- Change: In ApDriver, correct managment of BIGVIA sizes. BIGVIA in one
metal keep their sizes, but BIGVIA whith cut must be expandeds to
contains their enclosure in metals. In Hurricane VIA size are relatives
to the cut but in Alliance, to the biggest metal.
Generate correct direction (always UP or RIGHT) for segments.
- Change: In ApParser, shrink BIGVIA to the size of their cut from the
Alliance format. Avoid VIA "bloating".
More thorough verification of Segment data coherency, mainly with
direction.
Suppress warning of non-existent logical instance in the special
case of "padreal".
- Change: In VstParserGrammar, perform an explicit plug connection on globals
Nets if the names of globals Nets differs.
- New: In display.xml, add style for printers (B&W).
- Bug: In technology.symbolic.xml, BLOCKAGE6 was associated to metal6 instead
of blockage6.
Correct extensions value for VIA metal layers above cut1.
- Bug: In Utilities, in System singleton constructor check of duplicated
type_info/RTTI initialization. Occurs when python modules are useds.
CRL must always be included first.
2010-11-16 07:57:57 -06:00
|
|
|
regfree ( &_padRegex );
|
2010-03-09 09:20:13 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool Environment::isPOWER ( const char* name ) const
|
|
|
|
{
|
|
|
|
return regexec ( &_PowerRegex, name, 0, NULL, 0 ) == 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool Environment::isGROUND ( const char* name ) const
|
|
|
|
{
|
|
|
|
return regexec ( &_GroundRegex, name, 0, NULL, 0 ) == 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool Environment::isCLOCK ( const char* name ) const
|
|
|
|
{
|
|
|
|
return regexec ( &_ClockRegex, name, 0, NULL, 0 ) == 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-12-04 09:23:51 -06:00
|
|
|
bool Environment::isBLOCKAGE ( const char* name ) const
|
2010-03-09 09:20:13 -06:00
|
|
|
{
|
2010-12-04 09:23:51 -06:00
|
|
|
return regexec ( &_BlockageRegex, name, 0, NULL, 0 ) == 0;
|
2010-03-09 09:20:13 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
* ./crlcore/src/ccore:
- New: In Utilities, uses the new Backtrace to print the stack before
core-dumping.
- New: In Environment, pattern recognition of Pad model names.
- New: In AllianceFramework, pattern recognition of Pad model names.
- Bug: In Measures, add inspector support and uses pointer to prevent using
copy construction. Makes the inspector to core-dump.
- New: In RoutingLayerGauge, inspector support for Constant::Direction.
- Change: In ApDriver, correct managment of BIGVIA sizes. BIGVIA in one
metal keep their sizes, but BIGVIA whith cut must be expandeds to
contains their enclosure in metals. In Hurricane VIA size are relatives
to the cut but in Alliance, to the biggest metal.
Generate correct direction (always UP or RIGHT) for segments.
- Change: In ApParser, shrink BIGVIA to the size of their cut from the
Alliance format. Avoid VIA "bloating".
More thorough verification of Segment data coherency, mainly with
direction.
Suppress warning of non-existent logical instance in the special
case of "padreal".
- Change: In VstParserGrammar, perform an explicit plug connection on globals
Nets if the names of globals Nets differs.
- New: In display.xml, add style for printers (B&W).
- Bug: In technology.symbolic.xml, BLOCKAGE6 was associated to metal6 instead
of blockage6.
Correct extensions value for VIA metal layers above cut1.
- Bug: In Utilities, in System singleton constructor check of duplicated
type_info/RTTI initialization. Occurs when python modules are useds.
CRL must always be included first.
2010-11-16 07:57:57 -06:00
|
|
|
bool Environment::isPad ( const char* name ) const
|
|
|
|
{
|
|
|
|
return regexec ( &_padRegex, name, 0, NULL, 0 ) == 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-03-09 09:20:13 -06:00
|
|
|
void Environment::setPOWER ( const char* value )
|
|
|
|
{
|
|
|
|
_POWER = value;
|
2010-05-13 04:45:20 -05:00
|
|
|
_setRegex ( &_PowerRegex , _POWER , "Power" );
|
2010-03-09 09:20:13 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Environment::setGROUND ( const char* value )
|
|
|
|
{
|
|
|
|
_GROUND = value;
|
2010-05-13 04:45:20 -05:00
|
|
|
_setRegex ( &_GroundRegex , _GROUND , "Ground" );
|
2010-03-09 09:20:13 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Environment::setCLOCK ( const char* value )
|
|
|
|
{
|
|
|
|
_CLOCK = value;
|
2010-05-13 04:45:20 -05:00
|
|
|
_setRegex ( &_ClockRegex , _CLOCK , "Clock" );
|
2010-03-09 09:20:13 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-12-04 09:23:51 -06:00
|
|
|
void Environment::setBLOCKAGE ( const char* value )
|
2010-03-09 09:20:13 -06:00
|
|
|
{
|
2010-12-04 09:23:51 -06:00
|
|
|
_BLOCKAGE = value;
|
|
|
|
_setRegex ( &_BlockageRegex , _BLOCKAGE , "Blockage" );
|
2010-03-09 09:20:13 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
* ./crlcore/src/ccore:
- New: In Utilities, uses the new Backtrace to print the stack before
core-dumping.
- New: In Environment, pattern recognition of Pad model names.
- New: In AllianceFramework, pattern recognition of Pad model names.
- Bug: In Measures, add inspector support and uses pointer to prevent using
copy construction. Makes the inspector to core-dump.
- New: In RoutingLayerGauge, inspector support for Constant::Direction.
- Change: In ApDriver, correct managment of BIGVIA sizes. BIGVIA in one
metal keep their sizes, but BIGVIA whith cut must be expandeds to
contains their enclosure in metals. In Hurricane VIA size are relatives
to the cut but in Alliance, to the biggest metal.
Generate correct direction (always UP or RIGHT) for segments.
- Change: In ApParser, shrink BIGVIA to the size of their cut from the
Alliance format. Avoid VIA "bloating".
More thorough verification of Segment data coherency, mainly with
direction.
Suppress warning of non-existent logical instance in the special
case of "padreal".
- Change: In VstParserGrammar, perform an explicit plug connection on globals
Nets if the names of globals Nets differs.
- New: In display.xml, add style for printers (B&W).
- Bug: In technology.symbolic.xml, BLOCKAGE6 was associated to metal6 instead
of blockage6.
Correct extensions value for VIA metal layers above cut1.
- Bug: In Utilities, in System singleton constructor check of duplicated
type_info/RTTI initialization. Occurs when python modules are useds.
CRL must always be included first.
2010-11-16 07:57:57 -06:00
|
|
|
void Environment::setPad ( const char* value )
|
|
|
|
{
|
|
|
|
_pad = value;
|
|
|
|
_setRegex ( &_padRegex , _pad , "Pad" );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-03-09 09:20:13 -06:00
|
|
|
string Environment::getPrint () const
|
|
|
|
{
|
|
|
|
ostringstream s;
|
|
|
|
|
|
|
|
s << "\n"
|
New coriolis launcher. Configuration files cleanup.
* Change: In CRL Core, simplify the loading sequence. The technology,
both symbolic and real is now loaded directly from coriolisInit.py
and not through the Alliance loader. This was a leftover from the
time configuration was in XML. Remove others traces of XML loading.
Remove SYMB_TECHNO_NAME, REAL_TECHNO_NAME & DISPLAY from the Alliance
environement, as they was no longer used.
Note that technology *still* need to be loader *after* Alliance
framework has been initialized.
Gauge information is moved from <alliance.conf> to <kite.conf>.
* Bug: In Coloquinte, in optimization_subproblems.cxx static variables
must not be inlined. Generate a problem when linking in debug mode
(seems the symbol gets optimised out).
* Bug: In Katabatic, in Grid::getGCell(), when the coordinate is *outside*
the area, do not try to find a GCell, directly return NULL.
* New: In Unicorn, create a generic command launcher named "coriolis" which
automatically take cares of all environement setup, then run a command
by default, it's <cgt>, but it can be anything. For example: <zsh>.
2015-04-13 11:54:09 -05:00
|
|
|
<< " o Hurricane/Alliance environment.\n";
|
2010-03-09 09:20:13 -06:00
|
|
|
|
|
|
|
s << " o Libraries.\n"
|
New coriolis launcher. Configuration files cleanup.
* Change: In CRL Core, simplify the loading sequence. The technology,
both symbolic and real is now loaded directly from coriolisInit.py
and not through the Alliance loader. This was a leftover from the
time configuration was in XML. Remove others traces of XML loading.
Remove SYMB_TECHNO_NAME, REAL_TECHNO_NAME & DISPLAY from the Alliance
environement, as they was no longer used.
Note that technology *still* need to be loader *after* Alliance
framework has been initialized.
Gauge information is moved from <alliance.conf> to <kite.conf>.
* Bug: In Coloquinte, in optimization_subproblems.cxx static variables
must not be inlined. Generate a problem when linking in debug mode
(seems the symbol gets optimised out).
* Bug: In Katabatic, in Grid::getGCell(), when the coordinate is *outside*
the area, do not try to find a GCell, directly return NULL.
* New: In Unicorn, create a generic command launcher named "coriolis" which
automatically take cares of all environement setup, then run a command
by default, it's <cgt>, but it can be anything. For example: <zsh>.
2015-04-13 11:54:09 -05:00
|
|
|
<< " - Catalog: \"" << _CATALOG << "\"\n"
|
2010-03-09 09:20:13 -06:00
|
|
|
<< " - Working Library:\n"
|
New coriolis launcher. Configuration files cleanup.
* Change: In CRL Core, simplify the loading sequence. The technology,
both symbolic and real is now loaded directly from coriolisInit.py
and not through the Alliance loader. This was a leftover from the
time configuration was in XML. Remove others traces of XML loading.
Remove SYMB_TECHNO_NAME, REAL_TECHNO_NAME & DISPLAY from the Alliance
environement, as they was no longer used.
Note that technology *still* need to be loader *after* Alliance
framework has been initialized.
Gauge information is moved from <alliance.conf> to <kite.conf>.
* Bug: In Coloquinte, in optimization_subproblems.cxx static variables
must not be inlined. Generate a problem when linking in debug mode
(seems the symbol gets optimised out).
* Bug: In Katabatic, in Grid::getGCell(), when the coordinate is *outside*
the area, do not try to find a GCell, directly return NULL.
* New: In Unicorn, create a generic command launcher named "coriolis" which
automatically take cares of all environement setup, then run a command
by default, it's <cgt>, but it can be anything. For example: <zsh>.
2015-04-13 11:54:09 -05:00
|
|
|
<< " [ 0]:\"" << _LIBRARIES[0].getPath() << "\"\n"
|
2010-03-09 09:20:13 -06:00
|
|
|
<< " - System Libraries:\n";
|
|
|
|
|
|
|
|
if ( _LIBRARIES.getSize() <= 1 ) {
|
|
|
|
s << " <not set or empty>.\n";
|
|
|
|
} else {
|
|
|
|
for ( size_t i = 1; i < _LIBRARIES.getSize() ; i++ ) {
|
New coriolis launcher. Configuration files cleanup.
* Change: In CRL Core, simplify the loading sequence. The technology,
both symbolic and real is now loaded directly from coriolisInit.py
and not through the Alliance loader. This was a leftover from the
time configuration was in XML. Remove others traces of XML loading.
Remove SYMB_TECHNO_NAME, REAL_TECHNO_NAME & DISPLAY from the Alliance
environement, as they was no longer used.
Note that technology *still* need to be loader *after* Alliance
framework has been initialized.
Gauge information is moved from <alliance.conf> to <kite.conf>.
* Bug: In Coloquinte, in optimization_subproblems.cxx static variables
must not be inlined. Generate a problem when linking in debug mode
(seems the symbol gets optimised out).
* Bug: In Katabatic, in Grid::getGCell(), when the coordinate is *outside*
the area, do not try to find a GCell, directly return NULL.
* New: In Unicorn, create a generic command launcher named "coriolis" which
automatically take cares of all environement setup, then run a command
by default, it's <cgt>, but it can be anything. For example: <zsh>.
2015-04-13 11:54:09 -05:00
|
|
|
s << " [" << setw(2) << i << "]:\"" << _LIBRARIES[i].getPath() << "\"\n";
|
2010-03-09 09:20:13 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
s << " o I/O Formats.\n"
|
New coriolis launcher. Configuration files cleanup.
* Change: In CRL Core, simplify the loading sequence. The technology,
both symbolic and real is now loaded directly from coriolisInit.py
and not through the Alliance loader. This was a leftover from the
time configuration was in XML. Remove others traces of XML loading.
Remove SYMB_TECHNO_NAME, REAL_TECHNO_NAME & DISPLAY from the Alliance
environement, as they was no longer used.
Note that technology *still* need to be loader *after* Alliance
framework has been initialized.
Gauge information is moved from <alliance.conf> to <kite.conf>.
* Bug: In Coloquinte, in optimization_subproblems.cxx static variables
must not be inlined. Generate a problem when linking in debug mode
(seems the symbol gets optimised out).
* Bug: In Katabatic, in Grid::getGCell(), when the coordinate is *outside*
the area, do not try to find a GCell, directly return NULL.
* New: In Unicorn, create a generic command launcher named "coriolis" which
automatically take cares of all environement setup, then run a command
by default, it's <cgt>, but it can be anything. For example: <zsh>.
2015-04-13 11:54:09 -05:00
|
|
|
<< Dots::asULong ( " - Scale", _SCALE_X ) << "\n"
|
|
|
|
<< Dots::asString( " - Input, logical" , _IN_LO ) << "\n"
|
|
|
|
<< Dots::asString( " - Input, physical" , _IN_PH ) << "\n"
|
|
|
|
<< Dots::asString( " - Output, logical" , _OUT_LO ) << "\n"
|
|
|
|
<< Dots::asString( " - Output, physical", _OUT_PH ) << "\n"
|
2010-03-09 09:20:13 -06:00
|
|
|
<< " o Special Signals.\n"
|
New coriolis launcher. Configuration files cleanup.
* Change: In CRL Core, simplify the loading sequence. The technology,
both symbolic and real is now loaded directly from coriolisInit.py
and not through the Alliance loader. This was a leftover from the
time configuration was in XML. Remove others traces of XML loading.
Remove SYMB_TECHNO_NAME, REAL_TECHNO_NAME & DISPLAY from the Alliance
environement, as they was no longer used.
Note that technology *still* need to be loader *after* Alliance
framework has been initialized.
Gauge information is moved from <alliance.conf> to <kite.conf>.
* Bug: In Coloquinte, in optimization_subproblems.cxx static variables
must not be inlined. Generate a problem when linking in debug mode
(seems the symbol gets optimised out).
* Bug: In Katabatic, in Grid::getGCell(), when the coordinate is *outside*
the area, do not try to find a GCell, directly return NULL.
* New: In Unicorn, create a generic command launcher named "coriolis" which
automatically take cares of all environement setup, then run a command
by default, it's <cgt>, but it can be anything. For example: <zsh>.
2015-04-13 11:54:09 -05:00
|
|
|
<< Dots::asString( " - Power Signal" , _POWER ) << "\n"
|
|
|
|
<< Dots::asString( " - Ground Signal" , _GROUND ) << "\n"
|
|
|
|
<< Dots::asString( " - Clock Signal" , _CLOCK ) << "\n"
|
|
|
|
<< Dots::asString( " - Blockages" , _BLOCKAGE ) << "\n"
|
* ./crlcore/src/ccore:
- New: In Utilities, uses the new Backtrace to print the stack before
core-dumping.
- New: In Environment, pattern recognition of Pad model names.
- New: In AllianceFramework, pattern recognition of Pad model names.
- Bug: In Measures, add inspector support and uses pointer to prevent using
copy construction. Makes the inspector to core-dump.
- New: In RoutingLayerGauge, inspector support for Constant::Direction.
- Change: In ApDriver, correct managment of BIGVIA sizes. BIGVIA in one
metal keep their sizes, but BIGVIA whith cut must be expandeds to
contains their enclosure in metals. In Hurricane VIA size are relatives
to the cut but in Alliance, to the biggest metal.
Generate correct direction (always UP or RIGHT) for segments.
- Change: In ApParser, shrink BIGVIA to the size of their cut from the
Alliance format. Avoid VIA "bloating".
More thorough verification of Segment data coherency, mainly with
direction.
Suppress warning of non-existent logical instance in the special
case of "padreal".
- Change: In VstParserGrammar, perform an explicit plug connection on globals
Nets if the names of globals Nets differs.
- New: In display.xml, add style for printers (B&W).
- Bug: In technology.symbolic.xml, BLOCKAGE6 was associated to metal6 instead
of blockage6.
Correct extensions value for VIA metal layers above cut1.
- Bug: In Utilities, in System singleton constructor check of duplicated
type_info/RTTI initialization. Occurs when python modules are useds.
CRL must always be included first.
2010-11-16 07:57:57 -06:00
|
|
|
<< " o Special Cells.\n"
|
New coriolis launcher. Configuration files cleanup.
* Change: In CRL Core, simplify the loading sequence. The technology,
both symbolic and real is now loaded directly from coriolisInit.py
and not through the Alliance loader. This was a leftover from the
time configuration was in XML. Remove others traces of XML loading.
Remove SYMB_TECHNO_NAME, REAL_TECHNO_NAME & DISPLAY from the Alliance
environement, as they was no longer used.
Note that technology *still* need to be loader *after* Alliance
framework has been initialized.
Gauge information is moved from <alliance.conf> to <kite.conf>.
* Bug: In Coloquinte, in optimization_subproblems.cxx static variables
must not be inlined. Generate a problem when linking in debug mode
(seems the symbol gets optimised out).
* Bug: In Katabatic, in Grid::getGCell(), when the coordinate is *outside*
the area, do not try to find a GCell, directly return NULL.
* New: In Unicorn, create a generic command launcher named "coriolis" which
automatically take cares of all environement setup, then run a command
by default, it's <cgt>, but it can be anything. For example: <zsh>.
2015-04-13 11:54:09 -05:00
|
|
|
<< Dots::asString( " - Pads" , _pad ) << "\n\n";
|
2010-03-09 09:20:13 -06:00
|
|
|
|
|
|
|
return s.str();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-13 04:45:20 -05:00
|
|
|
void Environment::_setRegex ( regex_t* regex, const string& pattern, const char* name )
|
2010-03-09 09:20:13 -06:00
|
|
|
{
|
|
|
|
char regexError[1024];
|
|
|
|
int regexCode;
|
|
|
|
|
|
|
|
if ( !_inConstructor ) regfree ( regex );
|
|
|
|
|
|
|
|
if ( ( regexCode = regcomp(regex,getString(pattern).c_str(),REG_EXTENDED|REG_NOSUB) ) ) {
|
|
|
|
regerror ( regexCode, regex, regexError, 1024 );
|
|
|
|
throw Error ( badRegex, name, regexError );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-11-16 06:49:47 -06:00
|
|
|
void Environment::validate () const
|
2010-03-09 09:20:13 -06:00
|
|
|
{
|
|
|
|
switch ( _SCALE_X ) {
|
|
|
|
case 1: break;
|
|
|
|
case 10: break;
|
|
|
|
case 100: break;
|
|
|
|
default:
|
|
|
|
throw Error ( badSCALE_X , _SCALE_X );
|
|
|
|
}
|
|
|
|
|
|
|
|
bool coherency = false;
|
2010-07-30 11:31:27 -05:00
|
|
|
if ( ( _IN_LO == "vst" ) && ( _IN_PH == "ap" ) ) coherency = true;
|
|
|
|
else if ( ( _IN_LO == "spi" ) && ( _IN_PH == "ap" ) ) coherency = true;
|
|
|
|
else if ( ( _IN_LO == "bench" ) && ( _IN_PH == "ap" ) ) coherency = true;
|
|
|
|
else if ( ( _IN_LO == "def" ) && ( _IN_PH == "def") ) coherency = true;
|
|
|
|
else if ( ( _IN_LO == "aux" ) && ( _IN_PH == "aux") ) coherency = true;
|
|
|
|
else if ( ( _IN_LO == "oa" ) && ( _IN_PH == "oa" ) ) coherency = true;
|
2010-03-09 09:20:13 -06:00
|
|
|
if ( !coherency )
|
|
|
|
throw Error ( badEnvironment, "Input", _IN_LO.c_str(), _IN_PH.c_str() );
|
|
|
|
|
|
|
|
coherency = false;
|
|
|
|
if ( ( _OUT_LO == "vst" ) && ( _OUT_PH == "ap" ) ) coherency = true;
|
|
|
|
else if ( ( _OUT_LO == "spi" ) && ( _OUT_PH == "ap" ) ) coherency = true;
|
|
|
|
else if ( ( _OUT_LO == "vst" ) && ( _OUT_PH == "gds") ) coherency = true;
|
|
|
|
else if ( ( _OUT_LO == "def" ) && ( _OUT_PH == "def") ) coherency = true;
|
|
|
|
else if ( ( _OUT_LO == "aux" ) && ( _OUT_PH == "aux") ) coherency = true;
|
|
|
|
else if ( ( _OUT_LO == "oa" ) && ( _OUT_PH == "oa" ) ) coherency = true;
|
|
|
|
if ( !coherency )
|
|
|
|
throw Error ( badEnvironment, "Output", _OUT_LO.c_str(), _OUT_PH.c_str() );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const char* Environment::getEnv ( const char* variable, const char* defaultValue )
|
|
|
|
{
|
|
|
|
char *value;
|
|
|
|
|
|
|
|
value = getenv ( variable );
|
|
|
|
if ( value == NULL ) return defaultValue;
|
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-11-17 09:40:39 -06:00
|
|
|
void Environment::addSYSTEM_LIBRARY ( const char* value, const char* libName, unsigned int mode )
|
2010-05-13 04:45:20 -05:00
|
|
|
{
|
2015-06-07 04:05:01 -05:00
|
|
|
if ((mode == Prepend) or (mode == Append)) {
|
|
|
|
size_t duplicate = _LIBRARIES.hasLib(libName);
|
|
|
|
if (duplicate != SearchPath::npos) _LIBRARIES.remove( duplicate );
|
|
|
|
|
|
|
|
if (mode == Prepend) _LIBRARIES.prepend(value,libName);
|
|
|
|
if (mode == Append ) _LIBRARIES.append (value,libName);
|
|
|
|
return;
|
|
|
|
}
|
2010-05-13 04:45:20 -05:00
|
|
|
|
2010-11-17 09:40:39 -06:00
|
|
|
string newLibName = libName;
|
2010-05-13 04:45:20 -05:00
|
|
|
for ( size_t i=0 ; i < _LIBRARIES.getSize() ; ++i ) {
|
2010-11-17 09:40:39 -06:00
|
|
|
if ( newLibName == _LIBRARIES[i].getName() ) {
|
|
|
|
_LIBRARIES.replace ( value, newLibName, i );
|
2010-05-13 04:45:20 -05:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
2010-11-17 09:40:39 -06:00
|
|
|
_LIBRARIES.append (value,libName);
|
2010-05-13 04:45:20 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-09-16 03:28:24 -05:00
|
|
|
string Environment::getLIBRARYPath ( size_t i )
|
|
|
|
{
|
|
|
|
if (i >= _LIBRARIES.getSize()) return "";
|
|
|
|
return _LIBRARIES[i].getPath();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-11-17 09:40:39 -06:00
|
|
|
string Environment::_getString () const
|
|
|
|
{ return "<Environment>"; }
|
|
|
|
|
|
|
|
|
|
|
|
Record *Environment::_getRecord () const
|
2010-05-13 04:45:20 -05:00
|
|
|
{
|
2010-11-17 09:40:39 -06:00
|
|
|
Record* record = new Record ( "<Environment>" );
|
|
|
|
record->add ( getSlot ( "_CORIOLIS_TOP" , &_CORIOLIS_TOP ) );
|
|
|
|
record->add ( getSlot ( "_displayStyle" , &_displayStyle ) );
|
|
|
|
record->add ( getSlot ( "_SCALE_X" , &_SCALE_X ) );
|
|
|
|
record->add ( getSlot ( "_IN_LO" , &_IN_LO ) );
|
|
|
|
record->add ( getSlot ( "_IN_PH" , &_IN_PH ) );
|
2012-11-16 06:49:47 -06:00
|
|
|
record->add ( getSlot ( "_OUT_LO" , &_OUT_LO ) );
|
|
|
|
record->add ( getSlot ( "_OUT_PH" , &_OUT_PH ) );
|
2010-11-17 09:40:39 -06:00
|
|
|
record->add ( getSlot ( "_POWER" , &_POWER ) );
|
|
|
|
record->add ( getSlot ( "_GROUND" , &_GROUND ) );
|
|
|
|
record->add ( getSlot ( "_CLOCK" , &_CLOCK ) );
|
2010-12-04 09:23:51 -06:00
|
|
|
record->add ( getSlot ( "_BLOCKAGE" , &_BLOCKAGE ) );
|
2010-11-17 09:40:39 -06:00
|
|
|
record->add ( getSlot ( "_pad" , &_pad ) );
|
|
|
|
record->add ( getSlot ( "_LIBRARIES" , &_LIBRARIES ) );
|
|
|
|
return record;
|
2010-05-13 04:45:20 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-01-20 17:25:39 -06:00
|
|
|
void Environment::toJson ( JsonWriter* w ) const
|
|
|
|
{
|
|
|
|
w->startObject();
|
|
|
|
jsonWrite( w, "@typename" , _getTypeName() );
|
|
|
|
jsonWrite( w, "_CORIOLIS_TOP", _CORIOLIS_TOP );
|
|
|
|
jsonWrite( w, "_displayStyle", _displayStyle );
|
|
|
|
jsonWrite( w, "_SCALE_X" , _SCALE_X );
|
|
|
|
jsonWrite( w, "_IN_LO" , _IN_LO );
|
|
|
|
jsonWrite( w, "_IN_PH" , _IN_PH );
|
|
|
|
jsonWrite( w, "_OUT_LO" , _OUT_LO );
|
|
|
|
jsonWrite( w, "_OUT_PH" , _OUT_PH );
|
|
|
|
jsonWrite( w, "_POWER" , _POWER );
|
|
|
|
jsonWrite( w, "_GROUND" , _GROUND );
|
|
|
|
jsonWrite( w, "_CLOCK" , _CLOCK );
|
|
|
|
jsonWrite( w, "_BLOCKAGE" , _BLOCKAGE );
|
|
|
|
jsonWrite( w, "_pad" , _pad );
|
|
|
|
jsonWrite( w, "_CATALOG" , _CATALOG );
|
|
|
|
w->endObject();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "JsonEnvironment".
|
|
|
|
|
|
|
|
Initializer<JsonEnvironment> jsonEnvironmentInit ( 0 );
|
|
|
|
|
|
|
|
|
|
|
|
void JsonEnvironment::initialize ()
|
|
|
|
{ JsonTypes::registerType( new JsonEnvironment (JsonWriter::RegisterMode) ); }
|
|
|
|
|
|
|
|
|
|
|
|
JsonEnvironment::JsonEnvironment ( unsigned long flags )
|
|
|
|
: JsonObject(flags)
|
|
|
|
{
|
|
|
|
add( "_CORIOLIS_TOP", typeid(string) );
|
|
|
|
add( "_displayStyle", typeid(string) );
|
|
|
|
add( "_SCALE_X" , typeid(int64_t) );
|
|
|
|
add( "_IN_LO" , typeid(string) );
|
|
|
|
add( "_IN_PH" , typeid(string) );
|
|
|
|
add( "_OUT_LO" , typeid(string) );
|
|
|
|
add( "_OUT_PH" , typeid(string) );
|
|
|
|
add( "_POWER" , typeid(string) );
|
|
|
|
add( "_GROUND" , typeid(string) );
|
|
|
|
add( "_BLOCKAGE" , typeid(string) );
|
|
|
|
add( "_pad" , typeid(string) );
|
|
|
|
add( "_CATALOG" , typeid(string) );
|
|
|
|
add( "_CLOCK" , typeid(string) );
|
|
|
|
}
|
|
|
|
|
|
|
|
string JsonEnvironment::getTypeName () const
|
|
|
|
{ return "Environment"; }
|
|
|
|
|
|
|
|
|
|
|
|
JsonEnvironment* JsonEnvironment::clone ( unsigned long flags ) const
|
|
|
|
{ return new JsonEnvironment ( flags ); }
|
|
|
|
|
|
|
|
|
|
|
|
void JsonEnvironment::toData ( JsonStack& stack )
|
|
|
|
{
|
|
|
|
check( stack, "JsonEnvironment::toData" );
|
|
|
|
|
|
|
|
Environment* environement = AllianceFramework::get()->getEnvironment();
|
|
|
|
environement->setDisplayStyle( get<string> (stack,"_displayStyle").c_str() );
|
|
|
|
environement->setSCALE_X ( get<int64_t>(stack,"_SCALE_X" ) );
|
|
|
|
environement->setIN_LO ( get<string> (stack,"_IN_LO" ).c_str() );
|
|
|
|
environement->setIN_PH ( get<string> (stack,"_IN_PH" ).c_str() );
|
|
|
|
environement->setOUT_LO ( get<string> (stack,"_OUT_LO" ).c_str() );
|
|
|
|
environement->setOUT_PH ( get<string> (stack,"_OUT_PH" ).c_str() );
|
|
|
|
environement->setPOWER ( get<string> (stack,"_POWER" ).c_str() );
|
|
|
|
environement->setGROUND ( get<string> (stack,"_GROUND" ).c_str() );
|
|
|
|
environement->setCLOCK ( get<string> (stack,"_CLOCK" ).c_str() );
|
|
|
|
environement->setBLOCKAGE ( get<string> (stack,"_BLOCKAGE" ).c_str() );
|
|
|
|
environement->setPad ( get<string> (stack,"_pad" ).c_str() );
|
|
|
|
environement->setCATALOG ( get<string> (stack,"_CATALOG" ).c_str() );
|
|
|
|
|
|
|
|
update( stack, environement );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-03-09 09:20:13 -06:00
|
|
|
} // End of CRL namespace.
|