Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_allocation.cpp	(revision 111)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_allocation.cpp	(revision 112)
@@ -58,5 +58,5 @@
     // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     {
-      ALLOC1_INTERFACE("branch_event", IN,SOUTH, "branch_event", _param->_nb_context);
+      ALLOC1_INTERFACE_BEGIN("branch_event", IN,SOUTH, _("branch_event"), _param->_nb_context);
       
       ALLOC1_VALACK_IN ( in_BRANCH_EVENT_VAL                   ,VAL);
@@ -68,9 +68,11 @@
       ALLOC1_SIGNAL_IN ( in_BRANCH_EVENT_ADDRESS_DEST_VAL      ,"address_dest_val"       ,Tcontrol_t         ,1);
       ALLOC1_SIGNAL_IN ( in_BRANCH_EVENT_ADDRESS_DEST          ,"address_dest"           ,Taddress_t         ,_param->_size_instruction_address);
+
+      ALLOC1_INTERFACE_END(_param->_nb_context);
     }
 
     // ~~~~~[ Interface : "decod_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     {
-      ALLOC1_INTERFACE("decod_event",IN ,SOUTH, _("Decod Interface"), _param->_nb_decod_unit);
+      ALLOC1_INTERFACE_BEGIN("decod_event",IN ,SOUTH, _("Decod Interface"), _param->_nb_decod_unit);
 
       ALLOC1_VALACK_IN ( in_DECOD_EVENT_VAL                    ,VAL);
@@ -82,26 +84,30 @@
       ALLOC1_SIGNAL_IN ( in_DECOD_EVENT_ADDRESS                ,"address"                ,Taddress_t         ,_param->_size_instruction_address);
       ALLOC1_SIGNAL_IN ( in_DECOD_EVENT_ADDRESS_EPCR           ,"address_epcr"           ,Taddress_t         ,_param->_size_instruction_address);
+
+      ALLOC1_INTERFACE_END(_param->_nb_decod_unit);    
     }
 
     // ~~~~~[ Interface : "commit_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     {
-      ALLOC_INTERFACE("commit_event",IN ,EAST, _("Interface with the Re Order Buffer"));
-
-      ALLOC_VALACK_IN  ( in_COMMIT_EVENT_VAL                   ,VAL);
-      ALLOC_VALACK_OUT (out_COMMIT_EVENT_ACK                   ,ACK);
-      ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_CONTEXT_ID            ,"context_id"      ,Tcontext_t         ,_param->_size_context_id);
-      ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_DEPTH                 ,"depth"           ,Tdepth_t           ,_param->_size_depth);
-      ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_TYPE                  ,"type"            ,Tevent_type_t      ,_param->_size_event_type);
-      ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_IS_DELAY_SLOT         ,"is_delay_slot"   ,Tcontrol_t         ,1);
-      ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_ADDRESS               ,"address"         ,Taddress_t         ,_param->_size_instruction_address);
-      ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_ADDRESS_EPCR_VAL      ,"address_epcr_val",Tcontrol_t         ,1);
-      ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_ADDRESS_EPCR          ,"address_epcr"    ,Taddress_t         ,_param->_size_instruction_address);
-      ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL      ,"address_eear_val",Tcontrol_t         ,1);
-      ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_ADDRESS_EEAR          ,"address_eear"    ,Tgeneral_data_t    ,_param->_size_general_data);
+      ALLOC0_INTERFACE_BEGIN("commit_event",IN ,EAST, _("Interface with the Re Order Buffer"));
+
+      ALLOC0_VALACK_IN ( in_COMMIT_EVENT_VAL                   ,VAL);
+      ALLOC0_VALACK_OUT(out_COMMIT_EVENT_ACK                   ,ACK);
+      ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_CONTEXT_ID            ,"context_id"      ,Tcontext_t         ,_param->_size_context_id);
+      ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_DEPTH                 ,"depth"           ,Tdepth_t           ,_param->_size_depth);
+      ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_TYPE                  ,"type"            ,Tevent_type_t      ,_param->_size_event_type);
+      ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_IS_DELAY_SLOT         ,"is_delay_slot"   ,Tcontrol_t         ,1);
+      ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS               ,"address"         ,Taddress_t         ,_param->_size_instruction_address);
+      ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS_EPCR_VAL      ,"address_epcr_val",Tcontrol_t         ,1);
+      ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS_EPCR          ,"address_epcr"    ,Taddress_t         ,_param->_size_instruction_address);
+      ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL      ,"address_eear_val",Tcontrol_t         ,1);
+      ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS_EEAR          ,"address_eear"    ,Tgeneral_data_t    ,_param->_size_general_data);
+    
+      ALLOC0_INTERFACE_END();
     }
 
     // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     {
