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 686)
+++ branches/MESI/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp	(revision 700)
@@ -250,5 +250,5 @@
         "CAS_DIR_HIT_COMPARE",
         "CAS_DIR_HIT_WRITE",
-        "CAS_MULTI_INVAL_IVT_LOCK",
+        "CAS_INVAL_IVT_LOCK",
         "CAS_WAIT",
         "CAS_MULTI_INVAL_HEAP_LOCK",
@@ -256,9 +256,4 @@
         "CAS_HEAP_NEXT",
         "CAS_HEAP_LAST",
-        "CAS_BC_TRT_LOCK",
-        "CAS_BC_IVT_LOCK",
-        "CAS_BC_DIR_INVAL",
-        "CAS_BC_CC_SEND",
-        "CAS_BC_XRAM_REQ",
         "CAS_RSP_FAIL",
         "CAS_RSP_SUCCESS",
@@ -314,10 +309,5 @@
         "ALLOC_TRT_CONFIG"
     };
-//    const char *alloc_upt_fsm_str[] =
-//    {
-//        "ALLOC_UPT_WRITE",
-//        "ALLOC_UPT_CAS",
-//        "ALLOC_UPT_MULTI_ACK"
-//    };
+
     const char *alloc_ivt_fsm_str[] =
     {
@@ -716,5 +706,5 @@
             // LOCAL
 
-            case MEMC_LOCAL_READ_LO   : rdata = m_cpt_read_local        ; break;
+            case MEMC_LOCAL_READ_LO   : rdata = m_cpt_read_miss_local   ; break;
             case MEMC_LOCAL_WRITE_LO  : rdata = m_cpt_write_flits_local ; break;
             case MEMC_LOCAL_LL_LO     : rdata = m_cpt_ll_local          ; break;
@@ -729,5 +719,5 @@
             // REMOTE
 
-            case MEMC_REMOTE_READ_LO  : rdata = m_cpt_read_remote        ; break;
+            case MEMC_REMOTE_READ_LO  : rdata = m_cpt_read_miss_remote   ; break;
             case MEMC_REMOTE_WRITE_LO : rdata = m_cpt_write_flits_remote ; break;
             case MEMC_REMOTE_LL_LO    : rdata = m_cpt_ll_remote          ; break;
@@ -742,5 +732,5 @@
             // COST
 
-            case MEMC_COST_READ_LO    : rdata = m_cpt_read_cost ; break;
+            case MEMC_COST_READ_LO    : rdata = m_cpt_read_miss_cost ; break;
             case MEMC_COST_WRITE_LO   : rdata = m_cpt_write_cost; break;
             case MEMC_COST_LL_LO      : rdata = m_cpt_ll_cost   ; break;
@@ -838,43 +828,151 @@
     {
         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;
-        m_cpt_write_flits_local  = 0;
-        m_cpt_write_flits_remote = 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_cleanup_local      = 0;
-        m_cpt_cleanup_remote     = 0;
-        m_cpt_cleanup_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_ncc_to_cc          = 0;
+
+        m_cpt_read_miss_local           = 0 ; 
+        m_cpt_read_miss_remote          = 0 ; 
+        m_cpt_read_miss_cost            = 0 ;     
+                                                                                 
+        m_cpt_getm_miss_local           = 0 ;     
+        m_cpt_getm_miss_remote          = 0 ;     
+                                                                                         
+        m_cpt_getm_hit_local            = 0 ;     
+        m_cpt_getm_hit_remote           = 0 ;         
+        m_cpt_getm_cost                 = 0 ; 
+                                                                                             
+        m_cpt_write_local               = 0 ;     
+        m_cpt_write_remote              = 0 ;     
+        m_cpt_write_flits_local         = 0 ;         
+        m_cpt_write_flits_remote        = 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_cleanup_local             = 0 ;                             
+        m_cpt_cleanup_remote            = 0 ;                         
+        m_cpt_cleanup_with_data         = 0 ;                             
+        m_cpt_cleanup_cost              = 0 ;                         
+                                                                                     
+        m_cpt_multi_ack_miss            = 0 ;                         
+        m_cpt_multi_ack_hit             = 0 ;                     
+        m_cpt_multi_ack_hit_with_data   = 0 ;                             
+                                                                                     
+                                                 
+        m_cpt_read_miss                 = 0 ;                                     
+        m_cpt_getm_miss                 = 0 ;                                 
+        m_cpt_getm_broadcast            = 0 ;                                     
+        m_cpt_getm_minval               = 0 ;                                     
+        m_cpt_write_miss                = 0 ;                                             
+        m_cpt_write_dirty               = 0 ;                                             
+        m_cpt_write_broadcast           = 0 ;                                                 
+        m_cpt_write_minval              = 0 ;                                         
+        m_cpt_cas_broadcast             = 0 ;                                                 
+        m_cpt_cas_minval                = 0 ;                                                                 
+        m_cpt_cas_miss                  = 0 ;                                                 
+                                                                                     
+        m_cpt_read_locked_rb            = 0 ;                                                                 
+        m_cpt_cas_locked_rb             = 0 ;                                                                 
+        m_cpt_write_locked_rb           = 0 ;                                                                                             
+                                                                                     
+        m_cpt_trt_rb                    = 0 ;                                                                 
+        m_cpt_trt_full                  = 0 ;                                                             
+                                                                                         
+        m_cpt_read_fsm_dir_lock         = 0 ;                                                                         
+        m_cpt_read_fsm_n_dir_lock       = 0 ;                                                                         
+        m_cpt_write_fsm_dir_lock        = 0 ;                                                                 
+        m_cpt_write_fsm_n_dir_lock      = 0 ;                                                                                         
+        m_cpt_xram_rsp_fsm_dir_lock     = 0 ;                                                                             
+        m_cpt_xram_rsp_fsm_n_dir_lock   = 0 ;                                                                 
+        m_cpt_cas_fsm_dir_lock          = 0 ;                                                         
+        m_cpt_cas_fsm_n_dir_lock        = 0 ;                                             
+        m_cpt_cleanup_fsm_dir_lock      = 0 ;                                                         
+        m_cpt_cleanup_fsm_n_dir_lock    = 0 ;                                                     
+        m_cpt_multi_ack_fsm_dir_lock    = 0 ;                                                 
+        m_cpt_multi_ack_fsm_n_dir_lock  = 0 ;                                                     
+                                                                                        
+        m_cpt_dir_unused                = 0 ;                                                             
+        m_cpt_read_fsm_dir_used         = 0 ;                                                             
+        m_cpt_write_fsm_dir_used        = 0 ;                                                     
+        m_cpt_cas_fsm_dir_used          = 0 ;                                             
+        m_cpt_xram_rsp_fsm_dir_used     = 0 ;                                                 
+        m_cpt_cleanup_fsm_dir_used      = 0 ;                                                 
+        m_cpt_multi_ack_fsm_dir_used    = 0 ;                                                         
+                                                                                                                    
+        m_cpt_read_fsm_trt_lock         = 0 ;                                                 
+        m_cpt_write_fsm_trt_lock        = 0 ;                                                         
+        m_cpt_cas_fsm_trt_lock          = 0 ;                                                         
+        m_cpt_xram_rsp_fsm_trt_lock     = 0 ;                                                     
+        m_cpt_ixr_fsm_trt_lock          = 0 ;                                                     
+                                                                                     
+        m_cpt_read_fsm_n_trt_lock       = 0 ;                                             
+        m_cpt_write_fsm_n_trt_lock      = 0 ;                                                         
+        m_cpt_cas_fsm_n_trt_lock        = 0 ;                                                     
+        m_cpt_xram_rsp_fsm_n_trt_lock   = 0 ;                                         
+        m_cpt_ixr_cmd_fsm_n_trt_lock    = 0 ;                                                             
+        m_cpt_ixr_rsp_fsm_n_trt_lock    = 0 ;                                                     
+                                                                                     
+        m_cpt_read_fsm_trt_used         = 0 ;                                                     
+        m_cpt_write_fsm_trt_used        = 0 ;                                                         
+        m_cpt_cas_fsm_trt_used          = 0 ;                                             
+        m_cpt_xram_rsp_fsm_trt_used     = 0 ;                                                     
+        m_cpt_ixr_cmd_fsm_trt_used      = 0 ;                                                 
+        m_cpt_ixr_rsp_fsm_trt_used      = 0 ;                                                     
+        m_cpt_cleanup_fsm_trt_used      = 0 ;                                             
+                                                                                                             
+        m_cpt_trt_unused                = 0 ;                                                 
+                                                                                    
+        m_cpt_cleanup_fsm_ivt_lock      = 0 ;                                             
+        m_cpt_cleanup_fsm_n_ivt_lock    = 0 ;                                                         
+                                                                                     
+        m_cpt_multi_ack_fsm_ivt_lock    = 0 ;                                                 
+        m_cpt_multi_ack_fsm_n_ivt_lock  = 0 ;                                             
+                                                                                    
+        m_cpt_ivt_unused                = 0 ;                             
+                                                                                     
+        m_cpt_read_fsm_heap_lock        = 0 ;                                                     
+        m_cpt_write_fsm_heap_lock       = 0 ;                                                 
+        m_cpt_cas_fsm_heap_lock         = 0 ;                                             
+        m_cpt_cleanup_fsm_heap_lock     = 0 ;                                                         
+        m_cpt_xram_rsp_fsm_heap_lock    = 0 ;                                                             
+        m_cpt_multi_ack_fsm_heap_lock   = 0 ;                                                 
+                                                                                    
+        m_cpt_read_fsm_n_heap_lock      = 0 ;                                                 
+        m_cpt_write_fsm_n_heap_lock     = 0 ;                                             
+        m_cpt_cas_fsm_n_heap_lock       = 0 ;                                                     
+        m_cpt_cleanup_fsm_n_heap_lock   = 0 ;                                                     
+        m_cpt_xram_rsp_fsm_n_heap_lock  = 0 ;                                                         
+        m_cpt_multi_ack_fsm_n_heap_lock = 0 ;                                                         
+                                                                                                                 
+        m_cpt_read_fsm_heap_used        = 0 ;                                                 
+        m_cpt_write_fsm_heap_used       = 0 ;                                                 
+        m_cpt_cas_fsm_heap_used         = 0 ;                                             
+        m_cpt_cleanup_fsm_heap_used     = 0 ;                                         
+        m_cpt_xram_rsp_fsm_heap_used    = 0 ;                                         
+        m_cpt_multi_ack_fsm_heap_used   = 0 ;                                                     
+                                                                                     
+        m_cpt_heap_unused               = 0 ;                     
+        m_cpt_slot_inval                = 0 ;
+    
     }
 
@@ -894,56 +992,72 @@
                 << "[001] NUMBER OF CYCLES          = " << m_cpt_cycles << std::endl
                 << std::endl
-                << "[002] LOCAL READ                = " << m_cpt_read_local << std::endl
-                << "[003] REMOTE READ               = " << m_cpt_read_remote << std::endl
-                << "[004] READ COST (FLITS * DIST)  = " << m_cpt_read_cost << std::endl
+                << "[002] LOCAL READ                = " << m_cpt_read_miss_local << std::endl
+                << "[003] REMOTE READ               = " << m_cpt_read_miss_remote << std::endl
+                << "[004] READ COST (FLITS * DIST)  = " << m_cpt_read_miss_cost << std::endl
                 << 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
+                << "[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
                 << 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
+                << "[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
                 << 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
+                << "[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
                 << 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
+                << "[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
                 << 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
+                << "[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
                 << 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
+                << "[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
                 << std::endl
-                << "[027] BROADCAT INVAL            = " << m_cpt_binval << 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
                 << 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
+                << "[032] BROADCAT INVAL            = " << m_cpt_binval << 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
-                << "[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
+                << "[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
                 << std::endl
-                << "[039] CLEANUP DATA (FLITS)      = " << m_cpt_cleanup_data * 16 << std::endl
-                << "[040] NCC TO CC (READ)          = " << m_cpt_ncc_to_cc_read << std::endl
-                << "[041] NCC TO CC (WRITE)         = " << m_cpt_ncc_to_cc_write << std::endl
-                << "[042] NCC TO CC (TOTAL)         = " << m_cpt_ncc_to_cc << 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
+                << 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
+
                 << std::endl;
         }
