Deleted Added
sdiff udiff text old ( 2781:b689ee340f27 ) new ( 2797:b5f26b4eacef )
full compact
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

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

29
30import sys, os, time, atexit, optparse
31
32# import the SWIG-wrapped main C++ functions
33import cc_main
34# import a few SWIG-wrapped items (those that are likely to be used
35# directly by user scripts) completely into this module for
36# convenience
37from cc_main import simulate, SimLoopExitEvent
38
39# import the m5 compile options
40import defines
41
42# define this here so we can use it right away if necessary
43def panic(string):
44 print >>sys.stderr, 'panic:', string
45 sys.exit(1)

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

112 objects.Trace.dump_on_exit = True
113
114def debugBreak(option, opt_str, value, parser):
115 objects.Debug.break_cycles = value
116
117def statsTextFile(option, opt_str, value, parser):
118 objects.Statistics.text_file = value
119
120# Extra list to help for options that are true or false
121TrueOrFalse = ['True', 'False']
122TorF = "True | False"
123
124# Standard optparse options. Need to be explicitly included by the
125# user script when it calls optparse.OptionParser().
126standardOptions = [
127 optparse.make_option("--outdir", type="string", default="."),
128 optparse.make_option("--traceflags", type="string", action="callback",
129 callback=setTraceFlags),
130 optparse.make_option("--tracestart", type="int", action="callback",
131 callback=setTraceStart),

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

211
212# register our C++ exit callback function with Python
213atexit.register(cc_main.doExitCleanup)
214
215# This import allows user scripts to reference 'm5.objects.Foo' after
216# just doing an 'import m5' (without an 'import m5.objects'). May not
217# matter since most scripts will probably 'from m5.objects import *'.
218import objects