main.py (13709:dd6b7ac5801f) main.py (13714:35636064b7a1)
1# Copyright (c) 2016 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

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

49__all__ = [ 'options', 'arguments', 'main' ]
50
51usage="%prog [gem5 options] script.py [script options]"
52version="%prog 2.0"
53brief_copyright=\
54 "gem5 is copyrighted software; use the --copyright option for details."
55
56def parse_options():
1# Copyright (c) 2016 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

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

49__all__ = [ 'options', 'arguments', 'main' ]
50
51usage="%prog [gem5 options] script.py [script options]"
52version="%prog 2.0"
53brief_copyright=\
54 "gem5 is copyrighted software; use the --copyright option for details."
55
56def parse_options():
57 import config
58 from options import OptionParser
57 from . import config
58 from .options import OptionParser
59
60 options = OptionParser(usage=usage, version=version,
61 description=brief_copyright)
62 option = options.add_option
63 group = options.set_group
64
65 listener_modes = ( "on", "off", "auto" )
66

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

198 if defines.TRACING_ON:
199 return
200
201 fatal("Tracing is not enabled. Compile with TRACING_ON")
202
203def main(*args):
204 import m5
205
59
60 options = OptionParser(usage=usage, version=version,
61 description=brief_copyright)
62 option = options.add_option
63 group = options.set_group
64
65 listener_modes = ( "on", "off", "auto" )
66

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

198 if defines.TRACING_ON:
199 return
200
201 fatal("Tracing is not enabled. Compile with TRACING_ON")
202
203def main(*args):
204 import m5
205
206 import core
207 import debug
208 import defines
209 import event
210 import info
211 import stats
212 import trace
206 from . import core
207 from . import debug
208 from . import defines
209 from . import event
210 from . import info
211 from . import stats
212 from . import trace
213
213
214 from util import inform, fatal, panic, isInteractive
214 from .util import inform, fatal, panic, isInteractive
215
216 if len(args) == 0:
217 options, arguments = parse_options()
218 elif len(args) == 2:
219 options, arguments = args
220 else:
221 raise TypeError("main() takes 0 or 2 arguments (%d given)" % len(args))
222

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

281 print()
282
283 if options.debug_help:
284 done = True
285 _check_tracing()
286 debug.help()
287
288 if options.list_sim_objects:
215
216 if len(args) == 0:
217 options, arguments = parse_options()
218 elif len(args) == 2:
219 options, arguments = args
220 else:
221 raise TypeError("main() takes 0 or 2 arguments (%d given)" % len(args))
222

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

281 print()
282
283 if options.debug_help:
284 done = True
285 _check_tracing()
286 debug.help()
287
288 if options.list_sim_objects:
289 import SimObject
289 from . import SimObject
290 done = True
291 print("SimObjects:")
292 objects = list(SimObject.allClasses.keys())
293 objects.sort()
294 for name in objects:
295 obj = SimObject.allClasses[name]
296 print(" %s" % obj)
297 params = list(obj._params.keys())

--- 157 unchanged lines hidden ---
290 done = True
291 print("SimObjects:")
292 objects = list(SimObject.allClasses.keys())
293 objects.sort()
294 for name in objects:
295 obj = SimObject.allClasses[name]
296 print(" %s" % obj)
297 params = list(obj._params.keys())

--- 157 unchanged lines hidden ---