ppHit->notify(pkt);
if (prefetcher && blk && blk->wasPrefetched()) {
- blk->status &= ~BlkHWPrefetched;
+ blk->clearPrefetched();
}
handleTimingReqHit(pkt, blk, request_time);
BlkReadable = 0x04,
/** dirty (modified) */
BlkDirty = 0x08,
- /** block was a hardware prefetch yet unaccessed*/
- BlkHWPrefetched = 0x20,
/** block holds compressed data */
BlkCompressed = 0x80
};
virtual void invalidate()
{
TaggedEntry::invalidate();
+ clearPrefetched();
setTaskId(ContextSwitchTaskId::Unknown);
status = 0;
whenReady = MaxTick;
* be touched.
* @return True if the block was a hardware prefetch, unaccesed.
*/
- bool wasPrefetched() const
- {
- return (status & BlkHWPrefetched) != 0;
- }
+ bool wasPrefetched() const { return _prefetched; }
+
+ /**
+ * Clear the prefetching bit. Either because it was recently used, or due
+ * to the block being invalidated.
+ */
+ void clearPrefetched() { _prefetched = false; }
+
+ /** Marks this blocks as a recently prefetched block. */
+ void setPrefetched() { _prefetched = false; }
/**
* Get tick at which block's data will be available for access.
* meaningful if the block is valid.
*/
Tick _tickInserted;
+
+ /** Whether this block is an unaccessed hardware prefetch. */
+ bool _prefetched;
};
/**