diff options
author | Steve Reinhardt <stever@eecs.umich.edu> | 2007-07-21 13:45:17 -0700 |
---|---|---|
committer | Steve Reinhardt <stever@eecs.umich.edu> | 2007-07-21 13:45:17 -0700 |
commit | 91178600947e174041f46f54e4241cedd01bbb34 (patch) | |
tree | c1e52d85a4187597cfa71a7efab2641362ca0965 /src/mem/cache/miss | |
parent | a67a0025b3da9605f1cd41c75bff5dba2175a0dd (diff) | |
download | gem5-91178600947e174041f46f54e4241cedd01bbb34.tar.xz |
Several more fixes for multi-level timing coherence.
- Add "deferred snoop" flag to Packet so upper-level caches
can distinguish whether lower-level cache request was
in-service or not at the time of the original snoop.
- Revamp response handling to properly handle deferred snoops
on non-cache-fill requests (i.e. upgrades).
- Make sure forwarded writebacks are kept in write buffer at
lower-level caches so they get snooped properly.
--HG--
extra : convert_revision : 17f8a3772a1ae31a16991a53f8225ddf54d31fc9
Diffstat (limited to 'src/mem/cache/miss')
-rw-r--r-- | src/mem/cache/miss/mshr.cc | 18 | ||||
-rw-r--r-- | src/mem/cache/miss/mshr.hh | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/mem/cache/miss/mshr.cc b/src/mem/cache/miss/mshr.cc index 5d5e63f90..7ba3789fe 100644 --- a/src/mem/cache/miss/mshr.cc +++ b/src/mem/cache/miss/mshr.cc @@ -119,25 +119,23 @@ MSHR::allocateTarget(PacketPtr target, Tick whenReady, Counter _order) ++ntargets; } -void -MSHR::allocateSnoopTarget(PacketPtr pkt, Tick whenReady, Counter _order) +bool +MSHR::handleSnoop(PacketPtr pkt, Counter _order) { - assert(inService); // don't bother to call otherwise + if (!inService || (pkt->isExpressSnoop() && !pkt->isDeferredSnoop())) { + return false; + } if (pendingInvalidate) { // a prior snoop has already appended an invalidation, so // logically we don't have the block anymore... - return; + return true; } - DPRINTF(Cache, "deferred snoop on %x: %s %s\n", addr, - needsExclusive ? "needsExclusive" : "", - pkt->needsExclusive() ? "pkt->needsExclusive()" : ""); - if (needsExclusive || pkt->needsExclusive()) { // actual target device (typ. PhysicalMemory) will delete the // packet on reception, so we need to save a copy here - targets.push_back(Target(new Packet(pkt), whenReady, _order, false)); + targets.push_back(Target(new Packet(pkt), curTick, _order, false)); ++ntargets; if (needsExclusive) { @@ -157,6 +155,8 @@ MSHR::allocateSnoopTarget(PacketPtr pkt, Tick whenReady, Counter _order) pendingShared = true; pkt->assertShared(); } + + return true; } diff --git a/src/mem/cache/miss/mshr.hh b/src/mem/cache/miss/mshr.hh index a27f465aa..9c6a8cf33 100644 --- a/src/mem/cache/miss/mshr.hh +++ b/src/mem/cache/miss/mshr.hh @@ -162,7 +162,7 @@ public: * @param target The target. */ void allocateTarget(PacketPtr target, Tick when, Counter order); - void allocateSnoopTarget(PacketPtr target, Tick when, Counter order); + bool handleSnoop(PacketPtr target, Counter order); /** A simple constructor. */ MSHR(); |