@@ -954,9 +1068,22 @@
             std::cout << "----------------------------------" << std::dec << std::endl;
             std::cout
-                << "[100] READ TOTAL            = " << m_cpt_read_local + m_cpt_read_remote << std::endl
-                << "[101] READ RATE             = " << (double) (m_cpt_read_local + m_cpt_read_remote) / m_cpt_cycles << std::endl
-                << "[102] LOCAL READ RATE       = " << (double) m_cpt_read_local / m_cpt_cycles << std::endl
-                << "[103] REMOTE READ RATE      = " << (double) m_cpt_read_remote / m_cpt_cycles << std::endl
-                << "[104] READ MISS RATE        = " << (double) m_cpt_read_miss / (m_cpt_read_local + m_cpt_read_remote) << std::endl
+                << "[100] READ TOTAL            = " << m_cpt_read_miss_local + m_cpt_read_miss_remote << std::endl
+                << "[101] READ RATE             = " << (double) (m_cpt_read_miss_local + m_cpt_read_miss_remote) / m_cpt_cycles << std::endl
+                << "[102] LOCAL READ RATE       = " << (double) m_cpt_read_miss_local / m_cpt_cycles << std::endl
+                << "[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
+ 
                 << std::endl
                 << "[105] WRITE TOTAL           = " << m_cpt_write_local + m_cpt_write_remote << std::endl
@@ -995,4 +1122,5 @@
                 << "[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
+                << "[124] MULTI ACK RATE        = " << (double) (m_cpt_multi_ack_hit + m_cpt_multi_ack_miss) / m_cpt_cycles << std::endl
                 << std::endl
                 << std::endl;
@@ -1187,91 +1315,150 @@
 
             // Activity counters
