Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/SelfTest/src/test.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/SelfTest/src/test.cpp	(revision 88)
@@ -34,4 +34,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          );
+
   Stat_List_unit * _Stat_List_unit = new Stat_List_unit 
     (name.c_str(),
@@ -40,5 +50,5 @@
 #endif
      _param,
-     USE_ALL);
+     _usage);
   
 #ifdef SYSTEMC
@@ -72,7 +82,9 @@
   ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RC_PHY    ," in_RETIRE_NUM_REG_RC_PHY    ",Tspecial_address_t,_param->_nb_inst_retire);
   ALLOC1_SC_SIGNAL( in_RETIRE_WRITE_RD          ," in_RETIRE_WRITE_RD          ",Tcontrol_t        ,_param->_nb_inst_retire);
+  ALLOC1_SC_SIGNAL( in_RETIRE_RESTORE_RD_PHY_OLD," in_RETIRE_RESTORE_RD_PHY_OLD",Tcontrol_t        ,_param->_nb_inst_retire);
   ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RD_PHY_OLD," in_RETIRE_NUM_REG_RD_PHY_OLD",Tgeneral_address_t,_param->_nb_inst_retire);
   ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RD_PHY_NEW," in_RETIRE_NUM_REG_RD_PHY_NEW",Tgeneral_address_t,_param->_nb_inst_retire);
   ALLOC1_SC_SIGNAL( in_RETIRE_WRITE_RE          ," in_RETIRE_WRITE_RE          ",Tcontrol_t        ,_param->_nb_inst_retire);
+  ALLOC1_SC_SIGNAL( in_RETIRE_RESTORE_RE_PHY_OLD," in_RETIRE_RESTORE_RE_PHY_OLD",Tcontrol_t        ,_param->_nb_inst_retire);
   ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_OLD," in_RETIRE_NUM_REG_RE_PHY_OLD",Tspecial_address_t,_param->_nb_inst_retire);
   ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_NEW," in_RETIRE_NUM_REG_RE_PHY_NEW",Tspecial_address_t,_param->_nb_inst_retire);
@@ -116,7 +128,9 @@
   INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_NUM_REG_RC_PHY    ,_param->_nb_inst_retire);
   INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_WRITE_RD          ,_param->_nb_inst_retire);
+  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_RESTORE_RD_PHY_OLD,_param->_nb_inst_retire);
   INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_NUM_REG_RD_PHY_OLD,_param->_nb_inst_retire);
   INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_NUM_REG_RD_PHY_NEW,_param->_nb_inst_retire);
   INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_WRITE_RE          ,_param->_nb_inst_retire);
+  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_RESTORE_RE_PHY_OLD,_param->_nb_inst_retire);
   INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_NUM_REG_RE_PHY_OLD,_param->_nb_inst_retire);
   INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_NUM_REG_RE_PHY_NEW,_param->_nb_inst_retire);
@@ -347,7 +361,9 @@
 	      in_RETIRE_NUM_REG_RC_PHY     [i]->write(rc);
 	      in_RETIRE_WRITE_RD           [i]->write(write_rd);
+	      in_RETIRE_RESTORE_RD_PHY_OLD [i]->write(0);
 	      in_RETIRE_NUM_REG_RD_PHY_OLD [i]->write(rd_old);
 	      in_RETIRE_NUM_REG_RD_PHY_NEW [i]->write(rd_new);
 	      in_RETIRE_WRITE_RE           [i]->write(write_re);
+	      in_RETIRE_RESTORE_RE_PHY_OLD [i]->write(0);
 	      in_RETIRE_NUM_REG_RE_PHY_OLD [i]->write(re_old);
 	      in_RETIRE_NUM_REG_RE_PHY_NEW [i]->write(re_new);
