Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/Makefile
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/Makefile	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/Makefile	(revision 88)
@@ -24,4 +24,6 @@
 library_clean			: Return_Address_Stack_library_clean
 
+local_clean			:
+
 include                         $(DIR_COMPONENT)/Makefile.deps
 include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/config_mono_context.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/config_mono_context.cfg	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/config_mono_context.cfg	(revision 88)
@@ -3,5 +3,5 @@
 2	4	*2	# size_queue     [0]
 32	32	*2	# size_address   
-1	1	+1	# nb_inst_predict
-1	1	+1	# nb_inst_decod  
-1	1	+1	# nb_inst_update 
+1	4	*4	# nb_inst_predict
+1	4	*4	# nb_inst_decod  
+1	4	*4	# nb_inst_update 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/config_multi_context.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/config_multi_context.cfg	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/config_multi_context.cfg	(revision 88)
@@ -4,7 +4,7 @@
 4	4	*2	# size_queue     [1]
 8	8	*2	# size_queue     [2]
-16	16	*2	# size_queue     [3]
+8 	8 	*2	# size_queue     [3]
 32	32	*2	# size_address   
-1	1	+1	# nb_inst_predict
-1	1	+1	# nb_inst_decod  
-1	1	+1	# nb_inst_update 
+1	4	*4	# nb_inst_predict
+1	4	*4	# nb_inst_decod  
+1	4	*4	# nb_inst_update 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/src/main.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/src/main.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/src/main.cpp	(revision 88)
@@ -60,5 +60,7 @@
 	 _nb_inst_predict ,
 	 _nb_inst_decod   ,
-	 _nb_inst_update  );
+	 _nb_inst_update  ,
+         true // is_toplevel
+         );
       
       msg(_("%s"),param->print(1).c_str());
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/src/test.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/src/test.cpp	(revision 88)
@@ -23,4 +23,14 @@
 #endif
 
+  Tusage_t _usage = USE_ALL;
+
+//   _usage = usage_unset(_usage,USE_SYSTEMC              );
+//   _usage = usage_unset(_usage,USE_VHDL                 );
+//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
+//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
+//   _usage = usage_unset(_usage,USE_POSITION             );
+//   _usage = usage_unset(_usage,USE_STATISTICS           );
+//   _usage = usage_unset(_usage,USE_INFORMATION          );
+
   Return_Address_Stack * _Return_Address_Stack = new Return_Address_Stack 
     (name.c_str(),
@@ -29,5 +39,5 @@
 #endif
      _param,
-     USE_ALL);
+     _usage);
   
 #ifdef SYSTEMC
@@ -403,6 +413,5 @@
 
 	in_DECOD_VAL [port1]->write(0);
-
-      }
+        }
     }
 
@@ -419,29 +428,31 @@
   delete in_NRESET;
 
