main.py (8234:a08c5fb4cd89) main.py (8245:a9d06c894afe)
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

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

139 try:
140 from IPython.Shell import IPShellEmbed
141 ipshell = IPShellEmbed(banner=banner,user_ns=scope)
142 ipshell()
143 except ImportError:
144 code.InteractiveConsole(scope).interact(banner)
145
146def main(*args):
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

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

139 try:
140 from IPython.Shell import IPShellEmbed
141 ipshell = IPShellEmbed(banner=banner,user_ns=scope)
142 ipshell()
143 except ImportError:
144 code.InteractiveConsole(scope).interact(banner)
145
146def main(*args):
147 import m5
148
147 import core
148 import debug
149 import defines
150 import event
151 import info
152 import stats
153 import trace
154
155 from util import fatal
156
149 import core
150 import debug
151 import defines
152 import event
153 import info
154 import stats
155 import trace
156
157 from util import fatal
158
157 global options
158 if len(args) == 0:
159 options, arguments = parse_options()
160 elif len(args) == 2:
161 options, arguments = args
162 else:
163 raise TypeError, "main() takes 0 or 2 arguments (%d given)" % len(args)
164
159 if len(args) == 0:
160 options, arguments = parse_options()
161 elif len(args) == 2:
162 options, arguments = args
163 else:
164 raise TypeError, "main() takes 0 or 2 arguments (%d given)" % len(args)
165
166 m5.options = options
167
165 def check_tracing():
166 if defines.TRACING_ON:
167 return
168
169 fatal("Tracing is not enabled. Compile with TRACING_ON")
170
171 if not os.path.isdir(options.outdir):
172 os.makedirs(options.outdir)

--- 212 unchanged lines hidden ---
168 def check_tracing():
169 if defines.TRACING_ON:
170 return
171
172 fatal("Tracing is not enabled. Compile with TRACING_ON")
173
174 if not os.path.isdir(options.outdir):
175 os.makedirs(options.outdir)

--- 212 unchanged lines hidden ---