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

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

1) add counters_t type for interface
2) fix in check load in load_store_unit
3) add parameters (but not yet implemented)
4) change environment and add script (distcc_env.sh ...)
5) add warning if an unser change rename flag with l.mtspr instruction
6) ...

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