-  delete []  in_PREDICT_VAL          ;
-  delete [] out_PREDICT_ACK          ;
-  delete []  in_PREDICT_CONTEXT_ID   ; 
-  delete [] out_PREDICT_HIT          ; 
-  delete []  in_PREDICT_PUSH         ;
-  delete []  in_PREDICT_ADDRESS_PUSH ;
-  delete [] out_PREDICT_ADDRESS_POP  ;
-  delete [] out_PREDICT_INDEX        ;
-  delete []  in_DECOD_VAL            ;
-  delete [] out_DECOD_ACK            ;
-  delete []  in_DECOD_PUSH           ;
-  delete []  in_DECOD_CONTEXT_ID     ;
-  delete [] out_DECOD_HIT            ;
-  delete []  in_DECOD_ADDRESS_PUSH   ;
-  delete [] out_DECOD_ADDRESS_POP    ;
-  delete [] out_DECOD_INDEX          ;
-  delete []  in_DECOD_MISS_PREDICTION;
-  delete []  in_UPDATE_VAL           ;
-  delete [] out_UPDATE_ACK           ;
-  delete []  in_UPDATE_CONTEXT_ID    ;
-  delete []  in_UPDATE_PUSH          ;
-  delete []  in_UPDATE_INDEX         ;
-  delete []  in_UPDATE_ADDRESS       ;
-  delete []  in_UPDATE_MISS_PREDICTION;
-  delete []  in_UPDATE_PREDICTION_IFETCH;
+  DELETE1_SC_SIGNAL( in_PREDICT_VAL             ,_param->_nb_inst_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_ACK             ,_param->_nb_inst_predict);
+  DELETE1_SC_SIGNAL( in_PREDICT_CONTEXT_ID      ,_param->_nb_inst_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_HIT             ,_param->_nb_inst_predict);
+  DELETE1_SC_SIGNAL( in_PREDICT_PUSH            ,_param->_nb_inst_predict);
+  DELETE1_SC_SIGNAL( in_PREDICT_ADDRESS_PUSH    ,_param->_nb_inst_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_ADDRESS_POP     ,_param->_nb_inst_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_INDEX           ,_param->_nb_inst_predict);
+
+  DELETE1_SC_SIGNAL( in_DECOD_VAL               ,_param->_nb_inst_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_ACK               ,_param->_nb_inst_decod);
+  DELETE1_SC_SIGNAL( in_DECOD_CONTEXT_ID        ,_param->_nb_inst_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_HIT               ,_param->_nb_inst_decod);
+  DELETE1_SC_SIGNAL( in_DECOD_PUSH              ,_param->_nb_inst_decod);
+  DELETE1_SC_SIGNAL( in_DECOD_ADDRESS_PUSH      ,_param->_nb_inst_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_ADDRESS_POP       ,_param->_nb_inst_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_INDEX             ,_param->_nb_inst_decod);
+  DELETE1_SC_SIGNAL( in_DECOD_MISS_PREDICTION   ,_param->_nb_inst_decod);
+
+  DELETE1_SC_SIGNAL( in_UPDATE_VAL              ,_param->_nb_inst_update);
+  DELETE1_SC_SIGNAL(out_UPDATE_ACK              ,_param->_nb_inst_update);
+  DELETE1_SC_SIGNAL( in_UPDATE_CONTEXT_ID       ,_param->_nb_inst_update);
+  DELETE1_SC_SIGNAL( in_UPDATE_PUSH             ,_param->_nb_inst_update);
+  DELETE1_SC_SIGNAL( in_UPDATE_ADDRESS          ,_param->_nb_inst_update);
+  DELETE1_SC_SIGNAL( in_UPDATE_INDEX            ,_param->_nb_inst_update);
+  DELETE1_SC_SIGNAL( in_UPDATE_MISS_PREDICTION  ,_param->_nb_inst_update);
+  DELETE1_SC_SIGNAL( in_UPDATE_PREDICTION_IFETCH,_param->_nb_inst_update);
 
 #endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/include/Parameters.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/include/Parameters.h	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/include/Parameters.h	(revision 88)
@@ -26,13 +26,13 @@
   public : uint32_t   _nb_context     ;
   public : uint32_t * _size_queue     ;//[nb_context]
-  public : uint32_t   _size_address   ;
+//public : uint32_t   _size_address   ;
   public : uint32_t   _nb_inst_predict;
   public : uint32_t   _nb_inst_decod  ;
   public : uint32_t   _nb_inst_update ;
     
-  public : uint32_t   _size_context_id;
+//public : uint32_t   _size_context_id;
   public : uint32_t   _size_index     ;
 
-  public : uint32_t   _have_port_context_id;
+//public : uint32_t   _have_port_context_id;
 
     //-----[ methods ]-----------------------------------------------------------
@@ -42,7 +42,11 @@
 			uint32_t   nb_inst_predict,
 			uint32_t   nb_inst_decod  ,
-			uint32_t   nb_inst_update );
+			uint32_t   nb_inst_update ,
+                        bool       is_toplevel=false
+                        );
 //   public : Parameters  (Parameters & param) ;
   public : ~Parameters () ;
+
+  public :        void            copy       (void);
 
   public :        Parameters_test msg_error  (void);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Parameters.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Parameters.cpp	(revision 88)
@@ -25,5 +25,7 @@
 			  uint32_t   nb_inst_predict,
 			  uint32_t   nb_inst_decod  ,
