Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h	(revision 108)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h	(revision 109)
@@ -222,4 +222,6 @@
 										   
     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    	   
+  private   : double                       ** _nb_cycle_idle;
+
   private   : std::list<entry_t*>           * _rob                                 ;//[nb_bank]
 										   
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp	(revision 108)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp	(revision 109)
@@ -279,4 +279,5 @@
 
     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+    ALLOC2(_nb_cycle_idle           ,double        ,_param->_nb_front_end,_param->_nb_context [it1]);
     ALLOC1(_rob                     ,std::list<entry_t*>,_param->_nb_bank);
     
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp	(revision 108)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp	(revision 109)
@@ -187,4 +187,5 @@
         
         // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+        DELETE2(_nb_cycle_idle           ,_param->_nb_front_end,_param->_nb_context [it1]);
         DELETE1(_rob                     ,_param->_nb_bank);
         DELETE1(reg_BANK_PTR             ,_param->_nb_bank);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_allocation.cpp	(revision 108)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_allocation.cpp	(revision 109)
@@ -58,6 +58,12 @@
       _stat->create_expr_average_by_cycle("average_inst_retire"   , "+ "+sum_nb_inst_retire_ok+" "+sum_nb_inst_retire_ko, "", _("Average instruction retire by cycle"));
 
-      _stat->create_expr                 ("IPC", "average_inst_retire_ok", TYPE_COUNTER, "inst/cycle", "Instruction Per Cycle");
-      _stat->create_expr                 ("CPI", "/ 1 IPC"               , TYPE_COUNTER, "cycle/inst", "Cycle Per Instruction");
+      _stat->create_expr                 ("IPC_ok" , "average_inst_retire_ok", TYPE_COUNTER, "inst/cycle", "Instruction Per Cycle (Instruction Ok)");
+      _stat->create_expr                 ("CPI_ok" , "/ 1 IPC_ok"            , TYPE_COUNTER, "cycle/inst", "Cycle Per Instruction (Instruction Ok)");
+
+      _stat->create_expr                 ("IPC_ko" , "average_inst_retire_ko", TYPE_COUNTER, "inst/cycle", "Instruction Per Cycle (Instruction Ko)");
+      _stat->create_expr                 ("CPI_ko" , "/ 1 IPC_ko"            , TYPE_COUNTER, "cycle/inst", "Cycle Per Instruction (Instruction Ko)");
+
+      _stat->create_expr                 ("IPC_all", "average_inst_retire"   , TYPE_COUNTER, "inst/cycle", "Instruction Per Cycle (Instruction Ok and Ko)");
+      _stat->create_expr                 ("CPI_all", "/ 1 IPC_all"           , TYPE_COUNTER, "cycle/inst", "Cycle Per Instruction (Instruction Ok and Ko)");
     }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp	(revision 108)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp	(revision 109)
