main.py (5950:bf32d75419ad) main.py (6171:59006a759508)
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

--- 107 unchanged lines hidden (view full) ---

116add_option("--trace-ignore", metavar="EXPR", action='append', split=':',
117 help="Ignore EXPR sim objects")
118
119# Help options
120set_group("Help Options")
121add_option("--list-sim-objects", action='store_true', default=False,
122 help="List all built-in SimObjects, their parameters and default values")
123
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

--- 107 unchanged lines hidden (view full) ---

116add_option("--trace-ignore", metavar="EXPR", action='append', split=':',
117 help="Ignore EXPR sim objects")
118
119# Help options
120set_group("Help Options")
121add_option("--list-sim-objects", action='store_true', default=False,
122 help="List all built-in SimObjects, their parameters and default values")
123
124# load the options.py config file to allow people to set their own
125# default options
126options_file = config.get('options.py')
127if options_file:
128 scope = { 'options' : options }
129 execfile(options_file, scope)
130
131arguments = options.parse_args()
132
124def main():
125 import core
126 import debug
127 import defines
128 import event
129 import info
130 import stats
131 import trace
132
133 def check_tracing():
134 if defines.TRACING_ON:
135 return
136
137 fatal("Tracing is not enabled. Compile with TRACING_ON")
138
133def main():
134 import core
135 import debug
136 import defines
137 import event
138 import info
139 import stats
140 import trace
141
142 def check_tracing():
143 if defines.TRACING_ON:
144 return
145
146 fatal("Tracing is not enabled. Compile with TRACING_ON")
147
139 # load the options.py config file to allow people to set their own
140 # default options
141 options_file = config.get('options.py')
142 if options_file:
143 scope = { 'options' : options }
144 execfile(options_file, scope)
145
146 arguments = options.parse_args()
147
148 if not os.path.isdir(options.outdir):
149 os.makedirs(options.outdir)
150
151 # These filenames are used only if the redirect_std* options are set
152 stdout_file = os.path.join(options.outdir, options.stdout_file)
153 stderr_file = os.path.join(options.outdir, options.stderr_file)
154
155 # Print redirection notices here before doing any redirection

--- 205 unchanged lines hidden (view full) ---

361 # once the script is done
362 if options.interactive:
363 interact = code.InteractiveConsole(scope)
364 interact.interact("M5 Interactive Console")
365
366if __name__ == '__main__':
367 from pprint import pprint
368
148 if not os.path.isdir(options.outdir):
149 os.makedirs(options.outdir)
150
151 # These filenames are used only if the redirect_std* options are set
152 stdout_file = os.path.join(options.outdir, options.stdout_file)
153 stderr_file = os.path.join(options.outdir, options.stderr_file)
154
155 # Print redirection notices here before doing any redirection

--- 205 unchanged lines hidden (view full) ---

361 # once the script is done
362 if options.interactive:
363 interact = code.InteractiveConsole(scope)
364 interact.interact("M5 Interactive Console")
365
366if __name__ == '__main__':
367 from pprint import pprint
368
369 # load the options.py config file to allow people to set their own
370 # default options
371 options_file = config.get('options.py')
372 if options_file:
373 scope = { 'options' : options }
374 execfile(options_file, scope)
375
376 arguments = options.parse_args()
377
378 print 'opts:'
379 pprint(options, indent=4)
380 print
381
382 print 'args:'
383 pprint(arguments, indent=4)
369 print 'opts:'
370 pprint(options, indent=4)
371 print
372
373 print 'args:'
374 pprint(arguments, indent=4)