Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/src/Execute_loop_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/src/Execute_loop_deallocation.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/src/Execute_loop_deallocation.cpp	(revision 88)
@@ -1,2 +1,3 @@
+
 /*
  * $Id$
@@ -7,5 +8,5 @@
 
 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/include/Execute_loop.h"
-
+#include "Behavioural/include/Allocation.h"
 namespace morpheo                    {
 namespace behavioural {
@@ -21,105 +22,90 @@
     log_printf(FUNC,Execute_loop,FUNCTION,"Begin");
 
-    if (_usage & USE_SYSTEMC)
+    if (usage_is_set(_usage,USE_SYSTEMC))
       {
 	delete     in_CLOCK ;
 	delete     in_NRESET;
 
-	// ~~~~~[ Interface "execute_loop_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-	delete []  in_EXECUTE_LOOP_IN_VAL                  ;
-	delete [] out_EXECUTE_LOOP_IN_ACK                  ;
-	if (_param->_have_port_context_id)
-	delete []  in_EXECUTE_LOOP_IN_CONTEXT_ID           ;
-	if (_param->_have_port_front_end_id)
-	delete []  in_EXECUTE_LOOP_IN_FRONT_END_ID         ;
-	if (_param->_have_port_ooo_engine_id)
-	delete []  in_EXECUTE_LOOP_IN_OOO_ENGINE_ID        ;
-	if (_param->_have_port_packet_id)
-	delete []  in_EXECUTE_LOOP_IN_PACKET_ID            ;
-	delete []  in_EXECUTE_LOOP_IN_OPERATION            ;
-	delete []  in_EXECUTE_LOOP_IN_TYPE                 ;
-	delete []  in_EXECUTE_LOOP_IN_STORE_QUEUE_PTR_WRITE;
-	if (_param->_have_port_load_queue_ptr)
-	delete []  in_EXECUTE_LOOP_IN_LOAD_QUEUE_PTR_WRITE ;
-	delete []  in_EXECUTE_LOOP_IN_HAS_IMMEDIAT         ;
-	delete []  in_EXECUTE_LOOP_IN_IMMEDIAT             ;
-	delete []  in_EXECUTE_LOOP_IN_READ_RA              ;
-	delete []  in_EXECUTE_LOOP_IN_NUM_REG_RA           ;
-	delete []  in_EXECUTE_LOOP_IN_READ_RB              ;
-	delete []  in_EXECUTE_LOOP_IN_NUM_REG_RB           ;
-	delete []  in_EXECUTE_LOOP_IN_READ_RC              ;
-	delete []  in_EXECUTE_LOOP_IN_NUM_REG_RC           ;
-	delete []  in_EXECUTE_LOOP_IN_WRITE_RD             ;
-	delete []  in_EXECUTE_LOOP_IN_NUM_REG_RD           ;
-	delete []  in_EXECUTE_LOOP_IN_WRITE_RE             ;
-	delete []  in_EXECUTE_LOOP_IN_NUM_REG_RE           ;
+        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_VAL                  ,_param->_nb_read_unit,1);
+        DELETE1_SIGNAL(out_EXECUTE_LOOP_IN_ACK                  ,_param->_nb_read_unit,1);
+        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_CONTEXT_ID           ,_param->_nb_read_unit,_param->_size_context_id);
+        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_FRONT_END_ID         ,_param->_nb_read_unit,_param->_size_front_end_id);
+        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_OOO_ENGINE_ID        ,_param->_nb_read_unit,_param->_size_ooo_engine_id);
+        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_PACKET_ID            ,_param->_nb_read_unit,_param->_size_rob_ptr  );
+        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_OPERATION            ,_param->_nb_read_unit,_param->_size_operation);
+        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_TYPE                 ,_param->_nb_read_unit,_param->_size_type);         
+        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_STORE_QUEUE_PTR_WRITE,_param->_nb_read_unit,_param->_size_store_queue_ptr);
+        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_LOAD_QUEUE_PTR_WRITE ,_param->_nb_read_unit,_param->_size_load_queue_ptr);
+        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_HAS_IMMEDIAT         ,_param->_nb_read_unit,1);
+        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_IMMEDIAT             ,_param->_nb_read_unit,_param->_size_general_data);
+        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_READ_RA              ,_param->_nb_read_unit,1);
+        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_NUM_REG_RA           ,_param->_nb_read_unit,_param->_size_general_register);
+        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_READ_RB              ,_param->_nb_read_unit,1);
+        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_NUM_REG_RB           ,_param->_nb_read_unit,_param->_size_general_register);
+        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_READ_RC              ,_param->_nb_read_unit,1);
+        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_NUM_REG_RC           ,_param->_nb_read_unit,_param->_size_special_register);
+        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_WRITE_RD             ,_param->_nb_read_unit,1);
+        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_NUM_REG_RD           ,_param->_nb_read_unit,_param->_size_general_register);
+        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_WRITE_RE             ,_param->_nb_read_unit,1);
+        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_NUM_REG_RE           ,_param->_nb_read_unit,_param->_size_special_register);
+        
+        DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_VAL          ,_param->_nb_write_unit,1);
+        DELETE1_SIGNAL( in_EXECUTE_LOOP_OUT_ACK          ,_param->_nb_write_unit,1);
+        DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_CONTEXT_ID   ,_param->_nb_write_unit,_param->_size_context_id);
+        DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_FRONT_END_ID ,_param->_nb_write_unit,_param->_size_front_end_id);
+        DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_OOO_ENGINE_ID,_param->_nb_write_unit,_param->_size_ooo_engine_id);
+        DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_PACKET_ID    ,_param->_nb_write_unit,_param->_size_rob_ptr  );
+//      DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_OPERATION    ,_param->_nb_write_unit,_param->_size_operation);
+//      DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_TYPE         ,_param->_nb_write_unit,_param->_size_type);
+        DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_FLAGS        ,_param->_nb_write_unit,_param->_size_special_data);
+        DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_EXCEPTION    ,_param->_nb_write_unit,_param->_size_exception);
+        DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_NO_SEQUENCE  ,_param->_nb_write_unit,1);
+        DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_ADDRESS      ,_param->_nb_write_unit,_param->_size_general_data);
+        DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_DATA         ,_param->_nb_write_unit,_param->_size_general_data);
+        
+        DELETE2_SIGNAL(out_DCACHE_REQ_VAL       , _param->_nb_load_store_unit, _param->_nb_cache_port[it1],1                                  );
+        DELETE2_SIGNAL( in_DCACHE_REQ_ACK       , _param->_nb_load_store_unit, _param->_nb_cache_port[it1],1                                  );
+        DELETE2_SIGNAL(out_DCACHE_REQ_CONTEXT_ID, _param->_nb_load_store_unit, _param->_nb_cache_port[it1],_param->_max_size_dcache_context_id);
+        DELETE2_SIGNAL(out_DCACHE_REQ_PACKET_ID , _param->_nb_load_store_unit, _param->_nb_cache_port[it1],_param->_max_size_dcache_packet_id );
+        DELETE2_SIGNAL(out_DCACHE_REQ_ADDRESS   , _param->_nb_load_store_unit, _param->_nb_cache_port[it1],_param->_size_general_data         );
+        DELETE2_SIGNAL(out_DCACHE_REQ_TYPE      , _param->_nb_load_store_unit, _param->_nb_cache_port[it1],_param->_size_dcache_type          );
+        DELETE2_SIGNAL(out_DCACHE_REQ_WDATA     , _param->_nb_load_store_unit, _param->_nb_cache_port[it1],_param->_size_general_data         );
+        													                                     
+        DELETE2_SIGNAL( in_DCACHE_RSP_VAL       , _param->_nb_load_store_unit, _param->_nb_cache_port[it1],1                                  );
+        DELETE2_SIGNAL(out_DCACHE_RSP_ACK       , _param->_nb_load_store_unit, _param->_nb_cache_port[it1],1                                  );
+        DELETE2_SIGNAL( in_DCACHE_RSP_CONTEXT_ID, _param->_nb_load_store_unit, _param->_nb_cache_port[it1],_param->_max_size_dcache_context_id);
+        DELETE2_SIGNAL( in_DCACHE_RSP_PACKET_ID , _param->_nb_load_store_unit, _param->_nb_cache_port[it1],_param->_max_size_dcache_packet_id );
+        DELETE2_SIGNAL( in_DCACHE_RSP_RDATA     , _param->_nb_load_store_unit, _param->_nb_cache_port[it1],_param->_size_general_data         );
+        DELETE2_SIGNAL( in_DCACHE_RSP_ERROR     , _param->_nb_load_store_unit, _param->_nb_cache_port[it1],_param->_size_dcache_error         );
+        
+        DELETE2_SIGNAL( in_INSERT_ROB_VAL       ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1],1                             );
+        DELETE2_SIGNAL(out_INSERT_ROB_ACK       ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1],1                             );
+        DELETE2_SIGNAL( in_INSERT_ROB_RD_USE    ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1],1                             );
+        DELETE2_SIGNAL( in_INSERT_ROB_RD_NUM_REG,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1],_param->_size_general_register);
+        DELETE2_SIGNAL( in_INSERT_ROB_RE_USE    ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1],1                             );
+        DELETE2_SIGNAL( in_INSERT_ROB_RE_NUM_REG,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1],_param->_size_special_register);
+        
+//         DELETE2_SIGNAL( in_RETIRE_ROB_VAL           ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1],1                             );
+//         DELETE2_SIGNAL(out_RETIRE_ROB_ACK           ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1],1                             );
+//         DELETE2_SIGNAL( in_RETIRE_ROB_RD_OLD_USE    ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1],1                             );
+//         DELETE2_SIGNAL( in_RETIRE_ROB_RD_OLD_NUM_REG,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1],_param->_size_general_register);
+//         DELETE2_SIGNAL( in_RETIRE_ROB_RD_NEW_USE    ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1],1                             );
+//         DELETE2_SIGNAL( in_RETIRE_ROB_RD_NEW_NUM_REG,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1],_param->_size_general_register);
+//         DELETE2_SIGNAL( in_RETIRE_ROB_RE_OLD_USE    ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1],1                             );
+//         DELETE2_SIGNAL( in_RETIRE_ROB_RE_OLD_NUM_REG,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1],_param->_size_special_register);
+//         DELETE2_SIGNAL( in_RETIRE_ROB_RE_NEW_USE    ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1],1                             );
+//         DELETE2_SIGNAL( in_RETIRE_ROB_RE_NEW_NUM_REG,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1],_param->_size_special_register);
+      }
 
-	// ~~~~~[ Interface "execute_loop_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-	delete [] out_EXECUTE_LOOP_OUT_VAL                 ;
-	delete []  in_EXECUTE_LOOP_OUT_ACK                 ;
-	if (_param->_have_port_context_id)
-	delete [] out_EXECUTE_LOOP_OUT_CONTEXT_ID          ;
-	if (_param->_have_port_front_end_id)
-	delete [] out_EXECUTE_LOOP_OUT_FRONT_END_ID        ;
-	if (_param->_have_port_ooo_engine_id)
-	delete [] out_EXECUTE_LOOP_OUT_OOO_ENGINE_ID       ;
-	if (_param->_have_port_packet_id)
-	delete [] out_EXECUTE_LOOP_OUT_PACKET_ID           ;
-      //delete [] out_EXECUTE_LOOP_OUT_OPERATION           ;
-      //delete [] out_EXECUTE_LOOP_OUT_TYPE                ;
-	delete [] out_EXECUTE_LOOP_OUT_FLAGS               ;
-	delete [] out_EXECUTE_LOOP_OUT_EXCEPTION           ;
-	delete [] out_EXECUTE_LOOP_OUT_NO_SEQUENCE         ;
-	delete [] out_EXECUTE_LOOP_OUT_ADDRESS             ;
-
-	// ~~~~~[ Interface "dcache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-	delete [] out_DCACHE_REQ_VAL                       ;
-	delete []  in_DCACHE_REQ_ACK                       ;
-	if (_param->_have_port_dcache_context_id)
-	delete [] out_DCACHE_REQ_CONTEXT_ID                ;
-	delete [] out_DCACHE_REQ_PACKET_ID                 ;
-	delete [] out_DCACHE_REQ_ADDRESS                   ;
-	delete [] out_DCACHE_REQ_TYPE                      ;
-	delete [] out_DCACHE_REQ_WDATA                     ;
-
-	// ~~~~~[ Interface "dcache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-	delete []  in_DCACHE_RSP_VAL                       ;
-	delete [] out_DCACHE_RSP_ACK                       ;
-	if (_param->_have_port_dcache_context_id)
-	delete []  in_DCACHE_RSP_CONTEXT_ID                ;
-	delete []  in_DCACHE_RSP_PACKET_ID                 ;
-	delete []  in_DCACHE_RSP_RDATA                     ;
-	delete []  in_DCACHE_RSP_ERROR                     ;
-    
-	// ~~~~~[ Interface "insert_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-	delete []  in_INSERT_ROB_VAL                       ;
-	delete [] out_INSERT_ROB_ACK                       ;
-	delete []  in_INSERT_ROB_RD_USE                    ;
-	delete []  in_INSERT_ROB_RD_NUM_REG                ;
-	delete []  in_INSERT_ROB_RE_USE                    ;
-	delete []  in_INSERT_ROB_RE_NUM_REG                ;
-
-	// ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-	delete []  in_RETIRE_ROB_VAL                       ;
-	delete [] out_RETIRE_ROB_ACK                       ;
-	delete []  in_RETIRE_ROB_RD_OLD_USE                ; 
-	delete []  in_RETIRE_ROB_RD_OLD_NUM_REG            ;
-	delete []  in_RETIRE_ROB_RD_NEW_USE                ;
-	delete []  in_RETIRE_ROB_RD_NEW_NUM_REG            ;
-	delete []  in_RETIRE_ROB_RE_OLD_USE                ; 
-	delete []  in_RETIRE_ROB_RE_OLD_NUM_REG            ;
-	delete []  in_RETIRE_ROB_RE_NEW_USE                ;
-	delete []  in_RETIRE_ROB_RE_NEW_NUM_REG            ;
-      }
-    
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
     delete    _component;
+    delete    _component_glue                        ;
     delete [] _component_read_unit                   ;
     delete [] _component_functionnal_unit            ;
     delete [] _component_load_store_unit             ;
     delete [] _component_write_unit                  ;
-    delete [] _component_read_unit_to_execution_unit ;
-    delete [] _component_execution_unit_to_write_unit;
-    delete [] _component_register_unit               ;
+    delete    _component_read_unit_to_execution_unit ;
+    delete    _component_execution_unit_to_write_unit;
+    delete    _component_register_unit               ;
     
     log_printf(FUNC,Execute_loop,FUNCTION,"End");
@@ -129,5 +115,4 @@
 }; // end namespace multi_execute_loop
 }; // end namespace core
-
 }; // end namespace behavioural
 }; // end namespace morpheo              
