gem5/src/mem/cache/tags/nmru.hh
Sanchayan Maity 2e1e1aedc7 mem: cache: tags: Introduce NMRU Cache Replacement Policy
Introduce NMRU Cache Replacement Policy

Reference implementation is here
http://pages.cs.wisc.edu/~david/courses/cs752/Fall2015/gem5-tutorial/part2/simobject.html

Note that the reference implementation is outdated and does not
build/work with the current gem5 branch. This commit modifies the
above example to make it work with the current gem5 branch.
2017-01-24 11:28:54 +05:30

34 lines
736 B
C++

#ifndef __MEM_CACHE_TAGS_NMRU_HH__
#define __MEM_CACHE_TAGS_NMRU_HH__
#include "mem/cache/tags/base_set_assoc.hh"
#include "params/NMRU.hh"
class NMRU : public BaseSetAssoc
{
public:
/** Convenience typedef. */
typedef NMRUParams Params;
/**
* Construct and initialize this tag store.
*/
NMRU(const Params *p);
/**
* Destructor
*/
~NMRU() {}
/**
* Required functions for this subclass to implement
*/
BlkType* accessBlock(Addr addr, bool is_secure, Cycles &lat,
int context_src);
BlkType* findVictim(Addr addr);
void insertBlock(PacketPtr pkt, BlkType *blk);
void invalidate(BlkType *blk);
};
#endif // __MEM_CACHE_TAGS_NMRU_HH__