Fix problems with unCacheable addresses in timing-coherence
authorRon Dreslinski <rdreslin@umich.edu>
Thu, 12 Oct 2006 17:33:21 +0000 (13:33 -0400)
committerRon Dreslinski <rdreslin@umich.edu>
Thu, 12 Oct 2006 17:33:21 +0000 (13:33 -0400)
src/base/traceflags.py:
src/mem/physical.cc:
    Add debug falgs fro physical memory accesses
src/mem/cache/cache_impl.hh:
    Snoops to uncacheable blocks should not happen
src/mem/cache/miss/miss_queue.cc:
    Set the size properly on unCacheable accesses

--HG--
extra : convert_revision : fc78192863afb11fc7c591fba169021b9e127d16

src/base/traceflags.py
src/mem/cache/cache_impl.hh
src/mem/cache/miss/miss_queue.cc
src/mem/physical.cc

index f871ce35f8912f54aa1152e6aac23cacf54ce3ed..c05f9e5b0b8a47f0c8c5a8906189b036fecb2bf6 100644 (file)
@@ -122,6 +122,7 @@ baseFlags = [
     'MSHR',
     'Mbox',
     'MemDepUnit',
+    'MemoryAccess',
     'O3CPU',
     'OzoneCPU',
     'OzoneLSQ',
index a68418f2445c1a1785a1feb1f18f5210da163efc..150abbe52ab4031745f71e20fb1efcdddbacbc19 100644 (file)
@@ -389,6 +389,11 @@ template<class TagStore, class Buffering, class Coherence>
 void
 Cache<TagStore,Buffering,Coherence>::snoop(Packet * &pkt)
 {
+    if (pkt->req->isUncacheable()) {
+        //Can't get a hit on an uncacheable address
+        //Revisit this for multi level coherence
+        return;
+    }
     Addr blk_addr = pkt->getAddr() & ~(Addr(blkSize-1));
     BlkType *blk = tags->findBlock(pkt);
     MSHR *mshr = missQueue->findMSHR(blk_addr);
index c7b0e0890e9d37604c52be975825968ade8a46fb..c23b542f5077860e5cb9d39e742914f8fc2bb527 100644 (file)
@@ -352,7 +352,7 @@ MissQueue::setPrefetcher(BasePrefetcher *_prefetcher)
 MSHR*
 MissQueue::allocateMiss(Packet * &pkt, int size, Tick time)
 {
-    MSHR* mshr = mq.allocate(pkt, blkSize);
+    MSHR* mshr = mq.allocate(pkt, size);
     mshr->order = order++;
     if (!pkt->req->isUncacheable() ){//&& !pkt->isNoAllocate()) {
         // Mark this as a cache line fill
index 7303f278e80154ede039cf1056244883f2c94912..f5a0ade15358762db8305dd756c7856044d160e6 100644 (file)
@@ -201,12 +201,16 @@ PhysicalMemory::doFunctionalAccess(Packet *pkt)
         if (pkt->req->isLocked()) {
             trackLoadLocked(pkt->req);
         }
+        DPRINTF(MemoryAccess, "Performing Read of size %i on address 0x%x\n",
+                pkt->getSize(), pkt->getAddr());
         memcpy(pkt->getPtr<uint8_t>(),
                pmemAddr + pkt->getAddr() - params()->addrRange.start,
                pkt->getSize());
     }
     else if (pkt->isWrite()) {
         if (writeOK(pkt->req)) {
+            DPRINTF(MemoryAccess, "Performing Write of size %i on address 0x%x\n",
+                    pkt->getSize(), pkt->getAddr());
             memcpy(pmemAddr + pkt->getAddr() - params()->addrRange.start,
                    pkt->getPtr<uint8_t>(), pkt->getSize());
         }