@@ -41,4 +41,6 @@
 	  for (uint32_t j=0; j<_param->_nb_context [i]; j++)
 	    {
+              _nb_cycle_idle            [i][j] = 0;
+
 	      reg_NB_INST_COMMIT_ALL    [i][j] = 0;
 	      reg_NB_INST_COMMIT_MEM    [i][j] = 0;
@@ -59,4 +61,9 @@
     else
       {
+        // Increase number idle cycle
+	for (uint32_t i=0; i<_param->_nb_front_end; i++)
+	  for (uint32_t j=0; j<_param->_nb_context [i]; j++)
+            _nb_cycle_idle [i][j] ++;
+
 	// Compute next priority
 	_priority_insert->transition();
@@ -402,4 +409,7 @@
 	      _rob [i].pop_front();
 	      delete entry;
+
+              // Transaction on retire interface : reset watch dog timer.
+              _nb_cycle_idle [front_end_id][context_id] = 0;
 	    }
 
@@ -759,4 +769,10 @@
 #endif
 
+    // Stop Condition
+    for (uint32_t i=0; i<_param->_nb_front_end; i++)
+      for (uint32_t j=0; j<_param->_nb_context [i]; j++)
+        if (_nb_cycle_idle [i][j] >= debug_cycle_idle)
+          throw ERRORMORPHEO(FUNCTION,toString(_("Context [%d][%d] is idle since %.0f cycles.\n"),i,j,_nb_cycle_idle [i][j]));
+
     log_end(Commit_unit,FUNCTION);
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_transition.cpp	(revision 108)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_transition.cpp	(revision 109)
@@ -45,5 +45,5 @@
 	  if (internal_BANK_IN_ACK [i])
 	    {
-	      entry_t* entry = NULL;
+	      entry_t * entry = NULL;
 
 	      if (internal_BANK_IN_IS_REEXECUTE [i])
@@ -53,4 +53,5 @@
 		  if (PORT_READ(in_REEXECUTE_VAL [y]))
 		    {
+                      log_printf(TRACE,Issue_queue,FUNCTION,"  * ISSUE_IN [%d] - Transaction with REEXECUTE [%d]",i,y);
 #ifdef STATISTICS
                       if (usage_is_set(_usage,USE_STATISTICS))
@@ -62,20 +63,20 @@
 			 (_param->_have_port_front_end_id  )?PORT_READ(in_REEXECUTE_FRONT_END_ID          [y]):0,
 			 (_param->_have_port_rob_ptr       )?PORT_READ(in_REEXECUTE_PACKET_ID             [y]):0,
-			 PORT_READ(in_REEXECUTE_OPERATION             [y]),
-			 PORT_READ(in_REEXECUTE_TYPE                  [y]),
-			 PORT_READ(in_REEXECUTE_STORE_QUEUE_PTR_WRITE [y]),
+			                                     PORT_READ(in_REEXECUTE_OPERATION             [y]),
+			                                     PORT_READ(in_REEXECUTE_TYPE                  [y]),
+			                                     PORT_READ(in_REEXECUTE_STORE_QUEUE_PTR_WRITE [y]),
 			 (_param->_have_port_load_queue_ptr)?PORT_READ(in_REEXECUTE_LOAD_QUEUE_PTR_WRITE  [y]):0,
-			 PORT_READ(in_REEXECUTE_HAS_IMMEDIAT          [y]),
-			 PORT_READ(in_REEXECUTE_IMMEDIAT              [y]),
-			 PORT_READ(in_REEXECUTE_READ_RA               [y]),
-			 PORT_READ(in_REEXECUTE_NUM_REG_RA            [y]),
-			 PORT_READ(in_REEXECUTE_READ_RB               [y]),
-			 PORT_READ(in_REEXECUTE_NUM_REG_RB            [y]),
-			 PORT_READ(in_REEXECUTE_READ_RC               [y]),
-			 PORT_READ(in_REEXECUTE_NUM_REG_RC            [y]),
-			 PORT_READ(in_REEXECUTE_WRITE_RD              [y]),
-			 PORT_READ(in_REEXECUTE_NUM_REG_RD            [y]),
-			 PORT_READ(in_REEXECUTE_WRITE_RE              [y]),
-			 PORT_READ(in_REEXECUTE_NUM_REG_RE            [y])
+			                                     PORT_READ(in_REEXECUTE_HAS_IMMEDIAT          [y]),
+			                                     PORT_READ(in_REEXECUTE_IMMEDIAT              [y]),
+			                                     PORT_READ(in_REEXECUTE_READ_RA               [y]),
+			                                     PORT_READ(in_REEXECUTE_NUM_REG_RA            [y]),
+			                                     PORT_READ(in_REEXECUTE_READ_RB               [y]),
+			                                     PORT_READ(in_REEXECUTE_NUM_REG_RB            [y]),
+			                                     PORT_READ(in_REEXECUTE_READ_RC               [y]),
+			                                     PORT_READ(in_REEXECUTE_NUM_REG_RC            [y]),
+			                                     PORT_READ(in_REEXECUTE_WRITE_RD              [y]),
+			                                     PORT_READ(in_REEXECUTE_NUM_REG_RD            [y]),
+			                                     PORT_READ(in_REEXECUTE_WRITE_RE              [y]),
+			                                     PORT_READ(in_REEXECUTE_NUM_REG_RE            [y])
 			 );
 		    }
@@ -88,4 +89,6 @@
 		  if (PORT_READ(in_ISSUE_IN_VAL[x][y]))
 		    {
+                      log_printf(TRACE,Issue_queue,FUNCTION,"  * ISSUE_IN [%d] - Transaction with ISSUE_IN [%d][%d]",i,x,y);
+
 #ifdef STATISTICS
                       if (usage_is_set(_usage,USE_STATISTICS))
@@ -97,20 +100,20 @@
 			 (_param->_have_port_front_end_id  )?PORT_READ(in_ISSUE_IN_FRONT_END_ID          [x][y]):0,
 			 (_param->_have_port_rob_ptr       )?PORT_READ(in_ISSUE_IN_PACKET_ID             [x][y]):0,
-			 PORT_READ(in_ISSUE_IN_OPERATION             [x][y]),
-			 PORT_READ(in_ISSUE_IN_TYPE                  [x][y]),
-			 PORT_READ(in_ISSUE_IN_STORE_QUEUE_PTR_WRITE [x][y]),
+			                                     PORT_READ(in_ISSUE_IN_OPERATION             [x][y]),
+			                                     PORT_READ(in_ISSUE_IN_TYPE                  [x][y]),
+			                                     PORT_READ(in_ISSUE_IN_STORE_QUEUE_PTR_WRITE [x][y]),
 			 (_param->_have_port_load_queue_ptr)?PORT_READ(in_ISSUE_IN_LOAD_QUEUE_PTR_WRITE  [x][y]):0,
-			 PORT_READ(in_ISSUE_IN_HAS_IMMEDIAT          [x][y]),
-			 PORT_READ(in_ISSUE_IN_IMMEDIAT              [x][y]),
-			 PORT_READ(in_ISSUE_IN_READ_RA               [x][y]),
-			 PORT_READ(in_ISSUE_IN_NUM_REG_RA            [x][y]),
-			 PORT_READ(in_ISSUE_IN_READ_RB               [x][y]),
-			 PORT_READ(in_ISSUE_IN_NUM_REG_RB            [x][y]),
-			 PORT_READ(in_ISSUE_IN_READ_RC               [x][y]),
-			 PORT_READ(in_ISSUE_IN_NUM_REG_RC            [x][y]),
-			 PORT_READ(in_ISSUE_IN_WRITE_RD              [x][y]),
-			 PORT_READ(in_ISSUE_IN_NUM_REG_RD            [x][y]),
-			 PORT_READ(in_ISSUE_IN_WRITE_RE              [x][y]),
-			 PORT_READ(in_ISSUE_IN_NUM_REG_RE            [x][y])
+			                                     PORT_READ(in_ISSUE_IN_HAS_IMMEDIAT          [x][y]),
+			                                     PORT_READ(in_ISSUE_IN_IMMEDIAT              [x][y]),
+			                                     PORT_READ(in_ISSUE_IN_READ_RA               [x][y]),
+			                                     PORT_READ(in_ISSUE_IN_NUM_REG_RA            [x][y]),
+			                                     PORT_READ(in_ISSUE_IN_READ_RB               [x][y]),
+			                                     PORT_READ(in_ISSUE_IN_NUM_REG_RB            [x][y]),
+			                                     PORT_READ(in_ISSUE_IN_READ_RC               [x][y]),
+			                                     PORT_READ(in_ISSUE_IN_NUM_REG_RC            [x][y]),
+			                                     PORT_READ(in_ISSUE_IN_WRITE_RD              [x][y]),
+			                                     PORT_READ(in_ISSUE_IN_NUM_REG_RD            [x][y]),
+			                                     PORT_READ(in_ISSUE_IN_WRITE_RE              [x][y]),
+			                                     PORT_READ(in_ISSUE_IN_NUM_REG_RE            [x][y])
 			 );
 		    }
