From: Tiago Mück Date: Tue, 25 Feb 2020 23:26:05 +0000 (-0600) Subject: mem-ruby: added function to check addr range X-Git-Tag: develop-gem5-snapshot~648 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5a9fe54d581ef1a617c433f7bf06989efaa385f1;p=gem5.git 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 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31263 Maintainer: Jason Lowe-Power Tested-by: kokoro Reviewed-by: Bradford Beckmann --- diff --git a/src/mem/ruby/slicc_interface/AbstractController.hh b/src/mem/ruby/slicc_interface/AbstractController.hh index 98cb0a785..cbe92c0d7 100644 --- a/src/mem/ruby/slicc_interface/AbstractController.hh +++ b/src/mem/ruby/slicc_interface/AbstractController.hh @@ -153,6 +153,13 @@ class AbstractController : public ClockedObject, public Consumer 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 *