diff --git a/crlcore/python/helpers/__init__.py b/crlcore/python/helpers/__init__.py index f437de58..b44cd57d 100644 --- a/crlcore/python/helpers/__init__.py +++ b/crlcore/python/helpers/__init__.py @@ -25,6 +25,7 @@ import re import traceback import Hurricane +quiet = False sysConfDir = None ndaConfDir = None symbolicTechno = 'cmos' @@ -39,6 +40,13 @@ moduleGlobals = globals() def stype ( o ): return str(type(o)).split("'")[1] +def isderived ( derived, base ): + btype = base.mro()[0] + for dtype in derived.mro(): + if dtype == btype: return True + return False + + def truncPath ( path ): if len(path) < 70: return path return '.../'+os.sep.join(path.split(os.sep)[-4:]) @@ -246,13 +254,16 @@ def setTraceLevel ( level ): return -def initTechno ( quiet ): +def initTechno ( argQuiet ): + global quiet global ndaConfDir global realDir global realTechno global symbolicDir global symbolicTechno + quiet = argQuiet + technoFiles = [ sysConfDir+'/techno.conf' ] if os.getenv('HOME'): technoFiles += [ os.getenv('HOME')+'/.coriolis2/techno.py' ] diff --git a/unicorn/src/cgt.py b/unicorn/src/cgt.py index 8edf4498..865fb900 100755 --- a/unicorn/src/cgt.py +++ b/unicorn/src/cgt.py @@ -80,8 +80,10 @@ def runScript ( scriptPath, editor ): except ImportError, e: module = str(e).split()[-1] - print '[ERROR] The <%s> script cannot be loaded.' % module - print ' Please check your design hierarchy.' + print '[ERROR] The <%s> script cannot be loaded.' % os.path.basename(scriptPath) + print ' Please check your design hierarchy or the Python syntax.' + print ' Error was:' + print ' %s\n' % e except Exception, e: print '[ERROR] An exception occured while loading the Stratus script module:' print ' <%s>\n' % (scriptPath)