Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Register_translation_unit_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Register_translation_unit_allocation.cpp	(revision 137)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Register_translation_unit_allocation.cpp	(revision 139)
@@ -60,18 +60,20 @@
       ALLOC1_INTERFACE_BEGIN("rename", IN, EAST, _("Instruction with logical register"), _param->_nb_inst_insert);
 
-      ALLOC1_VALACK_IN ( in_RENAME_VAL           ,VAL);
-      ALLOC1_VALACK_OUT(out_RENAME_ACK           ,ACK);
-      ALLOC1_SIGNAL_IN ( in_RENAME_FRONT_END_ID  ,"front_end_id"  ,Tcontext_t        ,_param->_size_front_end_id          );
-      ALLOC1_SIGNAL_IN ( in_RENAME_CONTEXT_ID    ,"context_id"    ,Tcontext_t        ,_param->_size_context_id            );
-      ALLOC1_SIGNAL_IN ( in_RENAME_READ_RA       ,"read_ra"       ,Tcontrol_t        ,1                                   );
-      ALLOC1_SIGNAL_IN ( in_RENAME_NUM_REG_RA_LOG,"num_reg_ra_log",Tgeneral_address_t,_param->_size_general_register_logic);
-      ALLOC1_SIGNAL_IN ( in_RENAME_READ_RB       ,"read_rb"       ,Tcontrol_t        ,1                                   );
-      ALLOC1_SIGNAL_IN ( in_RENAME_NUM_REG_RB_LOG,"num_reg_rb_log",Tgeneral_address_t,_param->_size_general_register_logic);
-      ALLOC1_SIGNAL_IN ( in_RENAME_READ_RC       ,"read_rc"       ,Tcontrol_t        ,1                                   );
-      ALLOC1_SIGNAL_IN ( in_RENAME_NUM_REG_RC_LOG,"num_reg_rc_log",Tspecial_address_t,_param->_size_special_register_logic);
-      ALLOC1_SIGNAL_IN ( in_RENAME_WRITE_RD      ,"write_rd"      ,Tcontrol_t        ,1                                   );
-      ALLOC1_SIGNAL_IN ( in_RENAME_NUM_REG_RD_LOG,"num_reg_rd_log",Tgeneral_address_t,_param->_size_general_register_logic);
-      ALLOC1_SIGNAL_IN ( in_RENAME_WRITE_RE      ,"write_re"      ,Tcontrol_t        ,1                                   );
-      ALLOC1_SIGNAL_IN ( in_RENAME_NUM_REG_RE_LOG,"num_reg_re_log",Tspecial_address_t,_param->_size_special_register_logic);
+      ALLOC1_VALACK_IN      ( in_RENAME_VAL           ,VAL);
+      ALLOC1_VALACK_OUT     (out_RENAME_ACK           ,ACK);
+      ALLOC1_SIGNAL_IN      ( in_RENAME_FRONT_END_ID  ,"front_end_id"  ,Tcontext_t        ,_param->_size_front_end_id          );
+      ALLOC1_SIGNAL_IN      ( in_RENAME_CONTEXT_ID    ,"context_id"    ,Tcontext_t        ,_param->_size_context_id            );
+      ALLOC1_SIGNAL_IN_COND ( in_RENAME_DEPTH         ,"depth"         ,Tdepth_t          ,_param->_size_depth                 ,_param->_rat_scheme == RAT_DEPTH_SAVE);
+      ALLOC1_SIGNAL_IN      ( in_RENAME_SAVE_RAT      ,"save_rat"      ,Tcontrol_t        ,1                                   );
+      ALLOC1_SIGNAL_IN      ( in_RENAME_READ_RA       ,"read_ra"       ,Tcontrol_t        ,1                                   );
+      ALLOC1_SIGNAL_IN      ( in_RENAME_NUM_REG_RA_LOG,"num_reg_ra_log",Tgeneral_address_t,_param->_size_general_register_logic);
+      ALLOC1_SIGNAL_IN      ( in_RENAME_READ_RB       ,"read_rb"       ,Tcontrol_t        ,1                                   );
+      ALLOC1_SIGNAL_IN      ( in_RENAME_NUM_REG_RB_LOG,"num_reg_rb_log",Tgeneral_address_t,_param->_size_general_register_logic);
+      ALLOC1_SIGNAL_IN      ( in_RENAME_READ_RC       ,"read_rc"       ,Tcontrol_t        ,1                                   );
+      ALLOC1_SIGNAL_IN      ( in_RENAME_NUM_REG_RC_LOG,"num_reg_rc_log",Tspecial_address_t,_param->_size_special_register_logic);
+      ALLOC1_SIGNAL_IN      ( in_RENAME_WRITE_RD      ,"write_rd"      ,Tcontrol_t        ,1                                   );
+      ALLOC1_SIGNAL_IN      ( in_RENAME_NUM_REG_RD_LOG,"num_reg_rd_log",Tgeneral_address_t,_param->_size_general_register_logic);
+      ALLOC1_SIGNAL_IN      ( in_RENAME_WRITE_RE      ,"write_re"      ,Tcontrol_t        ,1                                   );
+      ALLOC1_SIGNAL_IN      ( in_RENAME_NUM_REG_RE_LOG,"num_reg_re_log",Tspecial_address_t,_param->_size_special_register_logic);
 
       ALLOC1_INTERFACE_END(_param->_nb_inst_insert);
