diff options
author | Nathan Binkert <binkertn@umich.edu> | 2006-07-10 23:00:13 -0400 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2006-07-10 23:00:13 -0400 |
commit | 55ea050d4823ca294db94d6a1f7f2fc35177e044 (patch) | |
tree | 89dfadc4bb399ecc2f23a78c78f12b0ae8ae2ca7 /configs | |
parent | ad4374e0cd235ea98ddc2a4659f9d7c86e5b355b (diff) | |
download | gem5-55ea050d4823ca294db94d6a1f7f2fc35177e044.tar.xz |
Migrate most of main() and and all option parsing to python
configs/test/fs.py:
configs/test/test.py:
update for the new way that m5 deals with options
src/python/SConscript:
Compile AUTHORS, LICENSE, README, and RELEASE_NOTES into the
python stuff.
src/python/m5/__init__.py:
redo the way options work.
Move them all to main.py
src/sim/main.cc:
Migrate more functionality for main() into python.
Namely option parsing
src/python/m5/attrdict.py:
A dictionary object that overrides attribute access to
do item access.
src/python/m5/main.py:
The new location for M5's option parsing, and the main()
routine to set up the simulation.
--HG--
extra : convert_revision : c86b87a9f508bde1994088e23fd470c7753ee4c1
Diffstat (limited to 'configs')
-rw-r--r-- | configs/test/fs.py | 6 | ||||
-rw-r--r-- | configs/test/test.py | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/configs/test/fs.py b/configs/test/fs.py index cd894ab73..d191f7055 100644 --- a/configs/test/fs.py +++ b/configs/test/fs.py @@ -1,14 +1,14 @@ +import optparse, os, sys + import m5 from m5.objects import * -import os,optparse,sys from SysPaths import * -parser = optparse.OptionParser(option_list=m5.standardOptions) +parser = optparse.OptionParser() parser.add_option("-t", "--timing", action="store_true") (options, args) = parser.parse_args() -m5.setStandardOptions(options) if args: print "Error: script doesn't take any positional arguments" diff --git a/configs/test/test.py b/configs/test/test.py index e7b0971ef..a2c9f8bb0 100644 --- a/configs/test/test.py +++ b/configs/test/test.py @@ -4,15 +4,16 @@ # MIPS: "m5 test.py -a Mips -c hello_mips" import os, optparse, sys + import m5 from m5.objects import * from FullO3Config import * # parse command-line arguments -parser = optparse.OptionParser(option_list=m5.standardOptions) +parser = optparse.OptionParser() parser.add_option("-c", "--cmd", default="hello", - help="The binary to run in syscall emulation mode.") + help="The binary to run in syscall emulation mode.") parser.add_option("-o", "--options", default="", help="The options to pass to the binary, use \" \" around the entire\ string.") @@ -26,7 +27,6 @@ parser.add_option("-m", "--maxtick", type="int", help="Set the maximum number of ticks to run for") (options, args) = parser.parse_args() -m5.setStandardOptions(options) if args: print "Error: script doesn't take any positional arguments" |