Index: branches/RWT/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp
===================================================================
--- branches/RWT/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp	(revision 783)
+++ branches/RWT/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp	(revision 787)
@@ -846,7 +846,9 @@
     {
         m_cpt_reset_count         = m_cpt_cycles;
+
         m_cpt_read_local          = 0;
         m_cpt_read_remote         = 0;
         m_cpt_read_cost           = 0;
+
         m_cpt_write_local         = 0;
         m_cpt_write_remote        = 0;
@@ -855,38 +857,48 @@
         m_cpt_write_cost          = 0;
         m_cpt_write_ncc_miss      = 0;
+
         m_cpt_ll_local            = 0;
         m_cpt_ll_remote           = 0;
         m_cpt_ll_cost             = 0;
+
         m_cpt_sc_local            = 0;
         m_cpt_sc_remote           = 0;
         m_cpt_sc_cost             = 0;
+
         m_cpt_cas_local           = 0;
         m_cpt_cas_remote          = 0;
         m_cpt_cas_cost            = 0;
+
         m_cpt_update              = 0;
         m_cpt_update_local        = 0;
         m_cpt_update_remote       = 0;
         m_cpt_update_cost         = 0;
+        
         m_cpt_minval              = 0;
         m_cpt_minval_local        = 0;
         m_cpt_minval_remote       = 0;
         m_cpt_minval_cost         = 0;
+
         m_cpt_binval              = 0;
         m_cpt_write_broadcast     = 0;
+
         m_cpt_cleanup_local       = 0;
         m_cpt_cleanup_remote      = 0;
         m_cpt_cleanup_cost        = 0;
+        m_cpt_cleanup_data_local  = 0;
+        m_cpt_cleanup_data_remote = 0;
+        m_cpt_cleanup_data_cost   = 0;
+
         m_cpt_read_miss           = 0;
         m_cpt_write_miss          = 0;
         m_cpt_write_dirty         = 0;
+        
         m_cpt_trt_rb              = 0;
         m_cpt_trt_full            = 0;
         m_cpt_get                 = 0;
         m_cpt_put                 = 0;
+
         m_cpt_ncc_to_cc_read      = 0;
         m_cpt_ncc_to_cc_write     = 0;
-        m_cpt_cleanup_data_local  = 0;
-        m_cpt_cleanup_data_remote = 0;
-        m_cpt_cleanup_data_cost   = 0;
     }
 
@@ -941,4 +953,5 @@
                 << "[080] BROADCAT INVAL            = " << m_cpt_binval << std::endl
                 << "[081] WRITE BROADCAST           = " << m_cpt_write_broadcast << std::endl
+                << "[082] GETM BROADCAST            = " << "0" << std::endl
                 << std::endl
                 << "[090] LOCAL CLEANUP             = " << m_cpt_cleanup_local << std::endl
@@ -952,4 +965,5 @@
                 << "[101] WRITE MISS                = " << m_cpt_write_miss << std::endl
                 << "[102] WRITE DIRTY               = " << m_cpt_write_dirty << std::endl
+                << "[103] GETM MISS                 = " << "0" << std::endl
                 << std::endl
                 << "[110] RD BLOCKED BY HIT IN TRT  = " << m_cpt_trt_rb << std::endl
@@ -961,56 +975,15 @@
                 << "[140] NCC TO CC (READ)          = " << m_cpt_ncc_to_cc_read << std::endl
                 << "[141] NCC TO CC (WRITE)         = " << m_cpt_ncc_to_cc_write << std::endl
+                << std::endl
+                << "[150] LOCAL GETM                = " << "0" << std::endl
+                << "[151] REMOTE GETM               = " << "0" << std::endl
+                << "[152] GETM COST (FLITS * DIST)  = " << "0" << std::endl
+                << std::endl
+                << "[160] LOCAL INVAL RO            = " << "0" << std::endl
+                << "[161] REMOTE INVAL RO           = " << "0" << std::endl
+                << "[162] INVAL RO COST             = " << "0" << std::endl
                 << std::endl;
         }
 
