Index: trunk/modules/vci_mem_cache_v4/caba/source/src/vci_mem_cache_v4.cpp
===================================================================
--- trunk/modules/vci_mem_cache_v4/caba/source/src/vci_mem_cache_v4.cpp	(revision 289)
+++ trunk/modules/vci_mem_cache_v4/caba/source/src/vci_mem_cache_v4.cpp	(revision 290)
@@ -3701,48 +3701,32 @@
         bool match         = match_srcid && match_inst;
 
+        if (not r_cleanup_is_cnt.read() and not match) {
+            std::cout
+              << "VCI_MEM_CACHE ERROR : Cleanup request on a valid"
+              << "entry using linked list mode with no corresponding"
+              << "directory or heap entry"
+              << std::endl;
+
+            exit(1);
+        }
+
         // update the cache directory (for the copies)
         DirectoryEntry entry;
-        entry.valid   = true;
-        entry.is_cnt  = r_cleanup_is_cnt.read();
-        entry.dirty   = r_cleanup_dirty.read();
-        entry.tag     = r_cleanup_tag.read();
-        entry.lock    = r_cleanup_lock.read();
-        entry.ptr     = r_cleanup_ptr.read();
-
-        if ( r_cleanup_is_cnt.read() )      // counter mode
-        {
-          entry.count  = r_cleanup_count.read() -1;
-          entry.owner.srcid   = 0;
+        entry.valid       = true;
+        entry.is_cnt      = r_cleanup_is_cnt.read();
+        entry.dirty       = r_cleanup_dirty.read();
+        entry.tag         = r_cleanup_tag.read();
+        entry.lock        = r_cleanup_lock.read();
+        entry.ptr         = r_cleanup_ptr.read();
+        entry.count       = r_cleanup_count.read() - 1;
+        entry.owner.srcid = 0;
+        entry.owner.inst  = 0;
 #if L1_MULTI_CACHE
-          entry.owner.cache_id= 0;
-#endif
-          entry.owner.inst    = 0;
-          // response to the cache
-          r_cleanup_fsm = CLEANUP_RSP;
-        }
-        else                          // linked_list mode
-        {
-          if ( match )  // hit
-          {
-            entry.count         = 0; // no more copy
-            entry.owner.srcid   = 0;
-#if L1_MULTI_CACHE
-            entry.owner.cache_id=0;
-#endif
-            entry.owner.inst    = 0;
-            r_cleanup_fsm       = CLEANUP_RSP;
-          }
-          else         // miss
-          {
-            entry.count          = r_cleanup_count.read();
-            entry.owner.srcid    = r_cleanup_copy.read();
-#if L1_MULTI_CACHE
-            entry.owner.cache_id = r_cleanup_copy_cache.read();
-#endif
-            entry.owner.inst     = r_cleanup_copy_inst.read();
-            r_cleanup_fsm        = CLEANUP_UPT_LOCK;
-          }
-        }
+        entry.owner.cache_id = 0;
+#endif
+
         m_cache_directory.write(set, way, entry);
+
+        r_cleanup_fsm = CLEANUP_RSP;
 
 #if DEBUG_MEMC_CLEANUP
