main.py (3506:99f86646ba5c) | main.py (3624:aaba7e06ece4) |
---|---|
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 --- 197 unchanged lines hidden (view full) --- 206 207 del opts.quiet 208 209 options.update(opts) 210 arguments.extend(args) 211 return opts,args 212 213def main(): | 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 --- 197 unchanged lines hidden (view full) --- 206 207 del opts.quiet 208 209 options.update(opts) 210 arguments.extend(args) 211 return opts,args 212 213def main(): |
214 import cc_main | 214 import internal |
215 216 parse_args() 217 218 done = False 219 if options.copyright: 220 done = True 221 print info.LICENSE 222 print --- 21 unchanged lines hidden (view full) --- 244 245 if done: 246 sys.exit(0) 247 248 if options.verbose >= 0: 249 print "M5 Simulator System" 250 print brief_copyright 251 print | 215 216 parse_args() 217 218 done = False 219 if options.copyright: 220 done = True 221 print info.LICENSE 222 print --- 21 unchanged lines hidden (view full) --- 244 245 if done: 246 sys.exit(0) 247 248 if options.verbose >= 0: 249 print "M5 Simulator System" 250 print brief_copyright 251 print |
252 print "M5 compiled %s" % cc_main.cvar.compileDate; | 252 print "M5 compiled %s" % internal.main.cvar.compileDate; |
253 print "M5 started %s" % datetime.now().ctime() 254 print "M5 executing on %s" % socket.gethostname() 255 print "command line:", 256 for argv in sys.argv: 257 print argv, 258 print 259 260 # check to make sure we can find the listed script 261 if not arguments or not os.path.isfile(arguments[0]): 262 if arguments and not os.path.isfile(arguments[0]): 263 print "Script %s not found" % arguments[0] 264 usage(2) 265 266 # tell C++ about output directory | 253 print "M5 started %s" % datetime.now().ctime() 254 print "M5 executing on %s" % socket.gethostname() 255 print "command line:", 256 for argv in sys.argv: 257 print argv, 258 print 259 260 # check to make sure we can find the listed script 261 if not arguments or not os.path.isfile(arguments[0]): 262 if arguments and not os.path.isfile(arguments[0]): 263 print "Script %s not found" % arguments[0] 264 usage(2) 265 266 # tell C++ about output directory |
267 cc_main.setOutputDir(options.outdir) | 267 internal.main.setOutputDir(options.outdir) |
268 269 # update the system path with elements from the -p option 270 sys.path[0:0] = options.path 271 272 import objects 273 274 # set stats options 275 objects.Statistics.text_file = options.stats_file --- 61 unchanged lines hidden --- | 268 269 # update the system path with elements from the -p option 270 sys.path[0:0] = options.path 271 272 import objects 273 274 # set stats options 275 objects.Statistics.text_file = options.stats_file --- 61 unchanged lines hidden --- |