-        if (stats) {
-            std::cout << "----------------------------------" << std::dec << std::endl;
-            std::cout << "---      Calculated Stats      ---" << std::dec << std::endl;
-            std::cout << "----------------------------------" << std::dec << std::endl;
-            std::cout
-                << "[300] READ TOTAL            = " << m_cpt_read_local + m_cpt_read_remote << std::endl
-                << "[301] READ RATE             = " << (double) (m_cpt_read_local + m_cpt_read_remote) / m_cpt_cycles << std::endl
-                << "[302] LOCAL READ RATE       = " << (double) m_cpt_read_local / m_cpt_cycles << std::endl
-                << "[303] REMOTE READ RATE      = " << (double) m_cpt_read_remote / m_cpt_cycles << std::endl
-                << "[304] READ MISS RATE        = " << (double) m_cpt_read_miss / (m_cpt_read_local + m_cpt_read_remote) << std::endl
-                << std::endl
-                << "[305] WRITE TOTAL           = " << m_cpt_write_local + m_cpt_write_remote << std::endl
-                << "[306] WRITE RATE            = " << (double) (m_cpt_write_local + m_cpt_write_remote) / m_cpt_cycles << std::endl
-                << "[307] LOCAL WRITE RATE      = " << (double) m_cpt_write_local / m_cpt_cycles << std::endl
-                << "[308] REMOTE WRITE RATE     = " << (double) m_cpt_write_remote / m_cpt_cycles << std::endl
-                << "[309] WRITE MISS RATE       = " << (double) m_cpt_write_miss / (m_cpt_write_local + m_cpt_write_remote) << std::endl
-                << "[310] WRITE BURST TOTAL     = " << m_cpt_write_flits_local + m_cpt_write_flits_remote << std::endl
-                << "[311] WRITE BURST AVERAGE   = " << (double) (m_cpt_write_flits_local + m_cpt_write_flits_remote) / (m_cpt_write_local + m_cpt_write_remote) << std::endl
-                << "[312] LOCAL WRITE BURST AV. = " << (double) m_cpt_write_flits_local / (m_cpt_write_local + m_cpt_write_remote) << std::endl
-                << "[313] REMOTE WRITE BURST AV = " << (double) m_cpt_write_flits_remote / (m_cpt_write_local + m_cpt_write_remote) << std::endl
-                << std::endl
-                << "[314] UPDATE RATE                = " << (double) m_cpt_update / m_cpt_cycles << std::endl
-                << "[315] AV. UPDATE PER UP REQ      = " << (double) (m_cpt_update_local + m_cpt_update_remote) / m_cpt_update << std::endl
-                << "[316] AV. LOC UPDT PER UP REQ    = " << (double) m_cpt_update_local / m_cpt_update << std::endl
-                << "[317] AV. REMOTE UPDT PER UP REQ = " << (double) m_cpt_update_remote / m_cpt_update << std::endl
-                << std::endl
-                << "[318] INVAL MULTICAST RATE  = " << (double) m_cpt_minval / m_cpt_cycles << std::endl
-                << "[319] AVE. INVAL PER M_INV  = " << (double) (m_cpt_minval_local + m_cpt_minval_remote) / m_cpt_minval << std::endl
-                << "[320] AV. LOC INV PER M_INV = " << (double) m_cpt_minval_local / m_cpt_minval << std::endl
-                << "[321] AV. REM INV PER M_INV = " << (double) m_cpt_minval_remote / m_cpt_minval << std::endl
-                << std::endl
-                << "[322] INVAL BROADCAST RATE  = " << (double) m_cpt_binval / m_cpt_cycles << std::endl
-                << "[323] WRITE DIRTY RATE      = " << (double) m_cpt_write_dirty / m_cpt_cycles << std::endl
-                << std::endl
-                << "[324] CLEANUP RATE          = " << (double) (m_cpt_cleanup_local + m_cpt_cleanup_remote) / m_cpt_cycles << std::endl
-                << "[325] LOCAL CLEANUP RATE    = " << (double) m_cpt_cleanup_local / m_cpt_cycles << std::endl
-                << "[326] REMOTE CLEANUP RATE   = " << (double) m_cpt_cleanup_remote / m_cpt_cycles << std::endl
-                << "[327] LL RATE               = " << (double) (m_cpt_ll_local + m_cpt_ll_remote) / m_cpt_cycles << std::endl
-                << "[328] LOCAL LL RATE         = " << (double) m_cpt_ll_local / m_cpt_cycles << std::endl
-                << "[329] REMOTE LL RATE        = " << (double) m_cpt_ll_remote / m_cpt_cycles << std::endl
-                << "[330] SC RATE               = " << (double) (m_cpt_sc_local + m_cpt_sc_remote) / m_cpt_cycles << std::endl
-                << "[331] LOCAL SC RATE         = " << (double) m_cpt_sc_local / m_cpt_cycles << std::endl
-                << "[332] REMOTE SC RATE        = " << (double) m_cpt_sc_remote / m_cpt_cycles << std::endl
-                << "[333] CAS RATE              = " << (double) (m_cpt_cas_local + m_cpt_cas_remote) / m_cpt_cycles << std::endl
-                << "[334] LOCAL CAS RATE        = " << (double) m_cpt_cas_local / m_cpt_cycles << std::endl
-                << "[335] REMOTE CAS RATE       = " << (double) m_cpt_cas_remote / m_cpt_cycles << std::endl
-                << std::endl
-                << std::endl;
-        }
     }
 
