Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue.cpp	(revision 110)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue.cpp	(revision 111)
@@ -75,23 +75,88 @@
     if (usage_is_set(_usage,USE_SYSTEMC))
       {
-	log_printf(INFO,Issue_queue,FUNCTION,_("<%s> : Method - transition"),_name.c_str());
+        // Function pointer
+        switch (_param->_queue_scheme)
+          {
+          case ISSUE_QUEUE_SCHEME_IN_ORDER        :
+            {
+              function_transition         = &morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::Issue_queue::function_in_order_transition        ;
+              function_genMoore           = &morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::Issue_queue::function_in_order_genMoore          ;
+              function_genMealy_issue_in  = NULL;
+              function_genMealy_issue_out = &morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::Issue_queue::function_in_order_genMealy_issue_out;
+              
+              break;
+            }
+          case ISSUE_QUEUE_SCHEME_OUT_OF_ORDER    :
+            {
+              function_transition         = &morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::Issue_queue::function_out_of_order_transition        ;
+              function_genMoore           = &morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::Issue_queue::function_out_of_order_genMoore          ;
+              function_genMealy_issue_in  = NULL;
+              function_genMealy_issue_out = NULL;
+              
+              break;
+            }
+          default :
+            {
+              break;
+            }
+          }
 
-	SC_METHOD (transition);
-	dont_initialize ();
-	sensitive << (*(in_CLOCK)).pos();
-	
+        if (function_transition != NULL)
+          {
+            log_printf(INFO,Issue_queue,FUNCTION,_("<%s> : Method - transition"),_name.c_str());
+            
+            SC_METHOD (transition);
+            dont_initialize ();
+            sensitive << (*(in_CLOCK)).pos();
+            
 # ifdef SYSTEMCASS_SPECIFIC
-	// List dependency information
+            // List dependency information
 # endif    
+          }
 
-	log_printf(INFO,Issue_queue,FUNCTION,_("<%s> : Method - genMoore"),_name.c_str());
+        if (function_genMoore != NULL)
+          {
+            log_printf(INFO,Issue_queue,FUNCTION,_("<%s> : Method - genMoore"),_name.c_str());
+            
+            SC_METHOD (genMoore);
+            dont_initialize ();
+            sensitive << (*(in_CLOCK)).neg(); // need internal register
+            
+# ifdef SYSTEMCASS_SPECIFIC
+            // List dependency information
+# endif    
+          }
 
-	SC_METHOD (genMoore);
-	dont_initialize ();
-	sensitive << (*(in_CLOCK)).neg(); // need internal register
-	
+        if (function_genMealy_issue_in != NULL)
+          {
+            log_printf(INFO,Issue_queue,FUNCTION,_("<%s> : Method - genMealy_issue_in"),_name.c_str());
+            
+            SC_METHOD (genMealy_issue_in);
+            dont_initialize ();
+            sensitive << (*(in_CLOCK)).neg(); // need internal register
+            
 # ifdef SYSTEMCASS_SPECIFIC
-	// List dependency information
+            // List dependency information
 # endif    
+          }
+
+        if (function_genMealy_issue_out != NULL)
+          {
+            log_printf(INFO,Issue_queue,FUNCTION,_("<%s> : Method - genMealy_issue_out"),_name.c_str());
+            
+            SC_METHOD (genMealy_issue_out);
+            dont_initialize ();
+            sensitive << (*(in_CLOCK)).neg(); // need internal register
+
+            if (_param->_queue_scheme == ISSUE_QUEUE_SCHEME_IN_ORDER)
+              {
+                for (uint32_t i=0; i<_param->_nb_inst_issue; ++i)
+                  sensitive << (*(in_ISSUE_OUT_ACK [i]));
+              }
+            
+# ifdef SYSTEMCASS_SPECIFIC
+            // List dependency information
+# endif    
+          }
 
 #endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_allocation.cpp	(revision 110)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_allocation.cpp	(revision 111)
@@ -154,8 +154,18 @@
 
     ALLOC1(internal_REEXECUTE_ACK           ,Tcontrol_t,_param->_nb_inst_reexecute);
+
+    if (_param->_queue_scheme == ISSUE_QUEUE_SCHEME_OUT_OF_ORDER)
+      {
+    ALLOC1(internal_BANK_IN_ACK             ,Tcontrol_t,_param->_nb_bank);
+    ALLOC1(internal_BANK_IN_NUM_RENAME_UNIT ,uint32_t  ,_param->_nb_bank);
+    ALLOC1(internal_BANK_IN_NUM_INST        ,uint32_t  ,_param->_nb_bank);
+      }
+    if (_param->_queue_scheme == ISSUE_QUEUE_SCHEME_IN_ORDER)
+      {
+    ALLOC2(internal_ISSUE_IN_ACK            ,Tcontrol_t,_param->_nb_rename_unit,_param->_nb_inst_rename[it1]);
+      }
       }
 
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
-
     _priority_in  = new generic::priority::Priority (_name+"_priority_in"   ,
 						     _param->_priority      ,
@@ -165,4 +175,6 @@
 						     _param->_nb_rename_unit_select);
 
+    if (_param->_queue_scheme == ISSUE_QUEUE_SCHEME_OUT_OF_ORDER)
+      {
     _priority_out = new generic::priority::Priority (_name+"_priority_out"  ,
 						     _param->_priority      ,
@@ -174,4 +186,5 @@
 						     _param->_nb_bank,
 						     _param->_nb_bank);
+      }
 
 #ifdef POSITION
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_deallocation.cpp	(revision 110)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_deallocation.cpp	(revision 111)
@@ -98,8 +98,4 @@
         
         // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-        DELETE1(internal_BANK_IN_ACK             ,_param->_nb_bank);
-        DELETE1(internal_BANK_IN_NUM_RENAME_UNIT ,_param->_nb_bank);
-        DELETE1(internal_BANK_IN_NUM_INST        ,_param->_nb_bank);
-
         DELETE1(internal_ISSUE_OUT_VAL           ,_param->_nb_inst_issue);
         DELETE1(internal_ISSUE_OUT_FROM_REEXECUTE,_param->_nb_inst_issue);
@@ -108,4 +104,15 @@
 
         DELETE1(internal_REEXECUTE_ACK           ,_param->_nb_inst_reexecute);
+
+        if (_param->_queue_scheme == ISSUE_QUEUE_SCHEME_OUT_OF_ORDER)
+          {
+        DELETE1(internal_BANK_IN_ACK             ,_param->_nb_bank);
+        DELETE1(internal_BANK_IN_NUM_RENAME_UNIT ,_param->_nb_bank);
+        DELETE1(internal_BANK_IN_NUM_INST        ,_param->_nb_bank);
+          }
+        if (_param->_queue_scheme == ISSUE_QUEUE_SCHEME_IN_ORDER)
+          {
+        DELETE2(internal_ISSUE_IN_ACK            ,_param->_nb_rename_unit,_param->_nb_inst_rename[it1]);
+          }
       }
     
@@ -113,6 +120,9 @@
     
     delete    _priority_in ;
