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

Last change on this file since 146 was 146, checked in by rosiere, 13 years ago

1) Integration of RegisterFile_Internal_Banked in RegisterFile?
2) Erase "read_write" interface in RegisterFile_Monolithic component
3) Add smith predictor parameters in Load_store_pointer_unit.
4) Fix not statistics flags

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