source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Parameters.cpp @ 115

Last change on this file since 115 was 115, checked in by rosiere, 15 years ago

1) Write queue with mealy
2) Network : fix bug
3) leak memory

  • Property svn:keywords set to Id
File size: 172.3 KB
Line 
1/*
2 * $id$
3 *
4 * [ description ]
5 *
6 */
7
8#include "Behavioural/Core/include/Parameters.h"
9#include "Behavioural/include/Allocation.h"
10#include "Common/include/Max.h"
11#include <algorithm>
12
13namespace morpheo {
14namespace behavioural {
15namespace core {
16
17#undef  FUNCTION
18#define FUNCTION "Core::get_num_thread"
19  Tcontext_t Parameters::execute_loop_get_num_thread (uint32_t num_execute_loop,
20                                                      uint32_t num_thread)
21  {
22    log_printf(TRACE,Core,FUNCTION,_("execute_loop_get_num_thread"));
23    log_printf(TRACE,Core,FUNCTION,_("  * Parameters :"));
24    log_printf(TRACE,Core,FUNCTION,_("    * num_execute_loop : %d"),num_execute_loop);
25    log_printf(TRACE,Core,FUNCTION,_("    * num_thread       : %d"),num_thread);
26
27    // compute all id !
28    //  * initialisation
29    uint32_t num_context    = _link_context_with_thread [num_thread].second;
30    uint32_t num_front_end  = _link_context_with_thread [num_thread].first;
31    uint32_t num_ooo_engine = _link_rename_unit_with_rename_bloc[_link_rename_bloc_with_front_end [num_front_end]].first;
32
33    log_printf(TRACE,Core,FUNCTION,_("    * num_context      : %d"),num_context   );
34    log_printf(TRACE,Core,FUNCTION,_("    * num_front_end    : %d"),num_front_end );
35    log_printf(TRACE,Core,FUNCTION,_("    * num_ooo_engine   : %d"),num_ooo_engine);
36   
37    uint32_t context_id   = num_context;
38    uint32_t front_end_id ;
39    uint32_t ooo_engine_id;
40   
41    //  * compute
42    for (ooo_engine_id=0; ooo_engine_id<_execute_loop_nb_ooo_engine [num_execute_loop]; ++ooo_engine_id)
43      if (_list_ooo_engine_with_execute_loop [num_execute_loop][ooo_engine_id] == num_ooo_engine)
44        break;
45   
46#ifdef DEBUG_TEST
47    if (ooo_engine_id == _execute_loop_nb_ooo_engine [num_execute_loop])
48      throw ERRORMORPHEO(FUNCTION,toString(_("execute_loop [%d] : ooo_engine [%d] is not find."),num_execute_loop,num_ooo_engine));
49#endif
50
51    log_printf(TRACE,Core,FUNCTION,_("    * ooo_engine_id    : %d"),ooo_engine_id);
52   
53    for (front_end_id=0; front_end_id<_ooo_engine_nb_front_end[num_ooo_engine]; ++front_end_id)
54      if (_translate_ooo_engine_num_front_end [num_ooo_engine][front_end_id] == num_front_end)
55        break;
56   
57#ifdef DEBUG_TEST
58    if (front_end_id == _execute_loop_nb_front_end [num_execute_loop])
59      throw ERRORMORPHEO(FUNCTION,toString(_("execute_loop [%d] : front_end [%d] is not find."),num_execute_loop,num_front_end));
60#endif
61
62    log_printf(TRACE,Core,FUNCTION,_("    * front_end_id     : %d"),front_end_id );
63   
64    // compute the thread number
65    return get_num_thread(context_id   , (1<<_execute_loop_nb_context    [num_execute_loop]),
66                          front_end_id , (1<<_execute_loop_nb_front_end  [num_execute_loop]),
67                          ooo_engine_id, (1<<_execute_loop_nb_ooo_engine [num_execute_loop]));
68  }
69
70
71#undef  FUNCTION
72#define FUNCTION "Core::Parameters"
73  Parameters::Parameters (
74  // Common
75  uint32_t                size_general_data                             ,
76  uint32_t                size_special_data                             ,
77  morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void),
78   
79  // Thread
80  uint32_t                nb_thread                                     ,
81  uint32_t              * size_ifetch_queue                             ,//[nb_thread]
82  uint32_t              * nb_inst_fetch                                 ,//[nb_thread]
83  bool                 ** implement_group                               ,//[nb_thread][NB_GROUP]
84  uint32_t              * ras_size_queue                                ,//[nb_thread]
85  uint32_t              * upt_size_queue                                ,//[nb_thread]
86  uint32_t              * ufpt_size_queue                               ,//[nb_thread]
87
88  // Decod bloc
89  uint32_t                nb_decod_bloc                                 ,
90  uint32_t              * size_decod_queue                              ,//[nb_decod_bloc]
91  multi_front_end::front_end::decod_unit::decod_queue::Tdecod_queue_scheme_t
92                        * decod_queue_scheme                            ,//[nb_decod_bloc]
93  uint32_t              * nb_inst_decod                                 ,//[nb_decod_bloc]
94  uint32_t              * nb_context_select                             ,//[nb_decod_bloc]
95  Tpriority_t           * context_select_priority                       ,//[nb_decod_bloc]
96  Tload_balancing_t     * context_select_load_balancing                 ,//[nb_decod_bloc]
97
98  // Rename bloc
99  uint32_t                nb_rename_bloc                                ,
100  uint32_t              * nb_inst_insert                                ,//[nb_rename_bloc]
101  uint32_t              * nb_inst_retire                                ,//[nb_rename_bloc]
102  Tpriority_t           * rename_select_priority                        ,//[nb_rename_bloc]
103  Tload_balancing_t     * rename_select_load_balancing                  ,//[nb_rename_bloc]
104  uint32_t              * rename_select_nb_front_end_select             ,//[nb_rename_bloc]
105  uint32_t              * nb_general_register                           ,//[nb_rename_bloc]
106  uint32_t              * nb_special_register                           ,//[nb_rename_bloc]
107  uint32_t              * nb_reg_free                                   ,//[nb_rename_bloc]
108  uint32_t              * nb_rename_unit_bank                           ,//[nb_rename_bloc]
109//   uint32_t              * size_read_counter                             ,//[nb_rename_bloc]
110
111  // Read bloc
112  uint32_t                nb_read_bloc                                  ,//
113  uint32_t              * size_read_queue                               ,//[nb_read_bloc]
114  uint32_t              * size_reservation_station                      ,//[nb_read_bloc]
115  uint32_t              * nb_inst_retire_reservation_station            ,//[nb_read_bloc]
116
117  // Write bloc
118  uint32_t                nb_write_bloc                                 ,//
119  uint32_t              * size_write_queue                              ,//[nb_write_bloc]
120  uint32_t              * size_execute_queue                            ,//[nb_write_bloc]
121  uint32_t              * nb_bypass_write                               ,//[nb_write_bloc]
122  multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Twrite_queue_scheme_t * write_queue_scheme,//[nb_write_bloc]
123
124  // Load_store_unit
125  uint32_t                nb_load_store_unit                            ,
126  uint32_t              * size_store_queue                              ,//[nb_load_store_unit]
127  uint32_t              * size_load_queue                               ,//[nb_load_store_unit]
128  uint32_t              * size_speculative_access_queue                 ,//[nb_load_store_unit]
129  uint32_t              * nb_port_check                                 ,//[nb_load_store_unit]
130  multi_execute_loop::execute_loop::Tspeculative_load_t 
131                        * speculative_load                              ,//[nb_load_store_unit]
132  uint32_t              * nb_bypass_memory                              ,//[nb_load_store_unit]
133  uint32_t              * nb_cache_port                                 ,//[nb_load_store_unit]
134  uint32_t              * nb_inst_memory                                ,//[nb_load_store_unit]
135
136  // Functionnal_unit
137  uint32_t                nb_functionnal_unit                           ,
138  uint32_t              * nb_inst_functionnal_unit                      ,//[nb_functionnal_unit]
139  multi_execute_loop::execute_loop::execute_timing_t
140                      *** timing                                        ,//[nb_functionnal_unit][_nb_type][_nb_operation]
141
142  // Icache_Access
143  uint32_t                nb_icache_port                                ,
144  Tpriority_t             icache_port_priority                        ,
145  Tload_balancing_t       icache_port_load_balancing                  ,
146
147  // Dcache_Access
148  uint32_t                nb_dcache_port                                ,
149  Tpriority_t             dcache_port_priority                        ,
150  Tload_balancing_t       dcache_port_load_balancing                  ,
151
152  // Front_end
153  uint32_t                nb_front_end                                  ,
154  uint32_t              * nb_context                                    ,//[nb_front_end]
155  uint32_t              * nb_decod_unit                                 ,//[nb_front_end]
156  uint32_t              * nb_inst_branch_predict                        ,//[nb_front_end]
157  uint32_t              * nb_inst_branch_decod                          ,//[nb_front_end]
158  uint32_t              * nb_inst_branch_update                         ,//[nb_front_end]
159  uint32_t              * btb_size_queue                                ,//[nb_front_end]
160  uint32_t              * btb_associativity                             ,//[nb_front_end]
161  uint32_t              * btb_size_counter                              ,//[nb_front_end]
162  Tvictim_t             * btb_victim_scheme                             ,//[nb_front_end]
163  Tpredictor_t          * dir_predictor_scheme                          ,//[nb_front_end]
164  bool                 ** dir_have_bht                                  ,//[nb_front_end][3]
165  uint32_t             ** dir_bht_size_shifter                          ,//[nb_front_end][3]
166  uint32_t             ** dir_bht_nb_shifter                            ,//[nb_front_end][3]
167  bool                 ** dir_have_pht                                  ,//[nb_front_end][3]
168  uint32_t             ** dir_pht_size_counter                          ,//[nb_front_end][3]
169  uint32_t             ** dir_pht_nb_counter                            ,//[nb_front_end][3]
170  uint32_t             ** dir_pht_size_address_share                    ,//[nb_front_end][3]
171
172  // OOO_Engine
173  uint32_t                nb_ooo_engine                                 ,
174  uint32_t              * nb_rename_unit                                ,//[nb_ooo_engine]
175  uint32_t              * nb_inst_issue                                 ,//[nb_ooo_engine]
176  uint32_t              * nb_inst_reexecute                             ,//[nb_ooo_engine]
177  uint32_t              * nb_inst_commit                                ,//[nb_ooo_engine]
178  uint32_t              * nb_inst_branch_complete                       ,//[nb_ooo_engine]
179  uint32_t              * nb_rename_unit_select                         ,//[nb_ooo_engine]
180  uint32_t              * nb_execute_loop_select                        ,//[nb_ooo_engine]
181  uint32_t              * size_re_order_buffer                          ,//[nb_ooo_engine]
182  uint32_t              * nb_re_order_buffer_bank                       ,//[nb_ooo_engine]
183  Tpriority_t           * commit_priority                               ,//[nb_ooo_engine]
184  Tload_balancing_t     * commit_load_balancing                         ,//[nb_ooo_engine]
185  uint32_t              * size_issue_queue                              ,//[nb_ooo_engine]
186  multi_ooo_engine::ooo_engine::issue_queue::Tissue_queue_scheme_t
187                        * issue_queue_scheme                            ,//[nb_ooo_engine]
188  uint32_t              * nb_issue_queue_bank                           ,//[nb_ooo_engine]
189  Tpriority_t           * issue_priority                                ,//[nb_ooo_engine]
190  Tload_balancing_t     * issue_load_balancing                          ,//[nb_ooo_engine]
191  uint32_t              * size_reexecute_queue                          ,//[nb_ooo_engine]
192  Tpriority_t           * reexecute_priority                            ,//[nb_ooo_engine]
193  Tload_balancing_t     * reexecute_load_balancing                      ,//[nb_ooo_engine]
194
195  //Execute_loop
196  uint32_t                nb_execute_loop                               ,
197  uint32_t              * nb_read_unit                                  ,//[nb_execute_loop]
198  uint32_t              * nb_execute_unit                               ,//[nb_execute_loop]
199  uint32_t              * nb_write_unit                                 ,//[nb_execute_loop]
200  uint32_t              * nb_gpr_bank                                   ,//[nb_execute_loop]
201  uint32_t              * nb_gpr_port_read_by_bank                      ,//[nb_execute_loop]
202  uint32_t              * nb_gpr_port_write_by_bank                     ,//[nb_execute_loop]
203  uint32_t              * nb_spr_bank                                   ,//[nb_execute_loop]
204  uint32_t              * nb_spr_port_read_by_bank                      ,//[nb_execute_loop]
205  uint32_t              * nb_spr_port_write_by_bank                     ,//[nb_execute_loop]
206  Tpriority_t           * execution_unit_to_write_unit_priority         ,//[nb_execute_loop]
207  Tpriority_t           * read_unit_to_execution_unit_priority          ,//[nb_execute_loop]
208
209  // Link
210  pair_dual             * link_context_with_thread                      ,//[nb_thread]
211  pair_dual             * link_decod_unit_with_decod_bloc               ,//[nb_decod_bloc]
212  pair_dual             * link_rename_unit_with_rename_bloc             ,//[nb_rename_bloc]
213  pair_dual             * link_read_unit_with_read_bloc                 ,//[nb_read_bloc]
214  pair_dual             * link_write_unit_with_write_bloc               ,//[nb_write_bloc]
215  pair_dual             * link_execute_unit_with_functionnal_unit       ,//[nb_functionnal_unit]
216  pair_dual             * link_execute_unit_with_load_store_unit        ,//[nb_load_store_unit]
217  uint32_t              * link_decod_bloc_with_thread                   ,//[nb_thread]
218  uint32_t              * link_rename_bloc_with_front_end               ,//[nb_front_end]
219  bool                *** table_dispatch                                ,//[nb_ooo_engine][nb_inst_issue][nb_read_bloc]
220  bool                 ** link_read_bloc_and_load_store_unit            ,//[nb_read_bloc][nb_load_store_unit]
221  bool                 ** link_read_bloc_and_functionnal_unit           ,//[nb_read_bloc][nb_functionnal_unit]
222  bool                 ** link_write_bloc_and_load_store_unit           ,//[nb_write_bloc][nb_load_store_unit]
223  bool                 ** link_write_bloc_and_functionnal_unit          ,//[nb_write_bloc][nb_functionnal_unit]
224  uint32_t              * link_load_store_unit_with_thread              ,//[nb_thread]
225  bool                 ** link_thread_and_functionnal_unit              ,//[nb_thread][nb_functionnal_unit]
226  uint32_t              * link_icache_port_with_thread                  ,//[nb_thread]
227  uint32_t             ** link_dcache_port_with_load_store_unit         ,//[nb_load_store_unit][nb_cache_port]
228
229  Tpriority_t             dispatch_priority                             ,
230  Tload_balancing_t       dispatch_load_balancing                       
231                        )
232  {
233    log_begin(Core,FUNCTION);
234   
235    _size_general_data                       = size_general_data                       ;
236    _size_special_data                       = size_special_data                       ;
237    _get_custom_information                  = get_custom_information                  ;
238
239    _nb_thread                               = nb_thread                               ;
240    _size_ifetch_queue                       = size_ifetch_queue                       ;
241    _nb_inst_fetch                           = nb_inst_fetch                           ;
242    _implement_group                         = implement_group                         ;
243    _ras_size_queue                          = ras_size_queue                          ;
244    _upt_size_queue                          = upt_size_queue                          ;
245    _ufpt_size_queue                         = ufpt_size_queue                         ;
246
247    _nb_decod_bloc                           = nb_decod_bloc                           ;
248    _size_decod_queue                        = size_decod_queue                        ;
249    _decod_queue_scheme                      = decod_queue_scheme                      ;
250    _nb_inst_decod                           = nb_inst_decod                           ;
251    _nb_context_select                       = nb_context_select                       ;
252    _context_select_priority                 = context_select_priority                 ;
253    _context_select_load_balancing           = context_select_load_balancing           ;
254
255    _nb_rename_bloc                          = nb_rename_bloc                          ;
256    _nb_inst_insert                          = nb_inst_insert                          ;
257    _nb_inst_retire                          = nb_inst_retire                          ;
258    _rename_select_priority                  = rename_select_priority                  ;
259    _rename_select_load_balancing            = rename_select_load_balancing            ;
260    _rename_select_nb_front_end_select       = rename_select_nb_front_end_select       ;
261    _nb_general_register                     = nb_general_register                     ;
262    _nb_special_register                     = nb_special_register                     ;
263    _nb_reg_free                             = nb_reg_free                             ;
264    _nb_rename_unit_bank                     = nb_rename_unit_bank                     ;
265//     _size_read_counter                       = size_read_counter                       ;
266
267    _nb_read_bloc                            = nb_read_bloc                            ;
268    _size_read_queue                         = size_read_queue                         ;
269    _size_reservation_station                = size_reservation_station                ;
270    _nb_inst_retire_reservation_station      = nb_inst_retire_reservation_station      ;
271
272    _nb_write_bloc                           = nb_write_bloc                           ;
273    _size_write_queue                        = size_write_queue                        ;
274    _size_execute_queue                      = size_execute_queue                      ;
275    _nb_bypass_write                         = nb_bypass_write                         ;
276    _write_queue_scheme                      = write_queue_scheme                      ;
277
278    _nb_load_store_unit                      = nb_load_store_unit                      ;
279    _size_store_queue                        = size_store_queue                        ;
280    _size_load_queue                         = size_load_queue                         ;
281    _size_speculative_access_queue           = size_speculative_access_queue           ;
282    _nb_port_check                           = nb_port_check                           ;
283    _speculative_load                        = speculative_load                        ;
284    _nb_bypass_memory                        = nb_bypass_memory                        ;
285    _nb_cache_port                           = nb_cache_port                           ;
286    _nb_inst_memory                          = nb_inst_memory                          ;
287
288    _nb_functionnal_unit                     = nb_functionnal_unit                     ;
289    _nb_inst_functionnal_unit                = nb_inst_functionnal_unit                ;
290    _timing                                  = timing                                  ;
291
292    _nb_icache_port                          = nb_icache_port                          ;
293    _icache_port_priority                    = icache_port_priority                    ;
294    _icache_port_load_balancing              = icache_port_load_balancing              ;
295
296    _nb_dcache_port                          = nb_dcache_port                          ;
297    _dcache_port_priority                    = dcache_port_priority                    ;
298    _dcache_port_load_balancing              = dcache_port_load_balancing              ;
299
300    _nb_front_end                            = nb_front_end                            ;
301    _nb_context                              = nb_context                              ;
302    _nb_decod_unit                           = nb_decod_unit                           ;
303    _nb_inst_branch_predict                  = nb_inst_branch_predict                  ;
304    _nb_inst_branch_decod                    = nb_inst_branch_decod                    ;
305    _nb_inst_branch_update                   = nb_inst_branch_update                   ;
306    _btb_size_queue                          = btb_size_queue                          ;
307    _btb_associativity                       = btb_associativity                       ;
308    _btb_size_counter                        = btb_size_counter                        ;
309    _btb_victim_scheme                       = btb_victim_scheme                       ;
310    _dir_predictor_scheme                    = dir_predictor_scheme                    ;
311    _dir_have_bht                            = dir_have_bht                            ;
312    _dir_bht_size_shifter                    = dir_bht_size_shifter                    ;
313    _dir_bht_nb_shifter                      = dir_bht_nb_shifter                      ;
314    _dir_have_pht                            = dir_have_pht                            ;
315    _dir_pht_size_counter                    = dir_pht_size_counter                    ;
316    _dir_pht_nb_counter                      = dir_pht_nb_counter                      ;
317    _dir_pht_size_address_share              = dir_pht_size_address_share              ;
318
319    _nb_ooo_engine                           = nb_ooo_engine                           ;
320    _nb_rename_unit                          = nb_rename_unit                          ;
321    _nb_inst_issue                           = nb_inst_issue                           ;
322    _nb_inst_reexecute                       = nb_inst_reexecute                       ;
323    _nb_inst_commit                          = nb_inst_commit                          ;
324    _nb_inst_branch_complete                 = nb_inst_branch_complete                 ;
325    _nb_rename_unit_select                   = nb_rename_unit_select                   ;
326    _nb_execute_loop_select                  = nb_execute_loop_select                  ;
327    _size_re_order_buffer                    = size_re_order_buffer                    ;
328    _nb_re_order_buffer_bank                 = nb_re_order_buffer_bank                 ;
329    _commit_priority                         = commit_priority                         ;
330    _commit_load_balancing                   = commit_load_balancing                   ;
331    _size_issue_queue                        = size_issue_queue                        ;
332    _issue_queue_scheme                      = issue_queue_scheme                      ;
333    _nb_issue_queue_bank                     = nb_issue_queue_bank                     ;
334    _issue_priority                          = issue_priority                          ;
335    _issue_load_balancing                    = issue_load_balancing                    ;
336    _size_reexecute_queue                    = size_reexecute_queue                    ;
337    _reexecute_priority                      = reexecute_priority                      ;
338    _reexecute_load_balancing                = reexecute_load_balancing                ;
339
340    _nb_execute_loop                         = nb_execute_loop                         ;
341    _nb_read_unit                            = nb_read_unit                            ;
342    _nb_execute_unit                         = nb_execute_unit                         ;
343    _nb_write_unit                           = nb_write_unit                           ;
344    _nb_gpr_bank                             = nb_gpr_bank                             ;
345    _nb_gpr_port_read_by_bank                = nb_gpr_port_read_by_bank                ;
346    _nb_gpr_port_write_by_bank               = nb_gpr_port_write_by_bank               ;
347    _nb_spr_bank                             = nb_spr_bank                             ;
348    _nb_spr_port_read_by_bank                = nb_spr_port_read_by_bank                ;
349    _nb_spr_port_write_by_bank               = nb_spr_port_write_by_bank               ;
350    _execution_unit_to_write_unit_priority   = execution_unit_to_write_unit_priority   ;
351    _read_unit_to_execution_unit_priority    = read_unit_to_execution_unit_priority    ;
352
353    _link_context_with_thread                = link_context_with_thread                ;
354    _link_decod_unit_with_decod_bloc         = link_decod_unit_with_decod_bloc         ;
355    _link_rename_unit_with_rename_bloc       = link_rename_unit_with_rename_bloc       ;
356    _link_read_unit_with_read_bloc           = link_read_unit_with_read_bloc           ;
357    _link_write_unit_with_write_bloc         = link_write_unit_with_write_bloc         ;
358    _link_execute_unit_with_functionnal_unit = link_execute_unit_with_functionnal_unit ;
359    _link_execute_unit_with_load_store_unit  = link_execute_unit_with_load_store_unit  ;
360    _link_decod_bloc_with_thread             = link_decod_bloc_with_thread             ;
361    _link_rename_bloc_with_front_end         = link_rename_bloc_with_front_end         ;
362    _table_dispatch                          = table_dispatch                          ;
363    _link_read_bloc_and_load_store_unit      = link_read_bloc_and_load_store_unit      ;
364    _link_read_bloc_and_functionnal_unit     = link_read_bloc_and_functionnal_unit     ;
365    _link_write_bloc_and_load_store_unit     = link_write_bloc_and_load_store_unit     ;
366    _link_write_bloc_and_functionnal_unit    = link_write_bloc_and_functionnal_unit    ;
367    _link_load_store_unit_with_thread        = link_load_store_unit_with_thread        ;
368    _link_thread_and_functionnal_unit        = link_thread_and_functionnal_unit        ;
369    _link_icache_port_with_thread            = link_icache_port_with_thread            ;
370    _link_dcache_port_with_load_store_unit   = link_dcache_port_with_load_store_unit   ;
371
372    _dispatch_priority                       = dispatch_priority                       ;
373    _dispatch_load_balancing                 = dispatch_load_balancing                 ;
374
375    test();
376
377    log_printf(TRACE,Core,FUNCTION,_("Core parameters :"));
378
379    // inverse link
380    ALLOC2(_link_thread_with_context                      ,uint32_t         ,_nb_front_end,_nb_context[it1]);
381    ALLOC2(_link_decod_bloc_with_decod_unit               ,uint32_t         ,_nb_front_end,_nb_decod_unit[it1]);
382    ALLOC2(_link_rename_bloc_with_rename_unit             ,uint32_t         ,_nb_ooo_engine,_nb_rename_unit[it1]);
383    ALLOC2(_link_read_bloc_with_read_unit                 ,uint32_t         ,_nb_execute_loop,_nb_read_unit[it1]);
384    ALLOC2(_link_write_bloc_with_write_unit               ,uint32_t         ,_nb_execute_loop,_nb_write_unit[it1]);
385    ALLOC2(_link_functionnal_unit_with_execute_unit       ,uint32_t         ,_nb_execute_loop,_nb_execute_unit[it1]);
386    ALLOC2(_link_load_store_unit_with_execute_unit        ,uint32_t         ,_nb_execute_loop,_nb_execute_unit[it1]);
387    ALLOC1(_list_functionnal_unit_with_execute_unit       ,std::vector<uint32_t>,_nb_execute_loop);
388    ALLOC1(_list_load_store_unit_with_execute_unit        ,std::vector<uint32_t>,_nb_execute_loop);
389
390    for (uint32_t i=0; i<_nb_thread; ++i)
391      {
392        pair_dual x = _link_context_with_thread[i];
393        _link_thread_with_context [x.first][x.second] = i;
394      }
395    for (uint32_t i=0; i<_nb_decod_bloc; ++i)
396      {
397        pair_dual x = _link_decod_unit_with_decod_bloc[i];
398        _link_decod_bloc_with_decod_unit [x.first][x.second] = i;
399      }
400    for (uint32_t i=0; i<_nb_rename_bloc; ++i)
401      {
402        pair_dual x = _link_rename_unit_with_rename_bloc[i];
403        _link_rename_bloc_with_rename_unit [x.first][x.second] = i;
404      }
405    for (uint32_t i=0; i<_nb_read_bloc; ++i)
406      {
407        pair_dual x = _link_read_unit_with_read_bloc[i];
408        _link_read_bloc_with_read_unit [x.first][x.second] = i;
409      }
410    for (uint32_t i=0; i<_nb_write_bloc; ++i)
411      {
412        pair_dual x = _link_write_unit_with_write_bloc[i];
413        _link_write_bloc_with_write_unit [x.first][x.second] = i;
414      }
415
416    for (uint32_t i=0; i<_nb_execute_loop; ++i)
417      for (uint32_t j=0; j<_nb_execute_unit[i]; ++j)
418        {
419          // init with an invalid value
420          _link_functionnal_unit_with_execute_unit [i][j] = _nb_functionnal_unit;
421          _link_load_store_unit_with_execute_unit  [i][j] = _nb_load_store_unit;
422        }
423
424    for (uint32_t i=0; i<_nb_functionnal_unit; ++i)
425      {
426        pair_dual x = _link_execute_unit_with_functionnal_unit[i];
427        _link_functionnal_unit_with_execute_unit [x.first][x.second] = i;
428      }
429    for (uint32_t i=0; i<_nb_load_store_unit; ++i)
430      {
431        pair_dual x = _link_execute_unit_with_load_store_unit[i];
432        _link_load_store_unit_with_execute_unit [x.first][x.second] = i;
433      }
434
435    for (uint32_t i=0; i<_nb_execute_loop; ++i)
436      for (uint32_t j=0; j<_nb_execute_unit[i]; ++j)
437        {
438          log_printf(TRACE,Core,FUNCTION,_(" * execute_unit [%d][%d] : functionnal_unit [%d] - load_store_unit [%d]"),i,j,_link_functionnal_unit_with_execute_unit [i][j],_link_load_store_unit_with_execute_unit [i][j]);
439         
440
441          if (_link_functionnal_unit_with_execute_unit [i][j] != _nb_functionnal_unit)
442            _list_functionnal_unit_with_execute_unit [i].push_back(_link_functionnal_unit_with_execute_unit [i][j]);
443          if (_link_load_store_unit_with_execute_unit [i][j] != _nb_load_store_unit)
444            _list_load_store_unit_with_execute_unit [i].push_back(_link_load_store_unit_with_execute_unit [i][j]);
445        }     
446
447    // translate for front_end
448    ALLOC2(_front_end_size_ifetch_queue                   ,uint32_t         ,_nb_front_end,_nb_context[it1]);
449    ALLOC2(_front_end_nb_inst_fetch                       ,uint32_t         ,_nb_front_end,_nb_context[it1]);
450    ALLOC2(_front_end_link_decod_unit_with_context        ,uint32_t         ,_nb_front_end,_nb_context[it1]);
451    ALLOC2(_front_end_ras_size_queue                      ,uint32_t         ,_nb_front_end,_nb_context[it1]);
452    ALLOC2(_front_end_upt_size_queue                      ,uint32_t         ,_nb_front_end,_nb_context[it1]);
453    ALLOC2(_front_end_ufpt_size_queue                     ,uint32_t         ,_nb_front_end,_nb_context[it1]);
454
455    for (uint32_t i=0; i<_nb_front_end; ++i)
456      for (uint32_t j=0; j<_nb_context[i]; ++j)
457        {
458          uint32_t num_thread     = _link_thread_with_context[i][j];
459
460          _front_end_size_ifetch_queue            [i][j] = _size_ifetch_queue [num_thread];
461          _front_end_nb_inst_fetch                [i][j] = _nb_inst_fetch     [num_thread];
462          _front_end_ras_size_queue               [i][j] = _ras_size_queue    [num_thread];
463          _front_end_upt_size_queue               [i][j] = _upt_size_queue    [num_thread];
464          _front_end_ufpt_size_queue              [i][j] = _ufpt_size_queue   [num_thread];
465
466          uint32_t num_decod_bloc = _link_decod_bloc_with_thread [num_thread];
467          uint32_t num_decod_unit = _link_decod_unit_with_decod_bloc [num_decod_bloc].second;
468
469          _front_end_link_decod_unit_with_context [i][j] = num_decod_unit;
470        }
471
472    ALLOC3(_front_end_instruction_implemeted              ,bool             ,_nb_front_end,_nb_context[it1],NB_INSTRUCTION);
473
474    // Reset instruction implemented
475    for (uint32_t i=0; i<_nb_front_end; ++i)
476      for (uint32_t j=0; j<_nb_context[i]; ++j)
477        for (uint32_t k=0; k<NB_INSTRUCTION; ++k)
478          _front_end_instruction_implemeted[i][j][k] = false;
479
480    for (uint32_t i=0; i<_nb_thread; ++i)
481      {
482        uint32_t num_front_end = _link_context_with_thread [i].first;
483        uint32_t num_context   = _link_context_with_thread [i].second;
484
485        for (uint32_t j=0; j<_nb_functionnal_unit; ++j)
486          {
487            // Test if link
488            if (not _link_thread_and_functionnal_unit[i][j])
489              continue;
490
491            // For each instruction :
492            //  * test if an functional_unit can execute this instruction
493            //  * test if the size data is correct
494 
495            // ORBIS
496            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_ADD      ] |= (instruction_size_data(INSTRUCTION_L_ADD      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_ADD      )._type][instruction_information(INSTRUCTION_L_ADD      )._operation]._latence > 0);
497            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_ADDC     ] |= (instruction_size_data(INSTRUCTION_L_ADDC     ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_ADDC     )._type][instruction_information(INSTRUCTION_L_ADDC     )._operation]._latence > 0);
498            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_ADDI     ] |= (instruction_size_data(INSTRUCTION_L_ADDI     ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_ADDI     )._type][instruction_information(INSTRUCTION_L_ADDI     )._operation]._latence > 0);
499            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_ADDIC    ] |= (instruction_size_data(INSTRUCTION_L_ADDIC    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_ADDIC    )._type][instruction_information(INSTRUCTION_L_ADDIC    )._operation]._latence > 0);
500            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_AND      ] |= (instruction_size_data(INSTRUCTION_L_AND      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_AND      )._type][instruction_information(INSTRUCTION_L_AND      )._operation]._latence > 0);
501            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_ANDI     ] |= (instruction_size_data(INSTRUCTION_L_ANDI     ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_ANDI     )._type][instruction_information(INSTRUCTION_L_ANDI     )._operation]._latence > 0);
502            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_BF       ] |= (instruction_size_data(INSTRUCTION_L_BF       ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_BF       )._type][instruction_information(INSTRUCTION_L_BF       )._operation]._latence > 0);
503            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_BNF      ] |= (instruction_size_data(INSTRUCTION_L_BNF      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_BNF      )._type][instruction_information(INSTRUCTION_L_BNF      )._operation]._latence > 0);
504            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CMOV     ] |= (instruction_size_data(INSTRUCTION_L_CMOV     ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_CMOV     )._type][instruction_information(INSTRUCTION_L_CMOV     )._operation]._latence > 0);
505//          _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CSYNC    ] |= (instruction_size_data(INSTRUCTION_L_CSYNC    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_CSYNC    )._type][instruction_information(INSTRUCTION_L_CSYNC    )._operation]._latence > 0);
506            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CUST1    ] |= (instruction_size_data(INSTRUCTION_L_CUST1    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_CUST1    )._type][instruction_information(INSTRUCTION_L_CUST1    )._operation]._latence > 0);
507            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CUST2    ] |= (instruction_size_data(INSTRUCTION_L_CUST2    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_CUST2    )._type][instruction_information(INSTRUCTION_L_CUST2    )._operation]._latence > 0);
508            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CUST3    ] |= (instruction_size_data(INSTRUCTION_L_CUST3    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_CUST3    )._type][instruction_information(INSTRUCTION_L_CUST3    )._operation]._latence > 0);
509            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CUST4    ] |= (instruction_size_data(INSTRUCTION_L_CUST4    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_CUST4    )._type][instruction_information(INSTRUCTION_L_CUST4    )._operation]._latence > 0);
510            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CUST5    ] |= (instruction_size_data(INSTRUCTION_L_CUST5    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_CUST5    )._type][instruction_information(INSTRUCTION_L_CUST5    )._operation]._latence > 0);
511            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CUST6    ] |= (instruction_size_data(INSTRUCTION_L_CUST6    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_CUST6    )._type][instruction_information(INSTRUCTION_L_CUST6    )._operation]._latence > 0);
512            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CUST7    ] |= (instruction_size_data(INSTRUCTION_L_CUST7    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_CUST7    )._type][instruction_information(INSTRUCTION_L_CUST7    )._operation]._latence > 0);
513            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CUST8    ] |= (instruction_size_data(INSTRUCTION_L_CUST8    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_CUST8    )._type][instruction_information(INSTRUCTION_L_CUST8    )._operation]._latence > 0);
514            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_DIV      ] |= (instruction_size_data(INSTRUCTION_L_DIV      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_DIV      )._type][instruction_information(INSTRUCTION_L_DIV      )._operation]._latence > 0);
515            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_DIVU     ] |= (instruction_size_data(INSTRUCTION_L_DIVU     ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_DIVU     )._type][instruction_information(INSTRUCTION_L_DIVU     )._operation]._latence > 0);
516            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_EXTBS    ] |= (instruction_size_data(INSTRUCTION_L_EXTBS    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_EXTBS    )._type][instruction_information(INSTRUCTION_L_EXTBS    )._operation]._latence > 0);
517            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_EXTBZ    ] |= (instruction_size_data(INSTRUCTION_L_EXTBZ    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_EXTBZ    )._type][instruction_information(INSTRUCTION_L_EXTBZ    )._operation]._latence > 0);
518            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_EXTHS    ] |= (instruction_size_data(INSTRUCTION_L_EXTHS    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_EXTHS    )._type][instruction_information(INSTRUCTION_L_EXTHS    )._operation]._latence > 0);
519            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_EXTHZ    ] |= (instruction_size_data(INSTRUCTION_L_EXTHZ    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_EXTHZ    )._type][instruction_information(INSTRUCTION_L_EXTHZ    )._operation]._latence > 0);
520            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_EXTWS    ] |= (instruction_size_data(INSTRUCTION_L_EXTWS    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_EXTWS    )._type][instruction_information(INSTRUCTION_L_EXTWS    )._operation]._latence > 0);
521            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_EXTWZ    ] |= (instruction_size_data(INSTRUCTION_L_EXTWZ    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_EXTWZ    )._type][instruction_information(INSTRUCTION_L_EXTWZ    )._operation]._latence > 0);
522            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_FF1      ] |= (instruction_size_data(INSTRUCTION_L_FF1      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_FF1      )._type][instruction_information(INSTRUCTION_L_FF1      )._operation]._latence > 0);
523            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_FL1      ] |= (instruction_size_data(INSTRUCTION_L_FL1      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_FL1      )._type][instruction_information(INSTRUCTION_L_FL1      )._operation]._latence > 0);
524            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_J        ] |= (instruction_size_data(INSTRUCTION_L_J        ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_J        )._type][instruction_information(INSTRUCTION_L_J        )._operation]._latence > 0);
525            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_JAL      ] |= (instruction_size_data(INSTRUCTION_L_JAL      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_JAL      )._type][instruction_information(INSTRUCTION_L_JAL      )._operation]._latence > 0);
526            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_JALR     ] |= (instruction_size_data(INSTRUCTION_L_JALR     ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_JALR     )._type][instruction_information(INSTRUCTION_L_JALR     )._operation]._latence > 0);
527            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_JR       ] |= (instruction_size_data(INSTRUCTION_L_JR       ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_JR       )._type][instruction_information(INSTRUCTION_L_JR       )._operation]._latence > 0);
528//          _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_LBS      ] |= (instruction_size_data(INSTRUCTION_L_LBS      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_LBS      )._type][instruction_information(INSTRUCTION_L_LBS      )._operation]._latence > 0);
529//          _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_LBZ      ] |= (instruction_size_data(INSTRUCTION_L_LBZ      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_LBZ      )._type][instruction_information(INSTRUCTION_L_LBZ      )._operation]._latence > 0);
530//          _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_LD       ] |= (instruction_size_data(INSTRUCTION_L_LD       ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_LD       )._type][instruction_information(INSTRUCTION_L_LD       )._operation]._latence > 0);
531//          _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_LHS      ] |= (instruction_size_data(INSTRUCTION_L_LHS      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_LHS      )._type][instruction_information(INSTRUCTION_L_LHS      )._operation]._latence > 0);
532//          _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_LHZ      ] |= (instruction_size_data(INSTRUCTION_L_LHZ      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_LHZ      )._type][instruction_information(INSTRUCTION_L_LHZ      )._operation]._latence > 0);
533//          _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_LWS      ] |= (instruction_size_data(INSTRUCTION_L_LWS      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_LWS      )._type][instruction_information(INSTRUCTION_L_LWS      )._operation]._latence > 0);
534//          _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_LWZ      ] |= (instruction_size_data(INSTRUCTION_L_LWZ      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_LWZ      )._type][instruction_information(INSTRUCTION_L_LWZ      )._operation]._latence > 0);
535            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_MAC      ] |= (instruction_size_data(INSTRUCTION_L_MAC      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_MAC      )._type][instruction_information(INSTRUCTION_L_MAC      )._operation]._latence > 0);
536            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_MACI     ] |= (instruction_size_data(INSTRUCTION_L_MACI     ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_MACI     )._type][instruction_information(INSTRUCTION_L_MACI     )._operation]._latence > 0);
537            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_MACRC    ] |= (instruction_size_data(INSTRUCTION_L_MACRC    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_MACRC    )._type][instruction_information(INSTRUCTION_L_MACRC    )._operation]._latence > 0);
538            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_MFSPR    ] |= (instruction_size_data(INSTRUCTION_L_MFSPR    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_MFSPR    )._type][instruction_information(INSTRUCTION_L_MFSPR    )._operation]._latence > 0);
539            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_MOVHI    ] |= (instruction_size_data(INSTRUCTION_L_MOVHI    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_MOVHI    )._type][instruction_information(INSTRUCTION_L_MOVHI    )._operation]._latence > 0);
540            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_MSB      ] |= (instruction_size_data(INSTRUCTION_L_MSB      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_MSB      )._type][instruction_information(INSTRUCTION_L_MSB      )._operation]._latence > 0);
541//          _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_MSYNC    ] |= (instruction_size_data(INSTRUCTION_L_MSYNC    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_MSYNC    )._type][instruction_information(INSTRUCTION_L_MSYNC    )._operation]._latence > 0);
542            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_MTSPR    ] |= (instruction_size_data(INSTRUCTION_L_MTSPR    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_MTSPR    )._type][instruction_information(INSTRUCTION_L_MTSPR    )._operation]._latence > 0);
543            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_MUL      ] |= (instruction_size_data(INSTRUCTION_L_MUL      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_MUL      )._type][instruction_information(INSTRUCTION_L_MUL      )._operation]._latence > 0);
544            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_MULI     ] |= (instruction_size_data(INSTRUCTION_L_MULI     ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_MULI     )._type][instruction_information(INSTRUCTION_L_MULI     )._operation]._latence > 0);
545            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_MULU     ] |= (instruction_size_data(INSTRUCTION_L_MULU     ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_MULU     )._type][instruction_information(INSTRUCTION_L_MULU     )._operation]._latence > 0);
546            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_NOP      ] |= (instruction_size_data(INSTRUCTION_L_NOP      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_NOP      )._type][instruction_information(INSTRUCTION_L_NOP      )._operation]._latence > 0);
547            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_OR       ] |= (instruction_size_data(INSTRUCTION_L_OR       ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_OR       )._type][instruction_information(INSTRUCTION_L_OR       )._operation]._latence > 0);
548            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_ORI      ] |= (instruction_size_data(INSTRUCTION_L_ORI      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_ORI      )._type][instruction_information(INSTRUCTION_L_ORI      )._operation]._latence > 0);
549//          _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_PSYNC    ] |= (instruction_size_data(INSTRUCTION_L_PSYNC    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_PSYNC    )._type][instruction_information(INSTRUCTION_L_PSYNC    )._operation]._latence > 0);
550            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_RFE      ] |= (instruction_size_data(INSTRUCTION_L_RFE      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_RFE      )._type][instruction_information(INSTRUCTION_L_RFE      )._operation]._latence > 0);
551            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_ROR      ] |= (instruction_size_data(INSTRUCTION_L_ROR      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_ROR      )._type][instruction_information(INSTRUCTION_L_ROR      )._operation]._latence > 0);
552            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_RORI     ] |= (instruction_size_data(INSTRUCTION_L_RORI     ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_RORI     )._type][instruction_information(INSTRUCTION_L_RORI     )._operation]._latence > 0);
553//          _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SB       ] |= (instruction_size_data(INSTRUCTION_L_SB       ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SB       )._type][instruction_information(INSTRUCTION_L_SB       )._operation]._latence > 0);
554//          _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SD       ] |= (instruction_size_data(INSTRUCTION_L_SD       ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SD       )._type][instruction_information(INSTRUCTION_L_SD       )._operation]._latence > 0);
555            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SFEQ     ] |= (instruction_size_data(INSTRUCTION_L_SFEQ     ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SFEQ     )._type][instruction_information(INSTRUCTION_L_SFEQ     )._operation]._latence > 0);
556            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SFEQI    ] |= (instruction_size_data(INSTRUCTION_L_SFEQI    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SFEQI    )._type][instruction_information(INSTRUCTION_L_SFEQI    )._operation]._latence > 0);
557            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SFGES    ] |= (instruction_size_data(INSTRUCTION_L_SFGES    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SFGES    )._type][instruction_information(INSTRUCTION_L_SFGES    )._operation]._latence > 0);
558            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SFGESI   ] |= (instruction_size_data(INSTRUCTION_L_SFGESI   ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SFGESI   )._type][instruction_information(INSTRUCTION_L_SFGESI   )._operation]._latence > 0);
559            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SFGEU    ] |= (instruction_size_data(INSTRUCTION_L_SFGEU    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SFGEU    )._type][instruction_information(INSTRUCTION_L_SFGEU    )._operation]._latence > 0);
560            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SFGEUI   ] |= (instruction_size_data(INSTRUCTION_L_SFGEUI   ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SFGEUI   )._type][instruction_information(INSTRUCTION_L_SFGEUI   )._operation]._latence > 0);
561            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SFGTS    ] |= (instruction_size_data(INSTRUCTION_L_SFGTS    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SFGTS    )._type][instruction_information(INSTRUCTION_L_SFGTS    )._operation]._latence > 0);
562            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SFGTSI   ] |= (instruction_size_data(INSTRUCTION_L_SFGTSI   ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SFGTSI   )._type][instruction_information(INSTRUCTION_L_SFGTSI   )._operation]._latence > 0);
563            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SFGTU    ] |= (instruction_size_data(INSTRUCTION_L_SFGTU    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SFGTU    )._type][instruction_information(INSTRUCTION_L_SFGTU    )._operation]._latence > 0);
564            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SFGTUI   ] |= (instruction_size_data(INSTRUCTION_L_SFGTUI   ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SFGTUI   )._type][instruction_information(INSTRUCTION_L_SFGTUI   )._operation]._latence > 0);
565            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SFLES    ] |= (instruction_size_data(INSTRUCTION_L_SFLES    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SFLES    )._type][instruction_information(INSTRUCTION_L_SFLES    )._operation]._latence > 0);
566            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SFLESI   ] |= (instruction_size_data(INSTRUCTION_L_SFLESI   ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SFLESI   )._type][instruction_information(INSTRUCTION_L_SFLESI   )._operation]._latence > 0);
567            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SFLEU    ] |= (instruction_size_data(INSTRUCTION_L_SFLEU    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SFLEU    )._type][instruction_information(INSTRUCTION_L_SFLEU    )._operation]._latence > 0);
568            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SFLEUI   ] |= (instruction_size_data(INSTRUCTION_L_SFLEUI   ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SFLEUI   )._type][instruction_information(INSTRUCTION_L_SFLEUI   )._operation]._latence > 0);
569            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SFLTS    ] |= (instruction_size_data(INSTRUCTION_L_SFLTS    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SFLTS    )._type][instruction_information(INSTRUCTION_L_SFLTS    )._operation]._latence > 0);
570            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SFLTSI   ] |= (instruction_size_data(INSTRUCTION_L_SFLTSI   ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SFLTSI   )._type][instruction_information(INSTRUCTION_L_SFLTSI   )._operation]._latence > 0);
571            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SFLTU    ] |= (instruction_size_data(INSTRUCTION_L_SFLTU    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SFLTU    )._type][instruction_information(INSTRUCTION_L_SFLTU    )._operation]._latence > 0);
572            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SFLTUI   ] |= (instruction_size_data(INSTRUCTION_L_SFLTUI   ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SFLTUI   )._type][instruction_information(INSTRUCTION_L_SFLTUI   )._operation]._latence > 0);
573            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SFNE     ] |= (instruction_size_data(INSTRUCTION_L_SFNE     ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SFNE     )._type][instruction_information(INSTRUCTION_L_SFNE     )._operation]._latence > 0);
574            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SFNEI    ] |= (instruction_size_data(INSTRUCTION_L_SFNEI    ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SFNEI    )._type][instruction_information(INSTRUCTION_L_SFNEI    )._operation]._latence > 0);
575//          _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SH       ] |= (instruction_size_data(INSTRUCTION_L_SH       ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SH       )._type][instruction_information(INSTRUCTION_L_SH       )._operation]._latence > 0);
576            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SLL      ] |= (instruction_size_data(INSTRUCTION_L_SLL      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SLL      )._type][instruction_information(INSTRUCTION_L_SLL      )._operation]._latence > 0);
577            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SLLI     ] |= (instruction_size_data(INSTRUCTION_L_SLLI     ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SLLI     )._type][instruction_information(INSTRUCTION_L_SLLI     )._operation]._latence > 0);
578            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SRA      ] |= (instruction_size_data(INSTRUCTION_L_SRA      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SRA      )._type][instruction_information(INSTRUCTION_L_SRA      )._operation]._latence > 0);
579            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SRAI     ] |= (instruction_size_data(INSTRUCTION_L_SRAI     ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SRAI     )._type][instruction_information(INSTRUCTION_L_SRAI     )._operation]._latence > 0);
580            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SRL      ] |= (instruction_size_data(INSTRUCTION_L_SRL      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SRL      )._type][instruction_information(INSTRUCTION_L_SRL      )._operation]._latence > 0);
581            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SRLI     ] |= (instruction_size_data(INSTRUCTION_L_SRLI     ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SRLI     )._type][instruction_information(INSTRUCTION_L_SRLI     )._operation]._latence > 0);
582            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SUB      ] |= (instruction_size_data(INSTRUCTION_L_SUB      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SUB      )._type][instruction_information(INSTRUCTION_L_SUB      )._operation]._latence > 0);
583//          _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SW       ] |= (instruction_size_data(INSTRUCTION_L_SW       ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SW       )._type][instruction_information(INSTRUCTION_L_SW       )._operation]._latence > 0);
584            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SYS      ] |= (instruction_size_data(INSTRUCTION_L_SYS      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_SYS      )._type][instruction_information(INSTRUCTION_L_SYS      )._operation]._latence > 0);
585            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_TRAP     ] |= (instruction_size_data(INSTRUCTION_L_TRAP     ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_TRAP     )._type][instruction_information(INSTRUCTION_L_TRAP     )._operation]._latence > 0);
586            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_XOR      ] |= (instruction_size_data(INSTRUCTION_L_XOR      ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_XOR      )._type][instruction_information(INSTRUCTION_L_XOR      )._operation]._latence > 0);
587            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_XORI     ] |= (instruction_size_data(INSTRUCTION_L_XORI     ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_XORI     )._type][instruction_information(INSTRUCTION_L_XORI     )._operation]._latence > 0);
588
589            // ORFPX
590            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_ADD_D   ] |= (instruction_size_data(INSTRUCTION_LF_ADD_D   ) <= size_general_data) and false;
591            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_ADD_S   ] |= (instruction_size_data(INSTRUCTION_LF_ADD_S   ) <= size_general_data) and false;
592            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_CUST1_D ] |= (instruction_size_data(INSTRUCTION_LF_CUST1_D ) <= size_general_data) and false;
593            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_CUST1_S ] |= (instruction_size_data(INSTRUCTION_LF_CUST1_S ) <= size_general_data) and false;
594            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_DIV_D   ] |= (instruction_size_data(INSTRUCTION_LF_DIV_D   ) <= size_general_data) and false;
595            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_DIV_S   ] |= (instruction_size_data(INSTRUCTION_LF_DIV_S   ) <= size_general_data) and false;
596            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_FTOI_D  ] |= (instruction_size_data(INSTRUCTION_LF_FTOI_D  ) <= size_general_data) and false;
597            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_FTOI_S  ] |= (instruction_size_data(INSTRUCTION_LF_FTOI_S  ) <= size_general_data) and false;
598            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_ITOF_D  ] |= (instruction_size_data(INSTRUCTION_LF_ITOF_D  ) <= size_general_data) and false;
599            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_ITOF_S  ] |= (instruction_size_data(INSTRUCTION_LF_ITOF_S  ) <= size_general_data) and false;
600            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_MADD_D  ] |= (instruction_size_data(INSTRUCTION_LF_MADD_D  ) <= size_general_data) and false;
601            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_MADD_S  ] |= (instruction_size_data(INSTRUCTION_LF_MADD_S  ) <= size_general_data) and false;
602            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_MUL_D   ] |= (instruction_size_data(INSTRUCTION_LF_MUL_D   ) <= size_general_data) and false;
603            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_MUL_S   ] |= (instruction_size_data(INSTRUCTION_LF_MUL_S   ) <= size_general_data) and false;
604            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_REM_D   ] |= (instruction_size_data(INSTRUCTION_LF_REM_D   ) <= size_general_data) and false;
605            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_REM_S   ] |= (instruction_size_data(INSTRUCTION_LF_REM_S   ) <= size_general_data) and false;
606            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_SFEQ_D  ] |= (instruction_size_data(INSTRUCTION_LF_SFEQ_D  ) <= size_general_data) and false;
607            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_SFEQ_S  ] |= (instruction_size_data(INSTRUCTION_LF_SFEQ_S  ) <= size_general_data) and false;
608            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_SFGE_D  ] |= (instruction_size_data(INSTRUCTION_LF_SFGE_D  ) <= size_general_data) and false;
609            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_SFGE_S  ] |= (instruction_size_data(INSTRUCTION_LF_SFGE_S  ) <= size_general_data) and false;
610            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_SFGT_D  ] |= (instruction_size_data(INSTRUCTION_LF_SFGT_D  ) <= size_general_data) and false;
611            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_SFGT_S  ] |= (instruction_size_data(INSTRUCTION_LF_SFGT_S  ) <= size_general_data) and false;
612            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_SFLE_D  ] |= (instruction_size_data(INSTRUCTION_LF_SFLE_D  ) <= size_general_data) and false;
613            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_SFLE_S  ] |= (instruction_size_data(INSTRUCTION_LF_SFLE_S  ) <= size_general_data) and false;
614            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_SFLT_D  ] |= (instruction_size_data(INSTRUCTION_LF_SFLT_D  ) <= size_general_data) and false;
615            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_SFLT_S  ] |= (instruction_size_data(INSTRUCTION_LF_SFLT_S  ) <= size_general_data) and false;
616            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_SFNE_D  ] |= (instruction_size_data(INSTRUCTION_LF_SFNE_D  ) <= size_general_data) and false;
617            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_SFNE_S  ] |= (instruction_size_data(INSTRUCTION_LF_SFNE_S  ) <= size_general_data) and false;
618            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_SUB_D   ] |= (instruction_size_data(INSTRUCTION_LF_SUB_D   ) <= size_general_data) and false;
619            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LF_SUB_S   ] |= (instruction_size_data(INSTRUCTION_LF_SUB_S   ) <= size_general_data) and false;
620
621            // ORVDX
622            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ADD_B   ] |= (instruction_size_data(INSTRUCTION_LV_ADD_B   ) <= size_general_data) and false;
623            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ADD_H   ] |= (instruction_size_data(INSTRUCTION_LV_ADD_H   ) <= size_general_data) and false;
624            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ADDS_B  ] |= (instruction_size_data(INSTRUCTION_LV_ADDS_B  ) <= size_general_data) and false;
625            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ADDS_H  ] |= (instruction_size_data(INSTRUCTION_LV_ADDS_H  ) <= size_general_data) and false;
626            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ADDU_B  ] |= (instruction_size_data(INSTRUCTION_LV_ADDU_B  ) <= size_general_data) and false;
627            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ADDU_H  ] |= (instruction_size_data(INSTRUCTION_LV_ADDU_H  ) <= size_general_data) and false;
628            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ADDUS_B ] |= (instruction_size_data(INSTRUCTION_LV_ADDUS_B ) <= size_general_data) and false;
629            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ADDUS_H ] |= (instruction_size_data(INSTRUCTION_LV_ADDUS_H ) <= size_general_data) and false;
630            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ALL_EQ_B] |= (instruction_size_data(INSTRUCTION_LV_ALL_EQ_B) <= size_general_data) and false;
631            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ALL_EQ_H] |= (instruction_size_data(INSTRUCTION_LV_ALL_EQ_H) <= size_general_data) and false;
632            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ALL_GE_B] |= (instruction_size_data(INSTRUCTION_LV_ALL_GE_B) <= size_general_data) and false;
633            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ALL_GE_H] |= (instruction_size_data(INSTRUCTION_LV_ALL_GE_H) <= size_general_data) and false;
634            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ALL_GT_B] |= (instruction_size_data(INSTRUCTION_LV_ALL_GT_B) <= size_general_data) and false;
635            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ALL_GT_H] |= (instruction_size_data(INSTRUCTION_LV_ALL_GT_H) <= size_general_data) and false;
636            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ALL_LE_B] |= (instruction_size_data(INSTRUCTION_LV_ALL_LE_B) <= size_general_data) and false;
637            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ALL_LE_H] |= (instruction_size_data(INSTRUCTION_LV_ALL_LE_H) <= size_general_data) and false;
638            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ALL_LT_B] |= (instruction_size_data(INSTRUCTION_LV_ALL_LT_B) <= size_general_data) and false;
639            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ALL_LT_H] |= (instruction_size_data(INSTRUCTION_LV_ALL_LT_H) <= size_general_data) and false;
640            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ALL_NE_B] |= (instruction_size_data(INSTRUCTION_LV_ALL_NE_B) <= size_general_data) and false;
641            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ALL_NE_H] |= (instruction_size_data(INSTRUCTION_LV_ALL_NE_H) <= size_general_data) and false;
642            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_AND     ] |= (instruction_size_data(INSTRUCTION_LV_AND     ) <= size_general_data) and false;
643            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ANY_EQ_B] |= (instruction_size_data(INSTRUCTION_LV_ANY_EQ_B) <= size_general_data) and false;
644            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ANY_EQ_H] |= (instruction_size_data(INSTRUCTION_LV_ANY_EQ_H) <= size_general_data) and false;
645            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ANY_GE_B] |= (instruction_size_data(INSTRUCTION_LV_ANY_GE_B) <= size_general_data) and false;
646            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ANY_GE_H] |= (instruction_size_data(INSTRUCTION_LV_ANY_GE_H) <= size_general_data) and false;
647            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ANY_GT_B] |= (instruction_size_data(INSTRUCTION_LV_ANY_GT_B) <= size_general_data) and false;
648            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ANY_GT_H] |= (instruction_size_data(INSTRUCTION_LV_ANY_GT_H) <= size_general_data) and false;
649            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ANY_LE_B] |= (instruction_size_data(INSTRUCTION_LV_ANY_LE_B) <= size_general_data) and false;
650            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ANY_LE_H] |= (instruction_size_data(INSTRUCTION_LV_ANY_LE_H) <= size_general_data) and false;
651            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ANY_LT_B] |= (instruction_size_data(INSTRUCTION_LV_ANY_LT_B) <= size_general_data) and false;
652            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ANY_LT_H] |= (instruction_size_data(INSTRUCTION_LV_ANY_LT_H) <= size_general_data) and false;
653            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ANY_NE_B] |= (instruction_size_data(INSTRUCTION_LV_ANY_NE_B) <= size_general_data) and false;
654            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_ANY_NE_H] |= (instruction_size_data(INSTRUCTION_LV_ANY_NE_H) <= size_general_data) and false;
655            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_AVG_B   ] |= (instruction_size_data(INSTRUCTION_LV_AVG_B   ) <= size_general_data) and false;
656            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_AVG_H   ] |= (instruction_size_data(INSTRUCTION_LV_AVG_H   ) <= size_general_data) and false;
657            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_CMP_EQ_B] |= (instruction_size_data(INSTRUCTION_LV_CMP_EQ_B) <= size_general_data) and false;
658            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_CMP_EQ_H] |= (instruction_size_data(INSTRUCTION_LV_CMP_EQ_H) <= size_general_data) and false;
659            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_CMP_GE_B] |= (instruction_size_data(INSTRUCTION_LV_CMP_GE_B) <= size_general_data) and false;
660            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_CMP_GE_H] |= (instruction_size_data(INSTRUCTION_LV_CMP_GE_H) <= size_general_data) and false;
661            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_CMP_GT_B] |= (instruction_size_data(INSTRUCTION_LV_CMP_GT_B) <= size_general_data) and false;
662            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_CMP_GT_H] |= (instruction_size_data(INSTRUCTION_LV_CMP_GT_H) <= size_general_data) and false;
663            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_CMP_LE_B] |= (instruction_size_data(INSTRUCTION_LV_CMP_LE_B) <= size_general_data) and false;
664            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_CMP_LE_H] |= (instruction_size_data(INSTRUCTION_LV_CMP_LE_H) <= size_general_data) and false;
665            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_CMP_LT_B] |= (instruction_size_data(INSTRUCTION_LV_CMP_LT_B) <= size_general_data) and false;
666            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_CMP_LT_H] |= (instruction_size_data(INSTRUCTION_LV_CMP_LT_H) <= size_general_data) and false;
667            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_CMP_NE_B] |= (instruction_size_data(INSTRUCTION_LV_CMP_NE_B) <= size_general_data) and false;
668            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_CMP_NE_H] |= (instruction_size_data(INSTRUCTION_LV_CMP_NE_H) <= size_general_data) and false;
669            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_CUST1   ] |= (instruction_size_data(INSTRUCTION_LV_CUST1   ) <= size_general_data) and false;
670            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_CUST2   ] |= (instruction_size_data(INSTRUCTION_LV_CUST2   ) <= size_general_data) and false;
671            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_CUST3   ] |= (instruction_size_data(INSTRUCTION_LV_CUST3   ) <= size_general_data) and false;
672            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_CUST4   ] |= (instruction_size_data(INSTRUCTION_LV_CUST4   ) <= size_general_data) and false;
673            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_MADDS_H ] |= (instruction_size_data(INSTRUCTION_LV_MADDS_H ) <= size_general_data) and false;
674            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_MAX_B   ] |= (instruction_size_data(INSTRUCTION_LV_MAX_B   ) <= size_general_data) and false;
675            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_MAX_H   ] |= (instruction_size_data(INSTRUCTION_LV_MAX_H   ) <= size_general_data) and false;
676            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_MERGE_B ] |= (instruction_size_data(INSTRUCTION_LV_MERGE_B ) <= size_general_data) and false;
677            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_MERGE_H ] |= (instruction_size_data(INSTRUCTION_LV_MERGE_H ) <= size_general_data) and false;
678            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_MIN_B   ] |= (instruction_size_data(INSTRUCTION_LV_MIN_B   ) <= size_general_data) and false;
679            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_MIN_H   ] |= (instruction_size_data(INSTRUCTION_LV_MIN_H   ) <= size_general_data) and false;
680            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_MSUBS_H ] |= (instruction_size_data(INSTRUCTION_LV_MSUBS_H ) <= size_general_data) and false;
681            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_MULS_H  ] |= (instruction_size_data(INSTRUCTION_LV_MULS_H  ) <= size_general_data) and false;
682            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_NAND    ] |= (instruction_size_data(INSTRUCTION_LV_NAND    ) <= size_general_data) and false;
683            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_NOR     ] |= (instruction_size_data(INSTRUCTION_LV_NOR     ) <= size_general_data) and false;
684            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_OR      ] |= (instruction_size_data(INSTRUCTION_LV_OR      ) <= size_general_data) and false;
685            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_PACK_B  ] |= (instruction_size_data(INSTRUCTION_LV_PACK_B  ) <= size_general_data) and false;
686            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_PACK_H  ] |= (instruction_size_data(INSTRUCTION_LV_PACK_H  ) <= size_general_data) and false;
687            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_PACKS_B ] |= (instruction_size_data(INSTRUCTION_LV_PACKS_B ) <= size_general_data) and false;
688            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_PACKS_H ] |= (instruction_size_data(INSTRUCTION_LV_PACKS_H ) <= size_general_data) and false;
689            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_PACKUS_B] |= (instruction_size_data(INSTRUCTION_LV_PACKUS_B) <= size_general_data) and false;
690            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_PACKUS_H] |= (instruction_size_data(INSTRUCTION_LV_PACKUS_H) <= size_general_data) and false;
691            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_PERM_N  ] |= (instruction_size_data(INSTRUCTION_LV_PERM_N  ) <= size_general_data) and false;
692            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_RL_B    ] |= (instruction_size_data(INSTRUCTION_LV_RL_B    ) <= size_general_data) and false;
693            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_RL_H    ] |= (instruction_size_data(INSTRUCTION_LV_RL_H    ) <= size_general_data) and false;
694            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_SLL     ] |= (instruction_size_data(INSTRUCTION_LV_SLL     ) <= size_general_data) and false;
695            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_SLL_B   ] |= (instruction_size_data(INSTRUCTION_LV_SLL_B   ) <= size_general_data) and false;
696            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_SLL_H   ] |= (instruction_size_data(INSTRUCTION_LV_SLL_H   ) <= size_general_data) and false;
697            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_SRA_B   ] |= (instruction_size_data(INSTRUCTION_LV_SRA_B   ) <= size_general_data) and false;
698            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_SRA_H   ] |= (instruction_size_data(INSTRUCTION_LV_SRA_H   ) <= size_general_data) and false;
699            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_SRL     ] |= (instruction_size_data(INSTRUCTION_LV_SRL     ) <= size_general_data) and false;
700            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_SRL_B   ] |= (instruction_size_data(INSTRUCTION_LV_SRL_B   ) <= size_general_data) and false;
701            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_SRL_H   ] |= (instruction_size_data(INSTRUCTION_LV_SRL_H   ) <= size_general_data) and false;
702            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_SUB_B   ] |= (instruction_size_data(INSTRUCTION_LV_SUB_B   ) <= size_general_data) and false;
703            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_SUB_H   ] |= (instruction_size_data(INSTRUCTION_LV_SUB_H   ) <= size_general_data) and false;
704            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_SUBS_B  ] |= (instruction_size_data(INSTRUCTION_LV_SUBS_B  ) <= size_general_data) and false;
705            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_SUBS_H  ] |= (instruction_size_data(INSTRUCTION_LV_SUBS_H  ) <= size_general_data) and false;
706            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_SUBU_B  ] |= (instruction_size_data(INSTRUCTION_LV_SUBU_B  ) <= size_general_data) and false;
707            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_SUBU_H  ] |= (instruction_size_data(INSTRUCTION_LV_SUBU_H  ) <= size_general_data) and false;
708            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_SUBUS_B ] |= (instruction_size_data(INSTRUCTION_LV_SUBUS_B ) <= size_general_data) and false;
709            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_SUBUS_H ] |= (instruction_size_data(INSTRUCTION_LV_SUBUS_H ) <= size_general_data) and false;
710            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_UNPACK_B] |= (instruction_size_data(INSTRUCTION_LV_UNPACK_B) <= size_general_data) and false;
711            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_UNPACK_H] |= (instruction_size_data(INSTRUCTION_LV_UNPACK_H) <= size_general_data) and false;
712            _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_LV_XOR     ] |= (instruction_size_data(INSTRUCTION_LV_XOR     ) <= size_general_data) and false;
713          }
714
715        //_front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CUST1    ] |= ;
716        //_front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CUST2    ] |= ;
717        //_front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CUST3    ] |= ;
718        //_front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CUST4    ] |= ;
719        //_front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CUST5    ] |= ;
720        //_front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CUST6    ] |= ;
721        //_front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CUST7    ] |= ;
722        //_front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CUST8    ] |= ;
723
724        // Test if a lsu is connected with this thread
725
726        _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_LBS      ] |= (instruction_size_data(INSTRUCTION_L_LBS      ) <= size_general_data);
727        _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_LBZ      ] |= (instruction_size_data(INSTRUCTION_L_LBZ      ) <= size_general_data);
728        _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_LD       ] |= (instruction_size_data(INSTRUCTION_L_LD       ) <= size_general_data);
729        _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_LHS      ] |= (instruction_size_data(INSTRUCTION_L_LHS      ) <= size_general_data);
730        _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_LHZ      ] |= (instruction_size_data(INSTRUCTION_L_LHZ      ) <= size_general_data);
731        _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_LWS      ] |= (instruction_size_data(INSTRUCTION_L_LWS      ) <= size_general_data);
732        _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_LWZ      ] |= (instruction_size_data(INSTRUCTION_L_LWZ      ) <= size_general_data);
733
734        _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SB       ] |= (instruction_size_data(INSTRUCTION_L_SB       ) <= size_general_data);
735        _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SD       ] |= (instruction_size_data(INSTRUCTION_L_SD       ) <= size_general_data);
736        _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SH       ] |= (instruction_size_data(INSTRUCTION_L_SH       ) <= size_general_data);
737        _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SW       ] |= (instruction_size_data(INSTRUCTION_L_SW       ) <= size_general_data);
738
739//      _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CSYNC    ]  = true;
740        _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_MSYNC    ]  = true;
741        _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_PSYNC    ]  = true;
742      }
743
744//     log_printf(TRACE,Core,FUNCTION,_(" * front_end_instruction_implemeted"));
745//     for (uint32_t i=0; i<_nb_front_end; ++i)
746//       for (uint32_t j=0; j<_nb_context[i]; ++j)
747//         for (uint32_t k=0; k<NB_INSTRUCTION; ++k)
748//           log_printf(TRACE,Core,FUNCTION,_("   [%d][%d][%d] = %d - type : %d, operation : %d, size_data : %d, latence :  %d")
749//                      ,i,j,k,_front_end_instruction_implemeted[i][j][k]
750//                      ,instruction_information(k)._type
751//                      ,instruction_information(k)._operation
752//                      ,instruction_size_data(k)
753//                      ,_timing[0][instruction_information(k)._type][instruction_information(k)._operation]._latence);
754
755    // Reedit timing
756    {
757      multi_execute_loop::execute_loop::execute_timing_t timing_tmp [_nb_functionnal_unit][_nb_type][_nb_operation];
758
759      for (uint32_t i=0; i<_nb_functionnal_unit; ++i)
760        for (uint32_t j=0; j<_nb_type; ++j)
761          for (uint32_t k=0; k<_nb_operation; ++k)
762            {
763              timing_tmp [i][j][k]._latence = _timing [i][j][k]._latence;
764              timing_tmp [i][j][k]._delay   = _timing [i][j][k]._delay  ;
765
766              // Reset
767              _timing [i][j][k]._latence = _timing [i][j][k]._delay = 0;
768            }
769
770      for (uint32_t i=0; i<_nb_thread; ++i)
771        {
772          uint32_t num_front_end = _link_context_with_thread [i].first;
773          uint32_t num_context   = _link_context_with_thread [i].second;
774         
775          for (uint32_t j=0; j<_nb_functionnal_unit; ++j)
776            {
777              // Test if link
778              if (not _link_thread_and_functionnal_unit[i][j])
779                continue;
780     
781              for (uint32_t k=0; k<NB_INSTRUCTION; ++k)
782                if (_front_end_instruction_implemeted [num_front_end][num_context][k])
783                  {
784                    uint32_t x = instruction_information(k)._type;
785                    uint32_t y = instruction_information(k)._operation;
786
787                    _timing[j][x][y]._latence = timing_tmp[j][x][y]._latence;
788                    _timing[j][x][y]._delay   = timing_tmp[j][x][y]._delay  ;
789                  }
790            }
791        } 
792    }
793   
794    ALLOC1(_front_end_nb_inst_branch_complete             ,uint32_t         ,_nb_front_end);
795    ALLOC2(_front_end_size_decod_queue                    ,uint32_t         ,_nb_front_end,_nb_decod_unit[it1]);
796    ALLOC2(_front_end_decod_queue_scheme                  ,multi_front_end::front_end::decod_unit::decod_queue::Tdecod_queue_scheme_t
797                                                                            ,_nb_front_end,_nb_decod_unit[it1]);
798    ALLOC2(_front_end_nb_inst_decod                       ,uint32_t         ,_nb_front_end,_nb_decod_unit[it1]);
799    ALLOC1(_front_end_sum_inst_decod                      ,uint32_t         ,_nb_front_end);
800    ALLOC2(_front_end_nb_context_select                   ,uint32_t         ,_nb_front_end,_nb_decod_unit[it1]);
801    ALLOC2(_front_end_context_select_priority             ,Tpriority_t      ,_nb_front_end,_nb_decod_unit[it1]);
802    ALLOC2(_front_end_context_select_load_balancing       ,Tload_balancing_t,_nb_front_end,_nb_decod_unit[it1]);
803
804    for (uint32_t i=0; i<_nb_front_end; ++i)
805      {
806        uint32_t num_rename_bloc = _link_rename_bloc_with_front_end [i];
807        uint32_t num_ooo_engine  = _link_rename_unit_with_rename_bloc [num_rename_bloc].first;
808
809        _front_end_nb_inst_branch_complete [i] = _nb_inst_branch_complete [num_ooo_engine];
810        _front_end_sum_inst_decod          [i] = 0;
811        for (uint32_t j=0; j<_nb_decod_unit[i]; ++j)
812          {
813            uint32_t num_decod_bloc=_link_decod_bloc_with_decod_unit[i][j];
814           
815            _front_end_size_decod_queue              [i][j] = _size_decod_queue              [num_decod_bloc];
816            _front_end_decod_queue_scheme            [i][j] = _decod_queue_scheme            [num_decod_bloc];
817            _front_end_nb_inst_decod                 [i][j] = _nb_inst_decod                 [num_decod_bloc];
818            _front_end_sum_inst_decod                [i]   += _nb_inst_decod                 [num_decod_bloc];
819            _front_end_nb_context_select             [i][j] = _nb_context_select             [num_decod_bloc];
820            _front_end_context_select_priority       [i][j] = _context_select_priority       [num_decod_bloc];
821            _front_end_context_select_load_balancing [i][j] = _context_select_load_balancing [num_decod_bloc];
822          }
823      }
824
825    ALLOC1(_ooo_engine_nb_front_end                       ,uint32_t         ,_nb_ooo_engine);
826   
827    {
828      std::vector<uint32_t> list_front_end [_nb_ooo_engine];
829
830      // initialization counter
831      for (uint32_t i=0; i<_nb_ooo_engine; ++i)
832        _ooo_engine_nb_front_end [i] = 0;
833
834      // scan all front_end
835      for (uint32_t i=0; i<_nb_front_end; ++i)
836        {
837          uint32_t num_rename_bloc = _link_rename_bloc_with_front_end [i];
838          uint32_t num_ooo_engine  = _link_rename_unit_with_rename_bloc [num_rename_bloc].first;
839
840           // insert a new front_end
841          _ooo_engine_nb_front_end [num_ooo_engine] ++; // === list_front_end.size()
842          list_front_end           [num_ooo_engine].push_back(i); // No double
843        }
844
845      log_printf(TRACE,Core,FUNCTION,_(" * translate_ooo_engine_num_front_end"));
846     
847      ALLOC2(_translate_ooo_engine_num_front_end            ,uint32_t         ,_nb_ooo_engine,_ooo_engine_nb_front_end[it1]);
848      for (uint32_t i=0; i<_nb_ooo_engine; ++i)
849        for (uint32_t j=0; j<_ooo_engine_nb_front_end[i];++j)
850          {
851            uint32_t num_front_end = list_front_end[i][j];
852           
853            log_printf(TRACE,Core,FUNCTION,_("   [%d][%d] -> %d"),i,j,num_front_end);
854            _translate_ooo_engine_num_front_end [i][j++] = num_front_end;
855          }
856    }
857
858    ALLOC1(_ooo_engine_nb_execute_loop                    ,uint32_t         ,_nb_ooo_engine);
859
860    {
861      std::vector<uint32_t> list_execute_loop [_nb_ooo_engine];
862
863      // initialization counter
864      for (uint32_t i=0; i<_nb_ooo_engine; ++i)
865        _ooo_engine_nb_execute_loop [i] = 0;
866
867      // scan the dispatch table
868      for (uint32_t i=0; i<_nb_ooo_engine; ++i)
869        {
870          for (uint32_t j=0; j<_nb_inst_issue[i]; ++j)
871            for (uint32_t k=0; k<_nb_read_bloc; ++k)
872              {
873                // have route between this slot's ooo_engine and an read_bloc
874                if (_table_dispatch [i][j][k])
875                  {
876                    uint32_t num_execute_loop = _link_read_unit_with_read_bloc [k].first;
877                   
878                    list_execute_loop[i].push_back(num_execute_loop);
879                  }
880              }
881               
882          {
883            sort  (list_execute_loop[i].begin(),
884                   list_execute_loop[i].end());
885            std::vector<uint32_t>::iterator it=std::unique(list_execute_loop[i].begin(),
886                                                           list_execute_loop[i].end());
887            list_execute_loop[i].erase(it,list_execute_loop[i].end());
888          }
889
890          _ooo_engine_nb_execute_loop [i] = list_execute_loop[i].size();
891        }
892
893      log_printf(TRACE,Core,FUNCTION,_(" * translate_ooo_engine_num_execute_loop"));
894     
895      ALLOC2(_translate_ooo_engine_num_execute_loop         ,uint32_t         ,_nb_ooo_engine,_ooo_engine_nb_execute_loop[it1]);
896
897      for (uint32_t i=0; i<_nb_ooo_engine; ++i)
898        for (uint32_t j=0; j<list_execute_loop[i].size();++j)
899          {
900            uint32_t num_execute_loop = list_execute_loop[i][j];
901
902            log_printf(TRACE,Core,FUNCTION,_("   [%d][%d] -> %d"),i,j,num_execute_loop);
903            _translate_ooo_engine_num_execute_loop [i][j++] = num_execute_loop;
904          }
905    }
906
907    ALLOC2(_ooo_engine_nb_context                         ,uint32_t         ,_nb_ooo_engine,_ooo_engine_nb_front_end[it1]);
908    ALLOC2(_ooo_engine_nb_inst_decod                      ,uint32_t         ,_nb_ooo_engine,_ooo_engine_nb_front_end[it1]);
909
910    for (uint32_t i=0; i<_nb_ooo_engine; ++i)
911      for (uint32_t j=0; j<_ooo_engine_nb_front_end[i]; ++j)
912        {
913          uint32_t num_front_end = _translate_ooo_engine_num_front_end [i][j];
914
915          _ooo_engine_nb_context    [i][j] = _nb_context [num_front_end];
916          _ooo_engine_nb_inst_decod [i][j] = 0;
917
918          // All context is route to the same rename_unit
919          for (uint32_t k=0; k<_nb_decod_unit[num_front_end]; ++k)
920            _ooo_engine_nb_inst_decod [i][j] += _front_end_nb_inst_decod [num_front_end][k];
921        }
922
923    ALLOC3(_ooo_engine_translate_num_context_to_num_thread,uint32_t         ,_nb_ooo_engine,_ooo_engine_nb_front_end[it1],_ooo_engine_nb_context[it1][it2]);
924    for (uint32_t i=0; i<_nb_ooo_engine; ++i)
925      for (uint32_t j=0; j<_ooo_engine_nb_front_end[i]; ++j)
926        {
927          uint32_t num_front_end = _translate_ooo_engine_num_front_end [i][j];
928          for (uint32_t k=0; k<_ooo_engine_nb_context[i][j]; ++k)
929            {
930              uint32_t num_thread = _link_thread_with_context[num_front_end][k];
931
932              _ooo_engine_translate_num_context_to_num_thread [i][j][k] = num_thread;
933            }
934        }
935
936    ALLOC2(_ooo_engine_nb_inst_execute                    ,uint32_t         ,_nb_ooo_engine,_ooo_engine_nb_execute_loop[it1]);
937
938    for (uint32_t i=0; i<_nb_ooo_engine; ++i)
939      for (uint32_t j=0; j<_ooo_engine_nb_execute_loop[i]; ++j)
940        {
941          uint32_t num_execute_loop = _translate_ooo_engine_num_execute_loop [i][j];
942
943          // each write_unit manage one instruction per cycle.
944          _ooo_engine_nb_inst_execute [i][j] = _nb_write_unit [num_execute_loop];
945        }
946   
947    ALLOC3(_ooo_engine_nb_branch_speculated               ,uint32_t         ,_nb_ooo_engine,_ooo_engine_nb_front_end[it1],_ooo_engine_nb_context[it1][it2]);
948    ALLOC2(_ooo_engine_link_rename_unit_with_front_end    ,uint32_t         ,_nb_ooo_engine,_ooo_engine_nb_front_end[it1]);
949
950    for (uint32_t i=0; i<_nb_ooo_engine; ++i)
951      for (uint32_t j=0; j<_ooo_engine_nb_front_end[i]; ++j)
952        {
953          uint32_t num_front_end = _translate_ooo_engine_num_front_end [i][j];
954
955          for (uint32_t k=0; k<_nb_context[num_front_end];++k)
956            {
957              uint32_t num_thread = _link_thread_with_context[num_front_end][k];
958
959              _ooo_engine_nb_branch_speculated [i][j][k] = _upt_size_queue [num_thread];
960            }
961         
962          uint32_t num_rename_bloc = _link_rename_bloc_with_front_end  [num_front_end];
963          uint32_t num_rename_unit = _link_rename_unit_with_rename_bloc[num_rename_bloc].second; 
964
965          _ooo_engine_link_rename_unit_with_front_end [i][j] = num_rename_unit;
966        }
967
968    ALLOC2(_ooo_engine_nb_inst_insert                     ,uint32_t         ,_nb_ooo_engine,_nb_rename_unit[it1]);
969    ALLOC1(_ooo_engine_nb_inst_insert_rob                 ,uint32_t         ,_nb_ooo_engine);
970    ALLOC2(_ooo_engine_nb_inst_retire                     ,uint32_t         ,_nb_ooo_engine,_nb_rename_unit[it1]);
971    ALLOC2(_ooo_engine_rename_select_priority             ,Tpriority_t      ,_nb_ooo_engine,_nb_rename_unit[it1]);
972    ALLOC2(_ooo_engine_rename_select_load_balancing       ,Tload_balancing_t,_nb_ooo_engine,_nb_rename_unit[it1]);
973    ALLOC2(_ooo_engine_rename_select_nb_front_end_select  ,uint32_t         ,_nb_ooo_engine,_nb_rename_unit[it1]);
974    ALLOC2(_ooo_engine_nb_general_register                ,uint32_t         ,_nb_ooo_engine,_nb_rename_unit[it1]);
975    ALLOC2(_ooo_engine_nb_special_register                ,uint32_t         ,_nb_ooo_engine,_nb_rename_unit[it1]);
976    ALLOC2(_ooo_engine_nb_reg_free                        ,uint32_t         ,_nb_ooo_engine,_nb_rename_unit[it1]);
977    ALLOC2(_ooo_engine_nb_rename_unit_bank                ,uint32_t         ,_nb_ooo_engine,_nb_rename_unit[it1]);
978//     ALLOC2(_ooo_engine_size_read_counter                  ,uint32_t         ,_nb_ooo_engine,_nb_rename_unit[it1]);
979
980    for (uint32_t i=0; i<_nb_ooo_engine; ++i)
981      {
982        log_printf(TRACE,Core,FUNCTION,_("OOO_Engine [%d] - nb_rename_unit %d"),i,_nb_rename_unit[i]);
983        _ooo_engine_nb_inst_insert_rob [i] = 0;
984
985        for (uint32_t j=0; j<_nb_rename_unit[i]; ++j)
986          {
987            uint32_t num_rename_bloc = _link_rename_bloc_with_rename_unit [i][j];
988
989            log_printf(TRACE,Core,FUNCTION,_("  * [%d] - num_rename_bloc %d, nb_inst_insert %d"),j,num_rename_bloc,_nb_inst_insert[num_rename_bloc]);
990           
991            _ooo_engine_nb_inst_insert                    [i][j] = _nb_inst_insert                    [num_rename_bloc];
992            _ooo_engine_nb_inst_insert_rob                [i]   += _nb_inst_insert                    [num_rename_bloc];
993            _ooo_engine_nb_inst_retire                    [i][j] = _nb_inst_retire                    [num_rename_bloc];
994            _ooo_engine_rename_select_priority            [i][j] = _rename_select_priority            [num_rename_bloc];
995            _ooo_engine_rename_select_load_balancing      [i][j] = _rename_select_load_balancing      [num_rename_bloc];
996            _ooo_engine_rename_select_nb_front_end_select [i][j] = _rename_select_nb_front_end_select [num_rename_bloc];
997            _ooo_engine_nb_general_register               [i][j] = _nb_general_register               [num_rename_bloc];
998            _ooo_engine_nb_special_register               [i][j] = _nb_special_register               [num_rename_bloc];
999            _ooo_engine_nb_reg_free                       [i][j] = _nb_reg_free                       [num_rename_bloc];
1000            _ooo_engine_nb_rename_unit_bank               [i][j] = _nb_rename_unit_bank               [num_rename_bloc];
1001//             _ooo_engine_size_read_counter                 [i][j] = _size_read_counter                 [num_rename_bloc];
1002          }
1003      }
1004   
1005    ALLOC4(_network_table_dispatch                        ,bool             ,_nb_ooo_engine,_nb_inst_issue[it1],_nb_execute_loop,_nb_read_unit[it3]);
1006    ALLOC3(_ooo_engine_table_routing                      ,bool             ,_nb_ooo_engine,_nb_rename_unit[it1],_nb_inst_issue[it1]);
1007    ALLOC3(_ooo_engine_table_issue_type                   ,bool             ,_nb_ooo_engine,_nb_inst_issue[it1],_nb_type);
1008    ALLOC2(_list_functionnal_unit_with_rename_unit        ,std::vector<uint32_t>,_nb_ooo_engine,_nb_rename_unit[it1]);
1009    ALLOC2(_list_load_store_unit_with_rename_unit         ,std::vector<uint32_t>,_nb_ooo_engine,_nb_rename_unit[it1]);
1010
1011    for (uint32_t i=0; i<_nb_ooo_engine; ++i)
1012      {
1013        log_printf(TRACE,Core,FUNCTION,_(" * ooo_engine_table_issue_type [%d]"),i);
1014
1015
1016        // Init
1017        for (uint32_t j=0; j<_nb_inst_issue[i]; ++j)
1018          {
1019            for (uint32_t k=0; k<_nb_execute_loop; ++k)
1020              for (uint32_t l=0; l<_nb_read_unit[k]; ++l)
1021                _network_table_dispatch [i][j][k][l] = false;
1022            for (uint32_t k=0; k<_nb_rename_unit[i]; ++k)
1023              _ooo_engine_table_routing [i][k][j] = false;
1024            for (uint32_t k=0; k<_nb_type; ++k)
1025              _ooo_engine_table_issue_type [i][j][k] = false;
1026          }
1027
1028        std::vector<uint32_t> list_thread_with_inst_issue [_nb_inst_issue[i]];
1029       
1030        for (uint32_t j=0; j<_nb_inst_issue[i]; ++j)
1031          {
1032            for (uint32_t k=0; k<_nb_read_bloc; ++k)
1033              // Test if the issue slot is linked with the read_bloc
1034              if (_table_dispatch[i][j][k])
1035                {
1036                  pair_dual x = _link_read_unit_with_read_bloc[k];
1037                  _network_table_dispatch [i][j][x.first][x.second] = true;
1038
1039                  // Test functional unit connected with this read bloc
1040                  for (uint32_t l=0; l<_nb_functionnal_unit; ++l)
1041                    {
1042                      // the issue slot [j] is connected with the read bloc [k] and it's connected with the functionnal_unit [l]
1043                      if (_link_read_bloc_and_functionnal_unit [k][l])
1044                        {
1045                          // Scan timing table, test if have an instruction
1046                          for (uint32_t m=0; m<_nb_type; ++m)
1047                            for (uint32_t n=0; n<_nb_operation; ++n)
1048                              if (_timing[l][m][n]._latence > 0)
1049                                {
1050                                  log_printf(TRACE,Core,FUNCTION,_("   [%d][%d] -> true"),j,m);
1051                                 
1052                                  _ooo_engine_table_issue_type [i][j][m] = true;
1053                                  break;
1054                                }
1055                         
1056                          for (uint32_t m=0; m<_nb_thread; ++m)
1057                            {
1058                              list_thread_with_inst_issue [j].push_back(m);
1059                             
1060                              uint32_t num_front_end   = _link_context_with_thread [m].first;
1061                              uint32_t num_rename_bloc = _link_rename_bloc_with_front_end[num_front_end];
1062                              uint32_t num_rename_unit = _link_rename_unit_with_rename_bloc [num_rename_bloc].second;
1063                             
1064                              _list_functionnal_unit_with_rename_unit [i][num_rename_unit].push_back(l);
1065                            }
1066                        }
1067                    }
1068
1069                  // Test load store unit connected with this read bloc
1070                  for (uint32_t l=0; l<_nb_load_store_unit; ++l)
1071                    {
1072                      // Test load store unit connected with this read bloc
1073                      if (_link_read_bloc_and_load_store_unit [k][l])
1074                       {
1075                          _ooo_engine_table_issue_type [i][j][TYPE_MEMORY] = true;
1076//                        _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);
1077//                        _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);
1078//                        _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_LD )._type] |= (_timing[l][instruction_information(INSTRUCTION_L_LD )._type][instruction_information(INSTRUCTION_L_LD )._operation]._latence > 0);
1079//                        _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_LHS)._type] |= (_timing[l][instruction_information(INSTRUCTION_L_LHS)._type][instruction_information(INSTRUCTION_L_LHS)._operation]._latence > 0);
1080//                        _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_LHZ)._type] |= (_timing[l][instruction_information(INSTRUCTION_L_LHZ)._type][instruction_information(INSTRUCTION_L_LHZ)._operation]._latence > 0);
1081//                        _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_LWS)._type] |= (_timing[l][instruction_information(INSTRUCTION_L_LWS)._type][instruction_information(INSTRUCTION_L_LWS)._operation]._latence > 0);
1082//                        _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_LWZ)._type] |= (_timing[l][instruction_information(INSTRUCTION_L_LWZ)._type][instruction_information(INSTRUCTION_L_LWZ)._operation]._latence > 0);
1083//                        _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_SB )._type] |= (_timing[l][instruction_information(INSTRUCTION_L_SB )._type][instruction_information(INSTRUCTION_L_SB )._operation]._latence > 0);
1084//                        _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_SD )._type] |= (_timing[l][instruction_information(INSTRUCTION_L_SD )._type][instruction_information(INSTRUCTION_L_SD )._operation]._latence > 0);
1085//                        _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_SH )._type] |= (_timing[l][instruction_information(INSTRUCTION_L_SH )._type][instruction_information(INSTRUCTION_L_SH )._operation]._latence > 0);
1086//                        _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_SW )._type] |= (_timing[l][instruction_information(INSTRUCTION_L_SW )._type][instruction_information(INSTRUCTION_L_SW )._operation]._latence > 0);
1087
1088                          // the issue slot [j] is connected with the read bloc [k] and it's connected with the load_store_unit [l]
1089                          for (uint32_t m=0; m<_nb_thread; ++m)
1090                            {
1091                              list_thread_with_inst_issue [j].push_back(m);
1092                             
1093                              uint32_t num_front_end   = _link_context_with_thread [m].first;
1094                              uint32_t num_rename_bloc = _link_rename_bloc_with_front_end[num_front_end];
1095                              uint32_t num_rename_unit = _link_rename_unit_with_rename_bloc [num_rename_bloc].second;
1096                             
1097                              log_printf(TRACE,Core,FUNCTION,_("  * list_load_store_unit_with_rename_unit [%d][%d][%d] = %d"),i,num_rename_unit,_list_load_store_unit_with_rename_unit [i][num_rename_unit].size(),l);
1098
1099                              _list_load_store_unit_with_rename_unit [i][num_rename_unit].push_back(l);
1100                            }
1101                        }
1102                    }
1103                }
1104            // sort and erase duplicate value
1105            {
1106              sort  (list_thread_with_inst_issue [j].begin(),
1107                     list_thread_with_inst_issue [j].end());
1108              std::vector<uint32_t>::iterator it=unique(list_thread_with_inst_issue [j].begin(),
1109                                                        list_thread_with_inst_issue [j].end());
1110              list_thread_with_inst_issue [j].erase(it,list_thread_with_inst_issue [j].end());
1111            }
1112          }
1113
1114        log_printf(TRACE,Core,FUNCTION,_(" * ooo_engine_table_routing [%d]"),i);
1115        for (uint32_t j=0; j<_nb_rename_unit[i]; ++j)
1116          {
1117            // sort and erase duplicate value
1118            {
1119              sort  (_list_load_store_unit_with_rename_unit  [i][j].begin(),
1120                     _list_load_store_unit_with_rename_unit  [i][j].end());
1121              std::vector<uint32_t>::iterator it=unique(_list_load_store_unit_with_rename_unit  [i][j].begin(),
1122                                                        _list_load_store_unit_with_rename_unit  [i][j].end());
1123              _list_load_store_unit_with_rename_unit  [i][j].erase(it,_list_load_store_unit_with_rename_unit  [i][j].end());
1124            }
1125            {
1126              sort  (_list_functionnal_unit_with_rename_unit  [i][j].begin(),
1127                     _list_functionnal_unit_with_rename_unit  [i][j].end());
1128              std::vector<uint32_t>::iterator it=unique(_list_functionnal_unit_with_rename_unit  [i][j].begin(),
1129                                                        _list_functionnal_unit_with_rename_unit  [i][j].end());
1130              _list_functionnal_unit_with_rename_unit  [i][j].erase(it,_list_functionnal_unit_with_rename_unit  [i][j].end());
1131            }
1132
1133            uint32_t num_rename_bloc = _link_rename_bloc_with_rename_unit[i][j];
1134
1135            for (uint32_t k=0; k<_nb_front_end; ++k)
1136              // test if this front_end is connected with this rename_bloc
1137              if (_link_rename_bloc_with_front_end[k] == num_rename_bloc)
1138                // the front end is connected with rename_bloc. Now test all slot issue that it can accepted this front_end
1139                for (uint32_t l=0; l<_nb_inst_issue[i]; ++l)
1140                  for (std::vector<uint32_t>::iterator it = list_thread_with_inst_issue [l].begin();
1141                       it != list_thread_with_inst_issue [l].end();
1142                       ++it)
1143                    // Test if the this is in front_end [k]
1144                    if (_link_context_with_thread[*it].first == k)
1145                      {
1146                        _ooo_engine_table_routing [i][j][l] |= true;
1147                        log_printf(TRACE,Core,FUNCTION,_("   [%d][%d] -> true"),j,l);
1148                      }
1149          }
1150      }
1151   
1152    log_printf(TRACE,Core,FUNCTION,_("  * network_table_dispatch [nb_ooo_engine][nb_inst_issue][nb_execute_loop][nb_read_unit]"));
1153    for (uint32_t i=0; i<_nb_ooo_engine; ++i)
1154      for (uint32_t j=0; j<_nb_inst_issue[i]; ++j)
1155        for (uint32_t k=0; k<_nb_execute_loop; ++k)
1156          for (uint32_t l=0; l<_nb_read_unit[k]; ++l)
1157            if (_network_table_dispatch [i][j][k][l] == true)
1158              log_printf(TRACE,Core,FUNCTION,_("   Issue Slot [%d][%d] is connected with Read_unit [%d][%d]"),i,j,k,l);
1159
1160    ALLOC2(_ooo_engine_nb_load_store_unit                 ,uint32_t         ,_nb_ooo_engine,_nb_rename_unit[it1]);
1161
1162    log_printf(TRACE,Core,FUNCTION,_("  * ooo_engine_nb_load_store_unit [nb_ooo_engine][nb_rename_unit]"));
1163    for (uint32_t i=0; i<_nb_ooo_engine; ++i)
1164      for (uint32_t j=0; j<_nb_rename_unit[i]; ++j)
1165        {
1166          _ooo_engine_nb_load_store_unit [i][j] = _list_load_store_unit_with_rename_unit [i][j].size();
1167          log_printf(TRACE,Core,FUNCTION,_("    [%d][%d] = %d"),i,j,_ooo_engine_nb_load_store_unit [i][j]);
1168        }
1169
1170    ALLOC3(_ooo_engine_size_store_queue                   ,uint32_t         ,_nb_ooo_engine,_nb_rename_unit[it1],_ooo_engine_nb_load_store_unit[it1][it2]);
1171    ALLOC3(_ooo_engine_size_load_queue                    ,uint32_t         ,_nb_ooo_engine,_nb_rename_unit[it1],_ooo_engine_nb_load_store_unit[it1][it2]);
1172    ALLOC3(_ooo_engine_nb_inst_memory                     ,uint32_t         ,_nb_ooo_engine,_nb_rename_unit[it1],_ooo_engine_nb_load_store_unit[it1][it2]);
1173    ALLOC3(_ooo_engine_link_load_store_unit_with_context  ,uint32_t         ,_nb_ooo_engine,_ooo_engine_nb_front_end[it1],_ooo_engine_nb_context[it1][it2]);
1174   
1175    for (uint32_t i=0; i<_nb_ooo_engine; ++i)
1176      {
1177        for (uint32_t j=0; j<_nb_rename_unit[i]; ++j)
1178          for (uint32_t k=0; k<_list_load_store_unit_with_rename_unit [i][j].size(); ++k)
1179            {
1180              uint32_t num_load_store_unit = _list_load_store_unit_with_rename_unit[i][j][k];
1181             
1182              _ooo_engine_size_store_queue [i][j][k] = _size_store_queue[num_load_store_unit];
1183              _ooo_engine_size_load_queue  [i][j][k] = _size_load_queue [num_load_store_unit];
1184              _ooo_engine_nb_inst_memory   [i][j][k] = _nb_inst_memory  [num_load_store_unit];
1185            }
1186
1187        for (uint32_t j=0; j<_ooo_engine_nb_front_end[i]; ++j)
1188          {
1189            uint32_t num_front_end   = _translate_ooo_engine_num_front_end [i][j];
1190            uint32_t num_rename_bloc = _link_rename_bloc_with_front_end [num_front_end];
1191            uint32_t num_rename_unit = _link_rename_unit_with_rename_bloc [num_rename_bloc].second;
1192
1193            std::vector<uint32_t> list_lsq = _list_load_store_unit_with_rename_unit[i][num_rename_unit];
1194
1195            for (uint32_t k=0; k<_ooo_engine_nb_context[i][j]; ++k)
1196              {
1197                uint32_t num_thread          = _link_thread_with_context [num_front_end][k];
1198                uint32_t num_load_store_unit = _link_load_store_unit_with_thread [num_thread];
1199                uint32_t num_lsq;
1200
1201                // Find correspondence between load_store_unit and num_load_store_unit in rename_unit
1202                for (num_lsq=0; num_lsq<list_lsq.size(); ++num_lsq)
1203                  if (list_lsq[num_lsq] == num_load_store_unit)
1204                    break;
1205#ifdef DEBUG_TEST
1206                if (num_lsq == list_lsq.size())
1207                  throw ERRORMORPHEO(FUNCTION,_("Load Store Unit search failed."));
1208#endif
1209               
1210                _ooo_engine_link_load_store_unit_with_context [i][j][k] = num_lsq;
1211              }
1212          }
1213      }
1214
1215    ALLOC4(_ooo_engine_implement_group                    ,bool             ,_nb_ooo_engine,_ooo_engine_nb_front_end[it1],_ooo_engine_nb_context[it1][it2],NB_GROUP);
1216
1217    for (uint32_t i=0; i<_nb_ooo_engine; ++i)
1218      for (uint32_t j=0; j<_ooo_engine_nb_front_end[i]; ++j)
1219        {
1220          uint32_t num_front_end = _translate_ooo_engine_num_front_end [i][j];
1221         
1222          for (uint32_t k=0; k<_ooo_engine_nb_context[i][j]; ++k)
1223            {
1224              uint32_t num_thread    = _link_thread_with_context [num_front_end][k];
1225           
1226              for (uint32_t l=0; l<NB_GROUP; ++l)
1227                _ooo_engine_implement_group [i][j][k][l] = false;
1228             
1229              _ooo_engine_implement_group [i][j][k][GROUP_SYSTEM_AND_CONTROL ] = true ; // always implemented
1230              _ooo_engine_implement_group [i][j][k][GROUP_DMMU               ] = false; // not yet implemented
1231              _ooo_engine_implement_group [i][j][k][GROUP_IMMU               ] = false; // not yet implemented
1232              _ooo_engine_implement_group [i][j][k][GROUP_DCACHE             ] = _implement_group [num_thread][GROUP_DCACHE];
1233              _ooo_engine_implement_group [i][j][k][GROUP_ICACHE             ] = false; // not yet implemented
1234              _ooo_engine_implement_group [i][j][k][GROUP_MAC                ] = 
1235                (_front_end_instruction_implemeted [num_front_end][k][INSTRUCTION_L_MAC  ] or
1236                 _front_end_instruction_implemeted [num_front_end][k][INSTRUCTION_L_MACI ] or
1237                 _front_end_instruction_implemeted [num_front_end][k][INSTRUCTION_L_MACRC] or
1238                 _front_end_instruction_implemeted [num_front_end][k][INSTRUCTION_L_MSB  ] );
1239              _ooo_engine_implement_group [i][j][k][GROUP_DEBUG              ] = false; // not yet implemented
1240              _ooo_engine_implement_group [i][j][k][GROUP_PERFORMANCE_COUNTER] = false; // not yet implemented
1241              _ooo_engine_implement_group [i][j][k][GROUP_POWER_MANAGEMENT   ] = false; // not yet implemented
1242              _ooo_engine_implement_group [i][j][k][GROUP_PIC                ] = false; // not yet implemented
1243              _ooo_engine_implement_group [i][j][k][GROUP_TICK_TIMER         ] = false; // not yet implemented
1244              _ooo_engine_implement_group [i][j][k][GROUP_FLOATING_POINT     ] = false; // not yet implemented
1245              _ooo_engine_implement_group [i][j][k][GROUP_RESERVED_1         ] = false; // reserved
1246              _ooo_engine_implement_group [i][j][k][GROUP_RESERVED_2         ] = false; // reserved
1247              _ooo_engine_implement_group [i][j][k][GROUP_RESERVED_3         ] = false; // reserved
1248              _ooo_engine_implement_group [i][j][k][GROUP_RESERVED_4         ] = false; // reserved
1249              _ooo_engine_implement_group [i][j][k][GROUP_RESERVED_5         ] = false; // reserved
1250              _ooo_engine_implement_group [i][j][k][GROUP_RESERVED_6         ] = false; // reserved
1251              _ooo_engine_implement_group [i][j][k][GROUP_RESERVED_7         ] = false; // reserved
1252              _ooo_engine_implement_group [i][j][k][GROUP_RESERVED_8         ] = false; // reserved
1253              _ooo_engine_implement_group [i][j][k][GROUP_RESERVED_9         ] = false; // reserved
1254              _ooo_engine_implement_group [i][j][k][GROUP_RESERVED_10        ] = false; // reserved
1255              _ooo_engine_implement_group [i][j][k][GROUP_RESERVED_11        ] = false; // reserved
1256              _ooo_engine_implement_group [i][j][k][GROUP_RESERVED_12        ] = false; // reserved
1257             
1258              bool have_custom_unit = (_get_custom_information != NULL);
1259
1260              _ooo_engine_implement_group [i][j][k][GROUP_CUSTOM_1           ] = (have_custom_unit and _get_custom_information()._get_valid_group(GROUP_CUSTOM_1));
1261              _ooo_engine_implement_group [i][j][k][GROUP_CUSTOM_2           ] = (have_custom_unit and _get_custom_information()._get_valid_group(GROUP_CUSTOM_2));
1262              _ooo_engine_implement_group [i][j][k][GROUP_CUSTOM_3           ] = (have_custom_unit and _get_custom_information()._get_valid_group(GROUP_CUSTOM_3));
1263              _ooo_engine_implement_group [i][j][k][GROUP_CUSTOM_4           ] = (have_custom_unit and _get_custom_information()._get_valid_group(GROUP_CUSTOM_4));
1264              _ooo_engine_implement_group [i][j][k][GROUP_CUSTOM_5           ] = (have_custom_unit and _get_custom_information()._get_valid_group(GROUP_CUSTOM_5));
1265              _ooo_engine_implement_group [i][j][k][GROUP_CUSTOM_6           ] = (have_custom_unit and _get_custom_information()._get_valid_group(GROUP_CUSTOM_6));
1266              _ooo_engine_implement_group [i][j][k][GROUP_CUSTOM_7           ] = (have_custom_unit and _get_custom_information()._get_valid_group(GROUP_CUSTOM_7));
1267              _ooo_engine_implement_group [i][j][k][GROUP_CUSTOM_8           ] = (have_custom_unit and _get_custom_information()._get_valid_group(GROUP_CUSTOM_8));
1268            }
1269        }
1270
1271    ALLOC1(_execute_loop_nb_functionnal_unit                       ,uint32_t,_nb_execute_loop);
1272    ALLOC1(_execute_loop_nb_load_store_unit                        ,uint32_t,_nb_execute_loop);
1273
1274    for (uint32_t i=0; i<_nb_execute_loop; ++i)
1275      {
1276        _execute_loop_nb_functionnal_unit [i] = _list_functionnal_unit_with_execute_unit [i].size();
1277        _execute_loop_nb_load_store_unit  [i] = _list_load_store_unit_with_execute_unit  [i].size();
1278      }
1279   
1280    ALLOC1(_list_ooo_engine_with_execute_loop                      ,std::vector<uint32_t>,_nb_execute_loop);
1281    ALLOC1(_list_front_end_with_execute_loop                       ,std::vector<uint32_t>,_nb_execute_loop);
1282   
1283    for (uint32_t i=0; i<_nb_ooo_engine; ++i)
1284      {
1285        for (uint32_t j=0; j<_ooo_engine_nb_execute_loop[i]; ++j)
1286          {
1287            uint32_t num_execute_loop = _translate_ooo_engine_num_execute_loop [i][j];
1288           
1289            _list_ooo_engine_with_execute_loop [num_execute_loop].push_back(i);
1290   
1291            for (uint32_t k=0; k<_ooo_engine_nb_front_end[i]; ++k)
1292              {
1293                uint32_t num_front_end = _translate_ooo_engine_num_front_end [i][k];
1294               
1295                _list_front_end_with_execute_loop [num_execute_loop].push_back(num_front_end);
1296              }
1297          }
1298      }
1299   
1300    for (uint32_t i=0; i<_nb_execute_loop; ++i)
1301      {
1302        {
1303          sort  (_list_ooo_engine_with_execute_loop[i].begin(),
1304                 _list_ooo_engine_with_execute_loop[i].end());
1305          std::vector<uint32_t>::iterator it=unique(_list_ooo_engine_with_execute_loop[i].begin(),
1306                                                    _list_ooo_engine_with_execute_loop[i].end());
1307          _list_ooo_engine_with_execute_loop[i].erase(it,_list_ooo_engine_with_execute_loop[i].end());
1308        }
1309        {
1310          sort  (_list_front_end_with_execute_loop[i].begin(),
1311                 _list_front_end_with_execute_loop[i].end());
1312          std::vector<uint32_t>::iterator it=unique(_list_front_end_with_execute_loop[i].begin(),
1313                                                    _list_front_end_with_execute_loop[i].end());
1314          _list_front_end_with_execute_loop[i].erase(it,_list_front_end_with_execute_loop[i].end());
1315        }
1316      }
1317
1318
1319#if (DEBUG >= DEBUG_TRACE)
1320
1321    log_printf(TRACE,Core,FUNCTION,_("list_ooo_engine_with_execute_loop"));
1322    for (uint32_t i=0; i<_nb_execute_loop; ++i)
1323      for (uint32_t j=0; j<_list_ooo_engine_with_execute_loop[i].size(); ++j)
1324        log_printf(TRACE,Core,FUNCTION,_("   [%d][%d] -> %d"),i,j,_list_ooo_engine_with_execute_loop[i][j]);
1325   
1326    log_printf(TRACE,Core,FUNCTION,_("list_front_end_with_execute_loop"));
1327    for (uint32_t i=0; i<_nb_execute_loop; ++i)
1328      for (uint32_t j=0; j<_list_front_end_with_execute_loop[i].size(); ++j)
1329        log_printf(TRACE,Core,FUNCTION,_("   [%d][%d] -> %d"),i,j,_list_front_end_with_execute_loop[i][j]);
1330
1331#endif
1332
1333    ALLOC1(_execute_loop_nb_front_end                              ,uint32_t,_nb_execute_loop);
1334    ALLOC1(_execute_loop_nb_context                                ,uint32_t,_nb_execute_loop);
1335    ALLOC1(_execute_loop_nb_ooo_engine                             ,uint32_t,_nb_execute_loop);
1336    ALLOC1(_execute_loop_nb_packet                                 ,uint32_t,_nb_execute_loop);
1337    ALLOC1(_execute_loop_nb_thread                                 ,uint32_t,_nb_execute_loop);
1338   
1339    for (uint32_t i=0; i<_nb_execute_loop; ++i)
1340      {
1341        log_printf(TRACE,Core,FUNCTION,_("execute_loop [%d] information :"),i);
1342   
1343        _execute_loop_nb_ooo_engine [i] = _list_ooo_engine_with_execute_loop[i].size();
1344   
1345        log_printf(TRACE,Core,FUNCTION,_(" * execute_loop_nb_ooo_engine : %d"),_execute_loop_nb_ooo_engine [i]);
1346   
1347        uint32_t max_nb_front_end = 0;
1348        uint32_t max_nb_context   = 0;
1349        uint32_t max_size_rob     = 0;
1350   
1351        for (std::vector<uint32_t>::iterator it=_list_ooo_engine_with_execute_loop[i].begin();
1352             it!=_list_ooo_engine_with_execute_loop[i].end();
1353             ++it)
1354          {
1355            uint32_t num_ooo_engine = *it;
1356   
1357            max_size_rob     = std::max(max_size_rob,_size_re_order_buffer[num_ooo_engine]);
1358            max_nb_front_end = std::max(max_nb_front_end,_ooo_engine_nb_front_end[num_ooo_engine]);
1359   
1360            for (uint32_t j=0; j<_ooo_engine_nb_front_end[num_ooo_engine]; ++j)
1361              {
1362                uint32_t num_front_end = _translate_ooo_engine_num_front_end [num_ooo_engine][j];
1363   
1364                max_nb_context = std::max(max_nb_context,_nb_context[num_front_end]);
1365              }
1366          }
1367        _execute_loop_nb_front_end  [i] = max_nb_front_end;
1368        _execute_loop_nb_context    [i] = max_nb_context  ;
1369        _execute_loop_nb_packet     [i] = max_size_rob    ;
1370   
1371        log_printf(TRACE,Core,FUNCTION,_(" * execute_loop_nb_front_end  : %d"),_execute_loop_nb_front_end  [i]);
1372        log_printf(TRACE,Core,FUNCTION,_(" * execute_loop_nb_context    : %d"),_execute_loop_nb_context    [i]);
1373        log_printf(TRACE,Core,FUNCTION,_(" * execute_loop_nb_packet     : %d"),_execute_loop_nb_packet     [i]);
1374   
1375        _execute_loop_nb_thread     [i] = get_nb_thread(_execute_loop_nb_context    [i],
1376                                                        _execute_loop_nb_front_end  [i],
1377                                                        _execute_loop_nb_ooo_engine [i]);
1378   
1379        log_printf(TRACE,Core,FUNCTION,_(" * execute_loop_nb_thread     : %d"),_execute_loop_nb_thread     [i]);
1380      }
1381   
1382    ALLOC2(_translate_execute_loop_num_ooo_engine                  ,uint32_t,_nb_execute_loop,_execute_loop_nb_ooo_engine[it1]);
1383    for (uint32_t i=0; i<_nb_execute_loop; ++i)
1384      for (uint32_t j=0; j<_execute_loop_nb_ooo_engine[i]; ++j)
1385        {
1386          _translate_execute_loop_num_ooo_engine [i][j] = _list_ooo_engine_with_execute_loop[i][j];
1387        } 
1388   
1389    ALLOC2(_execute_loop_size_read_queue                           ,uint32_t,_nb_execute_loop,_nb_read_unit[it1]);
1390    ALLOC2(_execute_loop_size_reservation_station                  ,uint32_t,_nb_execute_loop,_nb_read_unit[it1]);
1391    ALLOC2(_execute_loop_nb_inst_retire                            ,uint32_t,_nb_execute_loop,_nb_read_unit[it1]);
1392   
1393    log_printf(TRACE,Core,FUNCTION,_(" * execute_loop - Read_unit"));
1394    for (uint32_t i=0; i<_nb_execute_loop; ++i)
1395      {
1396        log_printf(TRACE,Core,FUNCTION,_("   * [%d] nb_read_unit : %d"),i,_nb_read_unit[i]);
1397       
1398        for (uint32_t j=0; j<_nb_read_unit[i]; ++j)
1399          {
1400            uint32_t num_read_bloc = _link_read_bloc_with_read_unit [i][j];
1401
1402            log_printf(TRACE,Core,FUNCTION,_("     * num_read_bloc : %d"),num_read_bloc);
1403           
1404            _execute_loop_size_read_queue          [i][j] = _size_read_queue          [num_read_bloc];
1405            _execute_loop_size_reservation_station [i][j] = _size_reservation_station [num_read_bloc];
1406            _execute_loop_nb_inst_retire           [i][j] = _nb_inst_retire_reservation_station [num_read_bloc];
1407          }
1408      }
1409
1410    ALLOC2(_execute_loop_nb_inst_functionnal_unit                  ,uint32_t,_nb_execute_loop,_execute_loop_nb_functionnal_unit[it1]);
1411    ALLOC4(_execute_loop_timing                                    ,multi_execute_loop::execute_loop::execute_timing_t
1412                                                                            ,_nb_execute_loop,_execute_loop_nb_functionnal_unit[it1],_nb_type,_nb_operation);
1413    ALLOC2(_execute_loop_is_load_store_unit                        ,bool    ,_nb_execute_loop,_nb_execute_unit[it1]);
1414    ALLOC2(_execute_loop_translate_num_execute_unit                ,uint32_t,_nb_execute_loop,_nb_execute_unit[it1]);
1415   
1416//     for (uint32_t i=0; i<_nb_execute_loop; ++i)
1417//       {
1418//         for (uint32_t j=0; j<_nb_execute_unit [i]; ++j)
1419//           {
1420//             _execute_loop_is_load_store_unit         [i][j] = false;
1421//             _execute_loop_translate_num_execute_unit [i][j] = 0;
1422//           }
1423//         for (uint32_t j=0; j<_execute_loop_nb_functionnal_unit[i]; ++j)
1424//           for (uint32_t k=0; k<_nb_type; ++k)
1425//             for (uint32_t l=0; l<_nb_operation; ++l)
1426//               _execute_loop_timing [i][j][k][l]._delay = _execute_loop_timing [i][j][k][l]._latence = 0;
1427//       }
1428
1429    for (uint32_t i=0; i<_nb_execute_loop; ++i)
1430      {
1431        uint32_t num_lsu = 0;
1432        uint32_t num_fu  = 0;
1433        for (uint32_t j=0; j<_nb_execute_unit[i]; ++j)
1434          {
1435            uint32_t num_functionnal_unit = _link_functionnal_unit_with_execute_unit [i][j];
1436            uint32_t num_load_store_unit  = _link_load_store_unit_with_execute_unit  [i][j];
1437           
1438            bool is_lsu = (num_load_store_unit != _nb_load_store_unit);
1439           
1440            _execute_loop_is_load_store_unit [i][j] = is_lsu;
1441           
1442            if (is_lsu)
1443              {
1444                // update translation
1445                _execute_loop_translate_num_execute_unit [i][j] = num_lsu;
1446                num_lsu ++;
1447              }
1448            else
1449              {
1450                // update translation
1451                _execute_loop_translate_num_execute_unit [i][j] = num_fu;
1452
1453                // timing information
1454                _execute_loop_nb_inst_functionnal_unit [i][num_fu] = _nb_inst_functionnal_unit [num_functionnal_unit];
1455               
1456                log_printf(TRACE,Core,FUNCTION,"  * _execute_loop_nb_inst_functionnal_unit [%d][%d] = _nb_inst_functionnal_unit [%d] = %d",i,num_fu,num_functionnal_unit,_nb_inst_functionnal_unit [num_functionnal_unit]);
1457
1458                for (uint32_t k=0; k<_nb_type; ++k)
1459                  for (uint32_t l=0; l<_nb_operation; ++l)
1460                    {
1461//                       log_printf(TRACE,Core,FUNCTION,_("execute_loop_timing [%d][%d][%d][%d] = timing [%d][%d][%d]"),i,num_fu,k,l,num_functionnal_unit,k,l);
1462                      _execute_loop_timing [i][num_fu][k][l] = _timing [num_functionnal_unit][k][l];
1463                    }
1464               
1465//               // is not a load store unit
1466//               for (uint32_t k=0; k<_nb_operation; ++k)
1467//                 _execute_loop_timing [i][j][TYPE_MEMORY][k]._delay = _execute_loop_timing [i][j][TYPE_MEMORY][k]._latence = 0;
1468
1469                num_fu ++;
1470              }
1471          }
1472      }
1473   
1474    ALLOC2(_execute_loop_size_store_queue                          ,uint32_t,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]);
1475    ALLOC2(_execute_loop_size_load_queue                           ,uint32_t,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]);
1476    ALLOC2(_execute_loop_size_speculative_access_queue             ,uint32_t,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]);
1477    ALLOC2(_execute_loop_nb_port_check                             ,uint32_t,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]);
1478    ALLOC2(_execute_loop_speculative_load                          ,multi_execute_loop::execute_loop::Tspeculative_load_t
1479                                                                            ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]);
1480    ALLOC2(_execute_loop_nb_bypass_memory                          ,uint32_t,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]);
1481    ALLOC2(_execute_loop_nb_cache_port                             ,uint32_t,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]);
1482    ALLOC2(_execute_loop_nb_inst_memory                            ,uint32_t,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]);
1483   
1484    for (uint32_t i=0; i<_nb_execute_loop; ++i)
1485      for (uint32_t j=0; j<_execute_loop_nb_load_store_unit[i]; ++j)
1486        {
1487          uint32_t num_load_store_unit = _list_load_store_unit_with_execute_unit [i][j];
1488   
1489          log_printf(TRACE,Core,FUNCTION,_(" * execute_loop_nb_load_store_unit [%d][%d] : %d"),i,j,num_load_store_unit);
1490          log_printf(TRACE,Core,FUNCTION,_("   * nb_bypass_memory : %d"),_nb_bypass_memory[num_load_store_unit]);
1491
1492          _execute_loop_size_store_queue              [i][j] = _size_store_queue              [num_load_store_unit];
1493          _execute_loop_size_load_queue               [i][j] = _size_load_queue               [num_load_store_unit];
1494          _execute_loop_size_speculative_access_queue [i][j] = _size_speculative_access_queue [num_load_store_unit];
1495          _execute_loop_nb_port_check                 [i][j] = _nb_port_check                 [num_load_store_unit];
1496          _execute_loop_speculative_load              [i][j] = _speculative_load              [num_load_store_unit];
1497          _execute_loop_nb_bypass_memory              [i][j] = _nb_bypass_memory              [num_load_store_unit];
1498          _execute_loop_nb_cache_port                 [i][j] = _nb_cache_port                 [num_load_store_unit];
1499          _execute_loop_nb_inst_memory                [i][j] = _nb_inst_memory                [num_load_store_unit];
1500        }
1501
1502    ALLOC2(_execute_loop_size_write_queue                          ,uint32_t,_nb_execute_loop,_nb_write_unit[it1]);
1503    ALLOC2(_execute_loop_size_execute_queue                        ,uint32_t,_nb_execute_loop,_nb_write_unit[it1]);
1504    ALLOC2(_execute_loop_nb_bypass_write                           ,uint32_t,_nb_execute_loop,_nb_write_unit[it1]);
1505    ALLOC2(_execute_loop_write_queue_scheme                        ,multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Twrite_queue_scheme_t,_nb_execute_loop,_nb_write_unit[it1]);
1506   
1507    for (uint32_t i=0; i<_nb_execute_loop; ++i)
1508      for (uint32_t j=0; j<_nb_write_unit[i]; ++j)
1509        {
1510          uint32_t num_write_bloc = _link_write_bloc_with_write_unit [i][j];
1511   
1512          _execute_loop_size_write_queue   [i][j] = _size_write_queue   [num_write_bloc];
1513          _execute_loop_size_execute_queue [i][j] = _size_execute_queue [num_write_bloc];
1514          _execute_loop_nb_bypass_write    [i][j] = _nb_bypass_write    [num_write_bloc];
1515          _execute_loop_write_queue_scheme [i][j] = _write_queue_scheme [num_write_bloc];
1516        }
1517   
1518    ALLOC2(_execute_loop_nb_general_register                       ,uint32_t,_nb_execute_loop,_execute_loop_nb_ooo_engine[it1]);
1519    ALLOC2(_execute_loop_nb_special_register                       ,uint32_t,_nb_execute_loop,_execute_loop_nb_ooo_engine[it1]);
1520    ALLOC2(_execute_loop_nb_inst_insert_rob                        ,uint32_t,_nb_execute_loop,_execute_loop_nb_ooo_engine[it1]);
1521    ALLOC2(_execute_loop_nb_inst_retire_rob                        ,uint32_t,_nb_execute_loop,_execute_loop_nb_ooo_engine[it1]);
1522   
1523    for (uint32_t i=0; i<_nb_execute_loop; ++i)
1524      for (uint32_t j=0; j<_execute_loop_nb_ooo_engine[i]; ++j)
1525        {
1526          uint32_t num_ooo_engine = _list_ooo_engine_with_execute_loop[i][j];
1527   
1528          // sum number of general register
1529          uint32_t gpr_reg = *std::max_element(_ooo_engine_nb_general_register[num_ooo_engine],
1530                                               _ooo_engine_nb_general_register[num_ooo_engine]+_nb_rename_unit[num_ooo_engine]);
1531   
1532          gpr_reg *= _nb_rename_unit[num_ooo_engine]; 
1533   
1534          _execute_loop_nb_general_register [i][j] = gpr_reg;
1535   
1536          // sum number of special register
1537          uint32_t spr_reg = *std::max_element(_ooo_engine_nb_special_register[num_ooo_engine],
1538                                               _ooo_engine_nb_special_register[num_ooo_engine]+_nb_rename_unit[num_ooo_engine]);
1539   
1540          spr_reg *= _nb_rename_unit[num_ooo_engine]; 
1541   
1542          _execute_loop_nb_special_register [i][j] = spr_reg;
1543   
1544   
1545          uint32_t insert = 0;
1546          uint32_t retire = 0;
1547         
1548          for (uint32_t k=0; k<_nb_rename_unit[num_ooo_engine]; ++k)
1549            {
1550              insert = _ooo_engine_nb_inst_insert [num_ooo_engine][k];
1551              retire = _ooo_engine_nb_inst_retire [num_ooo_engine][k];
1552            }
1553         
1554          _execute_loop_nb_inst_insert_rob  [i][j] = insert;
1555          _execute_loop_nb_inst_retire_rob  [i][j] = retire;
1556        }
1557   
1558    ALLOC2(_execute_loop_nb_execute_unit_port                      ,uint32_t,_nb_execute_loop,_nb_execute_unit[it1]);
1559   
1560    for (uint32_t i=0; i<_nb_execute_loop; ++i)
1561      for (uint32_t j=0; j<_nb_execute_unit[i]; ++j)
1562        {
1563          uint32_t num_functionnal_unit = _link_functionnal_unit_with_execute_unit [i][j];
1564          uint32_t num_load_store_unit  = _link_load_store_unit_with_execute_unit  [i][j];
1565   
1566          if (num_functionnal_unit != _nb_functionnal_unit)
1567            _execute_loop_nb_execute_unit_port [i][j] = _nb_inst_functionnal_unit [num_functionnal_unit];
1568          else
1569            {
1570              _execute_loop_nb_execute_unit_port [i][j] = _nb_inst_memory [num_load_store_unit];
1571
1572#ifdef DEBUG_TEST
1573              if (num_load_store_unit == _nb_load_store_unit)
1574                throw ERRORMORPHEO(FUNCTION,_("execute_unit is not a functional unit and load store unit."));
1575#endif
1576            }
1577        }
1578   
1579    ALLOC4(_execute_loop_read_unit_to_execution_unit_table_routing ,bool    ,_nb_execute_loop,_nb_read_unit[it1],_nb_execute_unit[it1],_execute_loop_nb_execute_unit_port[it1][it2]);
1580   
1581    log_printf(TRACE,Core,FUNCTION,_("execute_loop_read_unit_to_execution_unit_table_routing [execute_loop][read_unit][execute_unit][execute_unit_port]"));
1582    for (uint32_t i=0; i<_nb_execute_loop; ++i)
1583      for (uint32_t j=0; j<_nb_execute_unit[i]; ++j)
1584        {
1585          uint32_t num_functionnal_unit = _link_functionnal_unit_with_execute_unit [i][j];
1586          uint32_t num_load_store_unit  = _link_load_store_unit_with_execute_unit  [i][j];
1587         
1588          bool is_lsu = (num_load_store_unit != _nb_load_store_unit);
1589         
1590          for (uint32_t l=0; l<_nb_read_unit[i];++l)
1591            {
1592              uint32_t num_read_bloc = _link_read_bloc_with_read_unit [i][l];
1593              bool link = false;
1594             
1595              if (is_lsu)
1596                link = _link_read_bloc_and_load_store_unit  [num_read_bloc][num_load_store_unit];
1597              else
1598                link = _link_read_bloc_and_functionnal_unit [num_read_bloc][num_functionnal_unit];
1599             
1600              log_printf(TRACE,Core,FUNCTION,_("   [%d][%d][%d][all (%d)] -> %d"),i,l,j,_execute_loop_nb_execute_unit_port [i][j],link);
1601             
1602              for (uint32_t k=0; k<_execute_loop_nb_execute_unit_port [i][j]; ++k)
1603                _execute_loop_read_unit_to_execution_unit_table_routing [i][l][j][k] = link;
1604            }
1605        }
1606   
1607    ALLOC4(_execute_loop_execution_unit_to_write_unit_table_routing,bool    ,_nb_execute_loop,_nb_execute_unit[it1],_execute_loop_nb_execute_unit_port[it1][it2],_nb_write_unit[it1]);
1608   
1609    log_printf(TRACE,Core,FUNCTION,_("execute_loop_execution_unit_to_write_unit_table_routing [execute_loop][execute_unit][execute_unit_port][write_unit]"));
1610
1611    for (uint32_t i=0; i<_nb_execute_loop; ++i)
1612      for (uint32_t j=0; j<_nb_execute_unit[i]; ++j)
1613        {
1614          uint32_t num_functionnal_unit = _link_functionnal_unit_with_execute_unit [i][j];
1615          uint32_t num_load_store_unit  = _link_load_store_unit_with_execute_unit  [i][j];
1616         
1617          bool is_lsu = (num_load_store_unit != _nb_load_store_unit);
1618         
1619          for (uint32_t l=0; l<_nb_write_unit[i];++l)
1620            {
1621              uint32_t num_write_bloc = _link_write_bloc_with_write_unit [i][l];
1622              bool link = false;
1623             
1624              if (is_lsu)
1625                link = _link_write_bloc_and_load_store_unit  [num_write_bloc][num_load_store_unit];
1626              else
1627                link = _link_write_bloc_and_functionnal_unit [num_write_bloc][num_functionnal_unit];
1628             
1629              log_printf(TRACE,Core,FUNCTION,_("   [%d][%d][all (%d)][%d] -> %d"),i,j,_execute_loop_nb_execute_unit_port [i][j],l,link);
1630             
1631              for (uint32_t k=0; k<_execute_loop_nb_execute_unit_port [i][j]; ++k)
1632                _execute_loop_execution_unit_to_write_unit_table_routing [i][j][k][l] = link;
1633            }
1634        }
1635   
1636    ALLOC3(_execute_loop_read_unit_to_execution_unit_table_thread  ,bool    ,_nb_execute_loop,_nb_execute_unit[it1],_execute_loop_nb_thread[it1]);
1637    ALLOC3(_execute_loop_execution_unit_to_write_unit_table_thread ,bool    ,_nb_execute_loop,_nb_write_unit[it1],_execute_loop_nb_thread [it1]);
1638   
1639    log_printf(TRACE,Core,FUNCTION,_("execute_loop_read_unit_to_execution_unit_table_thread"));
1640    for (uint32_t i=0; i<_nb_execute_loop; ++i)
1641      {
1642        for (uint32_t k=0; k<_execute_loop_nb_thread[i]; ++k)
1643          {
1644            for (uint32_t j=0; j<_nb_execute_unit[i]; ++j)
1645              _execute_loop_read_unit_to_execution_unit_table_thread  [i][j][k] = false;
1646            for (uint32_t j=0; j<_nb_write_unit[i]; ++j)
1647              _execute_loop_execution_unit_to_write_unit_table_thread [i][j][k] = false;
1648          }
1649   
1650        for (uint32_t j=0; j<_nb_execute_unit[i]; ++j)
1651          {
1652            uint32_t num_functionnal_unit = _link_functionnal_unit_with_execute_unit [i][j];
1653            uint32_t num_load_store_unit  = _link_load_store_unit_with_execute_unit  [i][j];
1654           
1655            bool is_lsu = (num_load_store_unit != _nb_load_store_unit);
1656       
1657            // Test this execute_unit
1658            for (uint32_t k=0; k<_nb_thread; ++k)
1659              {
1660                // Have a link ?
1661                bool have_link = (is_lsu)?(_link_load_store_unit_with_thread [k] == num_load_store_unit):(_link_thread_and_functionnal_unit [k][num_functionnal_unit]);
1662               
1663                if (have_link)
1664                    {
1665                      uint32_t num_thread = execute_loop_get_num_thread (i,k);
1666                      _execute_loop_read_unit_to_execution_unit_table_thread [i][j][num_thread] = true;
1667                      log_printf(TRACE,Core,FUNCTION,_("   [%d][%d][%d] -> Ok"),i,j,num_thread);
1668             
1669                    }
1670              }
1671   
1672            for (uint32_t k=0; k<_nb_write_unit[i]; ++k)
1673              {
1674                uint32_t num_write_bloc = _link_write_bloc_with_write_unit[i][k];
1675                bool     have_link = (is_lsu)?(_link_write_bloc_and_load_store_unit [num_write_bloc][num_load_store_unit]):(_link_write_bloc_and_functionnal_unit [num_write_bloc][num_functionnal_unit]);
1676                 
1677                if (have_link)
1678                  for (uint32_t l=0; l<_execute_loop_nb_thread [i]; ++l)
1679                    _execute_loop_execution_unit_to_write_unit_table_thread [i][k][l] |= _execute_loop_read_unit_to_execution_unit_table_thread  [i][j][l];
1680              }
1681          }
1682      }
1683   
1684    ALLOC2(_icache_access_size_packet_id,uint32_t,_nb_front_end,_nb_context[it1]);
1685    ALLOC2(_icache_access_table_routing ,uint32_t,_nb_front_end,_nb_context[it1]);
1686   
1687    for (uint32_t i=0; i<_nb_front_end; ++i)
1688      for (uint32_t j=0; j<_nb_context[i]; ++j)
1689        {
1690          uint32_t num_thread = _link_thread_with_context [i][j];
1691         
1692          _icache_access_size_packet_id [i][j] = log2(_front_end_size_ifetch_queue[i][j]);
1693          _icache_access_table_routing  [i][j] = _link_icache_port_with_thread [num_thread];
1694        }
1695   
1696    ALLOC1(_icache_nb_instruction     ,uint32_t,_nb_icache_port);
1697   
1698    for (uint32_t i=0; i<_nb_icache_port; ++i)
1699      _icache_nb_instruction [i] = 0;
1700    for (uint32_t i=0; i<_nb_front_end; i++)
1701      for (uint32_t j=0; j<_nb_context[i]; j++)
1702        {
1703          uint32_t port = _icache_access_table_routing [i][j];
1704         
1705          // Take the greater
1706          if (_icache_nb_instruction[port] < _front_end_nb_inst_fetch [i][j])
1707            _icache_nb_instruction[port] = _front_end_nb_inst_fetch [i][j];
1708        }
1709 
1710    ALLOC2(_dcache_access_size_thread_id,uint32_t,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]);
1711    ALLOC2(_dcache_access_size_packet_id,uint32_t,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]);
1712    ALLOC3(_dcache_access_table_routing ,uint32_t,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1],_execute_loop_nb_cache_port[it1][it2]);
1713   
1714   
1715    for (uint32_t i=0; i<_nb_execute_loop; ++i)
1716      for (uint32_t j=0; j<_execute_loop_nb_load_store_unit[i]; ++j)
1717        {
1718          uint32_t num_load_store_unit = _list_load_store_unit_with_execute_unit [i][j];
1719   
1720          for (uint32_t k=0; k<_execute_loop_nb_cache_port [i][j]; ++k)
1721            _dcache_access_table_routing [i][j][k] = _link_dcache_port_with_load_store_unit [num_load_store_unit][k];
1722   
1723          _dcache_access_size_thread_id [i][j] =  (log2(_execute_loop_nb_context    [i]) +
1724                                                   log2(_execute_loop_nb_front_end  [i]) +
1725                                                   log2(_execute_loop_nb_ooo_engine [i]));
1726   
1727          // max size +1 (+1 to add a bit to select the queue)
1728          _dcache_access_size_packet_id [i][j] = log2(std::max(_size_store_queue[num_load_store_unit],
1729                                                               _size_load_queue [num_load_store_unit]))+1;
1730        }
1731
1732    ALLOC1(_dcache_access_nb_context                         ,uint32_t,_nb_execute_loop);
1733
1734    for (uint32_t i=0; i<_nb_execute_loop; ++i)
1735      _dcache_access_nb_context [i] = 1<<max<uint32_t>(_dcache_access_size_thread_id [i],_execute_loop_nb_load_store_unit[i]);
1736
1737    ALLOC3(_dcache_access_translate_load_store_unit_to_thread,uint32_t,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1],_dcache_access_nb_context[it1]);
1738
1739    // parameters depends
1740    _size_context_id                       = log2(max<uint32_t>(_nb_context,_nb_front_end));
1741    _size_front_end_id                     = log2(_nb_front_end);
1742
1743    for (uint32_t i=0; i<_nb_execute_loop; ++i)
1744      for (uint32_t j=0; j<_execute_loop_nb_load_store_unit[i]; ++j)
1745        {
1746          uint32_t num_load_store_unit = _list_load_store_unit_with_execute_unit [i][j];
1747         
1748          uint32_t num_thread;
1749          for (num_thread = 0; num_thread<_nb_thread; ++num_thread)
1750            if (_link_load_store_unit_with_thread [num_thread] == num_load_store_unit)
1751              break;
1752         
1753#ifdef DEBUG_TEST
1754          if (num_thread == _nb_thread)
1755            throw ERRORMORPHEO(FUNCTION,toString(_("Load_store_unit [%d] is not link with a thread.\n"),num_load_store_unit));
1756#endif
1757          // init with an invalid thread_id
1758          for (uint32_t k=0; k<_dcache_access_nb_context [i]; ++k)
1759            _dcache_access_translate_load_store_unit_to_thread [i][j][k] = _nb_thread;
1760         
1761          // cf Load_store_unit : create thread_id
1762          // dcache_req_context_id = ((ooo_engine_id<<(_param->_size_context_id + _param->_size_front_end_id )) |
1763          //                          (front_end_id <<(_param->_size_context_id)) |
1764          //                          (context_id));
1765         
1766          for (std::vector<uint32_t>::iterator it=_list_ooo_engine_with_execute_loop[i].begin();
1767               it!=_list_ooo_engine_with_execute_loop[i].end();
1768               ++it)
1769            {
1770              uint32_t num_ooo_engine = *it;
1771              for (uint32_t x=0; x<_ooo_engine_nb_front_end[num_ooo_engine]; ++x)
1772                {
1773                  uint32_t num_front_end = _translate_ooo_engine_num_front_end [num_ooo_engine][x];
1774                 
1775                  for (uint32_t num_context = 0; num_context < _nb_context[num_front_end]; ++num_context)
1776                    {
1777                      uint32_t num_thread = _link_thread_with_context [num_front_end][num_context];
1778                     
1779                      uint32_t index = ((num_ooo_engine<<(_size_context_id + _size_front_end_id )) |
1780                                        (num_front_end <<(_size_context_id)) |
1781                                        (num_context));
1782                     
1783                      _dcache_access_translate_load_store_unit_to_thread [i][j][index] = num_thread;
1784                    }
1785                }
1786            }
1787        }
1788
1789    // parameters depends
1790    _size_ooo_engine_id                    = log2(_nb_ooo_engine);
1791    _size_instruction_address              = size_general_data-2;
1792    _size_data_address                     = size_general_data;
1793    _size_nb_inst_decod                    = log2(max<uint32_t>(_size_decod_queue,_nb_decod_bloc    ))+1;
1794    _size_nb_inst_commit                   = log2(max<uint32_t>(_size_re_order_buffer,_nb_ooo_engine))+1;
1795    _size_depth                            = log2(max<uint32_t>(_upt_size_queue,_nb_thread));
1796    _size_ifetch_queue_ptr                 = log2(max<uint32_t>(_size_ifetch_queue,_nb_thread));
1797    _size_inst_ifetch_ptr                  = log2(max<uint32_t>(_nb_inst_fetch,_nb_thread));
1798    _size_rob_ptr                          = _size_nb_inst_commit; // nb_rob_bank must be a multiple of size_rob
1799    _size_load_queue_ptr                   = log2(max<uint32_t>(_size_load_queue ,_nb_load_store_unit));
1800    _size_store_queue_ptr                  = log2(max<uint32_t>(_size_store_queue,_nb_load_store_unit));
1801    _size_general_data                     = size_general_data;
1802    _size_special_data                     = size_special_data;
1803    _size_general_register                 = log2(max<uint32_t>(_nb_general_register,_nb_rename_bloc));
1804    _size_special_register                 = log2(max<uint32_t>(_nb_special_register,_nb_rename_bloc));
1805   
1806    _have_port_context_id                  = _size_context_id       > 0;
1807    _have_port_front_end_id                = _size_front_end_id     > 0;
1808    _have_port_ooo_engine_id               = _size_ooo_engine_id    > 0;
1809    _have_port_depth                       = _size_depth            > 0;
1810    _have_port_ifetch_queue_ptr            = _size_ifetch_queue_ptr > 0;
1811    _have_port_inst_ifetch_ptr             = _size_inst_ifetch_ptr  > 0;
1812    _have_port_rob_ptr                     = _size_rob_ptr          > 0;
1813    _have_port_load_queue_ptr              = _size_load_queue_ptr   > 0;
1814
1815    // interface parameters
1816    _size_icache_thread_id                 = log2(_nb_thread);
1817//  _size_icache_thread_id                 = log2(_nb_front_end) + log2(max<uint32_t>(_nb_context,_nb_front_end));
1818    _size_icache_packet_id                 = _size_ifetch_queue_ptr; 
1819//  _size_icache_packet_id                 = max<uint32_t>(_icache_access_size_packet_id,_nb_front_end, _nb_context);
1820    _size_icache_address                   = _size_instruction_address;
1821    _have_port_icache_thread_id            = _size_icache_thread_id > 0;
1822    _have_port_icache_packet_id            = _size_icache_packet_id > 0;
1823    _size_dcache_thread_id                 = _size_icache_thread_id;
1824//  _size_dcache_thread_id                 = (log2(_nb_execute_loop) +
1825//                                            log2(max<uint32_t>(_execute_loop_nb_load_store_unit, _nb_execute_loop)) +
1826//                                            log2(max<uint32_t>(_execute_loop_nb_cache_port, _nb_execute_loop, _execute_loop_nb_load_store_unit)) +
1827//                                            max<uint32_t>(_dcache_access_size_packet_id    , _nb_execute_loop, _execute_loop_nb_load_store_unit));
1828    _size_dcache_packet_id                 = max<uint32_t>(_dcache_access_size_packet_id, _nb_execute_loop, _execute_loop_nb_load_store_unit);
1829    _size_dcache_address                   = _size_data_address;
1830    _size_dcache_data                      = _size_general_data;
1831                                           
1832    _have_port_dcache_thread_id            = _size_dcache_thread_id > 0;
1833    _have_port_dcache_packet_id            = _size_dcache_packet_id > 0; // always 1
1834
1835
1836    _param_front_end = new core::multi_front_end::front_end::Parameters * [_nb_front_end];
1837
1838    for (uint32_t i=0; i<_nb_front_end; ++i)
1839      _param_front_end [i]= new core::multi_front_end::front_end::Parameters
1840       (
1841        _nb_context                             [i],
1842        _nb_decod_unit                          [i],
1843        _size_general_data                         ,
1844        _get_custom_information                    ,
1845        _front_end_size_ifetch_queue            [i],
1846        _front_end_nb_inst_fetch                [i],
1847        _front_end_instruction_implemeted       [i],
1848        _front_end_link_decod_unit_with_context [i],
1849        _front_end_size_decod_queue             [i],
1850        _front_end_decod_queue_scheme           [i],
1851        _front_end_nb_inst_decod                [i],
1852        _front_end_nb_context_select            [i],
1853        _front_end_context_select_priority      [i],
1854        _front_end_context_select_load_balancing[i],
1855        _nb_inst_branch_predict                 [i],
1856        _nb_inst_branch_decod                   [i],
1857        _nb_inst_branch_update                  [i],
1858        _front_end_nb_inst_branch_complete      [i],
1859        _btb_size_queue                         [i],
1860        _btb_associativity                      [i],
1861        _btb_size_counter                       [i],
1862        _btb_victim_scheme                      [i],
1863        _dir_predictor_scheme                   [i],
1864        _dir_have_bht                           [i],
1865        _dir_bht_size_shifter                   [i],
1866        _dir_bht_nb_shifter                     [i],
1867        _dir_have_pht                           [i],
1868        _dir_pht_size_counter                   [i],
1869        _dir_pht_nb_counter                     [i],
1870        _dir_pht_size_address_share             [i],
1871        _front_end_ras_size_queue               [i],
1872        _front_end_upt_size_queue               [i],
1873        _front_end_ufpt_size_queue              [i],
1874        _size_nb_inst_commit                       ,
1875        _nb_thread                                 ,
1876        _link_thread_with_context               [i]
1877        );
1878
1879    _param_ooo_engine = new core::multi_ooo_engine::ooo_engine::Parameters * [_nb_ooo_engine];
1880
1881    for (uint32_t i=0; i<_nb_ooo_engine; ++i)
1882    _param_ooo_engine [i] = new core::multi_ooo_engine::ooo_engine::Parameters
1883      (
1884       _ooo_engine_nb_front_end                      [i],
1885       _ooo_engine_nb_context                        [i],
1886       _nb_rename_unit                               [i],
1887       _ooo_engine_nb_execute_loop                   [i],
1888       _ooo_engine_nb_inst_decod                     [i],
1889       _ooo_engine_nb_inst_insert                    [i],
1890       _ooo_engine_nb_inst_retire                    [i],
1891       _nb_inst_issue                                [i],
1892       _ooo_engine_nb_inst_execute                   [i],
1893       _nb_inst_reexecute                            [i],
1894       _nb_inst_commit                               [i],
1895       _nb_inst_branch_complete                      [i],
1896       _ooo_engine_nb_branch_speculated              [i],
1897       _size_nb_inst_decod                              ,
1898       _nb_rename_unit_select                        [i],
1899       _nb_execute_loop_select                       [i],
1900       _size_general_data                               ,
1901       _size_special_data                               ,
1902       _ooo_engine_link_rename_unit_with_front_end   [i],
1903       _size_re_order_buffer                         [i],
1904       _nb_re_order_buffer_bank                      [i],
1905       _commit_priority                              [i],
1906       _commit_load_balancing                        [i],
1907       _size_issue_queue                             [i],
1908       _issue_queue_scheme                           [i],
1909       _nb_issue_queue_bank                          [i],
1910       _issue_priority                               [i],
1911       _issue_load_balancing                         [i],
1912       _ooo_engine_table_routing                     [i],
1913       _ooo_engine_table_issue_type                  [i],
1914       _size_reexecute_queue                         [i],
1915       _reexecute_priority                           [i],
1916       _reexecute_load_balancing                     [i],
1917       _ooo_engine_rename_select_priority            [i],
1918       _ooo_engine_rename_select_load_balancing      [i],
1919       _ooo_engine_rename_select_nb_front_end_select [i],
1920       _ooo_engine_nb_general_register               [i],
1921       _ooo_engine_nb_special_register               [i],
1922       _ooo_engine_nb_reg_free                       [i],
1923       _ooo_engine_nb_rename_unit_bank               [i],
1924//        _ooo_engine_size_read_counter                 [i],
1925       _ooo_engine_nb_load_store_unit                [i],
1926       _ooo_engine_size_store_queue                  [i],
1927       _ooo_engine_size_load_queue                   [i],
1928       _ooo_engine_nb_inst_memory                    [i],
1929       _ooo_engine_link_load_store_unit_with_context [i],
1930       _ooo_engine_implement_group                   [i],
1931       _nb_thread                                       ,
1932       _ooo_engine_translate_num_context_to_num_thread[i]
1933       );
1934
1935    _param_execute_loop = new core::multi_execute_loop::execute_loop::Parameters * [_nb_execute_loop];
1936
1937    for (uint32_t i=0; i<_nb_execute_loop; ++i)
1938      _param_execute_loop [i] = new core::multi_execute_loop::execute_loop::Parameters
1939        (
1940         _nb_read_unit                                            [i],
1941         _execute_loop_nb_functionnal_unit                        [i],
1942         _execute_loop_nb_load_store_unit                         [i],
1943         _nb_write_unit                                           [i],
1944
1945         _execute_loop_nb_context                                 [i],
1946         _execute_loop_nb_front_end                               [i],
1947         _execute_loop_nb_ooo_engine                              [i],
1948         _execute_loop_nb_packet                                  [i],
1949         _size_general_data                                          ,
1950         _size_special_data                                          ,
1951
1952         _execute_loop_size_read_queue                            [i],
1953         _execute_loop_size_reservation_station                   [i],
1954         _execute_loop_nb_inst_retire                             [i],
1955
1956         _execute_loop_nb_inst_functionnal_unit                   [i],
1957         _execute_loop_timing                                     [i],
1958         _get_custom_information                                     ,
1959
1960         _execute_loop_size_store_queue                           [i],
1961         _execute_loop_size_load_queue                            [i],
1962         _execute_loop_size_speculative_access_queue              [i],
1963         _execute_loop_nb_port_check                              [i],
1964         _execute_loop_speculative_load                           [i],
1965         _execute_loop_nb_bypass_memory                           [i],
1966         _execute_loop_nb_cache_port                              [i],
1967         _execute_loop_nb_inst_memory                             [i],
1968
1969         _execute_loop_size_write_queue                           [i],
1970         _execute_loop_size_execute_queue                         [i],
1971         _execute_loop_nb_bypass_write                            [i],
1972         _execute_loop_write_queue_scheme                         [i],
1973
1974         _nb_gpr_bank                                             [i],
1975         _nb_gpr_port_read_by_bank                                [i],
1976         _nb_gpr_port_write_by_bank                               [i],
1977         _nb_spr_bank                                             [i],
1978         _nb_spr_port_read_by_bank                                [i],
1979         _nb_spr_port_write_by_bank                               [i],
1980         _execute_loop_nb_general_register                        [i],
1981         _execute_loop_nb_special_register                        [i],
1982         _execute_loop_nb_inst_insert_rob                         [i],
1983         _execute_loop_nb_inst_retire_rob                         [i],
1984
1985         _execution_unit_to_write_unit_priority                   [i],
1986         _execute_loop_execution_unit_to_write_unit_table_routing [i],
1987         _execute_loop_execution_unit_to_write_unit_table_thread  [i],
1988
1989         _read_unit_to_execution_unit_priority                    [i],
1990         _execute_loop_read_unit_to_execution_unit_table_routing  [i],
1991         _execute_loop_read_unit_to_execution_unit_table_thread   [i],
1992
1993         _execute_loop_is_load_store_unit                         [i],
1994         _execute_loop_translate_num_execute_unit                 [i]
1995         );
1996
1997    _param_icache_access = new core::icache_access::Parameters
1998      (
1999       _nb_thread                   ,
2000       _nb_front_end                ,
2001       _nb_context                  ,
2002       _nb_icache_port              ,
2003       _size_icache_address         ,
2004       _size_icache_thread_id       ,
2005       _size_icache_packet_id       ,
2006       _front_end_nb_inst_fetch     ,
2007       _icache_access_size_packet_id,
2008       _icache_access_table_routing ,
2009       _icache_port_priority        ,
2010       _icache_port_load_balancing  ,
2011       _link_thread_with_context
2012       );
2013
2014    _param_dcache_access = new core::dcache_access::Parameters
2015      (
2016       _nb_thread                            ,
2017       _nb_execute_loop                      ,
2018       _execute_loop_nb_load_store_unit      ,
2019       _dcache_access_nb_context             ,
2020       _execute_loop_nb_cache_port           ,
2021       _nb_dcache_port                       ,
2022       _size_dcache_address                  ,
2023       _size_dcache_data                     ,
2024       _size_dcache_thread_id                ,
2025       _size_dcache_packet_id                ,
2026       _dcache_access_size_thread_id         ,
2027       _dcache_access_size_packet_id         ,
2028       _dcache_access_table_routing          ,
2029       _dcache_port_priority                 ,
2030       _dcache_port_load_balancing           ,
2031       _dcache_access_translate_load_store_unit_to_thread
2032       );
2033
2034    _param_glue          = new core::core_glue::Parameters
2035      (
2036       _nb_front_end                         ,
2037       _nb_context                           ,//[nb_front_end]
2038       _nb_ooo_engine                        ,
2039       _nb_execute_loop                      ,
2040       _ooo_engine_nb_front_end              ,//[nb_ooo_engine]
2041       _ooo_engine_nb_execute_loop           ,//[nb_ooo_engine]
2042       _execute_loop_nb_ooo_engine           ,//[nb_execute_loop]
2043       _front_end_sum_inst_decod             ,//[nb_front_end] -> [sum_inst_decod]
2044       _front_end_nb_inst_branch_complete    ,//[nb_front_end]
2045       _nb_inst_branch_complete              ,//[nb_ooo_engine]
2046       _ooo_engine_nb_inst_insert_rob        ,//[nb_ooo_engine]
2047       _nb_inst_issue                        ,//[nb_ooo_engine]
2048       _ooo_engine_nb_inst_execute           ,//[nb_ooo_engine][ooo_engine_nb_execute_loop]
2049       _nb_read_unit                         ,//[nb_execute_loop]
2050       _nb_write_unit                        ,//[nb_execute_loop]
2051       _size_depth                           ,
2052       _size_rob_ptr                         ,
2053       _size_load_queue_ptr                  ,
2054       _size_store_queue_ptr                 ,
2055       _size_general_data                    ,
2056       _size_special_data                    ,
2057       _size_general_register                ,
2058       _size_special_register                ,
2059       _dispatch_priority                    ,
2060       _dispatch_load_balancing              ,
2061       _network_table_dispatch               ,//[nb_ooo_engine][nb_inst_issue][nb_execute_loop][nb_read_unit]
2062       _translate_ooo_engine_num_front_end   ,//[nb_ooo_engine][ooo_engine_nb_front_end]
2063       _translate_ooo_engine_num_execute_loop,//[nb_ooo_engine][ooo_engine_nb_execute_loop]
2064       _translate_execute_loop_num_ooo_engine //*[nb_execute_loop][execute_loop_nb_ooo_engine]
2065       );
2066   
2067    copy();
2068
2069    log_end(Core,FUNCTION);
2070  };
2071 
2072// #undef  FUNCTION
2073// #define FUNCTION "Core::Parameters (copy)"
2074//   Parameters::Parameters (Parameters & param)
2075//   {
2076//     log_begin(Core,FUNCTION);
2077//     test();
2078//     log_end(Core,FUNCTION);
2079//   };
2080
2081#undef  FUNCTION
2082#define FUNCTION "Core::~Parameters"
2083  Parameters::~Parameters (void) 
2084  {
2085    log_begin(Core,FUNCTION);
2086
2087    delete [] _param_front_end;
2088    delete [] _param_ooo_engine;
2089    delete [] _param_execute_loop;
2090    delete    _param_icache_access;
2091    delete    _param_dcache_access;
2092    delete    _param_glue;
2093
2094    DELETE3(_dcache_access_translate_load_store_unit_to_thread      ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1],_dcache_access_nb_context[it1]);
2095    DELETE1(_dcache_access_nb_context                               ,_nb_execute_loop);
2096    DELETE3(_dcache_access_table_routing                            ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1],_execute_loop_nb_cache_port[it1][it2]);
2097    DELETE2(_dcache_access_size_packet_id                           ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]);
2098    DELETE2(_dcache_access_size_thread_id                           ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]);
2099    DELETE1(_icache_nb_instruction                                  ,_nb_icache_port);
2100    DELETE2(_icache_access_table_routing                            ,_nb_front_end,_nb_context[it1]);
2101    DELETE2(_icache_access_size_packet_id                           ,_nb_front_end,_nb_context[it1]);
2102    DELETE3(_execute_loop_execution_unit_to_write_unit_table_thread ,_nb_execute_loop,_nb_write_unit[it1],_execute_loop_nb_thread [it1]);
2103    DELETE3(_execute_loop_read_unit_to_execution_unit_table_thread  ,_nb_execute_loop,_nb_execute_unit[it1],_execute_loop_nb_thread[it1]);
2104    DELETE4(_execute_loop_execution_unit_to_write_unit_table_routing,_nb_execute_loop,_nb_execute_unit[it1],_execute_loop_nb_execute_unit_port[it1][it2],_nb_write_unit[it1]);
2105    DELETE4(_execute_loop_read_unit_to_execution_unit_table_routing ,_nb_execute_loop,_nb_read_unit[it1],_nb_execute_unit[it1],_execute_loop_nb_execute_unit_port[it1][it2]);
2106    DELETE2(_execute_loop_nb_execute_unit_port                      ,_nb_execute_loop,_nb_execute_unit[it1]);
2107    DELETE2(_execute_loop_nb_inst_retire_rob                        ,_nb_execute_loop,_execute_loop_nb_ooo_engine[it1]);
2108    DELETE2(_execute_loop_nb_inst_insert_rob                        ,_nb_execute_loop,_execute_loop_nb_ooo_engine[it1]);
2109    DELETE2(_execute_loop_nb_special_register                       ,_nb_execute_loop,_execute_loop_nb_ooo_engine[it1]);
2110    DELETE2(_execute_loop_nb_general_register                       ,_nb_execute_loop,_execute_loop_nb_ooo_engine[it1]);
2111    DELETE2(_execute_loop_write_queue_scheme                        ,_nb_execute_loop,_nb_write_unit[it1]);
2112    DELETE2(_execute_loop_nb_bypass_write                           ,_nb_execute_loop,_nb_write_unit[it1]);
2113    DELETE2(_execute_loop_size_execute_queue                        ,_nb_execute_loop,_nb_write_unit[it1]);
2114    DELETE2(_execute_loop_size_write_queue                          ,_nb_execute_loop,_nb_write_unit[it1]);
2115    DELETE2(_execute_loop_nb_inst_memory                            ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]);
2116    DELETE2(_execute_loop_nb_cache_port                             ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]);
2117    DELETE2(_execute_loop_nb_bypass_memory                          ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]);
2118    DELETE2(_execute_loop_speculative_load                          ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]);
2119    DELETE2(_execute_loop_nb_port_check                             ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]);
2120    DELETE2(_execute_loop_size_speculative_access_queue             ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]);
2121    DELETE2(_execute_loop_size_load_queue                           ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]);
2122    DELETE2(_execute_loop_size_store_queue                          ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]);
2123    DELETE2(_execute_loop_translate_num_execute_unit                ,_nb_execute_loop,_nb_execute_unit[it1]);
2124    DELETE2(_execute_loop_is_load_store_unit                        ,_nb_execute_loop,_nb_execute_unit[it1]);
2125    DELETE4(_execute_loop_timing                                    ,_nb_execute_loop,_execute_loop_nb_functionnal_unit[it1],_nb_type,_nb_operation);
2126    DELETE2(_execute_loop_nb_inst_functionnal_unit                  ,_nb_execute_loop,_execute_loop_nb_functionnal_unit[it1]);
2127    DELETE2(_execute_loop_nb_inst_retire                            ,_nb_execute_loop,_nb_read_unit[it1]);
2128    DELETE2(_execute_loop_size_reservation_station                  ,_nb_execute_loop,_nb_read_unit[it1]);
2129    DELETE2(_execute_loop_size_read_queue                           ,_nb_execute_loop,_nb_read_unit[it1]);
2130    DELETE2(_translate_execute_loop_num_ooo_engine                  ,_nb_execute_loop,_execute_loop_nb_ooo_engine[it1]);
2131    DELETE1(_execute_loop_nb_thread                                 ,_nb_execute_loop);
2132    DELETE1(_execute_loop_nb_packet                                 ,_nb_execute_loop);
2133    DELETE1(_execute_loop_nb_ooo_engine                             ,_nb_execute_loop);
2134    DELETE1(_execute_loop_nb_context                                ,_nb_execute_loop);
2135    DELETE1(_execute_loop_nb_front_end                              ,_nb_execute_loop);
2136    DELETE1(_list_front_end_with_execute_loop                       ,_nb_execute_loop);
2137    DELETE1(_list_ooo_engine_with_execute_loop                      ,_nb_execute_loop);
2138    DELETE1(_execute_loop_nb_load_store_unit                        ,_nb_execute_loop);
2139    DELETE1(_execute_loop_nb_functionnal_unit                       ,_nb_execute_loop);
2140    DELETE4(_ooo_engine_implement_group                             ,_nb_ooo_engine,_ooo_engine_nb_front_end[it1],_ooo_engine_nb_context[it1][it2],NB_GROUP);
2141    DELETE3(_ooo_engine_link_load_store_unit_with_context           ,_nb_ooo_engine,_ooo_engine_nb_front_end[it1],_ooo_engine_nb_context[it1][it2]);
2142    DELETE3(_ooo_engine_nb_inst_memory                              ,_nb_ooo_engine,_nb_rename_unit[it1],_ooo_engine_nb_load_store_unit[it1][it2]);
2143    DELETE3(_ooo_engine_size_load_queue                             ,_nb_ooo_engine,_nb_rename_unit[it1],_ooo_engine_nb_load_store_unit[it1][it2]);
2144    DELETE3(_ooo_engine_size_store_queue                            ,_nb_ooo_engine,_nb_rename_unit[it1],_ooo_engine_nb_load_store_unit[it1][it2]);
2145    DELETE2(_ooo_engine_nb_load_store_unit                          ,_nb_ooo_engine,_nb_rename_unit[it1]);
2146    DELETE2(_list_load_store_unit_with_rename_unit                  ,_nb_ooo_engine,_nb_rename_unit[it1]);
2147    DELETE2(_list_functionnal_unit_with_rename_unit                 ,_nb_ooo_engine,_nb_rename_unit[it1]);
2148    DELETE3(_ooo_engine_table_issue_type                            ,_nb_ooo_engine,_nb_inst_issue[it1],_nb_type);
2149    DELETE3(_ooo_engine_table_routing                               ,_nb_ooo_engine,_nb_rename_unit[it1],_nb_inst_issue[it1]);
2150    DELETE4(_network_table_dispatch                                 ,_nb_ooo_engine,_nb_inst_issue[it1],_nb_execute_loop,_nb_read_unit[it3]);
2151//     DELETE2(_ooo_engine_size_read_counter                           ,_nb_ooo_engine,_nb_rename_unit[it1]);
2152    DELETE2(_ooo_engine_nb_rename_unit_bank                         ,_nb_ooo_engine,_nb_rename_unit[it1]);
2153    DELETE2(_ooo_engine_nb_reg_free                                 ,_nb_ooo_engine,_nb_rename_unit[it1]);
2154    DELETE2(_ooo_engine_nb_special_register                         ,_nb_ooo_engine,_nb_rename_unit[it1]);
2155    DELETE2(_ooo_engine_nb_general_register                         ,_nb_ooo_engine,_nb_rename_unit[it1]);
2156    DELETE2(_ooo_engine_rename_select_nb_front_end_select           ,_nb_ooo_engine,_nb_rename_unit[it1]);
2157    DELETE2(_ooo_engine_rename_select_load_balancing                ,_nb_ooo_engine,_nb_rename_unit[it1]);
2158    DELETE2(_ooo_engine_rename_select_priority                      ,_nb_ooo_engine,_nb_rename_unit[it1]);
2159    DELETE2(_ooo_engine_nb_inst_retire                              ,_nb_ooo_engine,_nb_rename_unit[it1]);
2160    DELETE1(_ooo_engine_nb_inst_insert_rob                          ,_nb_ooo_engine);
2161    DELETE2(_ooo_engine_nb_inst_insert                              ,_nb_ooo_engine,_nb_rename_unit[it1]);
2162    DELETE2(_ooo_engine_link_rename_unit_with_front_end             ,_nb_ooo_engine,_ooo_engine_nb_front_end[it1]);
2163    DELETE3(_ooo_engine_nb_branch_speculated                        ,_nb_ooo_engine,_ooo_engine_nb_front_end[it1],_ooo_engine_nb_context[it1][it2]);
2164    DELETE2(_ooo_engine_nb_inst_execute                             ,_nb_ooo_engine,_ooo_engine_nb_execute_loop[it1]);
2165    DELETE3(_ooo_engine_translate_num_context_to_num_thread         ,_nb_ooo_engine,_ooo_engine_nb_front_end[it1],_ooo_engine_nb_context[it1][it2]);
2166    DELETE2(_ooo_engine_nb_inst_decod                               ,_nb_ooo_engine,_ooo_engine_nb_front_end[it1]);
2167    DELETE2(_ooo_engine_nb_context                                  ,_nb_ooo_engine,_ooo_engine_nb_front_end[it1]);
2168    DELETE2(_translate_ooo_engine_num_execute_loop                  ,_nb_ooo_engine,_ooo_engine_nb_execute_loop[it1]);
2169    DELETE1(_ooo_engine_nb_execute_loop                             ,_nb_ooo_engine);
2170    DELETE2(_translate_ooo_engine_num_front_end                     ,_nb_ooo_engine,_ooo_engine_nb_front_end[it1]);
2171    DELETE1(_ooo_engine_nb_front_end                                ,_nb_ooo_engine);
2172    DELETE2(_front_end_context_select_load_balancing                ,_nb_front_end,_nb_decod_unit[it1]);
2173    DELETE2(_front_end_context_select_priority                      ,_nb_front_end,_nb_decod_unit[it1]);
2174    DELETE2(_front_end_nb_context_select                            ,_nb_front_end,_nb_decod_unit[it1]);
2175    DELETE1(_front_end_sum_inst_decod                               ,_nb_front_end);
2176    DELETE2(_front_end_nb_inst_decod                                ,_nb_front_end,_nb_decod_unit[it1]);
2177    DELETE2(_front_end_decod_queue_scheme                           ,_nb_front_end,_nb_decod_unit[it1]);
2178    DELETE2(_front_end_size_decod_queue                             ,_nb_front_end,_nb_decod_unit[it1]);
2179    DELETE1(_front_end_nb_inst_branch_complete                      ,_nb_front_end);
2180    DELETE3(_front_end_instruction_implemeted                       ,_nb_front_end,_nb_context[it1],NB_INSTRUCTION);
2181    DELETE2(_front_end_ufpt_size_queue                              ,_nb_front_end,_nb_context[it1]);
2182    DELETE2(_front_end_upt_size_queue                               ,_nb_front_end,_nb_context[it1]);
2183    DELETE2(_front_end_ras_size_queue                               ,_nb_front_end,_nb_context[it1]);
2184    DELETE2(_front_end_link_decod_unit_with_context                 ,_nb_front_end,_nb_context[it1]);
2185    DELETE2(_front_end_nb_inst_fetch                                ,_nb_front_end,_nb_context[it1]);
2186    DELETE2(_front_end_size_ifetch_queue                            ,_nb_front_end,_nb_context[it1]);
2187    DELETE1(_list_load_store_unit_with_execute_unit                 ,_nb_execute_loop);
2188    DELETE1(_list_functionnal_unit_with_execute_unit                ,_nb_execute_loop);
2189    DELETE2(_link_load_store_unit_with_execute_unit                 ,_nb_execute_loop,_nb_execute_unit[it1]);
2190    DELETE2(_link_functionnal_unit_with_execute_unit                ,_nb_execute_loop,_nb_execute_unit[it1]);
2191    DELETE2(_link_write_bloc_with_write_unit                        ,_nb_execute_loop,_nb_write_unit[it1]);
2192    DELETE2(_link_read_bloc_with_read_unit                          ,_nb_execute_loop,_nb_read_unit[it1]);
2193    DELETE2(_link_rename_bloc_with_rename_unit                      ,_nb_ooo_engine,_nb_rename_unit[it1]);
2194    DELETE2(_link_decod_bloc_with_decod_unit                        ,_nb_front_end,_nb_decod_unit[it1]);
2195    DELETE2(_link_thread_with_context                               ,_nb_front_end,_nb_context[it1]);
2196
2197    log_end(Core,FUNCTION);
2198  };
2199
2200#undef  FUNCTION
2201#define FUNCTION "Core::copy"
2202  void Parameters::copy (void) 
2203  {
2204    log_begin(Core,FUNCTION);
2205
2206    for (uint32_t i=0; i<_nb_front_end; ++i)
2207    COPY(_param_front_end [i]);
2208    for (uint32_t i=0; i<_nb_ooo_engine; ++i)
2209    COPY(_param_ooo_engine [i]);
2210    for (uint32_t i=0; i<_nb_execute_loop; ++i)
2211    COPY(_param_execute_loop [i]);
2212    COPY(_param_icache_access);
2213    COPY(_param_dcache_access);
2214    COPY(_param_glue);
2215
2216    log_end(Core,FUNCTION);
2217  };
2218
2219}; // end namespace core
2220}; // end namespace behavioural
2221}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.