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 310)
+++ branches/v5/modules/vci_mem_cache_dspin_coherence/caba/source/src/vci_mem_cache.cpp	(revision 313)
@@ -196,4 +196,5 @@
   "CAS_DIR_LOCK",
   "CAS_DIR_HIT_READ",
+  "CAS_DIR_HIT_COMPARE",
   "CAS_DIR_HIT_WRITE",
   "CAS_UPT_LOCK",
@@ -267,6 +268,6 @@
 
 #define tmpl(x) \
-  template<typename vci_param, int from_mc_flit_width, int from_l1_flit_width> x \
-  VciMemCache<vci_param, from_mc_flit_width, from_l1_flit_width>
+  template<typename vci_param> x \
+  VciMemCache<vci_param>
 
 using soclib::common::uint32_log2;
@@ -468,10 +469,11 @@
   r_write_data               = new sc_signal<data_t>[nwords];
   r_write_be                 = new sc_signal<be_t>[nwords];
-  r_write_to_cc_send_data  = new sc_signal<data_t>[nwords];
-  r_write_to_cc_send_be    = new sc_signal<be_t>[nwords];
+  r_write_to_cc_send_data    = new sc_signal<data_t>[nwords];
+  r_write_to_cc_send_be      = new sc_signal<be_t>[nwords];
   r_write_to_ixr_cmd_data    = new sc_signal<data_t>[nwords];
 
   // Allocation for CAS FSM
   r_cas_to_ixr_cmd_data      = new sc_signal<data_t>[nwords];
+  r_cas_data                 = new sc_signal<data_t>[nwords];
   r_cas_rdata                = new sc_signal<data_t>[2];
 
@@ -1104,8 +1106,8 @@
 
         uint8_t updt_index = 
-          dspin_param::dspin_get(flit, dspin_param::MULTI_ACK_UPDT_INDEX);
+          DspinDhccpParam::dspin_get(flit, DspinDhccpParam::MULTI_ACK_UPDT_INDEX);
 
         bool eop =
-          (dspin_param::dspin_get(flit, dspin_param::FROM_L1_EOP) == 0x1);
+          (DspinDhccpParam::dspin_get(flit, DspinDhccpParam::FROM_L1_EOP) == 0x1);
 
         if(updt_index >= m_update_tab.size())
@@ -3743,25 +3745,25 @@
 
       uint32_t srcid =
-        dspin_param::dspin_get(
+        DspinDhccpParam::dspin_get(
             flit,
-            dspin_param::CLEANUP_SRCID);
+            DspinDhccpParam::CLEANUP_SRCID);
 
       uint8_t type =
-        dspin_param::dspin_get(
+        DspinDhccpParam::dspin_get(
             flit,
-            dspin_param::FROM_L1_TYPE);
+            DspinDhccpParam::FROM_L1_TYPE);
 
       r_cleanup_way_index =
-        dspin_param::dspin_get(
+        DspinDhccpParam::dspin_get(
             flit,
-            dspin_param::CLEANUP_WAY_INDEX);
+            DspinDhccpParam::CLEANUP_WAY_INDEX);
 
       r_cleanup_nline =
-        dspin_param::dspin_get(
+        DspinDhccpParam::dspin_get(
             flit,
-            dspin_param::CLEANUP_NLINE_MSB) 
+            DspinDhccpParam::CLEANUP_NLINE_MSB) 
         << 32;
 
-      r_cleanup_inst  = (type == dspin_param::TYPE_CLEANUP_INST);
+      r_cleanup_inst  = (type == DspinDhccpParam::TYPE_CLEANUP_INST);
       r_cleanup_srcid = srcid;
 
@@ -3787,5 +3789,5 @@
             << ".CLEANUP_IDLE> Cleanup request:" << std::hex
             << " / owner_id = "   << srcid
-            << " / owner_ins = "  << (type == dspin_param::TYPE_CLEANUP_INST)
+            << " / owner_ins = "  << (type == DspinDhccpParam::TYPE_CLEANUP_INST)
             << std::endl;
       }
@@ -3803,8 +3805,8 @@
       addr_t nline =
         r_cleanup_nline.read() |
-        dspin_param::dspin_get(flit, dspin_param::CLEANUP_NLINE_LSB);
+        DspinDhccpParam::dspin_get(flit, DspinDhccpParam::CLEANUP_NLINE_LSB);
 
       bool eop =
