self.mem_ranges = []
size_remain = long(Addr(mdesc.mem()))
for region in self.realview._mem_regions:
- if size_remain > long(region[1]):
- self.mem_ranges.append(AddrRange(region[0], size=region[1]))
- size_remain = size_remain - long(region[1])
+ if size_remain > long(region.size()):
+ self.mem_ranges.append(region)
+ size_remain = size_remain - long(region.size())
else:
- self.mem_ranges.append(AddrRange(region[0], size=size_remain))
+ self.mem_ranges.append(AddrRange(region.start, size=size_remain))
size_remain = 0
break
warn("Memory size specified spans more than one region. Creating" \
self.iobridge = Bridge(delay='50ns')
# Device DMA -> MEM
mem_range = self.realview._mem_regions[0]
- max_size = long(mem_range[1])
- assert max_size >= long(Addr(mem_size))
- self.mem_ranges = [ AddrRange(start=mem_range[0], size=mem_size) ]
+ assert long(mem_range.size()) >= long(Addr(mem_size))
+ self.mem_ranges = [ AddrRange(start=mem_range.start, size=mem_size) ]
self._caches = caches
if self._caches:
self.iocache = IOCache(addr_ranges=[self.mem_ranges[0]])
type = 'RealView'
cxx_header = "dev/arm/realview.hh"
system = Param.System(Parent.any, "system")
- _mem_regions = [(Addr(0), Addr('256MB'))]
+ _mem_regions = [ AddrRange(0, size='256MB') ]
def _on_chip_devices(self):
return []
self.energy_ctrl.clk_domain = clkdomain
class VExpress_EMM(RealView):
- _mem_regions = [(Addr('2GB'), Addr('2GB'))]
+ _mem_regions = [ AddrRange('2GB', size='2GB') ]
# Ranges based on excluding what is part of on-chip I/O (gic,
# a9scu)
class VExpress_EMM64(VExpress_EMM):
# Three memory regions are specified totalling 512GB
- _mem_regions = [(Addr('2GB'), Addr('2GB')), (Addr('34GB'), Addr('30GB')),
- (Addr('512GB'), Addr('480GB'))]
+ _mem_regions = [ AddrRange('2GB', size='2GB'),
+ AddrRange('34GB', size='30GB'),
+ AddrRange('512GB', size='480GB') ]
pci_host = GenericPciHost(
conf_base=0x30000000, conf_size='256MB', conf_device_bits=12,
pci_pio_base=0x2f000000)
"""
# Everything above 2GiB is memory
- _mem_regions = [(Addr('2GB'), Addr('510GB'))]
+ _mem_regions = [ AddrRange('2GB', size='510GB') ]
_off_chip_ranges = [
# CS1-CS5