diff options
Diffstat (limited to 'configs')
-rw-r--r-- | configs/common/Options.py | 21 | ||||
-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 | ||||
-rw-r--r-- | configs/ruby/MESI_CMP_directory.py | 3 | ||||
-rw-r--r-- | configs/ruby/MI_example.py | 3 | ||||
-rw-r--r-- | configs/ruby/MOESI_CMP_directory.py | 3 | ||||
-rw-r--r-- | configs/ruby/MOESI_CMP_token.py | 3 | ||||
-rw-r--r-- | configs/ruby/MOESI_hammer.py | 3 | ||||
-rw-r--r-- | configs/ruby/Ruby.py | 21 |
11 files changed, 84 insertions, 46 deletions
diff --git a/configs/common/Options.py b/configs/common/Options.py index bf764b407..4efbc541e 100644 --- a/configs/common/Options.py +++ b/configs/common/Options.py @@ -37,18 +37,15 @@ parser.add_option("--fastmem", action="store_true") parser.add_option("--clock", action="store", type="string", default='1GHz') parser.add_option("--num-dirs", type="int", default=1) parser.add_option("--num-l2caches", type="int", default=1) -parser.add_option("--topology", type="string", default="Crossbar", - help="check src/mem/ruby/network/topologies for complete set") -parser.add_option("--mesh-rows", type="int", default=1, - help="the number of rows in the mesh topology") -parser.add_option("--garnet-network", type="string", default=None, - help="'fixed'|'flexible'") -parser.add_option("--numa-high-bit", type="int", default=None, - help="high order address bit to use for numa mapping") - -# ruby sparse memory options -parser.add_option("--use-map", action="store_true", default=False) -parser.add_option("--map-levels", type="int", default=4) +parser.add_option("--num-l3caches", type="int", default=1) +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="2MB") +parser.add_option("--l3_size", type="string", default="16MB") +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) +parser.add_option("--l3_assoc", type="int", default=16) # Run duration options parser.add_option("-m", "--maxtick", type="int", default=m5.MaxTick, 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) diff --git a/configs/ruby/MESI_CMP_directory.py b/configs/ruby/MESI_CMP_directory.py index 9b62a15af..2e9345212 100644 --- a/configs/ruby/MESI_CMP_directory.py +++ b/configs/ruby/MESI_CMP_directory.py @@ -44,6 +44,9 @@ class L1Cache(RubyCache): class L2Cache(RubyCache): latency = 15 +def define_options(parser): + return + def create_system(options, phys_mem, piobus, dma_devices): if buildEnv['PROTOCOL'] != 'MESI_CMP_directory': diff --git a/configs/ruby/MI_example.py b/configs/ruby/MI_example.py index 29d99b46e..ce0918de8 100644 --- a/configs/ruby/MI_example.py +++ b/configs/ruby/MI_example.py @@ -37,6 +37,9 @@ from m5.defines import buildEnv class Cache(RubyCache): latency = 3 +def define_options(parser): + return + def create_system(options, phys_mem, piobus, dma_devices): if buildEnv['PROTOCOL'] != 'MI_example': diff --git a/configs/ruby/MOESI_CMP_directory.py b/configs/ruby/MOESI_CMP_directory.py index a4069d94d..8c332f8e4 100644 --- a/configs/ruby/MOESI_CMP_directory.py +++ b/configs/ruby/MOESI_CMP_directory.py @@ -44,6 +44,9 @@ class L1Cache(RubyCache): class L2Cache(RubyCache): latency = 15 +def define_options(parser): + return + def create_system(options, phys_mem, piobus, dma_devices): if buildEnv['PROTOCOL'] != 'MOESI_CMP_directory': diff --git a/configs/ruby/MOESI_CMP_token.py b/configs/ruby/MOESI_CMP_token.py index 537a1543c..5d3ddf190 100644 --- a/configs/ruby/MOESI_CMP_token.py +++ b/configs/ruby/MOESI_CMP_token.py @@ -44,6 +44,9 @@ class L1Cache(RubyCache): class L2Cache(RubyCache): latency = 15 +def define_options(parser): + return + def create_system(options, phys_mem, piobus, dma_devices): if buildEnv['PROTOCOL'] != 'MOESI_CMP_token': diff --git a/configs/ruby/MOESI_hammer.py b/configs/ruby/MOESI_hammer.py index 2d2d75dc2..705b569ac 100644 --- a/configs/ruby/MOESI_hammer.py +++ b/configs/ruby/MOESI_hammer.py @@ -43,6 +43,9 @@ class L1Cache(RubyCache): class L2Cache(RubyCache): latency = 15 +def define_options(parser): + return + def create_system(options, phys_mem, piobus, dma_devices): if buildEnv['PROTOCOL'] != 'MOESI_hammer': diff --git a/configs/ruby/Ruby.py b/configs/ruby/Ruby.py index 66293af64..77c975842 100644 --- a/configs/ruby/Ruby.py +++ b/configs/ruby/Ruby.py @@ -31,6 +31,27 @@ import m5 from m5.objects import * from m5.defines import buildEnv +def define_options(parser): + # ruby network options + parser.add_option("--topology", type="string", default="Crossbar", + help="check src/mem/ruby/network/topologies for complete set") + parser.add_option("--mesh-rows", type="int", default=1, + help="the number of rows in the mesh topology") + parser.add_option("--garnet-network", type="string", default=none, + help="'fixed'|'flexible'") + + # ruby mapping options + parser.add_option("--numa-high-bit", type="int", default=none, + help="high order address bit to use for numa mapping") + + # ruby sparse memory options + parser.add_option("--use-map", action="store_true", default=False) + parser.add_option("--map-levels", type="int", default=4) + + protocol = buildEnv['PROTOCOL'] + exec "import %s" % protocol + eval("%s.define_options(parser)" % protocol) + def create_system(options, physmem, piobus = None, dma_devices = []): protocol = buildEnv['PROTOCOL'] |