Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Parameters.cpp	(revision 115)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Parameters.cpp	(revision 117)
@@ -107,5 +107,5 @@
   uint32_t              * nb_reg_free                                   ,//[nb_rename_bloc]
   uint32_t              * nb_rename_unit_bank                           ,//[nb_rename_bloc]
-//   uint32_t              * size_read_counter                             ,//[nb_rename_bloc]
+//uint32_t              * size_read_counter                             ,//[nb_rename_bloc]
 
   // Read bloc
@@ -173,5 +173,5 @@
   uint32_t                nb_ooo_engine                                 ,
   uint32_t              * nb_rename_unit                                ,//[nb_ooo_engine]
-  uint32_t              * nb_inst_issue                                 ,//[nb_ooo_engine]
+  uint32_t              * nb_inst_issue_slot                            ,//[nb_ooo_engine]
   uint32_t              * nb_inst_reexecute                             ,//[nb_ooo_engine]
   uint32_t              * nb_inst_commit                                ,//[nb_ooo_engine]
@@ -217,5 +217,5 @@
   uint32_t              * link_decod_bloc_with_thread                   ,//[nb_thread]
   uint32_t              * link_rename_bloc_with_front_end               ,//[nb_front_end]
-  bool                *** table_dispatch                                ,//[nb_ooo_engine][nb_inst_issue][nb_read_bloc]
+  bool                *** table_dispatch                                ,//[nb_ooo_engine][nb_inst_issue_slot][nb_read_bloc]
   bool                 ** link_read_bloc_and_load_store_unit            ,//[nb_read_bloc][nb_load_store_unit]
   bool                 ** link_read_bloc_and_functionnal_unit           ,//[nb_read_bloc][nb_functionnal_unit]
@@ -319,5 +319,5 @@
     _nb_ooo_engine                           = nb_ooo_engine                           ;
     _nb_rename_unit                          = nb_rename_unit                          ;
-    _nb_inst_issue                           = nb_inst_issue                           ;
+    _nb_inst_issue_slot                      = nb_inst_issue_slot                      ;
     _nb_inst_reexecute                       = nb_inst_reexecute                       ;
     _nb_inst_commit                          = nb_inst_commit                          ;
