main.py (4167:ce5d0f62f13b) | main.py (4850:434e8d79de49) |
---|---|
1# Copyright (c) 2005 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 12 unchanged lines hidden (view full) --- 21# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26# 27# Authors: Nathan Binkert 28 | 1# Copyright (c) 2005 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 12 unchanged lines hidden (view full) --- 21# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26# 27# Authors: Nathan Binkert 28 |
29import code, optparse, os, socket, sys 30from datetime import datetime | 29import code 30import datetime 31import optparse 32import os 33import socket 34import sys 35 |
31from attrdict import attrdict | 36from attrdict import attrdict |
37import defines |
|
32import traceflags 33 34__all__ = [ 'options', 'arguments', 'main' ] 35 36usage="%prog [m5 options] script.py [script options]" 37version="%prog 2.0" 38brief_copyright=''' 39Copyright (c) 2001-2006 --- 71 unchanged lines hidden (view full) --- 111 fhelp = optparse.SUPPRESS_HELP 112 113 add_option(tname, action="store_true", default=default, help=thelp) 114 add_option(fname, action="store_false", dest=dest, help=fhelp) 115 116# Help options 117add_option('-A', "--authors", action="store_true", default=False, 118 help="Show author information") | 38import traceflags 39 40__all__ = [ 'options', 'arguments', 'main' ] 41 42usage="%prog [m5 options] script.py [script options]" 43version="%prog 2.0" 44brief_copyright=''' 45Copyright (c) 2001-2006 --- 71 unchanged lines hidden (view full) --- 117 fhelp = optparse.SUPPRESS_HELP 118 119 add_option(tname, action="store_true", default=default, help=thelp) 120 add_option(fname, action="store_false", dest=dest, help=fhelp) 121 122# Help options 123add_option('-A', "--authors", action="store_true", default=False, 124 help="Show author information") |
125add_option('-B', "--build-info", action="store_true", default=False, 126 help="Show build information") |
|
119add_option('-C', "--copyright", action="store_true", default=False, 120 help="Show full copyright information") 121add_option('-R', "--readme", action="store_true", default=False, 122 help="Show the readme") 123add_option('-N', "--release-notes", action="store_true", default=False, 124 help="Show the release notes") 125 126# Options for configuring the base simulator --- 63 unchanged lines hidden (view full) --- 190 import defines 191 import event 192 import info 193 import internal 194 195 parse_args() 196 197 done = False | 127add_option('-C', "--copyright", action="store_true", default=False, 128 help="Show full copyright information") 129add_option('-R', "--readme", action="store_true", default=False, 130 help="Show the readme") 131add_option('-N', "--release-notes", action="store_true", default=False, 132 help="Show the release notes") 133 134# Options for configuring the base simulator --- 63 unchanged lines hidden (view full) --- 198 import defines 199 import event 200 import info 201 import internal 202 203 parse_args() 204 205 done = False |
206 207 if options.build_info: 208 done = True 209 print 'Build information:' 210 print 211 print 'compiled %s' % internal.core.cvar.compileDate; 212 print 'started %s' % datetime.datetime.now().ctime() 213 print 'executing on %s' % socket.gethostname() 214 print 'build options:' 215 keys = defines.m5_build_env.keys() 216 keys.sort() 217 for key in keys: 218 val = defines.m5_build_env[key] 219 print ' %s = %s' % (key, val) 220 print 221 |
|
198 if options.copyright: 199 done = True 200 print info.LICENSE 201 print 202 203 if options.authors: 204 done = True 205 print 'Author information:' --- 31 unchanged lines hidden (view full) --- 237 if done: 238 sys.exit(0) 239 240 if options.verbose >= 0: 241 print "M5 Simulator System" 242 print brief_copyright 243 print 244 print "M5 compiled %s" % internal.core.cvar.compileDate; | 222 if options.copyright: 223 done = True 224 print info.LICENSE 225 print 226 227 if options.authors: 228 done = True 229 print 'Author information:' --- 31 unchanged lines hidden (view full) --- 261 if done: 262 sys.exit(0) 263 264 if options.verbose >= 0: 265 print "M5 Simulator System" 266 print brief_copyright 267 print 268 print "M5 compiled %s" % internal.core.cvar.compileDate; |
245 print "M5 started %s" % datetime.now().ctime() | 269 print "M5 started %s" % datetime.datetime.now().ctime() |
246 print "M5 executing on %s" % socket.gethostname() 247 print "command line:", 248 for argv in sys.argv: 249 print argv, 250 print 251 252 # check to make sure we can find the listed script 253 if not arguments or not os.path.isfile(arguments[0]): --- 89 unchanged lines hidden --- | 270 print "M5 executing on %s" % socket.gethostname() 271 print "command line:", 272 for argv in sys.argv: 273 print argv, 274 print 275 276 # check to make sure we can find the listed script 277 if not arguments or not os.path.isfile(arguments[0]): --- 89 unchanged lines hidden --- |