@@ -135,4 +137,7 @@
       ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_PHY_OLD,"num_reg_re_phy_old",Tspecial_address_t,_param->_size_special_register      );
       ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_PHY_NEW,"num_reg_re_phy_new",Tspecial_address_t,_param->_size_special_register      );
+      ALLOC1_SIGNAL_IN ( in_RETIRE_RESTORE           ,"restore"           ,Tcontrol_t        ,1                                   );
+      ALLOC1_SIGNAL_IN ( in_RETIRE_RESTORE_RD_PHY_OLD,"restore_rd_phy_old",Tcontrol_t        ,1                                   );
+      ALLOC1_SIGNAL_IN ( in_RETIRE_RESTORE_RE_PHY_OLD,"restore_re_phy_old",Tcontrol_t        ,1                                   );
 
       ALLOC1_INTERFACE_END(_param->_nb_inst_retire);
@@ -143,7 +148,9 @@
       ALLOC2_INTERFACE_BEGIN("retire_event", IN,NORTH, _("Retire event"), _param->_nb_front_end, _param->_nb_context[it1]);
 
-      _ALLOC2_VALACK_IN ( in_RETIRE_EVENT_VAL           ,VAL,_param->_nb_front_end, _param->_nb_context[it1]);
-      _ALLOC2_VALACK_OUT(out_RETIRE_EVENT_ACK           ,ACK,_param->_nb_front_end, _param->_nb_context[it1]);
-      _ALLOC2_SIGNAL_IN ( in_RETIRE_EVENT_STATE      ,"state"             ,Tevent_state_t    ,_param->_size_event_state, _param->_nb_front_end, _param->_nb_context[it1]);
+      _ALLOC2_VALACK_IN      ( in_RETIRE_EVENT_VAL           ,VAL,_param->_nb_front_end, _param->_nb_context[it1]);
+      _ALLOC2_VALACK_OUT     (out_RETIRE_EVENT_ACK           ,ACK,_param->_nb_front_end, _param->_nb_context[it1]);
+      _ALLOC2_SIGNAL_IN      ( in_RETIRE_EVENT_STATE      ,"state"             ,Tevent_state_t    ,_param->_size_event_state, _param->_nb_front_end, _param->_nb_context[it1]);
+      _ALLOC2_SIGNAL_IN_COND ( in_RETIRE_EVENT_TYPE       ,"type"              ,Tevent_type_t     ,_param->_size_event_type , _param->_nb_front_end, _param->_nb_context[it1],_param->_rat_scheme == RAT_DEPTH_SAVE);
+      _ALLOC2_SIGNAL_IN_COND ( in_RETIRE_EVENT_DEPTH      ,"depth"             ,Tdepth_t          ,_param->_size_depth      , _param->_nb_front_end, _param->_nb_context[it1],_param->_rat_scheme == RAT_DEPTH_SAVE);
 
       ALLOC2_INTERFACE_END(_param->_nb_front_end, _param->_nb_context[it1]);
