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

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

1) Update Prediction Table : statistics
2) Size instruction address on 30 bits
3) Change Log File
4) Add debug_level in simulation configuration file

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