Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/SelfTest/src/main.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/SelfTest/src/main.cpp	(revision 124)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/SelfTest/src/main.cpp	(revision 128)
@@ -56,4 +56,6 @@
       
       test (name,param);
+
+      delete param;
     }
   catch (morpheo::ErrorMorpheo & error)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Types.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Types.h	(revision 124)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Types.h	(revision 128)
@@ -5,5 +5,5 @@
  * $Id$
  *
- * [ Description ]
+ * [ Description ]
  * 
  */
@@ -18,5 +18,5 @@
 
 //   typedef uint32_t Taddress_t;
-  typedef uint32_t Tdata_t;
+  typedef Tgeneral_data_t Tdata_t;
  
 }; // end namespace registerfile_monolithic
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_transition.cpp	(revision 124)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_transition.cpp	(revision 128)
@@ -22,8 +22,16 @@
     log_function(RegisterFile_Monolithic,FUNCTION,_name.c_str());
 
-    if (_param->_have_init_value and (PORT_READ(in_NRESET) == 0))
+    if (PORT_READ(in_NRESET) == 0)
       {
-        for (uint32_t i=0; i<_param->_nb_word; ++i)
-          reg_DATA[i] = fromString<Tdata_t>(_param->_init_value);
+        if (_param->_have_init_value)
+          {
+            for (uint32_t i=0; i<_param->_nb_word; ++i)
+              reg_DATA[i] = fromString<Tdata_t>(_param->_init_value);
+          }
+        else
+          {
+            for (uint32_t i=0; i<_param->_nb_word; ++i)
+              reg_DATA[i] = 0;
+          }
       }
     else