-            m_cpt_reset_count        = 0;
-            m_cpt_cycles             = 0;
-            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;
-            m_cpt_write_flits_local  = 0;
-            m_cpt_write_flits_remote = 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_cleanup_local      = 0;
-            m_cpt_cleanup_remote     = 0;
-            m_cpt_cleanup_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_dir_unused              = 0;
-            m_cpt_upt_unused              = 0;
-            m_cpt_ivt_unused              = 0;
-            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_read_WTF                = 0;   
-            m_cpt_cleanup_data            = 0;      
-            m_cpt_ncc_to_cc_read          = 0;      
-            m_cpt_ncc_to_cc_write         = 0;       
-            m_cpt_ncc_to_cc               = 0;        
+            m_cpt_reset_count               = 0 ;                    
+            m_cpt_read_miss_local           = 0 ; 
+            m_cpt_read_miss_remote          = 0 ; 
+            m_cpt_read_miss_cost            = 0 ;     
+                                                                                     
+            m_cpt_getm_miss_local           = 0 ;     
+            m_cpt_getm_miss_remote          = 0 ;     
+                                                                                             
+            m_cpt_getm_hit_local            = 0 ;     
+            m_cpt_getm_hit_remote           = 0 ;         
+            m_cpt_getm_cost                 = 0 ; 
+                                                                                                 
+            m_cpt_write_local               = 0 ;     
+            m_cpt_write_remote              = 0 ;     
+            m_cpt_write_flits_local         = 0 ;         
+            m_cpt_write_flits_remote        = 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_cleanup_local             = 0 ;                             
+            m_cpt_cleanup_remote            = 0 ;                         
+            m_cpt_cleanup_with_data         = 0 ;                             
+            m_cpt_cleanup_cost              = 0 ;                         
+                                                                                         
+            m_cpt_multi_ack_miss            = 0 ;                         
+            m_cpt_multi_ack_hit             = 0 ;                     
+            m_cpt_multi_ack_hit_with_data   = 0 ;                             
+                                                                                         
+                                                     
+            m_cpt_read_miss                 = 0 ;                                     
+            m_cpt_getm_miss                 = 0 ;                                 
+            m_cpt_getm_broadcast            = 0 ;                                     
+            m_cpt_getm_minval               = 0 ;                                     
+            m_cpt_write_miss                = 0 ;                                             
+            m_cpt_write_dirty               = 0 ;                                             
+            m_cpt_write_broadcast           = 0 ;                                                 
+            m_cpt_write_minval              = 0 ;                                         
+            m_cpt_cas_broadcast             = 0 ;                                                 
+            m_cpt_cas_minval                = 0 ;                                                                 
+            m_cpt_cas_miss                  = 0 ;                                                 
+                                                                                         
+            m_cpt_read_locked_rb            = 0 ;                                                                 
+            m_cpt_cas_locked_rb             = 0 ;                                                                 
+            m_cpt_write_locked_rb           = 0 ;                                                                                             
+                                                                                         
+            m_cpt_trt_rb                    = 0 ;                                                                 
+            m_cpt_trt_full                  = 0 ;                                                             
+                                                                                             
+            m_cpt_read_fsm_dir_lock         = 0 ;                                                                         
+            m_cpt_read_fsm_n_dir_lock       = 0 ;                                                                         
+            m_cpt_write_fsm_dir_lock        = 0 ;                                                                 
+            m_cpt_write_fsm_n_dir_lock      = 0 ;                                                                                         
+            m_cpt_xram_rsp_fsm_dir_lock     = 0 ;                                                                             
+            m_cpt_xram_rsp_fsm_n_dir_lock   = 0 ;                                                                 
+            m_cpt_cas_fsm_dir_lock          = 0 ;                                                         
+            m_cpt_cas_fsm_n_dir_lock        = 0 ;                                             
+            m_cpt_cleanup_fsm_dir_lock      = 0 ;                                                         
+            m_cpt_cleanup_fsm_n_dir_lock    = 0 ;                                                     
+            m_cpt_multi_ack_fsm_dir_lock    = 0 ;                                                 
+            m_cpt_multi_ack_fsm_n_dir_lock  = 0 ;                                                     
+                                                                                            
+            m_cpt_dir_unused                = 0 ;                                                             
+            m_cpt_read_fsm_dir_used         = 0 ;                                                             
+            m_cpt_write_fsm_dir_used        = 0 ;                                                     
+            m_cpt_cas_fsm_dir_used          = 0 ;                                             
+            m_cpt_xram_rsp_fsm_dir_used     = 0 ;                                                 
+            m_cpt_cleanup_fsm_dir_used      = 0 ;                                                 
+            m_cpt_multi_ack_fsm_dir_used    = 0 ;                                                         
+                                                                                                                        
+            m_cpt_read_fsm_trt_lock         = 0 ;                                                 
+            m_cpt_write_fsm_trt_lock        = 0 ;                                                         
+            m_cpt_cas_fsm_trt_lock          = 0 ;                                                         
+            m_cpt_xram_rsp_fsm_trt_lock     = 0 ;                                                     
+            m_cpt_ixr_fsm_trt_lock          = 0 ;                                                     
+                                                                                         
+            m_cpt_read_fsm_n_trt_lock       = 0 ;                                             
+            m_cpt_write_fsm_n_trt_lock      = 0 ;                                                         
+            m_cpt_cas_fsm_n_trt_lock        = 0 ;                                                     
+            m_cpt_xram_rsp_fsm_n_trt_lock   = 0 ;                                         
+            m_cpt_ixr_cmd_fsm_n_trt_lock    = 0 ;                                                             
+            m_cpt_ixr_rsp_fsm_n_trt_lock    = 0 ;                                                     
+                                                                                         
+            m_cpt_read_fsm_trt_used         = 0 ;                                                     
+            m_cpt_write_fsm_trt_used        = 0 ;                                                         
+            m_cpt_cas_fsm_trt_used          = 0 ;                                             
+            m_cpt_xram_rsp_fsm_trt_used     = 0 ;                                                     
+            m_cpt_ixr_cmd_fsm_trt_used      = 0 ;                                                 
+            m_cpt_ixr_rsp_fsm_trt_used      = 0 ;                                                     
+            m_cpt_cleanup_fsm_trt_used      = 0 ;                                             
+                                                                                                                 
+            m_cpt_trt_unused                = 0 ;                                                 
+                                                                                        
+            m_cpt_cleanup_fsm_ivt_lock      = 0 ;                                             
+            m_cpt_cleanup_fsm_n_ivt_lock    = 0 ;                                                         
+                                                                                         
+            m_cpt_multi_ack_fsm_ivt_lock    = 0 ;                                                 
+            m_cpt_multi_ack_fsm_n_ivt_lock  = 0 ;                                             
+                                                                                        
+            m_cpt_ivt_unused                = 0 ;                             
+                                                                                         
+            m_cpt_read_fsm_heap_lock        = 0 ;                                                     
+            m_cpt_write_fsm_heap_lock       = 0 ;                                                 
+            m_cpt_cas_fsm_heap_lock         = 0 ;                                             
+            m_cpt_cleanup_fsm_heap_lock     = 0 ;                                                         
+            m_cpt_xram_rsp_fsm_heap_lock    = 0 ;                                                             
+            m_cpt_multi_ack_fsm_heap_lock   = 0 ;                                                 
+                                                                                        
+            m_cpt_read_fsm_n_heap_lock      = 0 ;                                                 
+            m_cpt_write_fsm_n_heap_lock     = 0 ;                                             
+            m_cpt_cas_fsm_n_heap_lock       = 0 ;                                                     
+            m_cpt_cleanup_fsm_n_heap_lock   = 0 ;                                                     
+            m_cpt_xram_rsp_fsm_n_heap_lock  = 0 ;                                                         
+            m_cpt_multi_ack_fsm_n_heap_lock = 0 ;                                                         
+                                                                                                                     
+            m_cpt_read_fsm_heap_used        = 0 ;                                                 
+            m_cpt_write_fsm_heap_used       = 0 ;                                                 
+            m_cpt_cas_fsm_heap_used         = 0 ;                                             
+            m_cpt_cleanup_fsm_heap_used     = 0 ;                                         
+            m_cpt_xram_rsp_fsm_heap_used    = 0 ;                                         
+            m_cpt_multi_ack_fsm_heap_used   = 0 ;                                                     
+                                                                                         
+            m_cpt_heap_unused               = 0 ;                     
+            m_cpt_slot_inval                = 0 ;
             return;
         }
@@ -1830,7 +2017,24 @@
                     }
                     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 ((p_vci_tgt.pktid.read() & 0x7) == TYPE_WRITE)
