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.
This commit is contained in:
Andreas Hansson
2012-09-19 06:15:41 -04:00
parent 33c904e0a5
commit fccbf8bb45
9 changed files with 43 additions and 70 deletions

View File

@@ -155,10 +155,9 @@ def create_system(options, system, piobus, dma_ports, ruby_system):
l2_cntrl_nodes.append(l2_cntrl)
cntrl_count += 1
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)))
mem_module_size = phys_mem_size / options.num_dirs
for i in xrange(options.num_dirs):