diff options
author | Brad Beckmann <Brad.Beckmann@amd.com> | 2010-08-20 11:44:09 -0700 |
---|---|---|
committer | Brad Beckmann <Brad.Beckmann@amd.com> | 2010-08-20 11:44:09 -0700 |
commit | 5c801090a3e7961fe71c308a629c4529d2dc0de2 (patch) | |
tree | 4c447dc6acd73222870befbabfaee625a61bd204 /configs/example | |
parent | eb1e5636e31f7dd0d1dc650ce46a90a4ce7c6832 (diff) | |
download | gem5-5c801090a3e7961fe71c308a629c4529d2dc0de2.tar.xz |
config: reorganized how ruby specifies command-line options
Diffstat (limited to 'configs/example')
-rw-r--r-- | configs/example/memtest-ruby.py | 23 | ||||
-rw-r--r-- | configs/example/ruby_fs.py | 14 | ||||
-rw-r--r-- | configs/example/ruby_se.py | 13 | ||||
-rw-r--r-- | configs/example/rubytest.py | 23 |
4 files changed, 39 insertions, 34 deletions
diff --git a/configs/example/memtest-ruby.py b/configs/example/memtest-ruby.py index 16d86f0bc..567af03d0 100644 --- a/configs/example/memtest-ruby.py +++ b/configs/example/memtest-ruby.py @@ -69,20 +69,27 @@ parser.add_option("--progress", type="int", default=1000, "[default: %default]") # -# Set the default cache size and associativity to be very small to encourage -# races between requests and writebacks. +# Add the ruby specific and protocol specific options # -parser.add_option("--l1d_size", type="string", default="256B") -parser.add_option("--l1i_size", type="string", default="256B") -parser.add_option("--l2_size", type="string", default="512B") -parser.add_option("--l1d_assoc", type="int", default=2) -parser.add_option("--l1i_assoc", type="int", default=2) -parser.add_option("--l2_assoc", type="int", default=2) +Ruby.define_options(parser) execfile(os.path.join(config_root, "common", "Options.py")) (options, args) = parser.parse_args() +# +# Set the default cache size and associativity to be very small to encourage +# races between requests and writebacks. +# +options.l1d_size="256B" +options.l1i_size="256B" +options.l2_size="512B" +options.l3_size="1kB" +options.l1d_assoc=2 +options.l1i_assoc=2 +options.l2_assoc=2 +options.l3_assoc=2 + if args: print "Error: script doesn't take any positional arguments" sys.exit(1) diff --git a/configs/example/ruby_fs.py b/configs/example/ruby_fs.py index 5c508f6fe..b6d9a6c0a 100644 --- a/configs/example/ruby_fs.py +++ b/configs/example/ruby_fs.py @@ -72,16 +72,10 @@ 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.") -# cache parameters -parser.add_option("--l1d_size", type="string", default="32kB") -parser.add_option("--l1i_size", type="string", default="32kB") -parser.add_option("--l2_size", type="string", default="1MB") -parser.add_option("--l1d_assoc", type="int", default=2) -parser.add_option("--l1i_assoc", type="int", default=2) -parser.add_option("--l2_assoc", type="int", default=16) - -# ruby host memory experimentation -parser.add_option("--map_levels", type="int") +# +# Add the ruby specific and protocol specific options +# +Ruby.define_options(parser) execfile(os.path.join(config_root, "common", "Options.py")) diff --git a/configs/example/ruby_se.py b/configs/example/ruby_se.py index 600fa1b14..7a55e1513 100644 --- a/configs/example/ruby_se.py +++ b/configs/example/ruby_se.py @@ -68,14 +68,11 @@ 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.") -# cache parameters -parser.add_option("--l1d_size", type="string", default="32kB") -parser.add_option("--l1i_size", type="string", default="32kB") -parser.add_option("--l2_size", type="string", default="1MB") -parser.add_option("--l1d_assoc", type="int", default=2) -parser.add_option("--l1i_assoc", type="int", default=2) -parser.add_option("--l2_assoc", type="int", default=16) - +# +# Add the ruby specific and protocol specific options +# +Ruby.define_options(parser) + execfile(os.path.join(config_root, "common", "Options.py")) (options, args) = parser.parse_args() diff --git a/configs/example/rubytest.py b/configs/example/rubytest.py index c9cf0aba4..2a789c979 100644 --- a/configs/example/rubytest.py +++ b/configs/example/rubytest.py @@ -54,20 +54,27 @@ parser.add_option("-f", "--wakeup_freq", metavar="N", default=10, help="Wakeup every N cycles") # -# Set the default cache size and associativity to be very small to encourage -# races between requests and writebacks. +# Add the ruby specific and protocol specific options # -parser.add_option("--l1d_size", type="string", default="256B") -parser.add_option("--l1i_size", type="string", default="256B") -parser.add_option("--l2_size", type="string", default="512B") -parser.add_option("--l1d_assoc", type="int", default=2) -parser.add_option("--l1i_assoc", type="int", default=2) -parser.add_option("--l2_assoc", type="int", default=2) +Ruby.define_options(parser) execfile(os.path.join(config_root, "common", "Options.py")) (options, args) = parser.parse_args() +# +# Set the default cache size and associativity to be very small to encourage +# races between requests and writebacks. +# +options.l1d_size="256B" +options.l1i_size="256B" +options.l2_size="512B" +options.l3_size="1kB" +options.l1d_assoc=2 +options.l1i_assoc=2 +options.l2_assoc=2 +options.l3_assoc=2 + if args: print "Error: script doesn't take any positional arguments" sys.exit(1) |