2010-03-09 09:20:13 -06:00
|
|
|
// -*- C++ -*-
|
|
|
|
//
|
|
|
|
// This file is part of the Coriolis Software.
|
Migration towards Python3, first stage: still based on C-Macros.
* New: Python/C++ API level:
* Write a new C++/template wrapper to get rid of boost::python
* The int & long Python type are now merged. So a C/C++ level,
it became "PyLong_X" (remove "PyInt_X") and at Python code
level, it became "int" (remove "long").
* Change: VLSISAPD finally defunct.
* Configuration is now integrated as a Hurricane component,
makes use of the new C++/template wrapper.
* vlsisapd is now defunct. Keep it in the source for now as
some remaining non essential code may have to be ported in
the future.
* Note: Python code (copy of the migration howto):
* New print function syntax print().
* Changed "dict.has_key(k)" for "k" in dict.
* Changed "except Exception, e" for "except Exception as e".
* The division "/" is now the floating point division, even if
both operand are integers. So 3/2 now gives 1.5 and no longer 1.
The integer division is now "//" : 1 = 3//2. So have to carefully
review the code to update. Most of the time we want to use "//".
We must never change to float for long that, in fact, represents
DbU (exposed as Python int type).
* execfile() must be replaced by exec(open("file").read()).
* iter().__next__() becomes iter(x).__next__().
* __getslice__() has been removed, integrated to __getitem__().
* The formating used for str(type(o)) has changed, so In Stratus,
have to update them ("<class 'MyClass'>" instead of "MyClass").
* the "types" module no longer supply values for default types
like str (types.StringType) or list (types.StringType).
Must use "isinstance()" where they were occuring.
* Remove the 'L' to indicate "long integer" (like "12L"), now
all Python integer are long.
* Change in bootstrap:
* Ported Coriolis builder (ccb) to Python3.
* Ported Coriolis socInstaller.py to Python3.
* Note: In PyQt4+Python3, QVariant no longer exists. Use None or
directly convert using the python syntax: bool(x), int(x), ...
By default, it is a string (str).
* Note: PyQt4 bindings & Python3 under SL7.
* In order to compile user's must upgrade to my own rebuild of
PyQt 4 & 5 bindings 4.19.21-1.el7.soc.
* Bug: In cumulus/plugins.block.htree.HTree.splitNet(), set the root
buffer of the H-Tree to the original signal (mainly: top clock).
Strangely, it was only done when working in full chip mode.
2021-09-19 12:41:24 -05:00
|
|
|
// Copyright (c) Sorbonne Université 2008-2021, All Rights Reserved
|
2010-03-09 09:20:13 -06:00
|
|
|
//
|
2011-02-02 05:17:46 -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 |
|
Migration towards Python3, first stage: still based on C-Macros.
* New: Python/C++ API level:
* Write a new C++/template wrapper to get rid of boost::python
* The int & long Python type are now merged. So a C/C++ level,
it became "PyLong_X" (remove "PyInt_X") and at Python code
level, it became "int" (remove "long").
* Change: VLSISAPD finally defunct.
* Configuration is now integrated as a Hurricane component,
makes use of the new C++/template wrapper.
* vlsisapd is now defunct. Keep it in the source for now as
some remaining non essential code may have to be ported in
the future.
* Note: Python code (copy of the migration howto):
* New print function syntax print().
* Changed "dict.has_key(k)" for "k" in dict.
* Changed "except Exception, e" for "except Exception as e".
* The division "/" is now the floating point division, even if
both operand are integers. So 3/2 now gives 1.5 and no longer 1.
The integer division is now "//" : 1 = 3//2. So have to carefully
review the code to update. Most of the time we want to use "//".
We must never change to float for long that, in fact, represents
DbU (exposed as Python int type).
* execfile() must be replaced by exec(open("file").read()).
* iter().__next__() becomes iter(x).__next__().
* __getslice__() has been removed, integrated to __getitem__().
* The formating used for str(type(o)) has changed, so In Stratus,
have to update them ("<class 'MyClass'>" instead of "MyClass").
* the "types" module no longer supply values for default types
like str (types.StringType) or list (types.StringType).
Must use "isinstance()" where they were occuring.
* Remove the 'L' to indicate "long integer" (like "12L"), now
all Python integer are long.
* Change in bootstrap:
* Ported Coriolis builder (ccb) to Python3.
* Ported Coriolis socInstaller.py to Python3.
* Note: In PyQt4+Python3, QVariant no longer exists. Use None or
directly convert using the python syntax: bool(x), int(x), ...
By default, it is a string (str).
* Note: PyQt4 bindings & Python3 under SL7.
* In order to compile user's must upgrade to my own rebuild of
PyQt 4 & 5 bindings 4.19.21-1.el7.soc.
* Bug: In cumulus/plugins.block.htree.HTree.splitNet(), set the root
buffer of the H-Tree to the original signal (mainly: top clock).
Strangely, it was only done when working in full chip mode.
2021-09-19 12:41:24 -05:00
|
|
|
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
2010-03-09 09:20:13 -06:00
|
|
|
// | =============================================================== |
|
2012-11-16 06:49:47 -06:00
|
|
|
// | C++ Module : "./Utilities.cpp" |
|
2011-02-02 05:17:46 -06:00
|
|
|
// +-----------------------------------------------------------------+
|
2010-03-09 09:20:13 -06:00
|
|
|
|
|
|
|
|
2012-11-16 06:49:47 -06:00
|
|
|
#include <Python.h>
|
2010-03-09 09:20:13 -06:00
|
|
|
#include <csignal>
|
|
|
|
#include <cstdlib>
|
|
|
|
#include <cstring>
|
2010-04-28 10:41:35 -05:00
|
|
|
#include <iomanip>
|
2010-03-09 09:20:13 -06:00
|
|
|
|
2010-06-22 08:55:37 -05:00
|
|
|
#include <boost/program_options.hpp>
|
|
|
|
namespace boptions = boost::program_options;
|
|
|
|
|
Migration towards Python3, first stage: still based on C-Macros.
* New: Python/C++ API level:
* Write a new C++/template wrapper to get rid of boost::python
* The int & long Python type are now merged. So a C/C++ level,
it became "PyLong_X" (remove "PyInt_X") and at Python code
level, it became "int" (remove "long").
* Change: VLSISAPD finally defunct.
* Configuration is now integrated as a Hurricane component,
makes use of the new C++/template wrapper.
* vlsisapd is now defunct. Keep it in the source for now as
some remaining non essential code may have to be ported in
the future.
* Note: Python code (copy of the migration howto):
* New print function syntax print().
* Changed "dict.has_key(k)" for "k" in dict.
* Changed "except Exception, e" for "except Exception as e".
* The division "/" is now the floating point division, even if
both operand are integers. So 3/2 now gives 1.5 and no longer 1.
The integer division is now "//" : 1 = 3//2. So have to carefully
review the code to update. Most of the time we want to use "//".
We must never change to float for long that, in fact, represents
DbU (exposed as Python int type).
* execfile() must be replaced by exec(open("file").read()).
* iter().__next__() becomes iter(x).__next__().
* __getslice__() has been removed, integrated to __getitem__().
* The formating used for str(type(o)) has changed, so In Stratus,
have to update them ("<class 'MyClass'>" instead of "MyClass").
* the "types" module no longer supply values for default types
like str (types.StringType) or list (types.StringType).
Must use "isinstance()" where they were occuring.
* Remove the 'L' to indicate "long integer" (like "12L"), now
all Python integer are long.
* Change in bootstrap:
* Ported Coriolis builder (ccb) to Python3.
* Ported Coriolis socInstaller.py to Python3.
* Note: In PyQt4+Python3, QVariant no longer exists. Use None or
directly convert using the python syntax: bool(x), int(x), ...
By default, it is a string (str).
* Note: PyQt4 bindings & Python3 under SL7.
* In order to compile user's must upgrade to my own rebuild of
PyQt 4 & 5 bindings 4.19.21-1.el7.soc.
* Bug: In cumulus/plugins.block.htree.HTree.splitNet(), set the root
buffer of the H-Tree to the original signal (mainly: top clock).
Strangely, it was only done when working in full chip mode.
2021-09-19 12:41:24 -05:00
|
|
|
#include "hurricane/utilities/Path.h"
|
|
|
|
#include "hurricane/configuration/Configuration.h"
|
* ./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
|
|
|
#include "hurricane/Backtrace.h"
|
2010-07-01 06:48:16 -05:00
|
|
|
#include "hurricane/Warning.h"
|
2010-07-15 06:46:40 -05:00
|
|
|
#include "hurricane/viewer/Script.h"
|
2010-03-09 09:20:13 -06:00
|
|
|
#include "crlcore/Utilities.h"
|
2012-11-16 06:49:47 -06:00
|
|
|
#include "crlcore/AllianceFramework.h"
|
2010-03-09 09:20:13 -06:00
|
|
|
|
|
|
|
|
2010-06-22 08:55:37 -05:00
|
|
|
namespace {
|
|
|
|
|
|
|
|
using namespace Hurricane;
|
|
|
|
using namespace CRL;
|
|
|
|
|
|
|
|
|
|
|
|
void verboseLevel1Changed ( Cfg::Parameter* p )
|
|
|
|
{
|
2013-12-03 19:47:34 -06:00
|
|
|
if (p->asBool()) mstream::enable ( mstream::Verbose0|mstream::Verbose1 );
|
|
|
|
else mstream::disable( mstream::Verbose1|mstream::Verbose2 );
|
2010-06-22 08:55:37 -05:00
|
|
|
|
2013-12-03 19:47:34 -06:00
|
|
|
//cerr << "Verbose Level 1: " << boolalpha << p->asBool() << " mask:" << mstream::getActiveMask() << endl;
|
2010-06-22 08:55:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void verboseLevel2Changed ( Cfg::Parameter* p )
|
|
|
|
{
|
2013-12-03 19:47:34 -06:00
|
|
|
if (p->asBool()) mstream::enable ( mstream::Verbose0|mstream::Verbose1|mstream::Verbose2 );
|
|
|
|
else mstream::disable( mstream::Verbose2 );
|
|
|
|
|
|
|
|
//cerr << "Verbose Level 2: " << boolalpha << p->asBool() << " mask:" << mstream::getActiveMask() << endl;
|
2010-06-22 08:55:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void infoChanged ( Cfg::Parameter* p )
|
|
|
|
{
|
2013-12-03 19:47:34 -06:00
|
|
|
if (p->asBool()) mstream::enable ( mstream::Info );
|
|
|
|
else mstream::disable( mstream::Info );
|
2010-06-22 08:55:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 19:47:34 -06:00
|
|
|
void paranoidChanged ( Cfg::Parameter* p )
|
2012-12-03 02:27:41 -06:00
|
|
|
{
|
2013-12-03 19:47:34 -06:00
|
|
|
if (p->asBool()) mstream::enable ( mstream::Paranoid );
|
|
|
|
else mstream::disable( mstream::Paranoid );
|
2012-12-03 02:27:41 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 19:47:34 -06:00
|
|
|
void bugChanged ( Cfg::Parameter* p )
|
2010-06-22 08:55:37 -05:00
|
|
|
{
|
2013-12-03 19:47:34 -06:00
|
|
|
if ( p->asBool() ) mstream::enable ( mstream::Bug );
|
|
|
|
else mstream::disable( mstream::Bug );
|
2010-06-22 08:55:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 19:47:34 -06:00
|
|
|
void catchCoreChanged ( Cfg::Parameter* p )
|
|
|
|
{ System::setCatchCore( p->asBool() ); }
|
|
|
|
|
|
|
|
|
2010-06-22 08:55:37 -05:00
|
|
|
void logModeChanged ( Cfg::Parameter* p )
|
|
|
|
{
|
2013-12-03 19:47:34 -06:00
|
|
|
if (not p->asBool()) tty::enable ();
|
|
|
|
else tty::disable ();
|
2010-06-22 08:55:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-05-17 16:00:06 -05:00
|
|
|
void minTraceLevelChanged ( Cfg::Parameter* p )
|
2010-06-22 08:55:37 -05:00
|
|
|
{
|
2016-05-17 16:00:06 -05:00
|
|
|
//cerr << "minTraceLevelChanged:" << p->asInt() << endl;
|
|
|
|
cdebug.setMinLevel( p->asInt() );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void maxTraceLevelChanged ( Cfg::Parameter* p )
|
|
|
|
{
|
|
|
|
//cerr << "maxTraceLevelChanged:" << p->asInt() << endl;
|
|
|
|
cdebug.setMaxLevel( p->asInt() );
|
2010-06-22 08:55:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-07-18 05:00:38 -05:00
|
|
|
void stratus1MappingNameChanged ( Cfg::Parameter* p )
|
|
|
|
{
|
2013-04-21 10:36:06 -05:00
|
|
|
Utilities::Path stratusMappingName ( p->asString() );
|
|
|
|
if ( not stratusMappingName.absolute() ) {
|
2010-07-18 05:00:38 -05:00
|
|
|
stratusMappingName = System::getPath("etc") / stratusMappingName;
|
|
|
|
}
|
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
|
|
|
setenv ( "STRATUS_MAPPING_NAME", stratusMappingName.toString().c_str(), 1 );
|
2010-07-18 05:00:38 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-06-22 08:55:37 -05:00
|
|
|
std::string environmentMapper ( std::string environmentName )
|
|
|
|
{
|
2010-11-17 09:40:39 -06:00
|
|
|
if ( environmentName == "HOME" ) return "home";
|
|
|
|
else if ( environmentName == "CORIOLIS_TOP" ) return "coriolis_top";
|
2010-07-18 05:00:38 -05:00
|
|
|
else if ( environmentName == "STRATUS_MAPPING_NAME" ) return "stratus_mapping_name";
|
2010-06-22 08:55:37 -05:00
|
|
|
return "";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // End of anonymous namespace.
|
|
|
|
|
|
|
|
|
2010-04-28 10:41:35 -05:00
|
|
|
int tty::_width = 80;
|
2010-03-09 09:20:13 -06:00
|
|
|
bool tty::_enabled = true;
|
ExtensionCap support and source/target terminal flags in Katabatic & Kite.
Placement management:
* Change: In <metis>, always disable the hMetis support regardless of
it being detected or not as the placer is still unable manage the
final bin contents.
Routing gauge management:
* Bug: In CRL Core, <vsclib/alliance.conf>, set the correct pitches and
size for the routing layers and the cell gauge.
* Change: In Katabatic & Kite, extract the correct extension cap for each
routing layer from the layers characteristics (cache then in
Katabatic::Configuration).
* Change: In Katabatic, <AutoSegment>, create segment with the wire width
defined in the gauge. For AutoSegment created on already existing
Segment from the global routing, adjust the width.
* Change: In Katabatic, <AutoSegment>, more accurate information about how
a segment is connected to terminal via source and/or target.
The flag SegStrongTerminal is splitted into SegSourceTerminal and
SegSourceTarget (but still used as a mask). So now we can know by
which end an AutoSegment is connected to a terminal.
* Change: In Katabatic, ::doRp_Access(), create constraint freeing segments
not only when HSmall but also when VSmall (more critical for <vsclib>).
Otherwise we may see AutoSegments with incompatible source/target
constraints.
* Change: In Kite, BuildPowerRails, do not create blockage on PinOnly
layers *but* still create power rails planes. This is a temporary
workaround for <vsclib> where the METAL1 blockages overlaps the
terminals (it was fine for Nero, but they shouldn't for Kite).
* Change: In Kite, <RoutingEvent>, if a TrackSegment is overconstrained,
directly bybass it's slackening state to DataNegociate::Slacken.
Also rename the flag "_canHandleConstraints" to "_overConstrained",
seems clearer to me.
Miscellaneous:
* Change: In CRL Core, <Utilities>, add a "pass-though" capability on the
mstream to temporarily make them print everything.
2014-05-25 08:00:35 -05:00
|
|
|
unsigned int mstream::_activeMask = mstream::PassThrough|mstream::Verbose0;
|
2010-03-09 09:20:13 -06:00
|
|
|
|
2013-12-03 19:47:34 -06:00
|
|
|
mstream cmess0 ( mstream::Verbose0, std::cout );
|
|
|
|
mstream cmess1 ( mstream::Verbose1, std::cout );
|
|
|
|
mstream cmess2 ( mstream::Verbose2, std::cout );
|
|
|
|
mstream cinfo ( mstream::Info , std::cout );
|
|
|
|
mstream cparanoid ( mstream::Paranoid, std::cout );
|
|
|
|
mstream cbug ( mstream::Bug , std::cout );
|
2010-03-09 09:20:13 -06:00
|
|
|
|
|
|
|
|
2010-04-28 10:41:35 -05:00
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "::Dots".
|
|
|
|
|
|
|
|
|
|
|
|
Dots::Dots ( const std::string& left, const std::string& right ) : _left(left), _right(right) { }
|
|
|
|
|
|
|
|
|
|
|
|
Dots Dots::asPercentage ( const std::string& left, float value )
|
|
|
|
{
|
|
|
|
std::ostringstream right;
|
2010-06-13 15:50:18 -05:00
|
|
|
right << std::setprecision(3) << (value*100.0) << "%";
|
2010-04-28 10:41:35 -05:00
|
|
|
return Dots(left,right.str());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-06-08 07:02:31 -05:00
|
|
|
Dots Dots::asBool ( const std::string& left, bool value )
|
|
|
|
{ std::ostringstream right; right << std::boolalpha << value; return Dots(left,right.str()); }
|
|
|
|
|
|
|
|
|
2010-04-28 10:41:35 -05:00
|
|
|
Dots Dots::asUInt ( const std::string& left, unsigned int value )
|
|
|
|
{ std::ostringstream right; right << value; return Dots(left,right.str()); }
|
|
|
|
|
|
|
|
|
2010-06-13 15:50:18 -05:00
|
|
|
Dots Dots::asInt ( const std::string& left, int value )
|
|
|
|
{ std::ostringstream right; right << value; return Dots(left,right.str()); }
|
|
|
|
|
|
|
|
|
2010-04-28 10:41:35 -05:00
|
|
|
Dots Dots::asULong ( const std::string& left, unsigned long value )
|
|
|
|
{ std::ostringstream right; right << value; return Dots(left,right.str()); }
|
|
|
|
|
|
|
|
|
|
|
|
Dots Dots::asSizet ( const std::string& left, size_t value )
|
|
|
|
{ std::ostringstream right; right << value; return Dots(left,right.str()); }
|
|
|
|
|
|
|
|
|
|
|
|
Dots Dots::asDouble ( const std::string& left, double value )
|
|
|
|
{ std::ostringstream right; right << value; return Dots(left,right.str()); }
|
|
|
|
|
|
|
|
|
2010-06-08 07:02:31 -05:00
|
|
|
Dots Dots::asLambda ( const std::string& left, Hurricane::DbU::Unit value )
|
|
|
|
{ std::ostringstream right; right << Hurricane::DbU::getValueString(value); return Dots(left,right.str()); }
|
|
|
|
|
|
|
|
|
2010-06-13 15:50:18 -05:00
|
|
|
Dots Dots::asLambda ( const std::string& left, double value )
|
|
|
|
{ std::ostringstream right; right << Hurricane::DbU::getValueString(value); return Dots(left,right.str()); }
|
|
|
|
|
|
|
|
|
2010-04-28 10:41:35 -05:00
|
|
|
Dots Dots::asIdentifier ( const std::string& left, const std::string& value )
|
|
|
|
{ std::ostringstream right; right << "<" << value << ">"; return Dots(left,right.str()); }
|
|
|
|
|
|
|
|
|
|
|
|
Dots Dots::asString ( const std::string& left, const std::string& value )
|
|
|
|
{ return Dots(left,value); }
|
|
|
|
|
|
|
|
|
|
|
|
std::ostream& operator<< ( std::ostream& out, const Dots& dots )
|
|
|
|
{
|
|
|
|
int count = tty::getWidth() - 2 - dots._left.length() - dots._right.length();
|
|
|
|
out << dots._left << " "; while ( count-- > 0 ) out << "."; out << " " << dots._right;
|
|
|
|
|
|
|
|
return out;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-03-09 09:20:13 -06:00
|
|
|
|
|
|
|
namespace CRL {
|
|
|
|
|
|
|
|
|
|
|
|
using std::cout;
|
|
|
|
using std::cerr;
|
|
|
|
using std::endl;
|
|
|
|
using std::string;
|
|
|
|
using std::ostringstream;
|
|
|
|
|
|
|
|
|
|
|
|
# define SIGTFLT 1
|
|
|
|
|
|
|
|
|
|
|
|
// Error messages.
|
|
|
|
const char* DupSystem = "\n Attempt to re-create Alliance System.";
|
|
|
|
const char* BadAllocProperty = "%s::create():\n Property allocation failed.\n";
|
|
|
|
const char* BadCreate = "%s::create():\n Memory allocation failed.\n";
|
|
|
|
const char* NullDataBase = "%s:\n\n The Hurricane DataBase have not been created yet.\n";
|
|
|
|
const char* NullTechnology = "%s:\n\n The Hurricane DataBase do not contain any technology.\n";
|
|
|
|
const char* NullLibrary = "%s:\n\n NULL Library given as argument.\n";
|
|
|
|
const char* NullCell = "%s:\n\n NULL Cell given as argument.\n";
|
|
|
|
const char* BadFopen = "%s:\n\n Unable to open %s file : \"%s\".\n";
|
|
|
|
const char* BadColorValue = "%s() :\n\n"
|
|
|
|
" Invalid color value for color \"%s\" : \"%s\".\n";
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "CRL::System".
|
|
|
|
|
|
|
|
|
2010-07-01 06:48:16 -05:00
|
|
|
System* System::_singleton = NULL; //System::get();
|
2010-03-09 09:20:13 -06:00
|
|
|
|
2010-06-22 08:55:37 -05:00
|
|
|
|
|
|
|
System::System ()
|
|
|
|
: _catchCore(true)
|
|
|
|
{
|
|
|
|
// Immediate setup to avoid some tiresome looping...
|
|
|
|
_singleton = this;
|
2010-03-09 09:20:13 -06:00
|
|
|
|
|
|
|
// Set the trap function for the SIGINT signal (CTRL-C).
|
|
|
|
//if ( signal(SIGINT,System::TrapSig) == SIG_ERR )
|
|
|
|
// System::TrapSig ( SIGTFLT );
|
|
|
|
|
|
|
|
// Set the trap function for SIGFPE, SIGBUS, SIGABRT and SIGSEGV signals.
|
2010-06-22 08:55:37 -05:00
|
|
|
if ( ( signal(SIGFPE , System::_trapSig) == SIG_ERR )
|
|
|
|
|| ( signal(SIGBUS , System::_trapSig) == SIG_ERR )
|
|
|
|
|| ( signal(SIGABRT, System::_trapSig) == SIG_ERR )
|
|
|
|
|| ( signal(SIGPIPE, System::_trapSig) == SIG_ERR )
|
|
|
|
|| ( signal(SIGSEGV, System::_trapSig) == SIG_ERR ) )
|
|
|
|
System::_trapSig ( SIGTFLT );
|
|
|
|
|
|
|
|
// Environment variables reading.
|
|
|
|
boptions::options_description options ("Environment Variables");
|
|
|
|
options.add_options()
|
2010-11-17 09:40:39 -06:00
|
|
|
( "home" , boptions::value<string>()
|
|
|
|
, "User's home directory." )
|
2010-07-18 05:00:38 -05:00
|
|
|
( "coriolis_top" , boptions::value<string>()->default_value(CORIOLIS_TOP)
|
|
|
|
, "The root directory of the Coriolis installation tree." )
|
|
|
|
( "stratus_mapping_name", boptions::value<string>()
|
|
|
|
, "Stratus virtual cells mapping." );
|
2010-06-22 08:55:37 -05:00
|
|
|
|
|
|
|
boptions::variables_map arguments;
|
|
|
|
boptions::store ( boptions::parse_environment(options,environmentMapper), arguments );
|
|
|
|
boptions::notify ( arguments );
|
|
|
|
|
2012-11-16 06:49:47 -06:00
|
|
|
// Force creation of singleton at this stage.
|
|
|
|
// cerr << "In System singleton creation." << endl;
|
|
|
|
// AllianceFramework::get();
|
|
|
|
// cerr << "AllianceFramework has been allocated." << endl;
|
|
|
|
|
Bug in Python proxy deallocation. Update to latest Coloquinte.
* Bug: In Bootstrap, in coriolisEnv.py, check if devtoolset-2 is already
active before launching it as a sub-shell.
* Bug: In Isobar, In PyHurricane.h, DBoDestroyAttribute() set the proxy
pointer toward the C++ object to NULL. So when the Python object is
deleted no double-deletion occurs on the C++ object.
Add some more trace information in Python link/dealloc.
* Change: In CRL Core, in cyclop, make CMakeLists.txt automatically
choose the right rule for linking the binary wether we use Qt 4 or
Qt 5. Very irksome problem.
* New: In EtesianEngine::addFeed(), do not take into account instances
that are not placed entirely inside the top cell abutment box (was
causing a core dump).
* Bug: In Katabatic, in GCellQueue, correct a mismatch between a GCell
set and the iterators used upon it.
* Bug: In Mauka, in Row & Surface correct a mismatch between a container
and it's iterator.
* New: In Etesian, updated to work with the latest Coloquinte, patch
contributed by G. Gouvine.
Added EtesianEngine::setDefaultAb() to compute an abutment box if
the Cell is completly unplaced.
* New: In cumulus, in ClockTree, now the placer can be configured to be
either Mauka (slow simulated annealing) or Etesian (fast analytic).
New setting 'clockTree.placerEngine' in plugin settings.
2015-02-13 16:38:55 -06:00
|
|
|
// cerr << "std::string typeid name:" << typeid(string).name() << endl;
|
|
|
|
|
* ./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
|
|
|
// 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."
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2019-02-26 13:00:28 -06:00
|
|
|
if ( arguments.count("coriolis_top") ) {
|
|
|
|
_pathes.insert ( make_pair("coriolis_top", arguments["coriolis_top"].as<string>()) );
|
|
|
|
}
|
|
|
|
|
2013-04-21 10:36:06 -05:00
|
|
|
Utilities::Path sysConfDir ( SYS_CONF_DIR );
|
|
|
|
if ( not sysConfDir.absolute() ) {
|
2010-06-22 08:55:37 -05:00
|
|
|
if ( arguments.count("coriolis_top") ) {
|
2010-11-17 09:40:39 -06:00
|
|
|
// const boptions::variable_value& value = arguments["coriolis_top"];
|
2010-07-17 05:22:34 -05:00
|
|
|
// cerr << "value:"
|
|
|
|
// << " empty:" << boolalpha << value.empty()
|
|
|
|
// << " defaulted:" << boolalpha << value.defaulted()
|
|
|
|
// << endl;
|
|
|
|
// const type_info& info = value.value().type();
|
|
|
|
// cerr << "type_info:" << info.name()
|
|
|
|
// << " vs. " << typeid(string).name() << endl;
|
|
|
|
// cerr << "Equal:" << boolalpha << (info == typeid(std::string)) << endl;
|
|
|
|
|
|
|
|
// const type_info& info2 = typeid(string);
|
|
|
|
// cerr << (void*)&(typeid(string))
|
|
|
|
// << " vs. " << (void*)&info2
|
|
|
|
// << " vs. " << (void*)&info
|
|
|
|
// << endl;
|
|
|
|
// cerr << "any_cast<string>:" << boost::any_cast<string>(value.value()) << endl;
|
|
|
|
|
2010-06-22 08:55:37 -05:00
|
|
|
sysConfDir = arguments["coriolis_top"].as<string>() / sysConfDir;
|
|
|
|
} else {
|
|
|
|
cerr << Error("Environment variable CORIOLIS_TOP not set,"
|
|
|
|
" may be unable to read configuration...") << endl;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sysConfDir /= "coriolis2";
|
2012-11-16 06:49:47 -06:00
|
|
|
_pathes.insert ( make_pair("etc" ,sysConfDir ) );
|
|
|
|
_pathes.insert ( make_pair("home",arguments["home"].as<string>()) );
|
|
|
|
|
|
|
|
// Early setting of python pathes to be able to execute configuration scripts.
|
2013-04-21 10:36:06 -05:00
|
|
|
Utilities::Path pythonSitePackages ( PYTHON_SITE_PACKAGES );
|
2012-11-16 06:49:47 -06:00
|
|
|
pythonSitePackages = arguments["coriolis_top"].as<string>() / pythonSitePackages;
|
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
|
|
|
_pathes.insert ( make_pair("pythonSitePackages",pythonSitePackages.toString()) );
|
2018-10-18 11:10:01 -05:00
|
|
|
Utilities::Path crlcoreDir = pythonSitePackages / "crlcore";
|
|
|
|
Utilities::Path stratusDir = pythonSitePackages / "stratus";
|
|
|
|
Utilities::Path cumulusDir = pythonSitePackages / "cumulus";
|
|
|
|
Utilities::Path oroshiDir = pythonSitePackages / "oroshi";
|
|
|
|
Utilities::Path karakazeDir = pythonSitePackages / "karakaze";
|
Migrating the initialisation system to be completely Python-like.
* New: In bootstrap/coriolisEnv.py, add the "etc" directory to the
PYTHONPATH as initialization are now Python modules.
* New: In Hurricane/analogic, first groundwork for the integration of
PIP/MIM/MOM multi-capacitors. Add C++ and Python interface for the
allocation matrix and the list of capacities values.
* Change: In Hurricane::RegularLayer, add a layer parameter to the
constructor so the association between the RegularLayer and it's
BasicLayer can readily be done.
* Change: In Hurricane::Layer, add a new getCut() accessor to get the
cut layer in ViaLayer.
* Change: In Hurricane::DataBase::get(), the Python wrapper should no
longer consider an error if the data-base has not been created yet.
Just return None.
* Bug: In Isobar::PyLayer::getEnclosure() wrapper, if the overall
enclosure is requested, pass the right parameter to the C++ function.
* Change: In AllianceFramework, make public _bindLibraries() and export
it to the Python interface.
* Change: In AllianceFramework::create(), do not longer call bindLibraries().
This now must be done explicitely and afterwards.
* Change: In AllianceFramework::createLibrary() and
Environement::addSYSTEM_LIBRARY(), minor bug corrections that I don't
recall.
* Change: In SearchPath::prepend(), set the selected index to zero and
return it.
* Change: In CRL::System CTOR, add "etc" to the PYTHONPATH as the
configuration files are now organized as Python modules.
* New: In PyCRL, export the CRL::System singleton, it's creation is no
longer triggered by the one of AllianceFramework.
* New: In CRL/etc/, convert most of the configuration files into the
Python module format. For now, keep the old ".conf", but that are no
longer used.
For the real technologies, we cannot keep the directory name as
"180" or "45" as it not allowed by Python syntax, so we create "node180"
or "node45" instead.
Most of the helpers and coriolisInit.py are no longer used now.
To be removed in future commits after being sure that everything
works...
* Bug: In AutoSegment::makeDogleg(AutoContact*), the layer of the contacts
where badly computed when one end of the original segment was attached
to a non-preferred direction segment (mostly on terminal contacts).
Now use the new AutoContact::updateLayer() method.
* Bug: In Dijkstra::load(), limit symetric search area only if the net
is a symmetric one !
* Change: In Katana/python/katanaInit.py, comply with the new initialisation
scheme.
* Change: In Unicorn/cgt.py, comply to the new inititalization scheme.
* Change: In cumulus various Python scripts remove the call to
helpers.staticInitialization() as they are not needed now (we run in
only *one* interpreter, so we correctly share all init).
In plugins/__init__.py, read the new NDA directory variable.
* Bug: In cumulus/plugins/Chip.doCoronafloorplan(), self.railsNb was not
correctly managed when there was no clock.
* Change: In cumulus/plugins/Configuration.coronaContactArray(), compute
the viaPitch from the technology instead of the hard-coded 4.0 lambdas.
In Configuration.loadConfiguration(), read the "ioring.py" from
the new user's settings module.
* Bug: In stratus.dpgen_ADSB2F, gives coordinates translated into DbU to
the XY functions.
In st_model.Save(), use the VstUseConcat flag to get correct VST files.
In st_net.hur_net(), when a net is POWER/GROUND or CLOCK also make it
global.
* Change: In Oroshi/python/WIP_Transistor.py, encapsulate the generator
inside a try/except block to get prettier error (and stop at the first).
2019-10-28 12:09:14 -05:00
|
|
|
Utilities::Path etcDir = _pathes["etc"];
|
2012-11-16 06:49:47 -06:00
|
|
|
|
Migrating the initialisation system to be completely Python-like.
* New: In bootstrap/coriolisEnv.py, add the "etc" directory to the
PYTHONPATH as initialization are now Python modules.
* New: In Hurricane/analogic, first groundwork for the integration of
PIP/MIM/MOM multi-capacitors. Add C++ and Python interface for the
allocation matrix and the list of capacities values.
* Change: In Hurricane::RegularLayer, add a layer parameter to the
constructor so the association between the RegularLayer and it's
BasicLayer can readily be done.
* Change: In Hurricane::Layer, add a new getCut() accessor to get the
cut layer in ViaLayer.
* Change: In Hurricane::DataBase::get(), the Python wrapper should no
longer consider an error if the data-base has not been created yet.
Just return None.
* Bug: In Isobar::PyLayer::getEnclosure() wrapper, if the overall
enclosure is requested, pass the right parameter to the C++ function.
* Change: In AllianceFramework, make public _bindLibraries() and export
it to the Python interface.
* Change: In AllianceFramework::create(), do not longer call bindLibraries().
This now must be done explicitely and afterwards.
* Change: In AllianceFramework::createLibrary() and
Environement::addSYSTEM_LIBRARY(), minor bug corrections that I don't
recall.
* Change: In SearchPath::prepend(), set the selected index to zero and
return it.
* Change: In CRL::System CTOR, add "etc" to the PYTHONPATH as the
configuration files are now organized as Python modules.
* New: In PyCRL, export the CRL::System singleton, it's creation is no
longer triggered by the one of AllianceFramework.
* New: In CRL/etc/, convert most of the configuration files into the
Python module format. For now, keep the old ".conf", but that are no
longer used.
For the real technologies, we cannot keep the directory name as
"180" or "45" as it not allowed by Python syntax, so we create "node180"
or "node45" instead.
Most of the helpers and coriolisInit.py are no longer used now.
To be removed in future commits after being sure that everything
works...
* Bug: In AutoSegment::makeDogleg(AutoContact*), the layer of the contacts
where badly computed when one end of the original segment was attached
to a non-preferred direction segment (mostly on terminal contacts).
Now use the new AutoContact::updateLayer() method.
* Bug: In Dijkstra::load(), limit symetric search area only if the net
is a symmetric one !
* Change: In Katana/python/katanaInit.py, comply with the new initialisation
scheme.
* Change: In Unicorn/cgt.py, comply to the new inititalization scheme.
* Change: In cumulus various Python scripts remove the call to
helpers.staticInitialization() as they are not needed now (we run in
only *one* interpreter, so we correctly share all init).
In plugins/__init__.py, read the new NDA directory variable.
* Bug: In cumulus/plugins/Chip.doCoronafloorplan(), self.railsNb was not
correctly managed when there was no clock.
* Change: In cumulus/plugins/Configuration.coronaContactArray(), compute
the viaPitch from the technology instead of the hard-coded 4.0 lambdas.
In Configuration.loadConfiguration(), read the "ioring.py" from
the new user's settings module.
* Bug: In stratus.dpgen_ADSB2F, gives coordinates translated into DbU to
the XY functions.
In st_model.Save(), use the VstUseConcat flag to get correct VST files.
In st_net.hur_net(), when a net is POWER/GROUND or CLOCK also make it
global.
* Change: In Oroshi/python/WIP_Transistor.py, encapsulate the generator
inside a try/except block to get prettier error (and stop at the first).
2019-10-28 12:09:14 -05:00
|
|
|
Isobar::Script::addPath ( etcDir.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
|
|
|
Isobar::Script::addPath ( sysConfDir.toString() );
|
|
|
|
Isobar::Script::addPath ( pythonSitePackages.toString() );
|
|
|
|
Isobar::Script::addPath ( crlcoreDir.toString() );
|
|
|
|
Isobar::Script::addPath ( stratusDir.toString() );
|
|
|
|
Isobar::Script::addPath ( cumulusDir.toString() );
|
2018-10-01 09:52:17 -05:00
|
|
|
Isobar::Script::addPath ( oroshiDir.toString() );
|
2018-10-18 11:10:01 -05:00
|
|
|
Isobar::Script::addPath ( karakazeDir.toString() );
|
2010-06-22 08:55:37 -05:00
|
|
|
|
2012-11-16 06:49:47 -06:00
|
|
|
// Triggers Configuration singleton creation.
|
|
|
|
Cfg::Configuration::get ();
|
2010-06-22 08:55:37 -05:00
|
|
|
|
2017-12-21 10:29:29 -06:00
|
|
|
Cfg::getParamBool ("misc.catchCore" ,false )->registerCb ( this, catchCoreChanged );
|
|
|
|
Cfg::getParamBool ("misc.verboseLevel1" ,true )->registerCb ( this, verboseLevel1Changed );
|
|
|
|
Cfg::getParamBool ("misc.verboseLevel2" ,true )->registerCb ( this, verboseLevel2Changed );
|
|
|
|
Cfg::getParamBool ("misc.info" ,false )->registerCb ( this, infoChanged );
|
|
|
|
Cfg::getParamBool ("misc.paranoid" ,false )->registerCb ( this, paranoidChanged );
|
|
|
|
Cfg::getParamBool ("misc.bug" ,false )->registerCb ( this, bugChanged );
|
|
|
|
Cfg::getParamBool ("misc.logMode" ,false )->registerCb ( this, logModeChanged );
|
|
|
|
Cfg::getParamInt ("misc.minTraceLevel" ,100000)->registerCb ( this, minTraceLevelChanged );
|
|
|
|
Cfg::getParamInt ("misc.maxTraceLevel" ,0 )->registerCb ( this, maxTraceLevelChanged );
|
|
|
|
Cfg::getParamString("stratus1.mappingName","" )->registerCb ( this, stratus1MappingNameChanged );
|
2010-06-22 08:55:37 -05:00
|
|
|
|
|
|
|
// Immediate update from the configuration.
|
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
|
|
|
//catchCoreChanged ( Cfg::getParamBool("misc.catchCore" ) );
|
|
|
|
//verboseLevel1Changed ( Cfg::getParamBool("misc.verboseLevel1") );
|
|
|
|
//verboseLevel2Changed ( Cfg::getParamBool("misc.verboseLevel2") );
|
|
|
|
//infoChanged ( Cfg::getParamBool("misc.info" ) );
|
|
|
|
//paranoidChanged ( Cfg::getParamBool("misc.paranoid" ) );
|
|
|
|
//bugChanged ( Cfg::getParamBool("misc.bug" ) );
|
|
|
|
//logModeChanged ( Cfg::getParamBool("misc.logMode" ) );
|
|
|
|
//traceLevelChanged ( Cfg::getParamInt ("misc.traceLevel" ) );
|
2010-06-22 08:55:37 -05:00
|
|
|
|
2013-04-21 10:36:06 -05:00
|
|
|
Utilities::Path stratusMappingName;
|
2010-07-18 05:00:38 -05:00
|
|
|
if ( arguments.count("stratus_mapping_name") ) {
|
|
|
|
Cfg::getParamString( "stratus1.mappingName")->setString ( arguments["stratus_mapping_name"].as<string>() );
|
|
|
|
}
|
2010-06-22 08:55:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
System *System::get ()
|
|
|
|
{
|
|
|
|
if ( _singleton == NULL ) {
|
|
|
|
_singleton = new System ();
|
|
|
|
}
|
2010-03-09 09:20:13 -06:00
|
|
|
|
|
|
|
return _singleton;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-06-22 08:55:37 -05:00
|
|
|
void System::_trapSig ( int sig )
|
2010-03-09 09:20:13 -06:00
|
|
|
{
|
2010-06-22 08:55:37 -05:00
|
|
|
cerr << "\n\n[CRL ERROR] System::_trapSig():\n" << endl;
|
In CRL, update real conf. files. Smarter management of pin in LEF parser.
* Change: In CRL Core, etc/, update the configuration files of real
technologies. Mostly for FreePDK 45. This work is also done for
AMS c35b4 (350nm) but in a private (SoC) git repository.
Added a new parameter 'lefImport.minTerminalwidth' for the
minimum size (width) of a metal1 terminal in standard cells.
Corrected bug of the minimum trace level which must be
initialized to a great value and *not* zero;
* Change: In CRL Core, BlifParser, detect when there is no tie low
or tie high defined, issue an error (connexion left open) but
continue.
* New: In CRL::RoutingLayerGauge, new overlad of getTrackPosition()
with the parameter set of getTrackIndex(). Used to know if a
terminal is on-grid or not.
* New: In CRL::LefImport, smarter management of metal1 pins. Adds a
_pinPostProcess() function to select the external components
among the various shapes. If the gauge is VH, all the pin rectangles
are translateds into vertical segments (even if the metal1 gauge
says the tracks are horizontals).
The _pinPostProcess() function adds as external components of
a net, only the segments of a sufficent width as given in
'lefImport.minTerminalWidth' and that are on-grid.
2018-01-06 09:18:33 -06:00
|
|
|
cerr << "Program stack:\n" << Backtrace(true).textWhere() << endl;
|
2010-03-09 09:20:13 -06:00
|
|
|
|
|
|
|
switch ( sig ) {
|
|
|
|
case SIGINT:
|
|
|
|
// User interrupt with CTRL-C.
|
|
|
|
//emergency ();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SIGTERM:
|
|
|
|
case SIGFPE:
|
|
|
|
case SIGBUS:
|
|
|
|
case SIGSEGV:
|
|
|
|
case SIGABRT:
|
|
|
|
case SIGPIPE:
|
|
|
|
//emergency ();
|
|
|
|
|
|
|
|
// Ouch!! This may result from a program bug.
|
|
|
|
cerr << " An program internal bug have occur ";
|
|
|
|
|
|
|
|
if (sig == SIGFPE ) cerr << "(SIGFPE).";
|
|
|
|
if (sig == SIGBUS ) cerr << "(SIGBUS).";
|
|
|
|
if (sig == SIGSEGV) cerr << "(SIGSEGV).";
|
|
|
|
if (sig == SIGPIPE) cerr << "(SIGPIPE).";
|
|
|
|
|
2010-06-01 16:36:12 -05:00
|
|
|
cerr << "\n Please e-mail to <alliance-users@asim.lip6.fr>.\n"
|
2010-03-09 09:20:13 -06:00
|
|
|
<< "\n program terminated ";
|
|
|
|
|
2010-06-22 08:55:37 -05:00
|
|
|
if ( getCatchCore() ) {
|
2010-03-09 09:20:13 -06:00
|
|
|
cerr << "(core not dumped).\n";
|
|
|
|
exit ( 1 );
|
|
|
|
} else {
|
|
|
|
cerr << "(core will be dumped).\n";
|
|
|
|
if ( ( signal(SIGFPE , SIG_DFL) == SIG_ERR )
|
|
|
|
|| ( signal(SIGBUS , SIG_DFL) == SIG_ERR )
|
|
|
|
|| ( signal(SIGABRT, SIG_DFL) == SIG_ERR )
|
|
|
|
|| ( signal(SIGSEGV, SIG_DFL) == SIG_ERR )
|
|
|
|
|| ( signal(SIGPIPE, SIG_DFL) == SIG_ERR ) )
|
|
|
|
exit ( 1 );
|
|
|
|
else {
|
|
|
|
kill ( getpid(), /*sig*/ SIGSEGV );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
/* Unexpected signal. */
|
|
|
|
cerr << "\n Unexpected signal \'" << sig << "\' in trap function.\n";
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
exit ( 1 );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-04-21 10:36:06 -05:00
|
|
|
const Utilities::Path& System::_getPath ( const string& key )
|
2010-06-22 08:55:37 -05:00
|
|
|
{
|
2013-04-21 10:36:06 -05:00
|
|
|
static Utilities::Path nullPath ("no_path");
|
2010-06-22 08:55:37 -05:00
|
|
|
|
2013-04-21 10:36:06 -05:00
|
|
|
map<const string,Utilities::Path>::const_iterator ipath = _pathes.find( key );
|
2010-06-22 08:55:37 -05:00
|
|
|
if ( ipath == _pathes.end() ) return nullPath;
|
|
|
|
|
|
|
|
return (*ipath).second;
|
|
|
|
}
|
2010-03-09 09:20:13 -06:00
|
|
|
|
|
|
|
|
2012-11-16 06:49:47 -06:00
|
|
|
void System::_runPythonInit ()
|
|
|
|
{
|
Migrating the initialisation system to be completely Python-like.
* New: In bootstrap/coriolisEnv.py, add the "etc" directory to the
PYTHONPATH as initialization are now Python modules.
* New: In Hurricane/analogic, first groundwork for the integration of
PIP/MIM/MOM multi-capacitors. Add C++ and Python interface for the
allocation matrix and the list of capacities values.
* Change: In Hurricane::RegularLayer, add a layer parameter to the
constructor so the association between the RegularLayer and it's
BasicLayer can readily be done.
* Change: In Hurricane::Layer, add a new getCut() accessor to get the
cut layer in ViaLayer.
* Change: In Hurricane::DataBase::get(), the Python wrapper should no
longer consider an error if the data-base has not been created yet.
Just return None.
* Bug: In Isobar::PyLayer::getEnclosure() wrapper, if the overall
enclosure is requested, pass the right parameter to the C++ function.
* Change: In AllianceFramework, make public _bindLibraries() and export
it to the Python interface.
* Change: In AllianceFramework::create(), do not longer call bindLibraries().
This now must be done explicitely and afterwards.
* Change: In AllianceFramework::createLibrary() and
Environement::addSYSTEM_LIBRARY(), minor bug corrections that I don't
recall.
* Change: In SearchPath::prepend(), set the selected index to zero and
return it.
* Change: In CRL::System CTOR, add "etc" to the PYTHONPATH as the
configuration files are now organized as Python modules.
* New: In PyCRL, export the CRL::System singleton, it's creation is no
longer triggered by the one of AllianceFramework.
* New: In CRL/etc/, convert most of the configuration files into the
Python module format. For now, keep the old ".conf", but that are no
longer used.
For the real technologies, we cannot keep the directory name as
"180" or "45" as it not allowed by Python syntax, so we create "node180"
or "node45" instead.
Most of the helpers and coriolisInit.py are no longer used now.
To be removed in future commits after being sure that everything
works...
* Bug: In AutoSegment::makeDogleg(AutoContact*), the layer of the contacts
where badly computed when one end of the original segment was attached
to a non-preferred direction segment (mostly on terminal contacts).
Now use the new AutoContact::updateLayer() method.
* Bug: In Dijkstra::load(), limit symetric search area only if the net
is a symmetric one !
* Change: In Katana/python/katanaInit.py, comply with the new initialisation
scheme.
* Change: In Unicorn/cgt.py, comply to the new inititalization scheme.
* Change: In cumulus various Python scripts remove the call to
helpers.staticInitialization() as they are not needed now (we run in
only *one* interpreter, so we correctly share all init).
In plugins/__init__.py, read the new NDA directory variable.
* Bug: In cumulus/plugins/Chip.doCoronafloorplan(), self.railsNb was not
correctly managed when there was no clock.
* Change: In cumulus/plugins/Configuration.coronaContactArray(), compute
the viaPitch from the technology instead of the hard-coded 4.0 lambdas.
In Configuration.loadConfiguration(), read the "ioring.py" from
the new user's settings module.
* Bug: In stratus.dpgen_ADSB2F, gives coordinates translated into DbU to
the XY functions.
In st_model.Save(), use the VstUseConcat flag to get correct VST files.
In st_net.hur_net(), when a net is POWER/GROUND or CLOCK also make it
global.
* Change: In Oroshi/python/WIP_Transistor.py, encapsulate the generator
inside a try/except block to get prettier error (and stop at the first).
2019-10-28 12:09:14 -05:00
|
|
|
Utilities::Path sysConfDir = getPath("etc");
|
|
|
|
Utilities::Path pythonSitePackages = getPath("pythonSitePackages");
|
2012-11-16 06:49:47 -06:00
|
|
|
|
2015-06-10 08:49:58 -05:00
|
|
|
//bool systemConfFound = false;
|
2013-04-21 10:36:06 -05:00
|
|
|
Utilities::Path systemConfFile = pythonSitePackages / "crlcore" / "coriolisInit.py";
|
|
|
|
if ( systemConfFile.exists() ) {
|
2015-06-10 08:49:58 -05:00
|
|
|
//systemConfFound = true;
|
2012-12-03 02:27:41 -06:00
|
|
|
//cout << " o Reading python dot configuration:" << endl;
|
|
|
|
//cout << " - <" << systemConfFile.string() << ">." << endl;
|
2012-11-16 06:49:47 -06:00
|
|
|
|
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* systemScript = Isobar::Script::create(systemConfFile.stem().toString());
|
2012-11-16 06:49:47 -06:00
|
|
|
systemScript->runFunction("coriolisConfigure",NULL,Isobar::Script::NoScriptArgs);
|
|
|
|
systemScript->destroy();
|
|
|
|
} else {
|
|
|
|
cerr << Warning("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;
|
2012-11-16 06:49:47 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
// Delayed printing, as we known only now whether VerboseLevel1 is requested.
|
Python Script launcher extended to accomodate Chams.
* New: In VLSISAPD, in Configuration, add a new priority level UserFile
to distinguish between the system configuration files and the user's
configuration files (which take precedence).
* New: In Hurricane, in Script (Python), improve the API to be able
to support Chams (and remove the duplicate capability from it).
Add separate functions to perform the initialize/run(s)/finalize
cycle step by step.
* Change: In CRL Core, rename real technology <hcmos9> to <hcmos9gp>,
it's offcial name from CMP/ST. This is the 130nm.
Move the reading of the symbolic & real technologies names from
coriolisInit.py to helpers.__init__.py, to be shared with
chamsInit.py.
To avoid a clash of names inside of helpers, the two variables
of techno.py are renamed "symbolicTechnology" and "realTechnology".
Move python init system from crlcore/src/crlcore to crlcore/python.
* New: In CRL Core, In Utilities, add site-packages/pharos to the
PYTHONPATH.
* Change: In Kite, move python init system from kite/src/init to
kite/python.
2015-03-17 10:31:24 -05:00
|
|
|
//if ( cmess1.enabled() ) {
|
|
|
|
// cmess1 << " o Reading Configuration. " << endl;
|
|
|
|
// if (systemConfFound) cmess1 << " - <" << systemConfFile.string() << ">." << endl;
|
|
|
|
// if (homeConfFound) cmess1 << " - <" << homeConfFile.string() << ">." << endl;
|
|
|
|
// if (dotConfFound) cmess1 << " - <" << dotConfFile.string() << ">." << endl;
|
|
|
|
//}
|
2012-11-16 06:49:47 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-03-09 09:20:13 -06:00
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "CRL::IoFile".
|
|
|
|
|
|
|
|
|
|
|
|
bool IoFile::open ( const string& mode )
|
|
|
|
{
|
|
|
|
if ( isOpen() )
|
|
|
|
throw Error ( "IoFile::Open():\n Attempt to reopen file %s\n", _path.c_str() );
|
|
|
|
|
|
|
|
_mode = mode;
|
|
|
|
_file = fopen ( _path.c_str(), mode.c_str() );
|
|
|
|
_lineNumber = 0;
|
|
|
|
_eof = false;
|
|
|
|
|
|
|
|
return _file;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void IoFile::close ()
|
|
|
|
{
|
|
|
|
if ( isOpen() ) fclose ( _file );
|
|
|
|
_file = NULL;
|
|
|
|
_lineNumber = 0;
|
|
|
|
_eof = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
char* IoFile::readLine ( char* buffer, size_t length )
|
|
|
|
{
|
|
|
|
assert ( buffer != NULL );
|
|
|
|
|
|
|
|
if ( eof() ) {
|
|
|
|
buffer[0] = '\0';
|
|
|
|
} else {
|
|
|
|
char* result = fgets ( buffer, length-1, _file );
|
|
|
|
if ( !result || feof(_file) ) {
|
|
|
|
_eof = true;
|
|
|
|
buffer[0] = '\0';
|
|
|
|
} else {
|
|
|
|
_lineNumber++;
|
|
|
|
size_t readLength = strlen ( buffer );
|
|
|
|
if ( buffer[readLength-1] == '\n' )
|
|
|
|
buffer[readLength-1] = '\0';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return buffer;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string IoFile::_getString () const
|
|
|
|
{
|
|
|
|
ostringstream s;
|
|
|
|
|
|
|
|
s << "<IoFile " << _path << ">";
|
|
|
|
|
|
|
|
return s.str();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Record *IoFile::_getRecord () const
|
|
|
|
{
|
|
|
|
Record* record = new Record ( "<IoFile>" );
|
|
|
|
record->add ( getSlot ( "_path", &_path ) );
|
|
|
|
return record;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // End of CRL namespace.
|
|
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "mstream".
|
|
|
|
|
|
|
|
|
2010-06-22 08:55:37 -05:00
|
|
|
void mstream::enable ( unsigned int mask ) { _activeMask |= mask; }
|
|
|
|
void mstream::disable ( unsigned int mask ) { _activeMask &= ~mask; }
|