ruby: check for compatibility between mem size and num dirs

The configuration scripts provided for ruby assume that the available
physical memory is equally distributed amongst the directory controllers.
But there is no check to ensure this assumption has been adhered to. This
patch adds the required check.
This commit is contained in:
Nilay Vaish 2013-06-28 21:36:11 -05:00
parent 5a15909bac
commit 62a93f0bf0
6 changed files with 6 additions and 0 deletions

View file

@ -142,6 +142,7 @@ def create_system(options, system, piobus, dma_ports, ruby_system):
phys_mem_size = sum(map(lambda mem: mem.range.size(), phys_mem_size = sum(map(lambda mem: mem.range.size(),
system.memories.unproxy(system))) system.memories.unproxy(system)))
assert(phys_mem_size % options.num_dirs == 0)
mem_module_size = phys_mem_size / options.num_dirs mem_module_size = phys_mem_size / options.num_dirs
# Run each of the ruby memory controllers at a ratio of the frequency of # Run each of the ruby memory controllers at a ratio of the frequency of

View file

@ -107,6 +107,7 @@ def create_system(options, system, piobus, dma_ports, ruby_system):
phys_mem_size = sum(map(lambda mem: mem.range.size(), phys_mem_size = sum(map(lambda mem: mem.range.size(),
system.memories.unproxy(system))) system.memories.unproxy(system)))
assert(phys_mem_size % options.num_dirs == 0)
mem_module_size = phys_mem_size / options.num_dirs mem_module_size = phys_mem_size / options.num_dirs
# Run each of the ruby memory controllers at a ratio of the frequency of # Run each of the ruby memory controllers at a ratio of the frequency of

View file

@ -137,6 +137,7 @@ def create_system(options, system, piobus, dma_ports, ruby_system):
phys_mem_size = sum(map(lambda mem: mem.range.size(), phys_mem_size = sum(map(lambda mem: mem.range.size(),
system.memories.unproxy(system))) system.memories.unproxy(system)))
assert(phys_mem_size % options.num_dirs == 0)
mem_module_size = phys_mem_size / options.num_dirs mem_module_size = phys_mem_size / options.num_dirs
# Run each of the ruby memory controllers at a ratio of the frequency of # Run each of the ruby memory controllers at a ratio of the frequency of

View file

@ -158,6 +158,7 @@ def create_system(options, system, piobus, dma_ports, ruby_system):
phys_mem_size = sum(map(lambda mem: mem.range.size(), phys_mem_size = sum(map(lambda mem: mem.range.size(),
system.memories.unproxy(system))) system.memories.unproxy(system)))
assert(phys_mem_size % options.num_dirs == 0)
mem_module_size = phys_mem_size / options.num_dirs mem_module_size = phys_mem_size / options.num_dirs
# Run each of the ruby memory controllers at a ratio of the frequency of # Run each of the ruby memory controllers at a ratio of the frequency of

View file

@ -133,6 +133,7 @@ def create_system(options, system, piobus, dma_ports, ruby_system):
phys_mem_size = sum(map(lambda mem: mem.range.size(), phys_mem_size = sum(map(lambda mem: mem.range.size(),
system.memories.unproxy(system))) system.memories.unproxy(system)))
assert(phys_mem_size % options.num_dirs == 0)
mem_module_size = phys_mem_size / options.num_dirs mem_module_size = phys_mem_size / options.num_dirs
# #

View file

@ -105,6 +105,7 @@ def create_system(options, system, piobus, dma_ports, ruby_system):
phys_mem_size = sum(map(lambda mem: mem.range.size(), phys_mem_size = sum(map(lambda mem: mem.range.size(),
system.memories.unproxy(system))) system.memories.unproxy(system)))
assert(phys_mem_size % options.num_dirs == 0)
mem_module_size = phys_mem_size / options.num_dirs mem_module_size = phys_mem_size / options.num_dirs
# Run each of the ruby memory controllers at a ratio of the frequency of # Run each of the ruby memory controllers at a ratio of the frequency of