@@ -140,4 +143,7 @@
 		if (PORT_READ(in_ISSUE_OUT_ACK [x]))
 		  {
+                    log_printf(TRACE,Issue_queue,FUNCTION,"  * ISSUE_OUT [%d] - Transaction with ISSUE_OUT [%d]",i,x);
+
+
 		    entry_t * entry =  _issue_queue [i].front();
 		    _issue_queue [i].pop_front();
@@ -148,5 +154,5 @@
       }
 
-    log_printf(TRACE,Issue_queue,FUNCTION,"  * Info Issue_queue");
+    log_printf(TRACE,Issue_queue,FUNCTION,"  * Dump Issue_queue");
     for (uint32_t i=0; i<_param->_nb_bank; i++)
       {
@@ -155,5 +161,43 @@
           *(_stat_bank_nb_inst [i]) += _issue_queue[i].size();
 #endif
-	log_printf(TRACE,Issue_queue,FUNCTION,"    * [%d] size : %d",i,(int)_issue_queue[i].size());
+	log_printf(TRACE,Issue_queue,FUNCTION,"    * Bank [%d] size : %d",i,(int)_issue_queue[i].size());
+
+        uint32_t j = 0;
+        for (std::list<entry_t*>::iterator it=_issue_queue[i].begin();it!=_issue_queue[i].end(); ++it)
+          {
+            log_printf(TRACE,Issue_queue,FUNCTION,"      [%.4d] %.2d %.2d %.4d, %.2d %.3d, %.2d %.2d, %.1d %.8x, %.1d %.4d, %.1d %.4d, %.1d %.4d, %.1d %.4d, %.1d %.4d",
+                       j,
+                       
+                       (*it)->_context_id           ,
+                       (*it)->_front_end_id         ,
+                       (*it)->_packet_id            ,
+                       
+                       (*it)->_type                 ,
+                       (*it)->_operation            ,
+                       
+                       (*it)->_store_queue_ptr_write,
+                       (*it)->_load_queue_ptr_write ,
+                       
+                       (*it)->_has_immediat         ,
+                       (*it)->_immediat             ,
+                       
+                       (*it)->_read_ra              ,
+                       (*it)->_num_reg_ra           ,
+                       
+                       (*it)->_read_rb              ,
+                       (*it)->_num_reg_rb           ,
+                       
+                       (*it)->_read_rc              ,
+                       (*it)->_num_reg_rc           ,
+                       
+                       (*it)->_write_rd             ,
+                       (*it)->_num_reg_rd           ,
+                       
+                       (*it)->_write_re             ,
+                       (*it)->_num_reg_re           );
+            
+                ++j;
+              }
+
       }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Parameters.cpp	(revision 108)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Parameters.cpp	(revision 109)
