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

Last change on this file since 145 was 145, checked in by rosiere, 14 years ago

1) add test with SPECINT2K
2) new config of Selftest
3) modif RAT to support multiple depth_save ... but not finish (need fix Update Prediction Table)
4) add Function_pointer but need fix

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