Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Load_store_unit.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Load_store_unit.h	(revision 123)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Load_store_unit.h	(revision 124)
@@ -14,5 +14,4 @@
 #endif
 
-#include <iostream>
 #include "Common/include/ToString.h"
 #include "Common/include/Debug.h"
@@ -31,4 +30,7 @@
 #endif
 #include "Behavioural/include/Usage.h"
+
+#include <iostream>
+#include <fstream>
 
 namespace morpheo {
@@ -194,5 +196,11 @@
   private   : Tcontrol_t                      internal_DCACHE_REQ_VAL         ;
   private   : Tselect_queue_t                 internal_DCACHE_REQ_SELECT_QUEUE;
-#endif
+
+#if defined(DEBUG) and defined(DEBUG_Load_store_unit) and (DEBUG_Load_store_unit == true)
+  private   : std::ofstream                 * memory_log_file;
+#endif
+
+#endif
+
 
     // -----[ methods ]---------------------------------------------------
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Parameters.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Parameters.h	(revision 123)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Parameters.h	(revision 124)
@@ -43,4 +43,6 @@
   public : uint32_t            _nb_general_register          ;
   public : uint32_t            _nb_special_register          ;
+  public : uint32_t            _nb_thread                    ;
+  public : bool              * _num_thread_valid             ; //[nb_thread]
 
 //public : uint32_t            _size_address_store_queue             ;
@@ -66,5 +68,5 @@
   public : Tdcache_address_t   _mask_address_msb                     ;
   public : Tdcache_address_t   _mask_check_hit_byte                  ;
-  
+
     //-----[ methods ]-----------------------------------------------------------
   public : Parameters  (uint32_t            size_store_queue       ,
@@ -84,4 +86,6 @@
 			uint32_t            nb_general_register    ,
 			uint32_t            nb_special_register    ,
+                        uint32_t            nb_thread              ,
+                        bool              * num_thread_valid       , //[nb_thread]
                         bool                is_toplevel=false);
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_allocation.cpp	(revision 123)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_allocation.cpp	(revision 124)
@@ -9,4 +9,5 @@
 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Load_store_unit.h"
 #include "Behavioural/include/Allocation.h"
+#include "Common/include/Filename.h"
 
 namespace morpheo                    {
@@ -177,4 +178,24 @@
 #endif
 
+#if defined(DEBUG) and defined(DEBUG_Load_store_unit) and (DEBUG_Load_store_unit == true)
+    directory_init ();
+
+    memory_log_file = new std::ofstream [_param->_nb_thread];
+    for (uint32_t i=0; i<_param->_nb_thread; ++i)
+      if (_param->_num_thread_valid [i])
+        {
+          
+          std::string filename = morpheo::filename(MORPHEO_LOG,
+                                                   "Memory_access-thread_"+toString(i),
+                                                   "",
+                                                   "log",
+                                                   _simulation_file_with_date,
+                                                   _simulation_file_with_pid ,
+                                                   true);
+          
+          memory_log_file [i].open(filename.c_str() ,std::ios::out | std::ios::trunc);
+        }
+#endif
+
     log_printf(FUNC,Load_store_unit,FUNCTION,"End");
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_deallocation.cpp	(revision 123)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_deallocation.cpp	(revision 124)
@@ -121,4 +121,11 @@
     delete    _component;
 
+#if defined(DEBUG) and defined(DEBUG_Load_store_unit) and (DEBUG_Load_store_unit == true)
+    for (uint32_t i=0; i<_param->_nb_thread; ++i)
+      if (_param->_num_thread_valid [i])
+        {
+          memory_log_file [i].close();
+        }
+#endif
 
     log_printf(FUNC,Load_store_unit,FUNCTION,"End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_transition.cpp	(revision 123)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_transition.cpp	(revision 124)
@@ -8,4 +8,5 @@
 
 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Load_store_unit.h"
+#include "Behavioural/include/Identification.h"
 
 namespace morpheo                    {
@@ -950,4 +951,23 @@
 		  _store_queue [reg_STORE_QUEUE_PTR_READ]._state = STORE_QUEUE_COMMIT;
 
+#if defined(DEBUG) and defined(DEBUG_Load_store_unit) and (DEBUG_Load_store_unit == true)
+	            {
+	              // log file
+                      Tcontext_t num_thread    = get_num_thread(_store_queue [reg_STORE_QUEUE_PTR_READ]._context_id   , _param->_size_context_id   ,
+                                                                _store_queue [reg_STORE_QUEUE_PTR_READ]._front_end_id , _param->_size_front_end_id ,
+                                                                _store_queue [reg_STORE_QUEUE_PTR_READ]._ooo_engine_id, _param->_size_ooo_engine_id);
+
+	              memory_log_file [num_thread] 
+	            	<< "[" << simulation_cycle() << "] "
+	            	<< std::hex
+                        << "@ 0x" << std::setfill('0') << std::setw(_param->_size_general_data/4) << _store_queue [reg_STORE_QUEUE_PTR_READ]._address << " -[ Write ]-> 0x" << std::setfill('0') << std::setw(_param->_size_general_data/4) << _store_queue [reg_STORE_QUEUE_PTR_READ]._wdata << " "
+	            	<< std::dec
+	            	<< "{" << toString(_store_queue [reg_STORE_QUEUE_PTR_READ]._operation) << "}";
+	              
+	              memory_log_file [num_thread] << std::endl;
+	            }
+#endif	    
+
+
 		  break;
 		}
@@ -1125,4 +1145,22 @@
                 _load_queue [packet_id]._rdata = data;
 		
+#if defined(DEBUG) and defined(DEBUG_Load_store_unit) and (DEBUG_Load_store_unit == true)
+                {
+                  // log file
+                  Tcontext_t num_thread    = get_num_thread(_load_queue [packet_id]._context_id   , _param->_size_context_id   ,
+                                                            _load_queue [packet_id]._front_end_id , _param->_size_front_end_id ,
+                                                            _load_queue [packet_id]._ooo_engine_id, _param->_size_ooo_engine_id);
+                  
+                  memory_log_file [num_thread] 
+                    << "[" << simulation_cycle() << "] "
+                    << std::hex
+                    << "@ 0x" << std::setfill('0') << std::setw(_param->_size_general_data/4) << _load_queue [packet_id]._address << " -[ Read  ]-> 0x" << std::setfill('0') << std::setw(_param->_size_general_data/4) << _load_queue [packet_id]._rdata << " "
+                    << std::dec
+                    << "{" << toString(_load_queue [packet_id]._operation) << "}";
+                  
+                  memory_log_file [num_thread] << std::endl;
+                }
+#endif	    
+
 		if (error != DCACHE_ERROR_NONE)
 		  {
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Parameters.cpp	(revision 123)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Parameters.cpp	(revision 124)
@@ -36,4 +36,6 @@
 			  uint32_t            nb_general_register    ,
 			  uint32_t            nb_special_register    ,
+                          uint32_t            nb_thread              ,
+                          bool              * num_thread_valid       , //[nb_thread]
                           bool                is_toplevel)
   {
@@ -54,4 +56,6 @@
     _nb_general_register                   = nb_general_register    ;
     _nb_special_register                   = nb_special_register    ;
+    _nb_thread                             = nb_thread              ;
+    _num_thread_valid                      = num_thread_valid       ;
     
     _size_speculative_access_queue_ptr     = log2(size_speculative_access_queue);
@@ -149,4 +153,5 @@
   {
     log_printf(FUNC,Load_store_unit,FUNCTION,"Begin");
+
     log_printf(FUNC,Load_store_unit,FUNCTION,"End");
   };
