Fix bug with timing snoop upcalls to MemTest object.
authorSteve Reinhardt <stever@eecs.umich.edu>
Mon, 16 Jul 2007 04:03:12 +0000 (21:03 -0700)
committerSteve Reinhardt <stever@eecs.umich.edu>
Mon, 16 Jul 2007 04:03:12 +0000 (21:03 -0700)
--HG--
extra : convert_revision : 1940a5d231b4f856cf69578f68ea98435824dbd8

src/cpu/memtest/memtest.cc

index f5c8bb93bd226b33d690499fd5813aa0223c8d57..77816e8d11d93e0129c1f4615cfaf2f5098c24f4 100644 (file)
@@ -57,7 +57,13 @@ int TESTER_ALLOCATOR=0;
 bool
 MemTest::CpuPort::recvTiming(PacketPtr pkt)
 {
-    memtest->completeRequest(pkt);
+    if (pkt->isResponse()) {
+        memtest->completeRequest(pkt);
+    } else {
+        // must be snoop upcall
+        assert(pkt->isRequest());
+        assert(pkt->getDest() == Packet::Broadcast);
+    }
     return true;
 }