Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/SelfTest/src/test.cpp	(revision 108)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/SelfTest/src/test.cpp	(revision 115)
@@ -227,5 +227,5 @@
 	    in_RENAME_IN_VAL          [i][j]->write((rand()%100)<percent_transaction_rename_in);
 	    in_RENAME_IN_FRONT_END_ID [i][j]->write(range<Tcontext_t        >(rand(),_param->_size_front_end_id          ));
-	    in_RENAME_IN_CONTEXT_ID   [i][j]->write(range<Tcontext_t        >(rand(),log2(_param->_nb_context[i])        ));
+	    in_RENAME_IN_CONTEXT_ID   [i][j]->write(rand()%_param->_nb_context[i]);
 	    in_RENAME_IN_DEPTH        [i][j]->write(range<Tdepth_t          >(rand(),_param->_size_depth                 ));
 	    in_RENAME_IN_TYPE         [i][j]->write(range<Ttype_t           >(rand(),_param->_size_type                  ));
@@ -293,25 +293,29 @@
 		      find = true;
 		      
+		      Tcontext_t context_id = (_param->_have_port_context_id)?in_RENAME_IN_CONTEXT_ID [x][y]->read():0;
+
 		      if (_param->_have_port_front_end_id)
 		      TEST(Tcontext_t        ,out_RENAME_OUT_FRONT_END_ID [i]->read(),in_RENAME_IN_FRONT_END_ID [x][y]->read());
 		      if (_param->_have_port_context_id)
-		      TEST(Tcontext_t        ,out_RENAME_OUT_CONTEXT_ID   [i]->read(),in_RENAME_IN_CONTEXT_ID   [x][y]->read());
+		      TEST(Tcontext_t        ,out_RENAME_OUT_CONTEXT_ID   [i]->read(),context_id);
 		      if (_param->_have_port_depth)
 		      TEST(Tdepth_t          ,out_RENAME_OUT_DEPTH        [i]->read(),in_RENAME_IN_DEPTH        [x][y]->read());
 		      TEST(Ttype_t           ,out_RENAME_OUT_TYPE         [i]->read(),in_RENAME_IN_TYPE         [x][y]->read());
 		      TEST(Toperation_t      ,out_RENAME_OUT_OPERATION    [i]->read(),in_RENAME_IN_OPERATION    [x][y]->read());
-		      TEST(Tcontrol_t        ,out_RENAME_OUT_NO_EXECUTE   [i]->read(),in_RENAME_IN_NO_EXECUTE   [x][y]->read());
+		      Tcontrol_t have_event = in_RETIRE_EVENT_STATE[x][context_id]->read() != EVENT_STATE_NO_EVENT;
+		      Tcontrol_t no_execute = in_RENAME_IN_NO_EXECUTE   [x][y]->read() or have_event;
+		      TEST(Tcontrol_t        ,out_RENAME_OUT_NO_EXECUTE   [i]->read(),no_execute);
 		      TEST(Tcontrol_t        ,out_RENAME_OUT_IS_DELAY_SLOT[i]->read(),in_RENAME_IN_IS_DELAY_SLOT[x][y]->read());
 		      TEST(Tcontrol_t        ,out_RENAME_OUT_HAS_IMMEDIAT [i]->read(),in_RENAME_IN_HAS_IMMEDIAT [x][y]->read());
 		      TEST(Tgeneral_data_t   ,out_RENAME_OUT_IMMEDIAT     [i]->read(),in_RENAME_IN_IMMEDIAT     [x][y]->read());
-		      TEST(Tcontrol_t        ,out_RENAME_OUT_READ_RA      [i]->read(),in_RENAME_IN_READ_RA      [x][y]->read());
+		      TEST(Tcontrol_t        ,out_RENAME_OUT_READ_RA      [i]->read(),in_RENAME_IN_READ_RA      [x][y]->read() and not have_event);
 		      TEST(Tgeneral_address_t,out_RENAME_OUT_NUM_REG_RA   [i]->read(),in_RENAME_IN_NUM_REG_RA   [x][y]->read());
-		      TEST(Tcontrol_t        ,out_RENAME_OUT_READ_RB      [i]->read(),in_RENAME_IN_READ_RB      [x][y]->read());
+		      TEST(Tcontrol_t        ,out_RENAME_OUT_READ_RB      [i]->read(),in_RENAME_IN_READ_RB      [x][y]->read() and not have_event);
 		      TEST(Tgeneral_address_t,out_RENAME_OUT_NUM_REG_RB   [i]->read(),in_RENAME_IN_NUM_REG_RB   [x][y]->read());
-		      TEST(Tcontrol_t        ,out_RENAME_OUT_READ_RC      [i]->read(),in_RENAME_IN_READ_RC      [x][y]->read());
+		      TEST(Tcontrol_t        ,out_RENAME_OUT_READ_RC      [i]->read(),in_RENAME_IN_READ_RC      [x][y]->read() and not have_event);
 		      TEST(Tspecial_address_t,out_RENAME_OUT_NUM_REG_RC   [i]->read(),in_RENAME_IN_NUM_REG_RC   [x][y]->read());
-		      TEST(Tcontrol_t        ,out_RENAME_OUT_WRITE_RD     [i]->read(),in_RENAME_IN_WRITE_RD     [x][y]->read());
+		      TEST(Tcontrol_t        ,out_RENAME_OUT_WRITE_RD     [i]->read(),in_RENAME_IN_WRITE_RD     [x][y]->read() and not have_event);
 		      TEST(Tgeneral_address_t,out_RENAME_OUT_NUM_REG_RD   [i]->read(),in_RENAME_IN_NUM_REG_RD   [x][y]->read());
-		      TEST(Tcontrol_t        ,out_RENAME_OUT_WRITE_RE     [i]->read(),in_RENAME_IN_WRITE_RE     [x][y]->read());
+		      TEST(Tcontrol_t        ,out_RENAME_OUT_WRITE_RE     [i]->read(),in_RENAME_IN_WRITE_RE     [x][y]->read() and not have_event);
 		      TEST(Tspecial_address_t,out_RENAME_OUT_NUM_REG_RE   [i]->read(),in_RENAME_IN_NUM_REG_RE   [x][y]->read());
 		      TEST(Texception_t      ,out_RENAME_OUT_EXCEPTION_USE[i]->read(),in_RENAME_IN_EXCEPTION_USE[x][y]->read());