@@ -1198,4 +1171,5 @@
             m_cpt_read_remote         = 0;
             m_cpt_read_cost           = 0;
+
             m_cpt_write_local         = 0;
             m_cpt_write_remote        = 0;
@@ -1204,22 +1178,30 @@
             m_cpt_write_ncc_miss      = 0;
             m_cpt_write_cost          = 0;
+
             m_cpt_ll_local            = 0;
             m_cpt_ll_remote           = 0;
             m_cpt_ll_cost             = 0;
+
             m_cpt_sc_local            = 0;
             m_cpt_sc_remote           = 0;
             m_cpt_sc_cost             = 0;
+
             m_cpt_cas_local           = 0;
             m_cpt_cas_remote          = 0;
             m_cpt_cas_cost            = 0;
+
             m_cpt_update              = 0;
             m_cpt_update_local        = 0;
             m_cpt_update_remote       = 0;
             m_cpt_update_cost         = 0;
+
             m_cpt_minval              = 0;
             m_cpt_minval_local        = 0;
             m_cpt_minval_remote       = 0;
             m_cpt_minval_cost         = 0;
+
             m_cpt_binval              = 0;
+            m_cpt_write_broadcast     = 0;
+
             m_cpt_cleanup_local       = 0;
             m_cpt_cleanup_remote      = 0;
@@ -1229,13 +1211,19 @@
             m_cpt_cleanup_data_cost   = 0;
 
-
-            m_cpt_read_miss               = 0;
-            m_cpt_write_miss              = 0;
-            m_cpt_write_dirty             = 0;
-            m_cpt_write_broadcast         = 0;
-            m_cpt_trt_rb                  = 0;
-            m_cpt_trt_full                = 0;
-            m_cpt_get                     = 0;
-            m_cpt_put                     = 0;
+            m_cpt_read_miss           = 0;
+            m_cpt_write_miss          = 0;
+            m_cpt_write_dirty         = 0;
+
+            m_cpt_trt_rb              = 0;
+            m_cpt_trt_full            = 0;
+            m_cpt_get                 = 0;
+            m_cpt_put                 = 0;
+
+            m_cpt_ncc_to_cc_read          = 0;
+            m_cpt_ncc_to_cc_write         = 0;
+
+            m_cpt_heap_min_slot_available = m_heap_size;
+            m_cpt_heap_slot_available     = m_heap_size;
+
             m_cpt_dir_unused              = 0;
             m_cpt_upt_unused              = 0;
@@ -1243,46 +1231,13 @@
             m_cpt_heap_unused             = 0;
             m_cpt_trt_unused              = 0;
