coriolis/crlcore/etc/common/misc.py

104 lines
4.1 KiB
Python
Raw Normal View History

Migrating the initialisation system to be completely Python-like. * New: In bootstrap/coriolisEnv.py, add the "etc" directory to the PYTHONPATH as initialization are now Python modules. * New: In Hurricane/analogic, first groundwork for the integration of PIP/MIM/MOM multi-capacitors. Add C++ and Python interface for the allocation matrix and the list of capacities values. * Change: In Hurricane::RegularLayer, add a layer parameter to the constructor so the association between the RegularLayer and it's BasicLayer can readily be done. * Change: In Hurricane::Layer, add a new getCut() accessor to get the cut layer in ViaLayer. * Change: In Hurricane::DataBase::get(), the Python wrapper should no longer consider an error if the data-base has not been created yet. Just return None. * Bug: In Isobar::PyLayer::getEnclosure() wrapper, if the overall enclosure is requested, pass the right parameter to the C++ function. * Change: In AllianceFramework, make public _bindLibraries() and export it to the Python interface. * Change: In AllianceFramework::create(), do not longer call bindLibraries(). This now must be done explicitely and afterwards. * Change: In AllianceFramework::createLibrary() and Environement::addSYSTEM_LIBRARY(), minor bug corrections that I don't recall. * Change: In SearchPath::prepend(), set the selected index to zero and return it. * Change: In CRL::System CTOR, add "etc" to the PYTHONPATH as the configuration files are now organized as Python modules. * New: In PyCRL, export the CRL::System singleton, it's creation is no longer triggered by the one of AllianceFramework. * New: In CRL/etc/, convert most of the configuration files into the Python module format. For now, keep the old ".conf", but that are no longer used. For the real technologies, we cannot keep the directory name as "180" or "45" as it not allowed by Python syntax, so we create "node180" or "node45" instead. Most of the helpers and coriolisInit.py are no longer used now. To be removed in future commits after being sure that everything works... * Bug: In AutoSegment::makeDogleg(AutoContact*), the layer of the contacts where badly computed when one end of the original segment was attached to a non-preferred direction segment (mostly on terminal contacts). Now use the new AutoContact::updateLayer() method. * Bug: In Dijkstra::load(), limit symetric search area only if the net is a symmetric one ! * Change: In Katana/python/katanaInit.py, comply with the new initialisation scheme. * Change: In Unicorn/cgt.py, comply to the new inititalization scheme. * Change: In cumulus various Python scripts remove the call to helpers.staticInitialization() as they are not needed now (we run in only *one* interpreter, so we correctly share all init). In plugins/__init__.py, read the new NDA directory variable. * Bug: In cumulus/plugins/Chip.doCoronafloorplan(), self.railsNb was not correctly managed when there was no clock. * Change: In cumulus/plugins/Configuration.coronaContactArray(), compute the viaPitch from the technology instead of the hard-coded 4.0 lambdas. In Configuration.loadConfiguration(), read the "ioring.py" from the new user's settings module. * Bug: In stratus.dpgen_ADSB2F, gives coordinates translated into DbU to the XY functions. In st_model.Save(), use the VstUseConcat flag to get correct VST files. In st_net.hur_net(), when a net is POWER/GROUND or CLOCK also make it global. * Change: In Oroshi/python/WIP_Transistor.py, encapsulate the generator inside a try/except block to get prettier error (and stop at the first).
2019-10-28 12:09:14 -05:00
# This file is part of the Coriolis Software.
# Copyright (c) UPMC 2019-2019, All Rights Reserved
#
# +-----------------------------------------------------------------+
# | C O R I O L I S |
# | Alliance / Hurricane Interface |
# | |
# | Author : Jean-Paul CHAPUT |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
# | =============================================================== |
# | Python : "./etc/common/misc.py" |
# +-----------------------------------------------------------------+
import Cfg
Cfg.getParamBool( 'misc.catchCore' ).setBool( False )
Cfg.getParamBool( 'misc.info' ).setBool( False )
Cfg.getParamBool( 'misc.bug' ).setBool( False )
Cfg.getParamBool( 'misc.logMode' ).setBool( False )
Cfg.getParamBool( 'misc.verboseLevel1').setBool( True )
Cfg.getParamBool( 'misc.verboseLevel2').setBool( True )
param = Cfg.getParamInt( 'misc.minTraceLevel' )
param.setInt( 100000 )
param.setMin( 0 )
param = Cfg.getParamInt( 'misc.maxTraceLevel' )
param.setInt( 0 )
param.setMin( 0 )
Cfg.getParamInt( 'viewer.minimumSize' ).setInt( 500 )
Cfg.getParamInt( 'viewer.pixelThreshold').setInt( 20 )
Migrating the initialisation system to be completely Python-like. * New: In bootstrap/coriolisEnv.py, add the "etc" directory to the PYTHONPATH as initialization are now Python modules. * New: In Hurricane/analogic, first groundwork for the integration of PIP/MIM/MOM multi-capacitors. Add C++ and Python interface for the allocation matrix and the list of capacities values. * Change: In Hurricane::RegularLayer, add a layer parameter to the constructor so the association between the RegularLayer and it's BasicLayer can readily be done. * Change: In Hurricane::Layer, add a new getCut() accessor to get the cut layer in ViaLayer. * Change: In Hurricane::DataBase::get(), the Python wrapper should no longer consider an error if the data-base has not been created yet. Just return None. * Bug: In Isobar::PyLayer::getEnclosure() wrapper, if the overall enclosure is requested, pass the right parameter to the C++ function. * Change: In AllianceFramework, make public _bindLibraries() and export it to the Python interface. * Change: In AllianceFramework::create(), do not longer call bindLibraries(). This now must be done explicitely and afterwards. * Change: In AllianceFramework::createLibrary() and Environement::addSYSTEM_LIBRARY(), minor bug corrections that I don't recall. * Change: In SearchPath::prepend(), set the selected index to zero and return it. * Change: In CRL::System CTOR, add "etc" to the PYTHONPATH as the configuration files are now organized as Python modules. * New: In PyCRL, export the CRL::System singleton, it's creation is no longer triggered by the one of AllianceFramework. * New: In CRL/etc/, convert most of the configuration files into the Python module format. For now, keep the old ".conf", but that are no longer used. For the real technologies, we cannot keep the directory name as "180" or "45" as it not allowed by Python syntax, so we create "node180" or "node45" instead. Most of the helpers and coriolisInit.py are no longer used now. To be removed in future commits after being sure that everything works... * Bug: In AutoSegment::makeDogleg(AutoContact*), the layer of the contacts where badly computed when one end of the original segment was attached to a non-preferred direction segment (mostly on terminal contacts). Now use the new AutoContact::updateLayer() method. * Bug: In Dijkstra::load(), limit symetric search area only if the net is a symmetric one ! * Change: In Katana/python/katanaInit.py, comply with the new initialisation scheme. * Change: In Unicorn/cgt.py, comply to the new inititalization scheme. * Change: In cumulus various Python scripts remove the call to helpers.staticInitialization() as they are not needed now (we run in only *one* interpreter, so we correctly share all init). In plugins/__init__.py, read the new NDA directory variable. * Bug: In cumulus/plugins/Chip.doCoronafloorplan(), self.railsNb was not correctly managed when there was no clock. * Change: In cumulus/plugins/Configuration.coronaContactArray(), compute the viaPitch from the technology instead of the hard-coded 4.0 lambdas. In Configuration.loadConfiguration(), read the "ioring.py" from the new user's settings module. * Bug: In stratus.dpgen_ADSB2F, gives coordinates translated into DbU to the XY functions. In st_model.Save(), use the VstUseConcat flag to get correct VST files. In st_net.hur_net(), when a net is POWER/GROUND or CLOCK also make it global. * Change: In Oroshi/python/WIP_Transistor.py, encapsulate the generator inside a try/except block to get prettier error (and stop at the first).
2019-10-28 12:09:14 -05:00
param = Cfg.getParamInt( 'viewer.printer.DPI' )
param.setInt( 150 )
param.setMin( 100 )
param = Cfg.getParamEnumerate( 'viewer.printer.mode' )
param.addValue( 'Cell mode' , 1 )
param.addValue( 'Design mode', 2 )
param.setInt ( 1 )
# Those enumerated values *must* match QPrinter::Orientation.
param = Cfg.getParamEnumerate( 'viewer.printer.orientation' )
param.addValue( 'Portrait' , 0 )
param.addValue( 'Landscape', 1 )
param.setInt ( 0 )
# Those enumerated values *must* match QPrinter::PaperSize.
param = Cfg.getParamEnumerate( 'viewer.printer.paper' )
param.addValue( "A4" , 0 )
param.addValue( "B5" , 1 )
param.addValue( "Letter" , 2 )
param.addValue( "Legal" , 3 )
param.addValue( "Executive", 4 )
param.addValue( "A0" , 5 )
param.addValue( "A1" , 6 )
param.addValue( "A2" , 7 )
param.addValue( "A3" , 8 )
param.addValue( "A5" , 9 )
param.addValue( "A6" , 10 )
param.addValue( "A7" , 11 )
param.addValue( "A8" , 12 )
param.addValue( "A9" , 13 )
param.addValue( "B0" , 14 )
param.addValue( "B1" , 15 )
param.addValue( "B10" , 16 )
param.addValue( "B2" , 17 )
param.addValue( "B3" , 18 )
param.addValue( "B4" , 19 )
param.addValue( "B6" , 20 )
param.addValue( "B7" , 21 )
param.addValue( "B8" , 22 )
param.addValue( "B9" , 23 )
param.addValue( "C5E" , 24 )
param.addValue( "Comm10E" , 25 )
param.addValue( "DLE" , 26 )
param.addValue( "Folio" , 27 )
param.addValue( "Ledger" , 28 )
param.addValue( "Tabloid" , 29 )
param.addValue( "Custom" , 30 )
param.setInt ( 0 )
layout = Cfg.Configuration.get().getLayout()
layout.addTab ( 'misc', 'Misc.' )
layout.addTitle ( 'misc', 'Miscellaneous' )
layout.addParameter( 'misc', 'misc.catchCore' , 'Catch Core Dumps' , 1 )
layout.addParameter( 'misc', 'misc.verboseLevel1' , 'Verbose' , 0 )
layout.addParameter( 'misc', 'misc.verboseLevel2' , 'Very Verbose' , 0 )
layout.addParameter( 'misc', 'misc.info' , 'Show Info' , 0 )
layout.addParameter( 'misc', 'misc.logMode' , 'Output is a TTY' , 0 )
layout.addParameter( 'misc', 'misc.minTraceLevel' , 'Min. Trace Level' , 1 )
layout.addParameter( 'misc', 'misc.maxTraceLevel' , 'Max. Trace Level' , 1 )
layout.addTitle ( 'misc', 'Print/Snapshot Parameters' )
layout.addParameter( 'misc', 'viewer.printer.mode' , 'Printer/Snapshot Mode', 1 )
layout.addParameter( 'misc', 'viewer.printer.paper' , 'Paper Size' , 0 )
layout.addParameter( 'misc', 'viewer.printer.orientation', 'Orientation' , 0 )
layout.addParameter( 'misc', 'viewer.printer.DPI' , 'DPI' , 0 )