summaryrefslogtreecommitdiff
path: root/configs/ruby/Ruby.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/Ruby.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/Ruby.py')
-rw-r--r--configs/ruby/Ruby.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/configs/ruby/Ruby.py b/configs/ruby/Ruby.py
index 7003e6266..735adda27 100644
--- a/configs/ruby/Ruby.py
+++ b/configs/ruby/Ruby.py
@@ -55,11 +55,14 @@ def create_system(options, physmem, piobus = None, dma_devices = []):
network = SimpleNetwork(topology = makeCrossbar(all_cntrls))
#
- # determine the total memory size of the ruby system
+ # determine the total memory size of the ruby system and verify it is equal
+ # to physmem
#
total_mem_size = MemorySize('0B')
for dir_cntrl in dir_cntrls:
total_mem_size.value += dir_cntrl.directory.size.value
+ physmem_size = long(physmem.range.second) - long(physmem.range.first) + 1
+ assert(total_mem_size.value == physmem_size)
ruby_profiler = RubyProfiler(num_of_sequencers = len(cpu_sequencers))