summaryrefslogtreecommitdiff
path: root/src/mem/packet.hh
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2007-07-15 20:11:06 -0700
committerSteve Reinhardt <stever@eecs.umich.edu>2007-07-15 20:11:06 -0700
commit884807a68ad7e4f390660b3becfe4ee094334e95 (patch)
tree4c7ceec3944234c8cd983c72308115df55450dc5 /src/mem/packet.hh
parentf790f34fe30aaca22b829104a8cf3f547624132a (diff)
downloadgem5-884807a68ad7e4f390660b3becfe4ee094334e95.tar.xz
Fix up a bunch of multilevel coherence issues.
Atomic mode seems to work. Timing is closer but not there yet. --HG-- extra : convert_revision : 0dea5c3d4b973d009e9d4a4c21b9cad15961d56f
Diffstat (limited to 'src/mem/packet.hh')
-rw-r--r--src/mem/packet.hh12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mem/packet.hh b/src/mem/packet.hh
index c90842dee..036bd3fd7 100644
--- a/src/mem/packet.hh
+++ b/src/mem/packet.hh
@@ -252,9 +252,11 @@ class Packet : public FastAlloc
bool destValid;
enum Flag {
- // Snoop flags
+ // Snoop response flags
MemInhibit,
Shared,
+ // Special control flags
+ ExpressSnoop,
NUM_PACKET_FLAGS
};
@@ -317,6 +319,10 @@ class Packet : public FastAlloc
bool memInhibitAsserted() { return flags[MemInhibit]; }
bool sharedAsserted() { return flags[Shared]; }
+ // Special control flags
+ void setExpressSnoop() { flags[ExpressSnoop] = true; }
+ bool isExpressSnoop() { return flags[ExpressSnoop]; }
+
// Network error conditions... encapsulate them as methods since
// their encoding keeps changing (from result field to command
// field, etc.)
@@ -372,7 +378,7 @@ class Packet : public FastAlloc
* that, as we can't guarantee that the new packet's lifetime is
* less than that of the original packet. In this case the new
* packet should allocate its own data. */
- Packet(Packet *origPkt)
+ Packet(Packet *origPkt, bool clearFlags = false)
: cmd(origPkt->cmd), req(origPkt->req),
data(origPkt->staticData ? origPkt->data : NULL),
staticData(origPkt->staticData),
@@ -381,7 +387,7 @@ class Packet : public FastAlloc
src(origPkt->src), dest(origPkt->dest),
addrSizeValid(origPkt->addrSizeValid),
srcValid(origPkt->srcValid), destValid(origPkt->destValid),
- flags(origPkt->flags),
+ flags(clearFlags ? 0 : origPkt->flags),
time(curTick), senderState(origPkt->senderState)
{
}