-            m_cpt_read_fsm_n_dir_lock     = 0;
-            m_cpt_read_fsm_dir_lock       = 0;
-            m_cpt_read_fsm_dir_used       = 0;
-            m_cpt_read_fsm_trt_lock       = 0;
-            m_cpt_read_fsm_heap_lock      = 0;
-            m_cpt_write_fsm_dir_lock      = 0;
-            m_cpt_write_fsm_n_dir_lock    = 0;
-            m_cpt_write_fsm_upt_lock      = 0;
-            m_cpt_write_fsm_heap_lock     = 0;
-            m_cpt_write_fsm_dir_used      = 0;
-            m_cpt_write_fsm_trt_lock      = 0;
-            m_cpt_cas_fsm_n_dir_lock      = 0;
-            m_cpt_cas_fsm_dir_lock        = 0;
-            m_cpt_cas_fsm_upt_lock        = 0;
-            m_cpt_cas_fsm_heap_lock       = 0;
-            m_cpt_cas_fsm_trt_lock        = 0;
-            m_cpt_cas_fsm_dir_used        = 0;
-            m_cpt_xram_rsp_fsm_n_dir_lock = 0;
-            m_cpt_xram_rsp_fsm_dir_lock   = 0;
-            m_cpt_xram_rsp_fsm_trt_lock   = 0;
-            m_cpt_xram_rsp_fsm_upt_lock   = 0;
-            m_cpt_xram_rsp_fsm_heap_lock  = 0;
-            m_cpt_xram_rsp_fsm_dir_used   = 0;
-            m_cpt_cleanup_fsm_dir_lock    = 0;
-            m_cpt_cleanup_fsm_n_dir_lock  = 0;
-            m_cpt_cleanup_fsm_heap_lock   = 0;
-            m_cpt_cleanup_fsm_ivt_lock    = 0;
-            m_cpt_cleanup_fsm_dir_used    = 0;
-            m_cpt_ixr_fsm_trt_lock        = 0;
-            m_cpt_multi_ack_fsm_upt_lock  = 0;
-            m_cpt_read_data_unc           = 0;   
-            m_cpt_read_data_miss_CC       = 0;   
-            m_cpt_read_ins_unc            = 0;        
-            m_cpt_read_ins_miss           = 0;      
-            m_cpt_read_ll_CC              = 0;       
-            m_cpt_read_data_miss_NCC      = 0;        
-            m_cpt_read_ll_NCC             = 0;    
-            m_cpt_ncc_to_cc_read          = 0;      
-            m_cpt_ncc_to_cc_write         = 0;       
-
-            m_cpt_heap_min_slot_available = m_heap_size;
-            m_cpt_heap_slot_available     = m_heap_size;
+
+            // Unused
+            m_cpt_read_data_unc           = 0;
+            m_cpt_read_data_miss_CC       = 0;
+            m_cpt_read_ins_unc            = 0;
+            m_cpt_read_ins_miss           = 0;
+            m_cpt_read_ll_CC              = 0;
+            m_cpt_read_data_miss_NCC      = 0;
+            m_cpt_read_ll_NCC             = 0;
 
             return;
@@ -1900,12 +1855,26 @@
                     // <Activity counters>
                     if (p_vci_tgt.cmd.read() == vci_param_int::CMD_LOCKED_READ) {
-                        if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_ll_local++;
-                        else                                      m_cpt_ll_remote++;
-                        m_cpt_ll_cost += req_distance(p_vci_tgt.srcid.read()); // LL on a single word
+                        if (is_local_req(p_vci_tgt.srcid.read()))
+                        {
+                            m_cpt_ll_local++;
+                        }
+                        else
+                        {
+                            m_cpt_ll_remote++;
+                        }
+                        // (1 (CMD) + 2 (RSP)) VCI flits for LL => 2 + 3 dspin flits
+                        m_cpt_ll_cost += 5 * req_distance(p_vci_tgt.srcid.read()); // LL on a single word
                     }
                     else {
-                        if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_read_local++;
-                        else                                      m_cpt_read_remote++;
-                        m_cpt_read_cost += m_words * req_distance(p_vci_tgt.srcid.read());
+                        if (is_local_req(p_vci_tgt.srcid.read())) 
+                        {
+                            m_cpt_read_local++;
+                        }
+                        else
+                        {
+                            m_cpt_read_remote++;
+                        }
+                        // (1 (CMD) + m_words (RSP)) flits VCI => 2 + m_words + 1 flits dspin
+                        m_cpt_read_cost += (3 + m_words) * req_distance(p_vci_tgt.srcid.read());
                     }
                     // </Activity counters>
