diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2013-01-07 13:05:38 -0500 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2013-01-07 13:05:38 -0500 |
commit | 01c55983737273c70e44e0181e75453e01c5da34 (patch) | |
tree | 2a1c68d06c39a1cf1554d589df8961a313cb9c25 /src/mem | |
parent | e6c57786a43b6e21e11dec95d2fcb2c965d84abb (diff) | |
download | gem5-01c55983737273c70e44e0181e75453e01c5da34.tar.xz |
mem: Add interleaving bits to the address ranges
This patch adds support for interleaving bits for the address
ranges. What was previously just a start and end address, now has an
additional three fields, for the high bit, and number of bits to use
for interleaving, and a match value to compare against. If the number
of interleaving bits is set to zero it is effectively disabled.
A number of convenience functions are added to the range to enquire
about the interleaving, its granularity and the number of stripes it
is part of.
Diffstat (limited to 'src/mem')
-rw-r--r-- | src/mem/physical.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mem/physical.cc b/src/mem/physical.cc index ae5da82fd..140e2b1c0 100644 --- a/src/mem/physical.cc +++ b/src/mem/physical.cc @@ -119,9 +119,13 @@ void PhysicalMemory::createBackingStore(AddrRange range, const vector<AbstractMemory*>& _memories) { + if (range.interleaved()) + panic("Cannot create backing store for interleaved range %s\n", + range.to_string()); + // perform the actual mmap - DPRINTF(BusAddrRanges, "Creating backing store for range %s\n", - range.to_string()); + DPRINTF(BusAddrRanges, "Creating backing store for range %s with size %d\n", + range.to_string(), range.size()); int map_flags = MAP_ANON | MAP_PRIVATE; uint8_t* pmem = (uint8_t*) mmap(NULL, range.size(), PROT_READ | PROT_WRITE, |