2012-11-16 06:49:47 -06:00
|
|
|
|
|
|
|
try:
|
|
|
|
import sys
|
|
|
|
import os
|
|
|
|
import os.path
|
|
|
|
import copy
|
|
|
|
import Cfg
|
|
|
|
import Hurricane
|
|
|
|
import Viewer
|
|
|
|
import CRL
|
|
|
|
from CRL import Environment
|
|
|
|
from CRL import RoutingLayerGauge
|
|
|
|
from helpers import Configuration
|
|
|
|
from helpers import ErrorMessage
|
|
|
|
from helpers import WarningMessage
|
|
|
|
from helpers.Configuration import TypeBool
|
|
|
|
from helpers.Configuration import TypeInt
|
|
|
|
from helpers.Configuration import TypeEnumerate
|
|
|
|
from helpers.Configuration import TypePercentage
|
|
|
|
from helpers.Configuration import TypeDouble
|
|
|
|
from helpers.Configuration import TypeString
|
|
|
|
from helpers.Configuration import TypeTab
|
|
|
|
from helpers.Configuration import TypeTitle
|
|
|
|
from helpers.Configuration import TypeSection
|
|
|
|
from helpers.Configuration import TypeRule
|
|
|
|
from helpers.Configuration import TypeOption
|
|
|
|
from helpers import Patterns
|
|
|
|
from helpers import Display
|
|
|
|
from helpers.Display import Style
|
|
|
|
from helpers.Display import Inherit
|
|
|
|
from helpers.Display import Darkening
|
|
|
|
from helpers.Display import Group
|
|
|
|
from helpers.Display import Drawing
|
|
|
|
from helpers import Alliance
|
New coriolis launcher. Configuration files cleanup.
* Change: In CRL Core, simplify the loading sequence. The technology,
both symbolic and real is now loaded directly from coriolisInit.py
and not through the Alliance loader. This was a leftover from the
time configuration was in XML. Remove others traces of XML loading.
Remove SYMB_TECHNO_NAME, REAL_TECHNO_NAME & DISPLAY from the Alliance
environement, as they was no longer used.
Note that technology *still* need to be loader *after* Alliance
framework has been initialized.
Gauge information is moved from <alliance.conf> to <kite.conf>.
* Bug: In Coloquinte, in optimization_subproblems.cxx static variables
must not be inlined. Generate a problem when linking in debug mode
(seems the symbol gets optimised out).
* Bug: In Katabatic, in Grid::getGCell(), when the coordinate is *outside*
the area, do not try to find a GCell, directly return NULL.
* New: In Unicorn, create a generic command launcher named "coriolis" which
automatically take cares of all environement setup, then run a command
by default, it's <cgt>, but it can be anything. For example: <zsh>.
2015-04-13 11:54:09 -05:00
|
|
|
from helpers import SymbolicTechnology
|
|
|
|
from helpers import RealTechnology
|
2012-11-16 06:49:47 -06:00
|
|
|
import helpers.Display
|
|
|
|
except ImportError, e:
|
2014-09-07 16:16:04 -05:00
|
|
|
serror = str(e)
|
|
|
|
if serror.startswith('No module named'):
|
|
|
|
module = serror.split()[-1]
|
|
|
|
print '[ERROR] The <%s> python module or symbol cannot be loaded.' % module
|
|
|
|
print ' Please check the integrity of the <coriolis> package.'
|
|
|
|
if str(e).find('cannot open shared object file'):
|
|
|
|
library = serror.split(':')[0]
|
|
|
|
print '[ERROR] The <%s> shared library cannot be loaded.' % library
|
|
|
|
print ' Under RHEL 6, you must be under devtoolset-2.'
|
|
|
|
print ' (scl enable devtoolset-2 bash)'
|
2012-11-16 06:49:47 -06:00
|
|
|
sys.exit(1)
|
|
|
|
except Exception, e:
|
|
|
|
print '[ERROR] A strange exception occurred while loading the basic Coriolis/Python'
|
|
|
|
print ' modules. Something may be wrong at Python/C API level.\n'
|
|
|
|
print ' %s' % e
|
|
|
|
sys.exit(2)
|
|
|
|
|
|
|
|
|
2014-07-27 09:23:27 -05:00
|
|
|
helpers.staticInitialization()
|
2012-11-16 06:49:47 -06:00
|
|
|
moduleGlobals = globals()
|
|
|
|
|
|
|
|
SystemFile = 0x0001
|
|
|
|
AllianceHelper = 0x0002
|
New coriolis launcher. Configuration files cleanup.
* Change: In CRL Core, simplify the loading sequence. The technology,
both symbolic and real is now loaded directly from coriolisInit.py
and not through the Alliance loader. This was a leftover from the
time configuration was in XML. Remove others traces of XML loading.
Remove SYMB_TECHNO_NAME, REAL_TECHNO_NAME & DISPLAY from the Alliance
environement, as they was no longer used.
Note that technology *still* need to be loader *after* Alliance
framework has been initialized.
Gauge information is moved from <alliance.conf> to <kite.conf>.
* Bug: In Coloquinte, in optimization_subproblems.cxx static variables
must not be inlined. Generate a problem when linking in debug mode
(seems the symbol gets optimised out).
* Bug: In Katabatic, in Grid::getGCell(), when the coordinate is *outside*
the area, do not try to find a GCell, directly return NULL.
* New: In Unicorn, create a generic command launcher named "coriolis" which
automatically take cares of all environement setup, then run a command
by default, it's <cgt>, but it can be anything. For example: <zsh>.
2015-04-13 11:54:09 -05:00
|
|
|
SymbolicHelper = 0x0004
|
|
|
|
RealHelper = 0x0008
|
|
|
|
PatternsHelper = 0x0010
|
|
|
|
DisplayHelper = 0x0020
|
|
|
|
ConfigurationHelper = 0x0040
|
|
|
|
KiteHelper = 0x0080
|
|
|
|
HelpersMask = AllianceHelper \
|
|
|
|
| SymbolicHelper \
|
|
|
|
| RealHelper \
|
|
|
|
| PatternsHelper \
|
|
|
|
| DisplayHelper \
|
|
|
|
| ConfigurationHelper \
|
|
|
|
| KiteHelper
|
2012-11-16 06:49:47 -06:00
|
|
|
|
|
|
|
SystemMandatory = 0x0100
|
|
|
|
|
|
|
|
|
|
|
|
def coriolisConfigure():
|
Added support for multiple symbolic+real technology in configuration.
In CRL Core, the layout of the files under "/coriolis2/etc" changes.
Instead of having them directly under "etc", they are now replicated,
in subdirectories. Each subdirectory having the name of the associated
symbolic or real technology (they are kept separated). We have, for
now:
* etc/cmos/ : symbolic, the Alliance original one.
* etc/vsc200/ : symbolic, for G. Petley vsclib.
* etc/hcmos9/ : real, generic fake (130nm).
To tell which pair (symbolic,real) technologies must be used we create
a *second* (sigh) configuration file "coriolis2_techno.conf", and it's
hidden counterpart in the user's account, to set it up. It needs to be
separate because it is read as early as possible and select which set
of configuration files would be read.
Also add support up to METAL8 and POLY2 in CRL core and it's Alliance
parser/drivers.
2014-05-21 07:50:22 -05:00
|
|
|
global symbolicTechno
|
|
|
|
|
New coriolis launcher. Configuration files cleanup.
* Change: In CRL Core, simplify the loading sequence. The technology,
both symbolic and real is now loaded directly from coriolisInit.py
and not through the Alliance loader. This was a leftover from the
time configuration was in XML. Remove others traces of XML loading.
Remove SYMB_TECHNO_NAME, REAL_TECHNO_NAME & DISPLAY from the Alliance
environement, as they was no longer used.
Note that technology *still* need to be loader *after* Alliance
framework has been initialized.
Gauge information is moved from <alliance.conf> to <kite.conf>.
* Bug: In Coloquinte, in optimization_subproblems.cxx static variables
must not be inlined. Generate a problem when linking in debug mode
(seems the symbol gets optimised out).
* Bug: In Katabatic, in Grid::getGCell(), when the coordinate is *outside*
the area, do not try to find a GCell, directly return NULL.
* New: In Unicorn, create a generic command launcher named "coriolis" which
automatically take cares of all environement setup, then run a command
by default, it's <cgt>, but it can be anything. For example: <zsh>.
2015-04-13 11:54:09 -05:00
|
|
|
confHelpers = ( ('allianceConfig' , Alliance.loadAllianceConfig , SystemMandatory|AllianceHelper)
|
|
|
|
, ('routingGaugesTable' , Alliance.loadRoutingGaugesTable , SystemMandatory|KiteHelper)
|
|
|
|
, ('cellGaugesTable' , Alliance.loadCellGaugesTable , SystemMandatory|KiteHelper)
|
|
|
|
, ('viewerConfig' , SymbolicTechnology.loadViewerConfig , SystemMandatory|SymbolicHelper)
|
|
|
|
, ('realLayersTable' , SymbolicTechnology.loadRealLayers , SystemMandatory|SymbolicHelper)
|
|
|
|
, ('symbolicLayersTable', SymbolicTechnology.loadSymbolicLayers, SystemMandatory|SymbolicHelper)
|
|
|
|
, ('symbolicRulesTable' , SymbolicTechnology.loadSymbolicRules , SystemMandatory|SymbolicHelper)
|
|
|
|
, ('workingLayersTable' , SymbolicTechnology.loadWorkingLayers , SystemMandatory|SymbolicHelper)
|
|
|
|
, ('technoConfig' , RealTechnology.loadTechnoConfig , SystemMandatory|RealHelper)
|
|
|
|
, ('gdsLayersTable' , RealTechnology.loadGdsLayers , SystemMandatory|RealHelper)
|
|
|
|
, ('patternsTable' , Patterns.loadPatterns , SystemMandatory|PatternsHelper)
|
|
|
|
, ('stylesTable' , Display.loadStyles , SystemMandatory|DisplayHelper)
|
|
|
|
, ('defaultStyle' , Display.loadDefaultStyle , SystemMandatory|DisplayHelper)
|
|
|
|
, ('parametersTable' , Configuration.loadParameters , ConfigurationHelper)
|
|
|
|
, ('layoutTable' , Configuration.loadLayout , ConfigurationHelper)
|
2012-11-16 06:49:47 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
print ' o Running configuration hook: coriolisConfigure().'
|
|
|
|
#print ' - sysConfDir: <%s>' % helpers.sysConfDir
|
|
|
|
|
|
|
|
Cfg.Configuration.pushDefaultPriority ( Cfg.Parameter.Priority.ConfigurationFile )
|
|
|
|
|
New coriolis launcher. Configuration files cleanup.
* Change: In CRL Core, simplify the loading sequence. The technology,
both symbolic and real is now loaded directly from coriolisInit.py
and not through the Alliance loader. This was a leftover from the
time configuration was in XML. Remove others traces of XML loading.
Remove SYMB_TECHNO_NAME, REAL_TECHNO_NAME & DISPLAY from the Alliance
environement, as they was no longer used.
Note that technology *still* need to be loader *after* Alliance
framework has been initialized.
Gauge information is moved from <alliance.conf> to <kite.conf>.
* Bug: In Coloquinte, in optimization_subproblems.cxx static variables
must not be inlined. Generate a problem when linking in debug mode
(seems the symbol gets optimised out).
* Bug: In Katabatic, in Grid::getGCell(), when the coordinate is *outside*
the area, do not try to find a GCell, directly return NULL.
* New: In Unicorn, create a generic command launcher named "coriolis" which
automatically take cares of all environement setup, then run a command
by default, it's <cgt>, but it can be anything. For example: <zsh>.
2015-04-13 11:54:09 -05:00
|
|
|
confFiles = [ (helpers.symbolicDir+'/alliance.conf' , SystemFile|AllianceHelper)
|
|
|
|
, (helpers.symbolicDir+'/technology.conf', SystemFile|SymbolicHelper)
|
Support for Net alias names. Blif parser enhancements.
* New: In Hurricane, In Net & Cell, support for Net aliases names.
Use a structure based on a simple ring of NetAliasHook. The Net
holds a global map, sorted by names of all the aliases of all Nets.
Elements NetAliasesHook of the map are slaves of ring whose master
is an attribute of the Net (it is *not* in the map, as the primary
name of the Net).
In case of merge, the aliases of both Nets are merged and the
name of the merged one become an alias.
The Cell::getNet() looks in both the Net map and the aliases to
find a Net by name.
* Bug: In CRL Core, in coriolisInit.py, reoder the loading of the
configuration files so the real technology is read as early as
possible to set up the <gridsPerLambda> factor before any lambda
is actually computed...
* Bug: In CRL Core, in AcmSigda, do not try to fed the file when it
has failed to be opened. Throw a clean exception instead.
* New: In CRL Core, in Toolbox, add a NamingScheme object to convert
a design into VHDL compliant names (mainly from Blif/Verilog).
This is extensible in any case.
* New: In CRL Core, in BlifParser, slightly more informative warning
messages. Align the loading progress information on the other
parsers.
Add a capability to select which component of the design will
be returned, if there are more than one. Use the "." as separator.
For exemple you can request "Processor.Alu", which will load
the "Alu" component from the design in "Processor.blif".
To be able to save a Blif loaded design, systematically convert
all the name for VHDL compliance, as it is the format used by
the Coriolis native files (vst).
Export the Blif parser to the Python interface.
* New: In Kite, In NegociateWindow, add a counter of the number of
remaining events. Gives an idea of the ETA...
* New: In Unicorn, in cgt.by, add an option to load a Blif design from
the command line.
* New: In Cumulus, new RSave plugin to save both netlist & layout.
Partly redundant with the previous one. Have to better organize
that later.
2015-04-16 08:40:02 -05:00
|
|
|
, (helpers.realDir +'/technology.conf', SystemFile|RealHelper)
|
New coriolis launcher. Configuration files cleanup.
* Change: In CRL Core, simplify the loading sequence. The technology,
both symbolic and real is now loaded directly from coriolisInit.py
and not through the Alliance loader. This was a leftover from the
time configuration was in XML. Remove others traces of XML loading.
Remove SYMB_TECHNO_NAME, REAL_TECHNO_NAME & DISPLAY from the Alliance
environement, as they was no longer used.
Note that technology *still* need to be loader *after* Alliance
framework has been initialized.
Gauge information is moved from <alliance.conf> to <kite.conf>.
* Bug: In Coloquinte, in optimization_subproblems.cxx static variables
must not be inlined. Generate a problem when linking in debug mode
(seems the symbol gets optimised out).
* Bug: In Katabatic, in Grid::getGCell(), when the coordinate is *outside*
the area, do not try to find a GCell, directly return NULL.
* New: In Unicorn, create a generic command launcher named "coriolis" which
automatically take cares of all environement setup, then run a command
by default, it's <cgt>, but it can be anything. For example: <zsh>.
2015-04-13 11:54:09 -05:00
|
|
|
, (helpers.symbolicDir+'/patterns.conf' , SystemFile|PatternsHelper)
|
|
|
|
, (helpers.symbolicDir+'/display.conf' , SystemFile|DisplayHelper)
|
|
|
|
, (helpers.symbolicDir+'/misc.conf' , SystemFile|ConfigurationHelper)
|
|
|
|
, (helpers.symbolicDir+'/etesian.conf' , SystemFile|ConfigurationHelper)
|
|
|
|
, (helpers.symbolicDir+'/kite.conf' , SystemFile|ConfigurationHelper|KiteHelper)
|
|
|
|
, (helpers.symbolicDir+'/stratus1.conf' , SystemFile|ConfigurationHelper)
|
|
|
|
, (helpers.symbolicDir+'/plugins.conf' , SystemFile|ConfigurationHelper)
|
Python Script launcher extended to accomodate Chams.
* New: In VLSISAPD, in Configuration, add a new priority level UserFile
to distinguish between the system configuration files and the user's
configuration files (which take precedence).
* New: In Hurricane, in Script (Python), improve the API to be able
to support Chams (and remove the duplicate capability from it).
Add separate functions to perform the initialize/run(s)/finalize
cycle step by step.
* Change: In CRL Core, rename real technology <hcmos9> to <hcmos9gp>,
it's offcial name from CMP/ST. This is the 130nm.
Move the reading of the symbolic & real technologies names from
coriolisInit.py to helpers.__init__.py, to be shared with
chamsInit.py.
To avoid a clash of names inside of helpers, the two variables
of techno.py are renamed "symbolicTechnology" and "realTechnology".
Move python init system from crlcore/src/crlcore to crlcore/python.
* New: In CRL Core, In Utilities, add site-packages/pharos to the
PYTHONPATH.
* Change: In Kite, move python init system from kite/src/init to
kite/python.
2015-03-17 10:31:24 -05:00
|
|
|
]
|
Added support for multiple symbolic+real technology in configuration.
In CRL Core, the layout of the files under "/coriolis2/etc" changes.
Instead of having them directly under "etc", they are now replicated,
in subdirectories. Each subdirectory having the name of the associated
symbolic or real technology (they are kept separated). We have, for
now:
* etc/cmos/ : symbolic, the Alliance original one.
* etc/vsc200/ : symbolic, for G. Petley vsclib.
* etc/hcmos9/ : real, generic fake (130nm).
To tell which pair (symbolic,real) technologies must be used we create
a *second* (sigh) configuration file "coriolis2_techno.conf", and it's
hidden counterpart in the user's account, to set it up. It needs to be
separate because it is read as early as possible and select which set
of configuration files would be read.
Also add support up to METAL8 and POLY2 in CRL core and it's Alliance
parser/drivers.
2014-05-21 07:50:22 -05:00
|
|
|
if os.getenv('HOME'):
|
2014-10-03 12:11:06 -05:00
|
|
|
confFiles += [ (os.getenv('HOME')+'/.coriolis2/settings.py', 0) ]
|
2012-11-16 06:49:47 -06:00
|
|
|
else:
|
|
|
|
w = WarningMessage(['The <HOME> environment variable is not defined, this is most unusual.'
|
2014-10-03 12:11:06 -05:00
|
|
|
,'It prevents the loading of ${HOME}/.coriolis2/settings.py'])
|
2012-11-16 06:49:47 -06:00
|
|
|
print w
|
|
|
|
|
2014-10-03 12:11:06 -05:00
|
|
|
confFiles += [ (os.getcwd()+'/.coriolis2/settings.py', 0) ]
|
Added support for multiple symbolic+real technology in configuration.
In CRL Core, the layout of the files under "/coriolis2/etc" changes.
Instead of having them directly under "etc", they are now replicated,
in subdirectories. Each subdirectory having the name of the associated
symbolic or real technology (they are kept separated). We have, for
now:
* etc/cmos/ : symbolic, the Alliance original one.
* etc/vsc200/ : symbolic, for G. Petley vsclib.
* etc/hcmos9/ : real, generic fake (130nm).
To tell which pair (symbolic,real) technologies must be used we create
a *second* (sigh) configuration file "coriolis2_techno.conf", and it's
hidden counterpart in the user's account, to set it up. It needs to be
separate because it is read as early as possible and select which set
of configuration files would be read.
Also add support up to METAL8 and POLY2 in CRL core and it's Alliance
parser/drivers.
2014-05-21 07:50:22 -05:00
|
|
|
|
2012-11-16 06:49:47 -06:00
|
|
|
for confFile, confFlags in confFiles:
|
Python Script launcher extended to accomodate Chams.
* New: In VLSISAPD, in Configuration, add a new priority level UserFile
to distinguish between the system configuration files and the user's
configuration files (which take precedence).
* New: In Hurricane, in Script (Python), improve the API to be able
to support Chams (and remove the duplicate capability from it).
Add separate functions to perform the initialize/run(s)/finalize
cycle step by step.
* Change: In CRL Core, rename real technology <hcmos9> to <hcmos9gp>,
it's offcial name from CMP/ST. This is the 130nm.
Move the reading of the symbolic & real technologies names from
coriolisInit.py to helpers.__init__.py, to be shared with
chamsInit.py.
To avoid a clash of names inside of helpers, the two variables
of techno.py are renamed "symbolicTechnology" and "realTechnology".
Move python init system from crlcore/src/crlcore to crlcore/python.
* New: In CRL Core, In Utilities, add site-packages/pharos to the
PYTHONPATH.
* Change: In Kite, move python init system from kite/src/init to
kite/python.
2015-03-17 10:31:24 -05:00
|
|
|
if confFile.endswith('settings.py'):
|
|
|
|
Cfg.Configuration.pushDefaultPriority ( Cfg.Parameter.Priority.UserFile )
|
2012-11-16 06:49:47 -06:00
|
|
|
try:
|
|
|
|
if not os.path.isfile(confFile):
|
|
|
|
if confFlags & SystemFile:
|
|
|
|
print '[ERROR] Missing mandatory Coriolis2 system file:'
|
|
|
|
print ' <%s>' % confFile
|
|
|
|
print ' Your installation may be broken. Trying to continue anyway...'
|
|
|
|
continue
|
|
|
|
|
|
|
|
print ' - Loading \"%s\".' % helpers.truncPath(confFile)
|
|
|
|
execfile(confFile,moduleGlobals)
|
|
|
|
except Exception, e:
|
|
|
|
print '[ERROR] An exception occured while loading the configuration file:'
|
|
|
|
print ' <%s>\n' % (confFile)
|
|
|
|
print ' You should check for simple python errors in this file.'
|
|
|
|
print ' Error was:'
|
|
|
|
print ' %s\n' % e
|
|
|
|
print ' Trying to continue anyway...'
|
|
|
|
|
|
|
|
for symbol, loader, loaderFlags in confHelpers:
|
New coriolis launcher. Configuration files cleanup.
* Change: In CRL Core, simplify the loading sequence. The technology,
both symbolic and real is now loaded directly from coriolisInit.py
and not through the Alliance loader. This was a leftover from the
time configuration was in XML. Remove others traces of XML loading.
Remove SYMB_TECHNO_NAME, REAL_TECHNO_NAME & DISPLAY from the Alliance
environement, as they was no longer used.
Note that technology *still* need to be loader *after* Alliance
framework has been initialized.
Gauge information is moved from <alliance.conf> to <kite.conf>.
* Bug: In Coloquinte, in optimization_subproblems.cxx static variables
must not be inlined. Generate a problem when linking in debug mode
(seems the symbol gets optimised out).
* Bug: In Katabatic, in Grid::getGCell(), when the coordinate is *outside*
the area, do not try to find a GCell, directly return NULL.
* New: In Unicorn, create a generic command launcher named "coriolis" which
automatically take cares of all environement setup, then run a command
by default, it's <cgt>, but it can be anything. For example: <zsh>.
2015-04-13 11:54:09 -05:00
|
|
|
if moduleGlobals.has_key(symbol):
|
|
|
|
loader( moduleGlobals[symbol], confFile )
|
|
|
|
del moduleGlobals[symbol]
|
|
|
|
else:
|
|
|
|
if confFlags & loaderFlags & HelpersMask:
|
|
|
|
if confFlags & SystemFile and loaderFlags & SystemMandatory:
|
|
|
|
print '[ERROR] Mandatory symbol <%s> is missing in system configuration file:' % symbol
|
|
|
|
print ' <%s>' % confFile
|
|
|
|
print ' Trying to continue anyway...'
|
Python Script launcher extended to accomodate Chams.
* New: In VLSISAPD, in Configuration, add a new priority level UserFile
to distinguish between the system configuration files and the user's
configuration files (which take precedence).
* New: In Hurricane, in Script (Python), improve the API to be able
to support Chams (and remove the duplicate capability from it).
Add separate functions to perform the initialize/run(s)/finalize
cycle step by step.
* Change: In CRL Core, rename real technology <hcmos9> to <hcmos9gp>,
it's offcial name from CMP/ST. This is the 130nm.
Move the reading of the symbolic & real technologies names from
coriolisInit.py to helpers.__init__.py, to be shared with
chamsInit.py.
To avoid a clash of names inside of helpers, the two variables
of techno.py are renamed "symbolicTechnology" and "realTechnology".
Move python init system from crlcore/src/crlcore to crlcore/python.
* New: In CRL Core, In Utilities, add site-packages/pharos to the
PYTHONPATH.
* Change: In Kite, move python init system from kite/src/init to
kite/python.
2015-03-17 10:31:24 -05:00
|
|
|
|
|
|
|
if confFile.endswith('settings.py'):
|
|
|
|
Cfg.Configuration.popDefaultPriority ()
|
2012-11-16 06:49:47 -06:00
|
|
|
|
|
|
|
Cfg.Configuration.popDefaultPriority ()
|
|
|
|
|
|
|
|
#sys.stdout.write(CRL.AllianceFramework.get().getEnvironment().getPrint())
|
|
|
|
|
|
|
|
return
|