summaryrefslogtreecommitdiff
path: root/configs/ruby/Ruby.py
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-09-19 06:15:41 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2012-09-19 06:15:41 -0400
commitfccbf8bb45723adb07ebadd52e548e1bcd2cc44a (patch)
treedfd9d5c8ecfcec158db461f85938b9fee0e3b1c2 /configs/ruby/Ruby.py
parent33c904e0a560be8c5f9aedaba9940ad0df52d81c (diff)
downloadgem5-fccbf8bb45723adb07ebadd52e548e1bcd2cc44a.tar.xz
AddrRange: Simplify AddrRange params Python hierarchy
This patch simplifies the Range object hierarchy in preparation for an address range class that also allows striping (e.g. selecting a few bits as matching in addition to the range). To extend the AddrRange class to an AddrRegion, the first step is to simplify the hierarchy such that we can make it as lean as possible before adding the new functionality. The only class using Range and MetaRange is AddrRange, and the three classes are now collapsed into one.
Diffstat (limited to 'configs/ruby/Ruby.py')
-rw-r--r--configs/ruby/Ruby.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/configs/ruby/Ruby.py b/configs/ruby/Ruby.py
index ba6f3e7fa..a8fc94d3d 100644
--- a/configs/ruby/Ruby.py
+++ b/configs/ruby/Ruby.py
@@ -188,9 +188,8 @@ def create_system(options, system, piobus = None, dma_ports = []):
total_mem_size.value += dir_cntrl.directory.size.value
dir_cntrl.directory.numa_high_bit = numa_bit
- phys_mem_size = 0
- for mem in system.memories.unproxy(system):
- phys_mem_size += long(mem.range.second) - long(mem.range.first) + 1
+ phys_mem_size = sum(map(lambda mem: mem.range.size(),
+ system.memories.unproxy(system)))
assert(total_mem_size.value == phys_mem_size)
ruby_profiler = RubyProfiler(ruby_system = ruby,