@@ -31,4 +39,6 @@
         for (uint32_t i=0; i<_param->_nb_port_write; i++)
           {
+            log_printf(TRACE,RegisterFile,FUNCTION,"  * WRITE [%d] : %d",i,PORT_READ(in_WRITE_VAL[i]));
+
             // Have a write?
             if ( PORT_READ(in_WRITE_VAL[i]) == true)
@@ -38,9 +48,18 @@
                   (*_stat_nb_write) ++;
 #endif    
-                
+
                 Taddress_t address = (_param->_have_port_address)?PORT_READ(in_WRITE_ADDRESS[i]):0;
                 Tdata_t    data    = PORT_READ(in_WRITE_DATA   [i]);
+
+                log_printf(TRACE,RegisterFile,FUNCTION,"    * address : %d",address);
+                log_printf(TRACE,RegisterFile,FUNCTION,"    * gloup");
+                log_printf(TRACE,RegisterFile,FUNCTION,"    * data    : %d",data);
                 
                 log_printf(TRACE,RegisterFile,FUNCTION,"  * [%d] <- %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data));
+
+#ifdef DEBUG_TEST
+                if (address >= _param->_nb_word)
+                  throw ERRORMORPHEO(FUNCTION,toString(_("Address (%d) is invalid (size : %d).\n"),address,_param->_nb_word));
+#endif
                 
                 // Write in registerFile
@@ -50,4 +69,6 @@
         for (uint32_t i=0; i<_param->_nb_port_read_write; i++)
           {
+            log_printf(TRACE,RegisterFile,FUNCTION,"  * READ_WRITE [%d] : %d",i,PORT_READ(in_READ_WRITE_VAL[i]));
+
             // Have a read_write?
             if (PORT_READ(in_READ_WRITE_VAL[i]) == true)
@@ -65,4 +86,10 @@
                     log_printf(TRACE,RegisterFile,FUNCTION,"  * [%d] <- %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data));
                     
+
+#ifdef DEBUG_TEST
+                if (address >= _param->_nb_word)
+                  throw ERRORMORPHEO(FUNCTION,toString(_("Address (%d) is invalid (size : %d).\n"),address,_param->_nb_word));
+#endif
+
                     // Write in registerFile
                     reg_DATA[address] = data;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h	(revision 124)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h	(revision 128)
@@ -5,5 +5,5 @@
  * $Id$
  *
- * [ Description ]
+ * [ Description ]
  * 
  */
@@ -19,5 +19,5 @@
 
 //typedef uint32_t Taddress_t;
-  typedef uint32_t Tdata_t;
+  typedef Tgeneral_data_t Tdata_t;
 
 }; // end namespace registerfile_multi_banked
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_transition.cpp	(revision 124)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_transition.cpp	(revision 128)
@@ -25,9 +25,18 @@
     // call function pointer
 //     (this->*function_transition) ();
-    if (_param->_have_init_value and (PORT_READ(in_NRESET) == 0))
+    if (PORT_READ(in_NRESET) == 0)
       {
-        for (uint32_t i=0; i<_param->_nb_bank; ++i)
-          for (uint32_t j=0; j<_param->_nb_word; ++j)
-          reg_DATA[i][j] = fromString<Tdata_t>(_param->_init_value);
+        if (_param->_have_init_value)
+          {
+            for (uint32_t i=0; i<_param->_nb_bank; ++i)
+              for (uint32_t j=0; j<_param->_nb_word; ++j)
+                reg_DATA[i][j] = fromString<Tdata_t>(_param->_init_value);
+          }
+        else
+          {
+            for (uint32_t i=0; i<_param->_nb_bank; ++i)
+              for (uint32_t j=0; j<_param->_nb_word; ++j)
+                reg_DATA[i][j] = 0;
+          }
       }
     else
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/RegisterFile_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/RegisterFile_deallocation.cpp	(revision 124)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/RegisterFile_deallocation.cpp	(revision 128)
@@ -22,4 +22,13 @@
     delete in_NRESET;
     // ----- Interface Read
+    for (uint32_t i=0; i<_param->_nb_port_read; i++)
+      {
+    delete     in_READ_VAL    [i];
+    delete    out_READ_ACK    [i];
+    if (_param->_have_port_address == true)
+    delete     in_READ_ADDRESS[i];
+    delete    out_READ_DATA   [i];
+      }
+
     delete []  in_READ_VAL    ;
     delete [] out_READ_ACK    ;
@@ -29,4 +38,13 @@
 
     // ----- Interface Write
+    for (uint32_t i=0; i<_param->_nb_port_write; i++)
+      {
+    delete     in_WRITE_VAL    [i];
+    delete    out_WRITE_ACK    [i];
+    if (_param->_have_port_address == true)
+    delete     in_WRITE_ADDRESS[i];
+    delete     in_WRITE_DATA   [i];
+      }
+
     delete []  in_WRITE_VAL    ;
     delete [] out_WRITE_ACK    ;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Sort.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Sort.cpp	(revision 124)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Sort.cpp	(revision 128)
@@ -71,4 +71,5 @@
     if (usage_is_set(_usage,USE_SYSTEMC))
       {
+# if defined(STATISTICS) or defined(VHDL_TESTBENCH)
 	log_printf(INFO,Sort,FUNCTION,"Method - transition");
 
@@ -77,7 +78,8 @@
 	sensitive << (*(in_CLOCK)).pos();
 	
-# ifdef SYSTEMCASS_SPECIFIC
+#  ifdef SYSTEMCASS_SPECIFIC
 	// List dependency information
-# endif    
+#  endif    
+# endif
 
 	log_printf(INFO,Sort,FUNCTION,"Method - genMealy");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Sort_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Sort_transition.cpp	(revision 124)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Sort_transition.cpp	(revision 128)
@@ -14,5 +14,4 @@
 namespace generic {
 namespace sort {
-
 
 #undef  FUNCTION
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Types.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Types.h	(revision 124)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Types.h	(revision 128)
@@ -47,4 +47,5 @@
   public  : entry_t () 
     {
+      _entry = NULL;
     };
   public  : entry_t (uint32_t size) : _size (size)
@@ -53,11 +54,18 @@
       
       // initialisation
-      for (uint32_t i=0; i<size; i++)
-	_entry [i] = false;
+      reset ();
     }
     
   public : ~entry_t ()
     {
-      delete _entry;
+      if (_entry != NULL)
+        delete [] _entry;
+    }
+
+  public : void reset ()
+    {
+      // initialisation
+      for (uint32_t i=0; i<_size; i++)
+	_entry [i] = false;
     }
     
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_deallocation.cpp	(revision 124)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_deallocation.cpp	(revision 128)
@@ -29,5 +29,8 @@
     DELETE1_SIGNAL(out_ACCESS_VICTIM ,_param->_nb_access,log2(_param->_nb_entity   ));
 
-    DELETE1(reg_TABLE             ,_param->_size_table);
+    for (uint32_t i=0; i<_param->_size_table; i++)
+    delete    reg_TABLE [i];
+    delete [] reg_TABLE;
+        
     DELETE1(internal_ACCESS_ACK   ,_param->_nb_access);
     DELETE1(internal_ACCESS_VICTIM,_param->_nb_access);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_genMealy.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_genMealy.cpp	(revision 124)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_genMealy.cpp	(revision 128)
@@ -22,4 +22,9 @@
 	Taddress_t address = (_param->_size_table>1)?PORT_READ(in_ACCESS_ADDRESS[i]):0;
 
+#ifdef DEBUG_TEST
+        if (address >= _param->_size_table)
+          throw ERRORMORPHEO(FUNCTION,toString(_("Address (%d) is invalid (size : %d).\n"),address,_param->_size_table));
+#endif
+
 	internal_ACCESS_VICTIM[i] = reg_TABLE[address]->access();
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_transition.cpp	(revision 124)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_transition.cpp	(revision 128)
@@ -17,32 +17,45 @@
   void Victim_Pseudo_LRU::transition (void)
   {
-    for (uint32_t i=0; i<_param->_nb_access; i++)
+
+    if (PORT_READ(in_NRESET) == 0)
       {
-	if (PORT_READ (in_ACCESS_VAL[i]) and internal_ACCESS_ACK)
-	  {
-	    Taddress_t address = (_param->_size_table>1)?PORT_READ(in_ACCESS_ADDRESS[i]):0;
-	    Tentity_t  entity  = 0;
+        for (uint32_t i=0; i<_param->_size_table; ++i)
+          reg_TABLE[i]->reset();
+      }
+    else
+      {
+        for (uint32_t i=0; i<_param->_nb_access; i++)
+          {
+            if (PORT_READ (in_ACCESS_VAL[i]) and internal_ACCESS_ACK)
+              {
+                Taddress_t address = (_param->_size_table>1)?PORT_READ(in_ACCESS_ADDRESS[i]):0;
+                Tentity_t  entity  = 0;
+                
+                if (PORT_READ(in_ACCESS_HIT [i]))
+                  {
+                    // Hit  : don't need a victim
+// #ifdef STATISTICS
+// 		    _stat_nb_update ++;
+// #endif
+                    entity = PORT_READ(in_ACCESS_ENTITY[i]);
+                  }
+                else
+                  {
+                    // Miss : need victim
+// #ifdef STATISTICS
+// 		    _stat_nb_access ++;
+// #endif
+                    entity = internal_ACCESS_VICTIM[i];
+                  }
+                
+#ifdef DEBUG_TEST
+                if (address >= _param->_size_table)
+                  throw ERRORMORPHEO(FUNCTION,toString(_("Address (%d) is invalid (size : %d).\n"),address, _param->_size_table));
+#endif
+                reg_TABLE[address]->update(entity);
+              }
+          }//end for i
+      }
 
-	    if (PORT_READ(in_ACCESS_HIT [i]))
-	      {
-		// Hit  : don't need a victim
-// #ifdef STATISTICS
-// 		_stat_nb_update ++;
-// #endif
-		entity = PORT_READ(in_ACCESS_ENTITY[i]);
-	      }
-	    else
-	      {
-		// Miss : need victim
-// #ifdef STATISTICS
-// 		_stat_nb_access ++;
-// #endif
-		entity = internal_ACCESS_VICTIM[i];
-	      }
-
-	    reg_TABLE[address]->update(entity);
-	  }
-      }//end for i
-    
 #if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     end_cycle ();
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/src/Victim_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/src/Victim_deallocation.cpp	(revision 124)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/src/Victim_deallocation.cpp	(revision 128)
@@ -38,4 +38,15 @@
 	delete    in_NRESET;
 
+        for (uint32_t i=0; i<_param->_nb_access; ++i)
+          {
+	delete     in_ACCESS_VAL    [i];
+	delete    out_ACCESS_ACK    [i];
+	if (_param->_have_port_address)
+	delete     in_ACCESS_ADDRESS[i];
+	delete     in_ACCESS_HIT    [i];
+	delete     in_ACCESS_ENTITY [i];
+	delete    out_ACCESS_VICTIM [i];
+          }
+
 	delete []  in_ACCESS_VAL    ;
 	delete [] out_ACCESS_ACK    ;
@@ -47,5 +58,4 @@
       }
 
-
     log_printf(FUNC,Victim,FUNCTION,"End");
   };
