From df973abef3a70074971375cfe52c46f53528c00e Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Thu, 16 Oct 2014 05:49:43 -0400 Subject: mem: Dynamically determine page bytes in memory components This patch takes a step towards an ISA-agnostic memory system by enabling the components to establish the page size after instantiation. The swap operation in the memory is now also allowing any granularity to avoid depending on the IntReg of the ISA. --- src/mem/cache/prefetch/base.hh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mem/cache/prefetch/base.hh') diff --git a/src/mem/cache/prefetch/base.hh b/src/mem/cache/prefetch/base.hh index 22a4c68f6..54f91a509 100644 --- a/src/mem/cache/prefetch/base.hh +++ b/src/mem/cache/prefetch/base.hh @@ -118,6 +118,8 @@ class BasePrefetcher : public ClockedObject /** Request id for prefetches */ MasterID masterId; + const Addr pageBytes; + public: Stats::Scalar pfIdentified; @@ -172,7 +174,7 @@ class BasePrefetcher : public ClockedObject /** * Utility function: are addresses a and b on the same VM page? */ - bool samePage(Addr a, Addr b); + bool samePage(Addr a, Addr b) const; public: const Params* params() const -- cgit v1.2.3