-    delete    _priority_out;
-    delete    _priority_reg;
+    if (_param->_queue_scheme == ISSUE_QUEUE_SCHEME_OUT_OF_ORDER)
+      {
+        delete    _priority_out;
+        delete    _priority_reg;
+      }
     delete    _component;
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_in_order_genMealy_issue_out.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_in_order_genMealy_issue_out.cpp	(revision 111)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_in_order_genMealy_issue_out.cpp	(revision 111)
@@ -0,0 +1,172 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Issue_queue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_ooo_engine {
+namespace ooo_engine {
+namespace issue_queue {
+
+
+#undef  FUNCTION
+#define FUNCTION "Issue_queue::function_in_order_genMealy_issue_out"
+  void Issue_queue::function_in_order_genMealy_issue_out (void)
+  {
+    log_begin(Issue_queue,FUNCTION);
+    log_function(Issue_queue,FUNCTION,_name.c_str());
+
+    // ===================================================================
+    // =====[ ISSUE_OUT ]=================================================
+    // ===================================================================
+    {
+      Tcontrol_t val [_param->_nb_inst_issue];
+
+      for (uint32_t i=0; i<_param->_nb_inst_issue; i++)
+        val [i] = 0;
+
+      // From Reexecute_queue
+
+//       uint32_t num_reexecute_entry = 0;
+      for (std::list<entry_t*>::iterator it=_reexecute_queue.begin();
+           it!=_reexecute_queue.end();
+           ++it)
+        {
+          entry_t* entry = (*it);
+
+          for (uint32_t i=0; i<_param->_nb_inst_issue; i++)
+            // test if no previous transaction and can accept this type
+            if ((val[i] == 0) and _param->_table_issue_type [i][entry->_type])
+              {
+                // find a issue port
+                val [i] = 1;
+	    
+                if (_param->_have_port_context_id)
+	        PORT_WRITE(out_ISSUE_OUT_CONTEXT_ID            [i], entry->_context_id           );
+	        if (_param->_have_port_front_end_id)
+	        PORT_WRITE(out_ISSUE_OUT_FRONT_END_ID          [i], entry->_front_end_id         );
+	        if (_param->_have_port_rob_ptr  )
+	        PORT_WRITE(out_ISSUE_OUT_PACKET_ID             [i], entry->_packet_id            );
+	        PORT_WRITE(out_ISSUE_OUT_OPERATION             [i], entry->_operation            );
+	        PORT_WRITE(out_ISSUE_OUT_TYPE                  [i], entry->_type                 );
+	        PORT_WRITE(out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE [i], entry->_store_queue_ptr_write);
+	        if (_param->_have_port_load_queue_ptr)
+	        PORT_WRITE(out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE  [i], entry->_load_queue_ptr_write );
+	        PORT_WRITE(out_ISSUE_OUT_HAS_IMMEDIAT          [i], entry->_has_immediat         );
+	        PORT_WRITE(out_ISSUE_OUT_IMMEDIAT              [i], entry->_immediat             );
+	        PORT_WRITE(out_ISSUE_OUT_READ_RA               [i], entry->_read_ra              );
+	        PORT_WRITE(out_ISSUE_OUT_NUM_REG_RA            [i], entry->_num_reg_ra           );
+	        PORT_WRITE(out_ISSUE_OUT_READ_RB               [i], entry->_read_rb              );
+	        PORT_WRITE(out_ISSUE_OUT_NUM_REG_RB            [i], entry->_num_reg_rb           );
+	        PORT_WRITE(out_ISSUE_OUT_READ_RC               [i], entry->_read_rc              );
+	        PORT_WRITE(out_ISSUE_OUT_NUM_REG_RC            [i], entry->_num_reg_rc           );
+	        PORT_WRITE(out_ISSUE_OUT_WRITE_RD              [i], entry->_write_rd             );
+	        PORT_WRITE(out_ISSUE_OUT_NUM_REG_RD            [i], entry->_num_reg_rd           );
+	        PORT_WRITE(out_ISSUE_OUT_WRITE_RE              [i], entry->_write_re             );
+	        PORT_WRITE(out_ISSUE_OUT_NUM_REG_RE            [i], entry->_num_reg_re           );
+
+                internal_ISSUE_OUT_FROM_REEXECUTE [i] = true;
+//              internal_ISSUE_OUT_NUM_BANK       [i] = num_reexecute_entry;
+                internal_ISSUE_OUT_ENTRY          [i] = entry;
+
+                break; // stop scan
+              }
+//           num_reexecute_entry ++;
+        }
+
+      // From Issue_queue
+      for (uint32_t i=0; i<_param->_nb_bank; ++i)
+        {
+          uint32_t num_bank=(reg_NUM_BANK_HEAD+i)%_param->_nb_bank;
+          
+          log_printf(TRACE,Issue_queue,FUNCTION,"    * Bank [%d]",num_bank);
+          
+          bool find = false;
+          
+          // Have instruction ?
+          if (not _issue_queue [num_bank].empty())
+            {
+ 	      log_printf(TRACE,Issue_queue,FUNCTION,"      * Not Empty !!!");
+
+              entry_t* entry = _issue_queue [num_bank].front();
+              
+              for (uint32_t j=0; j<_param->_nb_inst_issue; j++)
+                {
+                  log_printf(TRACE,Issue_queue,FUNCTION,"    * Issue [%d]",j);
+                  log_printf(TRACE,Issue_queue,FUNCTION,"      * issue_ack            : %d",PORT_READ(in_ISSUE_OUT_ACK [j]));
+                  log_printf(TRACE,Issue_queue,FUNCTION,"      * previous transaction : %d",val[j]);
+                  log_printf(TRACE,Issue_queue,FUNCTION,"      * can issue type       : %d",_param->_table_issue_type [j][entry->_type]);
+
+                  // test if no previous transaction and can accept this type
+                  if ((val[j] == 0) and 
+                      _param->_table_issue_type [j][entry->_type] and
+                      PORT_READ(in_ISSUE_OUT_ACK [j]))
+                    {
+                      log_printf(TRACE,Issue_queue,FUNCTION,"    * find : %d",j);
+                      
+                      // find a issue port
+                      val [j] = 1;
+                      
+                      if (_param->_have_port_context_id)
+	              PORT_WRITE(out_ISSUE_OUT_CONTEXT_ID            [j], entry->_context_id           );
+	              if (_param->_have_port_front_end_id)
+	              PORT_WRITE(out_ISSUE_OUT_FRONT_END_ID          [j], entry->_front_end_id         );
+	              if (_param->_have_port_rob_ptr  )
+	              PORT_WRITE(out_ISSUE_OUT_PACKET_ID             [j], entry->_packet_id            );
+	              PORT_WRITE(out_ISSUE_OUT_OPERATION             [j], entry->_operation            );
+	              PORT_WRITE(out_ISSUE_OUT_TYPE                  [j], entry->_type                 );
+	              PORT_WRITE(out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE [j], entry->_store_queue_ptr_write);
+	              if (_param->_have_port_load_queue_ptr)
+	              PORT_WRITE(out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE  [j], entry->_load_queue_ptr_write );
+	              PORT_WRITE(out_ISSUE_OUT_HAS_IMMEDIAT          [j], entry->_has_immediat         );
+	              PORT_WRITE(out_ISSUE_OUT_IMMEDIAT              [j], entry->_immediat             );
+	              PORT_WRITE(out_ISSUE_OUT_READ_RA               [j], entry->_read_ra              );
+	              PORT_WRITE(out_ISSUE_OUT_NUM_REG_RA            [j], entry->_num_reg_ra           );
+	              PORT_WRITE(out_ISSUE_OUT_READ_RB               [j], entry->_read_rb              );
+	              PORT_WRITE(out_ISSUE_OUT_NUM_REG_RB            [j], entry->_num_reg_rb           );
+	              PORT_WRITE(out_ISSUE_OUT_READ_RC               [j], entry->_read_rc              );
+	              PORT_WRITE(out_ISSUE_OUT_NUM_REG_RC            [j], entry->_num_reg_rc           );
+	              PORT_WRITE(out_ISSUE_OUT_WRITE_RD              [j], entry->_write_rd             );
+	              PORT_WRITE(out_ISSUE_OUT_NUM_REG_RD            [j], entry->_num_reg_rd           );
+	              PORT_WRITE(out_ISSUE_OUT_WRITE_RE              [j], entry->_write_re             );
+	              PORT_WRITE(out_ISSUE_OUT_NUM_REG_RE            [j], entry->_num_reg_re           );
+                      
+                      internal_ISSUE_OUT_FROM_REEXECUTE [j] = false;
+                      internal_ISSUE_OUT_NUM_BANK       [j] = num_bank;
+                      internal_ISSUE_OUT_ENTRY          [j] = entry;
+                      
+                      find = true;
+                      break; // find : stop scan
+                    }
+                }
+            }
+
+          if (not find)
+            break; // stop scan (in order)
+        }
+
+      for (uint32_t i=0; i<_param->_nb_inst_issue; i++)
+        {
+          internal_ISSUE_OUT_VAL [i] = val [i];
+          PORT_WRITE(out_ISSUE_OUT_VAL [i], internal_ISSUE_OUT_VAL [i]);
+        }
+    }
+
+    log_end(Issue_queue,FUNCTION);
+  };
+
+}; // end namespace issue_queue
+}; // end namespace ooo_engine
+}; // end namespace multi_ooo_engine
+}; // end namespace core
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_in_order_genMoore.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_in_order_genMoore.cpp	(revision 111)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_in_order_genMoore.cpp	(revision 111)
@@ -0,0 +1,80 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Issue_queue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_ooo_engine {
+namespace ooo_engine {
+namespace issue_queue {
+
+
+#undef  FUNCTION
+#define FUNCTION "Issue_queue::function_in_order_genMoore"
+  void Issue_queue::function_in_order_genMoore (void)
+  {
+    log_begin(Issue_queue,FUNCTION);
+    log_function(Issue_queue,FUNCTION,_name.c_str());
+
+    // ===================================================================
+    // =====[ REEXECUTE_UNIT ]============================================
+    // ===================================================================
+    // Same implementation in in-order and out-of-order
+
+    // ===================================================================
+    // =====[ ISSUE_IN ]==================================================
+    // ===================================================================
+    {
+      // init
+      for (uint32_t i=0; i<_param->_nb_rename_unit; i++)
+        for (uint32_t j=0; j<_param->_nb_inst_rename[i]; j++)
+          internal_ISSUE_IN_ACK [i][j] = false;
+
+      std::list<generic::priority::select_t> * select_in = _priority_in ->select(); // same select for all issue
+      std::list<generic::priority::select_t>::iterator it=select_in ->begin();
+
+      uint32_t num_bank = reg_NUM_BANK_TAIL;
+      uint32_t nb_insert = 0;
+      while ((it!=select_in ->end()) and  
+             (_issue_queue[num_bank].size() != _param->_size_bank) and // test if can accept an data
+             (nb_insert < _param->_nb_bank)
+             )
+        {
+          // Get num interface
+          uint32_t num_rename_unit = it->grp;
+          uint32_t num_inst_rename = it->elt;
+          
+          log_printf(TRACE,Issue_queue,FUNCTION,"  * ISSUE_IN [%d][%d]",num_rename_unit,num_inst_rename);
+          
+          // find
+          internal_ISSUE_IN_ACK [num_rename_unit][num_inst_rename] = true;
+
+          // update pointer
+          ++it;
+          num_bank = (num_bank+1)%_param->_nb_bank;
+          nb_insert ++;
+        }
+      
+      for (uint32_t i=0; i<_param->_nb_rename_unit; i++)
+        for (uint32_t j=0; j<_param->_nb_inst_rename[i]; j++)
+          PORT_WRITE(out_ISSUE_IN_ACK [i][j],internal_ISSUE_IN_ACK [i][j]);
+    }
+
+    log_end(Issue_queue,FUNCTION);
+  };
+
+}; // end namespace issue_queue
+}; // end namespace ooo_engine
+}; // end namespace multi_ooo_engine
+}; // end namespace core
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_in_order_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_in_order_transition.cpp	(revision 111)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_in_order_transition.cpp	(revision 111)
@@ -0,0 +1,124 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Issue_queue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_ooo_engine {
+namespace ooo_engine {
+namespace issue_queue {
+
+
+#undef  FUNCTION
+#define FUNCTION "Issue_queue::function_in_order_transition"
+  void Issue_queue::function_in_order_transition (void)
+  {
+    log_begin(Issue_queue,FUNCTION);
+    log_function(Issue_queue,FUNCTION,_name.c_str());
+
+    if (PORT_READ(in_NRESET) == 0)
+      {
+// 	_priority_in ->reset();
+// 	_priority_out->reset();
+// 	_priority_reg->reset();
+	
+	for (uint32_t i=0; i<_param->_nb_bank; i++)
+	  _issue_queue [i].clear();
+
+        reg_NUM_BANK_HEAD = 0;
+        reg_NUM_BANK_TAIL = 0;
+      }
+    else
+      {
+// 	_priority_in ->transition();
+// 	_priority_out->transition();
+// 	_priority_reg->transition();
+
+	// ===================================================================
+	// =====[ ISSUE_IN ]==================================================
+	// ===================================================================
+        {
+          for (uint32_t i=0; i<_param->_nb_rename_unit; i++)
+            for (uint32_t j=0; j<_param->_nb_inst_rename[i]; j++)
+              if (PORT_READ(in_ISSUE_IN_VAL[i][j]) and internal_ISSUE_IN_ACK [i][j])
+                {
+                  uint32_t num_bank = reg_NUM_BANK_TAIL;
+                  
+                  log_printf(TRACE,Issue_queue,FUNCTION,"  * ISSUE_IN [%d][%d] - Transaction with bank [%d]",i,j,num_bank);
+                      
+#ifdef STATISTICS
+                  if (usage_is_set(_usage,USE_STATISTICS))
+                    (*_stat_nb_inst_issue_in [i]) ++;
+#endif
+                  entry_t * entry = new entry_t
+                    (
+                     (_param->_have_port_context_id    )?PORT_READ(in_ISSUE_IN_CONTEXT_ID            [i][j]):0,
+                     (_param->_have_port_front_end_id  )?PORT_READ(in_ISSUE_IN_FRONT_END_ID          [i][j]):0,
+                     (_param->_have_port_rob_ptr       )?PORT_READ(in_ISSUE_IN_PACKET_ID             [i][j]):0,
+		                                         PORT_READ(in_ISSUE_IN_OPERATION             [i][j]),
+		                                         PORT_READ(in_ISSUE_IN_TYPE                  [i][j]),
+		                                         PORT_READ(in_ISSUE_IN_STORE_QUEUE_PTR_WRITE [i][j]),
+                     (_param->_have_port_load_queue_ptr)?PORT_READ(in_ISSUE_IN_LOAD_QUEUE_PTR_WRITE  [i][j]):0,
+		                                         PORT_READ(in_ISSUE_IN_HAS_IMMEDIAT          [i][j]),
+		                                         PORT_READ(in_ISSUE_IN_IMMEDIAT              [i][j]),
+		                                         PORT_READ(in_ISSUE_IN_READ_RA               [i][j]),
+		                                         PORT_READ(in_ISSUE_IN_NUM_REG_RA            [i][j]),
+		                                         PORT_READ(in_ISSUE_IN_READ_RB               [i][j]),
+		                                         PORT_READ(in_ISSUE_IN_NUM_REG_RB            [i][j]),
+		                                         PORT_READ(in_ISSUE_IN_READ_RC               [i][j]),
+		                                         PORT_READ(in_ISSUE_IN_NUM_REG_RC            [i][j]),
+		                                         PORT_READ(in_ISSUE_IN_WRITE_RD              [i][j]),
+		                                         PORT_READ(in_ISSUE_IN_NUM_REG_RD            [i][j]),
+		                                         PORT_READ(in_ISSUE_IN_WRITE_RE              [i][j]),
+		                                         PORT_READ(in_ISSUE_IN_NUM_REG_RE            [i][j])
+                     );
+                    
+                  _issue_queue [num_bank].push_back(entry);
+                  
+                  // Update pointer
+                  reg_NUM_BANK_TAIL = (reg_NUM_BANK_TAIL+1)%_param->_nb_bank;
+                }
+        }
+
+	// ===================================================================
+	// =====[ ISSUE_OUT ]=================================================
+	// ===================================================================
+
+        for (uint32_t i=0; i<_param->_nb_inst_issue; ++i)
+          if (internal_ISSUE_OUT_VAL [i] and PORT_READ(in_ISSUE_OUT_ACK [i]))
+            if (not internal_ISSUE_OUT_FROM_REEXECUTE [i])
+              {
+                entry_t * entry = internal_ISSUE_OUT_ENTRY    [i];
+                
+                // front ...
+                uint32_t  num_bank = internal_ISSUE_OUT_NUM_BANK [i];
+                
+                log_printf(TRACE,Issue_queue,FUNCTION,"  * ISSUE_OUT [%d] - From issue_queue [%d]",i,num_bank);
+                
+                _issue_queue [num_bank].remove(entry);
+                
+                reg_NUM_BANK_HEAD = (reg_NUM_BANK_HEAD+1)%_param->_nb_bank;
+                
+                delete entry;
+              } 
+
+      }
+
+    log_end(Issue_queue,FUNCTION);
+  };
+
+}; // end namespace issue_queue
+}; // end namespace ooo_engine
+}; // end namespace multi_ooo_engine
+}; // end namespace core
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_out_of_order_genMoore.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_out_of_order_genMoore.cpp	(revision 111)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_out_of_order_genMoore.cpp	(revision 111)
@@ -0,0 +1,225 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Issue_queue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_ooo_engine {
+namespace ooo_engine {
+namespace issue_queue {
+
+
+#undef  FUNCTION
+#define FUNCTION "Issue_queue::function_out_of_order_genMoore"
+  void Issue_queue::function_out_of_order_genMoore (void)
+  {
+    log_begin(Issue_queue,FUNCTION);
+    log_function(Issue_queue,FUNCTION,_name.c_str());
+
+    // ===================================================================
+    // =====[ REEXECUTE_UNIT ]============================================
+    // ===================================================================
+    // Same implementation in in-order and out-of-order
+
+    // ===================================================================
+    // =====[ ISSUE_IN ]==================================================
+    // ===================================================================
+    {
+      Tcontrol_t ack [_param->_nb_rename_unit][_param->_max_nb_inst_rename];
+
+      // Initialisation
+      for (uint32_t i=0; i<_param->_nb_bank; i++)
+        internal_BANK_IN_ACK  [i] = false;
+    
+      for (uint32_t i=0; i<_param->_nb_rename_unit; i++)
+        for (uint32_t j=0; j<_param->_nb_inst_rename[i]; j++)
+          ack [i][j] = false;
+    
+      std::list<generic::priority::select_t> * select_reg = _priority_reg->select(); // same select for all issue
+      
+      // issue_in interface
+      std::list<generic::priority::select_t> * select_in = _priority_in ->select(); // same select for all issue
+      for (std::list<generic::priority::select_t>::iterator it=select_in ->begin();
+           it!=select_in ->end();
+           it++)
+        {
+          // Get num interface
+          uint32_t num_rename_unit = it->grp;
+          uint32_t num_inst_rename = it->elt;
+
+          log_printf(TRACE,Issue_queue,FUNCTION,"  * ISSUE_IN [%d][%d]",num_rename_unit,num_inst_rename);
+          
+          // scan all bank
+          for (std::list<generic::priority::select_t>::iterator it=select_reg->begin();
+               it!=select_reg->end();
+               it++)
+            {
+              uint32_t num_bank  = it->grp;
+
+              log_printf(TRACE,Issue_queue,FUNCTION,"    * BANK [%d]",num_bank);
+          
+              // test if bank is not busy (full or previous access)
+              if (not internal_BANK_IN_ACK [num_bank] and (_issue_queue[num_bank].size() < _param->_size_bank))
+                {
+                  log_printf(TRACE,Issue_queue,FUNCTION,"    * find");
+
+                  // find
+                  ack [num_rename_unit][num_inst_rename] = true;
+                  internal_BANK_IN_ACK             [num_bank] = true;
+                  internal_BANK_IN_NUM_RENAME_UNIT [num_bank] = num_rename_unit;
+                  internal_BANK_IN_NUM_INST        [num_bank] = num_inst_rename;
+		  
+                  break; // Stop scan
+                }
+              else
+                log_printf(TRACE,Issue_queue,FUNCTION,"    * not find");
+            }
+        }
+    
+      for (uint32_t i=0; i<_param->_nb_rename_unit; i++)
+        for (uint32_t j=0; j<_param->_nb_inst_rename[i]; j++)
+          PORT_WRITE(out_ISSUE_IN_ACK [i][j],ack [i][j]);
+    }
+
+    // ===================================================================
+    // =====[ ISSUE_OUT ]=================================================
+    // ===================================================================
+    {
+      Tcontrol_t val [_param->_nb_inst_issue];
+
+      for (uint32_t i=0; i<_param->_nb_inst_issue; i++)
+        val [i] = 0;
+
+      // From Reexecute_queue
+
+//       uint32_t num_reexecute_entry = 0;
+      for (std::list<entry_t*>::iterator it=_reexecute_queue.begin();
+           it!=_reexecute_queue.end();
+           ++it)
+        {
+          entry_t* entry = (*it);
+
+          for (uint32_t i=0; i<_param->_nb_inst_issue; i++)
+            // test if no previous transaction and can accept this type
+            if ((val[i] == 0) and _param->_table_issue_type [i][entry->_type])
+              {
+                // find a issue port
+                val [i] = 1;
+	    
+                if (_param->_have_port_context_id)
+	        PORT_WRITE(out_ISSUE_OUT_CONTEXT_ID            [i], entry->_context_id           );
+	        if (_param->_have_port_front_end_id)
+	        PORT_WRITE(out_ISSUE_OUT_FRONT_END_ID          [i], entry->_front_end_id         );
+	        if (_param->_have_port_rob_ptr  )
+	        PORT_WRITE(out_ISSUE_OUT_PACKET_ID             [i], entry->_packet_id            );
+	        PORT_WRITE(out_ISSUE_OUT_OPERATION             [i], entry->_operation            );
+	        PORT_WRITE(out_ISSUE_OUT_TYPE                  [i], entry->_type                 );
+	        PORT_WRITE(out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE [i], entry->_store_queue_ptr_write);
+	        if (_param->_have_port_load_queue_ptr)
+	        PORT_WRITE(out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE  [i], entry->_load_queue_ptr_write );
+	        PORT_WRITE(out_ISSUE_OUT_HAS_IMMEDIAT          [i], entry->_has_immediat         );
+	        PORT_WRITE(out_ISSUE_OUT_IMMEDIAT              [i], entry->_immediat             );
+	        PORT_WRITE(out_ISSUE_OUT_READ_RA               [i], entry->_read_ra              );
+	        PORT_WRITE(out_ISSUE_OUT_NUM_REG_RA            [i], entry->_num_reg_ra           );
+	        PORT_WRITE(out_ISSUE_OUT_READ_RB               [i], entry->_read_rb              );
+	        PORT_WRITE(out_ISSUE_OUT_NUM_REG_RB            [i], entry->_num_reg_rb           );
+	        PORT_WRITE(out_ISSUE_OUT_READ_RC               [i], entry->_read_rc              );
+	        PORT_WRITE(out_ISSUE_OUT_NUM_REG_RC            [i], entry->_num_reg_rc           );
+	        PORT_WRITE(out_ISSUE_OUT_WRITE_RD              [i], entry->_write_rd             );
+	        PORT_WRITE(out_ISSUE_OUT_NUM_REG_RD            [i], entry->_num_reg_rd           );
+	        PORT_WRITE(out_ISSUE_OUT_WRITE_RE              [i], entry->_write_re             );
+	        PORT_WRITE(out_ISSUE_OUT_NUM_REG_RE            [i], entry->_num_reg_re           );
+
+                internal_ISSUE_OUT_FROM_REEXECUTE [i] = true;
+//              internal_ISSUE_OUT_NUM_BANK       [i] = num_reexecute_entry;
+                internal_ISSUE_OUT_ENTRY          [i] = entry;
+
+                break; // stop scan
+              }
+//           num_reexecute_entry ++;
+        }
+
+      // From Issue_queue
+
+      std::list<generic::priority::select_t> * select = _priority_out->select(); // same select for all issue
+
+      for (std::list<generic::priority::select_t>::iterator it=select->begin();
+           it!=select->end();
+           it++)
+        {
+          uint32_t num_bank=it->grp;
+
+//        log_printf(TRACE,Issue_queue,Issue_queue,FUNCTION,"    * Bank [%d]",num_bank);
+
+          // Have instruction ?
+          if (not _issue_queue [num_bank].empty())
+            {
+// 	      log_printf(TRACE,Issue_queue,Issue_queue,FUNCTION,"      * Not Empty !!!");
+
+              entry_t* entry = _issue_queue [num_bank].front();
+              
+              for (uint32_t i=0; i<_param->_nb_inst_issue; i++)
+                // test if no previous transaction and can accept this type
+                if ((val[i] == 0) and _param->_table_issue_type [i][entry->_type])
+                  {
+                    // find a issue port
+                    val [i] = 1;
+
+                    if (_param->_have_port_context_id)
+	            PORT_WRITE(out_ISSUE_OUT_CONTEXT_ID            [i], entry->_context_id           );
+	            if (_param->_have_port_front_end_id)
+	            PORT_WRITE(out_ISSUE_OUT_FRONT_END_ID          [i], entry->_front_end_id         );
+	            if (_param->_have_port_rob_ptr  )
+	            PORT_WRITE(out_ISSUE_OUT_PACKET_ID             [i], entry->_packet_id            );
+	            PORT_WRITE(out_ISSUE_OUT_OPERATION             [i], entry->_operation            );
+	            PORT_WRITE(out_ISSUE_OUT_TYPE                  [i], entry->_type                 );
+	            PORT_WRITE(out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE [i], entry->_store_queue_ptr_write);
+	            if (_param->_have_port_load_queue_ptr)
+	            PORT_WRITE(out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE  [i], entry->_load_queue_ptr_write );
+	            PORT_WRITE(out_ISSUE_OUT_HAS_IMMEDIAT          [i], entry->_has_immediat         );
+	            PORT_WRITE(out_ISSUE_OUT_IMMEDIAT              [i], entry->_immediat             );
+	            PORT_WRITE(out_ISSUE_OUT_READ_RA               [i], entry->_read_ra              );
+	            PORT_WRITE(out_ISSUE_OUT_NUM_REG_RA            [i], entry->_num_reg_ra           );
+	            PORT_WRITE(out_ISSUE_OUT_READ_RB               [i], entry->_read_rb              );
+	            PORT_WRITE(out_ISSUE_OUT_NUM_REG_RB            [i], entry->_num_reg_rb           );
+	            PORT_WRITE(out_ISSUE_OUT_READ_RC               [i], entry->_read_rc              );
+	            PORT_WRITE(out_ISSUE_OUT_NUM_REG_RC            [i], entry->_num_reg_rc           );
+	            PORT_WRITE(out_ISSUE_OUT_WRITE_RD              [i], entry->_write_rd             );
+	            PORT_WRITE(out_ISSUE_OUT_NUM_REG_RD            [i], entry->_num_reg_rd           );
+	            PORT_WRITE(out_ISSUE_OUT_WRITE_RE              [i], entry->_write_re             );
+	            PORT_WRITE(out_ISSUE_OUT_NUM_REG_RE            [i], entry->_num_reg_re           );
+                    
+                    internal_ISSUE_OUT_FROM_REEXECUTE [i] = false;
+                    internal_ISSUE_OUT_NUM_BANK       [i] = num_bank;
+                    internal_ISSUE_OUT_ENTRY          [i] = entry;
+
+                    break; // stop scan
+                  }
+            }
+        }
+
+      for (uint32_t i=0; i<_param->_nb_inst_issue; i++)
+        {
+          internal_ISSUE_OUT_VAL [i] = val [i];
+          PORT_WRITE(out_ISSUE_OUT_VAL [i], internal_ISSUE_OUT_VAL [i]);
+        }
+    }
+
+    log_end(Issue_queue,FUNCTION);
+  };
+
+}; // end namespace issue_queue
+}; // end namespace ooo_engine
+}; // end namespace multi_ooo_engine
+}; // end namespace core
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_out_of_order_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_out_of_order_transition.cpp	(revision 111)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_out_of_order_transition.cpp	(revision 111)
@@ -0,0 +1,116 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Issue_queue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_ooo_engine {
+namespace ooo_engine {
+namespace issue_queue {
+
+
+#undef  FUNCTION
+#define FUNCTION "Issue_queue::function_out_of_order_transition"
+  void Issue_queue::function_out_of_order_transition (void)
+  {
+    log_begin(Issue_queue,FUNCTION);
+    log_function(Issue_queue,FUNCTION,_name.c_str());
+
+    if (PORT_READ(in_NRESET) == 0)
+      {
+// 	_priority_in ->reset();
+	_priority_out->reset();
+	_priority_reg->reset();
+	
+	for (uint32_t i=0; i<_param->_nb_bank; i++)
+	  _issue_queue [i].clear();
+      }
+    else
+      {
+// 	_priority_in ->transition();
+ 	_priority_out->transition();
+	_priority_reg->transition();
+
+	// ===================================================================
+	// =====[ ISSUE_IN ]==================================================
+	// ===================================================================
+
+	for (uint32_t i=0; i<_param->_nb_bank; i++)
+	  if (internal_BANK_IN_ACK [i])
+	    {
+              uint32_t x = internal_BANK_IN_NUM_RENAME_UNIT [i];
+              uint32_t y = internal_BANK_IN_NUM_INST [i];
+              
+              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))
+                    (*_stat_nb_inst_issue_in [x]) ++;
+#endif
+                  entry_t * entry = new entry_t
+                    (
+                     (_param->_have_port_context_id    )?PORT_READ(in_ISSUE_IN_CONTEXT_ID            [x][y]):0,
+                     (_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]),
+                     (_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])
+                     );
+
+                  _issue_queue [i].push_back(entry);
+                }
+	    }
+
+	// ===================================================================
+	// =====[ ISSUE_OUT ]=================================================
+	// ===================================================================
+
+        for (uint32_t i=0; i<_param->_nb_inst_issue; ++i)
+          if (internal_ISSUE_OUT_VAL [i] and PORT_READ(in_ISSUE_OUT_ACK [i]))
+            if (not internal_ISSUE_OUT_FROM_REEXECUTE [i])
+              {
+                entry_t * entry = internal_ISSUE_OUT_ENTRY    [i];
+                
+                // front ...
+                uint32_t  num_bank = internal_ISSUE_OUT_NUM_BANK [i];
+                
+                log_printf(TRACE,Issue_queue,FUNCTION,"  * ISSUE_OUT [%d] - From issue_queue [%d]",i,num_bank);
+                
+                _issue_queue [num_bank].remove(entry);
+                delete entry;
+              } 
+      }
+
+    log_end(Issue_queue,FUNCTION);
+  };
+
+}; // end namespace issue_queue
+}; // end namespace ooo_engine
+}; // end namespace multi_ooo_engine
+}; // end namespace core
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_genMealy_issue_in.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_genMealy_issue_in.cpp	(revision 111)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_genMealy_issue_in.cpp	(revision 111)
@@ -0,0 +1,38 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Issue_queue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_ooo_engine {
+namespace ooo_engine {
+namespace issue_queue {
+
+
+#undef  FUNCTION
+#define FUNCTION "Issue_queue::genMealy_issue_in"
+  void Issue_queue::genMealy_issue_in (void)
+  {
+    log_begin(Issue_queue,FUNCTION);
+    log_function(Issue_queue,FUNCTION,_name.c_str());
+
+    (this->*function_genMealy_issue_in) ();
+
+    log_end(Issue_queue,FUNCTION);
+  };
+
+}; // end namespace issue_queue
+}; // end namespace ooo_engine
+}; // end namespace multi_ooo_engine
+}; // end namespace core
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_genMealy_issue_out.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_genMealy_issue_out.cpp	(revision 111)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_genMealy_issue_out.cpp	(revision 111)
@@ -0,0 +1,38 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Issue_queue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_ooo_engine {
+namespace ooo_engine {
+namespace issue_queue {
+
+
+#undef  FUNCTION
+#define FUNCTION "Issue_queue::genMealy_issue_out"
+  void Issue_queue::genMealy_issue_out (void)
+  {
+    log_begin(Issue_queue,FUNCTION);
+    log_function(Issue_queue,FUNCTION,_name.c_str());
+
+    (this->*function_genMealy_issue_out) ();
+
+    log_end(Issue_queue,FUNCTION);
+  };
+
+}; // end namespace issue_queue
+}; // end namespace ooo_engine
+}; // end namespace multi_ooo_engine
+}; // end namespace core
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_genMoore.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_genMoore.cpp	(revision 110)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_genMoore.cpp	(revision 111)
@@ -39,187 +39,5 @@
       }
 