-			  uint32_t   nb_inst_update )
+			  uint32_t   nb_inst_update ,
+                          bool       is_toplevel
+                          )
   {
     log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin");
@@ -31,15 +33,21 @@
     _nb_context      = nb_context     ;
     _size_queue      = size_queue     ;
-    _size_address    = size_address   ;
     _nb_inst_predict = nb_inst_predict;
     _nb_inst_decod   = nb_inst_decod  ;
     _nb_inst_update  = nb_inst_update ;
 
-    _size_context_id = log2(nb_context);
     _size_index      = max<uint32_t>(size_queue,nb_context);
 
-    _have_port_context_id = _size_context_id > 0;
+    test();
 
-    test();
+    if (is_toplevel)
+      {
+        _size_instruction_address = size_address   ;
+        _size_context_id          = log2(nb_context);
+        _have_port_context_id     = _size_context_id > 0;
+
+        copy ();
+      }
+
     log_printf(FUNC,Return_Address_Stack,FUNCTION,"End");
   };
@@ -62,4 +70,12 @@
   };
 
+#undef  FUNCTION
+#define FUNCTION "Return_Address_Stack::copy"
+  void Parameters::copy (void) 
+  {
+    log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin");
+    log_printf(FUNC,Return_Address_Stack,FUNCTION,"End");
+  };
+
 }; // end namespace return_address_stack
 }; // end namespace prediction_unit
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Parameters_msg_error.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Parameters_msg_error.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Parameters_msg_error.cpp	(revision 88)
@@ -29,5 +29,5 @@
     for (uint32_t i=0; i<_nb_context; i++)
       if (_size_queue [i] < 2)