-        dspin_param::dspin_get(flit, dspin_param::FROM_L1_EOP) == 0x1;
+        DspinDhccpParam::dspin_get(flit, DspinDhccpParam::FROM_L1_EOP) == 0x1;
 
       assert(
@@ -4661,5 +4663,5 @@
 
         if(entry.valid)  r_cas_fsm = CAS_DIR_HIT_READ;
-        else          r_cas_fsm = CAS_MISS_TRT_LOCK;
+        else             r_cas_fsm = CAS_MISS_TRT_LOCK;
 
 #if DEBUG_MEMC_CAS
@@ -4688,9 +4690,8 @@
     /////////////////////
     case CAS_DIR_HIT_READ:  // update directory for lock and dirty bit
-      // and check data change in cache
+                            // and check data change in cache
     {
       size_t way  = r_cas_way.read();
       size_t set  = m_y[(vci_addr_t)(m_cmd_cas_addr_fifo.read())];
-      size_t word = m_x[(vci_addr_t)(m_cmd_cas_addr_fifo.read())];
 
       // update directory (lock & dirty bits)
@@ -4700,5 +4701,5 @@
       entry.dirty          = true;
       entry.lock           = true;
-      entry.tag          = r_cas_tag.read();
+      entry.tag            = r_cas_tag.read();
       entry.owner.srcid    = r_cas_copy.read();
 #if L1_MULTI_CACHE
@@ -4711,18 +4712,42 @@
       m_cache_directory.write(set, way, entry);
 
-      // read data in cache & check data change
-      bool ok = (r_cas_rdata[0].read() == m_cache_data.read(way, set, word));
-      if(r_cas_cpt.read() ==4)    // 64 bits CAS
-        ok &= (r_cas_rdata[1] == m_cache_data.read(way, set, word+1));
+      // Stored data from cache in buffer to do the comparison in next state
+      m_cache_data.read_line(way, set, r_cas_data);
+
+      r_cas_fsm = CAS_DIR_HIT_COMPARE;
+
+#if DEBUG_MEMC_CAS
+      if(m_debug_cas_fsm)
+      {
+        std::cout
+          << "  <MEMC " << name() << ".CAS_DIR_HIT_READ> Read data from "
+          << " cache and store it in buffer"
+          << std::endl;
+      }
+#endif
+      break;
+    }
+
+    case CAS_DIR_HIT_COMPARE:
+    {
+      size_t word = m_x[(vci_addr_t)(m_cmd_cas_addr_fifo.read())];
+
+      // Read data in buffer & check data change
+      bool ok = (r_cas_rdata[0].read() == r_cas_data[word].read());
+
+      if(r_cas_cpt.read() == 4)     // 64 bits CAS
+        ok &= (r_cas_rdata[1] == r_cas_data[word+1]);
 
       // to avoid livelock, force the atomic access to fail pseudo-randomly
       bool forced_fail = ((r_cas_lfsr % (64) == 0) && RANDOMIZE_CAS);
-      r_cas_lfsr = (r_cas_lfsr >> 1) ^((- (r_cas_lfsr & 1)) & 0xd0000001);
-
-      if(ok and not forced_fail)    // no data change
+      r_cas_lfsr = (r_cas_lfsr >> 1) ^ ((- (r_cas_lfsr & 1)) & 0xd0000001);
+
+      // cas success
+      if(ok and not forced_fail)
       {
         r_cas_fsm = CAS_DIR_HIT_WRITE;
       }
-      else                            // return failure
+      // cas failure
+      else
       {
         r_cas_fsm = CAS_RSP_FAIL;
@@ -4732,8 +4757,9 @@
       if(m_debug_cas_fsm)
       {
-        std::cout << "  <MEMC " << name() << ".CAS_DIR_HIT_READ> Test if CAS success:"
+        std::cout << "  <MEMC " << name() << ".CAS_DIR_HIT_COMPARE> Compare the old"
+                  << " and the new data"
                   << " / expected value = " << r_cas_rdata[0].read()
-                  << " / actual value = " << m_cache_data.read(way, set, word)
-                  << " / forced_fail = " << forced_fail << std::endl;
+                  << " / actual value = "   << r_cas_data[word].read()
+                  << " / forced_fail = "    << forced_fail << std::endl;
       }
 #endif
@@ -4772,6 +4798,8 @@
         // cache update
         m_cache_data.write(way, set, word, r_cas_wdata.read());
-        if(r_cas_cpt.read() ==4)
+        if(r_cas_cpt.read() == 4)
           m_cache_data.write(way, set, word+1, m_cmd_cas_wdata_fifo.read());
+
+        r_cas_fsm = CAS_RSP_SUCCESS;
 
         // monitor
@@ -4782,8 +4810,8 @@
           snprintf(buf, 80, "CAS_DIR_HIT_WRITE srcid %d", m_cmd_cas_srcid_fifo.read());
           check_monitor(buf, address, r_cas_wdata.read());
-          if(r_cas_cpt.read() ==4)
+
+          if(r_cas_cpt.read() == 4)
             check_monitor(buf, address+4, m_cmd_cas_wdata_fifo.read());
         }
-        r_cas_fsm = CAS_RSP_SUCCESS;
 
 #if DEBUG_MEMC_CAS
@@ -4838,4 +4866,7 @@
             m_cache_data.write(way, set, word+1, m_cmd_cas_wdata_fifo.read());
 
+          r_cas_upt_index = index;
+          r_cas_fsm = CAS_UPT_HEAP_LOCK;
+
           // monitor
           if(m_monitor_ok)
@@ -4845,10 +4876,8 @@
             snprintf(buf, 80, "CAS_DIR_HIT_WRITE srcid %d", m_cmd_cas_srcid_fifo.read());
             check_monitor(buf, address, r_cas_wdata.read());
+
             if(r_cas_cpt.read() ==4)
               check_monitor(buf, address+4, m_cmd_cas_wdata_fifo.read());
           }
-
-          r_cas_upt_index = index;
-          r_cas_fsm = CAS_UPT_HEAP_LOCK;
         }
         else       //  releases the locks protecting UPT and DIR UPT full
