Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/SelfTest/src/main.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/SelfTest/src/main.cpp	(revision 88)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/SelfTest/src/main.cpp	(revision 112)
@@ -8,5 +8,5 @@
 #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/SelfTest/include/test.h"
 
-#define NB_PARAMS 8
+#define NB_PARAMS 7
 
 void usage (int argc, char * argv[])
@@ -22,5 +22,4 @@
   err (_(" * nb_reg_free                        (uint32_t)\n"));
   err (_(" * nb_bank                            (uint32_t)\n"));
-  err (_(" * size_counter                       (uint32_t)\n"));
 
   exit (1);
@@ -55,5 +54,4 @@
   uint32_t   _nb_reg_free           = atoi(argv[x++]);
   uint32_t   _nb_bank               = atoi(argv[x++]);
-  uint32_t   _size_counter          = atoi(argv[x++]);
 
   try 
@@ -68,5 +66,4 @@
 	 _nb_reg_free           ,
 	 _nb_bank               ,
-	 _size_counter          ,
          true //is_toplevel
          );
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 88)
+++ 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 112)
@@ -75,4 +75,5 @@
   ALLOC1_SC_SIGNAL( in_RETIRE_VAL               ," in_RETIRE_VAL               ",Tcontrol_t        ,_param->_nb_inst_retire);
   ALLOC1_SC_SIGNAL(out_RETIRE_ACK               ,"out_RETIRE_ACK               ",Tcontrol_t        ,_param->_nb_inst_retire);
+  ALLOC1_SC_SIGNAL( in_RETIRE_RESTORE           ," in_RETIRE_RESTORE           ",Tcontrol_t        ,_param->_nb_inst_retire);
   ALLOC1_SC_SIGNAL( in_RETIRE_READ_RA           ," in_RETIRE_READ_RA           ",Tcontrol_t        ,_param->_nb_inst_retire);
   ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RA_PHY    ," in_RETIRE_NUM_REG_RA_PHY    ",Tgeneral_address_t,_param->_nb_inst_retire);
@@ -121,4 +122,5 @@
   INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_VAL               ,_param->_nb_inst_retire);
   INSTANCE1_SC_SIGNAL(_Stat_List_unit,out_RETIRE_ACK               ,_param->_nb_inst_retire);
+  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_RESTORE           ,_param->_nb_inst_retire);
   INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_READ_RA           ,_param->_nb_inst_retire);
   INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_NUM_REG_RA_PHY    ,_param->_nb_inst_retire);
@@ -234,6 +236,7 @@
 		  TEST(bool, true,((gpr_status[reg]._is_free  == 0) and
 				   (gpr_status[reg]._is_link  == 0) and
-				   (gpr_status[reg]._is_valid == 1) and
-				   (gpr_status[reg]._counter  == 0)));
+				   (gpr_status[reg]._is_valid == 1)//  and
+// 				   (gpr_status[reg]._counter  == 0)
+                                   ));
 
 		  gpr_status[reg]._is_free = 1;
@@ -254,6 +257,7 @@
 		  TEST(bool, true,((spr_status[reg]._is_free  == 0) and
 				   (spr_status[reg]._is_link  == 0) and
-				   (spr_status[reg]._is_valid == 1) and
-				   (spr_status[reg]._counter  == 0)));
+				   (spr_status[reg]._is_valid == 1)//  and
+// 				   (spr_status[reg]._counter  == 0)
+                                   ));
 
 		  spr_status[reg]._is_free = 1;
@@ -301,7 +305,7 @@
 	      Tspecial_address_t re       = (it_spr != free_list_spr.end())?*it_spr:0;
 
-	      Tcontrol_t         read_ra  = (gpr_status_insert[ra]._is_link) and (gpr_status_insert[ra]._counter < _param->_max_reader);
-	      Tcontrol_t         read_rb  = (gpr_status_insert[rb]._is_link) and (gpr_status_insert[rb]._counter < _param->_max_reader);
-	      Tcontrol_t         read_rc  = (spr_status_insert[rc]._is_link) and (spr_status_insert[rc]._counter < _param->_max_reader);
+	      Tcontrol_t         read_ra  = (gpr_status_insert[ra]._is_link); // and (gpr_status_insert[ra]._counter < _param->_max_reader);
+	      Tcontrol_t         read_rb  = (gpr_status_insert[rb]._is_link); // and (gpr_status_insert[rb]._counter < _param->_max_reader);
+	      Tcontrol_t         read_rc  = (spr_status_insert[rc]._is_link); // and (spr_status_insert[rc]._counter < _param->_max_reader);
 	      Tcontrol_t         write_rd = (it_gpr != free_list_gpr.end());
 	      Tcontrol_t         write_re = (it_spr != free_list_spr.end());
