Index: /trunk/lib/generic_llsc_global_table/include/generic_llsc_global_table.h
===================================================================
--- /trunk/lib/generic_llsc_global_table/include/generic_llsc_global_table.h	(revision 522)
+++ /trunk/lib/generic_llsc_global_table/include/generic_llsc_global_table.h	(revision 523)
@@ -453,5 +453,5 @@
     }
     */
-    inline void sw(const addr_t nline, unsigned int min, unsigned int max)
+    inline void sw(const addr_t ad_min, const addr_t ad_max)
     //  This method checks if there is / are valid registration(s) for the given
     //  range and, in case of hit(s), invalidates the registration(s)
@@ -466,8 +466,9 @@
 
         // for every address in the given range ...
-        for (unsigned int i = min; i <= max; i++)
+        for (addr_t i = ad_min; i <= ad_max; i++)
         {
             //  Is there a registration for the given address ?
-            int pos = hitAddr(nline + i * 4);
+            int pos = hitAddr(i);
+
             //  If there is one, invalidate it
             if (pos >= 0)
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 522)
+++ /trunk/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp	(revision 523)
@@ -2757,8 +2757,8 @@
                         {
                             // We enter here if it is a SW command or an already tested SC command 
-
-                            m_llsc_table.sw( m_nline[(addr_t)r_write_address.read()],
-                                    r_write_word_index.read(),
-                                    r_write_word_index.read() + r_write_word_count.read());
+                            addr_t min = r_write_address.read();
+                            addr_t max = r_write_address.read() + r_write_word_count.read() - 1; 
+
+                            m_llsc_table.sw(min, max);
 
                             r_write_fsm = WRITE_DIR_LOCK;
@@ -5278,7 +5278,5 @@
 
                     // The CAS is a success => sw access to the llsc_global_table
-                    m_llsc_table.sw( m_nline[(addr_t)m_cmd_cas_addr_fifo.read()],
-                            m_x[(addr_t)(m_cmd_cas_addr_fifo.read())],
-                            m_x[(addr_t)(m_cmd_cas_addr_fifo.read())] );
+                    m_llsc_table.sw(m_cmd_cas_addr_fifo.read(), m_cmd_cas_addr_fifo.read());
 
                     // test coherence request