@@ -57,4 +57,16 @@
     _table_issue_type         = table_issue_type     ;
 
+    log_printf(TRACE,Issue_queue,FUNCTION,"  * table_routing [nb_rename_unit][nb_inst_issue]");
+    for (uint32_t i=0; i<_nb_rename_unit; ++i)
+      for (uint32_t j=0; j<_nb_inst_issue; ++j)
+        if (_table_routing [i][j])
+          log_printf(TRACE,Issue_queue,FUNCTION,"    [%d][%d] -> true",i,j);
+        
+    log_printf(TRACE,Issue_queue,FUNCTION,"  * table_issue_type [nb_inst_issue][nb_type]");
+    for (uint32_t i=0; i<_nb_inst_issue; ++i)
+      for (uint32_t j=0; j<_nb_type; ++j)
+        if (_table_issue_type [i][j])
+          log_printf(TRACE,Issue_queue,FUNCTION,"    [%d][%d] -> true",i,j);
+    
     _max_nb_inst_rename       = max<uint32_t>(_nb_inst_rename,_nb_rename_unit);
     _nb_bank_select_out       = _nb_bank/nb_inst_issue;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Parameters_msg_error.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Parameters_msg_error.cpp	(revision 108)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Parameters_msg_error.cpp	(revision 109)
@@ -38,22 +38,4 @@
       test.warning(_("For better performance, the bank's size (size_queue/nb_bank) must be > 1.\n"));
 
-    bool type_valid [_nb_type];
-
-    for (uint32_t i=0; i<_nb_type; i++)
-      type_valid [i] = false;
-    
-    type_valid [TYPE_ALU    ] = true;
-    type_valid [TYPE_SHIFT  ] = true;
-    type_valid [TYPE_MOVE   ] = true;
-    type_valid [TYPE_TEST   ] = true;
-    type_valid [TYPE_MUL    ] = true;
-    type_valid [TYPE_DIV    ] = true;
-    type_valid [TYPE_EXTEND ] = true;
-    type_valid [TYPE_FIND   ] = true;
-    type_valid [TYPE_SPECIAL] = true;
-    type_valid [TYPE_CUSTOM ] = true;
-    type_valid [TYPE_BRANCH ] = true;
-    type_valid [TYPE_MEMORY ] = true;
-
     for (uint32_t i=0; i<_nb_rename_unit; i++)
       {
@@ -61,5 +43,5 @@
 	
 	for (uint32_t j=0; j<_nb_type; j++)
-	  type_present [j] = not type_valid [j];
+	  type_present [j] = not is_type_valid(j);
 
 	bool find = false;
@@ -77,5 +59,5 @@
 	else
 	  for (uint32_t j=0; j<_nb_type; j++)
-	    if (not type_present [j])
+	    if (not type_present [j] and not is_type_optionnal(j))
 	      test.error(toString(_("Rename_unit [%d] can't issue instruction's type \"%s\".\n"),i,toString(j).c_str()));
       }
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/OOO_Engine_Glue_genMealy_insert_valack.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/OOO_Engine_Glue_genMealy_insert_valack.cpp	(revision 108)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/OOO_Engine_Glue_genMealy_insert_valack.cpp	(revision 109)
@@ -27,6 +27,5 @@
     for (uint32_t i=0; i<_param->_nb_rename_unit; ++i)
       {
-        // Transaction must be in-order
-//         Tcontrol_t previous_transaction = true;
+        // Transaction must be in-order : make in Rename_unit
 
         for (uint32_t j=0; j<_param->_nb_inst_insert[i]; ++j)
@@ -38,10 +37,7 @@
             Tcontrol_t issue_queue_ack        = PORT_READ(in_INSERT_ISSUE_QUEUE_ACK        [i][j]);
             
-            
-            
             // if not execute -> don't route to issue_queue
             
             Tcontrol_t val             = (
-//                                           previous_transaction   and
                                           rename_unit_val        and
                                           commit_unit_ack        and
@@ -49,5 +45,4 @@
                                            issue_queue_ack));
             Tcontrol_t rename_unit_ack = (
-//                                           previous_transaction   and
                                           ack                    and
                                           commit_unit_ack        and
@@ -55,5 +50,4 @@
                                            issue_queue_ack));
             Tcontrol_t commit_unit_val = (
-//                                           previous_transaction   and
                                           ack                    and
                                           rename_unit_val        and
@@ -61,5 +55,4 @@
                                            issue_queue_ack));
             Tcontrol_t issue_queue_val = (
-//                                           previous_transaction   and
                                           ack                    and
                                           rename_unit_val        and
@@ -73,7 +66,6 @@
 
             log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"  * rename_unit [%d].inst_insert[%d] -> %d",i,j,x);
