commit | 5a9fe54d581ef1a617c433f7bf06989efaa385f1 | [log] [tgz] |
---|---|---|
author | Tiago Mück <tiago.muck@arm.com> | Tue Feb 25 17:26:05 2020 -0600 |
committer | Tiago Mück <tiago.muck@arm.com> | Mon Oct 12 14:09:55 2020 +0000 |
tree | 30ece1a1783e3946b7071548a7486b16ae3e0105 | |
parent | 2cbbd37a821a79b7b607bcbb42a886e9a451967e [diff] |
mem-ruby: added function to check addr range respondsTo checks if a controller address ranges includes a given address. Change-Id: I9a320011d93e7fd8df1ad3bda75c85d314261a99 Signed-off-by: Tiago Mück <tiago.muck@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31263 Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Bradford Beckmann <bradford.beckmann@gmail.com>
diff --git a/src/mem/ruby/slicc_interface/AbstractController.hh b/src/mem/ruby/slicc_interface/AbstractController.hh index 98cb0a7..cbe92c0 100644 --- a/src/mem/ruby/slicc_interface/AbstractController.hh +++ b/src/mem/ruby/slicc_interface/AbstractController.hh
@@ -153,6 +153,13 @@ Stats::Histogram& getDelayVCHist(uint32_t index) { return *(m_delayVCHistogram[index]); } + bool respondsTo(Addr addr) + { + for (auto &range: addrRanges) + if (range.contains(addr)) return true; + return false; + } + /** * Map an address to the correct MachineID *