* All Tools:

- New: Added FreeBSD/Ubuntu patches from Otacilio De Araujo
       (<otaciliodearaujo@gmail.com>).

  * ./crlcore:
    - New: In Utilities, cbug stream to separate all the scary messages
        from Kite/Katabatic and maybe others.
    - New: In stratus1.conf, adds default settings previously in st_config.
    - New: Moves Python configuration helpers from under /etc/coriolis2
        into PYTHON_SITE_PACKAGES/crlcore. Adapt Utilities so coriolisInit.py
        is now searched in that directory. This way only true configuration
        files remains under /etc/coriolis2
    - Change: In helpers/__init__.py, do not try to guess the sysConfDir
        when not run through coriolisInit.py. This is done by exploring the
        call stack with traceback.
    - Change: In ApDriver, when a physical view is driven, update the flag
        in the catalog state telling that this view is present. This is far
        from satisfactory as this flag should be set as soon as any physical
        component is created.
This commit is contained in:
Jean-Paul Chaput 2012-12-03 08:27:41 +00:00
parent 1334caad6d
commit 2012f14acf
35 changed files with 426 additions and 315 deletions

View File

@ -29,6 +29,8 @@
find_package(OPENACCESS)
find_package(VLSISAPD REQUIRED)
find_package(HURRICANE REQUIRED)
find_package(Boost REQUIRED)
find_package(Libexecinfo REQUIRED)
if(BUILD_DOC)
include(UseLATEX)
endif(BUILD_DOC)

View File