@@ -295,4 +302,9 @@
 	  PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_CONTEXT_ID"        ,
 		              dest, "in_RENAME_"+toString(i)+"_CONTEXT_ID"        );
+          if (_param->_have_port_depth and (_param->_rat_scheme == RAT_DEPTH_SAVE))
+	  PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_DEPTH"             ,
+		              dest, "in_RENAME_"+toString(i)+"_DEPTH"             );
+	  PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_SAVE_RAT"          ,
+		              dest, "in_RENAME_"+toString(i)+"_SAVE_RAT"          );
 	  PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_NUM_REG_RA_LOG"    ,
 		              dest, "in_RENAME_"+toString(i)+"_NUM_REG_RA_LOG"    );
@@ -376,4 +388,6 @@
 	  PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_NEW",
 		              dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_NEW");
+	  PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_RESTORE"           ,
+		              dest, "in_RETIRE_"+toString(i)+"_RESTORE"           );
 
 	  dest = _name+"_register_translation_unit_glue";
@@ -383,11 +397,11 @@
 		                   dest, "in_RETIRE_"+toString(i)+"_RAT_ACK"      );
 
-	  dest = _name+"_stat_list_unit";
-	  COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RESTORE_RD_PHY_OLD",
-		                   dest, "in_RETIRE_"+toString(i)+"_RESTORE_RD_PHY_OLD");
-	  COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RESTORE_RE_PHY_OLD",
-		                   dest, "in_RETIRE_"+toString(i)+"_RESTORE_RE_PHY_OLD");
-	  COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RESTORE"           ,
-		                   dest, "in_RETIRE_"+toString(i)+"_RESTORE"           );
+	  // dest = _name+"_stat_list_unit";
+	  // COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RESTORE_RD_PHY_OLD",
+	  //                          dest, "in_RETIRE_"+toString(i)+"_RESTORE_RD_PHY_OLD");
+	  // COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RESTORE_RE_PHY_OLD",
+	  //                          dest, "in_RETIRE_"+toString(i)+"_RESTORE_RE_PHY_OLD");
+	  // COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RESTORE"           ,
+	  //                          dest, "in_RETIRE_"+toString(i)+"_RESTORE"           );
 	}
 
@@ -407,4 +421,12 @@
 	    PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE",
                                 dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE");
+            if (_param->_rat_scheme == RAT_DEPTH_SAVE)
+              {
+	    PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_TYPE" ,
+                                dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_TYPE" );
+            if (_param->_have_port_depth)
+	    PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_DEPTH",
+                                dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_DEPTH");
+              }
           }
     }
@@ -717,8 +739,10 @@
 	  PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_NEW",
 		              dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_NEW");
-
-	  // in_RETIRE_RESTORE_RD_PHY_OLD - register_address_translation_unit.out_RETIRE_RESTORE_RD_PHY_OLD
-	  // in_RETIRE_RESTORE_RE_PHY_OLD - register_address_translation_unit.out_RETIRE_RESTORE_RE_PHY_OLD
-	  // in_RETIRE_RESTORE            - register_address_translation_unit.out_RETIRE_RESTORE           
+	  PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_RESTORE",
+		              dest, "in_RETIRE_"+toString(i)+"_RESTORE");
+	  PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_RESTORE_RD_PHY_OLD",
+		              dest, "in_RETIRE_"+toString(i)+"_RESTORE_RD_PHY_OLD");
+	  PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_RESTORE_RE_PHY_OLD",
+		              dest, "in_RETIRE_"+toString(i)+"_RESTORE_RE_PHY_OLD");
 
 	  dest = _name+"_register_translation_unit_glue";
