summaryrefslogtreecommitdiff
path: root/src/mem/packet.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/packet.hh')
-rw-r--r--src/mem/packet.hh23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/mem/packet.hh b/src/mem/packet.hh
index 3f10458e7..192136aba 100644
--- a/src/mem/packet.hh
+++ b/src/mem/packet.hh
@@ -87,6 +87,7 @@ class MemCmd
WriteReq,
WriteResp,
Writeback,
+ CleanEvict,
SoftPFReq,
HardPFReq,
SoftPFResp,
@@ -508,6 +509,7 @@ class Packet : public Printable
bool suppressFuncError() const { return flags.isSet(SUPPRESS_FUNC_ERROR); }
void setBlockCached() { flags.set(BLOCK_CACHED); }
bool isBlockCached() const { return flags.isSet(BLOCK_CACHED); }
+ void clearBlockCached() { flags.clear(BLOCK_CACHED); }
// Network error conditions... encapsulate them as methods since
// their encoding keeps changing (from result field to command
@@ -937,6 +939,27 @@ class Packet : public Printable
}
/**
+ * Is this request notification of a clean or dirty eviction from the cache.
+ **/
+ bool
+ evictingBlock() const
+ {
+ return (cmd == MemCmd::Writeback ||
+ cmd == MemCmd::CleanEvict);
+ }
+
+ /**
+ * Does the request need to check for cached copies of the same block
+ * in the memory hierarchy above.
+ **/
+ bool
+ mustCheckAbove() const
+ {
+ return (cmd == MemCmd::HardPFReq ||
+ evictingBlock());
+ }
+
+ /**
* Check a functional request against a memory value represented
* by a base/size pair and an associated data array. If the
* current packet is a read, it may be satisfied by the memory