@@ -5006,6 +5035,4 @@
         {
           // fill the data buffer
-          size_t way  = r_cas_way.read();
-          size_t set  = m_y[(vci_addr_t)(m_cmd_cas_addr_fifo.read())];
           size_t word = m_x[(vci_addr_t)(m_cmd_cas_addr_fifo.read())];
           for(size_t i = 0; i<m_words; i++)
@@ -5015,5 +5042,5 @@
               r_cas_to_ixr_cmd_data[i] = r_cas_wdata.read();
             }
-            else if((i == word+1) && (r_cas_cpt.read() ==4))   // 64 bit CAS
+            else if((i == word+1) && (r_cas_cpt.read() == 4))   // 64 bit CAS
             {
               r_cas_to_ixr_cmd_data[i] = m_cmd_cas_wdata_fifo.read();
@@ -5021,5 +5048,5 @@
             else
             {
-              r_cas_to_ixr_cmd_data[i] = m_cache_data.read(way, set, i);
+              r_cas_to_ixr_cmd_data[i] = r_cas_data[i].read();
             }
           }
@@ -5910,9 +5937,9 @@
 
         uint8_t type =
-          dspin_param::dspin_get(
+          DspinDhccpParam::dspin_get(
               p_dspin_in.data.read(),
-              dspin_param::FROM_L1_TYPE);
-
-        if(type == dspin_param::TYPE_CLEANUP)
+              DspinDhccpParam::FROM_L1_TYPE);
+
+        if(type == DspinDhccpParam::TYPE_CLEANUP)
         { 
           r_cc_receive_fsm = CC_RECEIVE_CLEANUP;
@@ -5920,5 +5947,5 @@
         }
         
