Index: branches/v5/modules/vci_mem_cache_dspin_coherence/caba/source/src/vci_mem_cache.cpp
===================================================================
--- branches/v5/modules/vci_mem_cache_dspin_coherence/caba/source/src/vci_mem_cache.cpp	(revision 317)
+++ branches/v5/modules/vci_mem_cache_dspin_coherence/caba/source/src/vci_mem_cache.cpp	(revision 319)
@@ -552,4 +552,5 @@
             << " | " << cleanup_fsm_str[r_cleanup_fsm] << std::endl;
   std::cout << "  "  << cc_send_fsm_str[r_cc_send_fsm]
+            << " | " << cc_receive_fsm_str[r_cc_receive_fsm]
             << " | " << multi_ack_fsm_str[r_multi_ack_fsm]
             << " | " << ixr_cmd_fsm_str[r_ixr_cmd_fsm]
@@ -802,17 +803,17 @@
 #endif
 
-  m_debug_global        = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
-  m_debug_tgt_cmd_fsm   = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
-  m_debug_tgt_rsp_fsm   = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
-  m_debug_cc_send_fsm = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
+  m_debug_global         = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
+  m_debug_tgt_cmd_fsm    = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
+  m_debug_tgt_rsp_fsm    = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
+  m_debug_cc_send_fsm    = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
   m_debug_cc_receive_fsm = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
-  m_debug_multi_ack_fsm = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
-  m_debug_read_fsm      = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
-  m_debug_write_fsm     = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
-  m_debug_cas_fsm       = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
-  m_debug_cleanup_fsm   = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
-  m_debug_ixr_cmd_fsm   = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
-  m_debug_ixr_rsp_fsm   = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
-  m_debug_xram_rsp_fsm  = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
+  m_debug_multi_ack_fsm  = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
+  m_debug_read_fsm       = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
+  m_debug_write_fsm      = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
+  m_debug_cas_fsm        = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
+  m_debug_cleanup_fsm    = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
+  m_debug_ixr_cmd_fsm    = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
+  m_debug_ixr_rsp_fsm    = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
+  m_debug_xram_rsp_fsm   = (m_cpt_cycles > m_debug_start_cycle) and m_debug_ok;
 
 #if DEBUG_MEMC_GLOBAL
@@ -821,22 +822,22 @@
     std::cout
         << "---------------------------------------------"           << std::dec << std::endl