@@ -1918,5 +1887,5 @@
                 if(p_vci_tgt.cmdval and m_cmd_write_addr_fifo.wok())
                 {
-
+                    uint32_t plen = p_vci_tgt.plen.read();
 #if DEBUG_MEMC_TGT_CMD
                     if(m_debug)
@@ -1933,10 +1902,18 @@
                     // <Activity counters>
                     if (p_vci_tgt.cmd.read() == vci_param_int::CMD_NOP) {
-                        m_cpt_sc_cost += req_distance(p_vci_tgt.srcid.read());
+                        // (2 (CMD) + 1 (RSP)) flits VCI => 4 + (1 (success) || 2 (failure)) flits dspin
+                        m_cpt_sc_cost += 5 * req_distance(p_vci_tgt.srcid.read());
                     }
                     else {
-                        if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_write_flits_local++;
-                        else                                      m_cpt_write_flits_remote++;
-                        m_cpt_write_cost += req_distance(p_vci_tgt.srcid.read());
+                        if (is_local_req(p_vci_tgt.srcid.read()))
+                        {
+                            m_cpt_write_flits_local++;
+                        }
+                        else 
+                        {
+                            m_cpt_write_flits_remote++;
+                        }
+                        // (burst_size (CMD) + 1 (RSP) flits VCI => 2 + burst_size + 1 flits dspin
+                        m_cpt_write_cost += (3 + (plen >> 2)) * req_distance(p_vci_tgt.srcid.read());
                     }
                     // </Activity counters>
@@ -1945,11 +1922,22 @@
                         // <Activity counters>
                         if (p_vci_tgt.cmd.read() == vci_param_int::CMD_NOP) {
-                            if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_sc_local++;
-                            else                                      m_cpt_sc_remote++;
-
+                            if (is_local_req(p_vci_tgt.srcid.read()))
+                            {
+                                m_cpt_sc_local++;
+                            }
+                            else 
+                            {
+                                m_cpt_sc_remote++;
+                            }
                         }
                         else {
-                            if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_write_local++;
-                            else                                      m_cpt_write_remote++;
+                            if (is_local_req(p_vci_tgt.srcid.read())) 
+                            {
+                                m_cpt_write_local++;
+                            }
+                            else
+                            {
+                                m_cpt_write_remote++;
+                            }
                         }
                         // </Activity counters>
@@ -1985,7 +1973,14 @@
                     if (p_vci_tgt.eop) {
                         // <Activity counters>
-                        if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_cas_local++;
-                        else                                      m_cpt_cas_remote++;
-                        m_cpt_cas_cost += req_distance(p_vci_tgt.srcid.read());
+                        if (is_local_req(p_vci_tgt.srcid.read())) 
+                        {
+                            m_cpt_cas_local++;
+                        }
+                        else
+                        {
+                            m_cpt_cas_remote++;
+                        }
+                        // (2 (CMD) + 1 (RSP)) flits VCI => 4 + (1 (success) || 2 (failure)) flits dspin
+                        m_cpt_cas_cost += 5 * req_distance(p_vci_tgt.srcid.read());
                         // </Activity counters>
                         r_tgt_cmd_fsm = TGT_CMD_IDLE;
@@ -2070,5 +2065,4 @@
             case MULTI_ACK_UPT_LOCK:
                 {
-                    m_cpt_multi_ack_fsm_upt_lock++;
                     // get lock to the UPDATE table
                     if(r_alloc_upt_fsm.read() != ALLOC_UPT_MULTI_ACK)  break;
@@ -2102,5 +2096,4 @@
                             << " entry = "       << r_multi_ack_upt_index.read()
                             << " / rsp_count = " << std::dec << count << std::endl;
-                    m_cpt_multi_ack_fsm_n_upt_lock++;
 #endif
                     break;
@@ -2762,5 +2755,4 @@
                     {
                         r_read_fsm = READ_DIR_LOCK;
-                        m_cpt_read_fsm_n_dir_lock++;
                     }
 
@@ -2769,7 +2761,4 @@
                         std::cout << "  <MEMC " << name() << " READ_DIR_REQ> Requesting DIR lock " << std::endl;
 #endif
-
-                    m_cpt_read_fsm_dir_lock++;
-
                     break;
                 }
@@ -3016,5 +3005,4 @@
                     {
                         r_read_fsm = READ_HEAP_LOCK;
-                        m_cpt_read_fsm_n_heap_lock++;
                     }
 
@@ -3024,7 +3012,4 @@
                             << " Requesting HEAP lock " << std::endl;
 #endif
-
-                    m_cpt_read_fsm_heap_lock++;
-
                     break;
                 }
@@ -3297,10 +3282,6 @@
                                 << " / hit_write = " << hit_write
                                 << " / full = " << !wok << std::endl;
-                        m_cpt_read_fsm_n_trt_lock++;
-#endif
-                    }
-
-                    m_cpt_read_fsm_trt_lock++;
-
+#endif
+                    }
                     break;
                 }
