Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/SelfTest/src/test.cpp	(revision 88)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/SelfTest/src/test.cpp	(revision 104)
@@ -81,5 +81,4 @@
   ALLOC1_SC_SIGNAL( in_RETIRE_FRONT_END_ID      ," in_RETIRE_FRONT_END_ID      ",Tcontext_t        ,_param->_nb_inst_retire);
   ALLOC1_SC_SIGNAL( in_RETIRE_CONTEXT_ID        ," in_RETIRE_CONTEXT_ID        ",Tcontext_t        ,_param->_nb_inst_retire);
-  ALLOC1_SC_SIGNAL( in_RETIRE_EVENT_STATE       ," in_RETIRE_EVENT_STATE       ",Tevent_state_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_WRITE_RE          ," in_RETIRE_WRITE_RE          ",Tcontrol_t        ,_param->_nb_inst_retire);
@@ -90,4 +89,8 @@
   ALLOC1_SC_SIGNAL(out_RETIRE_RESTORE_RD_PHY_OLD,"out_RETIRE_RESTORE_RD_PHY_OLD",Tcontrol_t        ,_param->_nb_inst_retire);
   ALLOC1_SC_SIGNAL(out_RETIRE_RESTORE_RE_PHY_OLD,"out_RETIRE_RESTORE_RE_PHY_OLD",Tcontrol_t        ,_param->_nb_inst_retire);
+
+  ALLOC2_SC_SIGNAL( in_RETIRE_EVENT_VAL         ," in_RETIRE_EVENT_VAL         ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_context[it1]);
+  ALLOC2_SC_SIGNAL(out_RETIRE_EVENT_ACK         ,"out_RETIRE_EVENT_ACK         ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_context[it1]);
+  ALLOC2_SC_SIGNAL( in_RETIRE_EVENT_STATE       ," in_RETIRE_EVENT_STATE       ",Tevent_state_t    ,_param->_nb_front_end,_param->_nb_context[it1]);
   
   /********************************************************
@@ -136,5 +139,4 @@
   if (_param->_have_port_context_id)
   INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_CONTEXT_ID        ,_param->_nb_inst_retire);
-  INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_EVENT_STATE       ,_param->_nb_inst_retire);
   INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_WRITE_RD          ,_param->_nb_inst_retire);
   INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_WRITE_RE          ,_param->_nb_inst_retire);
@@ -145,4 +147,8 @@
   INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit,out_RETIRE_RESTORE_RD_PHY_OLD,_param->_nb_inst_retire);
   INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit,out_RETIRE_RESTORE_RE_PHY_OLD,_param->_nb_inst_retire);
+
+  INSTANCE2_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_EVENT_VAL         ,_param->_nb_front_end, _param->_nb_context[it1]);
+  INSTANCE2_SC_SIGNAL(_Register_Address_Translation_unit,out_RETIRE_EVENT_ACK         ,_param->_nb_front_end, _param->_nb_context[it1]);
+  INSTANCE2_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_EVENT_STATE       ,_param->_nb_front_end, _param->_nb_context[it1]);
 
   msg(_("<%s> : Start Simulation ............\n"),name.c_str());
@@ -192,4 +198,8 @@
   SC_START(0);
   LABEL("Initialisation");
+  
+  for (uint32_t i=0; i<_param->_nb_front_end; ++i)
+    for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
+      in_RETIRE_EVENT_VAL [i][j]->write(1);
 
   LABEL("Reset");
@@ -251,9 +261,9 @@
 
 	      Tcontext_t front_end_id = rand() % _param->_nb_front_end;
+              Tcontext_t context_id   = rand() % (_param->_nb_context[front_end_id]);
 
 	      in_RETIRE_VAL                [i]->write(val);
 	      in_RETIRE_FRONT_END_ID       [i]->write(front_end_id);
-	      in_RETIRE_CONTEXT_ID         [i]->write(rand() % (_param->_nb_context[front_end_id]));
-	      in_RETIRE_EVENT_STATE        [i]->write(EVENT_STATE_NO_EVENT);
+	      in_RETIRE_CONTEXT_ID         [i]->write(context_id);
 	      in_RETIRE_WRITE_RD           [i]->write(rand() % 2);
 	      in_RETIRE_WRITE_RE           [i]->write(rand() % 2);
@@ -262,4 +272,6 @@
 	      in_RETIRE_NUM_REG_RD_PHY_OLD [i]->write(rand() % _param->_nb_general_register);
 	      in_RETIRE_NUM_REG_RE_PHY_OLD [i]->write(rand() % _param->_nb_special_register);
+
+	      in_RETIRE_EVENT_STATE        [front_end_id][context_id]->write(EVENT_STATE_NO_EVENT);
 	    }
 
@@ -332,8 +344,9 @@
 	  in_RETIRE_FRONT_END_ID       [i]->write(retire_front_end_id [i]);
 	  in_RETIRE_CONTEXT_ID         [i]->write(retire_context_id   [i]);
-	  in_RETIRE_EVENT_STATE        [i]->write(EVENT_STATE_EVENT);
 	  in_RETIRE_WRITE_RD           [i]->write(0);
 	  in_RETIRE_WRITE_RE           [i]->write(0);
 	  
+	  in_RETIRE_EVENT_STATE [retire_front_end_id [i]][retire_context_id [i]]->write(EVENT_STATE_EVENT);
+
 	  do
 	    {
@@ -389,5 +402,4 @@
 	      in_RETIRE_FRONT_END_ID       [i]->write(retire_front_end_id [i]);
 	      in_RETIRE_CONTEXT_ID         [i]->write(retire_context_id   [i]);
-	      in_RETIRE_EVENT_STATE        [i]->write(EVENT_STATE_WAITEND);
 	      in_RETIRE_WRITE_RD           [i]->write(rand() % 2);
 	      in_RETIRE_WRITE_RE           [i]->write(rand() % 2);
@@ -396,4 +408,6 @@
 	      in_RETIRE_NUM_REG_RD_PHY_OLD [i]->write(rand() % _param->_nb_general_register);
 	      in_RETIRE_NUM_REG_RE_PHY_OLD [i]->write(rand() % _param->_nb_special_register);
+
+              in_RETIRE_EVENT_STATE [retire_front_end_id [i]][retire_context_id [i]]->write(EVENT_STATE_WAITEND);
 	    }
 
@@ -517,5 +531,4 @@
   if (_param->_have_port_context_id)
   delete []  in_RETIRE_CONTEXT_ID        ;
-  delete []  in_RETIRE_EVENT_STATE       ;
   delete []  in_RETIRE_WRITE_RD          ;
   delete []  in_RETIRE_WRITE_RE          ;
@@ -527,4 +540,7 @@
   delete [] out_RETIRE_RESTORE_RE_PHY_OLD;
 
+  DELETE2_SC_SIGNAL( in_RETIRE_EVENT_VAL            ,_param->_nb_front_end, _param->_nb_context[it1]);
+  DELETE2_SC_SIGNAL(out_RETIRE_EVENT_ACK            ,_param->_nb_front_end, _param->_nb_context[it1]);
+  DELETE2_SC_SIGNAL( in_RETIRE_EVENT_STATE          ,_param->_nb_front_end, _param->_nb_context[it1]);
 #endif
 