-//          log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * previous_transaction              : %d",previous_transaction  );
-            log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * insert_val                    (w) : %d",val                   );
-            log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * insert_ack                    (r) : %d",ack                   );
+            log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * insert_val (RegisterFile)     (w) : %d",val                   );
+            log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * insert_ack (RegisterFile)     (r) : %d",ack                   );
             log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * insert_rename_unit_val        (r) : %d",rename_unit_val       );
             log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * insert_rename_unit_ack        (w) : %d",rename_unit_ack       );
@@ -84,6 +76,4 @@
             log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * insert_issue_queue_ack        (r) : %d",issue_queue_ack       );
 
-            
-//          previous_transaction = VAL and ACK;
             x ++;
           }
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/Parameters.cpp	(revision 108)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/Parameters.cpp	(revision 109)
@@ -53,10 +53,10 @@
     _size_rename_id                         = log2(_nb_rename_unit)           ;
     _sum_inst_insert                        = 0;
-//     _sum_inst_retire                        = 0;
+//  _sum_inst_retire                        = 0;
 
     for (uint32_t i=0; i<_nb_rename_unit; ++i)
       {
         _sum_inst_insert += _nb_inst_insert[i];
-//         _sum_inst_retire += _nb_inst_retire[i];
+//      _sum_inst_retire += _nb_inst_retire[i];
       }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/Makefile.deps
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/Makefile.deps	(revision 108)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/Makefile.deps	(revision 109)
@@ -14,14 +14,20 @@
 endif
 
+ifndef Priority
+include 			$(DIR_MORPHEO)/Behavioural/Generic/Priority/Makefile.deps
+endif
+
 #-----[ Directory ]----------------------------------------
 
-Free_List_unit_DIR			=	$(DIR_MORPHEO)/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit
+Free_List_unit_DIR		=	$(DIR_MORPHEO)/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit
 
 #-----[ Library ]------------------------------------------
 
-Free_List_unit_LIBRARY		= 	-lFree_List_unit	\
+Free_List_unit_LIBRARY		= 	-lFree_List_unit		\
+					$(Priority_LIBRARY)		\
 					$(Behavioural_LIBRARY)	
 
-Free_List_unit_DIR_LIBRARY		=	-L$(Free_List_unit_DIR)/lib	\
+Free_List_unit_DIR_LIBRARY	=	-L$(Free_List_unit_DIR)/lib	\
+					$(Priority_DIR_LIBRARY)		\
 					$(Behavioural_DIR_LIBRARY)
 
@@ -31,4 +37,5 @@
 				@\
 				$(MAKE) Behavioural_library;		\
+				$(MAKE) Priority_library;		\
 				$(MAKE) --directory=$(Free_List_unit_DIR) --makefile=Makefile;
 
@@ -36,3 +43,4 @@
 				@\
 				$(MAKE) Behavioural_library_clean;	\
+				$(MAKE) Priority_library_clean;		\
 				$(MAKE) --directory=$(Free_List_unit_DIR) --makefile=Makefile clean;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/SelfTest/src/test.cpp	(revision 108)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/SelfTest/src/test.cpp	(revision 109)
@@ -7,5 +7,5 @@
  */
 
-#define NB_ITERATION  1
+#define NB_ITERATION  16
 #define CYCLE_MAX     (128*NB_ITERATION)
 
@@ -190,6 +190,6 @@
 		    TEST(bool, gpr_free[reg],true);
 
