30 #ifndef __MEM_RUBY_STRUCTURES_CACHEMEMORY_HH__
31 #define __MEM_RUBY_STRUCTURES_CACHEMEMORY_HH__
34 #include <unordered_map>
38 #include "mem/protocol/CacheRequestType.hh"
39 #include "mem/protocol/CacheResourceType.hh"
40 #include "mem/protocol/RubyRequest.hh"
47 #include "params/RubyCache.hh"
81 return allocate(address, new_entry,
true);
123 void print(std::ostream& out)
const;
192 #endif // __MEM_RUBY_STRUCTURES_CACHEMEMORY_HH__
Stats::Scalar m_demand_misses
void recordCacheContents(int cntrl, CacheRecorder *tr) const
Stats::Vector m_accessModeType
Cycles is a wrapper class for representing cycle counts, i.e.
void recordRequestType(CacheRequestType requestType, Addr addr)
Stats::Formula m_demand_accesses
int findTagInSet(int64_t line, Addr tag) const
bool cacheAvail(Addr address) const
bool isBlockNotBusy(int64_t cache_set, int64_t loc)
bool testCacheAccess(Addr address, RubyRequestType type, DataBlock *&data_ptr)
Stats::Scalar m_hw_prefetches
void clearLocked(Addr addr)
A vector of scalar stats.
bool isLocked(Addr addr, int context)
Addr getAddressAtIdx(int idx) const
void regStats()
Register statistics for this object.
Stats::Scalar numTagArrayStalls
Declaration of Statistics objects.
This is a simple scalar statistic, like a counter.
void deallocate(Addr address)
void init()
init() is called after all C++ SimObjects have been created and all ports are connected.
std::unordered_map< Addr, int > m_tag_index
void setMRU(Addr address)
Cycles getTagLatency() const
std::ostream & operator<<(std::ostream &out, const CacheMemory &obj)
CacheMemory(const Params *p)
bool isBlockInvalid(int64_t cache_set, int64_t loc)
Addr cacheProbe(Addr address) const
bool tryCacheAccess(Addr address, RubyRequestType type, DataBlock *&data_ptr)
Stats::Scalar m_demand_hits
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Stats::Scalar numDataArrayWrites
AbstractReplacementPolicy * m_replacementPolicy_ptr
AbstractCacheEntry * allocate(Addr address, AbstractCacheEntry *new_entry)
bool m_is_instruction_only_cache
CacheMemory & operator=(const CacheMemory &obj)
int findTagInSetIgnorePermissions(int64_t cacheSet, Addr tag) const
AbstractCacheEntry * allocate(Addr address, AbstractCacheEntry *new_entry, bool touch)
Stats::Scalar m_sw_prefetches
int getReplacementWeight(int64_t set, int64_t loc)
void setLocked(Addr addr, int context)
Stats::Scalar numTagArrayWrites
Cycles getDataLatency() const
void print(std::ostream &out) const
Cycles getLatency() const
Stats::Scalar numDataArrayStalls
int getCacheAssoc() const
Stats::Scalar numDataArrayReads
void printData(std::ostream &out) const
Stats::Scalar numTagArrayReads
int64_t addressToCacheSet(Addr address) const
Stats::Formula m_prefetches
bool checkResourceAvailable(CacheResourceType res, Addr addr)
AbstractCacheEntry * lookup(Addr address)
Abstract superclass for simulation objects.
std::vector< std::vector< AbstractCacheEntry * > > m_cache
bool isTagPresent(Addr address) const
void allocateVoid(Addr address, AbstractCacheEntry *new_entry)