summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
Diffstat (limited to 'configs')
-rw-r--r--configs/example/ruby_direct_test.py2
-rw-r--r--configs/example/ruby_fs.py5
-rw-r--r--configs/example/ruby_mem_test.py24
-rw-r--r--configs/example/ruby_network_test.py2
-rw-r--r--configs/example/ruby_random_test.py8
-rw-r--r--configs/example/se.py2
-rw-r--r--configs/ruby/MESI_CMP_directory.py17
-rw-r--r--configs/ruby/MI_example.py11
-rw-r--r--configs/ruby/MOESI_CMP_directory.py19
-rw-r--r--configs/ruby/MOESI_CMP_token.py17
-rw-r--r--configs/ruby/MOESI_hammer.py13
-rw-r--r--configs/ruby/Ruby.py24
12 files changed, 87 insertions, 57 deletions
diff --git a/configs/example/ruby_direct_test.py b/configs/example/ruby_direct_test.py
index 12585b8d5..55b1c85e6 100644
--- a/configs/example/ruby_direct_test.py
+++ b/configs/example/ruby_direct_test.py
@@ -97,7 +97,7 @@ system.tester = RubyDirectedTester(requests_to_complete = \
options.requests,
generator = generator)
-system.ruby = Ruby.create_system(options, system)
+Ruby.create_system(options, system)
assert(options.num_cpus == len(system.ruby._cpu_ruby_ports))
diff --git a/configs/example/ruby_fs.py b/configs/example/ruby_fs.py
index 8c03e14cb..ba4671d6e 100644
--- a/configs/example/ruby_fs.py
+++ b/configs/example/ruby_fs.py
@@ -117,10 +117,7 @@ elif buildEnv['TARGET_ISA'] == "x86":
else:
fatal("incapable of building non-alpha or non-x86 full system!")
-system.ruby = Ruby.create_system(options,
- system,
- system.piobus,
- system._dma_devices)
+Ruby.create_system(options, system, system.piobus, system._dma_devices)
system.cpu = [CPUClass(cpu_id=i) for i in xrange(options.num_cpus)]
diff --git a/configs/example/ruby_mem_test.py b/configs/example/ruby_mem_test.py
index 154164919..684aeffcc 100644
--- a/configs/example/ruby_mem_test.py
+++ b/configs/example/ruby_mem_test.py
@@ -55,6 +55,10 @@ parser.add_option("--progress", type="int", default=1000,
help="Progress message interval "
"[default: %default]")
parser.add_option("--num-dmas", type="int", default=0, help="# of dma testers")
+parser.add_option("--functional", type="int", default=0,
+ help="percentage of accesses that should be functional")
+parser.add_option("--suppress-func-warnings", action="store_true",
+ help="suppress warnings when functional accesses fail")
#
# Add the ruby specific and protocol specific options
@@ -90,14 +94,15 @@ if options.num_cpus > block_size:
sys.exit(1)
#
-# Currently ruby does not support atomic, functional, or uncacheable accesses
+# Currently ruby does not support atomic or uncacheable accesses
#
cpus = [ MemTest(atomic = False, \
max_loads = options.maxloads, \
issue_dmas = False, \
- percent_functional = 0, \
+ percent_functional = options.functional, \
percent_uncacheable = 0, \
- progress_interval = options.progress) \
+ progress_interval = options.progress, \
+ suppress_func_warnings = options.suppress_func_warnings) \
for i in xrange(options.num_cpus) ]
system = System(cpu = cpus,
@@ -110,15 +115,14 @@ if options.num_dmas > 0:
issue_dmas = True, \
percent_functional = 0, \
percent_uncacheable = 0, \
- progress_interval = options.progress) \
+ progress_interval = options.progress, \
+ warn_on_failure = options.warn_on_failure) \
for i in xrange(options.num_dmas) ]
system.dma_devices = dmas
else:
dmas = []
-system.ruby = Ruby.create_system(options, \
- system, \
- dma_devices = dmas)
+Ruby.create_system(options, system, dma_devices = dmas)
#
# The tester is most effective when randomization is turned on and
@@ -141,6 +145,12 @@ for (i, cpu) in enumerate(cpus):
#
system.ruby._cpu_ruby_ports[i].deadlock_threshold = 5000000
+ #
+ # Ruby doesn't need the backing image of memory when running with
+ # the tester.
+ #
+ system.ruby._cpu_ruby_ports[i].access_phys_mem = False
+
for (i, dma) in enumerate(dmas):
#
# Tie the dma memtester ports to the correct functional port
diff --git a/configs/example/ruby_network_test.py b/configs/example/ruby_network_test.py
index fb2a642b8..d15206163 100644
--- a/configs/example/ruby_network_test.py
+++ b/configs/example/ruby_network_test.py
@@ -105,7 +105,7 @@ cpus = [ NetworkTest(fixed_pkts=options.fixed_pkts, \
system = System(cpu = cpus,
physmem = PhysicalMemory())
-system.ruby = Ruby.create_system(options, system)
+Ruby.create_system(options, system)
i = 0
for ruby_port in system.ruby._cpu_ruby_ports:
diff --git a/configs/example/ruby_random_test.py b/configs/example/ruby_random_test.py
index b60afc192..7655e32fd 100644
--- a/configs/example/ruby_random_test.py
+++ b/configs/example/ruby_random_test.py
@@ -99,7 +99,7 @@ tester = RubyTester(check_flush = check_flush,
#
system = System(tester = tester, physmem = PhysicalMemory())
-system.ruby = Ruby.create_system(options, system)
+Ruby.create_system(options, system)
assert(options.num_cpus == len(system.ruby._cpu_ruby_ports))
@@ -121,6 +121,12 @@ for ruby_port in system.ruby._cpu_ruby_ports:
#
ruby_port.using_ruby_tester = True
+ #
+ # Ruby doesn't need the backing image of memory when running with
+ # the tester.
+ #
+ ruby_port.access_phys_mem = False
+
# -----------------------
# run simulation
# -----------------------
diff --git a/configs/example/se.py b/configs/example/se.py
index 9c35f80a0..be7d87bc6 100644
--- a/configs/example/se.py
+++ b/configs/example/se.py
@@ -177,7 +177,7 @@ system = System(cpu = [CPUClass(cpu_id=i) for i in xrange(np)],
if options.ruby:
options.use_map = True
- system.ruby = Ruby.create_system(options, system)
+ Ruby.create_system(options, system)
assert(options.num_cpus == len(system.ruby._cpu_ruby_ports))
else:
system.physmem.port = system.membus.port
diff --git a/configs/ruby/MESI_CMP_directory.py b/configs/ruby/MESI_CMP_directory.py
index f0e072f90..fdb6ce0b0 100644
--- a/configs/ruby/MESI_CMP_directory.py
+++ b/configs/ruby/MESI_CMP_directory.py
@@ -47,7 +47,7 @@ class L2Cache(RubyCache):
def define_options(parser):
return
-def create_system(options, system, piobus, dma_devices):
+def create_system(options, system, piobus, dma_devices, ruby_system):
if buildEnv['PROTOCOL'] != 'MESI_CMP_directory':
panic("This script requires the MESI_CMP_directory protocol to be built.")
@@ -88,13 +88,15 @@ def create_system(options, system, piobus, dma_devices):
cntrl_id = cntrl_count,
L1IcacheMemory = l1i_cache,
L1DcacheMemory = l1d_cache,
- l2_select_num_bits = l2_bits)
+ l2_select_num_bits = l2_bits,
+ ruby_system = ruby_system)
cpu_seq = RubySequencer(version = i,
icache = l1i_cache,
dcache = l1d_cache,
physMemPort = system.physmem.port,
- physmem = system.physmem)
+ physmem = system.physmem,
+ ruby_system = ruby_system)
l1_cntrl.sequencer = cpu_seq
@@ -123,7 +125,8 @@ def create_system(options, system, piobus, dma_devices):
l2_cntrl = L2Cache_Controller(version = i,
cntrl_id = cntrl_count,
- L2cacheMemory = l2_cache)
+ L2cacheMemory = l2_cache,
+ ruby_system = ruby_system)
exec("system.l2_cntrl%d = l2_cntrl" % i)
l2_cntrl_nodes.append(l2_cntrl)
@@ -148,9 +151,9 @@ def create_system(options, system, piobus, dma_devices):
cntrl_id = cntrl_count,
directory = \
RubyDirectoryMemory(version = i,
- size = \
- dir_size),
- memBuffer = mem_cntrl)
+ size = dir_size),
+ memBuffer = mem_cntrl,
+ ruby_system = ruby_system)
exec("system.dir_cntrl%d = dir_cntrl" % i)
dir_cntrl_nodes.append(dir_cntrl)
diff --git a/configs/ruby/MI_example.py b/configs/ruby/MI_example.py
index 5018f2c18..4ea5e5993 100644
--- a/configs/ruby/MI_example.py
+++ b/configs/ruby/MI_example.py
@@ -41,7 +41,7 @@ class Cache(RubyCache):
def define_options(parser):
return
-def create_system(options, system, piobus, dma_devices):
+def create_system(options, system, piobus, dma_devices, ruby_system):
if buildEnv['PROTOCOL'] != 'MI_example':
panic("This script requires the MI_example protocol to be built.")
@@ -80,13 +80,15 @@ def create_system(options, system, piobus, dma_devices):
#
l1_cntrl = L1Cache_Controller(version = i,
cntrl_id = cntrl_count,
- cacheMemory = cache)
+ cacheMemory = cache,
+ ruby_system = ruby_system)
cpu_seq = RubySequencer(version = i,
icache = cache,
dcache = cache,
physMemPort = system.physmem.port,
- physmem = system.physmem)
+ physmem = system.physmem,
+ ruby_system = ruby_system)
l1_cntrl.sequencer = cpu_seq
@@ -125,7 +127,8 @@ def create_system(options, system, piobus, dma_devices):
use_map = options.use_map,
map_levels = \
options.map_levels),
- memBuffer = mem_cntrl)
+ memBuffer = mem_cntrl,
+ ruby_system = ruby_system)
exec("system.dir_cntrl%d = dir_cntrl" % i)
dir_cntrl_nodes.append(dir_cntrl)
diff --git a/configs/ruby/MOESI_CMP_directory.py b/configs/ruby/MOESI_CMP_directory.py
index c8b16fc5d..5da1cf310 100644
--- a/configs/ruby/MOESI_CMP_directory.py
+++ b/configs/ruby/MOESI_CMP_directory.py
@@ -47,8 +47,8 @@ class L2Cache(RubyCache):
def define_options(parser):
return
-def create_system(options, system, piobus, dma_devices):
-
+def create_system(options, system, piobus, dma_devices, ruby_system):
+
if buildEnv['PROTOCOL'] != 'MOESI_CMP_directory':
panic("This script requires the MOESI_CMP_directory protocol to be built.")
@@ -88,13 +88,15 @@ def create_system(options, system, piobus, dma_devices):
cntrl_id = cntrl_count,
L1IcacheMemory = l1i_cache,
L1DcacheMemory = l1d_cache,
- l2_select_num_bits = l2_bits)
+ l2_select_num_bits = l2_bits,
+ ruby_system = ruby_system)
cpu_seq = RubySequencer(version = i,
icache = l1i_cache,
dcache = l1d_cache,
physMemPort = system.physmem.port,
- physmem = system.physmem)
+ physmem = system.physmem,
+ ruby_system = ruby_system)
l1_cntrl.sequencer = cpu_seq
@@ -122,7 +124,8 @@ def create_system(options, system, piobus, dma_devices):
l2_cntrl = L2Cache_Controller(version = i,
cntrl_id = cntrl_count,
- L2cacheMemory = l2_cache)
+ L2cacheMemory = l2_cache,
+ ruby_system = ruby_system)
exec("system.l2_cntrl%d = l2_cntrl" % i)
l2_cntrl_nodes.append(l2_cntrl)
@@ -147,9 +150,9 @@ def create_system(options, system, piobus, dma_devices):
cntrl_id = cntrl_count,
directory = \
RubyDirectoryMemory(version = i,
- size = \
- dir_size),
- memBuffer = mem_cntrl)
+ size = dir_size),
+ memBuffer = mem_cntrl,
+ ruby_system = ruby_system)
exec("system.dir_cntrl%d = dir_cntrl" % i)
dir_cntrl_nodes.append(dir_cntrl)
diff --git a/configs/ruby/MOESI_CMP_token.py b/configs/ruby/MOESI_CMP_token.py
index 36999be5d..c7f9dda11 100644
--- a/configs/ruby/MOESI_CMP_token.py
+++ b/configs/ruby/MOESI_CMP_token.py
@@ -54,7 +54,7 @@ def define_options(parser):
parser.add_option("--allow-atomic-migration", action="store_true",
help="allow migratory sharing for atomic only accessed blocks")
-def create_system(options, system, piobus, dma_devices):
+def create_system(options, system, piobus, dma_devices, ruby_system):
if buildEnv['PROTOCOL'] != 'MOESI_CMP_token':
panic("This script requires the MOESI_CMP_token protocol to be built.")
@@ -110,13 +110,15 @@ def create_system(options, system, piobus, dma_devices):
dynamic_timeout_enabled = \
not options.disable_dyn_timeouts,
no_mig_atomic = not \
- options.allow_atomic_migration)
+ options.allow_atomic_migration,
+ ruby_system = ruby_system)
cpu_seq = RubySequencer(version = i,
icache = l1i_cache,
dcache = l1d_cache,
physMemPort = system.physmem.port,
- physmem = system.physmem)
+ physmem = system.physmem,
+ ruby_system = ruby_system)
l1_cntrl.sequencer = cpu_seq
@@ -145,7 +147,8 @@ def create_system(options, system, piobus, dma_devices):
l2_cntrl = L2Cache_Controller(version = i,
cntrl_id = cntrl_count,
L2cacheMemory = l2_cache,
- N_tokens = n_tokens)
+ N_tokens = n_tokens,
+ ruby_system = ruby_system)
exec("system.l2_cntrl%d = l2_cntrl" % i)
l2_cntrl_nodes.append(l2_cntrl)
@@ -170,10 +173,10 @@ def create_system(options, system, piobus, dma_devices):
cntrl_id = cntrl_count,
directory = \
RubyDirectoryMemory(version = i,
- size = \
- dir_size),
+ size = dir_size),
memBuffer = mem_cntrl,
- l2_select_num_bits = l2_bits)
+ l2_select_num_bits = l2_bits,
+ ruby_system = ruby_system)
exec("system.dir_cntrl%d = dir_cntrl" % i)
dir_cntrl_nodes.append(dir_cntrl)
diff --git a/configs/ruby/MOESI_hammer.py b/configs/ruby/MOESI_hammer.py
index 7e789d8e3..6e46f3e0f 100644
--- a/configs/ruby/MOESI_hammer.py
+++ b/configs/ruby/MOESI_hammer.py
@@ -58,8 +58,8 @@ def define_options(parser):
parser.add_option("--dir-on", action="store_true",
help="Hammer: enable Full-bit Directory")
-def create_system(options, system, piobus, dma_devices):
-
+def create_system(options, system, piobus, dma_devices, ruby_system):
+
if buildEnv['PROTOCOL'] != 'MOESI_hammer':
panic("This script requires the MOESI_hammer protocol to be built.")
@@ -102,13 +102,15 @@ def create_system(options, system, piobus, dma_devices):
L1DcacheMemory = l1d_cache,
L2cacheMemory = l2_cache,
no_mig_atomic = not \
- options.allow_atomic_migration)
+ options.allow_atomic_migration,
+ ruby_system = ruby_system)
cpu_seq = RubySequencer(version = i,
icache = l1i_cache,
dcache = l1d_cache,
physMemPort = system.physmem.port,
- physmem = system.physmem)
+ physmem = system.physmem,
+ ruby_system = ruby_system)
l1_cntrl.sequencer = cpu_seq
@@ -181,7 +183,8 @@ def create_system(options, system, piobus, dma_devices):
probeFilter = pf,
memBuffer = mem_cntrl,
probe_filter_enabled = options.pf_on,
- full_bit_dir_enabled = options.dir_on)
+ full_bit_dir_enabled = options.dir_on,
+ ruby_system = ruby_system)
if options.recycle_latency:
dir_cntrl.recycle_latency = options.recycle_latency
diff --git a/configs/ruby/Ruby.py b/configs/ruby/Ruby.py
index 3c58dfd2f..9174709b4 100644
--- a/configs/ruby/Ruby.py
+++ b/configs/ruby/Ruby.py
@@ -62,11 +62,15 @@ def define_options(parser):
def create_system(options, system, piobus = None, dma_devices = []):
+ system.ruby = RubySystem(clock = options.clock)
+ ruby = system.ruby
+
protocol = buildEnv['PROTOCOL']
exec "import %s" % protocol
try:
(cpu_sequencers, dir_cntrls, all_cntrls) = \
- eval("%s.create_system(options, system, piobus, dma_devices)" \
+ eval("%s.create_system(options, system, piobus, \
+ dma_devices, ruby)" \
% protocol)
except:
print "Error: could not create sytem for ruby protocol %s" % protocol
@@ -105,7 +109,7 @@ def create_system(options, system, piobus = None, dma_devices = []):
print "Error: could not create topology %s" % options.topology
raise
- network = NetworkClass(topology = net_topology)
+ network = NetworkClass(ruby_system = ruby, topology = net_topology)
#
# Loop through the directory controlers.
@@ -137,15 +141,13 @@ def create_system(options, system, piobus = None, dma_devices = []):
long(system.physmem.range.first) + 1
assert(total_mem_size.value == physmem_size)
- ruby_profiler = RubyProfiler(num_of_sequencers = len(cpu_sequencers))
+ ruby_profiler = RubyProfiler(ruby_system = ruby,
+ num_of_sequencers = len(cpu_sequencers))
+ ruby_tracer = RubyTracer(ruby_system = ruby)
- ruby = RubySystem(clock = options.clock,
- network = network,
- profiler = ruby_profiler,
- tracer = RubyTracer(),
- mem_size = total_mem_size)
-
+ ruby.network = network
+ ruby.profiler = ruby_profiler
+ ruby.tracer = ruby_tracer
+ ruby.mem_size = total_mem_size
ruby._cpu_ruby_ports = cpu_sequencers
ruby.random_seed = options.random_seed
-
- return ruby