@@ -486,16 +502,18 @@
 	    if (in_RETIRE_VAL [i]->read() and out_RETIRE_ACK [i]->read())
 	      {
-		Tcontrol_t         read_ra  = in_RETIRE_READ_RA            [i]->read();
-		Tgeneral_address_t ra       = in_RETIRE_NUM_REG_RA_PHY     [i]->read();
-		Tcontrol_t         read_rb  = in_RETIRE_READ_RB            [i]->read();
-		Tgeneral_address_t rb       = in_RETIRE_NUM_REG_RB_PHY     [i]->read();
-		Tcontrol_t         read_rc  = in_RETIRE_READ_RC            [i]->read();
-		Tspecial_address_t rc       = in_RETIRE_NUM_REG_RC_PHY     [i]->read();
-		Tcontrol_t         write_rd = in_RETIRE_WRITE_RD           [i]->read();
-		Tgeneral_address_t rd_old   = in_RETIRE_NUM_REG_RD_PHY_OLD [i]->read();
-		Tgeneral_address_t rd_new   = in_RETIRE_NUM_REG_RD_PHY_NEW [i]->read();
-		Tcontrol_t         write_re = in_RETIRE_WRITE_RE           [i]->read();
-		Tgeneral_address_t re_old   = in_RETIRE_NUM_REG_RE_PHY_OLD [i]->read();
-		Tgeneral_address_t re_new   = in_RETIRE_NUM_REG_RE_PHY_NEW [i]->read();		
+		Tcontrol_t         read_ra        = in_RETIRE_READ_RA            [i]->read();
+		Tgeneral_address_t ra             = in_RETIRE_NUM_REG_RA_PHY     [i]->read();
+		Tcontrol_t         read_rb        = in_RETIRE_READ_RB            [i]->read();
+		Tgeneral_address_t rb             = in_RETIRE_NUM_REG_RB_PHY     [i]->read();
+		Tcontrol_t         read_rc        = in_RETIRE_READ_RC            [i]->read();
+		Tspecial_address_t rc             = in_RETIRE_NUM_REG_RC_PHY     [i]->read();
+		Tcontrol_t         write_rd       = in_RETIRE_WRITE_RD           [i]->read();
+		Tcontrol_t         restore_rd_old = in_RETIRE_RESTORE_RD_PHY_OLD [i]->read();
+		Tgeneral_address_t rd_old         = in_RETIRE_NUM_REG_RD_PHY_OLD [i]->read();
+		Tgeneral_address_t rd_new         = in_RETIRE_NUM_REG_RD_PHY_NEW [i]->read();
+		Tcontrol_t         write_re       = in_RETIRE_WRITE_RE           [i]->read();
+		Tcontrol_t         restore_re_old = in_RETIRE_RESTORE_RE_PHY_OLD [i]->read();
+		Tgeneral_address_t re_old         = in_RETIRE_NUM_REG_RE_PHY_OLD [i]->read();
+		Tgeneral_address_t re_new         = in_RETIRE_NUM_REG_RE_PHY_NEW [i]->read();		
 
 		LABEL("RETIRE [%d] - Accepted",i);
@@ -519,4 +537,5 @@
 		LABEL("   * status[%d]._counter  : %d",rc,spr_status[rc]._counter );
 		LABEL(" * read_rd          : %d",write_rd);
+		LABEL(" * restore_rd_old   : %d",restore_rd_old);
 		LABEL(" * reg_rd_old       : %d",rd_old  );
 		LABEL("   * status[%d]._is_free  : %d",rd_old,spr_status[rd_old]._is_free );
@@ -530,4 +549,5 @@
 		LABEL("   * status[%d]._counter  : %d",rd_new,spr_status[rd_new]._counter );
 		LABEL(" * read_re          : %d",write_re);
+		LABEL(" * restore_re_old   : %d",restore_re_old);
 		LABEL(" * reg_re_old       : %d",re_old  );
 		LABEL("   * status[%d]._is_free  : %d",re_old,spr_status[re_old]._is_free );
@@ -555,12 +575,30 @@
 		if (write_rd)
 		  {
-		    gpr_status[rd_old]._is_link  = 0;
-		    gpr_status[rd_new]._is_valid = 1;
+                    if (restore_rd_old)
+                      {
+                        gpr_status[rd_old]._is_link  = 1;
+                        gpr_status[rd_new]._is_link  = 0;
+                        gpr_status[rd_new]._is_valid = 1;
+                      }
+                    else
+                      {
+                        gpr_status[rd_old]._is_link  = 0;
+                        gpr_status[rd_new]._is_valid = 1;
+                      }
 		  }
 		if (write_re)
 		  {
-		    spr_status[re_old]._is_link  = 0;
-		    spr_status[re_new]._is_valid = 1;
-		  }
+                    if (restore_re_old)
+                      {
+                        spr_status[re_old]._is_link  = 1;
+                        spr_status[re_new]._is_link  = 0;
+                        spr_status[re_new]._is_valid = 1;
+                      }
+                    else
+                      {
+                        spr_status[re_old]._is_link  = 0;
+                        spr_status[re_new]._is_valid = 1;
+                      }
+                  }
 	      }
 
@@ -647,7 +685,9 @@
   delete []  in_RETIRE_NUM_REG_RC_PHY    ;
   delete []  in_RETIRE_WRITE_RD          ;
+  delete []  in_RETIRE_RESTORE_RD_PHY_OLD;
   delete []  in_RETIRE_NUM_REG_RD_PHY_OLD;
   delete []  in_RETIRE_NUM_REG_RD_PHY_NEW;
   delete []  in_RETIRE_WRITE_RE          ;
+  delete []  in_RETIRE_RESTORE_RE_PHY_OLD;
   delete []  in_RETIRE_NUM_REG_RE_PHY_OLD;
   delete []  in_RETIRE_NUM_REG_RE_PHY_NEW;