-    // ===================================================================
-    // =====[ ISSUE_IN ]==================================================
-    // ===================================================================
-    {
-      Tcontrol_t ack [_param->_nb_rename_unit][_param->_max_nb_inst_rename];
-
-      // Initialisation
-      for (uint32_t i=0; i<_param->_nb_bank; i++)
-        internal_BANK_IN_ACK  [i] = false;
-    
-      for (uint32_t i=0; i<_param->_nb_rename_unit; i++)
-        for (uint32_t j=0; j<_param->_nb_inst_rename[i]; j++)
-          ack [i][j] = false;
-    
-      std::list<generic::priority::select_t> * select_reg = _priority_reg->select(); // same select for all issue
-      
-      // issue_in interface
-      std::list<generic::priority::select_t> * select_in = _priority_in ->select(); // same select for all issue
-      for (std::list<generic::priority::select_t>::iterator it=select_in ->begin();
-           it!=select_in ->end();
-           it++)
-        {
-          // Get num interface
-          uint32_t num_rename_unit = it->grp;
-          uint32_t num_inst_rename = it->elt;
-
-          log_printf(TRACE,Issue_queue,FUNCTION,"  * ISSUE_IN [%d][%d]",num_rename_unit,num_inst_rename);
-          
-          // scan all bank
-          for (std::list<generic::priority::select_t>::iterator it=select_reg->begin();
-               it!=select_reg->end();
-               it++)
-            {
-              uint32_t num_bank  = it->grp;
-
-              log_printf(TRACE,Issue_queue,FUNCTION,"    * BANK [%d]",num_bank);
-          
-              // test if bank is not busy (full or previous access)
-              if (not internal_BANK_IN_ACK [num_bank] and (_issue_queue[num_bank].size() < _param->_size_bank))
-                {
-                  log_printf(TRACE,Issue_queue,FUNCTION,"    * find");
-
-                  // find
-                  ack [num_rename_unit][num_inst_rename] = true;
-                  internal_BANK_IN_ACK             [num_bank] = true;
-                  internal_BANK_IN_NUM_RENAME_UNIT [num_bank] = num_rename_unit;
-                  internal_BANK_IN_NUM_INST        [num_bank] = num_inst_rename;
-		  
-                  break; // Stop scan
-                }
-              else
-                log_printf(TRACE,Issue_queue,FUNCTION,"    * not find");
-            }
-        }
-    
-      for (uint32_t i=0; i<_param->_nb_rename_unit; i++)
-        for (uint32_t j=0; j<_param->_nb_inst_rename[i]; j++)
-          PORT_WRITE(out_ISSUE_IN_ACK [i][j],ack [i][j]);
-    }
-
-    // ===================================================================
-    // =====[ ISSUE_OUT ]=================================================
-    // ===================================================================
-    {
-      Tcontrol_t val [_param->_nb_inst_issue];
-
-      for (uint32_t i=0; i<_param->_nb_inst_issue; i++)
-        val [i] = 0;
-
-      // From Reexecute_queue
-
-//       uint32_t num_reexecute_entry = 0;
-      for (std::list<entry_t*>::iterator it=_reexecute_queue.begin();
-           it!=_reexecute_queue.end();
-           ++it)
-        {
-          entry_t* entry = (*it);
-
-          for (uint32_t i=0; i<_param->_nb_inst_issue; i++)
-            // test if no previous transaction and can accept this type
-            if ((val[i] == 0) and _param->_table_issue_type [i][entry->_type])
-              {
-                // find a issue port
-                val [i] = 1;
-	    
-                if (_param->_have_port_context_id)
-	        PORT_WRITE(out_ISSUE_OUT_CONTEXT_ID            [i], entry->_context_id           );
-	        if (_param->_have_port_front_end_id)
-	        PORT_WRITE(out_ISSUE_OUT_FRONT_END_ID          [i], entry->_front_end_id         );
-	        if (_param->_have_port_rob_ptr  )
-	        PORT_WRITE(out_ISSUE_OUT_PACKET_ID             [i], entry->_packet_id            );
-	        PORT_WRITE(out_ISSUE_OUT_OPERATION             [i], entry->_operation            );
-	        PORT_WRITE(out_ISSUE_OUT_TYPE                  [i], entry->_type                 );
-	        PORT_WRITE(out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE [i], entry->_store_queue_ptr_write);
-	        if (_param->_have_port_load_queue_ptr)
-	        PORT_WRITE(out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE  [i], entry->_load_queue_ptr_write );
-	        PORT_WRITE(out_ISSUE_OUT_HAS_IMMEDIAT          [i], entry->_has_immediat         );
-	        PORT_WRITE(out_ISSUE_OUT_IMMEDIAT              [i], entry->_immediat             );
-	        PORT_WRITE(out_ISSUE_OUT_READ_RA               [i], entry->_read_ra              );
-	        PORT_WRITE(out_ISSUE_OUT_NUM_REG_RA            [i], entry->_num_reg_ra           );
-	        PORT_WRITE(out_ISSUE_OUT_READ_RB               [i], entry->_read_rb              );
-	        PORT_WRITE(out_ISSUE_OUT_NUM_REG_RB            [i], entry->_num_reg_rb           );
-	        PORT_WRITE(out_ISSUE_OUT_READ_RC               [i], entry->_read_rc              );
-	        PORT_WRITE(out_ISSUE_OUT_NUM_REG_RC            [i], entry->_num_reg_rc           );
-	        PORT_WRITE(out_ISSUE_OUT_WRITE_RD              [i], entry->_write_rd             );
-	        PORT_WRITE(out_ISSUE_OUT_NUM_REG_RD            [i], entry->_num_reg_rd           );
-	        PORT_WRITE(out_ISSUE_OUT_WRITE_RE              [i], entry->_write_re             );
-	        PORT_WRITE(out_ISSUE_OUT_NUM_REG_RE            [i], entry->_num_reg_re           );
-
-                internal_ISSUE_OUT_FROM_REEXECUTE [i] = true;
-//              internal_ISSUE_OUT_NUM_BANK       [i] = num_reexecute_entry;
-                internal_ISSUE_OUT_ENTRY          [i] = entry;
-
-                break; // stop scan
-              }
-//           num_reexecute_entry ++;
-        }
-
-      // From Issue_queue
-
-      std::list<generic::priority::select_t> * select = _priority_out->select(); // same select for all issue
-
-      for (std::list<generic::priority::select_t>::iterator it=select->begin();
-           it!=select->end();
-           it++)
-        {
-          uint32_t num_bank=it->grp;
-
-//        log_printf(TRACE,Issue_queue,Issue_queue,FUNCTION,"    * Bank [%d]",num_bank);
-
-          // Have instruction ?
-          if (not _issue_queue [num_bank].empty())
-            {
-// 	      log_printf(TRACE,Issue_queue,Issue_queue,FUNCTION,"      * Not Empty !!!");
-
-              entry_t* entry = _issue_queue [num_bank].front();
-              
-              for (uint32_t i=0; i<_param->_nb_inst_issue; i++)
-                // test if no previous transaction and can accept this type
-                if ((val[i] == 0) and _param->_table_issue_type [i][entry->_type])
-                  {
-                    // find a issue port
-                    val [i] = 1;
-
-                    if (_param->_have_port_context_id)
-	            PORT_WRITE(out_ISSUE_OUT_CONTEXT_ID            [i], entry->_context_id           );
-	            if (_param->_have_port_front_end_id)
-	            PORT_WRITE(out_ISSUE_OUT_FRONT_END_ID          [i], entry->_front_end_id         );
-	            if (_param->_have_port_rob_ptr  )
-	            PORT_WRITE(out_ISSUE_OUT_PACKET_ID             [i], entry->_packet_id            );
-	            PORT_WRITE(out_ISSUE_OUT_OPERATION             [i], entry->_operation            );
-	            PORT_WRITE(out_ISSUE_OUT_TYPE                  [i], entry->_type                 );
-	            PORT_WRITE(out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE [i], entry->_store_queue_ptr_write);
-	            if (_param->_have_port_load_queue_ptr)
-	            PORT_WRITE(out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE  [i], entry->_load_queue_ptr_write );
-	            PORT_WRITE(out_ISSUE_OUT_HAS_IMMEDIAT          [i], entry->_has_immediat         );
-	            PORT_WRITE(out_ISSUE_OUT_IMMEDIAT              [i], entry->_immediat             );
-	            PORT_WRITE(out_ISSUE_OUT_READ_RA               [i], entry->_read_ra              );
-	            PORT_WRITE(out_ISSUE_OUT_NUM_REG_RA            [i], entry->_num_reg_ra           );
-	            PORT_WRITE(out_ISSUE_OUT_READ_RB               [i], entry->_read_rb              );
-	            PORT_WRITE(out_ISSUE_OUT_NUM_REG_RB            [i], entry->_num_reg_rb           );
-	            PORT_WRITE(out_ISSUE_OUT_READ_RC               [i], entry->_read_rc              );
-	            PORT_WRITE(out_ISSUE_OUT_NUM_REG_RC            [i], entry->_num_reg_rc           );
-	            PORT_WRITE(out_ISSUE_OUT_WRITE_RD              [i], entry->_write_rd             );
-	            PORT_WRITE(out_ISSUE_OUT_NUM_REG_RD            [i], entry->_num_reg_rd           );
-	            PORT_WRITE(out_ISSUE_OUT_WRITE_RE              [i], entry->_write_re             );
-	            PORT_WRITE(out_ISSUE_OUT_NUM_REG_RE            [i], entry->_num_reg_re           );
-                    
-                    internal_ISSUE_OUT_FROM_REEXECUTE [i] = false;
-                    internal_ISSUE_OUT_NUM_BANK       [i] = num_bank;
-                    internal_ISSUE_OUT_ENTRY          [i] = entry;
-
-                    break; // stop scan
-                  }
-            }
-        }
-
-      for (uint32_t i=0; i<_param->_nb_inst_issue; i++)
-        {
-          internal_ISSUE_OUT_VAL [i] = val [i];
-          PORT_WRITE(out_ISSUE_OUT_VAL [i], internal_ISSUE_OUT_VAL [i]);
-        }
-    }
+    (this->*function_genMoore) ();
 
     log_end(Issue_queue,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 110)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_transition.cpp	(revision 111)