+                        {
+                            if ((p_vci_tgt.pktid.read() & 0x8) == 0x8)
+                            {
+                                if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_getm_hit_local++;
+                                else                                      m_cpt_getm_hit_remote++;
+                            }
+                            else
+                            {
+                                if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_getm_miss_local++;
+                                else                                      m_cpt_getm_miss_remote++;
+                            }
+                            m_cpt_getm_cost += req_distance(p_vci_tgt.srcid.read());
+                        }
+                        else
+                        {
+                            if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_read_miss_local++;
+                            else                                      m_cpt_read_miss_remote++;
+                            m_cpt_read_miss_cost += req_distance(p_vci_tgt.srcid.read());
+                        }
                     }
                     // </Activity counters>
@@ -1963,4 +2167,9 @@
                     r_multi_ack_miss_updt = miss_updt;
 
+                    if(miss_updt)
+                        m_cpt_multi_ack_miss ++;
+                    else
+                        m_cpt_multi_ack_hit ++;
+
                     if( not eop)
                     {
@@ -1968,4 +2177,5 @@
                         r_multi_ack_need_data = true;
                         r_multi_ack_data_index = 0;
+                        m_cpt_multi_ack_hit_with_data ++;
                     }
                     else
@@ -2028,5 +2238,9 @@
             case MULTI_ACK_IVT_LOCK:
                 {
+                    m_cpt_multi_ack_fsm_ivt_lock ++;
                     if(r_alloc_ivt_fsm.read() != ALLOC_IVT_MULTI_ACK)  break;
+
+                    m_cpt_multi_ack_fsm_n_ivt_lock ++;
+
                     assert( r_alloc_dir_fsm.read() == ALLOC_DIR_MULTI_ACK && " BAD ALLOC_DIR_MULTI_ACK IN MULTI_ACK_IVT_LOCK STATE");
                     size_t index  = r_multi_ack_ivt_index.read();
@@ -2090,8 +2304,10 @@
             case MULTI_ACK_DIR_REQ:   // Get the lock to the directory
                 {
+                    m_cpt_multi_ack_fsm_dir_lock ++;
                     if(r_alloc_dir_fsm.read() != ALLOC_DIR_MULTI_ACK) break;
 
                     r_multi_ack_fsm = MULTI_ACK_IVT_LOCK;
                     //std::cout << " MEM_CACHE : CLEANUP_DIR_REQ" << std::endl;
+                    m_cpt_multi_ack_fsm_n_dir_lock ++;
 
 #if DEBUG_MEMC_CLEANUP
@@ -2333,8 +2549,11 @@
             case MULTI_ACK_HEAP_REQ:    // Get the lock to the HEAP directory
                 {
+                    m_cpt_multi_ack_fsm_n_heap_lock ++;
                     if(r_alloc_heap_fsm.read() == ALLOC_HEAP_MULTI_ACK)
                     {
                         r_multi_ack_fsm = MULTI_ACK_HEAP_LOCK;
                     }
+
+                    m_cpt_multi_ack_fsm_heap_lock ++;
 #if DEBUG_MEMC_MULTI_ACK
                     if(m_debug)
@@ -3173,4 +3392,5 @@
                     else if(entry.state == ENTRY_LOCKED) // the line is locked, can't use it at this time
                     {
+                        m_cpt_read_locked_rb ++;
                         r_read_fsm = READ_WAIT;
                     }
@@ -3287,4 +3507,9 @@
                                  cmd_read_fifo_get = true;
                             }    
+
+                            if(multi_req)
+                                m_cpt_getm_minval ++;
+                            else
+                                m_cpt_getm_broadcast ++;
 #if DEBUG_MEMC_READ
                             if(m_debug)
@@ -3850,5 +4075,10 @@
                         else                  // missing line is requested to the XRAM
                         {
-                            m_cpt_read_miss++;
+
+                            if ( (m_cmd_read_pktid_fifo.read() & 0x7) == TYPE_WRITE )
+                                m_cpt_getm_miss ++;
+                            else
+                                m_cpt_read_miss++;
+
                             r_read_trt_index = index;
                             r_read_fsm       = READ_TRT_SET;
@@ -4059,5 +4289,9 @@
                     // Get the lock to the directory
                     // and access the llsc_global_table
-                    if (r_alloc_dir_fsm.read() != ALLOC_DIR_WRITE ) break;
+                    if (r_alloc_dir_fsm.read() != ALLOC_DIR_WRITE ) 
+                    {
+                        m_cpt_write_fsm_n_dir_lock ++;
+                        break;
+                    }
 
                     if ((r_write_pktid.read() & 0x7) == TYPE_SC)
@@ -4087,4 +4321,6 @@
                         r_write_fsm = WRITE_DIR_LOCK;
                     }
+
+                    m_cpt_write_fsm_dir_lock ++;
 
 #if DEBUG_MEMC_WRITE
@@ -4129,4 +4365,5 @@
                             else if (entry.state == ENTRY_LOCKED)//the line is locked
                             {
+                                m_cpt_write_locked_rb ++;
                                 r_write_fsm = WRITE_WAIT;
                             }
@@ -4439,4 +4676,5 @@
                         }
 
+                        m_cpt_write_fsm_n_trt_lock ++;
                         assert(false && "VCI_MEM_CACHE ERROR: this part must not be reached");
                     }
@@ -4582,6 +4820,9 @@
                                             false,       // is a command write
                                             index);
-                         /*//   std::cout << " trt wait nline =" << std::hex << nline 
-                                     << " write data " << std::hex << std::endl;*/
+
+                            if(is_brdcast)
+                                m_cpt_write_broadcast ++;
+                            else
+                                m_cpt_write_minval ++;
 #if DEBUG_MEMC_WRITE
                         if( m_debug and wok )
@@ -4627,5 +4868,4 @@
                     }
 
-                    m_cpt_write_fsm_upt_lock++;
 
                     break;
@@ -4844,4 +5084,5 @@
                         for( size_t i=0 ; i<m_words ; i++ ) r_ixr_cmd_wdata[i] = entry.wdata[i];
 
+                        m_cpt_ixr_cmd_fsm_n_trt_lock ++;
 #if DEBUG_MEMC_IXR_CMD
                         if(m_debug)
@@ -5142,4 +5383,5 @@
                         }
 
+                        m_cpt_ixr_rsp_fsm_n_trt_lock ++;
 #if DEBUG_MEMC_IXR_RSP
                         if(m_debug)
@@ -5183,5 +5425,5 @@
                                 << " / data = " << std::hex << data << std::endl;
 #endif
-                        m_cpt_ixr_fsm_n_trt_lock++;
+                        m_cpt_ixr_rsp_fsm_n_trt_lock ++;
                     }
                     m_cpt_ixr_fsm_trt_lock++;
@@ -5481,4 +5723,7 @@
 
                         r_xram_rsp_ivt_index = index;
+
+                        m_cpt_slot_inval ++;
+
                         assert( wok and
                                 "MEMC ERROR in XRAM_RSP_DIR_UPDT state: IVT should not be full"); 
@@ -5915,4 +6160,5 @@
                         r_cleanup_data_index    = 0;
                         r_cleanup_contains_data = true;
+                        m_cpt_cleanup_with_data ++;
                     }
                     else
@@ -5976,5 +6222,4 @@
                         if (r_cleanup_data_index.read() == m_words - 1)
                         {
-                            m_cpt_cleanup_data ++;
                             r_cleanup_fsm = CLEANUP_DIR_REQ;
                         }
