diff -r 570b44fe6e04 -r 4886c6680cde configs/common/Options.py --- a/configs/common/Options.py Tue Apr 03 03:50:14 2012 -0400 +++ b/configs/common/Options.py Tue Apr 03 23:42:54 2012 -0500 @@ -27,9 +27,6 @@ # Authors: Lisa Hsu import m5 -from m5.defines import buildEnv -from m5.objects import * -from Benchmarks import * def addCommonOptions(parser): # system options @@ -100,7 +97,6 @@ "detailed", "inorder"], help = "cpu type for restoring from a checkpoint") - # CPU Switching - default switch model goes from a checkpoint # to a timing simple CPU with caches to warm up, then to detailed CPU for # data measurement @@ -127,47 +123,3 @@ parser.add_option("--at-instruction", action="store_true", default=False, help="""Treat value of --checkpoint-restore or --take-checkpoint as a number of instructions.""") - -def addSEOptions(parser): - # Benchmark options - parser.add_option("-c", "--cmd", default="", - 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""") - parser.add_option("-i", "--input", default="", - help="Read stdin from a file.") - parser.add_option("--output", default="", - help="Redirect stdout to a file.") - parser.add_option("--errout", default="", - help="Redirect stderr to a file.") - -def addFSOptions(parser): - # Simulation options - parser.add_option("--timesync", action="store_true", - help="Prevent simulated time from getting ahead of real time") - - # System options - parser.add_option("--kernel", action="store", type="string") - parser.add_option("--script", action="store", type="string") - parser.add_option("--frame-capture", action="store_true", - help="Stores changed frame buffers from the VNC server to compressed "\ - "files in the gem5 output directory") - - if buildEnv['TARGET_ISA'] == "arm": - parser.add_option("--bare-metal", action="store_true", - help="Provide the raw system without the linux specific bits") - parser.add_option("--machine-type", action="store", type="choice", - choices=ArmMachineType.map.keys(), default="RealView_PBX") - # Benchmark options - parser.add_option("--dual", action="store_true", - help="Simulate two systems attached with an ethernet link") - parser.add_option("-b", "--benchmark", action="store", type="string", - dest="benchmark", - help="Specify the benchmark to run. Available benchmarks: %s"\ - % DefinedBenchmarks) - - # Metafile options - parser.add_option("--etherdump", action="store", type="string", dest="etherdump", - help="Specify the filename to dump a pcap capture of the" \ - "ethernet traffic") diff -r 570b44fe6e04 -r 4886c6680cde configs/example/fs.py --- a/configs/example/fs.py Tue Apr 03 03:50:14 2012 -0400 +++ b/configs/example/fs.py Tue Apr 03 23:42:54 2012 -0500 @@ -57,8 +57,37 @@ import Options parser = optparse.OptionParser() + +# Simulation options +parser.add_option("--timesync", action="store_true", + help="Prevent simulated time from getting ahead of real time") + +# System options +parser.add_option("--kernel", action="store", type="string") +parser.add_option("--script", action="store", type="string") +parser.add_option("--frame-capture", action="store_true", + help="Stores changed frame buffers from the VNC server to compressed "\ + "files in the gem5 output directory") + +if buildEnv['TARGET_ISA'] == "arm": + parser.add_option("--bare-metal", action="store_true", + help="Provide the raw system without the linux specific bits") + parser.add_option("--machine-type", action="store", type="choice", + choices=ArmMachineType.map.keys(), default="RealView_PBX") +# Benchmark options +parser.add_option("--dual", action="store_true", + help="Simulate two systems attached with an ethernet link") +parser.add_option("-b", "--benchmark", action="store", type="string", + dest="benchmark", + help="Specify the benchmark to run. Available benchmarks: %s"\ + % DefinedBenchmarks) + +# Metafile options +parser.add_option("--etherdump", action="store", type="string", dest="etherdump", + help="Specify the filename to dump a pcap capture of the" \ + "ethernet traffic") + Options.addCommonOptions(parser) -Options.addFSOptions(parser) (options, args) = parser.parse_args() diff -r 570b44fe6e04 -r 4886c6680cde configs/example/ruby_direct_test.py --- a/configs/example/ruby_direct_test.py Tue Apr 03 03:50:14 2012 -0400 +++ b/configs/example/ruby_direct_test.py Tue Apr 03 23:42:54 2012 -0500 @@ -32,17 +32,13 @@ from m5.objects import * from m5.defines import buildEnv from m5.util import addToPath -import os, optparse, sys +import optparse, sys addToPath('../common') addToPath('../ruby') +import Options import Ruby -# Get paths we might need. It's expected this file is in m5/configs/example. -config_path = os.path.dirname(os.path.abspath(__file__)) -config_root = os.path.dirname(config_path) -m5_root = os.path.dirname(config_root) - parser = optparse.OptionParser() parser.add_option("-l", "--requests", metavar="N", default=100, @@ -56,8 +52,7 @@ # Add the ruby specific and protocol specific options # Ruby.define_options(parser) - -execfile(os.path.join(config_root, "common", "Options.py")) +Options.addCommonOptions(parser) (options, args) = parser.parse_args() diff -r 570b44fe6e04 -r 4886c6680cde configs/example/ruby_fs.py --- a/configs/example/ruby_fs.py Tue Apr 03 03:50:14 2012 -0400 +++ b/configs/example/ruby_fs.py Tue Apr 03 23:42:54 2012 -0500 @@ -50,11 +50,26 @@ import Simulation parser = optparse.OptionParser() +# System options +parser.add_option("--kernel", action="store", type="string") +parser.add_option("--script", action="store", type="string") +# Benchmark options +parser.add_option("-b", "--benchmark", action="store", type="string", + dest="benchmark", + help="Specify the benchmark to run. Available benchmarks: %s"\ + % DefinedBenchmarks) +parser.add_option("-o", "--options", default="", + help='The options to pass to the binary, use " " around the entire string') +parser.add_option("-i", "--input", default="", help="Read stdin from a file.") +parser.add_option("--output", default="", help="Redirect stdout to a file.") +parser.add_option("--errout", default="", help="Redirect stderr to a file.") + +# +# Add the ruby specific and protocol specific options +# +Ruby.define_options(parser) + Options.addCommonOptions(parser) -Options.addFSOptions(parser) - -# Add the ruby specific and protocol specific options -Ruby.define_options(parser) (options, args) = parser.parse_args() options.ruby = True diff -r 570b44fe6e04 -r 4886c6680cde configs/example/ruby_mem_test.py --- a/configs/example/ruby_mem_test.py Tue Apr 03 03:50:14 2012 -0400 +++ b/configs/example/ruby_mem_test.py Tue Apr 03 23:42:54 2012 -0500 @@ -32,17 +32,13 @@ from m5.objects import * from m5.defines import buildEnv from m5.util import addToPath -import os, optparse, sys +import optparse, sys addToPath('../common') addToPath('../ruby') +import Options import Ruby -# Get paths we might need. It's expected this file is in m5/configs/example. -config_path = os.path.dirname(os.path.abspath(__file__)) -config_root = os.path.dirname(config_path) -m5_root = os.path.dirname(config_root) - parser = optparse.OptionParser() parser.add_option("-l", "--maxloads", metavar="N", default=0, @@ -61,8 +57,7 @@ # Add the ruby specific and protocol specific options # Ruby.define_options(parser) - -execfile(os.path.join(config_root, "common", "Options.py")) +Options.addCommonOptions(parser) (options, args) = parser.parse_args() diff -r 570b44fe6e04 -r 4886c6680cde configs/example/ruby_network_test.py --- a/configs/example/ruby_network_test.py Tue Apr 03 03:50:14 2012 -0400 +++ b/configs/example/ruby_network_test.py Tue Apr 03 23:42:54 2012 -0500 @@ -32,16 +32,13 @@ from m5.objects import * from m5.defines import buildEnv from m5.util import addToPath -import os, optparse, sys +import optparse, sys addToPath('../common') addToPath('../ruby') + +import Options import Ruby -# Get paths we might need. It's expected this file is in m5/configs/example. -config_path = os.path.dirname(os.path.abspath(__file__)) -config_root = os.path.dirname(config_path) -m5_root = os.path.dirname(config_root) - parser = optparse.OptionParser() parser.add_option("--synthetic", type="int", default=0, @@ -72,8 +69,7 @@ # Add the ruby specific and protocol specific options # Ruby.define_options(parser) - -execfile(os.path.join(config_root, "common", "Options.py")) +Options.addCommonOptions(parser) (options, args) = parser.parse_args() diff -r 570b44fe6e04 -r 4886c6680cde configs/example/ruby_random_test.py --- a/configs/example/ruby_random_test.py Tue Apr 03 03:50:14 2012 -0400 +++ b/configs/example/ruby_random_test.py Tue Apr 03 23:42:54 2012 -0500 @@ -32,17 +32,13 @@ from m5.objects import * from m5.defines import buildEnv from m5.util import addToPath -import os, optparse, sys +import optparse, sys addToPath('../common') addToPath('../ruby') +import Options import Ruby -# Get paths we might need. It's expected this file is in m5/configs/example. -config_path = os.path.dirname(os.path.abspath(__file__)) -config_root = os.path.dirname(config_path) -m5_root = os.path.dirname(config_root) - parser = optparse.OptionParser() parser.add_option("-l", "--checks", metavar="N", default=100, @@ -54,8 +50,7 @@ # Add the ruby specific and protocol specific options # Ruby.define_options(parser) - -execfile(os.path.join(config_root, "common", "Options.py")) +Options.addCommonOptions(parser) (options, args) = parser.parse_args() diff -r 570b44fe6e04 -r 4886c6680cde configs/example/se.py --- a/configs/example/se.py Tue Apr 03 03:50:14 2012 -0400 +++ b/configs/example/se.py Tue Apr 03 23:42:54 2012 -0500 @@ -61,8 +61,17 @@ from cpu2000 import * parser = optparse.OptionParser() + +# Benchmark options +parser.add_option("-c", "--cmd", default="", + 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') +parser.add_option("-i", "--input", default="", help="Read stdin from a file.") +parser.add_option("--output", default="", help="Redirect stdout to a file.") +parser.add_option("--errout", default="", help="Redirect stderr to a file.") + Options.addCommonOptions(parser) -Options.addSEOptions(parser) if '--ruby' in sys.argv: Ruby.define_options(parser)