@@ -27,9 +27,4 @@
       {
 	_priority_in ->reset();
-	_priority_out->reset();
-	_priority_reg->reset();
-	
-	for (uint32_t i=0; i<_param->_nb_bank; i++)
-	  _issue_queue [i].clear();
         _reexecute_queue.clear();
       }
@@ -37,51 +32,4 @@
       {
 	_priority_in ->transition();
-	_priority_out->transition();
-	_priority_reg->transition();
-
-	// ===================================================================
-	// =====[ ISSUE_IN ]==================================================
-	// ===================================================================
-
-	for (uint32_t i=0; i<_param->_nb_bank; i++)
-	  if (internal_BANK_IN_ACK [i])
-	    {
-              uint32_t x = internal_BANK_IN_NUM_RENAME_UNIT [i];
-              uint32_t y = internal_BANK_IN_NUM_INST [i];
-              
-              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))
-                    (*_stat_nb_inst_issue_in [x]) ++;
-#endif
-                  entry_t * entry = new entry_t
-                    (
-                     (_param->_have_port_context_id    )?PORT_READ(in_ISSUE_IN_CONTEXT_ID            [x][y]):0,
-                     (_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]),
-                     (_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])
-                     );
-
-                  _issue_queue [i].push_back(entry);
-                }
-	    }
 
 	// ===================================================================