@@ -341,7 +345,7 @@
 	      Tspecial_address_t re_new   = (rand()%(_param->_nb_special_register  ))  ;
 
-	      Tcontrol_t         read_ra  = (gpr_status_retire[ra]._is_link) and (gpr_status_retire[ra]._counter > 0);
-	      Tcontrol_t         read_rb  = (gpr_status_retire[rb]._is_link) and (gpr_status_retire[rb]._counter > 0);
-	      Tcontrol_t         read_rc  = (spr_status_retire[rc]._is_link) and (spr_status_retire[rc]._counter > 0);
+	      Tcontrol_t         read_ra  = (gpr_status_retire[ra]._is_link); // and (gpr_status_retire[ra]._counter > 0);
+	      Tcontrol_t         read_rb  = (gpr_status_retire[rb]._is_link); // and (gpr_status_retire[rb]._counter > 0);
+	      Tcontrol_t         read_rc  = (spr_status_retire[rc]._is_link); // and (spr_status_retire[rc]._counter > 0);
 	      Tcontrol_t         write_rd = (    (gpr_status_retire[rd_old]._is_link ) and 
 					         (gpr_status_retire[rd_old]._is_valid) and
@@ -355,5 +359,6 @@
 	      in_RETIRE_VAL                [i]->write((rand()%100) < percent_transaction_retire);
 	      in_RETIRE_READ_RA            [i]->write(read_ra );
-	      in_RETIRE_NUM_REG_RA_PHY     [i]->write(ra);
+	      in_RETIRE_RESTORE            [i]->write(0);
+ 	      in_RETIRE_NUM_REG_RA_PHY     [i]->write(ra);
 	      in_RETIRE_READ_RB            [i]->write(read_rb );
 	      in_RETIRE_NUM_REG_RB_PHY     [i]->write(rb);
@@ -502,4 +507,5 @@
 	    if (in_RETIRE_VAL [i]->read() and out_RETIRE_ACK [i]->read())
 	      {
+		Tcontrol_t         restore        = in_RETIRE_RESTORE            [i]->read();
 		Tcontrol_t         read_ra        = in_RETIRE_READ_RA            [i]->read();
 		Tgeneral_address_t ra             = in_RETIRE_NUM_REG_RA_PHY     [i]->read();
@@ -518,4 +524,5 @@
 
 		LABEL("RETIRE [%d] - Accepted",i);
+		LABEL(" * restore          : %d",restore);
 		LABEL(" * read_ra          : %d",read_ra );
 		LABEL(" * reg_ra           : %d",ra      );
@@ -575,9 +582,18 @@
 		if (write_rd)
 		  {
-                    if (restore_rd_old)
+                    if (restore)
                       {
-                        gpr_status[rd_old]._is_link  = 1;
-                        gpr_status[rd_new]._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_link  = 0;
+                            gpr_status[rd_new]._is_valid = 1;
+                          }
                       }
                     else
@@ -586,4 +602,5 @@
                         gpr_status[rd_new]._is_valid = 1;
                       }
+
 		  }
 		if (write_re)
@@ -619,6 +636,7 @@
 		  TEST(bool, true,((gpr_status[reg]._is_free  == 0) and
 				   (gpr_status[reg]._is_link  == 0) and
-				   (gpr_status[reg]._is_valid == 1) and
-				   (gpr_status[reg]._counter  == 0)));
+				   (gpr_status[reg]._is_valid == 1)//  and
+// 				   (gpr_status[reg]._counter  == 0)
+                                   ));
 
 		  gpr_status[reg]._is_free = 1;
@@ -639,6 +657,7 @@
 		  TEST(bool, true,((spr_status[reg]._is_free  == 0) and
 				   (spr_status[reg]._is_link  == 0) and
-				   (spr_status[reg]._is_valid == 1) and
-				   (spr_status[reg]._counter  == 0)));
+				   (spr_status[reg]._is_valid == 1)//  and
+// 				   (spr_status[reg]._counter  == 0)
+                                   ));
 
 		  spr_status[reg]._is_free = 1;
@@ -678,4 +697,5 @@
   delete []  in_RETIRE_VAL               ;
   delete [] out_RETIRE_ACK               ;
+  delete []  in_RETIRE_RESTORE           ;
   delete []  in_RETIRE_READ_RA           ;
   delete []  in_RETIRE_NUM_REG_RA_PHY    ;
