diff options
author | Joel Hestness <hestness@cs.utexas.edu> | 2012-07-10 22:51:54 -0700 |
---|---|---|
committer | Joel Hestness <hestness@cs.utexas.edu> | 2012-07-10 22:51:54 -0700 |
commit | 467093ebf238a1954e00576daf14a9f246b51e79 (patch) | |
tree | 1e3a355e93a62174b112e97e81f5d7aa62299016 /src/mem/ruby/system/CacheMemory.hh | |
parent | c10f348120ae4a61c782815280673fba5ee71157 (diff) | |
download | gem5-467093ebf238a1954e00576daf14a9f246b51e79.tar.xz |
ruby: tag and data cache access support
Updates to Ruby to support statistics counting of cache accesses. This feature
serves multiple purposes beyond simple stats collection. It provides the
foundation for ruby to model the cache tag and data arrays as physical
resources, as well as provide the necessary input data for McPAT power
modeling.
Diffstat (limited to 'src/mem/ruby/system/CacheMemory.hh')
-rw-r--r-- | src/mem/ruby/system/CacheMemory.hh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mem/ruby/system/CacheMemory.hh b/src/mem/ruby/system/CacheMemory.hh index f270e88cd..53cd6b286 100644 --- a/src/mem/ruby/system/CacheMemory.hh +++ b/src/mem/ruby/system/CacheMemory.hh @@ -34,6 +34,8 @@ #include <vector> #include "base/hashmap.hh" +#include "base/statistics.hh" +#include "mem/protocol/CacheRequestType.hh" #include "mem/protocol/GenericRequestType.hh" #include "mem/protocol/RubyRequest.hh" #include "mem/ruby/common/DataBlock.hh" @@ -115,6 +117,14 @@ class CacheMemory : public SimObject void clearStats() const; void printStats(std::ostream& out) const; + void recordRequestType(CacheRequestType requestType); + void regStats(); + + Stats::Scalar numDataArrayReads; + Stats::Scalar numDataArrayWrites; + Stats::Scalar numTagArrayReads; + Stats::Scalar numTagArrayWrites; + private: // convert a Address to its location in the cache Index addressToCacheSet(const Address& address) const; |