summaryrefslogtreecommitdiff
path: root/configs/ruby/MOESI_hammer.py
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2010-01-29 20:29:24 -0800
committerBrad Beckmann <Brad.Beckmann@amd.com>2010-01-29 20:29:24 -0800
commit502b8bd8a4f3b1998afbd3cf8e59e0bb4e153403 (patch)
treef77b7a0859d5864eedc6d66fadef8d8ba035fe08 /configs/ruby/MOESI_hammer.py
parent70648cf6aa54a5f313b422c4bf6a6a1e4ad7c4ed (diff)
downloadgem5-502b8bd8a4f3b1998afbd3cf8e59e0bb4e153403.tar.xz
ruby: Memory size consistency check
Ruby's memory is now sized according to the size of M5 physical memory.
Diffstat (limited to 'configs/ruby/MOESI_hammer.py')
-rw-r--r--configs/ruby/MOESI_hammer.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/configs/ruby/MOESI_hammer.py b/configs/ruby/MOESI_hammer.py
index dba31b8b7..62d86a1e2 100644
--- a/configs/ruby/MOESI_hammer.py
+++ b/configs/ruby/MOESI_hammer.py
@@ -96,6 +96,9 @@ def create_system(options, phys_mem, piobus, dma_devices):
cpu_sequencers.append(cpu_seq)
l1_cntrl_nodes.append(l1_cntrl)
+ phys_mem_size = long(phys_mem.range.second) - long(phys_mem.range.first) + 1
+ mem_module_size = phys_mem_size / options.num_dirs
+
for i in xrange(options.num_dirs):
#
# Create the Ruby objects associated with the directory controller
@@ -103,9 +106,13 @@ def create_system(options, phys_mem, piobus, dma_devices):
mem_cntrl = RubyMemoryControl(version = i)
+ dir_size = MemorySize('0B')
+ dir_size.value = mem_module_size
+
dir_cntrl = Directory_Controller(version = i,
directory = \
- RubyDirectoryMemory(version = i),
+ RubyDirectoryMemory(version = i,
+ size = dir_size),
memBuffer = mem_cntrl)
dir_cntrl_nodes.append(dir_cntrl)