summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2011-02-06 22:14:19 -0800
committerBrad Beckmann <Brad.Beckmann@amd.com>2011-02-06 22:14:19 -0800
commit5c2f4937b33c5ed4684ff0eda03d427adb270841 (patch)
treee58635f8978a31091304293ede276dc04b01668d /src
parent7edab47448b1036952fe5c5ac3cdbf01bec3c048 (diff)
downloadgem5-5c2f4937b33c5ed4684ff0eda03d427adb270841.tar.xz
MOESI_hammer: fixed dir bug counting received acks
Diffstat (limited to 'src')
-rw-r--r--src/mem/protocol/MOESI_hammer-dir.sm13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mem/protocol/MOESI_hammer-dir.sm b/src/mem/protocol/MOESI_hammer-dir.sm
index 1d18fd489..67c375fbc 100644
--- a/src/mem/protocol/MOESI_hammer-dir.sm
+++ b/src/mem/protocol/MOESI_hammer-dir.sm
@@ -581,7 +581,13 @@ machine(Directory, "AMD Hammer-like protocol")
// directory DMA requests must wait for acks from all LLC caches, so
// only decrement by 1.
//
- tbe.NumPendingMsgs := tbe.NumPendingMsgs - 1;
+ if ((in_msg.Type == CoherenceResponseType:DATA_SHARED) ||
+ (in_msg.Type == CoherenceResponseType:DATA) ||
+ (in_msg.Type == CoherenceResponseType:DATA_EXCLUSIVE)) {
+ tbe.NumPendingMsgs := tbe.NumPendingMsgs - 1;
+ } else {
+ tbe.NumPendingMsgs := tbe.NumPendingMsgs - in_msg.Acks;
+ }
DPRINTF(RubySlicc, "%d\n", tbe.NumPendingMsgs);
}
}
@@ -591,11 +597,6 @@ machine(Directory, "AMD Hammer-like protocol")
assert(is_valid(tbe));
assert(in_msg.Type == CoherenceResponseType:UNBLOCKS);
DPRINTF(RubySlicc, "%d\n", tbe.NumPendingMsgs);
- //
- // Note that cache data responses will have an ack count of 2. However,
- // directory DMA requests must wait for acks from all LLC caches, so
- // only decrement by 1.
- //
tbe.NumPendingMsgs := tbe.NumPendingMsgs - 1;
DPRINTF(RubySlicc, "%d\n", tbe.NumPendingMsgs);
}