-      ALLOC1_INTERFACE("branch_complete",IN ,NORTH, _("Interface with the prediction_unit."), _param->_nb_inst_branch_complete);
+      ALLOC1_INTERFACE_BEGIN("branch_complete",IN ,NORTH, _("Interface with the prediction_unit."), _param->_nb_inst_branch_complete);
 
       ALLOC1_VALACK_IN ( in_BRANCH_COMPLETE_VAL                ,VAL);
@@ -113,18 +119,22 @@
 //    ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS_SRC        ,"address_src"    ,Taddress_t         ,_param->_size_instruction_address);
 //    ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS_DEST       ,"address_dest"   ,Taddress_t         ,_param->_size_instruction_address);
+
+      ALLOC1_INTERFACE_END(_param->_nb_inst_branch_complete);
     }
 
     // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     {
-      ALLOC1_INTERFACE("nb_inst",IN ,EAST, _("Interface to count in fligt present instruction."),_param->_nb_context);
+      ALLOC1_INTERFACE_BEGIN("nb_inst",IN ,EAST, _("Interface to count in fligt present instruction."),_param->_nb_context);
 
       ALLOC1_SIGNAL_IN ( in_NB_INST_DECOD_ALL                  ,"decod_all" ,Tcounter_t         ,_param->_size_nb_inst_decod);
       ALLOC1_SIGNAL_IN ( in_NB_INST_COMMIT_ALL                 ,"commit_all",Tcounter_t         ,_param->_size_nb_inst_commit);
       ALLOC1_SIGNAL_IN ( in_NB_INST_COMMIT_MEM                 ,"commit_mem",Tcounter_t         ,_param->_size_nb_inst_commit);
+
+      ALLOC1_INTERFACE_END(_param->_nb_context);
     }
 
     // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     {
-      ALLOC1_INTERFACE("event",OUT,WEST, _("An event occure : change PC address."), _param->_nb_context);
+      ALLOC1_INTERFACE_BEGIN("event",OUT,WEST, _("An event occure : change PC address."), _param->_nb_context);
       
       ALLOC1_VALACK_OUT(out_EVENT_VAL                          ,VAL);
@@ -137,9 +147,10 @@
       ALLOC1_SIGNAL_OUT(out_EVENT_DEPTH                        ,"depth"           ,Tdepth_t          ,_param->_size_depth);
 
+      ALLOC1_INTERFACE_END(_param->_nb_context);
     }
 
     // ~~~~~[ Interface "spr_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     {
-      ALLOC1_INTERFACE("spr_event",OUT,WEST, _("An exception occure : write \"exception PC\"."), _param->_nb_context);
+      ALLOC1_INTERFACE_BEGIN("spr_event",OUT,WEST, _("An exception occure : write \"exception PC\"."), _param->_nb_context);
 
       ALLOC1_VALACK_OUT(out_SPR_EVENT_VAL                      ,VAL);
@@ -150,18 +161,24 @@
       ALLOC1_SIGNAL_OUT(out_SPR_EVENT_SR_DSX                   ,"sr_dsx"   ,Tcontrol_t,1);
       ALLOC1_SIGNAL_OUT(out_SPR_EVENT_SR_TO_ESR                ,"sr_to_esr",Tcontrol_t,1);
+
+      ALLOC1_INTERFACE_END(_param->_nb_context);
     }
 
     // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     {
-      ALLOC1_INTERFACE("context",OUT,SOUTH, _("To decod."), _param->_nb_context);
+      ALLOC1_INTERFACE_BEGIN("context",OUT,SOUTH, _("To decod."), _param->_nb_context);
       
       ALLOC1_SIGNAL_OUT(out_CONTEXT_DECOD_ENABLE               ,"decod_enable",Tcontrol_t,1);
+
+      ALLOC1_INTERFACE_END(_param->_nb_context);
     }
 
     // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     {
-      ALLOC1_INTERFACE("depth",IN ,NORTH, _("From prediction_unit."), _param->_nb_context);
+      ALLOC1_INTERFACE_BEGIN("depth",IN ,NORTH, _("From prediction_unit."), _param->_nb_context);
       
       ALLOC1_SIGNAL_IN ( in_DEPTH_MIN                          ,"min" ,Tdepth_t,_param->_size_depth);
+
+      ALLOC1_INTERFACE_END(_param->_nb_context);
     }
 
