base: AddrRange does not merge single interleaved ranges
authorTiago Muck <tiago.muck@arm.com>
Fri, 17 May 2019 18:15:33 +0000 (13:15 -0500)
committerTiago Mück <tiago.muck@arm.com>
Thu, 13 Jun 2019 18:23:50 +0000 (18:23 +0000)
AddrRange does not attempt to merge interleaved address ranges if it
has only one of the ranges.

This is needed to allow XBars to accept request targeting only one
part of a interleaved address range. A use case for this would be
modeling distributed LLCs in which a XBar is used solely to
encapsulate the snoop filter of a single LLC slice.

Change-Id: If71c9cf1444ee11916611afb51eab3a4f1d93985
Signed-off-by: Tiago Muck <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18788
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/base/addr_range.hh

index 1d2dc731fc76f1aaacb3c160a30083711ac03e89..cda6ccfb2011625da7312ee6b6b00aa40d9ed7e8 100644 (file)
@@ -213,6 +213,11 @@ class AddrRange
             _start = ranges.front()._start;
             _end = ranges.front()._end;
             masks = ranges.front().masks;
+            intlvMatch = ranges.front().intlvMatch;
+        }
+        // either merge if got all ranges or keep this equal to the single
+        // interleaved range
+        if (ranges.size() > 1) {
 
             if (ranges.size() != (ULL(1) << masks.size()))
                 fatal("Got %d ranges spanning %d interleaving bits\n",
@@ -231,6 +236,7 @@ class AddrRange
                 ++match;
             }
             masks.clear();
+            intlvMatch = 0;
         }
     }