* 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:
parent
1334caad6d
commit
2012f14acf
|
@ -29,6 +29,8 @@
|
||||||
find_package(OPENACCESS)
|
find_package(OPENACCESS)
|
||||||
find_package(VLSISAPD REQUIRED)
|
find_package(VLSISAPD REQUIRED)
|
||||||
find_package(HURRICANE REQUIRED)
|
find_package(HURRICANE REQUIRED)
|
||||||
|
find_package(Boost REQUIRED)
|
||||||
|
find_package(Libexecinfo REQUIRED)
|
||||||
if(BUILD_DOC)
|
if(BUILD_DOC)
|
||||||
include(UseLATEX)
|
include(UseLATEX)
|
||||||
endif(BUILD_DOC)
|
endif(BUILD_DOC)
|
||||||
|
|
|
@ -4,30 +4,6 @@ html, body, th, td, tr, p, li, h1, h2, h3, h4, h5, h6 {
|
||||||
font-family: verdana, sans-serif;
|
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 {
|
body {
|
||||||
color: black;
|
color: black;
|
||||||
background: white;
|
background: white;
|
||||||
|
@ -44,6 +20,28 @@ body {
|
||||||
margin-left: 30%;
|
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 {
|
hr {
|
||||||
color: #09550b;
|
color: #09550b;
|
||||||
border: 1px dotted #09550b;
|
border: 1px dotted #09550b;
|
||||||
|
@ -58,6 +56,15 @@ div#centered {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p, li {
|
||||||
|
text-align: justify;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sc {
|
||||||
|
font-variant: small-caps;
|
||||||
|
font-size: 110%;
|
||||||
|
}
|
||||||
|
|
||||||
pre, tt, code {
|
pre, tt, code {
|
||||||
font-family: "courrier", "andale mono", monospace;
|
font-family: "courrier", "andale mono", monospace;
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
|
@ -98,6 +105,32 @@ a:hover, a:focus, a:visited {
|
||||||
border-bottom: 1px dotted #09550b;
|
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 {
|
p.credit {
|
||||||
margin-left: 10%;
|
margin-left: 10%;
|
||||||
margin-right: 10%;
|
margin-right: 10%;
|
||||||
|
@ -544,6 +577,47 @@ div.topic p.first {
|
||||||
font-weight: bold;
|
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 {
|
table.wiki th, table th {
|
||||||
color: black;
|
color: black;
|
||||||
background: #FFFFCC;
|
background: #FFFFCC;
|
||||||
|
|
|
@ -4,53 +4,65 @@
|
||||||
<title>Coriolis 2 Documentation</title>
|
<title>Coriolis 2 Documentation</title>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
<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>
|
</head>
|
||||||
<body>
|
<body class="gsummary">
|
||||||
<h1>Coriolis 2 Documentation</h1>
|
<h1>Coriolis 2 Documentation</h1>
|
||||||
<table width=80% align="center">
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left">
|
<td align="left">
|
||||||
<ul><li><a href="./README/index.html">R<small>EADME</small></a><br>
|
<ul><li><a href="./en/html/users-guide/UsersGuide.html">
|
||||||
General README about Coriolis 2
|
<span class="sc">General User's Guide</span></a><br>
|
||||||
|
General User's Guide of Coriolis 2
|
||||||
</li></ul>
|
</li></ul>
|
||||||
</td>
|
</td>
|
||||||
<td align="left">
|
<td align="left">
|
||||||
<ul><li><a href="./en/html/stratus/index.html">S<small>TRATUS</small></a></br>
|
<ul><li><a href="./en/html/hurricane/index.html"><span class="sc">Hurricane</span></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>
|
|
||||||
Hurricane Database
|
Hurricane Database
|
||||||
</li></ul>
|
</li></ul>
|
||||||
</td>
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td align="left">
|
<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
|
Stratus Extension for Data-Pathes
|
||||||
</li></ul>
|
</li></ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="left">
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left">
|
<td align="left">
|
||||||
</td>
|
<ul><li><a href="./en/html/patterns/index.html"><span class="sc">Patterns</small></a><br>
|
||||||
<td align="left">
|
|
||||||
<ul><li><a href="./en/html/patterns/index.html">P<small>ATTERNS</small></a><br>
|
|
||||||
Stratus Extension for Pattern generation
|
Stratus Extension for Pattern generation
|
||||||
</li></ul>
|
</li></ul>
|
||||||
</td>
|
</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>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left">
|
<td align="left">
|
||||||
</td>
|
</td>
|
||||||
<td align="left">
|
<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
|
Stratus internal's Documentation
|
||||||
</li></ul>
|
</li></ul>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -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_symbolic.conf DESTINATION ${SYS_CONF_DIR}/coriolis2 )
|
||||||
install ( FILES technology_cmos130_s2r.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 )
|
install ( FILES misc.conf DESTINATION ${SYS_CONF_DIR}/coriolis2 )
|
||||||
|
|
|
@ -7,7 +7,7 @@ parametersTable = \
|
||||||
, ("katabatic.saturateRp" ,TypeInt ,8 )
|
, ("katabatic.saturateRp" ,TypeInt ,8 )
|
||||||
, ("kite.borderRipupLimit" ,TypeInt ,26 )
|
, ("kite.borderRipupLimit" ,TypeInt ,26 )
|
||||||
# Kite parameters.
|
# Kite parameters.
|
||||||
, ("kite.edgeCapacity" ,TypePercentage,65 , { 'min':0, 'max':110 } )
|
, ("kite.edgeCapacity" ,TypePercentage,75 , { 'min':0, 'max':110 } )
|
||||||
, ("kite.eventsLimit" ,TypeInt ,4000002)
|
, ("kite.eventsLimit" ,TypeInt ,4000002)
|
||||||
, ("kite.ripupCost" ,TypeInt ,3 , { 'min':0 } )
|
, ("kite.ripupCost" ,TypeInt ,3 , { 'min':0 } )
|
||||||
, ("kite.globalRipupLimit" ,TypeInt ,5 , { 'min':1 } )
|
, ("kite.globalRipupLimit" ,TypeInt ,5 , { 'min':1 } )
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
|
|
||||||
parametersTable = \
|
parametersTable = \
|
||||||
( ('misc.catchCore' , TypeBool, False)
|
( ('misc.catchCore' , TypeBool, False)
|
||||||
, ('misc.info' , TypeBool, True )
|
, ('misc.info' , TypeBool, False)
|
||||||
|
, ('misc.bug' , TypeBool, False)
|
||||||
, ('misc.logMode' , TypeBool, False)
|
, ('misc.logMode' , TypeBool, False)
|
||||||
, ('misc.verboseLevel1', TypeBool, True )
|
, ('misc.verboseLevel1', TypeBool, True )
|
||||||
, ('misc.verboseLevel2', TypeBool, False)
|
, ('misc.verboseLevel2', TypeBool, False)
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
parametersTable = \
|
parametersTable = \
|
||||||
( ("stratus1.mappingName", TypeString, "./stratus2sxlib.xml",
|
( ("stratus1.mappingName", TypeString, "./stratus2sxlib.xml",
|
||||||
{ 'flags':Cfg.Parameter.Flags.NeedRestart|Cfg.Parameter.Flags.MustExist } )
|
{ '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" )
|
( (TypeTab ,"Stratus1", "stratus1" )
|
||||||
, (TypeTitle , "Stratus1 - Netlist & Layout Capture" )
|
, (TypeTitle , "Stratus1 - Netlist & Layout Capture" )
|
||||||
, (TypeOption, "stratus1.mappingName", "Virtual Library Translation", 0, 2 )
|
, (TypeOption, "stratus1.mappingName", "Virtual Library Translation", 0, 2 )
|
||||||
|
, (TypeOption, "stratus1.format" , "Netlist Format (vst, vhd)" , 0, 2 )
|
||||||
|
, (TypeOption, "stratus1.simulator" , "Simulator" , 0, 2 )
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
add_subdirectory(ccore)
|
add_subdirectory(ccore)
|
||||||
add_subdirectory(pyCRL)
|
add_subdirectory(pyCRL)
|
||||||
|
add_subdirectory(crlcore)
|
||||||
add_subdirectory(cyclop)
|
add_subdirectory(cyclop)
|
||||||
add_subdirectory(x2y)
|
add_subdirectory(x2y)
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
${CIF_INCLUDE_DIR}
|
${CIF_INCLUDE_DIR}
|
||||||
${CONFIGURATION_INCLUDE_DIR}
|
${CONFIGURATION_INCLUDE_DIR}
|
||||||
${PYTHON_INCLUDE_PATH}
|
${PYTHON_INCLUDE_PATH}
|
||||||
${Boost_INCLUDE_DIRS}
|
${Boost_INCLUDE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_definitions ( -DCORIOLIS_TOP="${CORIOLIS_TOP}"
|
add_definitions ( -DCORIOLIS_TOP="${CORIOLIS_TOP}"
|
||||||
|
|
|
@ -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 )
|
void catchCoreChanged ( Cfg::Parameter* p )
|
||||||
{
|
{
|
||||||
System::setCatchCore ( p->asBool() );
|
System::setCatchCore ( p->asBool() );
|
||||||
|
@ -110,6 +117,7 @@ mstream cmess0 ( mstream::Verbose0, std::cout );
|
||||||
mstream cmess1 ( mstream::Verbose1, std::cout );
|
mstream cmess1 ( mstream::Verbose1, std::cout );
|
||||||
mstream cmess2 ( mstream::Verbose2, std::cout );
|
mstream cmess2 ( mstream::Verbose2, std::cout );
|
||||||
mstream cinfo ( mstream::Info , 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.
|
// Early setting of python pathes to be able to execute configuration scripts.
|
||||||
bfs::path pythonSitePackages = PYTHON_SITE_PACKAGES;
|
bfs::path pythonSitePackages = PYTHON_SITE_PACKAGES;
|
||||||
pythonSitePackages = arguments["coriolis_top"].as<string>() / pythonSitePackages;
|
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 stratusDir = pythonSitePackages / "stratus";
|
||||||
bfs::path cumulusDir = pythonSitePackages / "cumulus";
|
bfs::path cumulusDir = pythonSitePackages / "cumulus";
|
||||||
|
|
||||||
Isobar::Script::addPath ( sysConfDir.string() );
|
Isobar::Script::addPath ( sysConfDir.string() );
|
||||||
Isobar::Script::addPath ( pythonSitePackages.string() );
|
Isobar::Script::addPath ( pythonSitePackages.string() );
|
||||||
|
Isobar::Script::addPath ( crlcoreDir.string() );
|
||||||
Isobar::Script::addPath ( stratusDir.string() );
|
Isobar::Script::addPath ( stratusDir.string() );
|
||||||
Isobar::Script::addPath ( cumulusDir.string() );
|
Isobar::Script::addPath ( cumulusDir.string() );
|
||||||
|
|
||||||
|
@ -306,6 +317,7 @@ namespace CRL {
|
||||||
Cfg::getParamBool ("misc.verboseLevel1" ,true )->registerCb ( verboseLevel1Changed );
|
Cfg::getParamBool ("misc.verboseLevel1" ,true )->registerCb ( verboseLevel1Changed );
|
||||||
Cfg::getParamBool ("misc.verboseLevel2" ,true )->registerCb ( verboseLevel2Changed );
|
Cfg::getParamBool ("misc.verboseLevel2" ,true )->registerCb ( verboseLevel2Changed );
|
||||||
Cfg::getParamBool ("misc.info" ,false)->registerCb ( infoChanged );
|
Cfg::getParamBool ("misc.info" ,false)->registerCb ( infoChanged );
|
||||||
|
Cfg::getParamBool ("misc.bug" ,false)->registerCb ( bugChanged );
|
||||||
Cfg::getParamBool ("misc.logMode" ,false)->registerCb ( logModeChanged );
|
Cfg::getParamBool ("misc.logMode" ,false)->registerCb ( logModeChanged );
|
||||||
Cfg::getParamInt ("misc.traceLevel" ,1000 )->registerCb ( traceLevelChanged );
|
Cfg::getParamInt ("misc.traceLevel" ,1000 )->registerCb ( traceLevelChanged );
|
||||||
Cfg::getParamString("stratus1.mappingName","./stratus2sxlib.xml")->registerCb ( stratus1MappingNameChanged );
|
Cfg::getParamString("stratus1.mappingName","./stratus2sxlib.xml")->registerCb ( stratus1MappingNameChanged );
|
||||||
|
@ -315,6 +327,7 @@ namespace CRL {
|
||||||
verboseLevel1Changed ( Cfg::getParamBool("misc.verboseLevel1") );
|
verboseLevel1Changed ( Cfg::getParamBool("misc.verboseLevel1") );
|
||||||
verboseLevel2Changed ( Cfg::getParamBool("misc.verboseLevel2") );
|
verboseLevel2Changed ( Cfg::getParamBool("misc.verboseLevel2") );
|
||||||
infoChanged ( Cfg::getParamBool("misc.info" ) );
|
infoChanged ( Cfg::getParamBool("misc.info" ) );
|
||||||
|
bugChanged ( Cfg::getParamBool("misc.bug" ) );
|
||||||
logModeChanged ( Cfg::getParamBool("misc.logMode" ) );
|
logModeChanged ( Cfg::getParamBool("misc.logMode" ) );
|
||||||
traceLevelChanged ( Cfg::getParamInt ("misc.traceLevel" ) );
|
traceLevelChanged ( Cfg::getParamInt ("misc.traceLevel" ) );
|
||||||
|
|
||||||
|
@ -408,6 +421,7 @@ namespace CRL {
|
||||||
{
|
{
|
||||||
Cfg::Configuration* conf = Cfg::Configuration::get ();
|
Cfg::Configuration* conf = Cfg::Configuration::get ();
|
||||||
bfs::path sysConfDir = getPath("etc");
|
bfs::path sysConfDir = getPath("etc");
|
||||||
|
bfs::path pythonSitePackages = getPath("pythonSitePackages");
|
||||||
|
|
||||||
#if XML_NOT_DISABLED
|
#if XML_NOT_DISABLED
|
||||||
bool systemConfFound = false;
|
bool systemConfFound = false;
|
||||||
|
@ -422,11 +436,11 @@ namespace CRL {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool systemConfFound = false;
|
bool systemConfFound = false;
|
||||||
bfs::path systemConfFile = sysConfDir / "coriolisInit.py";
|
bfs::path systemConfFile = pythonSitePackages / "crlcore" / "coriolisInit.py";
|
||||||
if ( bfs::exists(systemConfFile) ) {
|
if ( bfs::exists(systemConfFile) ) {
|
||||||
systemConfFound = true;
|
systemConfFound = true;
|
||||||
cout << " o Reading python dot configuration:" << endl;
|
//cout << " o Reading python dot configuration:" << endl;
|
||||||
cout << " - <" << systemConfFile.string() << ">." << endl;
|
//cout << " - <" << systemConfFile.string() << ">." << endl;
|
||||||
|
|
||||||
Isobar::Script* systemScript = Isobar::Script::create(systemConfFile.stem());
|
Isobar::Script* systemScript = Isobar::Script::create(systemConfFile.stem());
|
||||||
systemScript->runFunction("coriolisConfigure",NULL,Isobar::Script::NoScriptArgs);
|
systemScript->runFunction("coriolisConfigure",NULL,Isobar::Script::NoScriptArgs);
|
||||||
|
|
|
@ -2,14 +2,9 @@
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// 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 |
|
// | C O R I O L I S |
|
||||||
// | Alliance / Hurricane Interface |
|
// | Alliance / Hurricane Interface |
|
||||||
// | |
|
// | |
|
||||||
|
@ -17,10 +12,7 @@
|
||||||
// | E-mail : Christophe.Alexandre@asim.lip6.fr |
|
// | E-mail : Christophe.Alexandre@asim.lip6.fr |
|
||||||
// | =============================================================== |
|
// | =============================================================== |
|
||||||
// | C++ Header : "./ParsersDrivers.h" |
|
// | C++ Header : "./ParsersDrivers.h" |
|
||||||
// | *************************************************************** |
|
// +-----------------------------------------------------------------+
|
||||||
// | U p d a t e s |
|
|
||||||
// | |
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
|
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
@ -40,6 +32,7 @@ using namespace std;
|
||||||
#include "hurricane/Warning.h"
|
#include "hurricane/Warning.h"
|
||||||
|
|
||||||
#include "Ap.h"
|
#include "Ap.h"
|
||||||
|
#include "crlcore/Catalog.h"
|
||||||
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -452,6 +445,7 @@ void apDriver( const string cellPath, Cell *cell, unsigned int &saveState) {
|
||||||
DumpReference(ccell, cell);
|
DumpReference(ccell, cell);
|
||||||
ccell << "EOF" << endl;
|
ccell << "EOF" << endl;
|
||||||
ccell.close ();
|
ccell.close ();
|
||||||
|
CRL::CatalogExtension::setPhysical(cell, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,40 +1,8 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Project.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved
|
||||||
// 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$
|
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
@ -44,9 +12,6 @@
|
||||||
// | E-mail : Christian.Masson@lip6.fr |
|
// | E-mail : Christian.Masson@lip6.fr |
|
||||||
// | =============================================================== |
|
// | =============================================================== |
|
||||||
// | C++ Module : "./ApParser.cpp" |
|
// | C++ Module : "./ApParser.cpp" |
|
||||||
// | |
|
|
||||||
// | 05/06/2008 - Jean-Paul Chaput |
|
|
||||||
// | Complete rewrite & simplification. |
|
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -312,9 +312,9 @@ void DumpPortList(ofstream &ccell, Cell* cell)
|
||||||
+ ": "
|
+ ": "
|
||||||
+ getNetDirection(net1)
|
+ getNetDirection(net1)
|
||||||
+ vectorType
|
+ vectorType
|
||||||
+ index1StringStream.str()
|
|
||||||
+ " to "
|
|
||||||
+ index2StringStream.str()
|
+ index2StringStream.str()
|
||||||
|
+ " downto "
|
||||||
|
+ index1StringStream.str()
|
||||||
+ ")"
|
+ ")"
|
||||||
+ busType);
|
+ busType);
|
||||||
}
|
}
|
||||||
|
@ -400,9 +400,9 @@ void DumpSignalList(ofstream &ccell, Cell* cell)
|
||||||
<< name
|
<< name
|
||||||
<< string(biggestName - name.size() + 1, ' ')
|
<< string(biggestName - name.size() + 1, ' ')
|
||||||
<< ": bit_vector("
|
<< ": bit_vector("
|
||||||
<< index1StringStream.str()
|
|
||||||
<< " to "
|
|
||||||
<< index2StringStream.str()
|
<< index2StringStream.str()
|
||||||
|
<< " downto "
|
||||||
|
<< index1StringStream.str()
|
||||||
<< ");"
|
<< ");"
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
@ -552,7 +552,7 @@ void DumpConnectionList(ofstream &ccell, Instance*instance)
|
||||||
|
|
||||||
if (vectorFound)
|
if (vectorFound)
|
||||||
{
|
{
|
||||||
if (index2 < index1)
|
if (index2 > index1)
|
||||||
reverse(plugConnectedVector.begin(), plugConnectedVector.end());
|
reverse(plugConnectedVector.begin(), plugConnectedVector.end());
|
||||||
string connections;
|
string connections;
|
||||||
PlugVector::const_iterator pvit = plugConnectedVector.begin();
|
PlugVector::const_iterator pvit = plugConnectedVector.begin();
|
||||||
|
|
|
@ -265,6 +265,7 @@ inline std::string tty::bgcolor ( unsigned int mask )
|
||||||
, Verbose1 = (1<<1)
|
, Verbose1 = (1<<1)
|
||||||
, Verbose2 = (1<<2)
|
, Verbose2 = (1<<2)
|
||||||
, Info = (1<<3)
|
, Info = (1<<3)
|
||||||
|
, Bug = (1<<4)
|
||||||
, VerboseLevel0 = Verbose0
|
, VerboseLevel0 = Verbose0
|
||||||
, VerboseLevel1 = Verbose0|Verbose1
|
, VerboseLevel1 = Verbose0|Verbose1
|
||||||
, VerboseLevel2 = Verbose0|Verbose1|Verbose2
|
, VerboseLevel2 = Verbose0|Verbose1|Verbose2
|
||||||
|
@ -343,6 +344,7 @@ extern mstream cmess0;
|
||||||
extern mstream cmess1;
|
extern mstream cmess1;
|
||||||
extern mstream cmess2;
|
extern mstream cmess2;
|
||||||
extern mstream cinfo;
|
extern mstream cinfo;
|
||||||
|
extern mstream cbug;
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
|
|
|
@ -4,10 +4,6 @@
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved
|
// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved
|
||||||
//
|
//
|
||||||
// ===================================================================
|
|
||||||
//
|
|
||||||
// $Id$
|
|
||||||
//
|
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
// | Alliance / Hurricane Interface |
|
// | Alliance / Hurricane Interface |
|
||||||
|
|
|
@ -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 )
|
|
@ -43,7 +43,7 @@ def _loadAllianceConfig ( af, allianceConfig ):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if len(entry) != 2:
|
if len(entry) != 2:
|
||||||
raise ErrorMessage(['Malformed entry in <allianceConfig>.'
|
raise ErrorMessage(1,['Malformed entry in <allianceConfig>.'
|
||||||
,'Must have exactly two fields ("key", <value>).'
|
,'Must have exactly two fields ("key", <value>).'
|
||||||
,str(entry)
|
,str(entry)
|
||||||
])
|
])
|
||||||
|
@ -66,7 +66,7 @@ def _loadAllianceConfig ( af, allianceConfig ):
|
||||||
if key == 'SYSTEM_LIBRARY':
|
if key == 'SYSTEM_LIBRARY':
|
||||||
for libraryEntry in value:
|
for libraryEntry in value:
|
||||||
if len(libraryEntry) != 2:
|
if len(libraryEntry) != 2:
|
||||||
raise ErrorMessage(['Malformed system library entry in <allianceConfig>.'
|
raise ErrorMessage(1,['Malformed system library entry in <allianceConfig>.'
|
||||||
,'Must have exactly two fields ("path", <mode>).'
|
,'Must have exactly two fields ("path", <mode>).'
|
||||||
,str(libraryEntry)
|
,str(libraryEntry)
|
||||||
])
|
])
|
||||||
|
@ -101,12 +101,12 @@ def loadRoutingGaugesTable ( routingGaugesTable, fromFile ):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if len(entry) != 2:
|
if len(entry) != 2:
|
||||||
raise ErrorMessage(['Malformed entry in <routingGaugesTable[%s]>.' % gaugeName
|
raise ErrorMessage(1,['Malformed entry in <routingGaugesTable[%s]>.' % gaugeName
|
||||||
,'Must have exactly two fields ("METAL_LAYER", (parameters_list)).'
|
,'Must have exactly two fields ("METAL_LAYER", (parameters_list)).'
|
||||||
,str(entry)
|
,str(entry)
|
||||||
])
|
])
|
||||||
if len(entry[1]) != 8:
|
if len(entry[1]) != 8:
|
||||||
raise ErrorMessage(['Malformed entry in <routingGaugesTable[%s]>.' % gaugeName
|
raise ErrorMessage(1,['Malformed entry in <routingGaugesTable[%s]>.' % gaugeName
|
||||||
,'Parameters list must have exactly eight fields:'
|
,'Parameters list must have exactly eight fields:'
|
||||||
,' (direction, type, depth, density, offset, pitch, wire_width, via_width)'
|
,' (direction, type, depth, density, offset, pitch, wire_width, via_width)'
|
||||||
,str(entry)
|
,str(entry)
|
||||||
|
@ -142,7 +142,7 @@ def loadCellGaugesTable ( cellGaugesTable, fromFile ):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if len(gaugeDatas) != 4:
|
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:'
|
,'Parameters list must have exactly four fields:'
|
||||||
,' (terminal_metal, xy_common_pitch, slice_height, slice_step)'
|
,' (terminal_metal, xy_common_pitch, slice_height, slice_step)'
|
||||||
,str(gaugeDatas)
|
,str(gaugeDatas)
|
|
@ -75,7 +75,7 @@ def loadParameters ( parametersData, fromFile ):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if len(entry) < 3:
|
if len(entry) < 3:
|
||||||
raise ErrorMessage(['Malformed entry in <parametersTable>.'
|
raise ErrorMessage(1,['Malformed entry in <parametersTable>.'
|
||||||
,'Less than three fields: (path_name, Type, default_value [,options]).'
|
,'Less than three fields: (path_name, Type, default_value [,options]).'
|
||||||
,str(entry)
|
,str(entry)
|
||||||
])
|
])
|
||||||
|
@ -85,7 +85,7 @@ def loadParameters ( parametersData, fromFile ):
|
||||||
elif len(entry) == 4:
|
elif len(entry) == 4:
|
||||||
pathName, paramType, value, options = entry
|
pathName, paramType, value, options = entry
|
||||||
else:
|
else:
|
||||||
raise ErrorMessage(['Malformed entry in <parametersTable>.'
|
raise ErrorMessage(1,['Malformed entry in <parametersTable>.'
|
||||||
,'More than four fields: (path_name, Type, default_value [,options]).'
|
,'More than four fields: (path_name, Type, default_value [,options]).'
|
||||||
,str(entry)
|
,str(entry)
|
||||||
])
|
])
|
||||||
|
@ -140,13 +140,13 @@ def loadLayout ( layoutData, fromFile ):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if not isinstance(entry,tuple):
|
if not isinstance(entry,tuple):
|
||||||
raise ErrorMessage(['Malformed entry in <layoutTable>.'
|
raise ErrorMessage(1,['Malformed entry in <layoutTable>.'
|
||||||
,'Not a tuple (a, b, c, ...) or (a,).'
|
,'Not a tuple (a, b, c, ...) or (a,).'
|
||||||
,str(entry)
|
,str(entry)
|
||||||
])
|
])
|
||||||
if entry[0] == TypeTab:
|
if entry[0] == TypeTab:
|
||||||
if len(entry) != 3:
|
if len(entry) != 3:
|
||||||
raise ErrorMessage(['Malformed entry in <layoutTable>.'
|
raise ErrorMessage(1,['Malformed entry in <layoutTable>.'
|
||||||
,'Tab must have exactly three fields: (TypeTab, tab_name, tag).'
|
,'Tab must have exactly three fields: (TypeTab, tab_name, tag).'
|
||||||
,str(entry)
|
,str(entry)
|
||||||
])
|
])
|
||||||
|
@ -154,13 +154,13 @@ def loadLayout ( layoutData, fromFile ):
|
||||||
layout.addTab ( tabName, tagName )
|
layout.addTab ( tabName, tagName )
|
||||||
|
|
||||||
if not tabName:
|
if not tabName:
|
||||||
raise ErrorMessage(['Bad entry order in <layoutTable>.'
|
raise ErrorMessage(1,['Bad entry order in <layoutTable>.'
|
||||||
,'First entry must be of Tab type.'
|
,'First entry must be of Tab type.'
|
||||||
])
|
])
|
||||||
|
|
||||||
if entry[0] == TypeTitle:
|
if entry[0] == TypeTitle:
|
||||||
if len(entry) != 2:
|
if len(entry) != 2:
|
||||||
raise ErrorMessage(['Malformed entry in <layoutTable>.'
|
raise ErrorMessage(1,['Malformed entry in <layoutTable>.'
|
||||||
,'Title must have exactly two fields: (TypeTitle, title).'
|
,'Title must have exactly two fields: (TypeTitle, title).'
|
||||||
,str(entry)
|
,str(entry)
|
||||||
])
|
])
|
||||||
|
@ -168,7 +168,7 @@ def loadLayout ( layoutData, fromFile ):
|
||||||
layout.addTitle ( tabName, title )
|
layout.addTitle ( tabName, title )
|
||||||
elif entry[0] == TypeSection:
|
elif entry[0] == TypeSection:
|
||||||
if len(entry) != 3:
|
if len(entry) != 3:
|
||||||
raise ErrorMessage(['Malformed entry in <layoutTable>.'
|
raise ErrorMessage(1,['Malformed entry in <layoutTable>.'
|
||||||
,'Section must have exactly three fields: (TypeSection, section, column).'
|
,'Section must have exactly three fields: (TypeSection, section, column).'
|
||||||
,str(entry)
|
,str(entry)
|
||||||
])
|
])
|
||||||
|
@ -176,14 +176,14 @@ def loadLayout ( layoutData, fromFile ):
|
||||||
layout.addSection ( tabName, section, column )
|
layout.addSection ( tabName, section, column )
|
||||||
elif entry[0] == TypeRule:
|
elif entry[0] == TypeRule:
|
||||||
if len(entry) != 1:
|
if len(entry) != 1:
|
||||||
raise ErrorMessage(['Malformed entry in <layoutTable>.'
|
raise ErrorMessage(1,['Malformed entry in <layoutTable>.'
|
||||||
,'Rule must have exactly one fields: (TypeRule,).'
|
,'Rule must have exactly one fields: (TypeRule,).'
|
||||||
,str(entry)
|
,str(entry)
|
||||||
])
|
])
|
||||||
layout.addRule ( tabName )
|
layout.addRule ( tabName )
|
||||||
elif entry[0] == TypeOption:
|
elif entry[0] == TypeOption:
|
||||||
if len(entry) < 4:
|
if len(entry) < 4:
|
||||||
raise ErrorMessage(['Malformed entry in <layoutTable>.'
|
raise ErrorMessage(1,['Malformed entry in <layoutTable>.'
|
||||||
,'Option must have at least four fields: (TypeOption,path_name,text,column[,span,flags]).'
|
,'Option must have at least four fields: (TypeOption,path_name,text,column[,span,flags]).'
|
||||||
,str(entry)
|
,str(entry)
|
||||||
])
|
])
|
|
@ -41,7 +41,7 @@ def checkAttribute ( options, attribute, goodType ):
|
||||||
if goodType == float and isinstance(options[attribute],int): return True
|
if goodType == float and isinstance(options[attribute],int): return True
|
||||||
|
|
||||||
if not isinstance(options[attribute],goodType):
|
if not isinstance(options[attribute],goodType):
|
||||||
raise ErrorMessage(
|
raise ErrorMessage( 1,
|
||||||
['The <%s> attribute of Drawing must be %s, not %s.' \
|
['The <%s> attribute of Drawing must be %s, not %s.' \
|
||||||
% (attribute,str(goodType).split("'")[1],helpers.stype(options[attribute]))
|
% (attribute,str(goodType).split("'")[1],helpers.stype(options[attribute]))
|
||||||
,str(options[attribute])])
|
,str(options[attribute])])
|
||||||
|
@ -50,7 +50,7 @@ def checkAttribute ( options, attribute, goodType ):
|
||||||
|
|
||||||
def checkColor ( color ):
|
def checkColor ( color ):
|
||||||
if not isinstance(color,str):
|
if not isinstance(color,str):
|
||||||
raise ErrorMessage(
|
raise ErrorMessage( 1,
|
||||||
['The <color> attribute of Drawing must be str, not %s.' % (helpers.stype(color))
|
['The <color> attribute of Drawing must be str, not %s.' % (helpers.stype(color))
|
||||||
,str(options[attribute])])
|
,str(options[attribute])])
|
||||||
|
|
||||||
|
@ -61,11 +61,11 @@ def checkColor ( color ):
|
||||||
if color[0] == '#':
|
if color[0] == '#':
|
||||||
for digit in color[1:]:
|
for digit in color[1:]:
|
||||||
if not digit in string.hexdigits:
|
if not digit in string.hexdigits:
|
||||||
raise ErrorMessage(
|
raise ErrorMessage( 1,
|
||||||
['Non-hexadecimal digit \'%c\' in <color> attribute of Drawing.' % digit
|
['Non-hexadecimal digit \'%c\' in <color> attribute of Drawing.' % digit
|
||||||
,color])
|
,color])
|
||||||
if len(color) != 7:
|
if len(color) != 7:
|
||||||
raise ErrorMessage(
|
raise ErrorMessage( 1,
|
||||||
['<color> attribute of Drawing do not have exactly six digits.' % digit
|
['<color> attribute of Drawing do not have exactly six digits.' % digit
|
||||||
,color])
|
,color])
|
||||||
return color
|
return color
|
||||||
|
@ -73,19 +73,19 @@ def checkColor ( color ):
|
||||||
# Try a RGB tuple (R,G,B).
|
# Try a RGB tuple (R,G,B).
|
||||||
rgb = color.split(',')
|
rgb = color.split(',')
|
||||||
if len(rgb) != 3:
|
if len(rgb) != 3:
|
||||||
raise ErrorMessage(
|
raise ErrorMessage( 1,
|
||||||
['<color> attribute of Drawing is neither hexa nor RGB nor predefined.'
|
['<color> attribute of Drawing is neither hexa nor RGB nor predefined.'
|
||||||
,color])
|
,color])
|
||||||
|
|
||||||
for component in rgb:
|
for component in rgb:
|
||||||
for digit in component:
|
for digit in component:
|
||||||
if not digit in string.digits:
|
if not digit in string.digits:
|
||||||
raise ErrorMessage(
|
raise ErrorMessage( 1,
|
||||||
['Bad RGB <color> component \'%s\' of Drawing, not an integer.' % component
|
['Bad RGB <color> component \'%s\' of Drawing, not an integer.' % component
|
||||||
,color])
|
,color])
|
||||||
value = int(component)
|
value = int(component)
|
||||||
if value < 0 or value > 255:
|
if value < 0 or value > 255:
|
||||||
raise ErrorMessage(
|
raise ErrorMessage( 1,
|
||||||
['Bad RGB <color> component \'%s\' of Drawing, not between 0 and 255.' % component
|
['Bad RGB <color> component \'%s\' of Drawing, not between 0 and 255.' % component
|
||||||
,color])
|
,color])
|
||||||
return color
|
return color
|
||||||
|
@ -136,42 +136,42 @@ def loadStyleTuple ( styleTuple ):
|
||||||
try:
|
try:
|
||||||
if styleEntry[0] == Style:
|
if styleEntry[0] == Style:
|
||||||
if len(styleEntry) != 3:
|
if len(styleEntry) != 3:
|
||||||
raise ErrorMessage(['Malformed entry in <styleTable>.'
|
raise ErrorMessage(1,['Malformed entry in <styleTable>.'
|
||||||
,'Style must have exactly three fields: (Style,id,description).'
|
,'Style must have exactly three fields: (Style,id,description).'
|
||||||
,str(styleEntry)
|
,str(styleEntry)
|
||||||
])
|
])
|
||||||
styleType, styleId, description = styleEntry
|
styleType, styleId, description = styleEntry
|
||||||
|
|
||||||
if not isinstance(styleId,str):
|
if not isinstance(styleId,str):
|
||||||
raise ErrorMessage(['The second Style field, <id> must be a string, not a %s.' % helpers.stype(styleId)
|
raise ErrorMessage(1,['The second Style field, <id> must be a string, not a %s.' % helpers.stype(styleId)
|
||||||
,str(styleEntry)])
|
,str(styleEntry)])
|
||||||
if not isinstance(description,str):
|
if not isinstance(description,str):
|
||||||
raise ErrorMessage(['The third Style field, <description> must be a string, not a %s.' % helpers.stype(styleId)
|
raise ErrorMessage(1,['The third Style field, <description> must be a string, not a %s.' % helpers.stype(styleId)
|
||||||
,str(styleEntry)])
|
,str(styleEntry)])
|
||||||
|
|
||||||
style = Viewer.DisplayStyle(styleId)
|
style = Viewer.DisplayStyle(styleId)
|
||||||
style.setDescription(description)
|
style.setDescription(description)
|
||||||
|
|
||||||
if not style:
|
if not style:
|
||||||
raise ErrorMessage(['Bad entry order in <styleTable>.'
|
raise ErrorMessage(1,['Bad entry order in <styleTable>.'
|
||||||
,'First entry must be of Style type.'
|
,'First entry must be of Style type.'
|
||||||
])
|
])
|
||||||
|
|
||||||
if styleEntry[0] == Inherit:
|
if styleEntry[0] == Inherit:
|
||||||
if len(styleEntry) != 2:
|
if len(styleEntry) != 2:
|
||||||
raise ErrorMessage(['Malformed entry in <didplayTable>.'
|
raise ErrorMessage(1,['Malformed entry in <didplayTable>.'
|
||||||
,'Inherit must have exactly two fields: (Inherit,id).'
|
,'Inherit must have exactly two fields: (Inherit,id).'
|
||||||
,str(styleEntry)
|
,str(styleEntry)
|
||||||
])
|
])
|
||||||
styleType, styleId = styleEntry
|
styleType, styleId = styleEntry
|
||||||
if not isinstance(styleId,str):
|
if not isinstance(styleId,str):
|
||||||
raise ErrorMessage(['The second Inherit field, <id> must be a string, not a %s.' % helpers.stype(styleId)
|
raise ErrorMessage(1,['The second Inherit field, <id> must be a string, not a %s.' % helpers.stype(styleId)
|
||||||
,str(styleEntry)])
|
,str(styleEntry)])
|
||||||
style.inheritFrom(styleId)
|
style.inheritFrom(styleId)
|
||||||
|
|
||||||
if styleEntry[0] == Darkening:
|
if styleEntry[0] == Darkening:
|
||||||
if len(styleEntry) != 4:
|
if len(styleEntry) != 4:
|
||||||
raise ErrorMessage(['Malformed entry in <didplayTable>.'
|
raise ErrorMessage(1,['Malformed entry in <didplayTable>.'
|
||||||
,'Darkening (HSV color) must have exactly four fields: (Darkening,hue,value,saturation).'
|
,'Darkening (HSV color) must have exactly four fields: (Darkening,hue,value,saturation).'
|
||||||
,str(styleEntry)
|
,str(styleEntry)
|
||||||
])
|
])
|
||||||
|
@ -179,7 +179,7 @@ def loadStyleTuple ( styleTuple ):
|
||||||
if not isinstance(hue ,float) or \
|
if not isinstance(hue ,float) or \
|
||||||
not isinstance(value ,float) or \
|
not isinstance(value ,float) or \
|
||||||
not isinstance(saturation,float) :
|
not isinstance(saturation,float) :
|
||||||
raise ErrorMessage(['<hue>, <val> & <sat> fields of Darkening must be floats.'
|
raise ErrorMessage(1,['<hue>, <val> & <sat> fields of Darkening must be floats.'
|
||||||
,'%s is (Type, %s, %s, %s)' % (str(styleEntry)
|
,'%s is (Type, %s, %s, %s)' % (str(styleEntry)
|
||||||
,helpers.stype(hue)
|
,helpers.stype(hue)
|
||||||
,helpers.stype(value)
|
,helpers.stype(value)
|
||||||
|
@ -189,18 +189,18 @@ def loadStyleTuple ( styleTuple ):
|
||||||
|
|
||||||
elif styleEntry[0] == Group:
|
elif styleEntry[0] == Group:
|
||||||
if len(styleEntry) != 2:
|
if len(styleEntry) != 2:
|
||||||
raise ErrorMessage(['Malformed entry in <styleTable>.'
|
raise ErrorMessage(1,['Malformed entry in <styleTable>.'
|
||||||
,'Group must have exactly two fields: (Group,group).'
|
,'Group must have exactly two fields: (Group,group).'
|
||||||
,str(styleEntry)
|
,str(styleEntry)
|
||||||
])
|
])
|
||||||
styleType, group = styleEntry
|
styleType, group = styleEntry
|
||||||
if not isinstance(group,str):
|
if not isinstance(group,str):
|
||||||
raise ErrorMessage(['The second Group field, <group> must be a string, not a %s.' % helpers.stype(group)
|
raise ErrorMessage(1,['The second Group field, <group> must be a string, not a %s.' % helpers.stype(group)
|
||||||
,str(styleEntry)])
|
,str(styleEntry)])
|
||||||
|
|
||||||
elif styleEntry[0] == Drawing:
|
elif styleEntry[0] == Drawing:
|
||||||
if len(styleEntry) != 3:
|
if len(styleEntry) != 3:
|
||||||
raise ErrorMessage(['Malformed entry in <styleTable>.'
|
raise ErrorMessage(1,['Malformed entry in <styleTable>.'
|
||||||
,'Rule must have exactly three fields: (Drawing,dname,{dict}).'
|
,'Rule must have exactly three fields: (Drawing,dname,{dict}).'
|
||||||
,str(styleEntry)
|
,str(styleEntry)
|
||||||
])
|
])
|
||||||
|
@ -247,9 +247,9 @@ def loadStyles ( stylesTable, fromFile ):
|
||||||
try:
|
try:
|
||||||
# Check for three levels of tuple for a correct <styleTable>.
|
# Check for three levels of tuple for a correct <styleTable>.
|
||||||
if not isinstance(stylesTable,tuple):
|
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):
|
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:
|
for styleTuple in stylesTable:
|
||||||
loadStyleTuple( styleTuple )
|
loadStyleTuple( styleTuple )
|
|
@ -95,7 +95,7 @@ class Pattern ( object ):
|
||||||
self._side = math.sqrt(4*len(self._hexa))
|
self._side = math.sqrt(4*len(self._hexa))
|
||||||
|
|
||||||
if pow(self._side,2) != 4*len(self._hexa):
|
if pow(self._side,2) != 4*len(self._hexa):
|
||||||
raise ErrorMessage( 'The pattern is not square (%d bits).'
|
raise ErrorMessage( 1, 'The pattern is not square (%d bits).'
|
||||||
% (4*len(self._hexa)) )
|
% (4*len(self._hexa)) )
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ class Pattern ( object ):
|
||||||
|
|
||||||
for line in bits:
|
for line in bits:
|
||||||
if self._side != len(line):
|
if self._side != len(line):
|
||||||
raise ErrorMessage( 'The pattern is not square (%dx%d bits).'
|
raise ErrorMessage( 1, 'The pattern is not square (%dx%d bits).'
|
||||||
% (len(line),len(self._bits)) )
|
% (len(line),len(self._bits)) )
|
||||||
|
|
||||||
self._toHexa()
|
self._toHexa()
|
||||||
|
@ -149,13 +149,13 @@ def loadPatterns ( patternsData, fromFile ):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if not isinstance(entry,dict):
|
if not isinstance(entry,dict):
|
||||||
raise ErrorMessage(['Malformed entry in <patternsTable>.'
|
raise ErrorMessage(1,['Malformed entry in <patternsTable>.'
|
||||||
,'Not a dictionary {\'key1\':\'value1\', ...}.'
|
,'Not a dictionary {\'key1\':\'value1\', ...}.'
|
||||||
,str(entry)
|
,str(entry)
|
||||||
])
|
])
|
||||||
|
|
||||||
if not entry.has_key('name'):
|
if not entry.has_key('name'):
|
||||||
raise ErrorMessage(['Malformed entry in <patternsTable>.'
|
raise ErrorMessage(1,['Malformed entry in <patternsTable>.'
|
||||||
,'Pattern has no \'name\' key.'
|
,'Pattern has no \'name\' key.'
|
||||||
,str(entry)
|
,str(entry)
|
||||||
])
|
])
|
|
@ -21,13 +21,13 @@ def loadRealLayers ( technology, basicLayersData ):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if len(entry) != 3:
|
if len(entry) != 3:
|
||||||
raise ErrorMessage(['Malformed entry in <realLayersTable>.'
|
raise ErrorMessage(1,['Malformed entry in <realLayersTable>.'
|
||||||
,'Must have exactly three fields: (symb_name,real_name,GDSII_extnb).'
|
,'Must have exactly three fields: (symb_name,real_name,GDSII_extnb).'
|
||||||
,str(entry)
|
,str(entry)
|
||||||
])
|
])
|
||||||
symbName, realName, gdsiiExtractNumber = entry
|
symbName, realName, gdsiiExtractNumber = entry
|
||||||
if not isinstance(gdsiiExtractNumber,int):
|
if not isinstance(gdsiiExtractNumber,int):
|
||||||
raise ErrorMessage(['Incoherency in <realLayersTable> entry.'
|
raise ErrorMessage(1,['Incoherency in <realLayersTable> entry.'
|
||||||
,'GDSII exctract number is not of int type (%s).' \
|
,'GDSII exctract number is not of int type (%s).' \
|
||||||
% helpers.stype(gdsiiExtractNumber)
|
% helpers.stype(gdsiiExtractNumber)
|
||||||
,str(entry)
|
,str(entry)
|
||||||
|
@ -35,7 +35,7 @@ def loadRealLayers ( technology, basicLayersData ):
|
||||||
|
|
||||||
basicLayer = technology.getBasicLayer(symbName)
|
basicLayer = technology.getBasicLayer(symbName)
|
||||||
if not basicLayer:
|
if not basicLayer:
|
||||||
raise ErrorMessage(['Incoherency in <realLayersTable> entry.'
|
raise ErrorMessage(1,['Incoherency in <realLayersTable> entry.'
|
||||||
,'The real layer "%s" associated to the GDSII "%s" do not exists.' \
|
,'The real layer "%s" associated to the GDSII "%s" do not exists.' \
|
||||||
% (symbName,realName)
|
% (symbName,realName)
|
||||||
,str(entry)
|
,str(entry)
|
||||||
|
@ -62,26 +62,26 @@ def loadTechnoConfig ( technology, technoConfig ):
|
||||||
gridUnit != DbU.UnitPowerMilli and \
|
gridUnit != DbU.UnitPowerMilli and \
|
||||||
gridUnit != DbU.UnitPowerUnity and \
|
gridUnit != DbU.UnitPowerUnity and \
|
||||||
gridUnit != DbU.UnitPowerKilo:
|
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:
|
else:
|
||||||
raise ErrorMessage('<technoConfig> has no <gridUnit> defined, assuming Micro.')
|
raise ErrorMessage(1,'<technoConfig> has no <gridUnit> defined, assuming Micro.')
|
||||||
|
|
||||||
elif key == 'gridValue':
|
elif key == 'gridValue':
|
||||||
if technoConfig.has_key('gridValue'):
|
if technoConfig.has_key('gridValue'):
|
||||||
gridValue = technoConfig['gridValue']
|
gridValue = technoConfig['gridValue']
|
||||||
if not isinstance(gridUnit,float) and not isinstance(gridUnit,int):
|
if not isinstance(gridUnit,float) and not isinstance(gridUnit,int):
|
||||||
raise ErrorMessage(['In <technoConfig>, <gridValue> must be of type float (and not: %s).'
|
raise ErrorMessage(1,['In <technoConfig>, <gridValue> must be of type float (and not: %s).'
|
||||||
% helpers.stype(gridValue)
|
% helpers.stype(gridValue)
|
||||||
])
|
])
|
||||||
DbU.setPhysicalsPerGrid(gridValue,gridUnit)
|
DbU.setPhysicalsPerGrid(gridValue,gridUnit)
|
||||||
else:
|
else:
|
||||||
raise ErrorMessage('<technoConfig> has no <gridValue> defined.')
|
raise ErrorMessage(1,'<technoConfig> has no <gridValue> defined.')
|
||||||
|
|
||||||
elif key == 'gridsPerLambda':
|
elif key == 'gridsPerLambda':
|
||||||
if technoConfig.has_key('gridsPerLambda'):
|
if technoConfig.has_key('gridsPerLambda'):
|
||||||
gridsPerLambda = technoConfig['gridsPerLambda']
|
gridsPerLambda = technoConfig['gridsPerLambda']
|
||||||
if not isinstance(gridsPerLambda,int):
|
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)
|
% helpers.stype(gridsPerLambda)
|
||||||
])
|
])
|
||||||
DbU.setGridsPerLambda(gridsPerLambda)
|
DbU.setGridsPerLambda(gridsPerLambda)
|
|
@ -86,7 +86,7 @@ class LayersLUT ( object ):
|
||||||
layer = self._symbolicLayers[name]
|
layer = self._symbolicLayers[name]
|
||||||
|
|
||||||
if not layer and flags&LayersLUT.MissingError:
|
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
|
return layer
|
||||||
|
|
||||||
|
@ -101,19 +101,19 @@ def loadRealLayers ( technology, basicLayersData ):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if len(entry) < 2:
|
if len(entry) < 2:
|
||||||
raise ErrorMessage(['Malformed entry in <realLayersTable>.'
|
raise ErrorMessage(1,['Malformed entry in <realLayersTable>.'
|
||||||
,'Less than two fields: missing name and/or material.'
|
,'Less than two fields: missing name and/or material.'
|
||||||
,str(entry)
|
,str(entry)
|
||||||
])
|
])
|
||||||
if len(entry) > 2:
|
if len(entry) > 2:
|
||||||
if entry[1] != BasicLayer.Material.blockage:
|
if entry[1] != BasicLayer.Material.blockage:
|
||||||
raise ErrorMessage(['Invalid entry in <realLayersTable>.'
|
raise ErrorMessage(1,['Invalid entry in <realLayersTable>.'
|
||||||
,'Only blockage material can have a third field.'
|
,'Only blockage material can have a third field.'
|
||||||
,str(entry)
|
,str(entry)
|
||||||
])
|
])
|
||||||
routingLayer = technology.getBasicLayer(entry[2])
|
routingLayer = technology.getBasicLayer(entry[2])
|
||||||
if not routingLayer:
|
if not routingLayer:
|
||||||
raise ErrorMessage(['Incoherency in <realLayersTable> entry at.'
|
raise ErrorMessage(1,['Incoherency in <realLayersTable> entry at.'
|
||||||
,'The metal <%s> associated to the blockage doesn\'t exist (yet?).' % entry[2]
|
,'The metal <%s> associated to the blockage doesn\'t exist (yet?).' % entry[2]
|
||||||
,str(entry)
|
,str(entry)
|
||||||
])
|
])
|
||||||
|
@ -137,14 +137,14 @@ def loadSymbolicLayers ( technology, symbolicLayersData ):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if len(entry) != 3:
|
if len(entry) != 3:
|
||||||
raise ErrorMessage(['Malformed entry in <symbolicLayersTable>.'
|
raise ErrorMessage(1,['Malformed entry in <symbolicLayersTable>.'
|
||||||
,'Must contains exactly three fields: ( name, type, (real_layers,) ).'
|
,'Must contains exactly three fields: ( name, type, (real_layers,) ).'
|
||||||
,str(entry)
|
,str(entry)
|
||||||
])
|
])
|
||||||
name, layerType, realLayers = entry
|
name, layerType, realLayers = entry
|
||||||
|
|
||||||
if not isinstance(layerType,SymbolicLayerType):
|
if not isinstance(layerType,SymbolicLayerType):
|
||||||
raise ErrorMessage(['Invalid entry in <symbolicLayersTable>.'
|
raise ErrorMessage(1,['Invalid entry in <symbolicLayersTable>.'
|
||||||
,'The layer type code is not valid, should be any of:'
|
,'The layer type code is not valid, should be any of:'
|
||||||
,' * TypeRegular'
|
,' * TypeRegular'
|
||||||
,' * TypeDiffusion'
|
,' * TypeDiffusion'
|
||||||
|
@ -154,7 +154,7 @@ def loadSymbolicLayers ( technology, symbolicLayersData ):
|
||||||
,str(entry)
|
,str(entry)
|
||||||
])
|
])
|
||||||
if layerType.realLayerLength() != len(realLayers):
|
if layerType.realLayerLength() != len(realLayers):
|
||||||
raise ErrorMessage(['Invalid entry in <symbolicLayersTable>.'
|
raise ErrorMessage(1,['Invalid entry in <symbolicLayersTable>.'
|
||||||
,'Layer of type <%s> contains %d real layers instead of %d.' \
|
,'Layer of type <%s> contains %d real layers instead of %d.' \
|
||||||
% (layerType,len(realLayers),layerType.realLayerLength())
|
% (layerType,len(realLayers),layerType.realLayerLength())
|
||||||
,str(entry)
|
,str(entry)
|
||||||
|
@ -198,12 +198,12 @@ def loadSymbolicRules ( technology, symbolicRulesTable ):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if len(rule) != 2:
|
if len(rule) != 2:
|
||||||
raise ErrorMessage(['Malformed entry in <symbolicRulesTable>.'
|
raise ErrorMessage(1,['Malformed entry in <symbolicRulesTable>.'
|
||||||
,'Must contains exactly two fields: ( rule_path, value ).'
|
,'Must contains exactly two fields: ( rule_path, value ).'
|
||||||
,str(rule)
|
,str(rule)
|
||||||
])
|
])
|
||||||
if not isinstance(rule[1],int) and not isinstance(rule[1],float):
|
if not isinstance(rule[1],int) and not isinstance(rule[1],float):
|
||||||
raise ErrorMessage(['Invalid entry in <symbolicRulesTable>.'
|
raise ErrorMessage(1,['Invalid entry in <symbolicRulesTable>.'
|
||||||
,'Rule value must be of integer or float type.'
|
,'Rule value must be of integer or float type.'
|
||||||
,str(rule)
|
,str(rule)
|
||||||
])
|
])
|
||||||
|
@ -211,7 +211,7 @@ def loadSymbolicRules ( technology, symbolicRulesTable ):
|
||||||
value = DbU.fromLambda(rule[1])
|
value = DbU.fromLambda(rule[1])
|
||||||
elements = rule[0].split('.')
|
elements = rule[0].split('.')
|
||||||
if len(elements) < 3:
|
if len(elements) < 3:
|
||||||
raise ErrorMessage(['Invalid entry in <symbolicRulesTable>.'
|
raise ErrorMessage(1,['Invalid entry in <symbolicRulesTable>.'
|
||||||
,'Rule name must contains at least three components: \"LAYER.category.dimension\".'
|
,'Rule name must contains at least three components: \"LAYER.category.dimension\".'
|
||||||
,str(rule)
|
,str(rule)
|
||||||
])
|
])
|
||||||
|
@ -228,7 +228,7 @@ def loadSymbolicRules ( technology, symbolicRulesTable ):
|
||||||
elif ruleTag == 'minimum.width': ruleLayer.setMinimalSize ( value )
|
elif ruleTag == 'minimum.width': ruleLayer.setMinimalSize ( value )
|
||||||
elif ruleTag == 'minimum.side': ruleLayer.setMinimalSize ( value )
|
elif ruleTag == 'minimum.side': ruleLayer.setMinimalSize ( value )
|
||||||
else:
|
else:
|
||||||
raise ErrorMessage(['Invalid entry in <symbolicRulesTable>.'
|
raise ErrorMessage(1,['Invalid entry in <symbolicRulesTable>.'
|
||||||
,'Unknown rule kind: \".%s\", should be any of:' % ruleTag
|
,'Unknown rule kind: \".%s\", should be any of:' % ruleTag
|
||||||
,' * "RULE_HEAD.extention.cap"'
|
,' * "RULE_HEAD.extention.cap"'
|
||||||
,' * "RULE_HEAD.extention.width"'
|
,' * "RULE_HEAD.extention.width"'
|
|
@ -8,11 +8,11 @@
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
|
import re
|
||||||
import traceback
|
import traceback
|
||||||
import Hurricane
|
import Hurricane
|
||||||
|
|
||||||
|
sysConfDir = None
|
||||||
sysConfDir = os.sep.join(os.path.abspath(__file__).split(os.sep)[:-2])
|
|
||||||
xmlCompatMode = False
|
xmlCompatMode = False
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,12 +26,21 @@ def truncPath ( path ):
|
||||||
|
|
||||||
class ErrorMessage ( Exception ):
|
class ErrorMessage ( Exception ):
|
||||||
|
|
||||||
def __init__ ( self, message ):
|
def __init__ ( self, code, *arguments ):
|
||||||
|
self._code = code
|
||||||
|
self._errors = [ 'Malformed call to ErrorMessage()'
|
||||||
|
, '%s' % str(arguments) ]
|
||||||
|
|
||||||
|
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 = []
|
self._errors = []
|
||||||
|
|
||||||
if isinstance(message,Exception):
|
|
||||||
text = str(message).split('\n')
|
|
||||||
|
|
||||||
while len(text[0]) == 0: del text[0]
|
while len(text[0]) == 0: del text[0]
|
||||||
|
|
||||||
lstrip = 0
|
lstrip = 0
|
||||||
|
@ -43,8 +52,6 @@ class ErrorMessage ( Exception ):
|
||||||
self._errors += [ line[lstrip:] ]
|
self._errors += [ line[lstrip:] ]
|
||||||
else:
|
else:
|
||||||
self._errors += [ line.lstrip() ]
|
self._errors += [ line.lstrip() ]
|
||||||
else:
|
|
||||||
self._errors = message
|
|
||||||
return
|
return
|
||||||
|
|
||||||
def __str__ ( self ):
|
def __str__ ( self ):
|
||||||
|
@ -68,15 +75,23 @@ class ErrorMessage ( Exception ):
|
||||||
self._errors += [ message ]
|
self._errors += [ message ]
|
||||||
return
|
return
|
||||||
|
|
||||||
|
def terminate ( self ):
|
||||||
|
print self
|
||||||
|
sys.exit(self._code)
|
||||||
|
|
||||||
|
def _getCode ( self ): return self._code
|
||||||
|
|
||||||
|
code = property(_getCode)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def wrapPrint ( e, footer=None ):
|
def wrapPrint ( e, footer=None ):
|
||||||
showTrace = False
|
showTrace = False
|
||||||
if not isinstance(e,ErrorMessage):
|
if not isinstance(e,ErrorMessage):
|
||||||
if isinstance(e,Hurricane.ConstructorError) or \
|
if isinstance(e,Hurricane.ConstructorError) or \
|
||||||
isinstance(e,Hurricane.HurricaneError):
|
isinstance(e,Hurricane.HurricaneError):
|
||||||
ewrap = ErrorMessage(e)
|
ewrap = ErrorMessage(1,e)
|
||||||
else:
|
else:
|
||||||
ewrap = ErrorMessage('An unmanaged Python exception occurred:')
|
ewrap = ErrorMessage(3,'An unmanaged Python exception occurred:')
|
||||||
ewrap.addMessage(str(e))
|
ewrap.addMessage(str(e))
|
||||||
showTrace = True
|
showTrace = True
|
||||||
else:
|
else:
|
||||||
|
@ -103,3 +118,27 @@ class WarningMessage ( Exception ):
|
||||||
else: formatted += " %s" % self._warnings[i]
|
else: formatted += " %s" % self._warnings[i]
|
||||||
if i+1 < len(self._warnings): formatted += "\n"
|
if i+1 < len(self._warnings): formatted += "\n"
|
||||||
return formatted
|
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
|
|
@ -6,6 +6,7 @@ print " - Loading Misc. configuration."
|
||||||
# Misc. parameters.
|
# Misc. parameters.
|
||||||
Cfg.getParamBool("misc.catchCore" ).setBool(False)
|
Cfg.getParamBool("misc.catchCore" ).setBool(False)
|
||||||
Cfg.getParamBool("misc.info" ).setBool(True )
|
Cfg.getParamBool("misc.info" ).setBool(True )
|
||||||
|
Cfg.getParamBool("misc.bug" ).setBool(False)
|
||||||
Cfg.getParamBool("misc.logMode" ).setBool(True )
|
Cfg.getParamBool("misc.logMode" ).setBool(True )
|
||||||
Cfg.getParamBool("misc.verboseLevel1").setBool(True )
|
Cfg.getParamBool("misc.verboseLevel1").setBool(True )
|
||||||
Cfg.getParamBool("misc.verboseLevel2").setBool(False)
|
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.catchCore" , "Catch Core Dumps", 1 )
|
||||||
layout.addParameter ( "Misc.", "misc.verboseLevel1", "Verbose" , 0 )
|
layout.addParameter ( "Misc.", "misc.verboseLevel1", "Verbose" , 0 )
|
||||||
layout.addParameter ( "Misc.", "misc.verboseLevel2", "Very 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.logMode" , "Output is a TTY" , 0 )
|
||||||
layout.addParameter ( "Misc.", "misc.traceLevel" , "Trace Level" , 1 )
|
layout.addParameter ( "Misc.", "misc.traceLevel" , "Trace Level" , 1 )
|
|
@ -2,7 +2,7 @@
|
||||||
include ( ${QT_USE_FILE} )
|
include ( ${QT_USE_FILE} )
|
||||||
include_directories ( ${CRLCORE_SOURCE_DIR}/src/ccore
|
include_directories ( ${CRLCORE_SOURCE_DIR}/src/ccore
|
||||||
${HURRICANE_INCLUDE_DIR}
|
${HURRICANE_INCLUDE_DIR}
|
||||||
${Boost_INCLUDE_DIRS}
|
${Boost_INCLUDE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
set ( mocincludes Cyclop.h
|
set ( mocincludes Cyclop.h
|
||||||
|
@ -34,6 +34,7 @@
|
||||||
${PYTHON_LIBRARIES}
|
${PYTHON_LIBRARIES}
|
||||||
-lutil
|
-lutil
|
||||||
${LIBXML2_LIBRARIES}
|
${LIBXML2_LIBRARIES}
|
||||||
|
${LIBEXECINFO_LIBRARIES}
|
||||||
)
|
)
|
||||||
install ( TARGETS cyclop DESTINATION bin )
|
install ( TARGETS cyclop DESTINATION bin )
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
${CIF_INCLUDE_DIR}
|
${CIF_INCLUDE_DIR}
|
||||||
${CONFIGURATION_INCLUDE_DIR}
|
${CONFIGURATION_INCLUDE_DIR}
|
||||||
${PYTHON_INCLUDE_PATH}
|
${PYTHON_INCLUDE_PATH}
|
||||||
|
${Boost_INCLUDE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_definitions ( -DCORIOLIS_TOP="${CORIOLIS_TOP}"
|
add_definitions ( -DCORIOLIS_TOP="${CORIOLIS_TOP}"
|
||||||
|
|
|
@ -10,5 +10,7 @@
|
||||||
link_directories ( ${CRLCORE_BINARY_DIR}/src/ccore )
|
link_directories ( ${CRLCORE_BINARY_DIR}/src/ccore )
|
||||||
|
|
||||||
add_executable ( cx2y ${cpps} )
|
add_executable ( cx2y ${cpps} )
|
||||||
target_link_libraries ( cx2y crlcore )
|
target_link_libraries ( cx2y crlcore
|
||||||
|
${LIBEXECINFO_LIBRARIES}
|
||||||
|
)
|
||||||
install ( TARGETS cx2y DESTINATION bin )
|
install ( TARGETS cx2y DESTINATION bin )
|
||||||
|
|
Loading…
Reference in New Issue