Another pass of minor changes in preparation for new protocol.
authorSteve Reinhardt <stever@eecs.umich.edu>
Tue, 22 May 2007 13:29:48 +0000 (06:29 -0700)
committerSteve Reinhardt <stever@eecs.umich.edu>
Tue, 22 May 2007 13:29:48 +0000 (06:29 -0700)
src/mem/cache/cache_impl.hh:
src/mem/cache/coherence/simple_coherence.hh:
    Get rid of old invalidate propagation logic in preparation
    for new multilevel snoop protocol.
src/mem/cache/coherence/coherence_protocol.cc:
    L2 cache now has protocol, so protocol must handle ReadExReq
    coming in from the CPU side.
src/mem/cache/miss/mshr_queue.cc:
    Assertion is failing, so let's take it out for now.
src/mem/packet.cc:
src/mem/packet.hh:
    Add WritebackAck command.
    Reorganize enum to put responses next to corresponding requests.
    Get rid of unused WriteReqNoAck.

--HG--
extra : convert_revision : 24c519846d161978123f9aa029ae358a41546c73

src/mem/cache/cache_impl.hh
src/mem/cache/coherence/coherence_protocol.cc
src/mem/cache/coherence/simple_coherence.hh
src/mem/cache/miss/mshr_queue.cc
src/mem/packet.cc
src/mem/packet.hh

index 6b9eac865d94ef2166f1630ce3bc10aa85de537c..56352c110aac3cfd9eb38631ba83b614c11df818 100644 (file)
@@ -794,14 +794,7 @@ Cache<TagStore,Coherence>::snoop(PacketPtr &pkt)
         return;
     }
 
-    //Send a timing (true) invalidate up if the protocol calls for it
-    if (coherence->propogateInvalidate(pkt, true)) {
-        //Temp hack, we had a functional read hit in the L1, mark as success
-        pkt->flags |= SATISFIED;
-        pkt->result = Packet::Success;
-        respondToSnoop(pkt, curTick + hitLatency);
-        return;
-    }
+    ///// PROPAGATE SNOOP UPWARD HERE
 
     Addr blk_addr = pkt->getAddr() & ~(Addr(blkSize-1));
     BlkType *blk = tags->findBlock(pkt->getAddr());
@@ -1097,13 +1090,7 @@ template<class TagStore, class Coherence>
 Tick
 Cache<TagStore,Coherence>::snoopProbe(PacketPtr &pkt)
 {
-    //Send a atomic (false) invalidate up if the protocol calls for it
-    if (coherence->propogateInvalidate(pkt, false)) {
-        //Temp hack, we had a functional read hit in the L1, mark as success
-        pkt->flags |= SATISFIED;
-        pkt->result = Packet::Success;
-        return hitLatency;
-    }
+    ///// PROPAGATE SNOOP UPWARD HERE
 
     Addr blk_addr = pkt->getAddr() & ~(Addr(blkSize-1));
     BlkType *blk = tags->findBlock(pkt->getAddr());
index 33a8a4e631755dc1c4685c6aba8999df336824ba..bc8de0d26b10e2fa2956279253d72ead33e71a3c 100644 (file)
@@ -295,11 +295,14 @@ CoherenceProtocol::CoherenceProtocol(const string &name,
     tt[Invalid][MC::ReadReq].onRequest(MC::ReadReq);
     // we only support write allocate right now
     tt[Invalid][MC::WriteReq].onRequest(MC::ReadExReq);
+    tt[Invalid][MC::ReadExReq].onRequest(MC::ReadExReq);
     tt[Invalid][MC::SwapReq].onRequest(MC::ReadExReq);
     tt[Shared][MC::WriteReq].onRequest(writeToSharedCmd);
+    tt[Shared][MC::ReadExReq].onRequest(MC::ReadExReq);
     tt[Shared][MC::SwapReq].onRequest(writeToSharedCmd);
     if (hasOwned) {
         tt[Owned][MC::WriteReq].onRequest(writeToSharedCmd);
+        tt[Owned][MC::ReadExReq].onRequest(MC::ReadExReq);
         tt[Owned][MC::SwapReq].onRequest(writeToSharedCmd);
     }
 
index 1c89c703a916e490501fd1c879a7ccf09f5db5f5..095260ca4b48f38958b7738e1624c5408fb62f9b 100644 (file)
@@ -161,12 +161,6 @@ class SimpleCoherence
     bool allowFastWrites() { return false; }
 
     bool hasProtocol() { return true; }
-
-    bool propogateInvalidate(PacketPtr pkt, bool isTiming)
-    {
-        //For now we do nothing, asssumes simple coherence is top level of cache
-        return false;
-    }
 };
 
 #endif //__SIMPLE_COHERENCE_HH__
index add11dfe73b2c732cb7de2d117d2cddc6b7ebb72..e9aa89bf8409970c495a98d8c3ef33c3be92b20c 100644 (file)
@@ -119,7 +119,6 @@ MSHRQueue::allocate(PacketPtr &pkt, int size)
     if (!pkt->needsResponse()) {
         mshr->allocateAsBuffer(pkt);
     } else {
-        assert(size !=0);
         mshr->allocate(pkt->cmd, aligned_addr, size, pkt);
         allocatedTargets += 1;
     }
index 2463a19ba892d78029c185055b771bfbc999f262..8c69def3774ec5baac58b794f1e1a718f2a2220e 100644 (file)
@@ -56,17 +56,18 @@ MemCmd::commandInfo[] =
     { 0, InvalidCmd, "InvalidCmd" },
     /* ReadReq */
     { SET3(IsRead, IsRequest, NeedsResponse), ReadResp, "ReadReq" },
+    /* ReadResp */
+    { SET3(IsRead, IsResponse, HasData), InvalidCmd, "ReadResp" },
     /* WriteReq */
     { SET4(IsWrite, IsRequest, NeedsResponse, HasData),
             WriteResp, "WriteReq" },
-    /* WriteReqNoAck */
-    { SET3(IsWrite, IsRequest, HasData), InvalidCmd, "WriteReqNoAck" },
-    /* ReadResp */
-    { SET3(IsRead, IsResponse, HasData), InvalidCmd, "ReadResp" },
     /* WriteResp */
     { SET2(IsWrite, IsResponse), InvalidCmd, "WriteResp" },
     /* Writeback */
-    { SET3(IsWrite, IsRequest, HasData), InvalidCmd, "Writeback" },
+    { SET4(IsWrite, IsRequest, HasData, NeedsResponse),
+            WritebackAck, "Writeback" },
+    /* WritebackAck */
+    { SET2(IsWrite, IsResponse), InvalidCmd, "WritebackAck" },
     /* SoftPFReq */
     { SET4(IsRead, IsRequest, IsSWPrefetch, NeedsResponse),
             SoftPFResp, "SoftPFReq" },
index 577f991160b7c5c1d8afe77443ddd1c83e3c0923..413ffa26bbc7b5da33c48d05105ecfd1f379f4ee 100644 (file)
@@ -73,11 +73,11 @@ class MemCmd
     {
         InvalidCmd,
         ReadReq,
-        WriteReq,
-        WriteReqNoAck,
         ReadResp,
+        WriteReq,
         WriteResp,
         Writeback,
+        WritebackAck,
         SoftPFReq,
         HardPFReq,
         SoftPFResp,