Change the findBlock(addr, lat) to accessBlock, which I think has better connotations for what is really happening and how it should be used.

This commit is contained in:
Lisa Hsu 2008-11-04 11:35:57 -05:00
parent dd99ff23c6
commit 4ab52cb986
7 changed files with 19 additions and 13 deletions

View file

@ -269,7 +269,7 @@ Cache<TagStore>::access(PacketPtr pkt, BlkType *&blk,
return false;
}
blk = tags->findBlock(pkt->getAddr(), lat);
blk = tags->accessBlock(pkt->getAddr(), lat);
if (prefetchAccess) {
//We are determining prefetches on access stream, call prefetcher

View file

@ -155,7 +155,7 @@ FALRU::invalidateBlk(FALRU::BlkType *blk)
}
FALRUBlk*
FALRU::findBlock(Addr addr, int &lat, int *inCache)
FALRU::accessBlock(Addr addr, int &lat, int *inCache)
{
accesses++;
int tmp_in_cache = 0;

View file

@ -171,15 +171,17 @@ public:
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.

View file

@ -221,7 +221,7 @@ IIC::regStats(const string &name)
IICTag*
IIC::findBlock(Addr addr, int &lat)
IIC::accessBlock(Addr addr, int &lat)
{
Addr tag = extractTag(addr);
unsigned set = hash(addr);

View file

@ -410,14 +410,16 @@ class IIC : public BaseTags
void invalidateBlk(BlkType *blk);
/**
* Find the block and update the replacement data. This call also returns
* the access latency 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 find.
* @param asid The address space ID.
* @param lat The access latency.
* @return A pointer to the block found, if any.
*/
IICTag* findBlock(Addr addr, int &lat);
IICTag* accessBlock(Addr addr, int &lat);
/**
* Find the block, do not update the replacement data.

View file

@ -151,7 +151,7 @@ LRU::~LRU()
}
LRUBlk*
LRU::findBlock(Addr addr, int &lat)
LRU::accessBlock(Addr addr, int &lat)
{
Addr tag = extractTag(addr);
unsigned set = extractSet(addr);

View file

@ -160,17 +160,19 @@ public:
void invalidateBlk(BlkType *blk);
/**
* Finds the given address in the cache and update replacement data.
* Returns the access latency 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 as a side effect.
* @param addr The address to find.
* @param asid The address space ID.
* @param lat The access latency.
* @return Pointer to the cache block if found.
*/
LRUBlk* findBlock(Addr addr, int &lat);
LRUBlk* accessBlock(Addr addr, int &lat);
/**
* Finds the given address in the cache, do not update replacement data.
* i.e. This is a no-side-effect find of a block.
* @param addr The address to find.
* @param asid The address space ID.
* @return Pointer to the cache block if found.