summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2009-11-18 13:55:58 -0800
committerBrad Beckmann <Brad.Beckmann@amd.com>2009-11-18 13:55:58 -0800
commit3cf24f9716eebab8c24fa645d02c636584033514 (patch)
tree8988036153597897a6f1c7d63c1b5954dd238eb7 /tests
parentd7a4f665ed72b221e8210cc79bbd8edf967a4a4a (diff)
downloadgem5-3cf24f9716eebab8c24fa645d02c636584033514.tar.xz
ruby: Support for merging ALPHA_FS and ruby
Connects M5 cpu and dma ports directly to ruby sequencers and dma sequencers. Rubymem also includes a pio port so that pio requests and be forwarded to a special pio bus connecting to device pio ports.
Diffstat (limited to 'tests')
-rw-r--r--tests/configs/ruby_config.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/configs/ruby_config.py b/tests/configs/ruby_config.py
index 7b8e27613..000b7d23f 100644
--- a/tests/configs/ruby_config.py
+++ b/tests/configs/ruby_config.py
@@ -4,17 +4,25 @@ import subprocess
from os.path import dirname, join as joinpath
import m5
+from m5.params import *
-def generate(config_file, cores=1, memories=1, memory_size=1024):
+def generate(config_file, cores=1, memories=1, memory_size=1024, \
+ cache_size=32768, cache_assoc=8, dmas=1,
+ ruby_tick='1t'):
default = joinpath(dirname(__file__), '../../src/mem/ruby/config')
ruby_config = os.environ.get('RUBY_CONFIG', default)
args = [ "ruby", "-I", ruby_config, joinpath(ruby_config, "print_cfg.rb"),
"-r", joinpath(ruby_config, config_file), "-p", str(cores),
- "-m", str(memories), "-s", str(memory_size)]
+ "-m", str(memories), "-s", str(memory_size), "-C", str(cache_size),
+ "-A", str(cache_assoc), "-D", str(dmas)]
temp_config = joinpath(m5.options.outdir, "ruby.config")
ret = subprocess.call(args, stdout=file(temp_config, "w"))
if ret != 0:
raise RuntimeError, "subprocess failed!"
- return m5.objects.RubyMemory(config_file=temp_config, num_cpus=cores)
+ return m5.objects.RubyMemory(clock = ruby_tick,
+ config_file = temp_config,
+ num_cpus = cores,
+ range = AddrRange(str(memory_size)+"MB"),
+ num_dmas = dmas)