-		    Tgeneral_address_t bank = reg >> _param->_bank_gpr_size_slot;
-		    TEST(bool, (bank >= (i*_param->_nb_bank_by_pop)) and (bank < ((i+1)*_param->_nb_bank_by_pop)), true);
+// 		    Tgeneral_address_t bank = reg >> _param->_bank_gpr_size_slot;
+// 		    TEST(bool, (bank >= (i*_param->_nb_bank_by_pop)) and (bank < ((i+1)*_param->_nb_bank_by_pop)), true);
 
 		    gpr_free[reg] = false;
@@ -202,6 +202,6 @@
 		    TEST(bool,spr_free[reg],true);
 		    
-		    Tspecial_address_t bank = reg >> _param->_bank_spr_size_slot;
-		    TEST(bool, (bank >= (i*_param->_nb_bank_by_pop)) and (bank < ((i+1)*_param->_nb_bank_by_pop)), true);
+// 		    Tspecial_address_t bank = reg >> _param->_bank_spr_size_slot;
+// 		    TEST(bool, (bank >= (i*_param->_nb_bank_by_pop)) and (bank < ((i+1)*_param->_nb_bank_by_pop)), true);
 
 		    spr_free[reg] = false;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/include/Free_List_unit.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/include/Free_List_unit.h	(revision 108)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/include/Free_List_unit.h	(revision 109)
@@ -28,4 +28,6 @@
 #endif
 #include "Behavioural/include/Usage.h"
+
+#include "Behavioural/Generic/Priority/include/Priority.h"
 
 namespace morpheo {
@@ -83,4 +85,6 @@
 
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+  private   : generic::priority::Priority   * _priority_gpr;
+  private   : generic::priority::Priority   * _priority_spr;
 
     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
@@ -89,6 +93,4 @@
 
     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  private   : uint32_t                        reg_BANK_PRIORITY;
-
   private   : Tcontrol_t                    * internal_POP_ACK      ; //[nb_pop]
   private   : uint32_t                      * internal_POP_GPR_BANK ; //[nb_pop]
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/include/Parameters.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/include/Parameters.h	(revision 108)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/include/Parameters.h	(revision 109)
@@ -37,5 +37,5 @@
 //public : uint32_t    _size_special_register;
 
-  public : uint32_t    _nb_bank_by_pop       ;
+//   public : uint32_t    _nb_bank_by_pop       ;
   public : uint32_t    _bank_gpr_nb_slot     ;
   public : uint32_t    _bank_gpr_size_slot   ;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_allocation.cpp	(revision 108)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_allocation.cpp	(revision 109)
@@ -101,4 +101,13 @@
        }
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+    _priority_gpr = new generic::priority::Priority (_name+"_priority_gpr",
+						     _param->_priority,
+						     _param->_nb_bank,
+						     _param->_nb_bank);
+
+    _priority_spr = new generic::priority::Priority (_name+"_priority_spr",
+						     _param->_priority,
+						     _param->_nb_bank,
+						     _param->_nb_bank);
 
 #ifdef POSITION
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_deallocation.cpp	(revision 108)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_deallocation.cpp	(revision 109)
@@ -58,7 +58,9 @@
 
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
-
-     delete _component;
-
+    delete _priority_gpr;
+    delete _priority_spr;
+    
+    delete _component;
+    
     log_printf(FUNC,Free_List_unit,FUNCTION,"End");
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_genMealy_pop.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_genMealy_pop.cpp	(revision 108)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_genMealy_pop.cpp	(revision 109)
@@ -26,70 +26,155 @@
     log_function(Free_List_unit,FUNCTION,_name.c_str());
 