@ -4,30 +4,6 @@ html, body, th, td, tr, p, li, h1, h2, h3, h4, h5, h6 {
font-family: verdana, sans-serif;
}
p, li {
text-align: justify;
}
.sc {
font-variant: small-caps;
font-size: 110%;
}
h1, h2, h3, h4, h5, h6 {
font-family: verdana, sans-serif;
}
h1 { text-align: left; }
h2, h3, h4, h5, h6 { text-align: left; }
h1, h2, h3 { font-family: "Liberation Serif";
}
h1 { font-weight: normal; font-size: 170%; padding-top: 7pt; margin-top: 25pt; }
h2 { font-weight: normal; font-size: 140%; padding-top: 7pt; margin-top: 25pt; }
h3 { font-weight: bold; font-size: 118%; padding-top: 7pt; margin-top: 25pt; }
h4 { font-weight: bold; font-size: 100%; }
h5 { font-style: italic; font-size: 100%; }
h6 { font-variant: small-caps; font-size: 100%; }
body {
color: black;
background: white;
@ -44,6 +20,28 @@ body {
margin-left: 30%;
}
body.gsummary {
margin-right: 10%;
margin-left: 10%;
}
h1, h2, h3, h4, h5, h6 {
font-family: verdana, sans-serif;
}
h1 { text-align: left; }
h2, h3, h4, h5, h6 { text-align: left; }
h1, h2, h3 { font-family: "Liberation Serif";
}
h1 { font-weight: normal; font-size: 170%; padding-top: 7pt; margin-top: 25pt; }
h2 { font-weight: normal; font-size: 140%; padding-top: 7pt; margin-top: 25pt; }
h3 { font-weight: bold; font-size: 118%; padding-top: 7pt; margin-top: 25pt; }
h4 { font-weight: bold; font-size: 100%; }
h5 { font-style: italic; font-size: 100%; }
h6 { font-variant: small-caps; font-size: 100%; }
body.gsummary h1 { text-align: center; font-size: 220%; }
hr {
color: #09550b;
border: 1px dotted #09550b;
@ -58,6 +56,15 @@ div#centered {
text-align: center;
}
p, li {
text-align: justify;
}
.sc {
font-variant: small-caps;
font-size: 110%;
}
pre, tt, code {
font-family: "courrier", "andale mono", monospace;
font-size: 100%;
@ -98,6 +105,32 @@ a:hover, a:focus, a:visited {
border-bottom: 1px dotted #09550b;
}
body.gsummary a:link, a:active {
font-size: 140%;
font-weight: bold;
text-decoration: none;
color: #09550b;
border-bottom: none;
/*
border-bottom: 1px dotted #09550b;
*/
}
body.gsummary a:hover, a:focus, a:visited {
font-size: 120%;
font-weight: bold;
font-style: italic;
text-decoration: none;
/*
color: #A40010;
border-bottom: 1px dotted #A40010;
*/
color: #09550b;
/*
border-bottom: 1px dotted #09550b;
*/
}
p.credit {
margin-left: 10%;
margin-right: 10%;
@ -544,6 +577,47 @@ div.topic p.first {
font-weight: bold;
}
body.gsummary table {
border-collapse: collapse;
border-color: transparent;
width: 60%;
margin-left: auto;
margin-right: auto;
}
/*
body.gsummary table th {
}
*/
body.gsummary table td {
border: none;
}
/*
body.gsummary table tr td ul {
margin: 0pt;
border-left: 1px solid black;
}
*/
/*
body.gsummary table tr td ul li {
border-bottom: 2px dotted black;
}
*/
body.gsummary li {
padding: 0%;
list-style-type: none;
}
body.gsummary ul {
padding: 0px 0px 10px 0px;
margin: 0%;
border-bottom: 1px dotted black;
}
table.wiki th, table th {
color: black;
background: #FFFFCC;

View File

@ -4,53 +4,65 @@
<title>Coriolis 2 Documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" href="./SoC.css">
<link rel="stylesheet" href="./en/html/users-guide/SoC.css">
</head>
<body>
<body class="gsummary">
<h1>Coriolis 2 Documentation</h1>
<table width=80% align="center">
<table>
<tr>
<td align="left">
<ul><li><a href="./README/index.html">R<small>EADME</small></a><br>
General README about Coriolis 2
<ul><li><a href="./en/html/users-guide/UsersGuide.html">
<span class="sc">General User's Guide</span></a><br>
General User's Guide of Coriolis 2
</li></ul>
</td>
<td align="left">
<ul><li><a href="./en/html/stratus/index.html">S<small>TRATUS</small></a></br>
Netlist Capture Language (Python)
</li></ul>
</td>
</tr>
<tr>
<td align="left">
<ul><li><a href="./en/html/hurricane/index.html">H<small>URRICANE</small></a><br>
<ul><li><a href="./en/html/hurricane/index.html"><span class="sc">Hurricane</span></a><br>
Hurricane Database
</li></ul>
</td>
</tr>
<tr>
<td align="left">
<ul><li><a href="./en/html/dpgen/index.html">D<small>P</small>G<small>EN</small></a><br>
<ul><li><a href="./en/html/stratus/index.html"><span class="sc">Stratus</span></a></br>
Netlist Capture Language (Python)
</li></ul>
</td>
<td align="left">
<ul><li><a href="./en/html/viewer/index.html"><span class="sc">Viewer</span></a><br>
Viewer Library
</li></ul>
</td>
</tr>
<tr>
<td align="left">
<ul><li><a href="./en/html/dpgen/index.html"><span class="sc">DpGen</span></a><br>
Stratus Extension for Data-Pathes
</li></ul>
</td>
</tr>
<tr>
<td align="left">
<ul><li><a href="./en/html/crlcore/index.html"><span class="sc">CrlCore</span></a><br>
Coriolis Core, Interface Documentation
</li></ul>
</td>
</tr>
<tr>
<td align="left">
</td>
<td align="left">
<ul><li><a href="./en/html/patterns/index.html">P<small>ATTERNS</small></a><br>
<ul><li><a href="./en/html/patterns/index.html"><span class="sc">Patterns</small></a><br>
Stratus Extension for Pattern generation
</li></ul>
</td>
<td align="left">
<ul><li><a href="./en/html/unicorn/index.html"><span class="sc">Unicorn</span></a><br>
Coriolis Main Application
</li></ul>
</td>
</tr>
<tr>
<td align="left">
</td>
<td align="left">
<ul><li><a href="./en/html/stratus_developper/index.html">S<small>TRATUS</small> internals</a><br>
<ul><li><a href="./en/html/stratus_developper/index.html"><span class="sc">Stratus Internals</span></a><br>
Stratus internal's Documentation
</li></ul>
</td>

View File

@ -1,13 +1,4 @@
install ( FILES coriolisInit.py DESTINATION ${SYS_CONF_DIR}/coriolis2 )
install ( FILES helpers/__init__.py DESTINATION ${SYS_CONF_DIR}/coriolis2/helpers )
install ( FILES helpers/Configuration.py DESTINATION ${SYS_CONF_DIR}/coriolis2/helpers )
install ( FILES helpers/Alliance.py DESTINATION ${SYS_CONF_DIR}/coriolis2/helpers )
install ( FILES helpers/Display.py DESTINATION ${SYS_CONF_DIR}/coriolis2/helpers )
install ( FILES helpers/Patterns.py DESTINATION ${SYS_CONF_DIR}/coriolis2/helpers )
install ( FILES helpers/SymbolicTechnology.py DESTINATION ${SYS_CONF_DIR}/coriolis2/helpers )
install ( FILES helpers/RealTechnology.py DESTINATION ${SYS_CONF_DIR}/coriolis2/helpers )
install ( FILES helpers/Debug.py DESTINATION ${SYS_CONF_DIR}/coriolis2/helpers )
install ( FILES technology_symbolic.conf DESTINATION ${SYS_CONF_DIR}/coriolis2 )
install ( FILES technology_cmos130_s2r.conf DESTINATION ${SYS_CONF_DIR}/coriolis2 )
install ( FILES misc.conf DESTINATION ${SYS_CONF_DIR}/coriolis2 )

View File

@ -7,7 +7,7 @@ parametersTable = \
, ("katabatic.saturateRp" ,TypeInt ,8 )
, ("kite.borderRipupLimit" ,TypeInt ,26 )
# Kite parameters.
, ("kite.edgeCapacity" ,TypePercentage,65 , { 'min':0, 'max':110 } )
, ("kite.edgeCapacity" ,TypePercentage,75 , { 'min':0, 'max':110 } )
, ("kite.eventsLimit" ,TypeInt ,4000002)
, ("kite.ripupCost" ,TypeInt ,3 , { 'min':0 } )
, ("kite.globalRipupLimit" ,TypeInt ,5 , { 'min':1 } )

View File

@ -3,7 +3,8 @@
parametersTable = \
( ('misc.catchCore' , TypeBool, False)
, ('misc.info' , TypeBool, True )
, ('misc.info' , TypeBool, False)
, ('misc.bug' , TypeBool, False)
, ('misc.logMode' , TypeBool, False)
, ('misc.verboseLevel1', TypeBool, True )
, ('misc.verboseLevel2', TypeBool, False)

View File

@ -5,6 +5,8 @@
parametersTable = \
( ("stratus1.mappingName", TypeString, "./stratus2sxlib.xml",
{ 'flags':Cfg.Parameter.Flags.NeedRestart|Cfg.Parameter.Flags.MustExist } )
, ("stratus1.format" , TypeString, "vst")
, ("stratus1.simulator" , TypeString, "asimut")
,)
@ -13,4 +15,6 @@ layoutTable = \
( (TypeTab ,"Stratus1", "stratus1" )
, (TypeTitle , "Stratus1 - Netlist & Layout Capture" )
, (TypeOption, "stratus1.mappingName", "Virtual Library Translation", 0, 2 )
, (TypeOption, "stratus1.format" , "Netlist Format (vst, vhd)" , 0, 2 )
, (TypeOption, "stratus1.simulator" , "Simulator" , 0, 2 )
)

View File

@ -1,4 +1,5 @@
add_subdirectory(ccore)
add_subdirectory(pyCRL)
add_subdirectory(crlcore)
add_subdirectory(cyclop)
add_subdirectory(x2y)

View File

@ -31,7 +31,7 @@
${CIF_INCLUDE_DIR}
${CONFIGURATION_INCLUDE_DIR}
${PYTHON_INCLUDE_PATH}
${Boost_INCLUDE_DIRS}
${Boost_INCLUDE_DIR}
)
add_definitions ( -DCORIOLIS_TOP="${CORIOLIS_TOP}"

View File

@ -61,6 +61,13 @@ namespace {
}
void bugChanged ( Cfg::Parameter* p )
{
if ( p->asBool() ) mstream::enable ( mstream::Bug );
else mstream::disable ( mstream::Bug );
}
void catchCoreChanged ( Cfg::Parameter* p )
{
System::setCatchCore ( p->asBool() );
@ -110,6 +117,7 @@ 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 cbug ( mstream::Bug , std::cout );
// -------------------------------------------------------------------
@ -291,11 +299,14 @@ namespace CRL {
// Early setting of python pathes to be able to execute configuration scripts.
bfs::path pythonSitePackages = PYTHON_SITE_PACKAGES;
pythonSitePackages = arguments["coriolis_top"].as<string>() / pythonSitePackages;
_pathes.insert ( make_pair("pythonSitePackages",pythonSitePackages.string()) );
bfs::path crlcoreDir = pythonSitePackages / "crlcore";
bfs::path stratusDir = pythonSitePackages / "stratus";
bfs::path cumulusDir = pythonSitePackages / "cumulus";
Isobar::Script::addPath ( sysConfDir.string() );
Isobar::Script::addPath ( pythonSitePackages.string() );
Isobar::Script::addPath ( crlcoreDir.string() );
Isobar::Script::addPath ( stratusDir.string() );
Isobar::Script::addPath ( cumulusDir.string() );
@ -306,6 +317,7 @@ namespace CRL {
Cfg::getParamBool ("misc.verboseLevel1" ,true )->registerCb ( verboseLevel1Changed );
Cfg::getParamBool ("misc.verboseLevel2" ,true )->registerCb ( verboseLevel2Changed );
Cfg::getParamBool ("misc.info" ,false)->registerCb ( infoChanged );
Cfg::getParamBool ("misc.bug" ,false)->registerCb ( bugChanged );
Cfg::getParamBool ("misc.logMode" ,false)->registerCb ( logModeChanged );
Cfg::getParamInt ("misc.traceLevel" ,1000 )->registerCb ( traceLevelChanged );
Cfg::getParamString("stratus1.mappingName","./stratus2sxlib.xml")->registerCb ( stratus1MappingNameChanged );
@ -315,6 +327,7 @@ namespace CRL {
verboseLevel1Changed ( Cfg::getParamBool("misc.verboseLevel1") );
verboseLevel2Changed ( Cfg::getParamBool("misc.verboseLevel2") );
infoChanged ( Cfg::getParamBool("misc.info" ) );
bugChanged ( Cfg::getParamBool("misc.bug" ) );
logModeChanged ( Cfg::getParamBool("misc.logMode" ) );
traceLevelChanged ( Cfg::getParamInt ("misc.traceLevel" ) );
@ -406,8 +419,9 @@ namespace CRL {
void System::_runPythonInit ()
{
Cfg::Configuration* conf = Cfg::Configuration::get ();
bfs::path sysConfDir = getPath("etc");
Cfg::Configuration* conf = Cfg::Configuration::get ();
bfs::path sysConfDir = getPath("etc");
bfs::path pythonSitePackages = getPath("pythonSitePackages");
#if XML_NOT_DISABLED
bool systemConfFound = false;
@ -422,11 +436,11 @@ namespace CRL {
#endif
bool systemConfFound = false;
bfs::path systemConfFile = sysConfDir / "coriolisInit.py";
bfs::path systemConfFile = pythonSitePackages / "crlcore" / "coriolisInit.py";
if ( bfs::exists(systemConfFile) ) {
systemConfFound = true;
cout << " o Reading python dot configuration:" << endl;
cout << " - <" << systemConfFile.string() << ">." << endl;
//cout << " o Reading python dot configuration:" << endl;
//cout << " - <" << systemConfFile.string() << ">." << endl;
Isobar::Script* systemScript = Isobar::Script::create(systemConfFile.stem());
systemScript->runFunction("coriolisConfigure",NULL,Isobar::Script::NoScriptArgs);

View File

@ -2,14 +2,9 @@
// -*- C++ -*-
//
// This file is part of the Coriolis Software.
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved
//
// ===================================================================
//
// $Id$
//
// x-----------------------------------------------------------------x
// | |
// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | Alliance / Hurricane Interface |
// | |
@ -17,10 +12,7 @@
// | E-mail : Christophe.Alexandre@asim.lip6.fr |
// | =============================================================== |
// | C++ Header : "./ParsersDrivers.h" |
// | *************************************************************** |
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
// +-----------------------------------------------------------------+
#include <time.h>
@ -40,6 +32,7 @@ using namespace std;
#include "hurricane/Warning.h"
#include "Ap.h"
#include "crlcore/Catalog.h"
namespace {
@ -452,6 +445,7 @@ void apDriver( const string cellPath, Cell *cell, unsigned int &saveState) {
DumpReference(ccell, cell);
ccell << "EOF" << endl;
ccell.close ();
CRL::CatalogExtension::setPhysical(cell, true);
}
}

View File

@ -1,40 +1,8 @@
// -*- C++ -*-
//
// This file is part of the Coriolis Project.
// Copyright (C) Laboratoire LIP6 - Departement ASIM
// Universite Pierre et Marie Curie
//
// Main contributors :
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
// Hugo Clément <Hugo.Clement@lip6.fr>
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
// Damien Dupuis <Damien.Dupuis@lip6.fr>
// Christian Masson <Christian.Masson@lip6.fr>
// Marek Sroka <Marek.Sroka@lip6.fr>
//
// The Coriolis Project is free software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// The Coriolis Project is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with the Coriolis Project; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
// License-Tag
// Authors-Tag
//
// ===================================================================
//
// $Id$
// This file is part of the Coriolis Software.
// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved
//
// +-----------------------------------------------------------------+
// | C O R I O L I S |
@ -44,9 +12,6 @@
// | E-mail : Christian.Masson@lip6.fr |
// | =============================================================== |
// | C++ Module : "./ApParser.cpp" |
// | |
// | 05/06/2008 - Jean-Paul Chaput |
// | Complete rewrite & simplification. |
// +-----------------------------------------------------------------+

View File

@ -312,9 +312,9 @@ void DumpPortList(ofstream &ccell, Cell* cell)
+ ": "
+ getNetDirection(net1)
+ vectorType
+ index1StringStream.str()
+ " to "
+ index2StringStream.str()
+ " downto "
+ index1StringStream.str()
+ ")"
+ busType);
}
@ -400,9 +400,9 @@ void DumpSignalList(ofstream &ccell, Cell* cell)
<< name
<< string(biggestName - name.size() + 1, ' ')
<< ": bit_vector("
<< index1StringStream.str()
<< " to "
<< index2StringStream.str()
<< " downto "
<< index1StringStream.str()
<< ");"
<< endl;
}
@ -552,7 +552,7 @@ void DumpConnectionList(ofstream &ccell, Instance*instance)
if (vectorFound)
{
if (index2 < index1)
if (index2 > index1)
reverse(plugConnectedVector.begin(), plugConnectedVector.end());
string connections;
PlugVector::const_iterator pvit = plugConnectedVector.begin();

View File

@ -265,6 +265,7 @@ inline std::string tty::bgcolor ( unsigned int mask )
, Verbose1 = (1<<1)
, Verbose2 = (1<<2)
, Info = (1<<3)
, Bug = (1<<4)
, VerboseLevel0 = Verbose0
, VerboseLevel1 = Verbose0|Verbose1
, VerboseLevel2 = Verbose0|Verbose1|Verbose2
@ -343,6 +344,7 @@ extern mstream cmess0;
extern mstream cmess1;
extern mstream cmess2;
extern mstream cinfo;
extern mstream cbug;
// -------------------------------------------------------------------

View File

@ -4,10 +4,6 @@
// This file is part of the Coriolis Software.
// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved
//
// ===================================================================
//
// $Id$
//
// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | Alliance / Hurricane Interface |

View File

@ -0,0 +1,10 @@
install ( FILES coriolisInit.py DESTINATION ${PYTHON_SITE_PACKAGES}/crlcore )
install ( FILES helpers/__init__.py DESTINATION ${PYTHON_SITE_PACKAGES}/crlcore/helpers )
install ( FILES helpers/Configuration.py DESTINATION ${PYTHON_SITE_PACKAGES}/crlcore/helpers )
install ( FILES helpers/Alliance.py DESTINATION ${PYTHON_SITE_PACKAGES}/crlcore/helpers )
install ( FILES helpers/Display.py DESTINATION ${PYTHON_SITE_PACKAGES}/crlcore/helpers )
install ( FILES helpers/Patterns.py DESTINATION ${PYTHON_SITE_PACKAGES}/crlcore/helpers )
install ( FILES helpers/SymbolicTechnology.py DESTINATION ${PYTHON_SITE_PACKAGES}/crlcore/helpers )
install ( FILES helpers/RealTechnology.py DESTINATION ${PYTHON_SITE_PACKAGES}/crlcore/helpers )
install ( FILES helpers/Debug.py DESTINATION ${PYTHON_SITE_PACKAGES}/crlcore/helpers )

View File

@ -43,10 +43,10 @@ def _loadAllianceConfig ( af, allianceConfig ):
try:
if len(entry) != 2:
raise ErrorMessage(['Malformed entry in <allianceConfig>.'
,'Must have exactly two fields ("key", <value>).'
,str(entry)
])
raise ErrorMessage(1,['Malformed entry in <allianceConfig>.'
,'Must have exactly two fields ("key", <value>).'
,str(entry)
])
key, value = entry
if key == 'SYMBOLIC_TECHNOLOGY': env.setSYMBOLIC_TECHNOLOGY(value)
@ -66,10 +66,10 @@ def _loadAllianceConfig ( af, allianceConfig ):
if key == 'SYSTEM_LIBRARY':
for libraryEntry in value:
if len(libraryEntry) != 2:
raise ErrorMessage(['Malformed system library entry in <allianceConfig>.'
,'Must have exactly two fields ("path", <mode>).'
,str(libraryEntry)
])
raise ErrorMessage(1,['Malformed system library entry in <allianceConfig>.'
,'Must have exactly two fields ("path", <mode>).'
,str(libraryEntry)
])
libPath, mode = libraryEntry
env.addSYSTEM_LIBRARY(library=libPath,mode=mode)
@ -101,16 +101,16 @@ def loadRoutingGaugesTable ( routingGaugesTable, fromFile ):
try:
if len(entry) != 2:
raise ErrorMessage(['Malformed entry in <routingGaugesTable[%s]>.' % gaugeName
,'Must have exactly two fields ("METAL_LAYER", (parameters_list)).'
,str(entry)
])
raise ErrorMessage(1,['Malformed entry in <routingGaugesTable[%s]>.' % gaugeName
,'Must have exactly two fields ("METAL_LAYER", (parameters_list)).'
,str(entry)
])
if len(entry[1]) != 8:
raise ErrorMessage(['Malformed entry in <routingGaugesTable[%s]>.' % gaugeName
,'Parameters list must have exactly eight fields:'
,' (direction, type, depth, density, offset, pitch, wire_width, via_width)'
,str(entry)
])
raise ErrorMessage(1,['Malformed entry in <routingGaugesTable[%s]>.' % gaugeName
,'Parameters list must have exactly eight fields:'
,' (direction, type, depth, density, offset, pitch, wire_width, via_width)'
,str(entry)
])
gauge.addLayerGauge( RoutingLayerGauge.create( technology.getLayer(entry[0])
, entry[1][0] # Direction.
@ -142,7 +142,7 @@ def loadCellGaugesTable ( cellGaugesTable, fromFile ):
try:
if len(gaugeDatas) != 4:
raise ErrorMessage(['Malformed gaugeDatas in <cellGaugesTable[%s]>.' % gaugeName
raise ErrorMessage(1,['Malformed gaugeDatas in <cellGaugesTable[%s]>.' % gaugeName
,'Parameters list must have exactly four fields:'
,' (terminal_metal, xy_common_pitch, slice_height, slice_step)'
,str(gaugeDatas)

View File

@ -75,20 +75,20 @@ def loadParameters ( parametersData, fromFile ):
try:
if len(entry) < 3:
raise ErrorMessage(['Malformed entry in <parametersTable>.'
,'Less than three fields: (path_name, Type, default_value [,options]).'
,str(entry)
])
raise ErrorMessage(1,['Malformed entry in <parametersTable>.'
,'Less than three fields: (path_name, Type, default_value [,options]).'
,str(entry)
])
if len(entry) == 3:
pathName, paramType, value = entry
options = None
elif len(entry) == 4:
pathName, paramType, value, options = entry
else:
raise ErrorMessage(['Malformed entry in <parametersTable>.'
,'More than four fields: (path_name, Type, default_value [,options]).'
,str(entry)
])
raise ErrorMessage(1,['Malformed entry in <parametersTable>.'
,'More than four fields: (path_name, Type, default_value [,options]).'
,str(entry)
])
if paramType == TypeBool:
param = Cfg.getParamBool(pathName)
@ -140,53 +140,53 @@ def loadLayout ( layoutData, fromFile ):
try:
if not isinstance(entry,tuple):
raise ErrorMessage(['Malformed entry in <layoutTable>.'
,'Not a tuple (a, b, c, ...) or (a,).'
,str(entry)
])
raise ErrorMessage(1,['Malformed entry in <layoutTable>.'
,'Not a tuple (a, b, c, ...) or (a,).'
,str(entry)
])
if entry[0] == TypeTab:
if len(entry) != 3:
raise ErrorMessage(['Malformed entry in <layoutTable>.'
,'Tab must have exactly three fields: (TypeTab, tab_name, tag).'
,str(entry)
])
raise ErrorMessage(1,['Malformed entry in <layoutTable>.'
,'Tab must have exactly three fields: (TypeTab, tab_name, tag).'
,str(entry)
])
layoutType, tabName, tagName = entry
layout.addTab ( tabName, tagName )
if not tabName:
raise ErrorMessage(['Bad entry order in <layoutTable>.'
,'First entry must be of Tab type.'
])
raise ErrorMessage(1,['Bad entry order in <layoutTable>.'
,'First entry must be of Tab type.'
])
if entry[0] == TypeTitle:
if len(entry) != 2:
raise ErrorMessage(['Malformed entry in <layoutTable>.'
,'Title must have exactly two fields: (TypeTitle, title).'
,str(entry)
])
raise ErrorMessage(1,['Malformed entry in <layoutTable>.'
,'Title must have exactly two fields: (TypeTitle, title).'
,str(entry)
])
layoutType, title = entry
layout.addTitle ( tabName, title )
elif entry[0] == TypeSection:
if len(entry) != 3:
raise ErrorMessage(['Malformed entry in <layoutTable>.'
,'Section must have exactly three fields: (TypeSection, section, column).'
,str(entry)
])
raise ErrorMessage(1,['Malformed entry in <layoutTable>.'
,'Section must have exactly three fields: (TypeSection, section, column).'
,str(entry)
])
layoutType, section, column = entry
layout.addSection ( tabName, section, column )
elif entry[0] == TypeRule:
if len(entry) != 1:
raise ErrorMessage(['Malformed entry in <layoutTable>.'
,'Rule must have exactly one fields: (TypeRule,).'
,str(entry)
])
raise ErrorMessage(1,['Malformed entry in <layoutTable>.'
,'Rule must have exactly one fields: (TypeRule,).'
,str(entry)
])
layout.addRule ( tabName )
elif entry[0] == TypeOption:
if len(entry) < 4:
raise ErrorMessage(['Malformed entry in <layoutTable>.'
,'Option must have at least four fields: (TypeOption,path_name,text,column[,span,flags]).'
,str(entry)
])
raise ErrorMessage(1,['Malformed entry in <layoutTable>.'
,'Option must have at least four fields: (TypeOption,path_name,text,column[,span,flags]).'
,str(entry)
])
if len(entry) == 4:
layoutType, pathName, text, column = entry
layout.addParameter ( tabName, pathName, text, column )

View File

@ -41,7 +41,7 @@ def checkAttribute ( options, attribute, goodType ):
if goodType == float and isinstance(options[attribute],int): return True
if not isinstance(options[attribute],goodType):
raise ErrorMessage(
raise ErrorMessage( 1,
['The <%s> attribute of Drawing must be %s, not %s.' \
% (attribute,str(goodType).split("'")[1],helpers.stype(options[attribute]))
,str(options[attribute])])
@ -50,7 +50,7 @@ def checkAttribute ( options, attribute, goodType ):
def checkColor ( color ):
if not isinstance(color,str):
raise ErrorMessage(
raise ErrorMessage( 1,
['The <color> attribute of Drawing must be str, not %s.' % (helpers.stype(color))
,str(options[attribute])])
@ -61,11 +61,11 @@ def checkColor ( color ):
if color[0] == '#':
for digit in color[1:]:
if not digit in string.hexdigits:
raise ErrorMessage(
raise ErrorMessage( 1,
['Non-hexadecimal digit \'%c\' in <color> attribute of Drawing.' % digit
,color])
if len(color) != 7:
raise ErrorMessage(
raise ErrorMessage( 1,
['<color> attribute of Drawing do not have exactly six digits.' % digit
,color])
return color
@ -73,19 +73,19 @@ def checkColor ( color ):
# Try a RGB tuple (R,G,B).
rgb = color.split(',')
if len(rgb) != 3:
raise ErrorMessage(
raise ErrorMessage( 1,
['<color> attribute of Drawing is neither hexa nor RGB nor predefined.'
,color])
for component in rgb:
for digit in component:
if not digit in string.digits:
raise ErrorMessage(
raise ErrorMessage( 1,
['Bad RGB <color> component \'%s\' of Drawing, not an integer.' % component
,color])
value = int(component)
if value < 0 or value > 255:
raise ErrorMessage(
raise ErrorMessage( 1,
['Bad RGB <color> component \'%s\' of Drawing, not between 0 and 255.' % component
,color])
return color
@ -136,74 +136,74 @@ def loadStyleTuple ( styleTuple ):
try:
if styleEntry[0] == Style:
if len(styleEntry) != 3:
raise ErrorMessage(['Malformed entry in <styleTable>.'
,'Style must have exactly three fields: (Style,id,description).'
,str(styleEntry)
])
raise ErrorMessage(1,['Malformed entry in <styleTable>.'
,'Style must have exactly three fields: (Style,id,description).'
,str(styleEntry)
])
styleType, styleId, description = styleEntry
if not isinstance(styleId,str):
raise ErrorMessage(['The second Style field, <id> must be a string, not a %s.' % helpers.stype(styleId)
,str(styleEntry)])
raise ErrorMessage(1,['The second Style field, <id> must be a string, not a %s.' % helpers.stype(styleId)
,str(styleEntry)])
if not isinstance(description,str):
raise ErrorMessage(['The third Style field, <description> must be a string, not a %s.' % helpers.stype(styleId)
,str(styleEntry)])
raise ErrorMessage(1,['The third Style field, <description> must be a string, not a %s.' % helpers.stype(styleId)
,str(styleEntry)])
style = Viewer.DisplayStyle(styleId)
style.setDescription(description)
if not style:
raise ErrorMessage(['Bad entry order in <styleTable>.'
,'First entry must be of Style type.'
])
raise ErrorMessage(1,['Bad entry order in <styleTable>.'
,'First entry must be of Style type.'
])
if styleEntry[0] == Inherit:
if len(styleEntry) != 2:
raise ErrorMessage(['Malformed entry in <didplayTable>.'
,'Inherit must have exactly two fields: (Inherit,id).'
,str(styleEntry)
])
raise ErrorMessage(1,['Malformed entry in <didplayTable>.'
,'Inherit must have exactly two fields: (Inherit,id).'
,str(styleEntry)
])
styleType, styleId = styleEntry
if not isinstance(styleId,str):
raise ErrorMessage(['The second Inherit field, <id> must be a string, not a %s.' % helpers.stype(styleId)
,str(styleEntry)])
raise ErrorMessage(1,['The second Inherit field, <id> must be a string, not a %s.' % helpers.stype(styleId)
,str(styleEntry)])
style.inheritFrom(styleId)
if styleEntry[0] == Darkening:
if len(styleEntry) != 4:
raise ErrorMessage(['Malformed entry in <didplayTable>.'
,'Darkening (HSV color) must have exactly four fields: (Darkening,hue,value,saturation).'
,str(styleEntry)
])
raise ErrorMessage(1,['Malformed entry in <didplayTable>.'
,'Darkening (HSV color) must have exactly four fields: (Darkening,hue,value,saturation).'
,str(styleEntry)
])
styleType, hue, value, saturation = styleEntry
if not isinstance(hue ,float) or \
not isinstance(value ,float) or \
not isinstance(saturation,float) :
raise ErrorMessage(['<hue>, <val> & <sat> fields of Darkening must be floats.'
,'%s is (Type, %s, %s, %s)' % (str(styleEntry)
,helpers.stype(hue)
,helpers.stype(value)
,helpers.stype(saturation))
])
raise ErrorMessage(1,['<hue>, <val> & <sat> fields of Darkening must be floats.'
,'%s is (Type, %s, %s, %s)' % (str(styleEntry)
,helpers.stype(hue)
,helpers.stype(value)
,helpers.stype(saturation))
])
style.setDarkening(Viewer.DisplayStyle.HSVr( hue, value, saturation ))
elif styleEntry[0] == Group:
if len(styleEntry) != 2:
raise ErrorMessage(['Malformed entry in <styleTable>.'
,'Group must have exactly two fields: (Group,group).'
,str(styleEntry)
])
raise ErrorMessage(1,['Malformed entry in <styleTable>.'
,'Group must have exactly two fields: (Group,group).'
,str(styleEntry)
])
styleType, group = styleEntry
if not isinstance(group,str):
raise ErrorMessage(['The second Group field, <group> must be a string, not a %s.' % helpers.stype(group)
,str(styleEntry)])
raise ErrorMessage(1,['The second Group field, <group> must be a string, not a %s.' % helpers.stype(group)
,str(styleEntry)])
elif styleEntry[0] == Drawing:
if len(styleEntry) != 3:
raise ErrorMessage(['Malformed entry in <styleTable>.'
,'Rule must have exactly three fields: (Drawing,dname,{dict}).'
,str(styleEntry)
])
raise ErrorMessage(1,['Malformed entry in <styleTable>.'
,'Rule must have exactly three fields: (Drawing,dname,{dict}).'
,str(styleEntry)
])
styleType, name, options = styleEntry
arguments = { 'group':group, 'name':name }
for key in options.keys():
@ -247,9 +247,9 @@ def loadStyles ( stylesTable, fromFile ):
try:
# Check for three levels of tuple for a correct <styleTable>.
if not isinstance(stylesTable,tuple):
raise ErrorMessage(['Malformed <styleTable>, not even a one level deep tuple.'])
raise ErrorMessage(1,['Malformed <styleTable>, not even a one level deep tuple.'])
if not isinstance(stylesTable[0],tuple):
raise ErrorMessage(['Malformed <styleTable>, only two level deep tuple.'])
raise ErrorMessage(1,['Malformed <styleTable>, only two level deep tuple.'])
for styleTuple in stylesTable:
loadStyleTuple( styleTuple )

View File

@ -95,8 +95,8 @@ class Pattern ( object ):
self._side = math.sqrt(4*len(self._hexa))
if pow(self._side,2) != 4*len(self._hexa):
raise ErrorMessage( 'The pattern is not square (%d bits).'
% (4*len(self._hexa)) )
raise ErrorMessage( 1, 'The pattern is not square (%d bits).'
% (4*len(self._hexa)) )
return
self._fromHexa()
@ -108,8 +108,8 @@ class Pattern ( object ):
for line in bits:
if self._side != len(line):
raise ErrorMessage( 'The pattern is not square (%dx%d bits).'
% (len(line),len(self._bits)) )
raise ErrorMessage( 1, 'The pattern is not square (%dx%d bits).'
% (len(line),len(self._bits)) )
self._toHexa()
return
@ -149,16 +149,16 @@ def loadPatterns ( patternsData, fromFile ):
try:
if not isinstance(entry,dict):
raise ErrorMessage(['Malformed entry in <patternsTable>.'
,'Not a dictionary {\'key1\':\'value1\', ...}.'
,str(entry)
])
raise ErrorMessage(1,['Malformed entry in <patternsTable>.'
,'Not a dictionary {\'key1\':\'value1\', ...}.'
,str(entry)
])
if not entry.has_key('name'):
raise ErrorMessage(['Malformed entry in <patternsTable>.'
,'Pattern has no \'name\' key.'
,str(entry)
])
raise ErrorMessage(1,['Malformed entry in <patternsTable>.'
,'Pattern has no \'name\' key.'
,str(entry)
])
arguments = { 'name':entry['name'] }
if entry.has_key('bits'):

View File

@ -21,25 +21,25 @@ def loadRealLayers ( technology, basicLayersData ):
try:
if len(entry) != 3:
raise ErrorMessage(['Malformed entry in <realLayersTable>.'
,'Must have exactly three fields: (symb_name,real_name,GDSII_extnb).'
,str(entry)
])
raise ErrorMessage(1,['Malformed entry in <realLayersTable>.'
,'Must have exactly three fields: (symb_name,real_name,GDSII_extnb).'
,str(entry)
])
symbName, realName, gdsiiExtractNumber = entry
if not isinstance(gdsiiExtractNumber,int):
raise ErrorMessage(['Incoherency in <realLayersTable> entry.'
,'GDSII exctract number is not of int type (%s).' \
% helpers.stype(gdsiiExtractNumber)
,str(entry)
])
raise ErrorMessage(1,['Incoherency in <realLayersTable> entry.'
,'GDSII exctract number is not of int type (%s).' \
% helpers.stype(gdsiiExtractNumber)
,str(entry)
])
basicLayer = technology.getBasicLayer(symbName)
if not basicLayer:
raise ErrorMessage(['Incoherency in <realLayersTable> entry.'
,'The real layer "%s" associated to the GDSII "%s" do not exists.' \
% (symbName,realName)
,str(entry)
])
raise ErrorMessage(1,['Incoherency in <realLayersTable> entry.'
,'The real layer "%s" associated to the GDSII "%s" do not exists.' \
% (symbName,realName)
,str(entry)
])
basicLayer.setRealName ( realName )
basicLayer.setExtractNumber( gdsiiExtractNumber )
@ -62,26 +62,26 @@ def loadTechnoConfig ( technology, technoConfig ):
gridUnit != DbU.UnitPowerMilli and \
gridUnit != DbU.UnitPowerUnity and \
gridUnit != DbU.UnitPowerKilo:
raise ErrorMessage('In <technoConfig>, invalid DbU unit power for gridUnit, reseting to Micro.')
raise ErrorMessage(1,'In <technoConfig>, invalid DbU unit power for gridUnit, reseting to Micro.')
else:
raise ErrorMessage('<technoConfig> has no <gridUnit> defined, assuming Micro.')
raise ErrorMessage(1,'<technoConfig> has no <gridUnit> defined, assuming Micro.')
elif key == 'gridValue':
if technoConfig.has_key('gridValue'):
gridValue = technoConfig['gridValue']
if not isinstance(gridUnit,float) and not isinstance(gridUnit,int):
raise ErrorMessage(['In <technoConfig>, <gridValue> must be of type float (and not: %s).'
% helpers.stype(gridValue)
])
raise ErrorMessage(1,['In <technoConfig>, <gridValue> must be of type float (and not: %s).'
% helpers.stype(gridValue)
])
DbU.setPhysicalsPerGrid(gridValue,gridUnit)
else:
raise ErrorMessage('<technoConfig> has no <gridValue> defined.')
raise ErrorMessage(1,'<technoConfig> has no <gridValue> defined.')
elif key == 'gridsPerLambda':
if technoConfig.has_key('gridsPerLambda'):
gridsPerLambda = technoConfig['gridsPerLambda']
if not isinstance(gridsPerLambda,int):
raise ErrorMessage(['In <technoConfig>, <gridsPerLambda> must be of type int (and not: %s).'
raise ErrorMessage(1,['In <technoConfig>, <gridsPerLambda> must be of type int (and not: %s).'
% helpers.stype(gridsPerLambda)
])
DbU.setGridsPerLambda(gridsPerLambda)

View File

@ -86,7 +86,7 @@ class LayersLUT ( object ):
layer = self._symbolicLayers[name]
if not layer and flags&LayersLUT.MissingError:
raise ErrorMessage(['Layer <%s> is not defined (yet?).'%name])
raise ErrorMessage(1,['Layer <%s> is not defined (yet?).'%name])
return layer
@ -101,22 +101,22 @@ def loadRealLayers ( technology, basicLayersData ):
try:
if len(entry) < 2:
raise ErrorMessage(['Malformed entry in <realLayersTable>.'
,'Less than two fields: missing name and/or material.'
,str(entry)
])
raise ErrorMessage(1,['Malformed entry in <realLayersTable>.'
,'Less than two fields: missing name and/or material.'
,str(entry)
])
if len(entry) > 2:
if entry[1] != BasicLayer.Material.blockage:
raise ErrorMessage(['Invalid entry in <realLayersTable>.'
,'Only blockage material can have a third field.'
,str(entry)
])
raise ErrorMessage(1,['Invalid entry in <realLayersTable>.'
,'Only blockage material can have a third field.'
,str(entry)
])
routingLayer = technology.getBasicLayer(entry[2])
if not routingLayer:
raise ErrorMessage(['Incoherency in <realLayersTable> entry at.'
,'The metal <%s> associated to the blockage doesn\'t exist (yet?).' % entry[2]
,str(entry)
])
raise ErrorMessage(1,['Incoherency in <realLayersTable> entry at.'
,'The metal <%s> associated to the blockage doesn\'t exist (yet?).' % entry[2]
,str(entry)
])
basicLayer = BasicLayer.create( technology
, entry[0]
@ -137,28 +137,28 @@ def loadSymbolicLayers ( technology, symbolicLayersData ):
try:
if len(entry) != 3:
raise ErrorMessage(['Malformed entry in <symbolicLayersTable>.'
,'Must contains exactly three fields: ( name, type, (real_layers,) ).'
,str(entry)
])
raise ErrorMessage(1,['Malformed entry in <symbolicLayersTable>.'
,'Must contains exactly three fields: ( name, type, (real_layers,) ).'
,str(entry)
])
name, layerType, realLayers = entry
if not isinstance(layerType,SymbolicLayerType):
raise ErrorMessage(['Invalid entry in <symbolicLayersTable>.'
,'The layer type code is not valid, should be any of:'
,' * TypeRegular'
,' * TypeDiffusion'
,' * TypeTransistor'
,' * TypeContact'
,' * TypeVia'
,str(entry)
])
raise ErrorMessage(1,['Invalid entry in <symbolicLayersTable>.'
,'The layer type code is not valid, should be any of:'
,' * TypeRegular'
,' * TypeDiffusion'
,' * TypeTransistor'
,' * TypeContact'
,' * TypeVia'
,str(entry)
])
if layerType.realLayerLength() != len(realLayers):
raise ErrorMessage(['Invalid entry in <symbolicLayersTable>.'
,'Layer of type <%s> contains %d real layers instead of %d.' \
% (layerType,len(realLayers),layerType.realLayerLength())
,str(entry)
])
raise ErrorMessage(1,['Invalid entry in <symbolicLayersTable>.'
,'Layer of type <%s> contains %d real layers instead of %d.' \
% (layerType,len(realLayers),layerType.realLayerLength())
,str(entry)
])
realLayersArgs = []
for layerName in realLayers:
@ -198,23 +198,23 @@ def loadSymbolicRules ( technology, symbolicRulesTable ):
try:
if len(rule) != 2:
raise ErrorMessage(['Malformed entry in <symbolicRulesTable>.'
,'Must contains exactly two fields: ( rule_path, value ).'
,str(rule)
])
raise ErrorMessage(1,['Malformed entry in <symbolicRulesTable>.'
,'Must contains exactly two fields: ( rule_path, value ).'
,str(rule)
])
if not isinstance(rule[1],int) and not isinstance(rule[1],float):
raise ErrorMessage(['Invalid entry in <symbolicRulesTable>.'
,'Rule value must be of integer or float type.'
,str(rule)
])
raise ErrorMessage(1,['Invalid entry in <symbolicRulesTable>.'
,'Rule value must be of integer or float type.'
,str(rule)
])
value = DbU.fromLambda(rule[1])
elements = rule[0].split('.')
if len(elements) < 3:
raise ErrorMessage(['Invalid entry in <symbolicRulesTable>.'
,'Rule name must contains at least three components: \"LAYER.category.dimension\".'
,str(rule)
])
raise ErrorMessage(1,['Invalid entry in <symbolicRulesTable>.'
,'Rule name must contains at least three components: \"LAYER.category.dimension\".'
,str(rule)
])
ruleLayer = layersLUT.lookup( elements[0], LayersLUT.Symbolic|LayersLUT.MissingError )
subLayer = layersLUT.lookup( elements[1], LayersLUT.Real )
@ -228,15 +228,15 @@ def loadSymbolicRules ( technology, symbolicRulesTable ):
elif ruleTag == 'minimum.width': ruleLayer.setMinimalSize ( value )
elif ruleTag == 'minimum.side': ruleLayer.setMinimalSize ( value )
else:
raise ErrorMessage(['Invalid entry in <symbolicRulesTable>.'
,'Unknown rule kind: \".%s\", should be any of:' % ruleTag
,' * "RULE_HEAD.extention.cap"'
,' * "RULE_HEAD.extention.width"'
,' * "RULE_HEAD.enclosure"'
,' * "RULE_HEAD.minimum.width"'
,' * "RULE_HEAD.minimum.side"'
,str(rule)
])
raise ErrorMessage(1,['Invalid entry in <symbolicRulesTable>.'
,'Unknown rule kind: \".%s\", should be any of:' % ruleTag
,' * "RULE_HEAD.extention.cap"'
,' * "RULE_HEAD.extention.width"'
,' * "RULE_HEAD.enclosure"'
,' * "RULE_HEAD.minimum.width"'
,' * "RULE_HEAD.minimum.side"'
,str(rule)
])
except Exception, e:
ErrorMessage.wrapPrint(e,'In %s:<symbolicRulesTable> at index %d.' % (symbolicFile,entryNo))

View File

@ -8,11 +8,11 @@
import sys
import os
import os.path
import re
import traceback
import Hurricane
sysConfDir = os.sep.join(os.path.abspath(__file__).split(os.sep)[:-2])
sysConfDir = None
xmlCompatMode = False
@ -26,12 +26,21 @@ def truncPath ( path ):
class ErrorMessage ( Exception ):
def __init__ ( self, message ):
self._errors = []
def __init__ ( self, code, *arguments ):
self._code = code
self._errors = [ 'Malformed call to ErrorMessage()'
, '%s' % str(arguments) ]
if isinstance(message,Exception):
text = str(message).split('\n')
text = None
if len(arguments) == 1:
if isinstance(arguments[0],Exception): text = str(arguments[0]).split('\n')
else:
self._errors = arguments[0]
elif len(arguments) > 1:
text = list(arguments)
if text:
self._errors = []
while len(text[0]) == 0: del text[0]
lstrip = 0
@ -43,8 +52,6 @@ class ErrorMessage ( Exception ):
self._errors += [ line[lstrip:] ]
else:
self._errors += [ line.lstrip() ]
else:
self._errors = message
return
def __str__ ( self ):
@ -68,15 +75,23 @@ class ErrorMessage ( Exception ):
self._errors += [ message ]
return
def terminate ( self ):
print self
sys.exit(self._code)
def _getCode ( self ): return self._code
code = property(_getCode)
@staticmethod
def wrapPrint ( e, footer=None ):
showTrace = False
if not isinstance(e,ErrorMessage):
if isinstance(e,Hurricane.ConstructorError) or \
isinstance(e,Hurricane.HurricaneError):
ewrap = ErrorMessage(e)
ewrap = ErrorMessage(1,e)
else:
ewrap = ErrorMessage('An unmanaged Python exception occurred:')
ewrap = ErrorMessage(3,'An unmanaged Python exception occurred:')
ewrap.addMessage(str(e))
showTrace = True
else:
@ -103,3 +118,27 @@ class WarningMessage ( Exception ):
else: formatted += " %s" % self._warnings[i]
if i+1 < len(self._warnings): formatted += "\n"
return formatted
for (modulePath,moduleLine,contextType,lineContent) in traceback.extract_stack():
if modulePath.endswith('/coriolisInit.py'):
reSysConfDir = re.compile(r'.*etc\/coriolis2')
print ' o Locating configuration directory:'
for path in sys.path:
if reSysConfDir.match(path):
sysConfDir = path
print ' - <%s>' % sysConfDir
break
if not sysConfDir:
coriolisTop = os.getenv('CORIOLIS_TOP')
if coriolisTop == '/usr':
sysConfDir = '/etc/coriolis2'
elif coriolisTop:
sysConfDir = os.path.join(coriolisTop,'/etc/coriolis2')
else:
raise ErrorMessage( 1, [ 'Cannot locate the directoty holding the configuration files.'
, 'The path is something ending by <.../etc/coriolis2>.'] )
break

View File

@ -6,6 +6,7 @@ print " - Loading Misc. configuration."
# Misc. parameters.
Cfg.getParamBool("misc.catchCore" ).setBool(False)
Cfg.getParamBool("misc.info" ).setBool(True )
Cfg.getParamBool("misc.bug" ).setBool(False)
Cfg.getParamBool("misc.logMode" ).setBool(True )
Cfg.getParamBool("misc.verboseLevel1").setBool(True )
Cfg.getParamBool("misc.verboseLevel2").setBool(False)
@ -20,6 +21,7 @@ layout.addTitle ( "Misc.", "Miscellaneous" )
layout.addParameter ( "Misc.", "misc.catchCore" , "Catch Core Dumps", 1 )
layout.addParameter ( "Misc.", "misc.verboseLevel1", "Verbose" , 0 )
layout.addParameter ( "Misc.", "misc.verboseLevel2", "Very Verbose" , 0 )
layout.addParameter ( "Misc.", "misc.info" , "Show Info" , 0 )
layout.addParameter ( "Misc.", "misc.info" , "Show Infos" , 0 )
layout.addParameter ( "Misc.", "misc.bug" , "Show Bugs" , 0 )
layout.addParameter ( "Misc.", "misc.logMode" , "Output is a TTY" , 0 )
layout.addParameter ( "Misc.", "misc.traceLevel" , "Trace Level" , 1 )

View File

@ -2,7 +2,7 @@
include ( ${QT_USE_FILE} )
include_directories ( ${CRLCORE_SOURCE_DIR}/src/ccore
${HURRICANE_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
${Boost_INCLUDE_DIR}
)
set ( mocincludes Cyclop.h
@ -34,6 +34,7 @@
${PYTHON_LIBRARIES}
-lutil
${LIBXML2_LIBRARIES}
${LIBEXECINFO_LIBRARIES}
)
install ( TARGETS cyclop DESTINATION bin )

View File

@ -18,6 +18,7 @@
${CIF_INCLUDE_DIR}
${CONFIGURATION_INCLUDE_DIR}
${PYTHON_INCLUDE_PATH}
${Boost_INCLUDE_DIR}
)
add_definitions ( -DCORIOLIS_TOP="${CORIOLIS_TOP}"

View File

@ -10,5 +10,7 @@
link_directories ( ${CRLCORE_BINARY_DIR}/src/ccore )
add_executable ( cx2y ${cpps} )
target_link_libraries ( cx2y crlcore )
target_link_libraries ( cx2y crlcore
${LIBEXECINFO_LIBRARIES}
)
install ( TARGETS cx2y DESTINATION bin )