Index: branches/MESI/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp
===================================================================
--- branches/MESI/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp	(revision 700)
+++ branches/MESI/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp	(revision 719)
@@ -1,3 +1,3 @@
-/* -*- c++ -*-
+    /* -*- c++ -*-
 *
 * File       : vci_mem_cache.cpp
@@ -898,5 +898,6 @@
         m_cpt_trt_rb                    = 0 ;                                                                 
         m_cpt_trt_full                  = 0 ;                                                             
-                                                                                         
+        m_cpt_put                       = 0 ;                                                             
+        m_cpt_get                       = 0 ;                                                             
         m_cpt_read_fsm_dir_lock         = 0 ;                                                                         
         m_cpt_read_fsm_n_dir_lock       = 0 ;                                                                         
@@ -996,68 +997,70 @@
                 << "[004] READ COST (FLITS * DIST)  = " << m_cpt_read_miss_cost << std::endl
                 << std::endl
-                << "[005] LOCAL GETM MISS           = " << m_cpt_getm_miss_local << std::endl
-                << "[006] REMOTE GETM MISS          = " << m_cpt_getm_miss_remote << std::endl
-                << "[007] LOCAL GETM HIT           = " << m_cpt_getm_hit_local << std::endl
-                << "[008] REMOTE GETM HIT          = " << m_cpt_getm_hit_remote << std::endl
-                << "[009] GETM COST (FLITS * DIST)  = " << m_cpt_getm_cost << std::endl
+                << "[005] LOCAL WRITE               = " << m_cpt_write_local << std::endl
+                << "[006] REMOTE WRITE              = " << m_cpt_write_remote << std::endl
+                << "[007] WRITE FLITS LOCAL         = " << m_cpt_write_flits_local << std::endl
+                << "[008] WRITE FLITS REMOTE        = " << m_cpt_write_flits_remote << std::endl
+                << "[009] WRITE COST (FLITS * DIST) = " << m_cpt_write_cost << std::endl
                 << std::endl
-                << "[010] LOCAL WRITE               = " << m_cpt_write_local << std::endl
-                << "[011] REMOTE WRITE              = " << m_cpt_write_remote << std::endl
-                << "[012] WRITE FLITS LOCAL         = " << m_cpt_write_flits_local << std::endl
-                << "[013] WRITE FLITS REMOTE        = " << m_cpt_write_flits_remote << std::endl
-                << "[014] WRITE COST (FLITS * DIST) = " << m_cpt_write_cost << std::endl
+                << "[010] LOCAL LL                  = " << m_cpt_ll_local << std::endl
+                << "[011] REMOTE LL                 = " << m_cpt_ll_remote << std::endl
+                << "[012] LL COST (FLITS * DIST)    = " << m_cpt_ll_cost << std::endl
                 << std::endl
-                << "[015] LOCAL LL                  = " << m_cpt_ll_local << std::endl
-                << "[016] REMOTE LL                 = " << m_cpt_ll_remote << std::endl
-                << "[017] LL COST (FLITS * DIST)    = " << m_cpt_ll_cost << std::endl
+                << "[013] LOCAL SC                  = " << m_cpt_sc_local << std::endl
+                << "[014] REMOTE SC                 = " << m_cpt_sc_remote << std::endl
+                << "[015] SC COST (FLITS * DIST)    = " << m_cpt_sc_cost << std::endl
                 << std::endl
-                << "[018] LOCAL SC                  = " << m_cpt_sc_local << std::endl
-                << "[019] REMOTE SC                 = " << m_cpt_sc_remote << std::endl
-                << "[020] SC COST (FLITS * DIST)    = " << m_cpt_sc_cost << std::endl
+                << "[016] LOCAL CAS                 = " << m_cpt_cas_local << std::endl
+                << "[017] REMOTE CAS                = " << m_cpt_cas_remote << std::endl
+                << "[018] CAS COST (FLITS * DIST)   = " << m_cpt_cas_cost << std::endl
                 << std::endl
-                << "[021] LOCAL CAS                 = " << m_cpt_cas_local << std::endl
-                << "[022] REMOTE CAS                = " << m_cpt_cas_remote << std::endl
-                << "[023] CAS COST (FLITS * DIST)   = " << m_cpt_cas_cost << std::endl
+                << "[019] REQUESTS TRIG. UPDATE     = " << m_cpt_update << std::endl
+                << "[020] LOCAL UPDATE              = " << m_cpt_update_local << std::endl
+                << "[021] REMOTE UPDATE             = " << m_cpt_update_remote << std::endl
+                << "[022] UPDT COST (FLITS * DIST)  = " << m_cpt_update_cost << std::endl
                 << std::endl
-                << "[024] REQUESTS TRIG. UPDATE     = " << m_cpt_update << std::endl
-                << "[025] LOCAL UPDATE              = " << m_cpt_update_local << std::endl
-                << "[026] REMOTE UPDATE             = " << m_cpt_update_remote << std::endl
-                << "[027] UPDT COST (FLITS * DIST)  = " << m_cpt_update_cost << std::endl
+                << "[023] REQUESTS TRIG. M_INV      = " << m_cpt_minval << std::endl
+                << "[024] LOCAL M_INV               = " << m_cpt_minval_local << std::endl
+                << "[025] REMOTE M_INV              = " << m_cpt_minval_remote << std::endl
+                << "[026] M_INV COST (FLITS * DIST) = " << m_cpt_minval_cost << std::endl
                 << std::endl
-                << "[028] REQUESTS TRIG. M_INV      = " << m_cpt_minval << std::endl
-                << "[029] LOCAL M_INV               = " << m_cpt_minval_local << std::endl
-                << "[030] REMOTE M_INV              = " << m_cpt_minval_remote << std::endl
-                << "[031] M_INV COST (FLITS * DIST) = " << m_cpt_minval_cost << std::endl
+                << "[027] BROADCAT INVAL            = " << m_cpt_binval << std::endl
                 << std::endl
-                << "[032] BROADCAT INVAL            = " << m_cpt_binval << std::endl
+                << "[028] LOCAL CLEANUP             = " << m_cpt_cleanup_local << std::endl
+                << "[029] REMOTE CLEANUP            = " << m_cpt_cleanup_remote << std::endl
+                << "[030] CLNUP COST (FLITS * DIST) = " << m_cpt_cleanup_cost << std::endl
                 << std::endl
-                << "[033] LOCAL CLEANUP             = " << m_cpt_cleanup_local << std::endl
-                << "[034] REMOTE CLEANUP            = " << m_cpt_cleanup_remote << std::endl
-                << "[035] CLEANUP DATA              = " << m_cpt_cleanup_with_data << std::endl
-                << "[036] CLNUP COST (FLITS * DIST) = " << m_cpt_cleanup_cost << std::endl
                 << std::endl
-                << "[037] MULTI_ACK_MISS            = " << m_cpt_multi_ack_miss << std::endl
-                << "[038] MULTI_ACK_HIT             = " << m_cpt_multi_ack_hit << std::endl
-                << "[039] MULTI_ACK_DATA            = " << m_cpt_multi_ack_hit_with_data << std::endl
+                << "[031] READ MISS                 = " << m_cpt_read_miss << std::endl
+                << "[032] WRITE MISS                = " << m_cpt_write_miss << std::endl
+                << "[033] WRITE DIRTY               = " << m_cpt_write_dirty << std::endl
+                << "[034] RD BLOCKED BY HIT IN TRT  = " << m_cpt_trt_rb << std::endl
+                << "[035] TRANS BLOCKED BY FULL TRT = " << m_cpt_trt_full << std::endl
+                << "[036] PUT (UNIMPLEMENTED)       = " << m_cpt_put << std::endl
+                << "[037] GET (UNIMPLEMENTED)       = " << m_cpt_get << std::endl
+                << "[038] WRITE BROADCAST           = " << m_cpt_write_broadcast << std::endl
                 << std::endl
-                << "[040] READ MISS                 = " << m_cpt_read_miss << std::endl
-                << "[041] GETM MISS                 = " << m_cpt_getm_miss << std::endl
-                << "[042] WRITE MISS                = " << m_cpt_write_miss << std::endl
-                << "[043] CAS MISS                  = " << m_cpt_cas_miss << std::endl
-                << "[044] WRITE DIRTY               = " << m_cpt_write_dirty << std::endl
-                << "[045] RD BLOCKED BY HIT IN TRT  = " << m_cpt_trt_rb << std::endl
-                << "[046] TRANS BLOCKED BY FULL TRT = " << m_cpt_trt_full << std::endl
-                << "[047] WRITE BROADCAST           = " << m_cpt_write_broadcast << std::endl
-                << "[048] WRITE MINVAL              = " << m_cpt_write_minval << std::endl
-                << "[049] CAS BROADCAST             = " << m_cpt_cas_broadcast << std::endl
-                << "[050] CAS MINVAL                = " << m_cpt_cas_minval << std::endl
-                << "[051] GETM BROADCAST            = " << m_cpt_getm_broadcast << std::endl
-                << "[052] GETM MINVAL               = " << m_cpt_getm_minval << std::endl
+
+                << "[050] LOCAL GETM MISS           = " << m_cpt_getm_miss_local << std::endl
+                << "[051] REMOTE GETM MISS          = " << m_cpt_getm_miss_remote << std::endl
+                << "[052] LOCAL GETM HIT            = " << m_cpt_getm_hit_local << std::endl
+                << "[053] REMOTE GETM HIT           = " << m_cpt_getm_hit_remote << std::endl
+                << "[054] GETM COST (FLITS * DIST)  = " << m_cpt_getm_cost << std::endl
                 << std::endl
-                << "[053] READ LOCKED WAIT          = " << m_cpt_read_locked_rb << std::endl
-                << "[054] CAS LOCKED WAIT           = " << m_cpt_cas_locked_rb << std::endl
-                << "[055] WRITE LOCKED WAIT         = " << m_cpt_write_locked_rb << std::endl
-                << "[056] EVICTED SLOT              = " << m_cpt_slot_inval << std::endl
-
+                << "[055] CLEANUP WITH DATA         = " << m_cpt_cleanup_with_data << std::endl
+                << std::endl
+                << "[056] MULTI_ACK_MISS            = " << m_cpt_multi_ack_miss << std::endl
+                << "[057] MULTI_ACK_HIT             = " << m_cpt_multi_ack_hit << std::endl
+                << "[058] MULTI_ACK_DATA            = " << m_cpt_multi_ack_hit_with_data << std::endl
+                << std::endl
+                << "[059] GETM MISS                 = " << m_cpt_getm_miss << std::endl
+                << "[060] WRITE MINVAL              = " << m_cpt_write_minval << std::endl
+                << "[061] GETM BROADCAST            = " << m_cpt_getm_broadcast << std::endl
+                << "[062] GETM MINVAL               = " << m_cpt_getm_minval << std::endl
+                << std::endl
+                << "[063] READ LOCKED WAIT          = " << m_cpt_read_locked_rb << std::endl
+                << "[064] CAS LOCKED WAIT           = " << m_cpt_cas_locked_rb << std::endl
+                << "[065] WRITE LOCKED WAIT         = " << m_cpt_write_locked_rb << std::endl
+                << "[066] EVICTED SLOT              = " << m_cpt_slot_inval << std::endl
                 << std::endl;
         }
@@ -1073,55 +1076,54 @@
                 << "[103] REMOTE READ RATE      = " << (double) m_cpt_read_miss_remote / m_cpt_cycles << std::endl
                 << "[104] READ MISS RATE        = " << (double) m_cpt_read_miss / (m_cpt_read_miss_local + m_cpt_read_miss_remote) << std::endl
-                << "[100] GETM MISS TOTAL       = " << m_cpt_getm_miss_local + m_cpt_getm_miss_remote << std::endl
-                << "[101] GETM MISS RATE        = " << (double) (m_cpt_getm_miss_local + m_cpt_getm_miss_remote) / m_cpt_cycles << std::endl
-                << "[102] LOCAL GETM MISS RATE  = " << (double) m_cpt_getm_miss_local / m_cpt_cycles << std::endl
-                << "[103] REMOTE GETM MISS RATE = " << (double) m_cpt_getm_miss_remote / m_cpt_cycles << std::endl
-                << "[100] GETM HIT TOTAL        = " << m_cpt_getm_hit_local + m_cpt_getm_hit_remote << std::endl
-                << "[101] GETM HIT RATE         = " << (double) (m_cpt_getm_hit_local + m_cpt_getm_hit_remote) / m_cpt_cycles << std::endl
-                << "[102] LOCAL GETM HIT RATE   = " << (double) m_cpt_getm_hit_local / m_cpt_cycles << std::endl
-                << "[103] REMOTE GETM HIT RATE  = " << (double) m_cpt_getm_hit_remote / m_cpt_cycles << std::endl
-
-                << "[100] GETM TOTAL            = " << m_cpt_getm_hit_local + m_cpt_getm_hit_remote + m_cpt_getm_miss_remote + m_cpt_getm_miss_local << std::endl
-
-                << "[104] GETM MISS RATE        = " << (double) m_cpt_read_miss / (m_cpt_getm_hit_local + m_cpt_getm_hit_remote + m_cpt_getm_miss_remote + m_cpt_getm_miss_local) << std::endl
+                << "[105] GETM MISS TOTAL       = " << m_cpt_getm_miss_local + m_cpt_getm_miss_remote << std::endl
+                << "[106] GETM MISS RATE        = " << (double) (m_cpt_getm_miss_local + m_cpt_getm_miss_remote) / m_cpt_cycles << std::endl
+                << "[107] LOCAL GETM MISS RATE  = " << (double) m_cpt_getm_miss_local / m_cpt_cycles << std::endl
+                << "[108] REMOTE GETM MISS RATE = " << (double) m_cpt_getm_miss_remote / m_cpt_cycles << std::endl
+                << "[109] GETM HIT TOTAL        = " << m_cpt_getm_hit_local + m_cpt_getm_hit_remote << std::endl
+                << "[110] GETM HIT RATE         = " << (double) (m_cpt_getm_hit_local + m_cpt_getm_hit_remote) / m_cpt_cycles << std::endl
+                << "[111] LOCAL GETM HIT RATE   = " << (double) m_cpt_getm_hit_local / m_cpt_cycles << std::endl
+                << "[112] REMOTE GETM HIT RATE  = " << (double) m_cpt_getm_hit_remote / m_cpt_cycles << std::endl
+
+                << "[113] GETM TOTAL            = " << m_cpt_getm_hit_local + m_cpt_getm_hit_remote + m_cpt_getm_miss_remote + m_cpt_getm_miss_local << std::endl
+
+                << "[114] GETM MISS RATE        = " << (double) m_cpt_read_miss / (m_cpt_getm_hit_local + m_cpt_getm_hit_remote + m_cpt_getm_miss_remote + m_cpt_getm_miss_local) << std::endl
  
                 << std::endl
-                << "[105] WRITE TOTAL           = " << m_cpt_write_local + m_cpt_write_remote << std::endl
-                << "[106] WRITE RATE            = " << (double) (m_cpt_write_local + m_cpt_write_remote) / m_cpt_cycles << std::endl
-                << "[107] LOCAL WRITE RATE      = " << (double) m_cpt_write_local / m_cpt_cycles << std::endl
-                << "[108] REMOTE WRITE RATE     = " << (double) m_cpt_write_remote / m_cpt_cycles << std::endl
-                << "[109] WRITE MISS RATE       = " << (double) m_cpt_write_miss / (m_cpt_write_local + m_cpt_write_remote) << std::endl
-                << "[110] WRITE BURST TOTAL     = " << m_cpt_write_flits_local + m_cpt_write_flits_remote << std::endl
-                << "[111] WRITE BURST AVERAGE   = " << (double) (m_cpt_write_flits_local + m_cpt_write_flits_remote) / (m_cpt_write_local + m_cpt_write_remote) << std::endl
-                << "[112] LOCAL WRITE BURST AV. = " << (double) m_cpt_write_flits_local / (m_cpt_write_local + m_cpt_write_remote) << std::endl
-                << "[113] REMOTE WRITE BURST AV = " << (double) m_cpt_write_flits_remote / (m_cpt_write_local + m_cpt_write_remote) << std::endl
+                << "[115] WRITE TOTAL           = " << m_cpt_write_local + m_cpt_write_remote << std::endl
+                << "[116] WRITE RATE            = " << (double) (m_cpt_write_local + m_cpt_write_remote) / m_cpt_cycles << std::endl
+                << "[117] LOCAL WRITE RATE      = " << (double) m_cpt_write_local / m_cpt_cycles << std::endl
+                << "[118] REMOTE WRITE RATE     = " << (double) m_cpt_write_remote / m_cpt_cycles << std::endl
+                << "[119] WRITE MISS RATE       = " << (double) m_cpt_write_miss / (m_cpt_write_local + m_cpt_write_remote) << std::endl
+                << "[120] WRITE BURST TOTAL     = " << m_cpt_write_flits_local + m_cpt_write_flits_remote << std::endl
+                << "[121] WRITE BURST AVERAGE   = " << (double) (m_cpt_write_flits_local + m_cpt_write_flits_remote) / (m_cpt_write_local + m_cpt_write_remote) << std::endl
+                << "[122] LOCAL WRITE BURST AV. = " << (double) m_cpt_write_flits_local / (m_cpt_write_local + m_cpt_write_remote) << std::endl
+                << "[123] REMOTE WRITE BURST AV = " << (double) m_cpt_write_flits_remote / (m_cpt_write_local + m_cpt_write_remote) << std::endl
                 << std::endl
-                << "[114] UPDATE RATE                = " << (double) m_cpt_update / m_cpt_cycles << std::endl
-                << "[115] AV. UPDATE PER UP REQ      = " << (double) (m_cpt_update_local + m_cpt_update_remote) / m_cpt_update << std::endl
-                << "[116] AV. LOC UPDT PER UP REQ    = " << (double) m_cpt_update_local / m_cpt_update << std::endl
-                << "[117] AV. REMOTE UPDT PER UP REQ = " << (double) m_cpt_update_remote / m_cpt_update << std::endl
+                << "[124] UPDATE RATE                = " << (double) m_cpt_update / m_cpt_cycles << std::endl
+                << "[125] AV. UPDATE PER UP REQ      = " << (double) (m_cpt_update_local + m_cpt_update_remote) / m_cpt_update << std::endl
+                << "[126] AV. LOC UPDT PER UP REQ    = " << (double) m_cpt_update_local / m_cpt_update << std::endl
+                << "[127] AV. REMOTE UPDT PER UP REQ = " << (double) m_cpt_update_remote / m_cpt_update << std::endl
                 << std::endl
-                << "[118] INVAL MULTICAST RATE  = " << (double) m_cpt_minval / m_cpt_cycles << std::endl
-                << "[119] AVE. INVAL PER M_INV  = " << (double) (m_cpt_minval_local + m_cpt_minval_remote) / m_cpt_minval << std::endl
-                << "[120] AV. LOC INV PER M_INV = " << (double) m_cpt_minval_local / m_cpt_minval << std::endl
-                << "[121] AV. REM INV PER M_INV = " << (double) m_cpt_minval_remote / m_cpt_minval << std::endl
+                << "[128] INVAL MULTICAST RATE  = " << (double) m_cpt_minval / m_cpt_cycles << std::endl
+                << "[129] AVE. INVAL PER M_INV  = " << (double) (m_cpt_minval_local + m_cpt_minval_remote) / m_cpt_minval << std::endl
+                << "[130] AV. LOC INV PER M_INV = " << (double) m_cpt_minval_local / m_cpt_minval << std::endl
+                << "[131] AV. REM INV PER M_INV = " << (double) m_cpt_minval_remote / m_cpt_minval << std::endl
                 << std::endl
-                << "[122] INVAL BROADCAST RATE  = " << (double) m_cpt_binval / m_cpt_cycles << std::endl
-                << "[123] WRITE DIRTY RATE      = " << (double) m_cpt_write_dirty / m_cpt_cycles << std::endl
+                << "[132] INVAL BROADCAST RATE  = " << (double) m_cpt_binval / m_cpt_cycles << std::endl
+                << "[133] WRITE DIRTY RATE      = " << (double) m_cpt_write_dirty / m_cpt_cycles << std::endl
                 << std::endl
-                << "[124] CLEANUP RATE          = " << (double) (m_cpt_cleanup_local + m_cpt_cleanup_remote) / m_cpt_cycles << std::endl
-                << "[125] LOCAL CLEANUP RATE    = " << (double) m_cpt_cleanup_local / m_cpt_cycles << std::endl
-                << "[126] REMOTE CLEANUP RATE   = " << (double) m_cpt_cleanup_remote / m_cpt_cycles << std::endl
-                << "[127] LL RATE               = " << (double) (m_cpt_ll_local + m_cpt_ll_remote) / m_cpt_cycles << std::endl
-                << "[128] LOCAL LL RATE         = " << (double) m_cpt_ll_local / m_cpt_cycles << std::endl
-                << "[129] REMOTE LL RATE        = " << (double) m_cpt_ll_remote / m_cpt_cycles << std::endl
-                << "[130] SC RATE               = " << (double) (m_cpt_sc_local + m_cpt_sc_remote) / m_cpt_cycles << std::endl
-                << "[131] LOCAL SC RATE         = " << (double) m_cpt_sc_local / m_cpt_cycles << std::endl
-                << "[132] REMOTE SC RATE        = " << (double) m_cpt_sc_remote / m_cpt_cycles << std::endl
-                << "[133] CAS RATE              = " << (double) (m_cpt_cas_local + m_cpt_cas_remote) / m_cpt_cycles << std::endl
-                << "[134] LOCAL CAS RATE        = " << (double) m_cpt_cas_local / m_cpt_cycles << std::endl
-                << "[135] REMOTE CAS RATE       = " << (double) m_cpt_cas_remote / m_cpt_cycles << std::endl
+                << "[134] CLEANUP RATE          = " << (double) (m_cpt_cleanup_local + m_cpt_cleanup_remote) / m_cpt_cycles << std::endl
+                << "[135] LOCAL CLEANUP RATE    = " << (double) m_cpt_cleanup_local / m_cpt_cycles << std::endl
+                << "[136] REMOTE CLEANUP RATE   = " << (double) m_cpt_cleanup_remote / m_cpt_cycles << std::endl
+                << "[137] LL RATE               = " << (double) (m_cpt_ll_local + m_cpt_ll_remote) / m_cpt_cycles << std::endl
+                << "[138] LOCAL LL RATE         = " << (double) m_cpt_ll_local / m_cpt_cycles << std::endl
+                << "[139] REMOTE LL RATE        = " << (double) m_cpt_ll_remote / m_cpt_cycles << std::endl
+                << "[140] SC RATE               = " << (double) (m_cpt_sc_local + m_cpt_sc_remote) / m_cpt_cycles << std::endl
+                << "[141] LOCAL SC RATE         = " << (double) m_cpt_sc_local / m_cpt_cycles << std::endl
+                << "[142] REMOTE SC RATE        = " << (double) m_cpt_sc_remote / m_cpt_cycles << std::endl
+                << "[143] CAS RATE              = " << (double) (m_cpt_cas_local + m_cpt_cas_remote) / m_cpt_cycles << std::endl
+                << "[144] LOCAL CAS RATE        = " << (double) m_cpt_cas_local / m_cpt_cycles << std::endl
+                << "[145] REMOTE CAS RATE       = " << (double) m_cpt_cas_remote / m_cpt_cycles << std::endl
                 << "[124] MULTI ACK RATE        = " << (double) (m_cpt_multi_ack_hit + m_cpt_multi_ack_miss) / m_cpt_cycles << std::endl
-                << std::endl
                 << std::endl;
         }
@@ -1161,5 +1163,5 @@
         delete [] m_debug_data;
 
-        print_stats();
+        //print_stats();
     }
 
@@ -1385,4 +1387,6 @@
             m_cpt_trt_rb                    = 0 ;                                                                 
             m_cpt_trt_full                  = 0 ;                                                             
+            m_cpt_put                       = 0 ;                                                             
+            m_cpt_get                       = 0 ;                                                             
                                                                                              
             m_cpt_read_fsm_dir_lock         = 0 ;                                                                         
@@ -4804,5 +4808,4 @@
                         bool        ivt_full   = m_ivt.is_full();
 
-                        
                         //r_write_ivt_index = index;
 
@@ -4852,10 +4855,13 @@
                             for(size_t word=0 ; word<m_words ; word++)
                             {
-                                r_write_to_cleanup_be[word]   = r_write_be[word];
-                                r_write_to_cleanup_data[word] = r_write_data[word];
-                                
+                               
                                 if(r_write_state.read() == ENTRY_SHARED)
                                 {
                                     m_cache_data.write(way, set, word, r_write_data[word].read(), r_write_be[word].read());
+                                }
+                                else
+                                {
+                                    r_write_to_cleanup_be[word]   = r_write_be[word];
+                                    r_write_to_cleanup_data[word] = r_write_data[word];
                                 }
                             }
@@ -6328,5 +6334,5 @@
                             << " CLEANUP_DIR_LOCK> Test directory status: "
                             << std::hex
-                            << " line = "         << cleanup_address
+                            << " addr = "         << cleanup_address
                             << " / hit = "        << entry.state
                             << " / way = "        << way
@@ -6538,7 +6544,8 @@
                             }
                         }
-
-                        size_t set = m_y[(addr_t)(cleanup_address)];
-                        m_cache_data.read_line(way, set, r_cleanup_data); 
+                        else //read the cache data for a request getM (the special case)
+                        {
+                            m_cache_data.read_line(way, set, r_cleanup_data); 
+                        }
                     }
                     else
@@ -7495,8 +7502,8 @@
                         addr_t      nline           = m_nline[(addr_t)(m_cmd_cas_addr_fifo.read())];
 
-                        wok = m_ivt.set(false,                  // it's an invalid transaction
-                                        r_cas_is_cnt.read(),     
-                                        true,                   // response required  
-                                        false,                  // no acknowledge required
+                        wok = m_ivt.set(false,   // it's an invalid transaction
+                                        r_cas_is_cnt.read(),   // it's not a broadcast
+                                        true,    // response required  
+                                        false,   // no acknowledge required
                                         srcid,
                                         trdid,
@@ -7530,4 +7537,5 @@
                             // So, the line is still valid in dir.
                             m_cache_data.write(way, set, word, r_cas_wdata.read());
+
                             if(r_cas_cpt.read() == 4)
                                 m_cache_data.write(way, set, word+1, m_cmd_cas_wdata_fifo.read());
@@ -8263,11 +8271,10 @@
                         }
                         // </Activity Counters>
+                        m_cpt_minval++;
+                        // </Activity Counters>
                         r_cc_send_fsm = CC_SEND_CONFIG_INVAL_NLINE;
                         break;
                     }
                     if(r_config_to_cc_send_multi_req.read()) r_config_to_cc_send_multi_req = false;
-                    // <Activity Counters>
-                    m_cpt_minval++;
-                    // </Activity Counters>
                     r_cc_send_fsm = CC_SEND_CONFIG_IDLE;
                     break;
@@ -8330,11 +8337,11 @@
                         }
                         // </Activity Counters>
+                        m_cpt_minval++;
+                        // </Activity Counters>
                         r_cc_send_fsm = CC_SEND_XRAM_RSP_INVAL_NLINE;
                         break;
                     }
                     if(r_xram_rsp_to_cc_send_multi_req.read()) r_xram_rsp_to_cc_send_multi_req = false;
-                    // <Activity Counters>
-                    m_cpt_minval++;
-                    // </Activity Counters>
+
                     r_cc_send_fsm = CC_SEND_XRAM_RSP_IDLE;
                     break;
@@ -8424,4 +8431,7 @@
                         }
                         // </Activity Counters>
+                        if(r_read_to_cc_send_type.read())
+                            m_cpt_minval++;
+                        // </Activity Counters>
                         r_cc_send_fsm = CC_SEND_READ_MULTI_NLINE;
                         break;
@@ -8432,8 +8442,5 @@
                        r_read_to_cc_send_multi_req = false;
                     }
-                    // <Activity Counters>
-                    if(r_read_to_cc_send_type.read())
-                        m_cpt_minval++;
-                    // </Activity Counters>
+
                     r_cc_send_fsm = CC_SEND_READ_IDLE;
                     break;
@@ -8503,4 +8510,6 @@
                         }
                         // </Activity Counters>
+                        m_cpt_minval++;
+                        // </Activity Counters> 
                         r_cc_send_fsm = CC_SEND_WRITE_INVAL_NLINE;
                         break;
@@ -8511,7 +8520,5 @@
                         r_write_to_cc_send_multi_req = false;
                     }
-                    // <Activity Counters>
-                    m_cpt_minval++;
-                    // </Activity Counters>
+
                     r_cc_send_fsm = CC_SEND_WRITE_IDLE;
                     break;
@@ -8547,7 +8554,5 @@
                     // </Activity Counters>
 
-                     // <Activity Counters>
-                    m_cpt_minval++;
-                    // </Activity Counters>                   r_cas_to_cc_send_brdcast_req = false;
+                    r_cas_to_cc_send_brdcast_req = false;
                     r_cc_send_fsm = CC_SEND_CAS_IDLE;
 
@@ -8576,4 +8581,6 @@
                             m_cpt_minval_cost += req_distance(m_cas_to_cc_send_srcid_fifo.read());
                         }
+                        // <Activity Counters>
+                        m_cpt_minval++;
                         // </Activity Counters>
                         r_cc_send_fsm = CC_SEND_CAS_INVAL_NLINE;
@@ -8586,7 +8593,5 @@
                         r_cas_to_cc_send_multi_req = false;
                     }
-                    // <Activity Counters>
-                    m_cpt_minval++;
-                    // </Activity Counters>
+
                     r_cc_send_fsm = CC_SEND_CAS_IDLE;
                     break;