+    std::list<generic::priority::select_t> * select_gpr = _priority_gpr->select();
+    std::list<generic::priority::select_t>::iterator it_gpr=select_gpr->begin();
+
+    std::list<generic::priority::select_t> * select_spr = _priority_spr->select();
+    std::list<generic::priority::select_t>::iterator it_spr=select_spr->begin();
+
     for (uint32_t i=0; i<_param->_nb_pop; i++)
       {
         log_printf(TRACE,Free_List_unit,FUNCTION,"  * POP [%d]",i);
-
- 	uint32_t offset = i*_param->_nb_bank_by_pop;
-
+        
 	// GPR
 	bool gpr_ack = not PORT_READ(in_POP_GPR_VAL[i]);
-
+        
         log_printf(TRACE,Free_List_unit,FUNCTION,"    * GPR_VAL : %d",PORT_READ(in_POP_GPR_VAL[i]));
-
+        
 	if (not gpr_ack)
-	  for (uint32_t j=0; j<_param->_nb_bank_by_pop; j++)
-	    {
-	      uint32_t bank = offset+((j+reg_BANK_PRIORITY)%_param->_nb_bank_by_pop
-                                      );
-
-              log_printf(TRACE,Free_List_unit,FUNCTION,"    * bank    : %d",bank);
-	      
-	      if (not _gpr_list[bank].empty())
-		{
-		  // find
-                  log_printf(TRACE,Free_List_unit,FUNCTION,"    * find    : %d",_gpr_list[bank].front());
-
-		  gpr_ack = true;
-		  internal_POP_GPR_BANK [i] = bank;
-		  PORT_WRITE(out_POP_GPR_NUM_REG [i],
-			     //(bank << _param->_shift) | // only in VHDL
-			     _gpr_list[bank].front());
-		  
-		  break;
-		}
-	    }
+          {
+            // scan all bank
+            for (;
+                 it_gpr!=select_gpr->end();
+                 ++it_gpr)
+              {
+                uint32_t num_bank = it_gpr->grp;
+                
+                log_printf(TRACE,Free_List_unit,FUNCTION,"    * num_bank: %d",num_bank);
+                
+                if (not _gpr_list[num_bank].empty())
+                  {
+                    // find
+                    log_printf(TRACE,Free_List_unit,FUNCTION,"    * find    : %d",_gpr_list[num_bank].front());
+                    
+                    gpr_ack = true;
+                    internal_POP_GPR_BANK [i] = num_bank;
+                    PORT_WRITE(out_POP_GPR_NUM_REG [i],
+                               //(num_bank << _param->_shift) | // only in VHDL
+                               _gpr_list[num_bank].front());
+                  
+                    ++it_gpr;
+                    break;
+                  }
+              }
+          }
 
 	// SPR
 	bool spr_ack = not PORT_READ(in_POP_SPR_VAL[i]);
+        
+        log_printf(TRACE,Free_List_unit,FUNCTION,"    * SPR_VAL : %d",PORT_READ(in_POP_SPR_VAL[i]));
+        
+	if (not spr_ack)
+          {
+            // scan all bank
+            for (;
+                 it_spr!=select_spr->end();
+                 ++it_spr)
+              {
+                uint32_t num_bank = it_spr->grp;
+                
+                log_printf(TRACE,Free_List_unit,FUNCTION,"    * num_bank: %d",num_bank);
+                
+                if (not _spr_list[num_bank].empty())
+                  {
+                    // find
+                    log_printf(TRACE,Free_List_unit,FUNCTION,"    * find    : %d",_spr_list[num_bank].front());
+                    
+                    spr_ack = true;
+                    internal_POP_SPR_BANK [i] = num_bank;
+                    PORT_WRITE(out_POP_SPR_NUM_REG [i],
+                               //(num_bank << _param->_shift) | // only in VHDL
+                               _spr_list[num_bank].front());
+                  
+                    ++it_spr;
+                    break;
+                  }
+              }
+          }
 
-        log_printf(TRACE,Free_List_unit,FUNCTION,"    * SPR_VAL : %d",PORT_READ(in_POP_SPR_VAL[i]));
-
-	if (not spr_ack)
-	  for (uint32_t j=0; j<_param->_nb_bank_by_pop; j++)
-	    {
-	      uint32_t bank = offset+((j+reg_BANK_PRIORITY)%_param->_nb_bank_by_pop
-                                      );
-
-              log_printf(TRACE,Free_List_unit,FUNCTION,"    * bank    : %d",bank);
-	      
-	      if (not _spr_list[bank].empty())
-		{
-		  // find
-                  log_printf(TRACE,Free_List_unit,FUNCTION,"    * find    : %d",_spr_list[bank].front());
-
-		  spr_ack = true;
-		  internal_POP_SPR_BANK [i] = bank;
-		  PORT_WRITE(out_POP_SPR_NUM_REG [i],
-			     //(bank << _param->_shift) | // only in VHDL
-			     _spr_list[bank].front());
-		  
-		  break;
-		}
-	    }
 
 	internal_POP_ACK [i] = gpr_ack and spr_ack;
-	
 	PORT_WRITE(out_POP_ACK [i], internal_POP_ACK [i]);
       }
