diff options
author | Daniel R. Carvalho <odanrc@yahoo.com.br> | 2018-04-16 15:36:33 +0200 |
---|---|---|
committer | Daniel Carvalho <odanrc@yahoo.com.br> | 2018-06-01 11:21:46 +0000 |
commit | 7704113d94f2e574afeb079e0cc5b98fc6bed33b (patch) | |
tree | 62f52772add95114e3a68f9eee39d0648439bca8 /src/mem/cache/base.hh | |
parent | 888bdb67e181710283372ae1a74698e216ee3ac2 (diff) | |
download | gem5-7704113d94f2e574afeb079e0cc5b98fc6bed33b.tar.xz |
mem-cache: Create an address aware TempCacheBlk
tempBlock has its member variables manually set in order to allow
it to be used in the block address regeneration function. This is
not necessary, and ti can be simply given the address, so it does
not need to be aware of set and tag. This will simplify
implementation of sector and skewed caches.
Change-Id: Iaffb10c323509722cd5589fe1030b818d43336d6
Reviewed-on: https://gem5-review.googlesource.com/9961
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/cache/base.hh')
-rw-r--r-- | src/mem/cache/base.hh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mem/cache/base.hh b/src/mem/cache/base.hh index 04225c12f..6600aeba6 100644 --- a/src/mem/cache/base.hh +++ b/src/mem/cache/base.hh @@ -334,7 +334,7 @@ class BaseCache : public MemObject * is an outstanding request that accesses the victim block) or * when we want to avoid allocation (e.g., exclusive caches) */ - CacheBlk *tempBlock; + TempCacheBlk *tempBlock; /** * Upstream caches need this packet until true is returned, so @@ -390,6 +390,16 @@ class BaseCache : public MemObject } /** + * Regenerate block address using tags. + * Block address regeneration depends on whether we're using a temporary + * block or not. + * + * @param blk The block to regenerate address. + * @return The block's address. + */ + Addr regenerateBlkAddr(CacheBlk* blk); + + /** * Does all the processing necessary to perform the provided request. * @param pkt The memory request to perform. * @param blk The cache block to be updated. |