@@ -6187,4 +6432,6 @@
                 {
                     //Search for a matching inval in the ivt (there must be one) and check if there is a pending read or cas.
+
+                    m_cpt_cleanup_fsm_ivt_lock++;
                     if(r_alloc_ivt_fsm.read() == ALLOC_IVT_CLEANUP)
                     {
@@ -6454,4 +6701,5 @@
                 {
                     // get the lock to the HEAP directory
+                    m_cpt_cleanup_fsm_heap_lock ++;
                     if(r_alloc_heap_fsm.read() != ALLOC_HEAP_CLEANUP) break;
 
@@ -6711,4 +6959,6 @@
                     bool   match_inval;
 
+                    m_cpt_cleanup_fsm_n_ivt_lock++;
+
                     match_inval = m_ivt.search_inval(r_cleanup_nline.read(), index);
                     if ( not match_inval )     // no pending inval
@@ -6725,5 +6975,5 @@
                                 << std::endl;
 #endif
-                        m_cpt_cleanup_fsm_n_upt_lock++;
+                        m_cpt_cleanup_fsm_n_ivt_lock++;
                     }
                     else
@@ -7058,8 +7308,17 @@
                     r_cas_count      = entry.count;
                     
-                    if(entry.state == ENTRY_LOCKED)  r_cas_fsm = CAS_WAIT;
-                    else if(entry.state == ENTRY_INVALID)  r_cas_fsm = CAS_MISS_TRT_LOCK;
-                    else  r_cas_fsm = CAS_DIR_HIT_READ;
-
+                    if(entry.state == ENTRY_LOCKED)  
+                    {
+                        r_cas_fsm = CAS_WAIT;
+                        m_cpt_cas_locked_rb ++;
+                    }
+                    else if(entry.state == ENTRY_INVALID)  
+                    {
+                        r_cas_fsm = CAS_MISS_TRT_LOCK;
+                    }
+                    else
+                    {  
+                        r_cas_fsm = CAS_DIR_HIT_READ;
+                    }
 #if DEBUG_MEMC_CAS
                     if(m_debug)
@@ -7184,5 +7443,5 @@
                         else                         
                         {
-                            r_cas_fsm = CAS_MULTI_INVAL_IVT_LOCK;       // multi invalidate required
+                            r_cas_fsm = CAS_INVAL_IVT_LOCK;       // multi invalidate required
 #if DEBUG_MEMC_CAS
                             if(m_debug)
@@ -7220,5 +7479,5 @@
                 }
                 /////////////////
-            case CAS_MULTI_INVAL_IVT_LOCK:  // try to register the transaction in ivt
+            case CAS_INVAL_IVT_LOCK:  // try to register the transaction in ivt
                 // and write data in cache if successful registration
                 // releases locks to retry later if ivt full
@@ -7236,8 +7495,8 @@
                         addr_t      nline           = m_nline[(addr_t)(m_cmd_cas_addr_fifo.read())];
 
-                        wok = m_ivt.set(false,   // it's an invalid transaction
-                                        false,   // it's not a broadcast
-                                        true,    // response required  
-                                        false,   // no acknowledge required
+                        wok = m_ivt.set(false,                  // it's an invalid transaction
+                                        r_cas_is_cnt.read(),     
+                                        true,                   // response required  
+                                        false,                  // no acknowledge required
                                         srcid,
                                         trdid,
@@ -7274,4 +7533,9 @@
                                 m_cache_data.write(way, set, word+1, m_cmd_cas_wdata_fifo.read());
 
+                            if(r_cas_is_cnt.read())
+                                m_cpt_cas_broadcast ++;
+                            else
+                                m_cpt_cas_minval ++;
+
                             //r_cas_ivt_index = index;
                             if((r_cas_count.read() != 1) and not r_cas_is_cnt.read())
@@ -7296,6 +7560,4 @@
                          
                                 r_cas_to_cc_send_nline        = m_nline[(addr_t)(m_cmd_cas_addr_fifo.read())];
-                                //r_cas_to_cleanup_req          = true;
-                                //r_cas_to_cleanup_nline        = m_nline[(addr_t)(m_cmd_cas_addr_fifo.read())];
                                 r_cas_fsm        = CAS_IDLE; 
                                 cmd_cas_fifo_get = true;
@@ -7306,5 +7568,5 @@
                         if(m_debug)
                             std::cout << "  <MEMC " << name()
-                                << " CAS_MULTI_INVAL_IVT_LOCK> Line is locked"
+                                << " CAS_INVAL_IVT_LOCK> Line is locked"
                                 << " / wok = " << wok
                                 << " / set = " << set
@@ -7472,196 +7734,5 @@
                     break;
                 }
-
-
                 /////////////////////
-            case CAS_BC_TRT_LOCK:      // check the TRT to register a PUT transaction
-                {
-                    assert( (r_alloc_dir_fsm.read() == ALLOC_DIR_CAS) and
-                            "MEMC ERROR in CAS_BC_TRT_LOCK state: Bas DIR allocation");
-
-                    if(r_alloc_trt_fsm.read() == ALLOC_TRT_CAS)
-                    {
-                        size_t wok_index = 0;
-                        bool   wok       = !m_trt.full(wok_index);
-                        if( wok )
-                        {
-                            r_cas_trt_index = wok_index;
-                            r_cas_fsm       = CAS_BC_IVT_LOCK;
-                        }
-                        else
-                        {
-                            r_cas_fsm       = CAS_WAIT;
-                            m_cpt_cas_fsm_n_trt_lock++;
-                        }
-
-#if DEBUG_MEMC_CAS
-                        if(m_debug)
-                            std::cout << "  <MEMC " << name() << " CAS_BC_TRT_LOCK> Check TRT"
-                                << " : wok = " << wok << " / index = " << wok_index << std::endl;
-#endif
-                    }
-                    m_cpt_cas_fsm_trt_lock++;
-
-                    break;
-                }
-                /////////////////////
-            case CAS_BC_IVT_LOCK:  // register a broadcast inval transaction in IVT
-                // write data in cache in case of successful registration
-                {
-                    if(r_alloc_ivt_fsm.read() == ALLOC_IVT_CAS)
-                    {
-                        bool        wok       = false;
-                        size_t      index     = 0;
-                        size_t      srcid     = m_cmd_cas_srcid_fifo.read();
-                        size_t      trdid     = m_cmd_cas_trdid_fifo.read();
-                        size_t      pktid     = m_cmd_cas_pktid_fifo.read();
-                        addr_t      nline     = m_nline[(addr_t)(m_cmd_cas_addr_fifo.read())];
-                        size_t      nb_copies = r_cas_count.read();
-
-                        // register a broadcast inval transaction in IVT
-                        wok = m_ivt.set(false,  // it's an inval transaction
-                                        true,   // it's a broadcast
-                                        true,   // response required
-                                        false,  // no acknowledge required
-                                        srcid,
-                                        trdid,
-                                        pktid,
-                                        nline,
-                                        nb_copies,
-                                        false,  // is a command write
-                                        index);
-
-                        if(wok)     // IVT not full
-                        {
-                            // cache update
-                            size_t way  = r_cas_way.read();
-                            size_t set  = m_y[(addr_t)(m_cmd_cas_addr_fifo.read())];
-                            size_t word = m_x[(addr_t)(m_cmd_cas_addr_fifo.read())];
-
-                            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());
-
-                            r_cas_ivt_index = index;
-                            r_cas_fsm = CAS_BC_DIR_INVAL;
-
-#if DEBUG_MEMC_CAS
-                            if(m_debug)
-                                std::cout << "  <MEMC " << name()
-                                    << " CAS_BC_IVT_LOCK> Register a broadcast inval transaction in IVT"
-                                    << " / nline = " << std::hex << nline
-                                    << " / count = " << std::dec << nb_copies
-                                    << " / ivt_index = " << index << std::endl;
-#endif
-                        }
-                        else      //  releases the lock protecting IVT
-                        {
-                            r_cas_fsm = CAS_WAIT;
-                        }
-                        m_cpt_cas_fsm_n_upt_lock++;
-                    }
-
-                    m_cpt_cas_fsm_upt_lock++;
-
-                    break;
-                }
-                //////////////////////
-            case CAS_BC_DIR_INVAL:  // Register the PUT transaction in TRT, and inval the DIR entry
-                {
-                    assert( (r_alloc_dir_fsm.read() == ALLOC_DIR_CAS) and
-                            "MEMC ERROR in CAS_BC_DIR_INVAL state: Bad DIR allocation");
-
-                    assert( (r_alloc_trt_fsm.read() == ALLOC_TRT_CAS) and
-                            "MEMC ERROR in CAS_BC_DIR_INVAL state: Bad TRT allocation");
-
-                    assert( (r_alloc_ivt_fsm.read() == ALLOC_IVT_CAS) and
-                            "MEMC ERROR in CAS_BC_DIR_INVAL state: Bad IVT allocation");
-
-                    std::vector<data_t> data_vector;
-                    data_vector.clear();
-                    size_t word = m_x[(addr_t)(m_cmd_cas_addr_fifo.read())];
-
-                    for(size_t i=0; i<m_words; i++)
-                    {
-                        if(i == word)                                        // first modified word
-                            data_vector.push_back( r_cas_wdata.read() );     
-                        else if((i == word+1) and (r_cas_cpt.read() == 4))   // second modified word
-                            data_vector.push_back( m_cmd_cas_wdata_fifo.read() );
-                        else                                                 // unmodified words
-                            data_vector.push_back( r_cas_data[i].read() );
-                    }
-                    m_trt.set( r_cas_trt_index.read(),
-                               false,    // PUT request 
-                               m_nline[(addr_t)(m_cmd_cas_addr_fifo.read())],
-                               0,
-                               0,
-                               0,
-                               false,    // not a processor read
-                               0,
-                               0,
-                               std::vector<be_t> (m_words,0),
-                               data_vector );
-
-                    // invalidate directory entry
-                    DirectoryEntry entry;
-                    entry.state         = ENTRY_INVALID;
-                    entry.dirty         = false;
-                    entry.tag           = 0;
-                    entry.is_cnt        = false;
-                    entry.lock          = false;
-                    entry.count         = 0;
-                    entry.owner.srcid   = 0;
-                    entry.owner.inst    = false;
-                    entry.ptr           = 0;
-                    size_t set          = m_y[(addr_t)(m_cmd_cas_addr_fifo.read())];
-                    size_t way          = r_cas_way.read();
-                    m_cache_directory.write(set, way, entry);
-
-                    r_cas_fsm = CAS_BC_CC_SEND;
-
-#if DEBUG_MEMC_CAS
-                    if(m_debug)
-                        std::cout << "  <MEMC " << name() << " CAS_BC_DIR_INVAL> Inval DIR & register in TRT:"
-                            << " address = " << m_cmd_cas_addr_fifo.read() << std::endl;
-#endif
-                    break;
-                }
-                ///////////////////
-            case CAS_BC_CC_SEND:  // Request the broadcast inval to CC_SEND FSM
-                {
-                    if( not r_cas_to_cc_send_multi_req.read() and
-                            not r_cas_to_cc_send_brdcast_req.read())
-                    {
-                        r_cas_to_cc_send_multi_req    = false;
-                        r_cas_to_cc_send_brdcast_req  = true;
-                        r_cas_to_cc_send_nline        = m_nline[(addr_t)(m_cmd_cas_addr_fifo.read())];
-
-                        r_cas_fsm = CAS_BC_XRAM_REQ;
-                    }
-                    break;
-                }
-                ////////////////////
-            case CAS_BC_XRAM_REQ: // request the IXR FSM to start a put transaction
-                {
-                    if( not r_cas_to_ixr_cmd_req.read() )
-                    {
-                        r_cas_to_ixr_cmd_req     = true;
-                        r_cas_to_ixr_cmd_index   = r_cas_trt_index.read();
-                        r_cas_fsm                = CAS_IDLE;
-                        cmd_cas_fifo_get         = true;
-                        r_cas_cpt                = 0;
-
-#if DEBUG_MEMC_CAS
-                        if(m_debug)
-                            std::cout << "  <MEMC " << name()
-                                << " CAS_BC_XRAM_REQ> Request a PUT transaction to IXR_CMD FSM" << std::hex
-                                << " / address = " << (addr_t) m_cmd_cas_addr_fifo.read()
-                                << " / trt_index = " << r_cas_trt_index.read() << std::endl;
-#endif
-                    }
-
-                    break;
-                }
-                /////////////////
             case CAS_RSP_FAIL:  // request TGT_RSP FSM to send a failure response
                 {
@@ -7738,4 +7809,5 @@
                             r_cas_trt_index = index;
                             r_cas_fsm       = CAS_MISS_TRT_SET;
+                            m_cpt_cas_miss ++;
                         }
                         m_cpt_cas_fsm_n_trt_lock++;
@@ -8312,4 +8384,7 @@
                 {
                     if(not p_dspin_m2p.read) break;
+                    // <Activity Counters>
+                    m_cpt_binval++;
+                    // </Activity Counters>
                     r_cc_send_fsm = CC_SEND_READ_BRDCAST_NLINE;
                     break;
@@ -8327,4 +8402,26 @@
                     {
                         if(not p_dspin_m2p.read) break;
+                        // <Activity Counters>
+                        if (is_local_req(m_read_to_cc_send_srcid_fifo.read()))
+                        {
+                            if(r_read_to_cc_send_type.read())
+                                m_cpt_minval_local ++;
+                            else
+                                m_cpt_update_local ++;
+                        }
+                        else
+                        {
+                            if(r_read_to_cc_send_type.read())
+                            {
+                                m_cpt_minval_remote++;
+                                m_cpt_minval_cost += req_distance(m_read_to_cc_send_srcid_fifo.read());
+                            }
+                            else
+                            {
+                                m_cpt_update_remote++;
+                                m_cpt_update_cost += req_distance(m_read_to_cc_send_srcid_fifo.read());
+                            }
+                        }
+                        // </Activity Counters>
                         r_cc_send_fsm = CC_SEND_READ_MULTI_NLINE;
                         break;
@@ -8335,5 +8432,8 @@
                        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;
@@ -8392,4 +8492,15 @@
                     {
                         if(not p_dspin_m2p.read) break;
+                        // <Activity Counters>
+                        if (is_local_req(m_write_to_cc_send_srcid_fifo.read()))
+                        {
+                            m_cpt_minval_local++;
+                        }
+                        else
+                        {
+                            m_cpt_minval_remote++;
+                            m_cpt_minval_cost += req_distance(m_write_to_cc_send_srcid_fifo.read());
+                        }
+                        // </Activity Counters>
                         r_cc_send_fsm = CC_SEND_WRITE_INVAL_NLINE;
                         break;
@@ -8400,7 +8511,6 @@
                         r_write_to_cc_send_multi_req = false;
                     }
-
                     // <Activity Counters>
-                    m_cpt_update++;
+                    m_cpt_minval++;
                     // </Activity Counters>
                     r_cc_send_fsm = CC_SEND_WRITE_IDLE;
@@ -8437,5 +8547,7 @@
                     // </Activity Counters>
 
-                    r_cas_to_cc_send_brdcast_req = false;
+                     // <Activity Counters>
+                    m_cpt_minval++;
+                    // </Activity Counters>                   r_cas_to_cc_send_brdcast_req = false;
                     r_cc_send_fsm = CC_SEND_CAS_IDLE;
 
@@ -8454,4 +8566,15 @@
                     {
                         if(not p_dspin_m2p.read) break;
+                        // <Activity Counters>
+                        if (is_local_req(m_cas_to_cc_send_srcid_fifo.read()))
+                        {
+                            m_cpt_minval_local++;
+                        }
+                        else
+                        {
+                            m_cpt_minval_remote++;
+                            m_cpt_minval_cost += req_distance(m_cas_to_cc_send_srcid_fifo.read());
+                        }
+                        // </Activity Counters>
                         r_cc_send_fsm = CC_SEND_CAS_INVAL_NLINE;
                         break;
@@ -8463,5 +8586,7 @@
                         r_cas_to_cc_send_multi_req = false;
                     }
-
+                    // <Activity Counters>
+                    m_cpt_minval++;
+                    // </Activity Counters>
                     r_cc_send_fsm = CC_SEND_CAS_IDLE;
                     break;
@@ -8902,36 +9027,4 @@
                             r_read_to_tgt_rsp_req = false;
                             r_tgt_rsp_fsm         = TGT_RSP_READ_IDLE;
-                            if (r_read_to_tgt_rsp_pktid.read() == 0x0)
-                            {
-                                m_cpt_read_data_unc ++;
-                            }
-                            else if (r_read_to_tgt_rsp_pktid.read() == 0x1)
-                            {
-                                m_cpt_read_data_miss_CC ++;
-                            }
-                            else if (r_read_to_tgt_rsp_pktid.read() == 0x2)
-                            {
-                                m_cpt_read_ins_unc ++;
-                            }
-                            else if (r_read_to_tgt_rsp_pktid.read() == 0x3)
-                            {
-                                m_cpt_read_ins_miss ++;
-                            }
-                            else if (r_read_to_tgt_rsp_pktid.read() == 0x6)
-                            {
-                                m_cpt_read_ll_CC ++;
-                            }
-                            else if (r_read_to_tgt_rsp_pktid.read() == 0x9)
-                            {
-                                m_cpt_read_data_miss_NCC ++;
-                            }
-                            else if (r_read_to_tgt_rsp_pktid.read() == 0x14)
-                            {
-                                m_cpt_read_ll_NCC ++;
-                            }
-                            else
-                            {
-                                m_cpt_read_WTF ++;
-                            }
                         }
                         else
@@ -8994,38 +9087,4 @@
                             r_cleanup_to_tgt_rsp_req    = false;
                             r_tgt_rsp_key_sent          = false;
-
-                            if (r_cleanup_to_tgt_rsp_pktid.read() == 0x0)
-                            {
-                                m_cpt_read_data_unc ++;
-                            }
-                            else if (r_cleanup_to_tgt_rsp_pktid.read() == 0x1)
-                            {
-                                m_cpt_read_data_miss_CC ++;
-                            }
-                            else if (r_cleanup_to_tgt_rsp_pktid.read() == 0x2)
-                            {
-                                m_cpt_read_ins_unc ++;
-                            }
-                            else if (r_cleanup_to_tgt_rsp_pktid.read() == 0x3)
-                            {
-                                m_cpt_read_ins_miss ++;
-                            }
-                            else if (r_cleanup_to_tgt_rsp_pktid.read() == 0x6)
-                            {
-                                m_cpt_read_ll_CC ++;
-                            }
-                            else if (r_cleanup_to_tgt_rsp_pktid.read() == 0x9)
-                            {
-                                m_cpt_read_data_miss_NCC ++;
-                            }
-                            else if (r_cleanup_to_tgt_rsp_pktid.read() == 0x14)
-                            {
-                                m_cpt_read_ll_NCC ++;
-                            }
-                            else if (!r_cleanup_to_tgt_rsp_type.read())
-                            {
-                                m_cpt_read_WTF ++;
-                            }
-
                         }
                         else
@@ -9090,39 +9149,4 @@
                             r_xram_rsp_to_tgt_rsp_req = false;
                             r_tgt_rsp_fsm             = TGT_RSP_XRAM_IDLE;
-
-
-                            if (r_xram_rsp_to_tgt_rsp_pktid.read() == 0x0)
-                            {
-                                m_cpt_read_data_unc ++;
-                            }
-                            else if (r_xram_rsp_to_tgt_rsp_pktid.read() == 0x1)
-                            {
-                                m_cpt_read_data_miss_CC ++;
-                            }
-                            else if (r_xram_rsp_to_tgt_rsp_pktid.read() == 0x2)
-                            {
-                                m_cpt_read_ins_unc ++;
-                            }
-                            else if (r_xram_rsp_to_tgt_rsp_pktid.read() == 0x3)
-                            {
-                                m_cpt_read_ins_miss ++;
-                            }
-                            else if (r_xram_rsp_to_tgt_rsp_pktid.read() == 0x6)
-                            {
-                                m_cpt_read_ll_CC ++;
-                            }
-                            else if (r_xram_rsp_to_tgt_rsp_pktid.read() == 0x9)
-                            {
-                                m_cpt_read_data_miss_NCC ++;
-                            }
-                            else if (r_xram_rsp_to_tgt_rsp_pktid.read() == 0x14)
-                            {
-                                m_cpt_read_ll_NCC ++;
-                            }
-                            else
-                            {
-                                m_cpt_read_WTF ++;
-                            }
-
                         }
                         else
@@ -9217,6 +9241,5 @@
                         r_alloc_ivt_fsm = ALLOC_IVT_CLEANUP;
 
-                    else if ((r_cas_fsm.read() == CAS_MULTI_INVAL_IVT_LOCK) or
-                             (r_cas_fsm.read() == CAS_BC_IVT_LOCK))
+                    else if (r_cas_fsm.read() == CAS_INVAL_IVT_LOCK) 
                         r_alloc_ivt_fsm = ALLOC_IVT_CAS;
 
@@ -9244,6 +9267,5 @@
                         r_alloc_ivt_fsm = ALLOC_IVT_CLEANUP;
 
-                    else if ((r_cas_fsm.read() == CAS_MULTI_INVAL_IVT_LOCK) or
-                             (r_cas_fsm.read() == CAS_BC_IVT_LOCK))
+                    else if (r_cas_fsm.read() == CAS_INVAL_IVT_LOCK) 
                         r_alloc_ivt_fsm = ALLOC_IVT_CAS;
 
@@ -9270,6 +9292,5 @@
                         r_alloc_ivt_fsm = ALLOC_IVT_CLEANUP;
 
-                    else if ((r_cas_fsm.read() == CAS_MULTI_INVAL_IVT_LOCK) or
-                             (r_cas_fsm.read() == CAS_BC_IVT_LOCK))
+                    else if (r_cas_fsm.read() == CAS_INVAL_IVT_LOCK) 
                         r_alloc_ivt_fsm = ALLOC_IVT_CAS;
 
@@ -9299,6 +9320,5 @@
                     (r_cleanup_fsm.read() != CLEANUP_LOCKED_IVT_DECREMENT))
                 {
-                    if ((r_cas_fsm.read() == CAS_MULTI_INVAL_IVT_LOCK) or
-                        (r_cas_fsm.read() == CAS_BC_IVT_LOCK))
+                    if (r_cas_fsm.read() == CAS_INVAL_IVT_LOCK) 
                         r_alloc_ivt_fsm = ALLOC_IVT_CAS;
 
@@ -9326,6 +9346,5 @@
                 //////////////////////////
             case ALLOC_IVT_CAS:              // allocated to CAS FSM
-                if ((r_cas_fsm.read() != CAS_MULTI_INVAL_IVT_LOCK) and
-                    (r_cas_fsm.read() != CAS_BC_IVT_LOCK))
+                if (r_cas_fsm.read() != CAS_INVAL_IVT_LOCK)
                 {
                     if (r_config_fsm.read() == CONFIG_IVT_LOCK)
@@ -9375,6 +9394,5 @@
                         r_alloc_ivt_fsm = ALLOC_IVT_CLEANUP;
 
-                    else if ((r_cas_fsm.read() == CAS_MULTI_INVAL_IVT_LOCK) or
-                             (r_cas_fsm.read() == CAS_BC_IVT_LOCK))
+                    else if (r_cas_fsm.read() == CAS_INVAL_IVT_LOCK) 
                         r_alloc_ivt_fsm = ALLOC_IVT_CAS;
 
@@ -9405,6 +9423,5 @@
                         r_alloc_ivt_fsm = ALLOC_IVT_CLEANUP;
 
-                    else if ((r_cas_fsm.read() == CAS_MULTI_INVAL_IVT_LOCK) or
-                             (r_cas_fsm.read() == CAS_BC_IVT_LOCK))
+                    else if (r_cas_fsm.read() == CAS_INVAL_IVT_LOCK) 
                         r_alloc_ivt_fsm = ALLOC_IVT_CAS;
 
@@ -9562,8 +9579,6 @@
                     (r_cas_fsm.read()         != CAS_DIR_HIT_COMPARE)  and
                     (r_cas_fsm.read()         != CAS_DIR_HIT_WRITE)  and
-                    (r_cas_fsm.read()         != CAS_BC_TRT_LOCK)  and
-                    (r_cas_fsm.read()         != CAS_BC_IVT_LOCK)  and
                     (r_cas_fsm.read()         != CAS_MISS_TRT_LOCK)  and
-                    (r_cas_fsm.read()         != CAS_MULTI_INVAL_IVT_LOCK)  and
+                    (r_cas_fsm.read()         != CAS_INVAL_IVT_LOCK)  and
                     (r_cas_fsm.read()         != CAS_MULTI_INVAL_HEAP_LOCK))
                     or
@@ -9633,5 +9648,5 @@
                 }
                 else