+
+//     for (uint32_t i=0; i<_param->_nb_pop; i++)
+//       {
+//         log_printf(TRACE,Free_List_unit,FUNCTION,"  * POP [%d]",i);
+        
+//  	uint32_t offset = (i*_param->_nb_bank_by_pop) + reg_BANK_PRIORITY;
+
+// 	// GPR
+// 	bool gpr_ack = not PORT_READ(in_POP_GPR_VAL[i]);
+
+//         log_printf(TRACE,Free_List_unit,FUNCTION,"    * GPR_VAL : %d",PORT_READ(in_POP_GPR_VAL[i]));
+
+// 	if (not gpr_ack)
+//           {
+//             for (uint32_t j=0; j<_param->_nb_bank_by_pop; j++)
+//               {
+//                 uint32_t bank = (offset+((j+reg_BANK_BY_POP_PRIORITY)%_param->_nb_bank_by_pop))%_param->_nb_bank;
+                
+//                 log_printf(TRACE,Free_List_unit,FUNCTION,"    * bank    : %d",bank);
+                
+//                 if (not _gpr_list[bank].empty())
+//                   {
+//                     // find
+//                     log_printf(TRACE,Free_List_unit,FUNCTION,"    * find    : %d",_gpr_list[bank].front());
+                    
+//                     gpr_ack = true;
+//                     internal_POP_GPR_BANK [i] = bank;
+//                     PORT_WRITE(out_POP_GPR_NUM_REG [i],
+//                                //(bank << _param->_shift) | // only in VHDL
+//                                _gpr_list[bank].front());
+                    
+//                     break;
+//                   }
+//               }
+//           }
+
+// 	// SPR
+// 	bool spr_ack = not PORT_READ(in_POP_SPR_VAL[i]);
+        
+//         log_printf(TRACE,Free_List_unit,FUNCTION,"    * SPR_VAL : %d",PORT_READ(in_POP_SPR_VAL[i]));
+        
+// 	if (not spr_ack)
+//           {
+//             uint32_t offset = (i*_param->_nb_bank_by_pop) + reg_BANK_PRIORITY;
+
+//             for (uint32_t j=0; j<_param->_nb_bank_by_pop; j++)
+//               {
+//                 uint32_t bank = (offset+((j+reg_BANK_BY_POP_PRIORITY)%_param->_nb_bank_by_pop))%_param->_nb_bank;
+                
+//                 log_printf(TRACE,Free_List_unit,FUNCTION,"    * bank    : %d",bank);
+                
+//                 if (not _spr_list[bank].empty())
+//                   {
+//                     // find
+//                     log_printf(TRACE,Free_List_unit,FUNCTION,"    * find    : %d",_spr_list[bank].front());
+                    
+//                     spr_ack = true;
+//                     internal_POP_SPR_BANK [i] = bank;
+//                     PORT_WRITE(out_POP_SPR_NUM_REG [i],
+//                                //(bank << _param->_shift) | // only in VHDL
+//                                _spr_list[bank].front());
+                    
+//                     break;
+//                   }
+//               }
+//           }
+
+// 	internal_POP_ACK [i] = gpr_ack and spr_ack;
+	
+// 	PORT_WRITE(out_POP_ACK [i], internal_POP_ACK [i]);
+//       }
     
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_transition.cpp	(revision 108)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_transition.cpp	(revision 109)
@@ -28,5 +28,7 @@
     if (PORT_READ(in_NRESET) == 0)
       {
-	reg_BANK_PRIORITY = 0;
+	_priority_gpr->reset();
+	_priority_spr->reset();
+
 	for (uint32_t i=0; i<_param->_nb_bank; i++)
 	  {
@@ -37,4 +39,7 @@
     else
       {
+	_priority_gpr->transition();
+	_priority_spr->transition();
+
 	// ==================================================
 	// =====[ POP ]======================================
@@ -76,7 +81,4 @@
               _spr_list [internal_PUSH_SPR_BANK[i]].push_back(PORT_READ(in_PUSH_SPR_NUM_REG [i]));
             }
-
- 	if (_param->_priority == PRIORITY_ROUND_ROBIN)
-          reg_BANK_PRIORITY = (reg_BANK_PRIORITY+1)%_param->_nb_bank_by_pop;
 
 #if (DEBUG >= DEBUG_TRACE) and (DEBUG_Free_List_unit == true)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Parameters.cpp	(revision 108)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Parameters.cpp	(revision 109)
@@ -45,5 +45,5 @@
     uint32_t size_special_register = log2(nb_special_register);
 
-    _nb_bank_by_pop        = _nb_bank / _nb_pop;
+//     _nb_bank_by_pop        = _nb_bank / _nb_pop;
 
     uint32_t gpr_nb_slot   = nb_general_register - nb_thread*_nb_general_register_logic;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_allocation.cpp	(revision 108)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_allocation.cpp	(revision 109)
@@ -1527,5 +1527,4 @@
                                      dest,"insert_"+toString(i));
 #endif
-          
           PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_VAL"       ,
                               dest,"out_INSERT_"+toString(i)+"_VAL"       );
