Index: trunk/modules/vci_mem_cache_v4/caba/source/include/vci_mem_cache_v4.h
===================================================================
--- trunk/modules/vci_mem_cache_v4/caba/source/include/vci_mem_cache_v4.h	(revision 289)
+++ trunk/modules/vci_mem_cache_v4/caba/source/include/vci_mem_cache_v4.h	(revision 291)
@@ -54,4 +54,5 @@
 #include "mapping_table.h"
 #include "int_tab.h"
+#include "generic_llsc_global_table.h"
 #include "mem_cache_directory_v4.h"
 #include "xram_transaction_v4.h"
@@ -422,4 +423,12 @@
       CacheData       m_cache_data;       // data array[set][way][word]
       HeapDirectory   m_heap;             // heap for copies
+      GenericLLSCGlobalTable
+      <
+        32  ,   // desired number of slots
+        4096,   // number of processors in the system
+        8000,   // registratioÃ§n life span (in # of LL operations)
+        typename vci_param::fast_addr_t // address type
+      >
+      m_llsc_table;       // ll/sc global registration table
 
       // adress masks
@@ -491,4 +500,6 @@
       sc_signal<size_t>   r_read_next_ptr;   // Next entry to point to
       sc_signal<bool>     r_read_last_free;  // Last free entry
+      sc_signal<typename vci_param::fast_addr_t>
+                          r_read_ll_key;     // LL key returned by the llsc_global_table
 
       // Buffer between READ fsm and IXR_CMD fsm (ask a missing cache line to XRAM)
@@ -505,4 +516,6 @@
       sc_signal<size_t>   r_read_to_tgt_rsp_word;   // first word of the response
       sc_signal<size_t>   r_read_to_tgt_rsp_length; // length of the response
+      sc_signal<typename vci_param::fast_addr_t>
+                          r_read_to_tgt_rsp_ll_key; // LL key returned by the llsc_global_table
 
       ///////////////////////////////////////////////////////////////
@@ -533,10 +546,13 @@
       sc_signal<size_t>   r_write_trt_index;  // index in Transaction Table
       sc_signal<size_t>   r_write_upt_index;  // index in Update Table
+      sc_signal<bool>     r_write_sc_fail;    // sc command failed
+      sc_signal<bool>     r_write_pending_sc; // sc command pending in WRITE fsm
 
       // Buffer between WRITE fsm and TGT_RSP fsm (acknowledge a write command from L1)
-      sc_signal<bool>     r_write_to_tgt_rsp_req;   // valid request
-      sc_signal<size_t>   r_write_to_tgt_rsp_srcid; // transaction srcid
-      sc_signal<size_t>   r_write_to_tgt_rsp_trdid; // transaction trdid
-      sc_signal<size_t>   r_write_to_tgt_rsp_pktid; // transaction pktid
+      sc_signal<bool>     r_write_to_tgt_rsp_req;     // valid request
+      sc_signal<size_t>   r_write_to_tgt_rsp_srcid;   // transaction srcid
+      sc_signal<size_t>   r_write_to_tgt_rsp_trdid;   // transaction trdid
+      sc_signal<size_t>   r_write_to_tgt_rsp_pktid;   // transaction pktid
+      sc_signal<bool>     r_write_to_tgt_rsp_sc_fail; // sc command failed
 
       // Buffer between WRITE fsm and IXR_CMD fsm (ask a missing cache line to XRAM)
@@ -721,4 +737,6 @@
       sc_signal<size_t>   r_xram_rsp_to_tgt_rsp_length; // length of the response
       sc_signal<bool>     r_xram_rsp_to_tgt_rsp_rerror; // send error to requester
+      sc_signal<typename vci_param::fast_addr_t>
+                          r_xram_rsp_to_tgt_rsp_ll_key; // LL key returned by the llsc_global_table
 
       // Buffer between XRAM_RSP fsm and INIT_CMD fsm (Inval L1 Caches)
Index: trunk/modules/vci_mem_cache_v4/caba/source/include/xram_transaction_v4.h
===================================================================
--- trunk/modules/vci_mem_cache_v4/caba/source/include/xram_transaction_v4.h	(revision 289)
+++ trunk/modules/vci_mem_cache_v4/caba/source/include/xram_transaction_v4.h	(revision 291)
@@ -32,4 +32,5 @@
     std::vector<be_t>   wdata_be;    	// be for each data in the write buffer
     bool                rerror;         // error returned by xram
+    data_t              ll_key;         // LL key returned by the llsc_global_table
 
     /////////////////////////////////////////////////////////////////////
@@ -127,4 +128,5 @@
         wdata.assign(source.wdata.begin(),source.wdata.end());	
         rerror      = source.rerror;
+        ll_key      = source.ll_key;
     }
 
@@ -325,4 +327,5 @@
     // - data : the data to write (in case of write)
     // - data_be : the mask of the data to write (in case of write)
+    // - ll_key  : the ll key (if any) returned by the llsc_global_table
     /////////////////////////////////////////////////////////////////////
     void set(const size_t index,
@@ -336,5 +339,6 @@
             const size_t word_index,
             const std::vector<be_t> &data_be,
-            const std::vector<data_t> &data) 
+            const std::vector<data_t> &data, 
+            const data_t ll_key = 0) 
     {
         assert( (index < size_tab) 
@@ -354,4 +358,5 @@
         tab[index].read_length	    = read_length;
         tab[index].word_index	    = word_index;
+        tab[index].ll_key   	    = ll_key;
         for(size_t i=0; i<tab[index].wdata.size(); i++) 
         {
