summaryrefslogtreecommitdiff
path: root/src/mem/cache/tags/fa_lru.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-04-06 10:19:36 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-04-06 10:19:36 -0700
commitd080581db1f9ee4e1e6d07d2b01c13c67908a391 (patch)
treecc484b289fa5a30c4631f9faa1d8b456bffeebfc /src/mem/cache/tags/fa_lru.hh
parent7a7c4c5fca83a8d47c7e71c9c080a882ebe204a9 (diff)
parent639cb0a42d953ee32bc7e96b0cdfa96cd40e9fc1 (diff)
downloadgem5-d080581db1f9ee4e1e6d07d2b01c13c67908a391.tar.xz
Merge ARM into the head. ARM will compile but may not actually work.
Diffstat (limited to 'src/mem/cache/tags/fa_lru.hh')
-rw-r--r--src/mem/cache/tags/fa_lru.hh51
1 files changed, 11 insertions, 40 deletions
diff --git a/src/mem/cache/tags/fa_lru.hh b/src/mem/cache/tags/fa_lru.hh
index cabcf18b4..4eab10c49 100644
--- a/src/mem/cache/tags/fa_lru.hh
+++ b/src/mem/cache/tags/fa_lru.hh
@@ -139,11 +139,11 @@ class FALRU : public BaseTags
*/
/** Hits in each cache size >= 128K. */
- Stats::Vector<> hits;
+ Stats::Vector hits;
/** Misses in each cache size >= 128K. */
- Stats::Vector<> misses;
+ Stats::Vector misses;
/** Total number of accesses. */
- Stats::Scalar<> accesses;
+ Stats::Scalar accesses;
/**
* @}
@@ -165,29 +165,23 @@ public:
void regStats(const std::string &name);
/**
- * Return true if the address is found in the cache.
- * @param asid The address space ID.
- * @param addr The address to look for.
- * @return True if the address is in the cache.
- */
- bool probe(Addr addr) const;
-
- /**
* Invalidate a cache block.
* @param blk The block to invalidate.
*/
void invalidateBlk(BlkType *blk);
/**
- * Find the block in the cache and update the replacement data. Returns
- * the access latency and the in cache flags as a side effect
+ * Access block and update replacement data. May not succeed, in which case
+ * NULL pointer is returned. This has all the implications of a cache
+ * access and should only be used as such.
+ * Returns the access latency and inCache flags as a side effect.
* @param addr The address to look for.
* @param asid The address space ID.
* @param lat The latency of the access.
* @param inCache The FALRUBlk::inCache flags.
* @return Pointer to the cache block.
*/
- FALRUBlk* findBlock(Addr addr, int &lat, int *inCache = 0);
+ FALRUBlk* accessBlock(Addr addr, int &lat, int *inCache = 0);
/**
* Find the block in the cache, do not update the replacement data.
@@ -203,7 +197,9 @@ public:
* @param writebacks List for any writebacks to be performed.
* @return The block to place the replacement in.
*/
- FALRUBlk* findReplacement(Addr addr, PacketList & writebacks);
+ FALRUBlk* findVictim(Addr addr, PacketList & writebacks);
+
+ void insertBlock(Addr addr, BlkType *blk);
/**
* Return the hit latency of this cache.
@@ -283,31 +279,6 @@ public:
{
return (tag);
}
-
- /**
- * Read the data out of the internal storage of a cache block. FALRU
- * currently doesn't support data storage.
- * @param blk The cache block to read.
- * @param data The buffer to read the data into.
- * @return The data from the cache block.
- */
- void readData(FALRUBlk *blk, uint8_t *data)
- {
- }
-
- /**
- * Write data into the internal storage of a cache block. FALRU
- * currently doesn't support data storage.
- * @param blk The cache block to be written.
- * @param data The data to write.
- * @param size The number of bytes to write.
- * @param writebacks A list for any writebacks to be performed. May be
- * needed when writing to a compressed block.
- */
- void writeData(FALRUBlk *blk, uint8_t *data, int size,
- PacketList &writebacks)
- {
- }
};
#endif