@@ -3821,9 +3802,5 @@
                         if(wok) r_write_fsm = WRITE_UPT_HEAP_LOCK;
                         else    r_write_fsm = WRITE_WAIT;
-                        m_cpt_write_fsm_n_upt_lock++;
-                    }
-
-                    m_cpt_write_fsm_upt_lock++;
-
+                    }
                     break;
                 }
@@ -3841,9 +3818,5 @@
 #endif
                         r_write_fsm = WRITE_UPT_REQ;
-                        m_cpt_write_fsm_n_heap_lock++;
-                    }
-
-                    m_cpt_write_fsm_heap_lock++;
-
+                    }
                     break;
                 }
@@ -4341,7 +4314,4 @@
                             << " / index = " << wok_index << std::endl;
 #endif
-
-                    m_cpt_write_fsm_trt_lock++;
-
                     break;
                 }
@@ -4385,9 +4355,5 @@
                         if(wok) r_write_fsm = WRITE_BC_DIR_INVAL;
                         else    r_write_fsm = WRITE_WAIT;
-                        m_cpt_write_fsm_n_upt_lock++;
-                    }
-
-                    m_cpt_write_fsm_upt_lock++;
-
+                    }
                     break;
                 }
@@ -5000,7 +4966,5 @@
                                 << " / data = " << std::hex << data << std::endl;
 #endif
-                        m_cpt_ixr_fsm_n_trt_lock++;
-                    }
-                    m_cpt_ixr_fsm_trt_lock++;
+                    }
                     break;
                 }
@@ -5074,9 +5038,5 @@
                                 << " Get access to DIR and TRT" << std::endl;
 #endif
-                        m_cpt_xram_rsp_fsm_n_dir_lock++;
-                        m_cpt_xram_rsp_fsm_n_trt_lock++;
-                    }
-                    m_cpt_xram_rsp_fsm_dir_lock++;
-                    m_cpt_xram_rsp_fsm_trt_lock++;
+                    }
                     break;
                 }
@@ -5365,9 +5325,5 @@
                         else if(r_xram_rsp_victim_inval.read())  r_xram_rsp_fsm = XRAM_RSP_INVAL;
                         else                                     r_xram_rsp_fsm = XRAM_RSP_WRITE_DIRTY;
-                        m_cpt_xram_rsp_fsm_n_trt_lock++;
-                    }
-
-                    m_cpt_xram_rsp_fsm_trt_lock++;
-
+                    }
                     break;
                 }
@@ -5477,5 +5433,4 @@
                     {
                         r_xram_rsp_fsm = XRAM_RSP_HEAP_ERASE;
-                        m_cpt_xram_rsp_fsm_n_heap_lock++;
                     }
 
@@ -5485,7 +5440,4 @@
                             << " Requesting HEAP lock" << std::endl;
 #endif
-
-                    m_cpt_xram_rsp_fsm_heap_lock++;
-
                     break;
                 }
@@ -5743,6 +5695,7 @@
                             m_cpt_cleanup_data_remote++;
                         }
-                        m_cpt_cleanup_cost += m_words * req_distance(srcid);
-                        m_cpt_cleanup_data_cost += m_words * req_distance(srcid);
+                        // 2 + m_words flits for cleanup with data
+                        m_cpt_cleanup_cost += (m_words + 2) * req_distance(srcid);
+                        m_cpt_cleanup_data_cost += (m_words + 2)  * req_distance(srcid);
                         // </Activity Counters>
                     }