-        if(type == dspin_param::TYPE_MULTI_ACK)
+        if(type == DspinDhccpParam::TYPE_MULTI_ACK)
         {
           r_cc_receive_fsm = CC_RECEIVE_MULTI_ACK;
@@ -5940,7 +5967,7 @@
 
         bool eop = (
-            dspin_param::dspin_get(
+            DspinDhccpParam::dspin_get(
               p_dspin_in.data.read(),
-              dspin_param::FROM_L1_EOP)
+              DspinDhccpParam::FROM_L1_EOP)
             == 0x1);
 
@@ -5960,7 +5987,7 @@
 
         bool eop = (
-            dspin_param::dspin_get(
+            DspinDhccpParam::dspin_get(
               p_dspin_in.data.read(),
-              dspin_param::FROM_L1_EOP) 
+              DspinDhccpParam::FROM_L1_EOP) 
             == 0x1);
 
@@ -6400,8 +6427,8 @@
       ////////////////////
     case ALLOC_DIR_READ:
-      if(((r_read_fsm.read()       != READ_DIR_REQ)   &&
-          (r_read_fsm.read()       != READ_DIR_LOCK)   &&
-          (r_read_fsm.read()       != READ_TRT_LOCK)   &&
-          (r_read_fsm.read()       != READ_HEAP_REQ))
+      if(((r_read_fsm.read()        != READ_DIR_REQ)   &&
+          (r_read_fsm.read()        != READ_DIR_LOCK)   &&
+          (r_read_fsm.read()        != READ_TRT_LOCK)   &&
+          (r_read_fsm.read()        != READ_HEAP_REQ))
           ||
           ((r_read_fsm.read()       == READ_TRT_LOCK)   &&
@@ -6424,13 +6451,13 @@
       /////////////////////
     case ALLOC_DIR_WRITE:
-      if(((r_write_fsm.read()      != WRITE_DIR_REQ)  &&
-          (r_write_fsm.read()      != WRITE_DIR_LOCK)  &&
-          (r_write_fsm.read()      != WRITE_DIR_READ)  &&
-          (r_write_fsm.read()      != WRITE_DIR_HIT)  &&
-          (r_write_fsm.read()      != WRITE_BC_TRT_LOCK)  &&
-          (r_write_fsm.read()      != WRITE_BC_UPT_LOCK)  &&
-          (r_write_fsm.read()      != WRITE_MISS_TRT_LOCK)  &&
-          (r_write_fsm.read()      != WRITE_UPT_LOCK)  &&
-          (r_write_fsm.read()      != WRITE_UPT_HEAP_LOCK))
+      if(((r_write_fsm.read()       != WRITE_DIR_REQ)  &&
+          (r_write_fsm.read()       != WRITE_DIR_LOCK)  &&
+          (r_write_fsm.read()       != WRITE_DIR_READ)  &&
+          (r_write_fsm.read()       != WRITE_DIR_HIT)  &&
+          (r_write_fsm.read()       != WRITE_BC_TRT_LOCK)  &&
+          (r_write_fsm.read()       != WRITE_BC_UPT_LOCK)  &&
+          (r_write_fsm.read()       != WRITE_MISS_TRT_LOCK)  &&
+          (r_write_fsm.read()       != WRITE_UPT_LOCK)  &&
+          (r_write_fsm.read()       != WRITE_UPT_HEAP_LOCK))
           ||
           ((r_write_fsm.read()      == WRITE_UPT_HEAP_LOCK)  &&
@@ -6456,13 +6483,14 @@
       ////////////////////
     case ALLOC_DIR_CAS:
-      if(((r_cas_fsm.read()        != CAS_DIR_REQ)  &&
-          (r_cas_fsm.read()        != CAS_DIR_LOCK)  &&
-          (r_cas_fsm.read()        != CAS_DIR_HIT_READ)  &&
-          (r_cas_fsm.read()        != CAS_DIR_HIT_WRITE)  &&
-          (r_cas_fsm.read()        != CAS_BC_TRT_LOCK)  &&
-          (r_cas_fsm.read()        != CAS_BC_UPT_LOCK)  &&
-          (r_cas_fsm.read()        != CAS_MISS_TRT_LOCK)  &&
-          (r_cas_fsm.read()        != CAS_UPT_LOCK)  &&
-          (r_cas_fsm.read()        != CAS_UPT_HEAP_LOCK))
+      if(((r_cas_fsm.read()         != CAS_DIR_REQ)  &&
+          (r_cas_fsm.read()         != CAS_DIR_LOCK)  &&
+          (r_cas_fsm.read()         != CAS_DIR_HIT_READ)  &&
+          (r_cas_fsm.read()         != CAS_DIR_HIT_COMPARE)  &&
+          (r_cas_fsm.read()         != CAS_DIR_HIT_WRITE)  &&
+          (r_cas_fsm.read()         != CAS_BC_TRT_LOCK)  &&
+          (r_cas_fsm.read()         != CAS_BC_UPT_LOCK)  &&
+          (r_cas_fsm.read()         != CAS_MISS_TRT_LOCK)  &&
+          (r_cas_fsm.read()         != CAS_UPT_LOCK)  &&
+          (r_cas_fsm.read()         != CAS_UPT_HEAP_LOCK))
           ||
           ((r_cas_fsm.read()        == CAS_UPT_HEAP_LOCK)  &&
@@ -7297,28 +7325,28 @@
         uint64_t flit = 0;
   
-        dspin_param::dspin_set(
+        DspinDhccpParam::dspin_set(
             flit,
             1ULL,
-            dspin_param::FROM_MC_EOP);
-
-        dspin_param::dspin_set(
+            DspinDhccpParam::FROM_MC_EOP);
+
+        DspinDhccpParam::dspin_set(
             flit,
             r_cleanup_to_cc_send_srcid.read(),
-            dspin_param::CLEANUP_ACK_DEST);
-
-        dspin_param::dspin_set(
+            DspinDhccpParam::CLEANUP_ACK_DEST);
+
+        DspinDhccpParam::dspin_set(
             flit,
             r_cleanup_to_cc_send_set_index.read(),
-            dspin_param::CLEANUP_ACK_SET);
-
-        dspin_param::dspin_set(
+            DspinDhccpParam::CLEANUP_ACK_SET);
+
+        DspinDhccpParam::dspin_set(
             flit,
             r_cleanup_to_cc_send_way_index.read(),
-            dspin_param::CLEANUP_ACK_WAY);
-
-        dspin_param::dspin_set(
+            DspinDhccpParam::CLEANUP_ACK_WAY);
+
+        DspinDhccpParam::dspin_set(
             flit,
-            dspin_param::TYPE_CLEANUP_ACK,
-            dspin_param::FROM_MC_TYPE);
+            DspinDhccpParam::TYPE_CLEANUP_ACK,
+            DspinDhccpParam::FROM_MC_TYPE);
 
         p_dspin_out.write = true;
@@ -7333,32 +7361,32 @@
         if(m_xram_rsp_to_cc_send_inst_fifo.read())
         {
-          multi_inval_type = dspin_param::TYPE_MULTI_INVAL_INST;
+          multi_inval_type = DspinDhccpParam::TYPE_MULTI_INVAL_INST;
         }
         else 
         {
-          multi_inval_type = dspin_param::TYPE_MULTI_INVAL_DATA;
+          multi_inval_type = DspinDhccpParam::TYPE_MULTI_INVAL_DATA;
         }
 
         uint64_t flit = 0;
 
-        dspin_param::dspin_set(
+        DspinDhccpParam::dspin_set(
             flit,
             m_xram_rsp_to_cc_send_srcid_fifo.read(),
-            dspin_param::MULTI_INVAL_DEST);
-
-        dspin_param::dspin_set(
+            DspinDhccpParam::MULTI_INVAL_DEST);
+
+        DspinDhccpParam::dspin_set(
             flit,
             m_srcid_ini,
-            dspin_param::MULTI_INVAL_SRCID);
-
-        dspin_param::dspin_set(
+            DspinDhccpParam::MULTI_INVAL_SRCID);
+
+        DspinDhccpParam::dspin_set(
             flit,
             r_xram_rsp_to_cc_send_trdid.read(),
-            dspin_param::MULTI_INVAL_UPDT_INDEX);
-
-        dspin_param::dspin_set(
+            DspinDhccpParam::MULTI_INVAL_UPDT_INDEX);
+
+        DspinDhccpParam::dspin_set(
             flit,
             multi_inval_type,
-            dspin_param::FROM_MC_TYPE);
+            DspinDhccpParam::FROM_MC_TYPE);
 
         p_dspin_out.write = true;
@@ -7372,13 +7400,13 @@
         uint64_t flit = 0;
 
-        dspin_param::dspin_set(
+        DspinDhccpParam::dspin_set(
             flit,
             1ULL,
-            dspin_param::FROM_MC_EOP);
-
-        dspin_param::dspin_set(
+            DspinDhccpParam::FROM_MC_EOP);
+
+        DspinDhccpParam::dspin_set(
             flit,
             r_xram_rsp_to_cc_send_nline.read(),
-            dspin_param::MULTI_INVAL_NLINE);
+            DspinDhccpParam::MULTI_INVAL_NLINE);
         
 
@@ -7395,18 +7423,18 @@
         uint64_t flit = 0;
 
-        dspin_param::dspin_set(
+        DspinDhccpParam::dspin_set(
             flit,
             m_broadcast_address,
-            dspin_param::BROADCAST_BOX);
-
-        dspin_param::dspin_set(
+            DspinDhccpParam::BROADCAST_BOX);
+
+        DspinDhccpParam::dspin_set(
             flit,
             m_srcid_ini,
-            dspin_param::BROADCAST_SRCID);
-
-        dspin_param::dspin_set(
+            DspinDhccpParam::BROADCAST_SRCID);
+
+        DspinDhccpParam::dspin_set(
             flit,
             1ULL,
-            dspin_param::FROM_MC_BC);
+            DspinDhccpParam::FROM_MC_BC);
 
         p_dspin_out.write = true;
@@ -7420,18 +7448,13 @@
         uint64_t flit = 0;
 
-        dspin_param::dspin_set(
+        DspinDhccpParam::dspin_set(
             flit,
             1ULL,
-            dspin_param::FROM_MC_EOP);
-
-        dspin_param::dspin_set(
-            flit,
-            r_xram_rsp_to_cc_send_trdid.read(),
-            dspin_param::BROADCAST_UPDT_INDEX);
-
-        dspin_param::dspin_set(
+            DspinDhccpParam::FROM_MC_EOP);
+
+        DspinDhccpParam::dspin_set(
             flit,
             r_xram_rsp_to_cc_send_nline.read(),
-            dspin_param::BROADCAST_NLINE);
+            DspinDhccpParam::BROADCAST_NLINE);
 
         p_dspin_out.write = true;
@@ -7445,103 +7468,93 @@
         uint64_t flit = 0;
 
-        dspin_param::dspin_set(
+        DspinDhccpParam::dspin_set(
             flit,
             1ULL,
-            dspin_param::FROM_MC_EOP);
-
-        dspin_param::dspin_set(
+            DspinDhccpParam::FROM_MC_EOP);
+
+        DspinDhccpParam::dspin_set(
+            flit,
+            r_write_to_cc_send_nline.read(),
+            DspinDhccpParam::BROADCAST_NLINE);
+
+        p_dspin_out.write = true;
+        p_dspin_out.data  = flit;
+
+        break;
+      }
+
+    case CC_SEND_CAS_BRDCAST_NLINE:
+      {
+        uint64_t flit = 0;
+
+        DspinDhccpParam::dspin_set(
+            flit,
+            1ULL,
+            DspinDhccpParam::FROM_MC_EOP);
+
+        DspinDhccpParam::dspin_set(
+            flit,
+            r_cas_to_cc_send_nline.read(),
+            DspinDhccpParam::BROADCAST_NLINE);
+
+        p_dspin_out.write = true;
+        p_dspin_out.data  = flit;
+
+        break;
+      }
+
+    case CC_SEND_WRITE_UPDT_HEADER:
+      {
+        uint8_t multi_updt_type;
+        if(m_write_to_cc_send_inst_fifo.read())
+        {
+          multi_updt_type = DspinDhccpParam::TYPE_MULTI_UPDT_INST;
+        }
+        else 
+        {
+          multi_updt_type = DspinDhccpParam::TYPE_MULTI_UPDT_DATA;
+        }
+
+        uint64_t flit = 0;
+
+        DspinDhccpParam::dspin_set(
+            flit,
+            m_write_to_cc_send_srcid_fifo.read(),
+            DspinDhccpParam::MULTI_UPDT_DEST);
+
+        DspinDhccpParam::dspin_set(
+            flit,
+            m_srcid_ini,
+            DspinDhccpParam::MULTI_UPDT_SRCID);
+
+        DspinDhccpParam::dspin_set(
             flit,
             r_write_to_cc_send_trdid.read(),
-            dspin_param::BROADCAST_UPDT_INDEX);
-
-        dspin_param::dspin_set(
+            DspinDhccpParam::MULTI_UPDT_UPDT_INDEX);
+
+        DspinDhccpParam::dspin_set(
+            flit,
+            multi_updt_type,
+            DspinDhccpParam::FROM_MC_TYPE);
+
+        p_dspin_out.write = true;
+        p_dspin_out.data  = flit;
+
+        break;
+      }
+
+    case CC_SEND_WRITE_UPDT_NLINE:
+      {
+        uint64_t flit = 0;
+
+        DspinDhccpParam::dspin_set(
+            flit,
+            r_write_to_cc_send_index.read(),
+            DspinDhccpParam::MULTI_UPDT_WORD_INDEX);
+
+        DspinDhccpParam::dspin_set(
             flit,
             r_write_to_cc_send_nline.read(),
-            dspin_param::BROADCAST_NLINE);
-
-        p_dspin_out.write = true;
-        p_dspin_out.data  = flit;
-
-        break;
-      }
-
-    case CC_SEND_CAS_BRDCAST_NLINE:
-      {
-        uint64_t flit = 0;
-
-        dspin_param::dspin_set(
-            flit,
-            1ULL,
-            dspin_param::FROM_MC_EOP);
-
-        dspin_param::dspin_set(
-            flit,
-            r_cas_to_cc_send_trdid.read(),
-            dspin_param::BROADCAST_UPDT_INDEX);
-
-        dspin_param::dspin_set(
-            flit,
-            r_cas_to_cc_send_nline.read(),
-            dspin_param::BROADCAST_NLINE);
-
-        p_dspin_out.write = true;
-        p_dspin_out.data  = flit;
-
-        break;
-      }
-
-    case CC_SEND_WRITE_UPDT_HEADER:
-      {
-        uint8_t multi_updt_type;
-        if(m_write_to_cc_send_inst_fifo.read())
-        {
-          multi_updt_type = dspin_param::TYPE_MULTI_UPDT_INST;
-        }
-        else 
-        {
-          multi_updt_type = dspin_param::TYPE_MULTI_UPDT_DATA;
-        }
-
-        uint64_t flit = 0;
-
-        dspin_param::dspin_set(
-            flit,
-            m_write_to_cc_send_srcid_fifo.read(),
-            dspin_param::MULTI_UPDT_DEST);
-
-        dspin_param::dspin_set(
-            flit,
-            m_srcid_ini,
-            dspin_param::MULTI_UPDT_SRCID);
-
-        dspin_param::dspin_set(
-            flit,
-            r_write_to_cc_send_trdid.read(),
-            dspin_param::MULTI_UPDT_UPDT_INDEX);
-
-        dspin_param::dspin_set(
-            flit,
-            multi_updt_type,
-            dspin_param::FROM_MC_TYPE);
-
-        p_dspin_out.write = true;
-        p_dspin_out.data  = flit;
-
-        break;
-      }
-
-    case CC_SEND_WRITE_UPDT_NLINE:
-      {
-        uint64_t flit = 0;
-
-        dspin_param::dspin_set(
-            flit,
-            r_write_to_cc_send_index.read(),
-            dspin_param::MULTI_UPDT_WORD_INDEX);
-
-        dspin_param::dspin_set(
-            flit,
-            r_write_to_cc_send_nline.read(),
-            dspin_param::MULTI_UPDT_NLINE);
+            DspinDhccpParam::MULTI_UPDT_NLINE);
 
         p_dspin_out.write = true;
@@ -7572,18 +7585,18 @@
         uint64_t flit = 0;
 
-        dspin_param::dspin_set(
+        DspinDhccpParam::dspin_set(
             flit,
             (uint64_t)multi_updt_eop,
-            dspin_param::FROM_MC_EOP);
-
-        dspin_param::dspin_set(
+            DspinDhccpParam::FROM_MC_EOP);
+
+        DspinDhccpParam::dspin_set(
             flit,
             multi_updt_be,
-            dspin_param::MULTI_UPDT_BE);
-
-        dspin_param::dspin_set(
+            DspinDhccpParam::MULTI_UPDT_BE);
+
+        DspinDhccpParam::dspin_set(
             flit,
             multi_updt_data,
-            dspin_param::MULTI_UPDT_DATA);
+            DspinDhccpParam::MULTI_UPDT_DATA);
 
         p_dspin_out.write = true;
@@ -7598,32 +7611,32 @@
         if(m_cas_to_cc_send_inst_fifo.read())
         {
-          multi_updt_type = dspin_param::TYPE_MULTI_UPDT_INST;
+          multi_updt_type = DspinDhccpParam::TYPE_MULTI_UPDT_INST;
         }
         else 
         {
-          multi_updt_type = dspin_param::TYPE_MULTI_UPDT_DATA;
+          multi_updt_type = DspinDhccpParam::TYPE_MULTI_UPDT_DATA;
         }
 
         uint64_t flit = 0;
 
-        dspin_param::dspin_set(
+        DspinDhccpParam::dspin_set(
             flit,
             m_cas_to_cc_send_srcid_fifo.read(),
-            dspin_param::MULTI_UPDT_DEST);
-
-        dspin_param::dspin_set(
+            DspinDhccpParam::MULTI_UPDT_DEST);
+
+        DspinDhccpParam::dspin_set(
             flit,
             m_srcid_ini,
-            dspin_param::MULTI_UPDT_SRCID);
-
-        dspin_param::dspin_set(
+            DspinDhccpParam::MULTI_UPDT_SRCID);
+
+        DspinDhccpParam::dspin_set(
             flit,
             r_cas_to_cc_send_trdid.read(),
-            dspin_param::MULTI_UPDT_UPDT_INDEX);
-
-        dspin_param::dspin_set(
+            DspinDhccpParam::MULTI_UPDT_UPDT_INDEX);
+
+        DspinDhccpParam::dspin_set(
             flit,
             multi_updt_type,
-            dspin_param::FROM_MC_TYPE);
+            DspinDhccpParam::FROM_MC_TYPE);
 
         p_dspin_out.write = true;
@@ -7637,13 +7650,13 @@
         uint64_t flit = 0;
 
-        dspin_param::dspin_set(
+        DspinDhccpParam::dspin_set(
             flit,
             r_cas_to_cc_send_index.read(),
-            dspin_param::MULTI_UPDT_WORD_INDEX);
-
-        dspin_param::dspin_set(
+            DspinDhccpParam::MULTI_UPDT_WORD_INDEX);
+
+        DspinDhccpParam::dspin_set(
             flit,
             r_cas_to_cc_send_nline.read(),
-            dspin_param::MULTI_UPDT_NLINE);
+            DspinDhccpParam::MULTI_UPDT_NLINE);
 
         p_dspin_out.write = true;
@@ -7667,18 +7680,18 @@
         uint64_t flit = 0;
 
-        dspin_param::dspin_set(
+        DspinDhccpParam::dspin_set(
             flit,
             (uint64_t)multi_updt_eop,
-            dspin_param::FROM_MC_EOP);
-
-        dspin_param::dspin_set(
+            DspinDhccpParam::FROM_MC_EOP);
+
+        DspinDhccpParam::dspin_set(
             flit,
             0xF,
-            dspin_param::MULTI_UPDT_BE);
-
-        dspin_param::dspin_set(
+            DspinDhccpParam::MULTI_UPDT_BE);
+
+        DspinDhccpParam::dspin_set(
             flit,
             r_cas_to_cc_send_wdata.read(),
-            dspin_param::MULTI_UPDT_DATA);
+            DspinDhccpParam::MULTI_UPDT_DATA);
 
         p_dspin_out.write = true;
@@ -7692,18 +7705,18 @@
         uint64_t flit = 0;
 
-        dspin_param::dspin_set(
+        DspinDhccpParam::dspin_set(
             flit,
             1ULL,
-            dspin_param::FROM_MC_EOP);
-
-        dspin_param::dspin_set(
+            DspinDhccpParam::FROM_MC_EOP);
+
+        DspinDhccpParam::dspin_set(
             flit,
             0xF,
-            dspin_param::MULTI_UPDT_BE);
-
-        dspin_param::dspin_set(
+            DspinDhccpParam::MULTI_UPDT_BE);
+
+        DspinDhccpParam::dspin_set(
             flit,
             r_cas_to_cc_send_wdata_high.read(),
-            dspin_param::MULTI_UPDT_DATA);
+            DspinDhccpParam::MULTI_UPDT_DATA);
 
         p_dspin_out.write = true;
