Index: trunk/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp
===================================================================
--- trunk/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp	(revision 422)
+++ trunk/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp	(revision 427)
@@ -2159,6 +2159,6 @@
       // coherence update required
       {
-        if(!r_write_to_cc_send_multi_req.read()   &&
-            !r_write_to_cc_send_brdcast_req.read())
+        if(!r_write_to_cc_send_multi_req.read() &&
+           !r_write_to_cc_send_brdcast_req.read())
         {
           r_write_fsm = WRITE_UPT_LOCK;
@@ -2276,44 +2276,40 @@
       // and write the first copy in the FIFO
       // send the request if only one copy
-
-      if(!r_write_to_cc_send_multi_req.read() &&
-          !r_write_to_cc_send_brdcast_req.read())    // no pending coherence request
-      {
-        r_write_to_cc_send_brdcast_req  = false;
-        r_write_to_cc_send_trdid        = r_write_upt_index.read();
-        r_write_to_cc_send_nline        = m_nline[(addr_t)(r_write_address.read())];
-        r_write_to_cc_send_index        = r_write_word_index.read();
-        r_write_to_cc_send_count        = r_write_word_count.read();
-
-        for(size_t i=0; i<m_words ; i++) r_write_to_cc_send_be[i]=r_write_be[i].read();
-
-        size_t min = r_write_word_index.read();
-        size_t max = r_write_word_index.read() + r_write_word_count.read();
-        for(size_t i=min ; i<max ; i++) r_write_to_cc_send_data[i] = r_write_data[i];
-
-        if((r_write_copy.read() != r_write_srcid.read()) or(r_write_pktid.read() == TYPE_SC) or
+      
+      assert(not r_write_to_cc_send_multi_req.read()   and
+             not r_write_to_cc_send_brdcast_req.read() and
+             "Error in VCI_MEM_CACHE : pending multicast or broadcast\n"
+             "transaction in WRITE_UPT_REQ state"
+            );
+
+      r_write_to_cc_send_brdcast_req  = false;
+      r_write_to_cc_send_trdid        = r_write_upt_index.read();
+      r_write_to_cc_send_nline        = m_nline[(addr_t)(r_write_address.read())];
+      r_write_to_cc_send_index        = r_write_word_index.read();
+      r_write_to_cc_send_count        = r_write_word_count.read();
+
+      for(size_t i=0; i<m_words ; i++) r_write_to_cc_send_be[i]=r_write_be[i].read();
+
+      size_t min = r_write_word_index.read();
+      size_t max = r_write_word_index.read() + r_write_word_count.read();
+      for(size_t i=min ; i<max ; i++) r_write_to_cc_send_data[i] = r_write_data[i];
+
+      if((r_write_copy.read() != r_write_srcid.read()) or(r_write_pktid.read() == TYPE_SC) or
 #if L1_MULTI_CACHE
-            (r_write_copy_cache.read() != r_write_pktid.read()) or
-#endif
-            r_write_copy_inst.read())
-        {
-          // put the first srcid in the fifo
-          write_to_cc_send_fifo_put     = true;
-          write_to_cc_send_fifo_inst    = r_write_copy_inst.read();
-          write_to_cc_send_fifo_srcid   = r_write_copy.read();
+          (r_write_copy_cache.read() != r_write_pktid.read()) or
+#endif
+          r_write_copy_inst.read())
+      {
+        // put the first srcid in the fifo
+        write_to_cc_send_fifo_put     = true;
+        write_to_cc_send_fifo_inst    = r_write_copy_inst.read();
+        write_to_cc_send_fifo_srcid   = r_write_copy.read();
 #if L1_MULTI_CACHE
-          write_to_cc_send_fifo_cache_id= r_write_copy_cache.read();
-#endif
-          if(r_write_count.read() == 1)
-          {
-            r_write_fsm = WRITE_IDLE;
-            r_write_to_cc_send_multi_req = true;
-          }
-          else
-          {
-            r_write_fsm = WRITE_UPT_NEXT;
-            r_write_to_dec = false;
-
-          }
+        write_to_cc_send_fifo_cache_id= r_write_copy_cache.read();
+#endif
+        if(r_write_count.read() == 1)
+        {
+          r_write_fsm = WRITE_IDLE;
+          r_write_to_cc_send_multi_req = true;
         }
         else
@@ -2321,17 +2317,26 @@
           r_write_fsm = WRITE_UPT_NEXT;
           r_write_to_dec = false;
-        }
+
+        }
+      }
+      else
+      {
+        r_write_fsm = WRITE_UPT_NEXT;
+        r_write_to_dec = false;
+      }
 
 #if DEBUG_MEMC_WRITE
-        if(m_debug_write_fsm)
-        {
-          std::cout << "  <MEMC " << name() << " WRITE_UPT_REQ> Post first request to CC_SEND FSM"
-                    << " / srcid = " << std::dec << r_write_copy.read()
-                    << " / inst = "  << std::dec << r_write_copy_inst.read() << std::endl;
-          if(r_write_count.read() == 1)
-            std::cout << "         ... and this is the last" << std::endl;
-        }
-#endif
-      }
+      if(m_debug_write_fsm)
+      {
+        std::cout
+          << "  <MEMC "    << name()
+          << " WRITE_UPT_REQ> Post first request to CC_SEND FSM"
+          << " / srcid = " << std::dec << r_write_copy.read()
+          << " / inst = "  << std::dec << r_write_copy_inst.read() << std::endl;
+
+        if(r_write_count.read() == 1)
+          std::cout << "         ... and this is the last" << std::endl;
+      }
+#endif
       break;
     }