-	test.error("context \""+toString(i)+"\" :  size_queue must be > 2");
+	test.error(toString(_("context \"%d\" : size_queue must be >= 2\n"),i));
     
     log_printf(FUNC,Return_Address_Stack,FUNCTION,"End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Parameters_print.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Parameters_print.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Parameters_print.cpp	(revision 88)
@@ -28,5 +28,5 @@
     xml.balise_open("return_address_stack");
     xml.singleton_begin("nb_context     "); xml.attribut("value",toString(_nb_context     )); xml.singleton_end();
-    xml.singleton_begin("size_address   "); xml.attribut("value",toString(_size_address   )); xml.singleton_end();
+//  xml.singleton_begin("size_address   "); xml.attribut("value",toString(_size_address   )); xml.singleton_end();
     xml.singleton_begin("nb_inst_predict"); xml.attribut("value",toString(_nb_inst_predict)); xml.singleton_end();
     xml.singleton_begin("nb_inst_decod  "); xml.attribut("value",toString(_nb_inst_decod  )); xml.singleton_end();
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack.cpp	(revision 88)
@@ -38,4 +38,10 @@
     log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin");
 
+#if DEBUG_Return_Address_Stac == true
+    log_printf(INFO,Return_Address_Stac,FUNCTION,_("<%s> Parameters"),_name.c_str());
+
+    std::cout << *param << std::endl;
+#endif    
+
     log_printf(INFO,Return_Address_Stack,FUNCTION,"Allocation");
 
@@ -47,5 +53,5 @@
 
 #ifdef STATISTICS
-    if (_usage & USE_STATISTICS)
+    if (usage_is_set(_usage,USE_STATISTICS))
       {	
 	log_printf(INFO,Return_Address_Stack,FUNCTION,"Allocation of statistics");
@@ -56,5 +62,5 @@
 
 #ifdef VHDL
-    if (_usage & USE_VHDL)
+    if (usage_is_set(_usage,USE_VHDL))
       {
 	// generate the vhdl
@@ -66,5 +72,5 @@
 
 #ifdef SYSTEMC
-    if (_usage & USE_SYSTEMC)
+    if (usage_is_set(_usage,USE_SYSTEMC))
       {
     	for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
@@ -165,5 +171,5 @@
 
 #ifdef STATISTICS
-    if (_usage & USE_STATISTICS)
+    if (usage_is_set(_usage,USE_STATISTICS))
       {
 	statistics_deallocation();
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_allocation.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_allocation.cpp	(revision 88)
@@ -17,15 +17,13 @@
 namespace return_address_stack {
 
-
-
 #undef  FUNCTION
 #define FUNCTION "Return_Address_Stack::allocation"
   void Return_Address_Stack::allocation (
 #ifdef STATISTICS
-			       morpheo::behavioural::Parameters_Statistics * param_statistics
+                                         morpheo::behavioural::Parameters_Statistics * param_statistics
 #else
-			       void
+                                         void
 #endif
-			       )
+                                         )
   {
     log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin");
@@ -65,6 +63,6 @@
       ALLOC1_SIGNAL_OUT(out_PREDICT_HIT         ,"hit"         ,Tcontrol_t,1); 
       ALLOC1_SIGNAL_IN ( in_PREDICT_PUSH        ,"push"        ,Tcontrol_t,1);
-      ALLOC1_SIGNAL_IN ( in_PREDICT_ADDRESS_PUSH,"address_push",Taddress_t,_param->_size_address);
-      ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_POP ,"address_pop" ,Taddress_t,_param->_size_address);
+      ALLOC1_SIGNAL_IN ( in_PREDICT_ADDRESS_PUSH,"address_push",Taddress_t,_param->_size_instruction_address);
+      ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_POP ,"address_pop" ,Taddress_t,_param->_size_instruction_address);
       ALLOC1_SIGNAL_OUT(out_PREDICT_INDEX       ,"index"       ,Tptr_t    ,_param->_size_index);
     }
@@ -79,6 +77,6 @@
       ALLOC1_SIGNAL_OUT(out_DECOD_HIT            ,"hit"            ,Tcontrol_t,1); 
       ALLOC1_SIGNAL_IN ( in_DECOD_PUSH           ,"push"           ,Tcontrol_t,1);
-      ALLOC1_SIGNAL_IN ( in_DECOD_ADDRESS_PUSH   ,"address_push"   ,Taddress_t,_param->_size_address);
-      ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS_POP    ,"address_pop"    ,Taddress_t,_param->_size_address);
+      ALLOC1_SIGNAL_IN ( in_DECOD_ADDRESS_PUSH   ,"address_push"   ,Taddress_t,_param->_size_instruction_address);
+      ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS_POP    ,"address_pop"    ,Taddress_t,_param->_size_instruction_address);
       ALLOC1_SIGNAL_OUT(out_DECOD_INDEX          ,"index"          ,Tptr_t    ,_param->_size_index);
       ALLOC1_SIGNAL_IN ( in_DECOD_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1);
@@ -89,14 +87,16 @@
       ALLOC1_INTERFACE("update", IN, SOUTH, "update's interface", _param->_nb_inst_update);
 
-      ALLOC1_VALACK_IN ( in_UPDATE_VAL            ,VAL);
-      ALLOC1_VALACK_OUT(out_UPDATE_ACK            ,ACK);
-      ALLOC1_SIGNAL_IN ( in_UPDATE_CONTEXT_ID     ,"context_id"     ,Tcontext_t,_param->_size_context_id); 
-      ALLOC1_SIGNAL_IN ( in_UPDATE_PUSH           ,"push"           ,Tcontrol_t,1);
-      ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS        ,"address"        ,Taddress_t,_param->_size_address);
-      ALLOC1_SIGNAL_IN ( in_UPDATE_INDEX          ,"index"          ,Tptr_t    ,_param->_size_index);
-      ALLOC1_SIGNAL_IN ( in_UPDATE_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1);
+      ALLOC1_VALACK_IN ( in_UPDATE_VAL              ,VAL);
+      ALLOC1_VALACK_OUT(out_UPDATE_ACK              ,ACK);
+      ALLOC1_SIGNAL_IN ( in_UPDATE_CONTEXT_ID       ,"context_id"       ,Tcontext_t,_param->_size_context_id); 
+      ALLOC1_SIGNAL_IN ( in_UPDATE_PUSH             ,"push"             ,Tcontrol_t,1);
+      ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS          ,"address"          ,Taddress_t,_param->_size_instruction_address);
+      ALLOC1_SIGNAL_IN ( in_UPDATE_INDEX            ,"index"            ,Tptr_t    ,_param->_size_index);
+      ALLOC1_SIGNAL_IN ( in_UPDATE_MISS_PREDICTION  ,"miss_prediction"  ,Tcontrol_t,1);
       ALLOC1_SIGNAL_IN ( in_UPDATE_PREDICTION_IFETCH,"prediction_ifetch",Tcontrol_t,1);
     }
 
