summaryrefslogtreecommitdiff
path: root/src/mem/cache/blk.hh
diff options
context:
space:
mode:
authorLena Olson <lena@cs.wisc.edu>2012-09-11 14:14:49 -0400
committerLena Olson <lena@cs.wisc.edu>2012-09-11 14:14:49 -0400
commit584eba3ab66c8f95e2344cf7115ec2fb13604eb1 (patch)
treea616f7cd709a46c6c1fe3c55d4d190f02e5261c7 /src/mem/cache/blk.hh
parentfe5deb4a22260b3e67839fb1efa978cff51e79ba (diff)
downloadgem5-584eba3ab66c8f95e2344cf7115ec2fb13604eb1.tar.xz
Cache: Split invalidateBlk up to seperate block vs. tags
This seperates the functionality to clear the state in a block into blk.hh and the functionality to udpate the tag information into the tags. This gets rid of the case where calling invalidateBlk on an already-invalid block does something different than calling it on a valid block, which was confusing.
Diffstat (limited to 'src/mem/cache/blk.hh')
-rw-r--r--src/mem/cache/blk.hh10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mem/cache/blk.hh b/src/mem/cache/blk.hh
index 91970e09b..73f569e6a 100644
--- a/src/mem/cache/blk.hh
+++ b/src/mem/cache/blk.hh
@@ -189,6 +189,16 @@ class CacheBlk
}
/**
+ * Invalidate the block and clear all state.
+ */
+ void invalidate()
+ {
+ status = 0;
+ isTouched = false;
+ clearLoadLocks();
+ }
+
+ /**
* Check to see if a block has been written.
* @return True if the block is dirty.
*/