@@ -130,27 +78,30 @@
           if (internal_ISSUE_OUT_VAL [i] and PORT_READ(in_ISSUE_OUT_ACK [i]))
             {
-              entry_t * entry    = internal_ISSUE_OUT_ENTRY    [i];
-
+#ifdef STATISTICS
+              if (usage_is_set(_usage,USE_STATISTICS))
+                (*_stat_nb_inst_issue_out ) ++;
+#endif
               if (internal_ISSUE_OUT_FROM_REEXECUTE [i])
                 {
+                  entry_t * entry = internal_ISSUE_OUT_ENTRY    [i];
+                  
                   log_printf(TRACE,Issue_queue,FUNCTION,"  * ISSUE_OUT [%d] - From Reexecute_queue",i);
                   
                   _reexecute_queue.remove(entry);
+                  
+                  delete entry;
                 }
-              else
-                {
-                  // front ...
-                  uint32_t  num_bank = internal_ISSUE_OUT_NUM_BANK [i];
-
-                  log_printf(TRACE,Issue_queue,FUNCTION,"  * ISSUE_OUT [%d] - From issue_queue [%d]",i,num_bank);
-
-                  _issue_queue [num_bank].remove(entry);
-                }
-
-              delete entry;
-            } 
+                // else ... in function specific
+            }
       }
 
