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
|
2018-10-01 09:52:17 -05:00
|
|
|
#from helpers import Devices
|
2012-11-16 06:49:47 -06:00
|
|
|
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
|
2017-11-17 04:10:32 -06:00
|
|
|
from helpers import Technology
|
2018-10-01 09:52:17 -05:00
|
|
|
from helpers import AnalogTechno
|
|
|
|
from helpers import Devices
|
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)
|
2017-11-17 04:10:32 -06:00
|
|
|
if serror.startswith('No module named') \
|
|
|
|
or serror.startswith('cannot import name') :
|
2014-09-07 16:16:04 -05:00
|
|
|
module = serror.split()[-1]
|
2017-11-17 04:10:32 -06:00
|
|
|
print '[ERROR] The "%s" python module or symbol cannot be loaded.' % module
|
|
|
|
print ' Please check the integrity of the Coriolis package.'
|
|
|
|
if serror.find('cannot open shared object file') != -1:
|
2014-09-07 16:16:04 -05:00
|
|
|
library = serror.split(':')[0]
|
2017-11-17 04:10:32 -06:00
|
|
|
print '[ERROR] The "%s" shared library cannot be loaded.' % library
|
2014-09-07 16:16:04 -05:00
|
|
|
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
|
2017-11-17 04:10:32 -06:00
|
|
|
TechnologyHelper = 0x0004
|
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
|
|
|
PatternsHelper = 0x0010
|
|
|
|
DisplayHelper = 0x0020
|
|
|
|
ConfigurationHelper = 0x0040
|
|
|
|
KiteHelper = 0x0080
|
|
|
|
HelpersMask = AllianceHelper \
|
2017-11-17 04:10:32 -06:00
|
|
|
| TechnologyHelper \
|
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
|
|
|
| PatternsHelper \
|
|
|
|
| DisplayHelper \
|
|
|
|
| ConfigurationHelper \
|
|
|
|
| KiteHelper
|
2012-11-16 06:49:47 -06:00
|
|
|
|
|
|
|
SystemMandatory = 0x0100
|
|
|
|
|
|
|
|
|
|
|
|
def coriolisConfigure():
|
Correct handling of lambdas & microns in configuration files.
* Bug: In CRL/etc/NODE/VENDOR/Technology.conf, the database must be configured
as early has possible so the functions ensuring length conversions can
work correctly (l(v), u(v)). So we can no longer rely on a table to be
read after the execution of the file. We perform a direct call to the
helpers.Technology.initTechno() function. And it must be made first
thing.
In all tables taking dimensions, we must use one of the converter
function helpers.l(v), helpers.u(v) or helpers.n(v) so the the value v
get converted in lambda, microns or nanometer (resp.). Make the
modifications in all technology.conf and kite.conf files.
* Change: In CRL/coriolisInit.py, remove the technoConfig variable that has
been replaced by a direct call to helpers.Technology.initTechno().
* Change: In CRL/helpers.Alliance.loadRoutingGaugesTable(), no longer try to
convert coordinates, they must already be in DbU.
* Change: In CRL/helpers.__init__.py, remove lambdaMode() and micronsMode()
they could not be made to work as expected. Create l(), u(), n() as
replacement.
2018-07-16 04:32:40 -05:00
|
|
|
confHelpers = ( ('allianceConfig' , Alliance.loadAllianceConfig , SystemMandatory|AllianceHelper)
|
Cleaner support for real technologies (Hurricane, CRL Core configuration).
* Change: In Hurricane::Technology, in all the layer connexity methods
(getLayers(), getMetalAbove(), getCutAbove(), getViaBetween(), ...)
the "useWorking" parameter is replaced by a more accurate "useSymbolic".
BEHAVIOR CHANGE: formerly, if a symbolic layer was requested, and
none was found, NULL was returned. Now, if the symbolic layer is not
found, we try to return the associated real one (same layer mask,
but not flagged as symbolic, and usually with a lowercase name).
All thoses changes have been propagated to Python bindings.
* Change: In Hurricane::BasicLayer and derived classes, rename the
"isWorking" attribute into "isSymbolic" (to match the technology
renaming).
* Change: In Hurricane::Cell::flattenNets(), ignore power, ground and
blockage nets for the flatten.
* Change: In CRL Core, in coriolisInit.py and Technology.py helpers,
rename the tables describing the technology as follow:
- symbolicLayersTable --> compositeLayersTable
- workingLayersTable --> symbolicLayersTable
- symbolicRulesTable --> layersExtensionsTable
This is to give the table names a more clearer semantic after
merging real technologies configurations (testbench AMS c35b4).
In particular, we need to define a composite layer for the
real VIAs, and not only the symbolic ones. And with correct
enclosures expressed in real dimensions (microns).
2017-12-27 06:13:29 -06:00
|
|
|
, ('routingGaugesTable' , Alliance.loadRoutingGaugesTable, SystemMandatory|KiteHelper)
|
|
|
|
, ('cellGaugesTable' , Alliance.loadCellGaugesTable , SystemMandatory|KiteHelper)
|
|
|
|
, ('realLayersTable' , Technology.loadRealLayers , SystemMandatory|TechnologyHelper)
|
|
|
|
, ('compositeLayersTable' , Technology.loadCompositeLayers , SystemMandatory|TechnologyHelper)
|
|
|
|
, ('symbolicLayersTable' , Technology.tagSymbolicLayers , SystemMandatory|TechnologyHelper)
|
|
|
|
, ('layersExtensionsTable', Technology.loadLayersExtensions, SystemMandatory|TechnologyHelper)
|
|
|
|
, ('gdsLayersTable' , Technology.loadGdsLayers , SystemMandatory|TechnologyHelper)
|
|
|
|
, ('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
|
|
|
)
|
|
|
|
|
Correct handling of lambdas & microns in configuration files.
* Bug: In CRL/etc/NODE/VENDOR/Technology.conf, the database must be configured
as early has possible so the functions ensuring length conversions can
work correctly (l(v), u(v)). So we can no longer rely on a table to be
read after the execution of the file. We perform a direct call to the
helpers.Technology.initTechno() function. And it must be made first
thing.
In all tables taking dimensions, we must use one of the converter
function helpers.l(v), helpers.u(v) or helpers.n(v) so the the value v
get converted in lambda, microns or nanometer (resp.). Make the
modifications in all technology.conf and kite.conf files.
* Change: In CRL/coriolisInit.py, remove the technoConfig variable that has
been replaced by a direct call to helpers.Technology.initTechno().
* Change: In CRL/helpers.Alliance.loadRoutingGaugesTable(), no longer try to
convert coordinates, they must already be in DbU.
* Change: In CRL/helpers.__init__.py, remove lambdaMode() and micronsMode()
they could not be made to work as expected. Create l(), u(), n() as
replacement.
2018-07-16 04:32:40 -05:00
|
|
|
# ('technoConfig' , Technology.loadTechnoConfig , SystemMandatory|TechnologyHelper)
|
|
|
|
|
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 )
|
|
|
|
|
2018-05-04 10:06:41 -05:00
|
|
|
confFiles = [ (helpers.technoDir+'/technology.conf', SystemFile|TechnologyHelper)
|
|
|
|
, (helpers.technoDir+'/alliance.conf' , SystemFile|AllianceHelper)
|
2017-11-17 04:10:32 -06:00
|
|
|
, (helpers.technoDir+'/patterns.conf' , SystemFile|PatternsHelper)
|
|
|
|
, (helpers.technoDir+'/display.conf' , SystemFile|DisplayHelper)
|
|
|
|
, (helpers.technoDir+'/misc.conf' , SystemFile|ConfigurationHelper)
|
|
|
|
, (helpers.technoDir+'/etesian.conf' , SystemFile|ConfigurationHelper)
|
|
|
|
, (helpers.technoDir+'/kite.conf' , SystemFile|ConfigurationHelper|KiteHelper)
|
|
|
|
, (helpers.technoDir+'/stratus1.conf' , SystemFile|ConfigurationHelper)
|
|
|
|
, (helpers.technoDir+'/plugins.conf' , SystemFile|ConfigurationHelper)
|
2018-10-01 09:52:17 -05:00
|
|
|
, (helpers.technoDir+'/analog.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:
|
2018-10-01 09:52:17 -05:00
|
|
|
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:'
|
2018-10-01 09:52:17 -05:00
|
|
|
print ' "%s"' % helpers.truncPath(confFile)
|
2012-11-16 06:49:47 -06:00
|
|
|
print ' Your installation may be broken. Trying to continue anyway...'
|
|
|
|
continue
|
|
|
|
|
2018-10-01 09:52:17 -05:00
|
|
|
print ' - Loading "%s".' % helpers.truncPath(confFile)
|
2012-11-16 06:49:47 -06:00
|
|
|
execfile(confFile,moduleGlobals)
|
|
|
|
except Exception, e:
|
Support for non-square routing pitch. Allow loading of "foreign" cells.
* New: In CRL Core, AllianceFramework::getCell(), adds a new Catalog::State
flags to request the loading of a "foreign" cell. That is, a Cell which
is *not* in the Alliance libraries, but in *any* library starting from
the root library. This is a temporary hack to allow the Blif parser to
run.
* New: In CRL Core, RoutingGauge::getHorizontalGauge() and
RoutingGauge::getVerticalGauge() to avoid relying on either metal names
or depth to know the vertical and horizontal default routing
informations. They return the metal layers gauges *closests* to the
substrate which are likely to have the lesser pitch.
* New: In CRL Core, BlifParser, new configuration parameters:
"etesian.cell.zero" & "etesian.cell.one" to figure out what are the
tielow and tiehigh cells (instead of having the ones from sxlib
hardwired).
* New: In Etesian, add support for non-square routing pitchs, that is,
the lowest vertical and horizontal pitches are not equal. Needs to
work with two pitches (H & V) instead of one.
The Configuration associated class now also provides the
RoutingGauge (not only the CellGauge).
Use a new Configuration setting "etesian.feedNames" to set up
the names of the filler cells. This a string of comma separated
cell names.
* New: In Anabatic, Session::_getNearestGridPoint(), use the new
non-square grid scheme.
2017-11-26 13:31:38 -06:00
|
|
|
helpers.showPythonTrace( confFile, e )
|
2012-11-16 06:49:47 -06:00
|
|
|
|
|
|
|
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:
|
2018-10-01 09:52:17 -05:00
|
|
|
print '[ERROR] Mandatory symbol "%s" is missing in system configuration file:' % symbol
|
|
|
|
print ' "%s"' % helpers.truncPath(confFile)
|
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
|
|
|
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())
|
|
|
|
|
2016-12-07 05:21:40 -06:00
|
|
|
if not Cfg.getParamString('stratus1.mappingName').asString():
|
2017-11-17 04:10:32 -06:00
|
|
|
vendorTech = helpers.techno.split('/')[-1]
|
|
|
|
mappingFile = os.path.join( helpers.technoDir, 'stratus.xml' )
|
2016-05-06 06:15:10 -05:00
|
|
|
if not os.path.isfile(mappingFile):
|
|
|
|
mappingFile = os.path.join( helpers.sysConfDir, 'stratus2sxlib.xml' )
|
|
|
|
|
|
|
|
parameter = Cfg.getParamString('stratus1.mappingName')
|
|
|
|
parameter.setString( mappingFile )
|
|
|
|
parameter.flags = Cfg.Parameter.Flags.NeedRestart|Cfg.Parameter.Flags.MustExist
|
|
|
|
|
2018-10-01 09:52:17 -05:00
|
|
|
confFile = None
|
|
|
|
if Cfg.hasParameter('analog.techno'):
|
|
|
|
confFile = Cfg.getParamString('analog.techno').asString()
|
|
|
|
if confFile == 'Analog_technology_has_not_been_set': confFile = None
|
|
|
|
if confFile == 'Analog_technology_is_disabled': return
|
|
|
|
|
|
|
|
if not confFile:
|
|
|
|
vendorTech = helpers.techno.split('/')[-1]
|
|
|
|
confFile = os.path.join( helpers.technoDir, 'dtr_%s.py'%vendorTech )
|
|
|
|
Cfg.getParamString('analog.techno').setString( confFile )
|
|
|
|
|
|
|
|
if not os.path.isfile(confFile):
|
|
|
|
print '[WARNING] Analog technology file (aka DTR) has not been found:'
|
|
|
|
print ' "%s"' % helpers.truncPath(confFile)
|
|
|
|
print ' Use of Coriolis analog is disabled.'
|
|
|
|
return
|
|
|
|
|
|
|
|
try:
|
|
|
|
if not helpers.quiet: print ' - Loading \"%s\".' % helpers.truncPath(confFile)
|
|
|
|
execfile(confFile,moduleGlobals)
|
|
|
|
except Exception, e:
|
|
|
|
showPythonTrace( confFile, e )
|
|
|
|
|
|
|
|
if moduleGlobals.has_key('analogTechnologyTable'):
|
|
|
|
AnalogTechno.loadAnalogTechno( moduleGlobals['analogTechnologyTable'], confFile )
|
|
|
|
del moduleGlobals['analogTechnologyTable']
|
|
|
|
else:
|
|
|
|
print '[ERROR] Mandatory symbol <%s> is missing in technology configuration file:' % 'analogTechnologyTable'
|
|
|
|
print ' "%s"' % helpers.truncPath(confFile)
|
|
|
|
sys.exit( 1 )
|
|
|
|
|
|
|
|
confFile = Cfg.getParamString('analog.devices').asString()
|
|
|
|
if not os.path.isfile(confFile):
|
|
|
|
print '[ERROR] Missing mandatory analog devices description file:'
|
|
|
|
print ' "%s"' % helpers.truncPath(confFile)
|
|
|
|
print ' Please look for the "analog.devices" parameter in configuration files.'
|
|
|
|
sys.exit( 1 )
|
|
|
|
|
|
|
|
try:
|
|
|
|
if not helpers.quiet: print ' - Loading \"%s\".' % helpers.truncPath(confFile)
|
|
|
|
execfile(confFile,moduleGlobals)
|
|
|
|
except Exception, e:
|
|
|
|
showPythonTrace( confFile, e )
|
|
|
|
|
|
|
|
if moduleGlobals.has_key('devicesTable'):
|
|
|
|
Devices.loadDevices( moduleGlobals['devicesTable'], confFile )
|
|
|
|
del moduleGlobals['devicesTable']
|
|
|
|
else:
|
|
|
|
print '[ERROR] Mandatory symbol "%s" is missing in technology configuration file:' % 'devicesTable'
|
|
|
|
print ' "%s"' % helpers.truncPath(confFile)
|
|
|
|
sys.exit( 1 )
|
|
|
|
|
2012-11-16 06:49:47 -06:00
|
|
|
return
|