+    if (usage_is_set(_usage,USE_SYSTEMC))
+      {
     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -118,9 +118,11 @@
     internal_DECOD_HIT   = new Tcontrol_t [_param->_nb_inst_decod  ];
     internal_UPDATE_ACK  = new Tcontrol_t [_param->_nb_inst_update ];
+      }
 
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
 
 #ifdef POSITION
-    _component->generate_file();
+    if (usage_is_set(_usage,USE_POSITION))
+      _component->generate_file();
 #endif
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_deallocation.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_deallocation.cpp	(revision 88)
@@ -7,4 +7,5 @@
 
 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/include/Return_Address_Stack.h"
+#include "Behavioural/include/Allocation.h"
 
 namespace morpheo                    {
@@ -23,54 +24,55 @@
     log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin");
 
-    if (_usage & USE_SYSTEMC)
+    if (usage_is_set(_usage,USE_SYSTEMC))
       {
 	delete    in_CLOCK ;
 	delete    in_NRESET;
 
-	delete []  in_PREDICT_VAL          ;
-	delete [] out_PREDICT_ACK          ;
-	if (_param->_have_port_context_id)
-	delete []  in_PREDICT_CONTEXT_ID   ; 
-	delete [] out_PREDICT_HIT          ; 
-	delete []  in_PREDICT_PUSH         ;
-	delete []  in_PREDICT_ADDRESS_PUSH ;
-	delete [] out_PREDICT_ADDRESS_POP  ;
-	delete [] out_PREDICT_INDEX        ;
-	delete []  in_DECOD_VAL            ;
-	delete [] out_DECOD_ACK            ;
-	delete []  in_DECOD_PUSH           ;
-	if (_param->_have_port_context_id)
-	delete []  in_DECOD_CONTEXT_ID     ;
-	delete [] out_DECOD_HIT            ;
-	delete []  in_DECOD_ADDRESS_PUSH   ;
-	delete [] out_DECOD_ADDRESS_POP    ;
-	delete [] out_DECOD_INDEX          ;
-	delete []  in_DECOD_MISS_PREDICTION;
-	delete []  in_UPDATE_VAL           ;
-	delete [] out_UPDATE_ACK           ;
-	if (_param->_have_port_context_id)
-	delete []  in_UPDATE_CONTEXT_ID    ;
-	delete []  in_UPDATE_PUSH          ;
-	delete []  in_UPDATE_INDEX         ;
-	delete []  in_UPDATE_ADDRESS       ;
-	delete []  in_UPDATE_MISS_PREDICTION;
-	delete []  in_UPDATE_PREDICTION_IFETCH;
+        DELETE1_SIGNAL( in_PREDICT_VAL             ,_param->_nb_inst_predict,1);
+        DELETE1_SIGNAL(out_PREDICT_ACK             ,_param->_nb_inst_predict,1);
+        DELETE1_SIGNAL( in_PREDICT_CONTEXT_ID      ,_param->_nb_inst_predict,_param->_size_context_id); 
+        DELETE1_SIGNAL(out_PREDICT_HIT             ,_param->_nb_inst_predict,1); 
+        DELETE1_SIGNAL( in_PREDICT_PUSH            ,_param->_nb_inst_predict,1);
+        DELETE1_SIGNAL( in_PREDICT_ADDRESS_PUSH    ,_param->_nb_inst_predict,_param->_size_instruction_address);
+        DELETE1_SIGNAL(out_PREDICT_ADDRESS_POP     ,_param->_nb_inst_predict,_param->_size_instruction_address);
+        DELETE1_SIGNAL(out_PREDICT_INDEX           ,_param->_nb_inst_predict,_param->_size_index);
+
+        DELETE1_SIGNAL( in_DECOD_VAL               ,_param->_nb_inst_decod,1);
+        DELETE1_SIGNAL(out_DECOD_ACK               ,_param->_nb_inst_decod,1);
+        DELETE1_SIGNAL( in_DECOD_CONTEXT_ID        ,_param->_nb_inst_decod,_param->_size_context_id); 
+        DELETE1_SIGNAL(out_DECOD_HIT               ,_param->_nb_inst_decod,1); 
+        DELETE1_SIGNAL( in_DECOD_PUSH              ,_param->_nb_inst_decod,1);
+        DELETE1_SIGNAL( in_DECOD_ADDRESS_PUSH      ,_param->_nb_inst_decod,_param->_size_instruction_address);
+        DELETE1_SIGNAL(out_DECOD_ADDRESS_POP       ,_param->_nb_inst_decod,_param->_size_instruction_address);
+        DELETE1_SIGNAL(out_DECOD_INDEX             ,_param->_nb_inst_decod,_param->_size_index);
+        DELETE1_SIGNAL( in_DECOD_MISS_PREDICTION   ,_param->_nb_inst_decod,1);
+
+        DELETE1_SIGNAL( in_UPDATE_VAL              ,_param->_nb_inst_update,1);
+        DELETE1_SIGNAL(out_UPDATE_ACK              ,_param->_nb_inst_update,1);
+        DELETE1_SIGNAL( in_UPDATE_CONTEXT_ID       ,_param->_nb_inst_update,_param->_size_context_id); 
+        DELETE1_SIGNAL( in_UPDATE_PUSH             ,_param->_nb_inst_update,1);
+        DELETE1_SIGNAL( in_UPDATE_ADDRESS          ,_param->_nb_inst_update,_param->_size_instruction_address);
+        DELETE1_SIGNAL( in_UPDATE_INDEX            ,_param->_nb_inst_update,_param->_size_index);
+        DELETE1_SIGNAL( in_UPDATE_MISS_PREDICTION  ,_param->_nb_inst_update,1);
+        DELETE1_SIGNAL( in_UPDATE_PREDICTION_IFETCH,_param->_nb_inst_update,1);
+        
+        // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+        
+        for (uint32_t i=0; i<_param->_nb_context; i++)
+          delete [] reg_stack [i];
+        delete [] reg_stack;
+        delete [] reg_TOP;
+        delete [] reg_BOTTOM;
+        delete [] reg_NB_ELT;
+        delete [] reg_PREDICT_TOP;
+        delete [] reg_PREDICT_BOTTOM;
+        delete [] reg_PREDICT_NB_ELT;
+        
+        delete [] internal_PREDICT_ACK;
+        delete [] internal_PREDICT_HIT;
+        delete [] internal_DECOD_ACK;
+        delete [] internal_DECOD_HIT;
+        delete [] internal_UPDATE_ACK;
       }
-
-    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-    delete [] reg_stack;
-    delete [] reg_TOP;
-    delete [] reg_BOTTOM;
-    delete [] reg_NB_ELT;
-    delete [] reg_PREDICT_TOP;
-    delete [] reg_PREDICT_BOTTOM;
-    delete [] reg_PREDICT_NB_ELT;
-    
-    delete [] internal_PREDICT_ACK;
-    delete [] internal_PREDICT_HIT;
-    delete [] internal_DECOD_ACK;
-    delete [] internal_DECOD_HIT;
-    delete [] internal_UPDATE_ACK;
 
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_end_cycle.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_end_cycle.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_end_cycle.cpp	(revision 88)
@@ -25,5 +25,6 @@
 
 #ifdef STATISTICS
-    _stat->end_cycle();
+    if (usage_is_set(_usage,USE_STATISTICS))
+      _stat->end_cycle();
 #endif    
 
@@ -31,5 +32,6 @@
     // Evaluation before read the ouput signal
 //  sc_start(0);
-    _interfaces->testbench();
+    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
+      _interfaces->testbench();
 #endif
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_transition.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_transition.cpp	(revision 88)
@@ -191,5 +191,5 @@
 		  
 		  // Scan full assoc !!!
-		  for (uint32_t j=0; j<_param->_size_queue [i]; j++)
+		  for (uint32_t j=0; j<_param->_size_queue [context]; j++)
 		    // Test if this slot is tagged with "predict" : if true, tagged as miss
 		    if (reg_stack [context][j]._predict)