-                    m_cpt_xram_rsp_fsm_dir_used++;
+                    m_cpt_multi_ack_fsm_dir_used++;
                 break;
                 ///////////////////////
@@ -9720,6 +9735,5 @@
                         r_alloc_trt_fsm = ALLOC_TRT_WRITE;
 
-                    else if((r_cas_fsm.read() == CAS_MISS_TRT_LOCK) or
-                            (r_cas_fsm.read() == CAS_BC_TRT_LOCK))
+                    else if(r_cas_fsm.read() == CAS_MISS_TRT_LOCK) 
                         r_alloc_trt_fsm = ALLOC_TRT_CAS;
 
@@ -9758,6 +9772,5 @@
                    (r_write_fsm.read() != WRITE_INVAL_IVT_LOCK))
                 {
-                    if((r_cas_fsm.read() == CAS_MISS_TRT_LOCK) or
-                            (r_cas_fsm.read() == CAS_BC_TRT_LOCK))
+                    if(r_cas_fsm.read() == CAS_MISS_TRT_LOCK) 
                         r_alloc_trt_fsm = ALLOC_TRT_CAS;
 
@@ -9796,7 +9809,5 @@
                 ////////////////////
             case ALLOC_TRT_CAS:
-                if((r_cas_fsm.read() != CAS_MISS_TRT_LOCK) and
-                        (r_cas_fsm.read() != CAS_BC_TRT_LOCK) and
-                        (r_cas_fsm.read() != CAS_BC_IVT_LOCK))
+                if(r_cas_fsm.read() != CAS_MISS_TRT_LOCK) 
                 {
                     if((r_ixr_cmd_fsm.read() == IXR_CMD_READ_TRT) or
@@ -9863,8 +9874,14 @@
                         r_alloc_trt_fsm = ALLOC_TRT_WRITE;
 
-                    else if((r_cas_fsm.read() == CAS_MISS_TRT_LOCK) or
-                            (r_cas_fsm.read() == CAS_BC_TRT_LOCK))
+                    else if(r_cas_fsm.read() == CAS_MISS_TRT_LOCK)
                         r_alloc_trt_fsm = ALLOC_TRT_CAS;
-                }
+
+                    else
+                        m_cpt_trt_unused++;
+                        
+                }
+                else
+                    m_cpt_ixr_cmd_fsm_trt_used++;
+                    
                 break;
 
@@ -9893,6 +9910,5 @@
                         r_alloc_trt_fsm = ALLOC_TRT_WRITE;
 
-                    else if((r_cas_fsm.read() == CAS_MISS_TRT_LOCK) or
-                            (r_cas_fsm.read() == CAS_BC_TRT_LOCK))
+                    else if(r_cas_fsm.read() == CAS_MISS_TRT_LOCK) 
                         r_alloc_trt_fsm = ALLOC_TRT_CAS;
 
@@ -9929,6 +9945,5 @@
                         r_alloc_trt_fsm = ALLOC_TRT_WRITE;
 
-                    else if((r_cas_fsm.read() == CAS_MISS_TRT_LOCK) ||
-                            (r_cas_fsm.read() == CAS_BC_TRT_LOCK))
+                    else if(r_cas_fsm.read() == CAS_MISS_TRT_LOCK) 
                         r_alloc_trt_fsm = ALLOC_TRT_CAS;
 
@@ -9949,5 +9964,5 @@
                 }
                 else