-        << "MEM_CACHE "           << m_srcid_ini 
-        << " ; Time = "           << m_cpt_cycles                                << std::endl
-        << " - TGT_CMD FSM    = " << tgt_cmd_fsm_str[r_tgt_cmd_fsm.read()]       << std::endl
-        << " - TGT_RSP FSM    = " << tgt_rsp_fsm_str[r_tgt_rsp_fsm.read()]       << std::endl
-        << " - CC_SEND FSM  = " << cc_send_fsm_str[r_cc_send_fsm.read()]   << std::endl
-        << " - CC_RECEIVE FSM  = " << cc_receive_fsm_str[r_cc_receive_fsm.read()]   << std::endl
-        << " - MULTI_ACK FSM  = " << multi_ack_fsm_str[r_multi_ack_fsm.read()]   << std::endl
-        << " - READ FSM       = " << read_fsm_str[r_read_fsm.read()]             << std::endl
-        << " - WRITE FSM      = " << write_fsm_str[r_write_fsm.read()]           << std::endl
-        << " - CAS FSM        = " << cas_fsm_str[r_cas_fsm.read()]               << std::endl
-        << " - CLEANUP FSM    = " << cleanup_fsm_str[r_cleanup_fsm.read()]       << std::endl
-        << " - IXR_CMD FSM    = " << ixr_cmd_fsm_str[r_ixr_cmd_fsm.read()]       << std::endl
-        << " - IXR_RSP FSM    = " << ixr_rsp_fsm_str[r_ixr_rsp_fsm.read()]       << std::endl
-        << " - XRAM_RSP FSM   = " << xram_rsp_fsm_str[r_xram_rsp_fsm.read()]     << std::endl
-        << " - ALLOC_DIR FSM  = " << alloc_dir_fsm_str[r_alloc_dir_fsm.read()]   << std::endl
-        << " - ALLOC_TRT FSM  = " << alloc_trt_fsm_str[r_alloc_trt_fsm.read()]   << std::endl
-        << " - ALLOC_UPT FSM  = " << alloc_upt_fsm_str[r_alloc_upt_fsm.read()]   << std::endl
-        << " - ALLOC_HEAP FSM = " << alloc_heap_fsm_str[r_alloc_heap_fsm.read()] << std::endl;
+        << "MEM_CACHE "            << m_srcid_ini 
+        << " ; Time = "            << m_cpt_cycles                                << std::endl
+        << " - TGT_CMD FSM    = "  << tgt_cmd_fsm_str[r_tgt_cmd_fsm.read()]       << std::endl
+        << " - TGT_RSP FSM    = "  << tgt_rsp_fsm_str[r_tgt_rsp_fsm.read()]       << std::endl
+        << " - CC_SEND FSM  = "    << cc_send_fsm_str[r_cc_send_fsm.read()]       << std::endl
+        << " - CC_RECEIVE FSM  = " << cc_receive_fsm_str[r_cc_receive_fsm.read()] << std::endl
+        << " - MULTI_ACK FSM  = "  << multi_ack_fsm_str[r_multi_ack_fsm.read()]   << std::endl
+        << " - READ FSM       = "  << read_fsm_str[r_read_fsm.read()]             << std::endl
+        << " - WRITE FSM      = "  << write_fsm_str[r_write_fsm.read()]           << std::endl
+        << " - CAS FSM        = "  << cas_fsm_str[r_cas_fsm.read()]               << std::endl
+        << " - CLEANUP FSM    = "  << cleanup_fsm_str[r_cleanup_fsm.read()]       << std::endl
+        << " - IXR_CMD FSM    = "  << ixr_cmd_fsm_str[r_ixr_cmd_fsm.read()]       << std::endl
+        << " - IXR_RSP FSM    = "  << ixr_rsp_fsm_str[r_ixr_rsp_fsm.read()]       << std::endl
+        << " - XRAM_RSP FSM   = "  << xram_rsp_fsm_str[r_xram_rsp_fsm.read()]     << std::endl
+        << " - ALLOC_DIR FSM  = "  << alloc_dir_fsm_str[r_alloc_dir_fsm.read()]   << std::endl
+        << " - ALLOC_TRT FSM  = "  << alloc_trt_fsm_str[r_alloc_trt_fsm.read()]   << std::endl
+        << " - ALLOC_UPT FSM  = "  << alloc_upt_fsm_str[r_alloc_upt_fsm.read()]   << std::endl
+        << " - ALLOC_HEAP FSM = "  << alloc_heap_fsm_str[r_alloc_heap_fsm.read()] << std::endl;
   }
 #endif
@@ -7394,5 +7395,5 @@
             DspinDhccpParam::FROM_MC_TYPE);
 
-        p_dspin_out.write = true;
+        p_dspin_out.write = m_xram_rsp_to_cc_send_inst_fifo.rok();
         p_dspin_out.data  = flit; 
 
@@ -7542,5 +7543,5 @@
             DspinDhccpParam::FROM_MC_TYPE);
 
-        p_dspin_out.write = true;
+        p_dspin_out.write = m_write_to_cc_send_inst_fifo.rok();
         p_dspin_out.data  = flit;
 
@@ -7644,5 +7645,5 @@
             DspinDhccpParam::FROM_MC_TYPE);
 
-        p_dspin_out.write = true;
+        p_dspin_out.write = m_cas_to_cc_send_inst_fifo.rok();
         p_dspin_out.data  = flit;
 