-#if defined(DEBUG) and defined(DEBUG_Issue_queue) and (DEBUG >= DEBUG_TRACE)
+    // specific implementation
+    (this->*function_transition) ();
+
+    // ===================================================================
+    // =====[ PRINT ]====================================================
+    // ===================================================================
+
+#if defined(DEBUG) and DEBUG_Issue_queue and (DEBUG >= DEBUG_TRACE)
     log_printf(TRACE,Issue_queue,FUNCTION,"  * Dump Issue_queue");
 
@@ -245,4 +196,6 @@
 #endif
 
+
+
 #if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     end_cycle ();
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 110)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Parameters.cpp	(revision 111)
@@ -19,25 +19,26 @@
 #undef  FUNCTION
 #define FUNCTION "Issue_queue::Parameters"
-  Parameters::Parameters (uint32_t          nb_context              ,
-			  uint32_t          nb_front_end            ,
-			  uint32_t          nb_rename_unit          ,
-			  uint32_t          size_queue              ,
-			  uint32_t          nb_bank                 ,
-			  uint32_t          size_packet             ,
-			  uint32_t          size_general_data       ,
-			  uint32_t          size_special_data       ,
-			  uint32_t          size_general_register   ,
-			  uint32_t          size_special_register   ,
-			  uint32_t          size_store_queue_ptr    ,
-			  uint32_t          size_load_queue_ptr     ,
-			  uint32_t          nb_inst_issue           ,
-			  uint32_t        * nb_inst_rename          ,
-			  uint32_t          nb_inst_reexecute       ,
-			  uint32_t          nb_rename_unit_select   ,
-			  Tpriority_t       priority                ,
-			  Tload_balancing_t load_balancing          ,
-			  bool           ** table_routing           ,
-			  bool           ** table_issue_type        ,
-                          bool              is_toplevel             )
+  Parameters::Parameters (uint32_t              nb_context              ,
+			  uint32_t              nb_front_end            ,
+			  uint32_t              nb_rename_unit          ,
+			  uint32_t              size_queue              ,
+                          Tissue_queue_scheme_t queue_scheme            ,
+			  uint32_t              nb_bank                 ,
+			  uint32_t              size_packet             ,
+			  uint32_t              size_general_data       ,
+			  uint32_t              size_special_data       ,
+			  uint32_t              size_general_register   ,
+			  uint32_t              size_special_register   ,
+			  uint32_t              size_store_queue_ptr    ,
+			  uint32_t              size_load_queue_ptr     ,
+			  uint32_t              nb_inst_issue           ,
+			  uint32_t            * nb_inst_rename          ,
+			  uint32_t              nb_inst_reexecute       ,
+			  uint32_t              nb_rename_unit_select   ,
+			  Tpriority_t           priority                ,
+			  Tload_balancing_t     load_balancing          ,
+			  bool               ** table_routing           ,
+			  bool               ** table_issue_type        ,
+                          bool                  is_toplevel             )
   {
     log_begin(Issue_queue,FUNCTION);
@@ -47,4 +48,5 @@
     _nb_rename_unit           = nb_rename_unit       ;
     _size_queue               = size_queue           ;
+    _queue_scheme             = queue_scheme         ;
     _nb_bank                  = nb_bank              ;   
     _nb_inst_issue            = 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 110)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Parameters_msg_error.cpp	(revision 111)
@@ -25,4 +25,23 @@
 
     Parameters_test test ("Issue_queue");
+
+    switch (_queue_scheme)
+      {
+      case ISSUE_QUEUE_SCHEME_IN_ORDER        :
+      case ISSUE_QUEUE_SCHEME_OUT_OF_ORDER    :
+	{
+          // supported
+	  break;
+	}
+      default :
+	{
+	  test.error(toString(_("Issue queue scheme '%s' is not supported. Please wait a next revision.\n"),toString(_queue_scheme).c_str()));
+	  break;
+	}
+      }
+
+    if (// (_queue_scheme == ISSUE_QUEUE_SCHEME_IN_BUNDLE_ORDER) or
+        (_queue_scheme == ISSUE_QUEUE_SCHEME_OUT_OF_ORDER   ))
+      test.warning(toString(_("Can have deadlock with the queue scheme \"%s\".\n"),toString(_queue_scheme).c_str()));
 
     if (not is_multiple(_size_queue, _nb_bank))