-                    m_cpt_ixr_fsm_trt_used++;
+                    m_cpt_ixr_rsp_fsm_trt_used++;
                 break;
 
@@ -9966,6 +9981,5 @@
                         r_alloc_trt_fsm = ALLOC_TRT_WRITE;
 
-                    else if((r_cas_fsm.read() == CAS_MISS_TRT_LOCK) or
-                            (r_cas_fsm.read() == CAS_BC_TRT_LOCK))
+                    else if(r_cas_fsm.read() == CAS_MISS_TRT_LOCK) 
                         r_alloc_trt_fsm = ALLOC_TRT_CAS;
 
@@ -9998,6 +10012,5 @@
                         r_alloc_trt_fsm = ALLOC_TRT_WRITE;
 
-                    else if((r_cas_fsm.read() == CAS_MISS_TRT_LOCK) or
-                            (r_cas_fsm.read() == CAS_BC_TRT_LOCK))
+                    else if(r_cas_fsm.read() == CAS_MISS_TRT_LOCK) 
                         r_alloc_trt_fsm = ALLOC_TRT_CAS;
 
@@ -10020,5 +10033,10 @@
                     else if( r_config_fsm.read() == CONFIG_TRT_LOCK ) 
                         r_alloc_trt_fsm = ALLOC_TRT_CONFIG;
-                }
+    
+                    else
+                        m_cpt_trt_unused ++;
+                }
+                else
+                    m_cpt_cleanup_fsm_trt_used++;
                 break;
 
@@ -10208,5 +10226,5 @@
                 }
                 else
-                    m_cpt_cleanup_fsm_heap_used++;
+                    m_cpt_multi_ack_fsm_heap_used++;
                 break;
 
