Added message when loading the technology/configuration files.
* New: In CRL/python/helpers.io, vprint() wrapper around print to display messages according to the verbose level. In etc/*, add messages in every configuration files so we may know under which we are running.
This commit is contained in:
parent
ef2635b9f3
commit
39cd831a57
|
@ -14,6 +14,10 @@
|
|||
|
||||
|
||||
import Cfg
|
||||
import helpers.io
|
||||
helpers.io.vprint( 1, ' o Loading "node180.scn6m_deep_09" technology.' )
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
from Hurricane import DataBase
|
||||
from CRL import System
|
||||
|
||||
|
|
|
@ -13,6 +13,9 @@
|
|||
# +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
import os
|
||||
import os.path
|
||||
from CRL import Environment
|
||||
|
|
|
@ -13,4 +13,7 @@
|
|||
# +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
#import common.analog
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
# +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
import helpers
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
import common.devices
|
||||
from common.devices import addDevice
|
||||
|
||||
|
|
|
@ -13,6 +13,9 @@
|
|||
# +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
import common.display
|
||||
|
||||
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
#
|
||||
# Used revision 8.00 of May 11, 2009.
|
||||
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
from Hurricane import DbU
|
||||
from helpers.AnalogTechno import Length
|
||||
from helpers.AnalogTechno import Area
|
||||
|
|
|
@ -13,4 +13,7 @@
|
|||
# +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
import common.etesian
|
||||
|
|
|
@ -14,12 +14,14 @@
|
|||
|
||||
|
||||
import Cfg
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
from Hurricane import DataBase
|
||||
from CRL import AllianceFramework
|
||||
from CRL import RoutingGauge
|
||||
from CRL import RoutingLayerGauge
|
||||
from CRL import CellGauge
|
||||
import helpers
|
||||
from helpers import l, n, u
|
||||
import common.kite
|
||||
|
||||
|
|
|
@ -13,4 +13,7 @@
|
|||
# +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
import common.misc
|
||||
|
|
|
@ -13,4 +13,7 @@
|
|||
# +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
import common.patterns
|
||||
|
|
|
@ -14,8 +14,10 @@
|
|||
|
||||
|
||||
import Cfg
|
||||
from helpers import l, u, n
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
from helpers import l, u, n
|
||||
|
||||
Cfg.getParamInt ( "chip.block.rails.count" ).setInt ( 5 )
|
||||
Cfg.getParamInt ( "chip.block.rails.hWidth" ).setInt ( l( 24) )
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
|
||||
|
||||
import Cfg
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
import common.stratus1
|
||||
|
||||
|
||||
|
|
|
@ -13,6 +13,9 @@
|
|||
# +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
from helpers import l, u, n
|
||||
from Hurricane import DbU
|
||||
from Hurricane import DataBase
|
||||
|
|
|
@ -14,8 +14,12 @@
|
|||
|
||||
|
||||
import Cfg
|
||||
from Hurricane import DataBase
|
||||
from CRL import System
|
||||
import helpers.io
|
||||
helpers.io.vprint( 1, ' o Loading "symbolic.cmos" technology.' )
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
from Hurricane import DataBase
|
||||
from CRL import System
|
||||
|
||||
Cfg.Configuration.pushDefaultPriority( Cfg.Parameter.Priority.ConfigurationFile )
|
||||
|
||||
|
|
|
@ -15,10 +15,12 @@
|
|||
|
||||
import os
|
||||
import os.path
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
from CRL import Environment
|
||||
from CRL import AllianceFramework
|
||||
|
||||
|
||||
allianceTop = None
|
||||
if os.environ.has_key('ALLIANCE_TOP'):
|
||||
allianceTop = os.environ['ALLIANCE_TOP']
|
||||
|
|
|
@ -13,4 +13,7 @@
|
|||
# +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
import common.analog
|
||||
|
|
|
@ -13,6 +13,9 @@
|
|||
# +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
import common.display
|
||||
|
||||
|
||||
|
|
|
@ -13,4 +13,7 @@
|
|||
# +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
import common.etesian
|
||||
|
|
|
@ -21,6 +21,9 @@ from CRL import RoutingLayerGauge
|
|||
from CRL import CellGauge
|
||||
import helpers
|
||||
from helpers import l, n, u
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
import common.kite
|
||||
|
||||
|
||||
|
|
|
@ -13,4 +13,7 @@
|
|||
# +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
import common.misc
|
||||
|
|
|
@ -13,4 +13,7 @@
|
|||
# +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
import common.patterns
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
|
||||
import Cfg
|
||||
from helpers import l, u, n
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
|
||||
Cfg.getParamInt ( "chip.block.rails.count" ).setInt ( 5 )
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
import os.path
|
||||
import Cfg
|
||||
import helpers
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
import common.stratus1
|
||||
|
||||
|
||||
|
|
|
@ -13,10 +13,13 @@
|
|||
# +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
from helpers import l, u, n
|
||||
from Hurricane import DbU
|
||||
from Hurricane import DataBase
|
||||
from Hurricane import Technology
|
||||
from helpers import l, u, n
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
from Hurricane import DbU
|
||||
from Hurricane import DataBase
|
||||
from Hurricane import Technology
|
||||
|
||||
|
||||
tech = DataBase.getDB().getTechnology()
|
||||
|
|
|
@ -14,6 +14,10 @@
|
|||
|
||||
|
||||
import Cfg
|
||||
import helpers.io
|
||||
helpers.io.vprint( 1, ' o Loading "symbolic.cmos45" technology.' )
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
from Hurricane import DataBase
|
||||
from CRL import System
|
||||
|
||||
|
|
|
@ -15,6 +15,9 @@
|
|||
|
||||
import os
|
||||
import os.path
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
from CRL import Environment
|
||||
from CRL import AllianceFramework
|
||||
|
||||
|
|
|
@ -13,4 +13,7 @@
|
|||
# +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
import common.analog
|
||||
|
|
|
@ -13,6 +13,9 @@
|
|||
# +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
import common.display
|
||||
|
||||
|
||||
|
|
|
@ -13,4 +13,7 @@
|
|||
# +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
import common.etesian
|
||||
|
|
|
@ -14,13 +14,16 @@
|
|||
|
||||
|
||||
import Cfg
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
from Hurricane import DataBase
|
||||
from CRL import AllianceFramework
|
||||
from CRL import RoutingGauge
|
||||
from CRL import RoutingLayerGauge
|
||||
from CRL import CellGauge
|
||||
import helpers
|
||||
from helpers import l, n, u
|
||||
|
||||
import common.kite
|
||||
|
||||
|
||||
|
|
|
@ -13,4 +13,7 @@
|
|||
# +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
import common.misc
|
||||
|
|
|
@ -13,4 +13,7 @@
|
|||
# +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
import common.patterns
|
||||
|
|
|
@ -14,8 +14,10 @@
|
|||
|
||||
|
||||
import Cfg
|
||||
from helpers import l, u, n
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
from helpers import l, u, n
|
||||
|
||||
Cfg.getParamInt ( "chip.block.rails.count" ).setInt ( 5 )
|
||||
Cfg.getParamInt ( "chip.block.rails.hWidth" ).setInt ( l( 24) )
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
|
||||
|
||||
import Cfg
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
import common.stratus1
|
||||
|
||||
|
||||
|
|
|
@ -13,6 +13,9 @@
|
|||
# +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
import helpers.io
|
||||
helpers.io.vprint( 2, ' - "%s".' % helpers.truncPath(__file__) )
|
||||
|
||||
from helpers import l, u, n
|
||||
from Hurricane import DbU
|
||||
from Hurricane import DataBase
|
||||
|
|
|
@ -58,6 +58,7 @@ except Exception, e:
|
|||
except e:
|
||||
print '[ERROR] helpers.io, neither PyQt4 nor PyQt5 is available.'
|
||||
sys.exit( 1 )
|
||||
import Cfg
|
||||
import helpers
|
||||
from Hurricane import UpdateSession
|
||||
import Viewer
|
||||
|
@ -66,7 +67,6 @@ import Viewer
|
|||
# -------------------------------------------------------------------
|
||||
# Class : "ErrorWidget".
|
||||
|
||||
|
||||
class ErrorWidget ( QDialog ):
|
||||
|
||||
def __init__ ( self, e ):
|
||||
|
@ -238,6 +238,12 @@ class ErrorMessage ( Exception ):
|
|||
return
|
||||
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# Function : "catch()".
|
||||
#
|
||||
# Try to smartly display any exception on the TTY and the graphic
|
||||
# display, if available.
|
||||
|
||||
def catch ( errorObject ):
|
||||
if isinstance(errorObject,ErrorMessage):
|
||||
em = errorObject
|
||||
|
@ -246,21 +252,19 @@ def catch ( errorObject ):
|
|||
em.trace = traceback.extract_tb( sys.exc_info()[2] )
|
||||
#em.scriptPath = __file__
|
||||
|
||||
if Viewer.Graphics.get().isEnabled():
|
||||
tryCont = ErrorWidget( em ).exec_()
|
||||
print em
|
||||
print helpers.textStackTrace( em.trace, True, em.scriptPath )
|
||||
|
||||
if Viewer.Graphics.get().isEnabled():
|
||||
tryCont = ErrorWidget( em ).exec_()
|
||||
|
||||
if UpdateSession.getStackSize() > 0: UpdateSession.close()
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# Class : "WarningMessage".
|
||||
|
||||
|
||||
class WarningMessage ( Exception ):
|
||||
|
||||
def __init__ ( self, message ):
|
||||
|
@ -277,3 +281,20 @@ class WarningMessage ( Exception ):
|
|||
else: formatted += " %s" % self._warnings[i]
|
||||
if i+1 < len(self._warnings): formatted += "\n"
|
||||
return formatted
|
||||
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# Function : "vprint()".
|
||||
#
|
||||
# Small wrap around print to make use of the verbosity levels.
|
||||
|
||||
def isVL ( level ):
|
||||
confLevel = 0
|
||||
if Cfg.getParamBool('misc.verboseLevel1').asBool(): confLevel = 1
|
||||
if Cfg.getParamBool('misc.verboseLevel2').asBool(): confLevel = 2
|
||||
return confLevel >= level
|
||||
|
||||
|
||||
def vprint ( level, message ):
|
||||
if isVL(level): print message
|
||||
return
|
||||
|
|
|
@ -139,7 +139,7 @@ if __name__ == '__main__':
|
|||
flags |= CRL.AllianceFramework.NoPythonInit
|
||||
|
||||
af = CRL.AllianceFramework.create( flags )
|
||||
print af.getEnvironment().getPrint()
|
||||
if helpers.io.isVL(2): print af.getEnvironment().getPrint()
|
||||
|
||||
Cfg.Configuration.pushDefaultPriority(Cfg.Parameter.Priority.CommandLine)
|
||||
|
||||
|
|
Loading…
Reference in New Issue