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

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