@@ -169,15 +186,19 @@
     // ~~~~~[ Interface : "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
     {
-      ALLOC1_INTERFACE("spr",IN,EAST,_("Interface with the special registerFile"),_param->_nb_context);
+      ALLOC1_INTERFACE_BEGIN("spr",IN,EAST,_("Interface with the special registerFile"),_param->_nb_context);
       
       ALLOC1_SIGNAL_IN ( in_SPR_SR_IEE                         ,"SR_IEE",Tcontrol_t,1);
       ALLOC1_SIGNAL_IN ( in_SPR_SR_EPH                         ,"SR_EPH",Tcontrol_t,1);
+
+      ALLOC1_INTERFACE_END(_param->_nb_context);
     }
 
     // ~~~~~[ Interface : "interrupt" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     {
-      ALLOC1_INTERFACE("interrupt",IN,NORTH,_("Interrupt Exception"),_param->_nb_context);
+      ALLOC1_INTERFACE_BEGIN("interrupt",IN,NORTH,_("Interrupt Exception"),_param->_nb_context);
 
       ALLOC1_SIGNAL_IN ( in_INTERRUPT_ENABLE                   ,"ENABLE",Tcontrol_t,1);
+
+      ALLOC1_INTERFACE_END(_param->_nb_context);
     }
 
@@ -186,21 +207,22 @@
      // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
         
-     reg_STATE                  = new context_state_t [_param->_nb_context];
-     reg_EVENT_ADDRESS          = new Taddress_t      [_param->_nb_context];
-     reg_EVENT_ADDRESS_EPCR     = new Taddress_t      [_param->_nb_context]; 
-     reg_EVENT_ADDRESS_EPCR_VAL = new Tcontrol_t      [_param->_nb_context];
-     reg_EVENT_ADDRESS_EEAR     = new Taddress_t      [_param->_nb_context]; 
-     reg_EVENT_ADDRESS_EEAR_VAL = new Tcontrol_t      [_param->_nb_context];
-     reg_EVENT_IS_DELAY_SLOT    = new Tcontrol_t      [_param->_nb_context];
-     reg_EVENT_IS_DS_TAKE       = new Tcontrol_t      [_param->_nb_context];
-     reg_EVENT_DEPTH            = new Tdepth_t        [_param->_nb_context];
-     reg_INTERRUPT_ENABLE       = new Tcontrol_t      [_param->_nb_context];
+     ALLOC1(reg_STATE                 ,context_state_t,_param->_nb_context);
+     ALLOC1(reg_EVENT_ADDRESS         ,Taddress_t     ,_param->_nb_context);
+     ALLOC1(reg_EVENT_ADDRESS_EPCR    ,Taddress_t     ,_param->_nb_context); 
+     ALLOC1(reg_EVENT_ADDRESS_EPCR_VAL,Tcontrol_t     ,_param->_nb_context);
+     ALLOC1(reg_EVENT_ADDRESS_EEAR    ,Taddress_t     ,_param->_nb_context); 
+     ALLOC1(reg_EVENT_ADDRESS_EEAR_VAL,Tcontrol_t     ,_param->_nb_context);
+     ALLOC1(reg_EVENT_IS_DELAY_SLOT   ,Tcontrol_t     ,_param->_nb_context);
+     ALLOC1(reg_EVENT_IS_DS_TAKE      ,Tcontrol_t     ,_param->_nb_context);
+     ALLOC1(reg_EVENT_DEPTH           ,Tdepth_t       ,_param->_nb_context);
+     ALLOC1(reg_INTERRUPT_ENABLE      ,Tcontrol_t     ,_param->_nb_context);
         
      // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-     internal_BRANCH_EVENT_ACK    = new Tcontrol_t [_param->_nb_context];
-     internal_DECOD_EVENT_ACK     = new Tcontrol_t [_param->_nb_decod_unit];
-     internal_BRANCH_COMPLETE_ACK = new Tcontrol_t [_param->_nb_inst_branch_complete];
-     internal_EVENT_VAL           = new Tcontrol_t [_param->_nb_context];
-     internal_SPR_EVENT_VAL       = new Tcontrol_t [_param->_nb_context];
+
+     ALLOC1(internal_BRANCH_EVENT_ACK   ,Tcontrol_t,_param->_nb_context);
+     ALLOC1(internal_DECOD_EVENT_ACK    ,Tcontrol_t,_param->_nb_decod_unit);
+     ALLOC1(internal_BRANCH_COMPLETE_ACK,Tcontrol_t,_param->_nb_inst_branch_complete);
+     ALLOC1(internal_EVENT_VAL          ,Tcontrol_t,_param->_nb_context);
+     ALLOC1(internal_SPR_EVENT_VAL      ,Tcontrol_t,_param->_nb_context);
       }
 
