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,
"[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)
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"))
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()
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)
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':
class Cache(RubyCache):
latency = 3
+def define_options(parser):
+ return
+
def create_system(options, phys_mem, piobus, dma_devices):
if buildEnv['PROTOCOL'] != 'MI_example':
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':
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':
class L2Cache(RubyCache):
latency = 15
+def define_options(parser):
+ return
+
def create_system(options, phys_mem, piobus, dma_devices):
if buildEnv['PROTOCOL'] != 'MOESI_hammer':
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']