@@ -5757,5 +5710,6 @@
                             m_cpt_cleanup_remote++;
                         }
-                        m_cpt_cleanup_cost += req_distance(srcid);
+                        // 2 flits for cleanup without data
+                        m_cpt_cleanup_cost += 2 * req_distance(srcid);
                         // </Activity Counters>
                     }
@@ -5813,5 +5767,4 @@
             case CLEANUP_DIR_REQ:   // Get the lock to the directory
                 {
-                    m_cpt_cleanup_fsm_dir_lock++;
                     if(r_alloc_dir_fsm.read() != ALLOC_DIR_CLEANUP) break;
 
@@ -5822,7 +5775,4 @@
                         std::cout << "  <MEMC " << name() << " CLEANUP_DIR_REQ> Requesting DIR lock" << std::endl;
 #endif
-
-                    m_cpt_cleanup_fsm_n_dir_lock++;
-
                     break;
                 }
@@ -6165,5 +6115,4 @@
                     }
 #endif
-                    m_cpt_cleanup_fsm_n_heap_lock++;
                     break;
                 }
@@ -6407,5 +6356,4 @@
                 // invalidate transaction matching the cleanup 
                 {
-                    m_cpt_cleanup_fsm_ivt_lock++;
                     if(r_alloc_ivt_fsm.read() != ALLOC_IVT_CLEANUP) break;
 
@@ -6427,5 +6375,4 @@
                                 << std::endl;
 #endif
-                        m_cpt_cleanup_fsm_n_upt_lock++;
                     }
                     else
@@ -6723,5 +6670,4 @@
                     {
                         r_cas_fsm = CAS_DIR_LOCK;
-                        m_cpt_cas_fsm_n_dir_lock++;
                     }
 
@@ -6734,7 +6680,4 @@
                     }
 #endif
-
-                    m_cpt_cas_fsm_dir_lock++;
-
                     break;
                 }
@@ -6967,9 +6910,5 @@
                                 << " / count = " << nb_copies << std::endl;
 #endif
-                        m_cpt_cas_fsm_n_upt_lock++;
-                    }
-
-                    m_cpt_cas_fsm_upt_lock++;
-
+                    }
                     break;
                 }
@@ -7002,9 +6941,5 @@
 #endif
                         r_cas_fsm = CAS_UPT_REQ;
-                        m_cpt_cas_fsm_n_heap_lock++;
-                    }
-
-                    m_cpt_cas_fsm_heap_lock++;
-
+                    }
                     break;
                 }
@@ -7118,5 +7053,4 @@
                         {
                             r_cas_fsm       = CAS_WAIT;
-                            m_cpt_cas_fsm_n_trt_lock++;
                         }
 
@@ -7127,6 +7061,4 @@
 #endif
                     }
-                    m_cpt_cas_fsm_trt_lock++;
-
                     break;
                 }
@@ -7184,9 +7116,5 @@
                             r_cas_fsm = CAS_WAIT;
                         }
-                        m_cpt_cas_fsm_n_upt_lock++;
-                    }
-
-                    m_cpt_cas_fsm_upt_lock++;
-
+                    }
                     break;
                 }
@@ -7366,9 +7294,5 @@
                             r_cas_fsm       = CAS_MISS_TRT_SET;
                         }
-                        m_cpt_cas_fsm_n_trt_lock++;
-                    }
-
-                    m_cpt_cas_fsm_trt_lock++;
-
+                    }
                     break;
                 }
@@ -7793,4 +7717,5 @@
                     {
                         if(not p_dspin_m2p.read) break;
+
                         // <Activity Counters>
                         if (is_local_req(m_config_to_cc_send_srcid_fifo.read()))
@@ -7802,5 +7727,6 @@
                             m_cpt_minval_remote++;
                         }
-                        m_cpt_minval_cost += req_distance(m_config_to_cc_send_srcid_fifo.read());
+                        // 2 flits for multi inval
+                        m_cpt_minval_cost += 2 * req_distance(m_config_to_cc_send_srcid_fifo.read());
                         // </Activity Counters>
                         r_cc_send_fsm = CC_SEND_CONFIG_INVAL_NLINE;
