Go to the documentation of this file.
42 #ifndef __MEM_RUBY_STRUCTURES_CACHEMEMORY_HH__
43 #define __MEM_RUBY_STRUCTURES_CACHEMEMORY_HH__
46 #include <unordered_map>
53 #include "mem/ruby/protocol/CacheRequestType.hh"
54 #include "mem/ruby/protocol/CacheResourceType.hh"
55 #include "mem/ruby/protocol/RubyRequest.hh"
60 #include "params/RubyCache.hh"
67 typedef std::shared_ptr<ReplacementData>
ReplData;
140 void print(std::ostream& out)
const;
239 #endif // __MEM_RUBY_STRUCTURES_CACHEMEMORY_HH__
void recordCacheContents(int cntrl, CacheRecorder *tr) const
int findTagInSetIgnorePermissions(int64_t cacheSet, Addr tag) const
Stats::Formula m_prefetches
Stats::Scalar m_hw_prefetches
void clearLocked(Addr addr)
AbstractCacheEntry * lookup(Addr address)
bool isLocked(Addr addr, int context)
std::vector< std::vector< AbstractCacheEntry * > > m_cache
void allocateVoid(Addr address, AbstractCacheEntry *new_entry)
Stats::Scalar m_demand_misses
Cycles getLatency() const
Addr cacheProbe(Addr address) const
void regStats()
Callback to set stat parameters.
BaseReplacementPolicy * m_replacementPolicy_ptr
We use BaseReplacementPolicy from Classic system here, hence we can use different replacement policie...
Stats::Histogram htmTransCommitWriteSet
std::unordered_map< Addr, int > m_tag_index
void print(std::ostream &out) const
A vector of scalar stats.
void setMRU(Addr address)
void deallocate(Addr address)
bool testCacheAccess(Addr address, RubyRequestType type, DataBlock *&data_ptr)
Cycles getTagLatency() const
bool m_use_occupancy
Set to true when using WeightedLRU replacement policy, otherwise, set to false.
int getCacheAssoc() const
This is a simple scalar statistic, like a counter.
std::shared_ptr< ReplacementData > ReplData
AbstractCacheEntry * allocate(Addr address, AbstractCacheEntry *new_entry)
void init()
init() is called after all C++ SimObjects have been created and all ports are connected.
Stats::Scalar m_demand_hits
std::vector< std::vector< ReplData > > replacement_data
We store all the ReplacementData in a 2-dimensional array.
Stats::Scalar numTagArrayStalls
A common base class of cache replacement policy objects.
void printData(std::ostream &out) const
bool cacheAvail(Addr address) const
CacheMemory(const Params *p)
AbstractCacheEntry * getNullEntry() const
CacheMemory & operator=(const CacheMemory &obj)
bool isBlockInvalid(int64_t cache_set, int64_t loc)
Stats::Scalar m_sw_prefetches
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
int findTagInSet(int64_t line, Addr tag) const
void clearLockedAll(int context)
Cycles getDataLatency() const
std::ostream & operator<<(std::ostream &out, const CacheMemory &obj)
bool tryCacheAccess(Addr address, RubyRequestType type, DataBlock *&data_ptr)
void htmCommitTransaction()
void setLocked(Addr addr, int context)
Stats::Histogram htmTransAbortWriteSet
bool isTagPresent(Addr address) const
Stats::Scalar numDataArrayWrites
Addr getAddressAtIdx(int idx) const
Stats::Scalar numDataArrayReads
Cycles is a wrapper class for representing cycle counts, i.e.
bool m_is_instruction_only_cache
int64_t addressToCacheSet(Addr address) const
Stats::Histogram htmTransCommitReadSet
bool checkResourceAvailable(CacheResourceType res, Addr addr)
void recordRequestType(CacheRequestType requestType, Addr addr)
void htmAbortTransaction()
int getReplacementWeight(int64_t set, int64_t loc)
Stats::Scalar numTagArrayWrites
Stats::Scalar numTagArrayReads
Stats::Formula m_demand_accesses
Stats::Scalar numDataArrayStalls
Stats::Histogram htmTransAbortReadSet
Stats::Vector m_accessModeType
bool isBlockNotBusy(int64_t cache_set, int64_t loc)
Abstract superclass for simulation objects.
Generated on Wed Sep 30 2020 14:02:13 for gem5 by doxygen 1.8.17