@@ -868,5 +868,5 @@
       for (uint32_t i=0; i<_nb_ooo_engine; ++i)
         {
-          for (uint32_t j=0; j<_nb_inst_issue[i]; ++j)
+          for (uint32_t j=0; j<_nb_inst_issue_slot[i]; ++j)
             for (uint32_t k=0; k<_nb_read_bloc; ++k)
               {
@@ -1003,7 +1003,7 @@
       }
     
-    ALLOC4(_network_table_dispatch                        ,bool             ,_nb_ooo_engine,_nb_inst_issue[it1],_nb_execute_loop,_nb_read_unit[it3]);
-    ALLOC3(_ooo_engine_table_routing                      ,bool             ,_nb_ooo_engine,_nb_rename_unit[it1],_nb_inst_issue[it1]);
-    ALLOC3(_ooo_engine_table_issue_type                   ,bool             ,_nb_ooo_engine,_nb_inst_issue[it1],_nb_type);
+    ALLOC4(_network_table_dispatch                        ,bool             ,_nb_ooo_engine,_nb_inst_issue_slot[it1],_nb_execute_loop,_nb_read_unit[it3]);
+//  ALLOC3(_ooo_engine_table_routing                      ,bool             ,_nb_ooo_engine,_nb_rename_unit[it1],_nb_inst_issue_slot[it1]);
+//  ALLOC3(_ooo_engine_table_issue_type                   ,bool             ,_nb_ooo_engine,_nb_inst_issue_slot[it1],_nb_type);
     ALLOC2(_list_functionnal_unit_with_rename_unit        ,std::vector<uint32_t>,_nb_ooo_engine,_nb_rename_unit[it1]);
     ALLOC2(_list_load_store_unit_with_rename_unit         ,std::vector<uint32_t>,_nb_ooo_engine,_nb_rename_unit[it1]);
@@ -1011,22 +1011,21 @@
     for (uint32_t i=0; i<_nb_ooo_engine; ++i)
       {
-        log_printf(TRACE,Core,FUNCTION,_(" * ooo_engine_table_issue_type [%d]"),i);
-
+//         log_printf(TRACE,Core,FUNCTION,_(" * ooo_engine_table_issue_type [%d]"),i);
 
         // Init
-        for (uint32_t j=0; j<_nb_inst_issue[i]; ++j)
+        for (uint32_t j=0; j<_nb_inst_issue_slot[i]; ++j)
           {
             for (uint32_t k=0; k<_nb_execute_loop; ++k)
               for (uint32_t l=0; l<_nb_read_unit[k]; ++l)
                 _network_table_dispatch [i][j][k][l] = false;
-            for (uint32_t k=0; k<_nb_rename_unit[i]; ++k)
-              _ooo_engine_table_routing [i][k][j] = false;
-            for (uint32_t k=0; k<_nb_type; ++k)
-              _ooo_engine_table_issue_type [i][j][k] = false;
+//             for (uint32_t k=0; k<_nb_rename_unit[i]; ++k)
+//               _ooo_engine_table_routing [i][k][j] = false;
+//             for (uint32_t k=0; k<_nb_type; ++k)
+//               _ooo_engine_table_issue_type [i][j][k] = false;
           }
 
-        std::vector<uint32_t> list_thread_with_inst_issue [_nb_inst_issue[i]];
+        std::vector<uint32_t> list_thread_with_inst_issue [_nb_inst_issue_slot[i]];
         
-        for (uint32_t j=0; j<_nb_inst_issue[i]; ++j)
+        for (uint32_t j=0; j<_nb_inst_issue_slot[i]; ++j)
           {
             for (uint32_t k=0; k<_nb_read_bloc; ++k)
@@ -1044,13 +1043,13 @@
                         {
                           // Scan timing table, test if have an instruction
-                          for (uint32_t m=0; m<_nb_type; ++m)
-                            for (uint32_t n=0; n<_nb_operation; ++n)
-                              if (_timing[l][m][n]._latence > 0)
-                                {
-                                  log_printf(TRACE,Core,FUNCTION,_("   [%d][%d] -> true"),j,m);
+//                           for (uint32_t m=0; m<_nb_type; ++m)
+//                             for (uint32_t n=0; n<_nb_operation; ++n)
+//                               if (_timing[l][m][n]._latence > 0)
+//                                 {
+//                                   log_printf(TRACE,Core,FUNCTION,_("   [%d][%d] -> true"),j,m);
                                   
-                                  _ooo_engine_table_issue_type [i][j][m] = true;
-                                  break;
-                                }
+//                                   _ooo_engine_table_issue_type [i][j][m] = true;
+//                                   break;
+//                                 }
                           
                           for (uint32_t m=0; m<_nb_thread; ++m)
@@ -1073,5 +1072,5 @@
                       if (_link_read_bloc_and_load_store_unit [k][l])
                        {
-                          _ooo_engine_table_issue_type [i][j][TYPE_MEMORY] = true;
+//                        _ooo_engine_table_issue_type [i][j][TYPE_MEMORY] = true;
 //                        _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_LBS)._type] |= (_timing[l][instruction_information(INSTRUCTION_L_LBS)._type][instruction_information(INSTRUCTION_L_LBS)._operation]._latence > 0);
 //                        _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_LBZ)._type] |= (_timing[l][instruction_information(INSTRUCTION_L_LBZ)._type][instruction_information(INSTRUCTION_L_LBZ)._operation]._latence > 0);
@@ -1131,30 +1130,71 @@
             }
 
-            uint32_t num_rename_bloc = _link_rename_bloc_with_rename_unit[i][j];
-
-            for (uint32_t k=0; k<_nb_front_end; ++k)
-              // test if this front_end is connected with this rename_bloc
-              if (_link_rename_bloc_with_front_end[k] == num_rename_bloc)
-                // the front end is connected with rename_bloc. Now test all slot issue that it can accepted this front_end
-                for (uint32_t l=0; l<_nb_inst_issue[i]; ++l)
-                  for (std::vector<uint32_t>::iterator it = list_thread_with_inst_issue [l].begin();
-                       it != list_thread_with_inst_issue [l].end();
-                       ++it)
-                    // Test if the this is in front_end [k]
-                    if (_link_context_with_thread[*it].first == k)
-                      {
-                        _ooo_engine_table_routing [i][j][l] |= true;
-                        log_printf(TRACE,Core,FUNCTION,_("   [%d][%d] -> true"),j,l);
-                      }
+//             uint32_t num_rename_bloc = _link_rename_bloc_with_rename_unit[i][j];
+
+//             for (uint32_t k=0; k<_nb_front_end; ++k)
+//               // test if this front_end is connected with this rename_bloc
+//               if (_link_rename_bloc_with_front_end[k] == num_rename_bloc)
+//                 // the front end is connected with rename_bloc. Now test all slot issue that it can accepted this front_end
+//                 for (uint32_t l=0; l<_nb_inst_issue_slot[i]; ++l)
+//                   for (std::vector<uint32_t>::iterator it = list_thread_with_inst_issue [l].begin();
+//                        it != list_thread_with_inst_issue [l].end();
+//                        ++it)
+//                     // Test if the this is in front_end [k]
+//                     if (_link_context_with_thread[*it].first == k)
+//                       {
+//                         _ooo_engine_table_routing [i][j][l] |= true;
+//                         log_printf(TRACE,Core,FUNCTION,_("   [%d][%d] -> true"),j,l);
+//                       }
           }
       }
     
-    log_printf(TRACE,Core,FUNCTION,_("  * network_table_dispatch [nb_ooo_engine][nb_inst_issue][nb_execute_loop][nb_read_unit]"));
+    log_printf(TRACE,Core,FUNCTION,_(" * network_table_dispatch [nb_ooo_engine][nb_inst_issue_slot][nb_execute_loop][nb_read_unit]"));
     for (uint32_t i=0; i<_nb_ooo_engine; ++i)
-      for (uint32_t j=0; j<_nb_inst_issue[i]; ++j)
+      for (uint32_t j=0; j<_nb_inst_issue_slot[i]; ++j)
         for (uint32_t k=0; k<_nb_execute_loop; ++k)
           for (uint32_t l=0; l<_nb_read_unit[k]; ++l)
             if (_network_table_dispatch [i][j][k][l] == true)
               log_printf(TRACE,Core,FUNCTION,_("   Issue Slot [%d][%d] is connected with Read_unit [%d][%d]"),i,j,k,l);
+
+    ALLOC3(_network_table_issue_type,bool,_nb_execute_loop,_nb_read_unit[it1],_nb_type);
+
+    log_printf(TRACE,Core,FUNCTION,_(" * network_table_issue_type"));
+    for (uint32_t i=0; i<_nb_execute_loop; ++i)
+      for (uint32_t j=0; j<_nb_read_unit[i]; ++j)
+        {
+          // init
+          for (uint32_t t=0; t<_nb_type; ++t)
+            _network_table_issue_type [i][j][t] = false;
+
+          // get number of read bloc
+          uint32_t num_read_bloc = _link_read_bloc_with_read_unit[i][j];
+
+          // for each functionnal unit : test if the read bloc is connected with the functionnal unit
+          for (uint32_t k=0; k<_nb_functionnal_unit; ++k)
+            if (_link_read_bloc_and_functionnal_unit [num_read_bloc][k])
+              // Scan timing table, test if have an instruction
+              for (uint32_t t=0; t<_nb_type; ++t)
+                for (uint32_t o=0; o<_nb_operation; ++o)
+                  if (_timing[k][t][o]._latence > 0)
+                    {
+                      log_printf(TRACE,Core,FUNCTION,_("   [%d][%d][%d] -> true"),i,j,t);
+                      
+                      _network_table_issue_type [i][j][t] = true;
+                      break; // operation
+                    }
+          
+          // Test load store unit connected with this read bloc
+          for (uint32_t k=0; k<_nb_load_store_unit; ++k)
+            // Test load store unit connected with this read bloc
+            if (_link_read_bloc_and_load_store_unit [num_read_bloc][k])
+              {
+                uint32_t t = TYPE_MEMORY;
+                
+                log_printf(TRACE,Core,FUNCTION,_("   [%d][%d][%d] -> true"),i,j,t);
+                
+                _network_table_issue_type [i][j][t] = true;
+                break; // load_store_unit
+              }
+        }
 
     ALLOC2(_ooo_engine_nb_load_store_unit                 ,uint32_t         ,_nb_ooo_engine,_nb_rename_unit[it1]);
@@ -1787,4 +1827,8 @@
         }
 
+    ALLOC1(_issue_queue_in_order,bool,_nb_ooo_engine);
+    for (uint32_t i=0; i<_nb_ooo_engine; ++i)
+      _issue_queue_in_order [i] = (_issue_queue_scheme [i] == core::multi_ooo_engine::ooo_engine::issue_queue::ISSUE_QUEUE_SCHEME_IN_ORDER);
+
     // parameters depends
     _size_ooo_engine_id                    = log2(_nb_ooo_engine);
@@ -1838,5 +1882,5 @@
     for (uint32_t i=0; i<_nb_front_end; ++i)
       _param_front_end [i]= new core::multi_front_end::front_end::Parameters 
-       (
+        (
         _nb_context                             [i],
         _nb_decod_unit                          [i],
@@ -1877,7 +1921,10 @@
         );
 
+    ALLOC1(_nb_inst_issue_queue,uint32_t,_nb_ooo_engine);
+
     _param_ooo_engine = new core::multi_ooo_engine::ooo_engine::Parameters * [_nb_ooo_engine];
 
     for (uint32_t i=0; i<_nb_ooo_engine; ++i)
+      {
     _param_ooo_engine [i] = new core::multi_ooo_engine::ooo_engine::Parameters 
       (
@@ -1889,5 +1936,5 @@
        _ooo_engine_nb_inst_insert                    [i],
        _ooo_engine_nb_inst_retire                    [i],
-       _nb_inst_issue                                [i],
+//        _nb_inst_issue                                [i],
        _ooo_engine_nb_inst_execute                   [i],
        _nb_inst_reexecute                            [i],
@@ -1910,6 +1957,6 @@
        _issue_priority                               [i],
        _issue_load_balancing                         [i],
-       _ooo_engine_table_routing                     [i],
-       _ooo_engine_table_issue_type                  [i],
+//        _ooo_engine_table_routing                     [i],
+//        _ooo_engine_table_issue_type                  [i],
        _size_reexecute_queue                         [i],
        _reexecute_priority                           [i],
@@ -1922,5 +1969,5 @@
        _ooo_engine_nb_reg_free                       [i],
        _ooo_engine_nb_rename_unit_bank               [i],
-//        _ooo_engine_size_read_counter                 [i],
+//     _ooo_engine_size_read_counter                 [i],
        _ooo_engine_nb_load_store_unit                [i],
        _ooo_engine_size_store_queue                  [i],
@@ -1932,4 +1979,6 @@
        _ooo_engine_translate_num_context_to_num_thread[i]
        );
+    _nb_inst_issue_queue [i] = _param_ooo_engine [i]->_nb_inst_issue;
+      }
 
     _param_execute_loop = new core::multi_execute_loop::execute_loop::Parameters * [_nb_execute_loop];
@@ -2045,6 +2094,9 @@
        _nb_inst_branch_complete              ,//[nb_ooo_engine]
        _ooo_engine_nb_inst_insert_rob        ,//[nb_ooo_engine]
-       _nb_inst_issue                        ,//[nb_ooo_engine]
+       _nb_inst_reexecute                    ,//[nb_ooo_engine]
+       _nb_inst_issue_queue                  ,//[nb_ooo_engine]
+       _nb_inst_issue_slot                   ,//[nb_ooo_engine]
        _ooo_engine_nb_inst_execute           ,//[nb_ooo_engine][ooo_engine_nb_execute_loop]
+       _issue_queue_in_order                 ,//[nb_ooo_engine]
        _nb_read_unit                         ,//[nb_execute_loop]
        _nb_write_unit                        ,//[nb_execute_loop]
@@ -2059,8 +2111,9 @@
        _dispatch_priority                    ,
        _dispatch_load_balancing              ,
-       _network_table_dispatch               ,//[nb_ooo_engine][nb_inst_issue][nb_execute_loop][nb_read_unit]
+       _network_table_dispatch               ,//[nb_ooo_engine][nb_inst_issue_slot][nb_execute_loop][nb_read_unit]
+       _network_table_issue_type             ,//                                   [nb_execute_loop][nb_read_unit][nb_type]
        _translate_ooo_engine_num_front_end   ,//[nb_ooo_engine][ooo_engine_nb_front_end]
        _translate_ooo_engine_num_execute_loop,//[nb_ooo_engine][ooo_engine_nb_execute_loop]
-       _translate_execute_loop_num_ooo_engine //*[nb_execute_loop][execute_loop_nb_ooo_engine]
+       _translate_execute_loop_num_ooo_engine //[nb_execute_loop][execute_loop_nb_ooo_engine]
        );
     
@@ -2146,8 +2199,9 @@
     DELETE2(_list_load_store_unit_with_rename_unit                  ,_nb_ooo_engine,_nb_rename_unit[it1]);
     DELETE2(_list_functionnal_unit_with_rename_unit                 ,_nb_ooo_engine,_nb_rename_unit[it1]);
-    DELETE3(_ooo_engine_table_issue_type                            ,_nb_ooo_engine,_nb_inst_issue[it1],_nb_type);
-    DELETE3(_ooo_engine_table_routing                               ,_nb_ooo_engine,_nb_rename_unit[it1],_nb_inst_issue[it1]);
-    DELETE4(_network_table_dispatch                                 ,_nb_ooo_engine,_nb_inst_issue[it1],_nb_execute_loop,_nb_read_unit[it3]);
-//     DELETE2(_ooo_engine_size_read_counter                           ,_nb_ooo_engine,_nb_rename_unit[it1]);
+//  DELETE3(_ooo_engine_table_issue_type                            ,_nb_ooo_engine,_nb_inst_issue_slot[it1],_nb_type);
+//  DELETE3(_ooo_engine_table_routing                               ,_nb_ooo_engine,_nb_rename_unit[it1],_nb_inst_issue_slot[it1]);
+    DELETE3(_network_table_issue_type                                                                       ,_nb_execute_loop,_nb_read_unit[it1],_nb_type);
+    DELETE4(_network_table_dispatch                                 ,_nb_ooo_engine,_nb_inst_issue_slot[it1],_nb_execute_loop,_nb_read_unit[it3]);
+//  DELETE2(_ooo_engine_size_read_counter                           ,_nb_ooo_engine,_nb_rename_unit[it1]);
     DELETE2(_ooo_engine_nb_rename_unit_bank                         ,_nb_ooo_engine,_nb_rename_unit[it1]);
     DELETE2(_ooo_engine_nb_reg_free                                 ,_nb_ooo_engine,_nb_rename_unit[it1]);