@@ -7869,5 +7795,6 @@
                             m_cpt_minval_remote++;
                         }
-                        m_cpt_minval_cost += req_distance(m_xram_rsp_to_cc_send_srcid_fifo.read());
+                        // 2 flits for multi inval
+                        m_cpt_minval_cost += 2 * req_distance(m_xram_rsp_to_cc_send_srcid_fifo.read());
                         // </Activity Counters>
                         r_cc_send_fsm = CC_SEND_XRAM_RSP_INVAL_NLINE;
@@ -8022,5 +7949,6 @@
                             m_cpt_update_remote++;
                         }
-                        m_cpt_update_cost += req_distance(m_write_to_cc_send_srcid_fifo.read());
+                        // 2 flits for multi inval
+                        m_cpt_update_cost += 2 * req_distance(m_write_to_cc_send_srcid_fifo.read());
                         // </Activity Counters>
 
@@ -8111,5 +8039,6 @@
                             m_cpt_update_remote++;
                         }
-                        m_cpt_update_cost += req_distance(m_cas_to_cc_send_srcid_fifo.read());
+                        // 2 flits for multi inval
+                        m_cpt_update_cost += 2 * req_distance(m_cas_to_cc_send_srcid_fifo.read());
                         // </Activity Counters>
                         r_cc_send_fsm = CC_SEND_CAS_UPDT_NLINE;
@@ -9126,6 +9055,4 @@
                         m_cpt_dir_unused++;
                 }
-                else
-                    m_cpt_read_fsm_dir_used++;
                 break;
 
@@ -9168,6 +9095,4 @@
                         m_cpt_dir_unused++;
                 }
-                else
-                    m_cpt_write_fsm_dir_used++;
                 break;
 
@@ -9209,6 +9134,4 @@
                         m_cpt_dir_unused++;
                 }
-                else
-                    m_cpt_cas_fsm_dir_used++;
                 break;
 
@@ -9239,6 +9162,4 @@
                         m_cpt_dir_unused++;
                 }
-                else
-                    m_cpt_cleanup_fsm_dir_used++;
                 break;
 
@@ -9267,6 +9188,4 @@
                         m_cpt_dir_unused++;
                 }
-                else
-                    m_cpt_xram_rsp_fsm_dir_used++;
                 break;
 
@@ -9321,6 +9240,4 @@
                         m_cpt_trt_unused++;
                 }
-                else
-                    m_cpt_read_fsm_trt_used++;
                 break;
 
@@ -9363,6 +9280,4 @@
                         m_cpt_trt_unused++;
                 }
-                else
-                    m_cpt_write_fsm_trt_used++;
                 break;
 
@@ -9405,6 +9320,4 @@
                         m_cpt_trt_unused++;
                 }
-                else
-                    m_cpt_cas_fsm_trt_used++;
                 break;
                 ///////////////////////
@@ -9484,6 +9397,4 @@
                         m_cpt_trt_unused++;
                 }
-                else
-                    m_cpt_xram_rsp_fsm_trt_used++;
                 break;
 
@@ -9525,6 +9436,4 @@
                         m_cpt_trt_unused++;
                 }
-                else
-                    m_cpt_ixr_fsm_trt_used++;
                 break;
 
@@ -9654,6 +9563,4 @@
                         m_cpt_heap_unused++;
                 }
-                else
-                    m_cpt_read_fsm_heap_used++;
                 break;
 
@@ -9682,6 +9589,4 @@
                         m_cpt_heap_unused++;
                 }
-                else
-                    m_cpt_write_fsm_heap_used++;
                 break;
 
@@ -9710,6 +9615,4 @@
                         m_cpt_heap_unused++;
                 }
-                else
-                    m_cpt_cas_fsm_heap_used++;
                 break;
 
@@ -9739,6 +9642,4 @@
                         m_cpt_heap_unused++;
                 }
-                else
-                    m_cpt_cleanup_fsm_heap_used++;
                 break;
 
@@ -9789,6 +9690,4 @@
                         m_cpt_heap_unused++;
                 }
-                else
-                    m_cpt_xram_rsp_fsm_heap_used++;
                 break;
 
