source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Core_allocation.cpp @ 137

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

Various modif (add test, and vhdl)

  • Property svn:keywords set to Id
File size: 94.8 KB
Line 
1/*
2 * $Id: Core_allocation.cpp 137 2010-02-16 12:35:48Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/include/Core.h"
9#include "Behavioural/include/Allocation.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14
15
16
17#undef  FUNCTION
18#define FUNCTION "Core::allocation"
19  void Core::allocation
20  (
21#ifdef STATISTICS
22   morpheo::behavioural::Parameters_Statistics * param_statistics
23#else
24   void
25#endif
26   )
27  {
28    log_begin(Core,FUNCTION);
29
30    _component   = new Component (_usage);
31
32    Entity * entity = _component->set_entity (_name       
33                                              ,"Core"
34#ifdef POSITION
35                                              ,COMBINATORY
36#endif
37                                              );
38
39    _interfaces = entity->set_interfaces();
40   
41    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
42    {
43      Interface * interface = _interfaces->set_interface(""
44#ifdef POSITION
45                                                         ,IN
46                                                         ,SOUTH,
47                                                         "Generalist interface"
48#endif
49                                                         );
50     
51      in_CLOCK        = interface->set_signal_clk              ("clock" ,1, CLOCK_VHDL_YES);
52      in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
53    }
54
55    // ~~~~~[ Interface "icache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56    {
57      ALLOC1_INTERFACE_BEGIN("icache_req",WEST,OUT,_("Request to instruction cache"),_param->_nb_icache_port);
58
59      ALLOC1_VALACK_OUT(out_ICACHE_REQ_VAL         ,VAL);
60      ALLOC1_VALACK_IN ( in_ICACHE_REQ_ACK         ,ACK);
61      ALLOC1_SIGNAL_OUT(out_ICACHE_REQ_THREAD_ID   ,"thread_id",Tcontext_t           ,_param->_size_icache_thread_id);
62      ALLOC1_SIGNAL_OUT(out_ICACHE_REQ_PACKET_ID   ,"packet_id",Tpacket_t            ,_param->_size_icache_packet_id);
63      ALLOC1_SIGNAL_OUT(out_ICACHE_REQ_ADDRESS     ,"address"  ,Ticache_address_t    ,_param->_size_icache_address  );
64      ALLOC1_SIGNAL_OUT(out_ICACHE_REQ_TYPE        ,"type"     ,Ticache_type_t       ,_param->_size_icache_type     );
65
66      ALLOC1_INTERFACE_END(_param->_nb_icache_port);
67    }
68                                                                           
69    // ~~~~~[ Interface "icache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70    {
71      ALLOC1_INTERFACE_BEGIN("icache_rsp",WEST,IN ,_("Respons from instruction cache"),_param->_nb_icache_port);
72     
73      ALLOC1_VALACK_IN ( in_ICACHE_RSP_VAL         ,VAL);
74      ALLOC1_VALACK_OUT(out_ICACHE_RSP_ACK         ,ACK);
75      ALLOC1_SIGNAL_IN ( in_ICACHE_RSP_THREAD_ID   ,"thread_id"  ,Tcontext_t           ,_param->_size_icache_thread_id);
76      ALLOC1_SIGNAL_IN ( in_ICACHE_RSP_PACKET_ID   ,"packet_id"  ,Tpacket_t            ,_param->_size_icache_packet_id);
77      ALLOC1_SIGNAL_IN ( in_ICACHE_RSP_ERROR       ,"error"      ,Ticache_error_t      ,_param->_size_icache_error);
78
79      ALLOC1_INTERFACE_END(_param->_nb_icache_port);
80    }
81    {
82      ALLOC2_INTERFACE_BEGIN("icache_rsp",WEST,IN ,_("Respons from instruction cache"),_param->_nb_icache_port,_param->_icache_nb_instruction[it1]);
83     
84      _ALLOC2_SIGNAL_IN ( in_ICACHE_RSP_INSTRUCTION ,"instruction",Ticache_instruction_t,_param->_size_instruction,_param->_nb_icache_port,_param->_icache_nb_instruction[it1]);
85
86      ALLOC2_INTERFACE_END(_param->_nb_icache_port,_param->_icache_nb_instruction[it1]);
87    }
88
89    // ~~~~~[ Interface "dcache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
90    {
91      ALLOC1_INTERFACE_BEGIN("dcache_req", OUT, NORTH, _("Request to data cache"),_param->_nb_dcache_port);
92     
93      ALLOC1_VALACK_OUT(out_DCACHE_REQ_VAL         ,VAL);
94      ALLOC1_VALACK_IN ( in_DCACHE_REQ_ACK         ,ACK);
95      ALLOC1_SIGNAL_OUT(out_DCACHE_REQ_THREAD_ID   ,"thread_id",Tcontext_t           ,_param->_size_dcache_thread_id);
96      ALLOC1_SIGNAL_OUT(out_DCACHE_REQ_PACKET_ID   ,"packet_id",Tpacket_t            ,_param->_size_dcache_packet_id);
97      ALLOC1_SIGNAL_OUT(out_DCACHE_REQ_ADDRESS     ,"address"  ,Tdcache_address_t    ,_param->_size_dcache_address);
98      ALLOC1_SIGNAL_OUT(out_DCACHE_REQ_WDATA       ,"wdata"    ,Tdcache_data_t       ,_param->_size_dcache_data);
99      ALLOC1_SIGNAL_OUT(out_DCACHE_REQ_TYPE        ,"type"     ,Tdcache_type_t       ,_param->_size_dcache_type);
100
101      ALLOC1_INTERFACE_END(_param->_nb_dcache_port);
102    }
103                                                                           
104    // ~~~~~[ Interface "dcache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
105    {
106      ALLOC1_INTERFACE_BEGIN("dcache_rsp", IN , NORTH, _("Respons from data cache"),_param->_nb_dcache_port);
107
108      ALLOC1_VALACK_IN ( in_DCACHE_RSP_VAL         ,VAL);
109      ALLOC1_VALACK_OUT(out_DCACHE_RSP_ACK         ,ACK);
110      ALLOC1_SIGNAL_IN ( in_DCACHE_RSP_THREAD_ID   ,"thread_id",Tcontext_t           ,_param->_size_dcache_thread_id);
111      ALLOC1_SIGNAL_IN ( in_DCACHE_RSP_PACKET_ID   ,"packet_id",Tpacket_t            ,_param->_size_dcache_packet_id);
112      ALLOC1_SIGNAL_IN ( in_DCACHE_RSP_RDATA       ,"rdata"    ,Tdcache_data_t       ,_param->_size_dcache_data);
113      ALLOC1_SIGNAL_IN ( in_DCACHE_RSP_ERROR       ,"error"    ,Tdcache_error_t      ,_param->_size_dcache_error);
114
115      ALLOC1_INTERFACE_END(_param->_nb_dcache_port);
116    }
117
118    // ~~~~~[ Interface : "interrupt" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
119    {
120      ALLOC1_INTERFACE_BEGIN("interrupt", IN , NORTH, _("Interruption line"),_param->_nb_thread);
121
122      ALLOC1_SIGNAL_IN ( in_INTERRUPT_ENABLE      ,"enable",Tcontrol_t           ,1);
123
124      ALLOC1_INTERFACE_END(_param->_nb_thread);
125    }
126   
127    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
128
129    std::string name;
130
131    _component_front_end = new core::multi_front_end::front_end::Front_end * [_param->_nb_front_end];
132    for (uint32_t i=0; i<_param->_nb_front_end; ++i)
133      {
134        name = _name+"_front_end_"+toString(i);
135        log_printf(INFO,Core,FUNCTION,_("Create   : %s"),name.c_str());
136     
137        _component_front_end [i] = new core::multi_front_end::front_end::Front_end
138          (name.c_str()
139#ifdef STATISTICS
140           ,param_statistics
141#endif
142           ,_param->_param_front_end [i]
143           ,_usage);
144       
145        _component->set_component (_component_front_end[i]->_component
146#ifdef POSITION
147                                   , 50, 50, 10, 10
148#endif
149                                   );
150      }
151
152    _component_ooo_engine = new core::multi_ooo_engine::ooo_engine::OOO_Engine * [_param->_nb_ooo_engine];
153    for (uint32_t i=0; i<_param->_nb_ooo_engine; ++i)
154      {
155        name = _name+"_ooo_engine_"+toString(i);
156        log_printf(INFO,Core,FUNCTION,_("Create   : %s"),name.c_str());
157     
158        _component_ooo_engine [i] = new core::multi_ooo_engine::ooo_engine::OOO_Engine
159          (name.c_str()
160#ifdef STATISTICS
161           ,param_statistics
162#endif
163           ,_param->_param_ooo_engine [i]
164           ,_usage);
165       
166        _component->set_component (_component_ooo_engine[i]->_component
167#ifdef POSITION
168                                   , 50, 50, 10, 10
169#endif
170                                   );
171      }
172
173    _component_execute_loop = new core::multi_execute_loop::execute_loop::Execute_loop * [_param->_nb_execute_loop];
174    for (uint32_t i=0; i<_param->_nb_execute_loop; ++i)
175      {
176        name = _name+"_execute_loop_"+toString(i);
177        log_printf(INFO,Core,FUNCTION,_("Create   : %s"),name.c_str());
178     
179        _component_execute_loop [i] = new core::multi_execute_loop::execute_loop::Execute_loop
180          (name.c_str()
181#ifdef STATISTICS
182           ,param_statistics
183#endif
184           ,_param->_param_execute_loop [i]
185           ,_usage);
186       
187        _component->set_component (_component_execute_loop[i]->_component
188#ifdef POSITION
189                                   , 50, 50, 10, 10
190#endif
191                                   );
192      }
193
194    {
195      name = _name+"_icache_access";
196      log_printf(INFO,Core,FUNCTION,_("Create   : %s"),name.c_str());
197     
198      _component_icache_access = new morpheo::behavioural::core::icache_access::Icache_Access
199        (name.c_str()
200#ifdef STATISTICS
201         ,param_statistics
202#endif
203         ,_param->_param_icache_access
204         ,_usage);
205     
206      _component->set_component (_component_icache_access->_component
207#ifdef POSITION
208                                 , 50, 50, 10, 10
209#endif
210                                 );
211    }
212
213    {
214      name = _name+"_dcache_access";
215      log_printf(INFO,Core,FUNCTION,_("Create   : %s"),name.c_str());
216     
217      _component_dcache_access = new morpheo::behavioural::core::dcache_access::Dcache_Access
218        (name.c_str()
219#ifdef STATISTICS
220         ,param_statistics
221#endif
222         ,_param->_param_dcache_access
223         ,_usage);
224     
225      _component->set_component (_component_dcache_access->_component
226#ifdef POSITION
227                                 , 50, 50, 10, 10
228#endif
229                                 );
230    }
231
232
233    {
234      name = _name+"_glue";
235      log_printf(INFO,Core,FUNCTION,_("Create   : %s"),name.c_str());
236     
237      _component_glue = new morpheo::behavioural::core::core_glue::Core_Glue
238        (name.c_str()
239#ifdef STATISTICS
240         ,param_statistics
241#endif
242         ,_param->_param_glue
243         ,_usage);
244     
245      _component->set_component (_component_glue->_component
246#ifdef POSITION
247                                 , 50, 50, 10, 10
248#endif
249                                 );
250    }
251   
252    // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
253    std::string src,dest;
254   
255   
256    // ===================================================================
257    // =====[ front_end ]=================================================
258    // ===================================================================
259    for (uint32_t i=0; i<_param->_nb_front_end; ++i)
260      {
261        src = _name+"_front_end_"+toString(i);
262        log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
263       
264        // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
265        {
266          dest = _name;
267#ifdef POSITION
268          _component->interface_map (src ,"",
269                                     dest,"");
270#endif
271          PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
272          PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
273        }
274
275        // ~~~~~[ Interface "icache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
276        // out_ICACHE_REQ_VAL       - icache_access. in_CONTEXT_REQ_VAL     
277        //  in_ICACHE_REQ_ACK       - icache_access.out_CONTEXT_REQ_ACK     
278//      // out_ICACHE_REQ_THREAD_ID - icache_access. in_CONTEXT_REQ_THREAD_ID
279        // out_ICACHE_REQ_PACKET_ID - icache_access. in_CONTEXT_REQ_PACKET_ID
280        // out_ICACHE_REQ_ADDRESS   - icache_access. in_CONTEXT_REQ_ADDRESS 
281        // out_ICACHE_REQ_TYPE      - icache_access. in_CONTEXT_REQ_TYPE     
282       
283        // ~~~~~[ Interface "icache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
284        //  in_ICACHE_RSP_VAL         - icache_access.out_CONTEXT_RSP_VAL       
285        // out_ICACHE_RSP_ACK         - icache_access. in_CONTEXT_RSP_ACK       
286//      //  in_ICACHE_RSP_THREAD_ID   - icache_access.out_CONTEXT_RSP_THREAD_ID 
287        //  in_ICACHE_RSP_PACKET_ID   - icache_access.out_CONTEXT_RSP_PACKET_ID 
288        //  in_ICACHE_RSP_INSTRUCTION - icache_access.out_CONTEXT_RSP_INSTRUCTION
289        //  in_ICACHE_RSP_ERROR       - icache_access.out_CONTEXT_RSP_ERROR     
290
291        // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
292        // out_DECOD_VAL           - ooo_engine. in_RENAME_VAL         
293        //  in_DECOD_ACK           - ooo_engine.out_RENAME_ACK         
294        // out_DECOD_CONTEXT_ID    - ooo_engine. in_RENAME_CONTEXT_ID   
295        // out_DECOD_DEPTH         - ooo_engine. in_RENAME_DEPTH       
296        // out_DECOD_TYPE          - ooo_engine. in_RENAME_TYPE         
297        // out_DECOD_OPERATION     - ooo_engine. in_RENAME_OPERATION   
298        // out_DECOD_NO_EXECUTE    - ooo_engine. in_RENAME_NO_EXECUTE   
299        // out_DECOD_IS_DELAY_SLOT - ooo_engine. in_RENAME_IS_DELAY_SLOT
300        // out_DECOD_ADDRESS       - ooo_engine. in_RENAME_ADDRESS     
301        // out_DECOD_ADDRESS_NEXT  - ooo_engine. in_RENAME_ADDRESS_NEXT
302        // out_DECOD_HAS_IMMEDIAT  - ooo_engine. in_RENAME_HAS_IMMEDIAT
303        // out_DECOD_IMMEDIAT      - ooo_engine. in_RENAME_IMMEDIAT     
304        // out_DECOD_READ_RA       - ooo_engine. in_RENAME_READ_RA     
305        // out_DECOD_NUM_REG_RA    - ooo_engine. in_RENAME_NUM_REG_RA   
306        // out_DECOD_READ_RB       - ooo_engine. in_RENAME_READ_RB     
307        // out_DECOD_NUM_REG_RB    - ooo_engine. in_RENAME_NUM_REG_RB   
308        // out_DECOD_READ_RC       - ooo_engine. in_RENAME_READ_RC     
309        // out_DECOD_NUM_REG_RC    - ooo_engine. in_RENAME_NUM_REG_RC   
310        // out_DECOD_WRITE_RD      - ooo_engine. in_RENAME_WRITE_RD     
311        // out_DECOD_NUM_REG_RD    - ooo_engine. in_RENAME_NUM_REG_RD   
312        // out_DECOD_WRITE_RE      - ooo_engine. in_RENAME_WRITE_RE     
313        // out_DECOD_NUM_REG_RE    - ooo_engine. in_RENAME_NUM_REG_RE   
314        // out_DECOD_EXCEPTION_USE - ooo_engine. in_RENAME_EXCEPTION_USE
315        // out_DECOD_EXCEPTION     - ooo_engine. in_RENAME_EXCEPTION   
316
317        // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~
318        for (uint32_t j=0; j<_param->_front_end_nb_inst_branch_complete[i]; ++j)
319          {
320            dest = _name+"_glue";
321#ifdef POSITION
322            _component->interface_map (src ,"branch_complete_"                          +toString(j),
323                                       dest,"branch_complete_front_end_"+toString(i)+"_"+toString(j));
324#endif
325
326            COMPONENT_MAP(_component,src , "in_BRANCH_COMPLETE_"                          +toString(j)+"_VAL"            ,
327                                     dest,"out_BRANCH_COMPLETE_FRONT_END_"+toString(i)+"_"+toString(j)+"_VAL"            );
328            COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"                          +toString(j)+"_ACK"            ,
329                                     dest, "in_BRANCH_COMPLETE_FRONT_END_"+toString(i)+"_"+toString(j)+"_ACK"            );
330            if (_param->_have_port_context_id)
331            COMPONENT_MAP(_component,src , "in_BRANCH_COMPLETE_"                          +toString(j)+"_CONTEXT_ID"     ,
332                                     dest,"out_BRANCH_COMPLETE_FRONT_END_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID"     );
333            if (_param->_have_port_depth)
334            COMPONENT_MAP(_component,src , "in_BRANCH_COMPLETE_"                          +toString(j)+"_DEPTH"          ,
335                                     dest,"out_BRANCH_COMPLETE_FRONT_END_"+toString(i)+"_"+toString(j)+"_DEPTH"          );
336            COMPONENT_MAP(_component,src , "in_BRANCH_COMPLETE_"                          +toString(j)+"_ADDRESS"        ,
337                                     dest,"out_BRANCH_COMPLETE_FRONT_END_"+toString(i)+"_"+toString(j)+"_ADDRESS"        );
338            COMPONENT_MAP(_component,src , "in_BRANCH_COMPLETE_"                          +toString(j)+"_NO_SEQUENCE"    ,
339                                     dest,"out_BRANCH_COMPLETE_FRONT_END_"+toString(i)+"_"+toString(j)+"_NO_SEQUENCE"    );
340            COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"                          +toString(j)+"_MISS_PREDICTION",
341                                     dest, "in_BRANCH_COMPLETE_FRONT_END_"+toString(i)+"_"+toString(j)+"_MISS_PREDICTION");
342          }
343
344        // ~~~~~[ Interface : "commit_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~
345        {
346          dest = _name+"_glue";
347#ifdef POSITION
348          _component->interface_map (src ,"commit_event"                       ,
349                                     dest,"commit_event_front_end_"+toString(i));
350#endif
351
352          COMPONENT_MAP(_component,src , "in_COMMIT_EVENT_VAL"             ,
353                                   dest,"out_COMMIT_EVENT_FRONT_END_"+toString(i)+"_VAL"             );
354          COMPONENT_MAP(_component,src ,"out_COMMIT_EVENT_ACK"             ,
355                                   dest, "in_COMMIT_EVENT_FRONT_END_"+toString(i)+"_ACK"             );
356          if (_param->_have_port_context_id)
357          COMPONENT_MAP(_component,src , "in_COMMIT_EVENT_CONTEXT_ID"      ,
358                                   dest,"out_COMMIT_EVENT_FRONT_END_"+toString(i)+"_CONTEXT_ID"      );
359          if (_param->_have_port_depth)
360          COMPONENT_MAP(_component,src , "in_COMMIT_EVENT_DEPTH"           ,
361                                   dest,"out_COMMIT_EVENT_FRONT_END_"+toString(i)+"_DEPTH"           );
362          COMPONENT_MAP(_component,src , "in_COMMIT_EVENT_TYPE"            ,
363                                   dest,"out_COMMIT_EVENT_FRONT_END_"+toString(i)+"_TYPE"            );
364          COMPONENT_MAP(_component,src , "in_COMMIT_EVENT_IS_DELAY_SLOT"   ,
365                                   dest,"out_COMMIT_EVENT_FRONT_END_"+toString(i)+"_IS_DELAY_SLOT"   );
366          COMPONENT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS"         ,
367                                   dest,"out_COMMIT_EVENT_FRONT_END_"+toString(i)+"_ADDRESS"         );
368          COMPONENT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EPCR_VAL",
369                                   dest,"out_COMMIT_EVENT_FRONT_END_"+toString(i)+"_ADDRESS_EPCR_VAL");
370          COMPONENT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EPCR"    ,
371                                   dest,"out_COMMIT_EVENT_FRONT_END_"+toString(i)+"_ADDRESS_EPCR"    );
372          COMPONENT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EEAR_VAL",
373                                   dest,"out_COMMIT_EVENT_FRONT_END_"+toString(i)+"_ADDRESS_EEAR_VAL");
374          COMPONENT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EEAR"    ,
375                                   dest,"out_COMMIT_EVENT_FRONT_END_"+toString(i)+"_ADDRESS_EEAR"    );
376        }
377
378        // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
379        // out_EVENT_VAL              - ooo_engine. in_EVENT_VAL             
380        //  in_EVENT_ACK              - ooo_engine.out_EVENT_ACK             
381        // out_EVENT_ADDRESS          - ooo_engine. in_EVENT_ADDRESS         
382        // out_EVENT_ADDRESS_NEXT     - ooo_engine. in_EVENT_ADDRESS_NEXT     
383        // out_EVENT_ADDRESS_NEXT_VAL - ooo_engine. in_EVENT_ADDRESS_NEXT_VAL
384        // out_EVENT_IS_DS_TAKE       - ooo_engine. in_EVENT_IS_DS_TAKE     
385
386        // ~~~~~[ Interface "spr_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
387        //out_SPR_EVENT_VAL       - ooo_engine. in_SPR_EVENT_VAL     
388        // in_SPR_EVENT_ACK       - ooo_engine.out_SPR_EVENT_ACK     
389        //out_SPR_EVENT_EPCR      - ooo_engine. in_SPR_EVENT_EPCR     
390        //out_SPR_EVENT_EEAR_WEN  - ooo_engine. in_SPR_EVENT_EEAR_WEN
391        //out_SPR_EVENT_EEAR      - ooo_engine. in_SPR_EVENT_EEAR     
392        //out_SPR_EVENT_SR_DSX    - ooo_engine. in_SPR_EVENT_SR_DSX   
393        //out_SPR_EVENT_SR_TO_ESR - ooo_engine. in_SPR_EVENT_SR_TO_ESR
394       
395        // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
396        // in_NB_INST_COMMIT_ALL - ooo_engine.out_NB_INST_COMMIT_ALL
397        // in_NB_INST_COMMIT_MEM - ooo_engine.out_NB_INST_COMMIT_MEM
398       
399        // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
400        // out_DEPTH_MIN  - ooo_engine. in_DEPTH_MIN     
401        // out_DEPTH_MAX  - ooo_engine. in_DEPTH_MAX
402        // out_DEPTH_FULL - ooo_engine. in_DEPTH_FULL
403       
404        // ~~~~~[ Interface : "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
405        //  in_SPR_SR_IEE - ooo_engine.out_SPR_SR_IEE
406        //  in_SPR_SR_EPH - ooo_engine.out_SPR_SR_EPH
407       
408        // ~~~~~[ Interface : "interrupt" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
409        for (uint32_t j=0; j<_param->_nb_context [i]; ++j)
410          {
411            uint32_t x = _param->_link_thread_with_context [i][j];
412
413            dest = _name;
414#ifdef POSITION
415            _component->interface_map (src ,"interrupt_"+toString(j),
416                                       dest,"interrupt_"+toString(x));
417#endif
418           
419            PORT_MAP(_component,src , "in_INTERRUPT_"+toString(j)+"_ENABLE",
420                                dest, "in_INTERRUPT_"+toString(x)+"_ENABLE");
421          }
422      }
423   
424    // ===================================================================
425    // =====[ ooo_engine ]================================================
426    // ===================================================================
427    for (uint32_t i=0; i<_param->_nb_ooo_engine; ++i)
428      {
429        src = _name+"_ooo_engine_"+toString(i);
430        log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
431       
432        // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
433        {
434          dest = _name;
435#ifdef POSITION
436          _component->interface_map (src ,"",
437                                     dest,"");
438#endif
439          PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
440          PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
441        }
442
443        // ~~~~~[ Interface : "rename" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
444        for (uint32_t j=0; j<_param->_ooo_engine_nb_front_end [i]; ++j)
445          for (uint32_t k=0; k<_param->_ooo_engine_nb_inst_decod[i][j]; ++k)
446            {
447              uint32_t x = _param->_translate_ooo_engine_num_front_end [i][j];
448              dest = _name+"_front_end_"+toString(x);
449#ifdef POSITION
450              _component->interface_map (src ,"rename_"+toString(j)+"_"+toString(k),
451                                         dest,"decod_"                 +toString(k));
452#endif
453             
454              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_VAL"          ,
455                                       dest,"out_DECOD_"                 +toString(k)+"_VAL"          );
456              COMPONENT_MAP(_component,src ,"out_RENAME_"+toString(j)+"_"+toString(k)+"_ACK"          ,
457                                       dest, "in_DECOD_"                 +toString(k)+"_ACK"          );
458              if (_param->_have_port_context_id)
459              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_CONTEXT_ID"   ,
460                                       dest,"out_DECOD_"                 +toString(k)+"_CONTEXT_ID"   );
461              if (_param->_have_port_depth)
462              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_DEPTH"        ,
463                                       dest,"out_DECOD_"                 +toString(k)+"_DEPTH"        );
464#ifdef STATISTICS
465              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_INSTRUCTION"  ,
466                                       dest,"out_DECOD_"                 +toString(k)+"_INSTRUCTION"  );
467#endif
468              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_TYPE"         ,
469                                       dest,"out_DECOD_"                 +toString(k)+"_TYPE"         );
470              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_OPERATION"    ,
471                                       dest,"out_DECOD_"                 +toString(k)+"_OPERATION"    );
472              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_NO_EXECUTE"   ,
473                                       dest,"out_DECOD_"                 +toString(k)+"_NO_EXECUTE"   );
474//               COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_HAVE_EVENT"   ,
475//                                        dest,"out_DECOD_"                 +toString(k)+"_HAVE_EVENT"   );
476              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_LAST_EVENT"   ,
477                                       dest,"out_DECOD_"                 +toString(k)+"_LAST_EVENT"   );
478              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_IS_DELAY_SLOT",
479                                       dest,"out_DECOD_"                 +toString(k)+"_IS_DELAY_SLOT");
480#ifdef DEBUG
481              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_ADDRESS"      ,
482                                       dest,"out_DECOD_"                 +toString(k)+"_ADDRESS"      );
483#endif
484              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_ADDRESS_NEXT" ,
485                                       dest,"out_DECOD_"                 +toString(k)+"_ADDRESS_NEXT" );
486              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_HAS_IMMEDIAT" ,
487                                       dest,"out_DECOD_"                 +toString(k)+"_HAS_IMMEDIAT" );
488              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_IMMEDIAT"     ,
489                                       dest,"out_DECOD_"                 +toString(k)+"_IMMEDIAT"     );
490              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_READ_RA"      ,
491                                       dest,"out_DECOD_"                 +toString(k)+"_READ_RA"      );
492              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_NUM_REG_RA"   ,
493                                       dest,"out_DECOD_"                 +toString(k)+"_NUM_REG_RA"   );
494              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_READ_RB"      ,
495                                       dest,"out_DECOD_"                 +toString(k)+"_READ_RB"      );
496              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_NUM_REG_RB"   ,
497                                       dest,"out_DECOD_"                 +toString(k)+"_NUM_REG_RB"   );
498              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_READ_RC"      ,
499                                       dest,"out_DECOD_"                 +toString(k)+"_READ_RC"      );
500              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_NUM_REG_RC"   ,
501                                       dest,"out_DECOD_"                 +toString(k)+"_NUM_REG_RC"   );
502              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_WRITE_RD"     ,
503                                       dest,"out_DECOD_"                 +toString(k)+"_WRITE_RD"     );
504              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_NUM_REG_RD"   ,
505                                       dest,"out_DECOD_"                 +toString(k)+"_NUM_REG_RD"   );
506              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_WRITE_RE"     ,
507                                       dest,"out_DECOD_"                 +toString(k)+"_WRITE_RE"     );
508              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_NUM_REG_RE"   ,
509                                       dest,"out_DECOD_"                 +toString(k)+"_NUM_REG_RE"   );
510              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_EXCEPTION_USE",
511                                       dest,"out_DECOD_"                 +toString(k)+"_EXCEPTION_USE");
512              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_EXCEPTION"    ,
513                                       dest,"out_DECOD_"                 +toString(k)+"_EXCEPTION"    );
514       
515              dest = _name+"_glue";
516#ifdef POSITION
517              _component->interface_map (src ,"rename_"+toString(j)+"_"+toString(k),
518                                         dest,"rename_"+toString(j)+"_"+toString(k));
519#endif
520              if (_param->_have_port_front_end_id)
521              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_FRONT_END_ID" ,
522                                       dest,"out_RENAME_"+toString(j)+"_"+toString(k)+"_FRONT_END_ID" );
523            }
524
525        // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~
526        for (uint32_t j=0; j<_param->_nb_inst_branch_complete[i];++j)
527          {
528            dest = _name+"_glue";
529#ifdef POSITION
530            _component->interface_map (src ,"branch_complete_"                           +toString(j),
531                                       dest,"branch_complete_ooo_engine_"+toString(i)+"_"+toString(j));
532#endif
533
534            COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"                           +toString(j)+"_VAL"            ,
535                                     dest, "in_BRANCH_COMPLETE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_VAL"            );
536            COMPONENT_MAP(_component,src , "in_BRANCH_COMPLETE_"                           +toString(j)+"_ACK"            ,
537                                     dest,"out_BRANCH_COMPLETE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_ACK"            );
538            if (_param->_have_port_front_end_id)
539            COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"                           +toString(j)+"_FRONT_END_ID"   ,
540                                     dest, "in_BRANCH_COMPLETE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID"   );
541            if (_param->_have_port_context_id)
542            COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"                           +toString(j)+"_CONTEXT_ID"     ,
543                                     dest, "in_BRANCH_COMPLETE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID"     );
544            if (_param->_have_port_depth)
545            COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"                           +toString(j)+"_DEPTH"          ,
546                                     dest, "in_BRANCH_COMPLETE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_DEPTH"          );
547            COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"                           +toString(j)+"_ADDRESS"        ,
548                                     dest, "in_BRANCH_COMPLETE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_ADDRESS"        );
549            COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"                           +toString(j)+"_NO_SEQUENCE"    ,
550                                     dest, "in_BRANCH_COMPLETE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_NO_SEQUENCE"    );
551            COMPONENT_MAP(_component,src , "in_BRANCH_COMPLETE_"                           +toString(j)+"_MISS_PREDICTION",
552                                     dest,"out_BRANCH_COMPLETE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_MISS_PREDICTION");
553          }     
554
555        // ~~~~~[ Interface : "commit_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~
556        {
557          dest = _name+"_glue";
558#ifdef POSITION
559          _component->interface_map (src ,"commit_event",
560                                     dest,"commit_event_ooo_engine_"+toString(i));
561#endif
562         
563          COMPONENT_MAP(_component,src ,"out_COMMIT_EVENT_VAL"             ,
564                                   dest, "in_COMMIT_EVENT_OOO_ENGINE_"+toString(i)+"_VAL"             );
565          COMPONENT_MAP(_component,src , "in_COMMIT_EVENT_ACK"             ,
566                                   dest,"out_COMMIT_EVENT_OOO_ENGINE_"+toString(i)+"_ACK"             );
567          if (_param->_have_port_front_end_id)
568          COMPONENT_MAP(_component,src ,"out_COMMIT_EVENT_FRONT_END_ID"    ,
569                                   dest, "in_COMMIT_EVENT_OOO_ENGINE_"+toString(i)+"_FRONT_END_ID"    );
570          if (_param->_have_port_context_id)
571          COMPONENT_MAP(_component,src ,"out_COMMIT_EVENT_CONTEXT_ID"      ,
572                                   dest, "in_COMMIT_EVENT_OOO_ENGINE_"+toString(i)+"_CONTEXT_ID"      );
573          if (_param->_have_port_depth)
574          COMPONENT_MAP(_component,src ,"out_COMMIT_EVENT_DEPTH"           ,
575                                   dest, "in_COMMIT_EVENT_OOO_ENGINE_"+toString(i)+"_DEPTH"           );
576          COMPONENT_MAP(_component,src ,"out_COMMIT_EVENT_TYPE"            ,
577                                   dest, "in_COMMIT_EVENT_OOO_ENGINE_"+toString(i)+"_TYPE"            );
578          COMPONENT_MAP(_component,src ,"out_COMMIT_EVENT_IS_DELAY_SLOT"   ,
579                                   dest, "in_COMMIT_EVENT_OOO_ENGINE_"+toString(i)+"_IS_DELAY_SLOT"   );
580          COMPONENT_MAP(_component,src ,"out_COMMIT_EVENT_ADDRESS"         ,
581                                   dest, "in_COMMIT_EVENT_OOO_ENGINE_"+toString(i)+"_ADDRESS"         );
582          COMPONENT_MAP(_component,src ,"out_COMMIT_EVENT_ADDRESS_EPCR_VAL",
583                                   dest, "in_COMMIT_EVENT_OOO_ENGINE_"+toString(i)+"_ADDRESS_EPCR_VAL");
584          COMPONENT_MAP(_component,src ,"out_COMMIT_EVENT_ADDRESS_EPCR"    ,
585                                   dest, "in_COMMIT_EVENT_OOO_ENGINE_"+toString(i)+"_ADDRESS_EPCR"    );
586          COMPONENT_MAP(_component,src ,"out_COMMIT_EVENT_ADDRESS_EEAR_VAL",
587                                   dest, "in_COMMIT_EVENT_OOO_ENGINE_"+toString(i)+"_ADDRESS_EEAR_VAL");
588          COMPONENT_MAP(_component,src ,"out_COMMIT_EVENT_ADDRESS_EEAR"    ,
589                                   dest, "in_COMMIT_EVENT_OOO_ENGINE_"+toString(i)+"_ADDRESS_EEAR"    );
590        }
591
592        // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
593        for (uint32_t j=0; j<_param->_ooo_engine_nb_front_end [i]; ++j)
594          {
595            uint32_t x = _param->_translate_ooo_engine_num_front_end [i][j];
596            for (uint32_t k=0; k<_param->_nb_context[x]; ++k)
597              {
598                dest = _name+"_front_end_"+toString(x);
599#ifdef POSITION
600                _component->interface_map (src ,"event_"+toString(j)+"_"+toString(k),
601                                           dest,"event_"                +toString(k));
602#endif
603
604                COMPONENT_MAP(_component,src , "in_EVENT_"+toString(j)+"_"+toString(k)+"_VAL"             ,
605                                         dest,"out_EVENT_"                +toString(k)+"_VAL"             );
606                COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(j)+"_"+toString(k)+"_ACK"             ,
607                                         dest, "in_EVENT_"                +toString(k)+"_ACK"             );
608                COMPONENT_MAP(_component,src , "in_EVENT_"+toString(j)+"_"+toString(k)+"_ADDRESS"         ,
609                                         dest,"out_EVENT_"                +toString(k)+"_ADDRESS"         );
610                COMPONENT_MAP(_component,src , "in_EVENT_"+toString(j)+"_"+toString(k)+"_ADDRESS_NEXT"    ,
611                                         dest,"out_EVENT_"                +toString(k)+"_ADDRESS_NEXT"    ); 
612                COMPONENT_MAP(_component,src , "in_EVENT_"+toString(j)+"_"+toString(k)+"_ADDRESS_NEXT_VAL",
613                                         dest,"out_EVENT_"                +toString(k)+"_ADDRESS_NEXT_VAL");
614                COMPONENT_MAP(_component,src , "in_EVENT_"+toString(j)+"_"+toString(k)+"_IS_DS_TAKE"      ,
615                                         dest,"out_EVENT_"                +toString(k)+"_IS_DS_TAKE"      );
616              }
617          }
618
619        // ~~~~~[ Interface "spr_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
620        for (uint32_t j=0; j<_param->_ooo_engine_nb_front_end [i]; ++j)
621          {
622            uint32_t x = _param->_translate_ooo_engine_num_front_end [i][j];
623            for (uint32_t k=0; k<_param->_nb_context[x]; ++k)
624              {
625                dest = _name+"_front_end_"+toString(x);
626#ifdef POSITION
627                _component->interface_map (src ,"spr_event_"+toString(j)+"_"+toString(k),
628                                           dest,"spr_event_"                +toString(k));
629#endif
630                COMPONENT_MAP(_component,src , "in_SPR_EVENT_"+toString(j)+"_"+toString(k)+"_VAL"      ,
631                                         dest,"out_SPR_EVENT_"                +toString(k)+"_VAL"      );
632                COMPONENT_MAP(_component,src ,"out_SPR_EVENT_"+toString(j)+"_"+toString(k)+"_ACK"      ,
633                                         dest, "in_SPR_EVENT_"                +toString(k)+"_ACK"      );
634                COMPONENT_MAP(_component,src , "in_SPR_EVENT_"+toString(j)+"_"+toString(k)+"_EPCR"     ,
635                                         dest,"out_SPR_EVENT_"                +toString(k)+"_EPCR"     );
636                COMPONENT_MAP(_component,src , "in_SPR_EVENT_"+toString(j)+"_"+toString(k)+"_EEAR_WEN" ,
637                                         dest,"out_SPR_EVENT_"                +toString(k)+"_EEAR_WEN" );
638                COMPONENT_MAP(_component,src , "in_SPR_EVENT_"+toString(j)+"_"+toString(k)+"_EEAR"     ,
639                                         dest,"out_SPR_EVENT_"                +toString(k)+"_EEAR"     );
640                COMPONENT_MAP(_component,src , "in_SPR_EVENT_"+toString(j)+"_"+toString(k)+"_SR_DSX"   ,
641                                         dest,"out_SPR_EVENT_"                +toString(k)+"_SR_DSX"   );
642                COMPONENT_MAP(_component,src , "in_SPR_EVENT_"+toString(j)+"_"+toString(k)+"_SR_TO_ESR",
643                                         dest,"out_SPR_EVENT_"                +toString(k)+"_SR_TO_ESR");
644              }
645          }
646
647        // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
648        for (uint32_t j=0; j<_param->_ooo_engine_nb_front_end [i]; ++j)
649          {
650            uint32_t x = _param->_translate_ooo_engine_num_front_end [i][j];
651            for (uint32_t k=0; k<_param->_nb_context[x]; ++k)
652              {
653                dest = _name+"_front_end_"+toString(x);
654#ifdef POSITION
655                _component->interface_map (src ,"nb_inst_"+toString(j)+"_"+toString(k),
656                                           dest,"nb_inst_"                +toString(k));
657#endif
658                COMPONENT_MAP(_component,src ,"out_NB_INST_"+toString(j)+"_"+toString(k)+"_COMMIT_ALL",
659                                         dest, "in_NB_INST_"                +toString(k)+"_COMMIT_ALL");
660                COMPONENT_MAP(_component,src ,"out_NB_INST_"+toString(j)+"_"+toString(k)+"_COMMIT_MEM",
661                                         dest, "in_NB_INST_"                +toString(k)+"_COMMIT_MEM");
662                COMPONENT_MAP(_component,src , "in_NB_INST_"+toString(j)+"_"+toString(k)+"_DECOD_ALL" ,
663                                         dest,"out_NB_INST_"                +toString(k)+"_DECOD_ALL" );
664              }
665          }
666
667        // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
668        for (uint32_t j=0; j<_param->_ooo_engine_nb_front_end [i]; ++j)
669          {
670            uint32_t x = _param->_translate_ooo_engine_num_front_end [i][j];
671            for (uint32_t k=0; k<_param->_nb_context[x]; ++k)
672              {
673                dest = _name+"_front_end_"+toString(x);
674#ifdef POSITION
675                _component->interface_map (src ,"depth_"+toString(j)+"_"+toString(k),
676                                           dest,"depth_"                +toString(k));
677#endif
678
679                if (_param->_have_port_depth)
680                  {
681                COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(j)+"_"+toString(k)+"_MIN",
682                                         dest,"out_DEPTH_"                +toString(k)+"_MIN");
683                COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(j)+"_"+toString(k)+"_MAX",
684                                         dest,"out_DEPTH_"                +toString(k)+"_MAX");
685                  }
686                COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(j)+"_"+toString(k)+"_FULL",
687                                         dest,"out_DEPTH_"                +toString(k)+"_FULL");
688              }
689          }
690
691        // ~~~~~[ Interface : "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
692        for (uint32_t j=0; j<_param->_ooo_engine_nb_front_end [i]; ++j)
693          {
694            uint32_t x = _param->_translate_ooo_engine_num_front_end [i][j];
695            for (uint32_t k=0; k<_param->_nb_context[x]; ++k)
696              {
697                dest = _name+"_front_end_"+toString(x);
698#ifdef POSITION
699                _component->interface_map (src ,"spr_"+toString(j)+"_"+toString(k),
700                                           dest,"spr_"                +toString(k));
701#endif
702
703                COMPONENT_MAP(_component,src ,"out_SPR_"+toString(j)+"_"+toString(k)+"_SR_IEE",
704                                         dest, "in_SPR_"                +toString(k)+"_SR_IEE");
705                COMPONENT_MAP(_component,src ,"out_SPR_"+toString(j)+"_"+toString(k)+"_SR_EPH",
706                                         dest, "in_SPR_"                +toString(k)+"_SR_EPH");
707              }
708          }
709
710        // ~~~~~[ Interface : "issue" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
711        for (uint32_t j=0; j<_param->_nb_inst_issue_queue [i]; ++j)
712          {
713            dest = _name+"_glue";
714#ifdef POSITION
715            _component->interface_map (src ,"issue_"                           +toString(j),
716                                       dest,"issue_ooo_engine_"+toString(i)+"_"+toString(j));
717#endif
718
719            COMPONENT_MAP(_component,src ,"out_ISSUE_"                           +toString(j)+"_VAL"                  ,
720                                     dest, "in_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_VAL"                  );
721            COMPONENT_MAP(_component,src , "in_ISSUE_"                           +toString(j)+"_ACK"                  ,
722                                     dest,"out_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_ACK"                  );
723            if (_param->_have_port_front_end_id)
724            COMPONENT_MAP(_component,src ,"out_ISSUE_"                           +toString(j)+"_FRONT_END_ID"         ,
725                                     dest, "in_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID"         );
726            if (_param->_have_port_context_id)
727            COMPONENT_MAP(_component,src ,"out_ISSUE_"                           +toString(j)+"_CONTEXT_ID"           ,
728                                     dest, "in_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID"           );
729            if (_param->_have_port_rob_ptr)
730            COMPONENT_MAP(_component,src ,"out_ISSUE_"                           +toString(j)+"_PACKET_ID"            ,
731                                     dest, "in_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_PACKET_ID"            );
732            COMPONENT_MAP(_component,src ,"out_ISSUE_"                           +toString(j)+"_TYPE"                 ,
733                                     dest, "in_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_TYPE"                 );
734            COMPONENT_MAP(_component,src ,"out_ISSUE_"                           +toString(j)+"_OPERATION"            ,
735                                     dest, "in_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_OPERATION"            );
736            COMPONENT_MAP(_component,src ,"out_ISSUE_"                           +toString(j)+"_CANCEL"               ,
737                                     dest, "in_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_CANCEL"               );
738            COMPONENT_MAP(_component,src ,"out_ISSUE_"                           +toString(j)+"_STORE_QUEUE_PTR_WRITE",
739                                     dest, "in_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_STORE_QUEUE_PTR_WRITE");
740            COMPONENT_MAP(_component,src ,"out_ISSUE_"                           +toString(j)+"_STORE_QUEUE_PTR_READ" ,
741                                     dest, "in_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_STORE_QUEUE_PTR_READ" );
742            COMPONENT_MAP(_component,src ,"out_ISSUE_"                           +toString(j)+"_STORE_QUEUE_EMPTY"    ,
743                                     dest, "in_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_STORE_QUEUE_EMPTY"    );
744            if (_param->_have_port_load_queue_ptr)
745            COMPONENT_MAP(_component,src ,"out_ISSUE_"                           +toString(j)+"_LOAD_QUEUE_PTR_WRITE" ,
746                                     dest, "in_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_LOAD_QUEUE_PTR_WRITE" );
747            COMPONENT_MAP(_component,src ,"out_ISSUE_"                           +toString(j)+"_HAS_IMMEDIAT"         ,
748                                     dest, "in_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_HAS_IMMEDIAT"         );
749            COMPONENT_MAP(_component,src ,"out_ISSUE_"                           +toString(j)+"_IMMEDIAT"             ,
750                                     dest, "in_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_IMMEDIAT"             );
751            COMPONENT_MAP(_component,src ,"out_ISSUE_"                           +toString(j)+"_READ_RA"              ,
752                                     dest, "in_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_READ_RA"              );
753            COMPONENT_MAP(_component,src ,"out_ISSUE_"                           +toString(j)+"_NUM_REG_RA"           ,
754                                     dest, "in_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RA"           );
755            COMPONENT_MAP(_component,src ,"out_ISSUE_"                           +toString(j)+"_READ_RB"              ,
756                                     dest, "in_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_READ_RB"              );
757            COMPONENT_MAP(_component,src ,"out_ISSUE_"                           +toString(j)+"_NUM_REG_RB"           ,
758                                     dest, "in_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RB"           );
759            COMPONENT_MAP(_component,src ,"out_ISSUE_"                           +toString(j)+"_READ_RC"              ,
760                                     dest, "in_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_READ_RC"              );
761            COMPONENT_MAP(_component,src ,"out_ISSUE_"                           +toString(j)+"_NUM_REG_RC"           ,
762                                     dest, "in_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RC"           );
763            COMPONENT_MAP(_component,src ,"out_ISSUE_"                           +toString(j)+"_WRITE_RD"             ,
764                                     dest, "in_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_WRITE_RD"             );
765            COMPONENT_MAP(_component,src ,"out_ISSUE_"                           +toString(j)+"_NUM_REG_RD"           ,
766                                     dest, "in_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RD"           );
767            COMPONENT_MAP(_component,src ,"out_ISSUE_"                           +toString(j)+"_WRITE_RE"             ,
768                                     dest, "in_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_WRITE_RE"             );
769            COMPONENT_MAP(_component,src ,"out_ISSUE_"                           +toString(j)+"_NUM_REG_RE"           ,
770                                     dest, "in_ISSUE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RE"           );
771          }
772
773        // ~~~~~[ Interface "execute_loop" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
774        for (uint32_t j=0; j<_param->_ooo_engine_nb_execute_loop [i]; ++j)
775          {
776            for (uint32_t k=0; k<_param->_ooo_engine_nb_inst_execute [i][j]; ++k)
777              {
778                dest = _name+"_glue";
779#ifdef POSITION
780                _component->interface_map (src ,"execute_loop_"                      +toString(j)+"_"+toString(k),
781                                           dest,"execute_ooo_engine_"+toString(i)+"_"+toString(j)+"_"+toString(k));
782#endif
783
784                COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_"                      +toString(j)+"_"+toString(k)+"_VAL"         ,
785                                         dest,"out_EXECUTE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_"+toString(k)+"_VAL"         );
786                COMPONENT_MAP(_component,src ,"out_EXECUTE_LOOP_"                      +toString(j)+"_"+toString(k)+"_ACK"         ,
787                                         dest, "in_EXECUTE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_"+toString(k)+"_ACK"         );
788                if (_param->_have_port_front_end_id)
789                COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_"                      +toString(j)+"_"+toString(k)+"_FRONT_END_ID",
790                                         dest,"out_EXECUTE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_"+toString(k)+"_FRONT_END_ID");
791                if (_param->_have_port_context_id)
792                COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_"                      +toString(j)+"_"+toString(k)+"_CONTEXT_ID"  ,
793                                         dest,"out_EXECUTE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_"+toString(k)+"_CONTEXT_ID"  );
794                if (_param->_have_port_rob_ptr)
795                COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_"                      +toString(j)+"_"+toString(k)+"_PACKET_ID"   ,
796                                         dest,"out_EXECUTE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_"+toString(k)+"_PACKET_ID"   );
797//              COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_"                      +toString(j)+"_"+toString(k)+"_TYPE"        ,
798//                                       dest,"out_EXECUTE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_"+toString(k)+"_TYPE"        );
799//              COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_"                      +toString(j)+"_"+toString(k)+"_OPERATION"   ,
800//                                       dest,"out_EXECUTE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_"+toString(k)+"_OPERATION"   );
801                COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_"                      +toString(j)+"_"+toString(k)+"_CANCEL"      ,
802                                         dest,"out_EXECUTE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_"+toString(k)+"_CANCEL"      );
803                COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_"                      +toString(j)+"_"+toString(k)+"_FLAGS"       ,
804                                         dest,"out_EXECUTE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_"+toString(k)+"_FLAGS"       );
805                COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_"                      +toString(j)+"_"+toString(k)+"_EXCEPTION"   ,
806                                         dest,"out_EXECUTE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_"+toString(k)+"_EXCEPTION"   );
807                COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_"                      +toString(j)+"_"+toString(k)+"_NO_SEQUENCE" ,
808                                         dest,"out_EXECUTE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_"+toString(k)+"_NO_SEQUENCE" );
809                COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_"                      +toString(j)+"_"+toString(k)+"_ADDRESS"     ,
810                                         dest,"out_EXECUTE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_"+toString(k)+"_ADDRESS"     );
811                COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_"                      +toString(j)+"_"+toString(k)+"_DATA"        ,
812                                         dest,"out_EXECUTE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_"+toString(k)+"_DATA"        );
813              }
814          }
815
816//         // ~~~~~[ Interface "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
817//         for (uint32_t j=0; j<_param->_ooo_engine_nb_inst_insert_rob [i]; ++j)
818//           {
819//             dest = _name+"_glue";
820// #ifdef POSITION
821//             _component->interface_map (src ,"insert_"                           +toString(j),
822//                                        dest,"insert_ooo_engine_"+toString(i)+"_"+toString(j));
823// #endif
824           
825//             COMPONENT_MAP(_component,src ,"out_INSERT_"                           +toString(j)+"_VAL"       ,
826//                                      dest, "in_INSERT_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_VAL"       );
827//             COMPONENT_MAP(_component,src , "in_INSERT_"                           +toString(j)+"_ACK"       ,
828//                                      dest,"out_INSERT_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_ACK"       );
829//             COMPONENT_MAP(_component,src ,"out_INSERT_"                           +toString(j)+"_RD_USE"    ,
830//                                      dest, "in_INSERT_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_RD_USE"    );
831//             COMPONENT_MAP(_component,src ,"out_INSERT_"                           +toString(j)+"_RD_NUM_REG",
832//                                      dest, "in_INSERT_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_RD_NUM_REG");
833//             COMPONENT_MAP(_component,src ,"out_INSERT_"                           +toString(j)+"_RE_USE"    ,
834//                                      dest, "in_INSERT_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_RE_USE"    );
835//             COMPONENT_MAP(_component,src ,"out_INSERT_"                           +toString(j)+"_RE_NUM_REG",
836//                                      dest, "in_INSERT_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_RE_NUM_REG");
837//           }
838      }
839
840    // ===================================================================
841    // =====[ execute_loop ]==============================================
842    // ===================================================================
843    for (uint32_t i=0; i<_param->_nb_execute_loop; ++i)
844      {
845        src = _name+"_execute_loop_"+toString(i);
846        log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
847       
848        // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
849        {
850          dest = _name;
851#ifdef POSITION
852          _component->interface_map (src ,"",
853                                     dest,"");
854#endif
855          PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
856          PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
857        }
858
859        // ~~~~~[ Interface "execute_loop_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~
860        for (uint32_t j=0; j<_param->_nb_read_unit[i]; ++j)
861          {
862            dest = _name+"_glue";
863#ifdef POSITION
864            _component->interface_map (src ,"execute_loop_in_"                   +toString(j),
865                                       dest,"issue_execute_loop_"+toString(i)+"_"+toString(j));
866#endif
867
868            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_VAL"                  ,
869                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_VAL"                  );
870            COMPONENT_MAP(_component,src ,"out_EXECUTE_LOOP_IN_"                   +toString(j)+"_ACK"                  ,
871                                     dest, "in_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_ACK"                  );
872            if (_param->_have_port_front_end_id)
873            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_FRONT_END_ID"         ,
874                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID"         );
875            if (_param->_have_port_context_id)
876            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_CONTEXT_ID"           ,
877                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID"           );
878            if (_param->_have_port_ooo_engine_id)
879            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_OOO_ENGINE_ID"        ,
880                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_OOO_ENGINE_ID"        );
881            if (_param->_have_port_rob_ptr)
882            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_PACKET_ID"            ,
883                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_PACKET_ID"            );
884            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_OPERATION"            ,
885                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_OPERATION"            );
886            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_TYPE"                 ,
887                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_TYPE"                 );
888            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_CANCEL"               ,
889                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_CANCEL"               );
890            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_STORE_QUEUE_PTR_WRITE",
891                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_STORE_QUEUE_PTR_WRITE");
892            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_STORE_QUEUE_PTR_READ" ,
893                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_STORE_QUEUE_PTR_READ" );
894            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_STORE_QUEUE_EMPTY"    ,
895                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_STORE_QUEUE_EMPTY"    );
896            if (_param->_have_port_load_queue_ptr)
897            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_LOAD_QUEUE_PTR_WRITE" ,
898                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_LOAD_QUEUE_PTR_WRITE" );
899            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_HAS_IMMEDIAT"         ,
900                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_HAS_IMMEDIAT"         );
901            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_IMMEDIAT"             ,
902                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_IMMEDIAT"             );
903            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_READ_RA"              ,
904                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_READ_RA"              );
905            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_NUM_REG_RA"           ,
906                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_NUM_REG_RA"           );
907            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_READ_RB"              ,
908                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_READ_RB"              );
909            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_NUM_REG_RB"           ,
910                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_NUM_REG_RB"           );
911            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_READ_RC"              ,
912                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_READ_RC"              );
913            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_NUM_REG_RC"           ,
914                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_NUM_REG_RC"           );
915            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_WRITE_RD"             ,
916                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_WRITE_RD"             );
917            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_NUM_REG_RD"           ,
918                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_NUM_REG_RD"           );
919            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_WRITE_RE"             ,
920                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_WRITE_RE"             );
921            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_IN_"                   +toString(j)+"_NUM_REG_RE"           ,
922                                     dest,"out_ISSUE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_NUM_REG_RE"           );
923          }
924
925        // ~~~~~[ Interface "execute_loop_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~
926        for (uint32_t j=0; j<_param->_nb_write_unit[i]; ++j)
927          {
928            dest = _name+"_glue";
929#ifdef POSITION
930            _component->interface_map (src ,"execute_loop_out_"                    +toString(j),
931                                       dest,"execute_execute_loop_"+toString(i)+"_"+toString(j));
932#endif
933
934            COMPONENT_MAP(_component,src ,"out_EXECUTE_LOOP_OUT_"                    +toString(j)+"_VAL"          ,
935                                     dest, "in_EXECUTE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_VAL"          );
936            COMPONENT_MAP(_component,src , "in_EXECUTE_LOOP_OUT_"                    +toString(j)+"_ACK"          ,
937                                     dest,"out_EXECUTE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_ACK"          );
938            if (_param->_have_port_context_id)
939            COMPONENT_MAP(_component,src ,"out_EXECUTE_LOOP_OUT_"                    +toString(j)+"_CONTEXT_ID"   ,
940                                     dest, "in_EXECUTE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID"   );
941            if (_param->_have_port_front_end_id)
942            COMPONENT_MAP(_component,src ,"out_EXECUTE_LOOP_OUT_"                    +toString(j)+"_FRONT_END_ID" ,
943                                     dest, "in_EXECUTE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID" );
944            if (_param->_have_port_ooo_engine_id)
945            COMPONENT_MAP(_component,src ,"out_EXECUTE_LOOP_OUT_"                    +toString(j)+"_OOO_ENGINE_ID",
946                                     dest, "in_EXECUTE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_OOO_ENGINE_ID");
947            if (_param->_have_port_rob_ptr)
948            COMPONENT_MAP(_component,src ,"out_EXECUTE_LOOP_OUT_"                    +toString(j)+"_PACKET_ID"    ,
949                                     dest, "in_EXECUTE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_PACKET_ID"    );
950//          COMPONENT_MAP(_component,src ,"out_EXECUTE_LOOP_OUT_"                    +toString(j)+"_OPERATION"    ,
951//                                   dest, "in_EXECUTE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_OPERATION"    );
952//          COMPONENT_MAP(_component,src ,"out_EXECUTE_LOOP_OUT_"                    +toString(j)+"_TYPE"         ,
953//                                   dest, "in_EXECUTE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_TYPE"         );
954            COMPONENT_MAP(_component,src ,"out_EXECUTE_LOOP_OUT_"                    +toString(j)+"_CANCEL"       ,
955                                     dest, "in_EXECUTE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_CANCEL"       );
956            COMPONENT_MAP(_component,src ,"out_EXECUTE_LOOP_OUT_"                    +toString(j)+"_FLAGS"        ,
957                                     dest, "in_EXECUTE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_FLAGS"        );
958            COMPONENT_MAP(_component,src ,"out_EXECUTE_LOOP_OUT_"                    +toString(j)+"_EXCEPTION"    ,
959                                     dest, "in_EXECUTE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_EXCEPTION"    );
960            COMPONENT_MAP(_component,src ,"out_EXECUTE_LOOP_OUT_"                    +toString(j)+"_NO_SEQUENCE"  ,
961                                     dest, "in_EXECUTE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_NO_SEQUENCE"  );
962            COMPONENT_MAP(_component,src ,"out_EXECUTE_LOOP_OUT_"                    +toString(j)+"_ADDRESS"      ,
963                                     dest, "in_EXECUTE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_ADDRESS"      );
964            COMPONENT_MAP(_component,src ,"out_EXECUTE_LOOP_OUT_"                    +toString(j)+"_DATA"         ,
965                                     dest, "in_EXECUTE_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_DATA"         );
966          }
967
968//         // ~~~~~[ Interface "insert_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
969//         for (uint32_t j=0; j<_param->_execute_loop_nb_ooo_engine[i]; ++j)
970//           for (uint32_t k=0; k<_param->_execute_loop_nb_inst_insert_rob[i][j]; ++k)
971//             {
972//               dest = _name+"_glue";
973// #ifdef POSITION
974//               _component->interface_map (src ,"insert_rob_"                         +toString(j)+"_"+toString(k),
975//                                          dest,"insert_execute_loop_"+toString(i)+"_"+toString(j)+"_"+toString(k));
976// #endif
977
978//               COMPONENT_MAP(_component,src , "in_INSERT_ROB_"                         +toString(j)+"_"+toString(k)+"_VAL"       ,
979//                                        dest,"out_INSERT_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_"+toString(k)+"_VAL"       );
980//               COMPONENT_MAP(_component,src ,"out_INSERT_ROB_"                         +toString(j)+"_"+toString(k)+"_ACK"       ,
981//                                        dest, "in_INSERT_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_"+toString(k)+"_ACK"       );
982//               COMPONENT_MAP(_component,src , "in_INSERT_ROB_"                         +toString(j)+"_"+toString(k)+"_RD_USE"    ,
983//                                        dest,"out_INSERT_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_"+toString(k)+"_RD_USE"    );
984//               COMPONENT_MAP(_component,src , "in_INSERT_ROB_"                         +toString(j)+"_"+toString(k)+"_RD_NUM_REG",
985//                                        dest,"out_INSERT_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_"+toString(k)+"_RD_NUM_REG");
986//               COMPONENT_MAP(_component,src , "in_INSERT_ROB_"                         +toString(j)+"_"+toString(k)+"_RE_USE"    ,
987//                                        dest,"out_INSERT_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_"+toString(k)+"_RE_USE"    );
988//               COMPONENT_MAP(_component,src , "in_INSERT_ROB_"                         +toString(j)+"_"+toString(k)+"_RE_NUM_REG",
989//                                        dest,"out_INSERT_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_"+toString(k)+"_RE_NUM_REG");
990//             }       
991
992        // ~~~~~[ Interface "dcache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
993        // out_DCACHE_REQ_VAL        - dcache_access. in_LSQ_REQ_VAL       
994        //  in_DCACHE_REQ_ACK        - dcache_access.out_LSQ_REQ_ACK       
995        // out_DCACHE_REQ_CONTEXT_ID - dcache_access. in_LSQ_REQ_CONTEXT_ID
996        // out_DCACHE_REQ_PACKET_ID  - dcache_access. in_LSQ_REQ_PACKET_ID
997        // out_DCACHE_REQ_ADDRESS    - dcache_access. in_LSQ_REQ_ADDRESS   
998        // out_DCACHE_REQ_TYPE       - dcache_access. in_LSQ_REQ_TYPE     
999        // out_DCACHE_REQ_WDATA      - dcache_access. in_LSQ_REQ_WDATA
1000
1001        // ~~~~~[ Interface "dcache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1002        //  in_DCACHE_RSP_VAL        - dcache_access.out_LSQ_RSP_VAL       
1003        // out_DCACHE_RSP_ACK        - dcache_access. in_LSQ_RSP_ACK       
1004        //  in_DCACHE_RSP_CONTEXT_ID - dcache_access.out_LSQ_RSP_CONTEXT_ID
1005        //  in_DCACHE_RSP_PACKET_ID  - dcache_access.out_LSQ_RSP_PACKET_ID
1006        //  in_DCACHE_RSP_RDATA      - dcache_access.out_LSQ_RSP_RDATA     
1007        //  in_DCACHE_RSP_ERROR      - dcache_access.out_LSQ_RSP_ERROR
1008      }
1009
1010    // ===================================================================
1011    // =====[ icache_access ]=============================================
1012    // ===================================================================
1013    {
1014      src = _name+"_icache_access";
1015      log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
1016     
1017      // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1018      {
1019        dest = _name;
1020#ifdef POSITION
1021        _component->interface_map (src ,"",
1022                                   dest,"");
1023#endif
1024        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
1025        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
1026      }
1027
1028    // ~~~~~[ Interface "icache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1029    for (uint32_t i=0; i<_param->_nb_icache_port; ++i)
1030      {
1031        dest = _name;
1032#ifdef POSITION
1033        _component->interface_map (src ,"icache_req_"+toString(i),
1034                                   dest,"icache_req_"+toString(i));
1035#endif
1036       
1037        PORT_MAP(_component,src ,"out_ICACHE_REQ_"+toString(i)+"_VAL"      ,
1038                            dest,"out_ICACHE_REQ_"+toString(i)+"_VAL"      );
1039        PORT_MAP(_component,src , "in_ICACHE_REQ_"+toString(i)+"_ACK"      ,
1040                            dest, "in_ICACHE_REQ_"+toString(i)+"_ACK"      );
1041        if (_param->_have_port_icache_thread_id)
1042        PORT_MAP(_component,src ,"out_ICACHE_REQ_"+toString(i)+"_THREAD_ID",
1043                            dest,"out_ICACHE_REQ_"+toString(i)+"_THREAD_ID");
1044        if (_param->_have_port_icache_packet_id)
1045        PORT_MAP(_component,src ,"out_ICACHE_REQ_"+toString(i)+"_PACKET_ID",
1046                            dest,"out_ICACHE_REQ_"+toString(i)+"_PACKET_ID");
1047        PORT_MAP(_component,src ,"out_ICACHE_REQ_"+toString(i)+"_ADDRESS"  ,
1048                            dest,"out_ICACHE_REQ_"+toString(i)+"_ADDRESS"  );
1049        PORT_MAP(_component,src ,"out_ICACHE_REQ_"+toString(i)+"_TYPE"     ,
1050                            dest,"out_ICACHE_REQ_"+toString(i)+"_TYPE"     );
1051      }
1052
1053    // ~~~~~[ Interface "icache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1054    for (uint32_t i=0; i<_param->_nb_icache_port; ++i)
1055      {
1056        dest = _name;
1057#ifdef POSITION
1058        _component->interface_map (src ,"icache_rsp_"+toString(i),
1059                                   dest,"icache_rsp_"+toString(i));
1060#endif
1061
1062        PORT_MAP(_component,src , "in_ICACHE_RSP_"+toString(i)+"_VAL"        ,
1063                            dest, "in_ICACHE_RSP_"+toString(i)+"_VAL"        );
1064        PORT_MAP(_component,src ,"out_ICACHE_RSP_"+toString(i)+"_ACK"        ,
1065                            dest,"out_ICACHE_RSP_"+toString(i)+"_ACK"        );
1066        if (_param->_have_port_icache_thread_id)
1067        PORT_MAP(_component,src , "in_ICACHE_RSP_"+toString(i)+"_THREAD_ID"  ,
1068                            dest, "in_ICACHE_RSP_"+toString(i)+"_THREAD_ID"  );
1069        if (_param->_have_port_icache_packet_id)
1070        PORT_MAP(_component,src , "in_ICACHE_RSP_"+toString(i)+"_PACKET_ID"  ,
1071                            dest, "in_ICACHE_RSP_"+toString(i)+"_PACKET_ID"  );
1072        PORT_MAP(_component,src , "in_ICACHE_RSP_"+toString(i)+"_ERROR"      ,
1073                            dest, "in_ICACHE_RSP_"+toString(i)+"_ERROR"      );
1074
1075        for (uint32_t j=0; j<_param->_icache_nb_instruction[i];++j)
1076          {
1077#ifdef POSITION
1078            _component->interface_map (src ,"icache_rsp_"+toString(i)+"_"+toString(j),
1079                                       dest,"icache_rsp_"+toString(i)+"_"+toString(j));
1080#endif
1081
1082                           
1083            PORT_MAP(_component,src , "in_ICACHE_RSP_"+toString(i)+"_"+toString(j)+"_INSTRUCTION",
1084                                dest, "in_ICACHE_RSP_"+toString(i)+"_"+toString(j)+"_INSTRUCTION");
1085          }
1086      }
1087
1088    // ~~~~~[ Interface "context_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1089    for (uint32_t i=0; i<_param->_nb_front_end; ++i)
1090      for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
1091        {
1092          dest = _name+"_front_end_"+toString(i);
1093#ifdef POSITION
1094          _component->interface_map (src ,"context_req_"+toString(i)+"_"+toString(j),
1095                                     dest,"icache_req_"                 +toString(j));
1096#endif
1097
1098          COMPONENT_MAP(_component,src , "in_CONTEXT_REQ_"+toString(i)+"_"+toString(j)+"_VAL"      ,
1099                                   dest,"out_ICACHE_REQ_"                 +toString(j)+"_VAL"      );
1100          COMPONENT_MAP(_component,src ,"out_CONTEXT_REQ_"+toString(i)+"_"+toString(j)+"_ACK"      ,
1101                                   dest, "in_ICACHE_REQ_"                 +toString(j)+"_ACK"      );
1102//        COMPONENT_MAP(_component,src , "in_CONTEXT_REQ_"+toString(i)+"_"+toString(j)+"_THREAD_ID",
1103//                                 dest,"out_ICACHE_REQ_"                 +toString(j)+"_THREAD_ID");
1104          if (_param->_have_port_icache_packet_id)
1105          COMPONENT_MAP(_component,src , "in_CONTEXT_REQ_"+toString(i)+"_"+toString(j)+"_PACKET_ID",
1106                                   dest,"out_ICACHE_REQ_"                 +toString(j)+"_PACKET_ID");
1107          COMPONENT_MAP(_component,src , "in_CONTEXT_REQ_"+toString(i)+"_"+toString(j)+"_ADDRESS"  ,
1108                                   dest,"out_ICACHE_REQ_"                 +toString(j)+"_ADDRESS"  );
1109          COMPONENT_MAP(_component,src , "in_CONTEXT_REQ_"+toString(i)+"_"+toString(j)+"_TYPE"     ,
1110                                   dest,"out_ICACHE_REQ_"                 +toString(j)+"_TYPE"     );
1111        }   
1112   
1113    // ~~~~~[ Interface "context_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1114    for (uint32_t i=0; i<_param->_nb_front_end; ++i)
1115      for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
1116        {
1117          dest = _name+"_front_end_"+toString(i);
1118#ifdef POSITION
1119          _component->interface_map (src ,"context_rsp_"+toString(i)+"_"+toString(j),
1120                                     dest,"icache_rsp_"                 +toString(j));
1121#endif
1122
1123          COMPONENT_MAP(_component,src ,"out_CONTEXT_RSP_"+toString(i)+"_"+toString(j)+"_VAL"        ,
1124                                   dest, "in_ICACHE_RSP_"                 +toString(j)+"_VAL"        );
1125          COMPONENT_MAP(_component,src , "in_CONTEXT_RSP_"+toString(i)+"_"+toString(j)+"_ACK"        ,
1126                                   dest,"out_ICACHE_RSP_"                 +toString(j)+"_ACK"        );
1127//        COMPONENT_MAP(_component,src ,"out_CONTEXT_RSP_"+toString(i)+"_"+toString(j)+"_THREAD_ID"  ,
1128//                                 dest, "in_ICACHE_RSP_"                 +toString(j)+"_THREAD_ID"  );
1129          if (_param->_have_port_icache_packet_id)
1130          COMPONENT_MAP(_component,src ,"out_CONTEXT_RSP_"+toString(i)+"_"+toString(j)+"_PACKET_ID"  ,
1131                                   dest, "in_ICACHE_RSP_"                 +toString(j)+"_PACKET_ID"  );
1132          COMPONENT_MAP(_component,src ,"out_CONTEXT_RSP_"+toString(i)+"_"+toString(j)+"_ERROR"      ,
1133                                   dest, "in_ICACHE_RSP_"                 +toString(j)+"_ERROR"      );
1134
1135          for (uint32_t k=0; k<_param->_front_end_nb_inst_fetch[i][j];++k)
1136            {
1137#ifdef POSITION
1138              _component->interface_map (src ,"context_rsp_"+toString(i)+"_"+toString(j)+"_"+toString(k),
1139                                         dest,"icache_rsp_"                 +toString(j)+"_"+toString(k));
1140#endif
1141             
1142              COMPONENT_MAP(_component,src ,"out_CONTEXT_RSP_"+toString(i)+"_"+toString(j)+"_"+toString(k)+"_INSTRUCTION",
1143                                       dest, "in_ICACHE_RSP_"                 +toString(j)+"_"+toString(k)+"_INSTRUCTION");
1144            }
1145         
1146        }
1147    }
1148
1149    // ===================================================================
1150    // =====[ dcache_access ]=============================================
1151    // ===================================================================
1152    {
1153      src = _name+"_dcache_access";
1154      log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
1155     
1156      // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1157      {
1158        dest = _name;
1159#ifdef POSITION
1160        _component->interface_map (src ,"",
1161                                   dest,"");
1162#endif
1163        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
1164        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
1165      }
1166
1167    // ~~~~~[ Interface "dcache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1168    for (uint32_t i=0; i<_param->_nb_dcache_port; ++i)
1169      {
1170        dest = _name;
1171#ifdef POSITION
1172        _component->interface_map (src ,"dcache_req_"+toString(i),
1173                                   dest,"dcache_req_"+toString(i));
1174#endif
1175       
1176        PORT_MAP(_component,src ,"out_DCACHE_REQ_"+toString(i)+"_VAL"      ,
1177                            dest,"out_DCACHE_REQ_"+toString(i)+"_VAL"      );
1178        PORT_MAP(_component,src , "in_DCACHE_REQ_"+toString(i)+"_ACK"      ,
1179                            dest, "in_DCACHE_REQ_"+toString(i)+"_ACK"      );
1180        if (_param->_have_port_dcache_thread_id)
1181        PORT_MAP(_component,src ,"out_DCACHE_REQ_"+toString(i)+"_THREAD_ID",
1182                            dest,"out_DCACHE_REQ_"+toString(i)+"_THREAD_ID");
1183        if (_param->_have_port_dcache_packet_id)
1184        PORT_MAP(_component,src ,"out_DCACHE_REQ_"+toString(i)+"_PACKET_ID",
1185                            dest,"out_DCACHE_REQ_"+toString(i)+"_PACKET_ID");
1186        PORT_MAP(_component,src ,"out_DCACHE_REQ_"+toString(i)+"_ADDRESS"  ,
1187                            dest,"out_DCACHE_REQ_"+toString(i)+"_ADDRESS"  );
1188        PORT_MAP(_component,src ,"out_DCACHE_REQ_"+toString(i)+"_WDATA"    ,
1189                            dest,"out_DCACHE_REQ_"+toString(i)+"_WDATA"    );
1190        PORT_MAP(_component,src ,"out_DCACHE_REQ_"+toString(i)+"_TYPE"     ,
1191                            dest,"out_DCACHE_REQ_"+toString(i)+"_TYPE"     );
1192      }
1193
1194    // ~~~~~[ Interface "dcache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1195    for (uint32_t i=0; i<_param->_nb_dcache_port; ++i)
1196      {
1197        dest = _name;
1198#ifdef POSITION
1199        _component->interface_map (src ,"dcache_rsp_"+toString(i),
1200                                   dest,"dcache_rsp_"+toString(i));
1201#endif
1202
1203        PORT_MAP(_component,src , "in_DCACHE_RSP_"+toString(i)+"_VAL"        ,
1204                            dest, "in_DCACHE_RSP_"+toString(i)+"_VAL"        );
1205        PORT_MAP(_component,src ,"out_DCACHE_RSP_"+toString(i)+"_ACK"        ,
1206                            dest,"out_DCACHE_RSP_"+toString(i)+"_ACK"        );
1207        if (_param->_have_port_dcache_thread_id)
1208        PORT_MAP(_component,src , "in_DCACHE_RSP_"+toString(i)+"_THREAD_ID"  ,
1209                            dest, "in_DCACHE_RSP_"+toString(i)+"_THREAD_ID"  );
1210        if (_param->_have_port_dcache_packet_id)
1211        PORT_MAP(_component,src , "in_DCACHE_RSP_"+toString(i)+"_PACKET_ID"  ,
1212                            dest, "in_DCACHE_RSP_"+toString(i)+"_PACKET_ID"  );
1213        PORT_MAP(_component,src , "in_DCACHE_RSP_"+toString(i)+"_RDATA"      ,
1214                            dest, "in_DCACHE_RSP_"+toString(i)+"_RDATA"      );
1215        PORT_MAP(_component,src , "in_DCACHE_RSP_"+toString(i)+"_ERROR"      ,
1216                            dest, "in_DCACHE_RSP_"+toString(i)+"_ERROR"      );
1217      }
1218   
1219    // ~~~~~[ Interface "lsq_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1220    for (uint32_t i=0; i<_param->_nb_execute_loop; ++i)
1221      for (uint32_t j=0; j<_param->_execute_loop_nb_load_store_unit[i]; ++j)
1222        for (uint32_t k=0; k<_param->_execute_loop_nb_cache_port [i][j]; ++k)
1223          {
1224            dest = _name+"_execute_loop_"+toString(i);
1225#ifdef POSITION
1226            _component->interface_map (src ,"lsq_req_"   +toString(i)+"_"+toString(j)+"_"+toString(k),
1227                                       dest,"dcache_req_"                +toString(j)+"_"+toString(k));
1228#endif
1229
1230            COMPONENT_MAP(_component,src , "in_LSQ_REQ_"   +toString(i)+"_"+toString(j)+"_"+toString(k)+"_VAL"      ,
1231                                     dest,"out_DCACHE_REQ_"                +toString(j)+"_"+toString(k)+"_VAL"      );
1232            COMPONENT_MAP(_component,src ,"out_LSQ_REQ_"   +toString(i)+"_"+toString(j)+"_"+toString(k)+"_ACK"      ,
1233                                     dest, "in_DCACHE_REQ_"                +toString(j)+"_"+toString(k)+"_ACK"      );
1234            if (_param->_have_port_dcache_thread_id)
1235            COMPONENT_MAP(_component,src , "in_LSQ_REQ_"   +toString(i)+"_"+toString(j)+"_"+toString(k)+"_THREAD_ID",
1236                                     dest,"out_DCACHE_REQ_"                +toString(j)+"_"+toString(k)+"_CONTEXT_ID");
1237            if (_param->_have_port_dcache_packet_id)
1238            COMPONENT_MAP(_component,src , "in_LSQ_REQ_"   +toString(i)+"_"+toString(j)+"_"+toString(k)+"_PACKET_ID",
1239                                     dest,"out_DCACHE_REQ_"                +toString(j)+"_"+toString(k)+"_PACKET_ID");
1240            COMPONENT_MAP(_component,src , "in_LSQ_REQ_"   +toString(i)+"_"+toString(j)+"_"+toString(k)+"_ADDRESS"  ,
1241                                     dest,"out_DCACHE_REQ_"                +toString(j)+"_"+toString(k)+"_ADDRESS"  );
1242            COMPONENT_MAP(_component,src , "in_LSQ_REQ_"   +toString(i)+"_"+toString(j)+"_"+toString(k)+"_WDATA"    ,
1243                                     dest,"out_DCACHE_REQ_"                +toString(j)+"_"+toString(k)+"_WDATA"    );
1244            COMPONENT_MAP(_component,src , "in_LSQ_REQ_"   +toString(i)+"_"+toString(j)+"_"+toString(k)+"_TYPE"     ,
1245                                     dest,"out_DCACHE_REQ_"                +toString(j)+"_"+toString(k)+"_TYPE"     );
1246          }
1247
1248    // ~~~~~[ Interface "lsq_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1249    for (uint32_t i=0; i<_param->_nb_execute_loop; ++i)
1250      for (uint32_t j=0; j<_param->_execute_loop_nb_load_store_unit[i]; ++j)
1251        for (uint32_t k=0; k<_param->_execute_loop_nb_cache_port [i][j]; ++k)
1252          {
1253            dest = _name+"_execute_loop_"+toString(i);
1254#ifdef POSITION
1255            _component->interface_map (src ,"lsq_rsp_"   +toString(i)+"_"+toString(j)+"_"+toString(k),
1256                                       dest,"dcache_rsp_"                +toString(j)+"_"+toString(k));
1257#endif
1258
1259            COMPONENT_MAP(_component,src ,"out_LSQ_RSP_"   +toString(i)+"_"+toString(j)+"_"+toString(k)+"_VAL"      ,
1260                                     dest, "in_DCACHE_RSP_"                +toString(j)+"_"+toString(k)+"_VAL"      );
1261            COMPONENT_MAP(_component,src , "in_LSQ_RSP_"   +toString(i)+"_"+toString(j)+"_"+toString(k)+"_ACK"      ,
1262                                     dest,"out_DCACHE_RSP_"                +toString(j)+"_"+toString(k)+"_ACK"      );
1263            if (_param->_have_port_dcache_thread_id)
1264            COMPONENT_MAP(_component,src ,"out_LSQ_RSP_"   +toString(i)+"_"+toString(j)+"_"+toString(k)+"_THREAD_ID",
1265                                     dest, "in_DCACHE_RSP_"                +toString(j)+"_"+toString(k)+"_CONTEXT_ID");
1266            if (_param->_have_port_dcache_packet_id)
1267            COMPONENT_MAP(_component,src ,"out_LSQ_RSP_"   +toString(i)+"_"+toString(j)+"_"+toString(k)+"_PACKET_ID",
1268                                     dest, "in_DCACHE_RSP_"                +toString(j)+"_"+toString(k)+"_PACKET_ID");
1269            COMPONENT_MAP(_component,src ,"out_LSQ_RSP_"   +toString(i)+"_"+toString(j)+"_"+toString(k)+"_RDATA"    ,
1270                                     dest, "in_DCACHE_RSP_"                +toString(j)+"_"+toString(k)+"_RDATA"    );
1271            COMPONENT_MAP(_component,src ,"out_LSQ_RSP_"   +toString(i)+"_"+toString(j)+"_"+toString(k)+"_ERROR"    ,
1272                                     dest, "in_DCACHE_RSP_"                +toString(j)+"_"+toString(k)+"_ERROR"    );
1273          }
1274    }
1275
1276    // ===================================================================
1277    // =====[ glue ]======================================================
1278    // ===================================================================
1279    {
1280      src = _name+"_glue";
1281      log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
1282     
1283      // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1284      {
1285        dest = _name;
1286#ifdef POSITION
1287        _component->interface_map (src ,"",
1288                                   dest,"");
1289#endif
1290        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
1291        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
1292      }
1293
1294      // ~~~~~[ Interface : "rename" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
1295      // out_RENAME_FRONT_END_ID - ooo_engine. in_RENAME_FRONT_END_ID
1296     
1297      // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~
1298      // out_BRANCH_COMPLETE_FRONT_END_VAL             - front_end. in_BRANCH_COMPLETE_VAL           
1299      //  in_BRANCH_COMPLETE_FRONT_END_ACK             - front_end.out_BRANCH_COMPLETE_ACK           
1300      // out_BRANCH_COMPLETE_FRONT_END_CONTEXT_ID      - front_end. in_BRANCH_COMPLETE_CONTEXT_ID     
1301      // out_BRANCH_COMPLETE_FRONT_END_DEPTH           - front_end. in_BRANCH_COMPLETE_DEPTH         
1302      // out_BRANCH_COMPLETE_FRONT_END_ADDRESS         - front_end. in_BRANCH_COMPLETE_ADDRESS       
1303      // out_BRANCH_COMPLETE_FRONT_END_FLAG            - front_end. in_BRANCH_COMPLETE_NO_SEQUENCE   
1304      //  in_BRANCH_COMPLETE_FRONT_END_MISS_PREDICTION - front_end.out_BRANCH_COMPLETE_MISS_PREDICTION
1305     
1306      //  in_BRANCH_COMPLETE_OOO_ENGINE_VAL            - ooo_engine.out_BRANCH_COMPLETE_VAL           
1307      // out_BRANCH_COMPLETE_OOO_ENGINE_ACK            - ooo_engine. in_BRANCH_COMPLETE_ACK           
1308      //  in_BRANCH_COMPLETE_OOO_ENGINE_FRONT_END_ID   - ooo_engine.out_BRANCH_COMPLETE_FRONT_END_ID   
1309      //  in_BRANCH_COMPLETE_OOO_ENGINE_CONTEXT_ID     - ooo_engine.out_BRANCH_COMPLETE_CONTEXT_ID     
1310      //  in_BRANCH_COMPLETE_OOO_ENGINE_DEPTH          - ooo_engine.out_BRANCH_COMPLETE_DEPTH         
1311      //  in_BRANCH_COMPLETE_OOO_ENGINE_ADDRESS        - ooo_engine.out_BRANCH_COMPLETE_ADDRESS       
1312      //  in_BRANCH_COMPLETE_OOO_ENGINE_FLAG           - ooo_engine.out_BRANCH_COMPLETE_NO_SEQUENCE   
1313      // out_BRANCH_COMPLETE_OOO_ENGINE_MISS_PREDICTION- ooo_engine. in_BRANCH_COMPLETE_MISS_PREDICTION
1314     
1315      // ~~~~~[ Interface : "commit_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1316      // out_COMMIT_EVENT_FRONT_END_VAL              - front_end. in_COMMIT_EVENT_VAL             
1317      //  in_COMMIT_EVENT_FRONT_END_ACK              - front_end.out_COMMIT_EVENT_ACK             
1318      // out_COMMIT_EVENT_FRONT_END_CONTEXT_ID       - front_end. in_COMMIT_EVENT_CONTEXT_ID     
1319      // out_COMMIT_EVENT_FRONT_END_DEPTH            - front_end. in_COMMIT_EVENT_DEPTH           
1320      // out_COMMIT_EVENT_FRONT_END_TYPE             - front_end. in_COMMIT_EVENT_TYPE           
1321      // out_COMMIT_EVENT_FRONT_END_IS_DELAY_SLOT    - front_end. in_COMMIT_EVENT_IS_DELAY_SLOT   
1322      // out_COMMIT_EVENT_FRONT_END_ADDRESS          - front_end. in_COMMIT_EVENT_ADDRESS         
1323      // out_COMMIT_EVENT_FRONT_END_ADDRESS_EPCR_VAL - front_end. in_COMMIT_EVENT_ADDRESS_EPCR_VAL
1324      // out_COMMIT_EVENT_FRONT_END_ADDRESS_EPCR     - front_end. in_COMMIT_EVENT_ADDRESS_EPCR   
1325      // out_COMMIT_EVENT_FRONT_END_ADDRESS_EEAR_VAL - front_end. in_COMMIT_EVENT_ADDRESS_EEAR_VAL
1326      // out_COMMIT_EVENT_FRONT_END_ADDRESS_EEAR     - front_end. in_COMMIT_EVENT_ADDRESS_EEAR   
1327     
1328      //  in_COMMIT_EVENT_OOO_ENGINE_VAL             - ooo_engine.out_COMMIT_EVENT_VAL             
1329      // out_COMMIT_EVENT_OOO_ENGINE_ACK             - ooo_engine. in_COMMIT_EVENT_ACK             
1330      //  in_COMMIT_EVENT_OOO_ENGINE_FRONT_END_ID    - ooo_engine.out_COMMIT_EVENT_FRONT_END_ID   
1331      //  in_COMMIT_EVENT_OOO_ENGINE_CONTEXT_ID      - ooo_engine.out_COMMIT_EVENT_CONTEXT_ID     
1332      //  in_COMMIT_EVENT_OOO_ENGINE_DEPTH           - ooo_engine.out_COMMIT_EVENT_DEPTH           
1333      //  in_COMMIT_EVENT_OOO_ENGINE_TYPE            - ooo_engine.out_COMMIT_EVENT_TYPE           
1334      //  in_COMMIT_EVENT_OOO_ENGINE_IS_DELAY_SLOT   - ooo_engine.out_COMMIT_EVENT_IS_DELAY_SLOT   
1335      //  in_COMMIT_EVENT_OOO_ENGINE_ADDRESS         - ooo_engine.out_COMMIT_EVENT_ADDRESS         
1336      //  in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR_VAL- ooo_engine.out_COMMIT_EVENT_ADDRESS_EPCR_VAL
1337      //  in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR    - ooo_engine.out_COMMIT_EVENT_ADDRESS_EPCR   
1338      //  in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EEAR_VAL- ooo_engine.out_COMMIT_EVENT_ADDRESS_EEAR_VAL
1339      //  in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EEAR    - ooo_engine.out_COMMIT_EVENT_ADDRESS_EEAR   
1340     
1341      // ~~~~~[ Interface : "issue" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1342      //  in_ISSUE_OOO_ENGINE_VAL                   - ooo_engine.out_ISSUE_VAL                 
1343      // out_ISSUE_OOO_ENGINE_ACK                   - ooo_engine. in_ISSUE_ACK                 
1344      //  in_ISSUE_OOO_ENGINE_FRONT_END_ID          - ooo_engine.out_ISSUE_FRONT_END_ID         
1345      //  in_ISSUE_OOO_ENGINE_CONTEXT_ID            - ooo_engine.out_ISSUE_CONTEXT_ID           
1346      //  in_ISSUE_OOO_ENGINE_PACKET_ID             - ooo_engine.out_ISSUE_PACKET_ID           
1347      //  in_ISSUE_OOO_ENGINE_TYPE                  - ooo_engine.out_ISSUE_TYPE                 
1348      //  in_ISSUE_OOO_ENGINE_OPERATION             - ooo_engine.out_ISSUE_OPERATION           
1349      //  in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE - ooo_engine.out_ISSUE_STORE_QUEUE_PTR_WRITE
1350      //  in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_READ  - ooo_engine.out_ISSUE_STORE_QUEUE_PTR_READ
1351      //  in_ISSUE_OOO_ENGINE_STORE_QUEUE_EMPTY     - ooo_engine.out_ISSUE_STORE_QUEUE_EMPTY   
1352      //  in_ISSUE_OOO_ENGINE_LOAD_QUEUE_PTR_WRITE  - ooo_engine.out_ISSUE_LOAD_QUEUE_PTR_WRITE
1353      //  in_ISSUE_OOO_ENGINE_HAS_IMMEDIAT          - ooo_engine.out_ISSUE_HAS_IMMEDIAT         
1354      //  in_ISSUE_OOO_ENGINE_IMMEDIAT              - ooo_engine.out_ISSUE_IMMEDIAT             
1355      //  in_ISSUE_OOO_ENGINE_READ_RA               - ooo_engine.out_ISSUE_READ_RA             
1356      //  in_ISSUE_OOO_ENGINE_NUM_REG_RA            - ooo_engine.out_ISSUE_NUM_REG_RA           
1357      //  in_ISSUE_OOO_ENGINE_READ_RB               - ooo_engine.out_ISSUE_READ_RB             
1358      //  in_ISSUE_OOO_ENGINE_NUM_REG_RB            - ooo_engine.out_ISSUE_NUM_REG_RB           
1359      //  in_ISSUE_OOO_ENGINE_READ_RC               - ooo_engine.out_ISSUE_READ_RC             
1360      //  in_ISSUE_OOO_ENGINE_NUM_REG_RC            - ooo_engine.out_ISSUE_NUM_REG_RC           
1361      //  in_ISSUE_OOO_ENGINE_WRITE_RD              - ooo_engine.out_ISSUE_WRITE_RD             
1362      //  in_ISSUE_OOO_ENGINE_NUM_REG_RD            - ooo_engine.out_ISSUE_NUM_REG_RD           
1363      //  in_ISSUE_OOO_ENGINE_WRITE_RE              - ooo_engine.out_ISSUE_WRITE_RE             
1364      //  in_ISSUE_OOO_ENGINE_NUM_REG_RE            - ooo_engine.out_ISSUE_NUM_REG_RE           
1365     
1366      // out_ISSUE_EXECUTE_LOOP_VAL                   - execute_loop. in_EXECUTE_LOOP_IN_VAL                 
1367      //  in_ISSUE_EXECUTE_LOOP_ACK                   - execute_loop. in_EXECUTE_LOOP_IN_ACK                 
1368      // out_ISSUE_EXECUTE_LOOP_CONTEXT_ID            - execute_loop. in_EXECUTE_LOOP_IN_CONTEXT_ID           
1369      // out_ISSUE_EXECUTE_LOOP_FRONT_END_ID          - execute_loop. in_EXECUTE_LOOP_IN_FRONT_END_ID         
1370      // out_ISSUE_EXECUTE_LOOP_OOO_ENGINE_ID         - execute_loop. in_EXECUTE_LOOP_IN_OOO_ENGINE_ID       
1371      // out_ISSUE_EXECUTE_LOOP_PACKET_ID             - execute_loop. in_EXECUTE_LOOP_IN_PACKET_ID           
1372      // out_ISSUE_EXECUTE_LOOP_OPERATION             - execute_loop. in_EXECUTE_LOOP_IN_OPERATION           
1373      // out_ISSUE_EXECUTE_LOOP_TYPE                  - execute_loop. in_EXECUTE_LOOP_IN_TYPE                 
1374      // out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_WRITE - execute_loop. in_EXECUTE_LOOP_IN_STORE_QUEUE_PTR_WRITE
1375      // out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_READ  - execute_loop. in_EXECUTE_LOOP_IN_STORE_QUEUE_PTR_READ
1376      // out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_EMPTY     - execute_loop. in_EXECUTE_LOOP_IN_STORE_QUEUE_EMPTY   
1377      // out_ISSUE_EXECUTE_LOOP_LOAD_QUEUE_PTR_WRITE  - execute_loop. in_EXECUTE_LOOP_IN_LOAD_QUEUE_PTR_WRITE
1378      // out_ISSUE_EXECUTE_LOOP_HAS_IMMEDIAT          - execute_loop. in_EXECUTE_LOOP_IN_HAS_IMMEDIAT         
1379      // out_ISSUE_EXECUTE_LOOP_IMMEDIAT              - execute_loop. in_EXECUTE_LOOP_IN_IMMEDIAT             
1380      // out_ISSUE_EXECUTE_LOOP_READ_RA               - execute_loop. in_EXECUTE_LOOP_IN_READ_RA             
1381      // out_ISSUE_EXECUTE_LOOP_NUM_REG_RA            - execute_loop. in_EXECUTE_LOOP_IN_NUM_REG_RA           
1382      // out_ISSUE_EXECUTE_LOOP_READ_RB               - execute_loop. in_EXECUTE_LOOP_IN_READ_RB             
1383      // out_ISSUE_EXECUTE_LOOP_NUM_REG_RB            - execute_loop. in_EXECUTE_LOOP_IN_NUM_REG_RB           
1384      // out_ISSUE_EXECUTE_LOOP_READ_RC               - execute_loop. in_EXECUTE_LOOP_IN_READ_RC             
1385      // out_ISSUE_EXECUTE_LOOP_NUM_REG_RC            - execute_loop. in_EXECUTE_LOOP_IN_NUM_REG_RC           
1386      // out_ISSUE_EXECUTE_LOOP_WRITE_RD              - execute_loop. in_EXECUTE_LOOP_IN_WRITE_RD             
1387      // out_ISSUE_EXECUTE_LOOP_NUM_REG_RD            - execute_loop. in_EXECUTE_LOOP_IN_NUM_REG_RD           
1388      // out_ISSUE_EXECUTE_LOOP_WRITE_RE              - execute_loop. in_EXECUTE_LOOP_IN_WRITE_RE             
1389      // out_ISSUE_EXECUTE_LOOP_NUM_REG_RE            - execute_loop. in_EXECUTE_LOOP_IN_NUM_REG_RE           
1390 
1391 
1392      // ~~~~~[ Interface "execute_loop" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1393      //   out_EXECUTE_OOO_ENGINE_VAL          - ooo_engine. in_EXECUTE_LOOP_VAL         
1394      //    in_EXECUTE_OOO_ENGINE_ACK          - ooo_engine.out_EXECUTE_LOOP_ACK         
1395      //   out_EXECUTE_OOO_ENGINE_FRONT_END_ID - ooo_engine. in_EXECUTE_LOOP_FRONT_END_ID
1396      //   out_EXECUTE_OOO_ENGINE_CONTEXT_ID   - ooo_engine. in_EXECUTE_LOOP_CONTEXT_ID 
1397      //   out_EXECUTE_OOO_ENGINE_PACKET_ID    - ooo_engine. in_EXECUTE_LOOP_PACKET_ID   
1398      //// out_EXECUTE_OOO_ENGINE_TYPE         - ooo_engine. in_EXECUTE_LOOP_TYPE       
1399      //// out_EXECUTE_OOO_ENGINE_OPERATION    - ooo_engine. in_EXECUTE_LOOP_OPERATION   
1400      //   out_EXECUTE_OOO_ENGINE_FLAGS        - ooo_engine. in_EXECUTE_LOOP_FLAGS       
1401      //   out_EXECUTE_OOO_ENGINE_EXCEPTION    - ooo_engine. in_EXECUTE_LOOP_EXCEPTION   
1402      //   out_EXECUTE_OOO_ENGINE_NO_SEQUENCE  - ooo_engine. in_EXECUTE_LOOP_NO_SEQUENCE
1403      //   out_EXECUTE_OOO_ENGINE_ADDRESS      - ooo_engine. in_EXECUTE_LOOP_ADDRESS     
1404      //   out_EXECUTE_OOO_ENGINE_DATA         - ooo_engine. in_EXECUTE_LOOP_DATA       
1405 
1406      //    in_EXECUTE_EXECUTE_LOOP_VAL           - execute_loop.out_EXECUTE_LOOP_OUT_VAL         
1407      //   out_EXECUTE_EXECUTE_LOOP_ACK           - execute_loop.out_EXECUTE_LOOP_OUT_ACK         
1408      //    in_EXECUTE_EXECUTE_LOOP_CONTEXT_ID    - execute_loop.out_EXECUTE_LOOP_OUT_CONTEXT_ID   
1409      //    in_EXECUTE_EXECUTE_LOOP_FRONT_END_ID  - execute_loop.out_EXECUTE_LOOP_OUT_FRONT_END_ID
1410      //    in_EXECUTE_EXECUTE_LOOP_OOO_ENGINE_ID - execute_loop.out_EXECUTE_LOOP_OUT_OOO_ENGINE_ID
1411      //    in_EXECUTE_EXECUTE_LOOP_PACKET_ID     - execute_loop.out_EXECUTE_LOOP_OUT_PACKET_ID   
1412      ////  in_EXECUTE_EXECUTE_LOOP_OPERATION     - execute_loop.out_EXECUTE_LOOP_OUT_OPERATION   
1413      ////  in_EXECUTE_EXECUTE_LOOP_TYPE          - execute_loop.out_EXECUTE_LOOP_OUT_TYPE         
1414      //    in_EXECUTE_EXECUTE_LOOP_FLAGS         - execute_loop.out_EXECUTE_LOOP_OUT_FLAGS       
1415      //    in_EXECUTE_EXECUTE_LOOP_EXCEPTION     - execute_loop.out_EXECUTE_LOOP_OUT_EXCEPTION   
1416      //    in_EXECUTE_EXECUTE_LOOP_NO_SEQUENCE   - execute_loop.out_EXECUTE_LOOP_OUT_NO_SEQUENCE 
1417      //    in_EXECUTE_EXECUTE_LOOP_ADDRESS       - execute_loop.out_EXECUTE_LOOP_OUT_ADDRESS     
1418      //    in_EXECUTE_EXECUTE_LOOP_DATA          - execute_loop.out_EXECUTE_LOOP_OUT_DATA         
1419
1420      // ~~~~~[ Interface "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1421      //  in_INSERT_OOO_ENGINE_VAL        - ooo_engine.out_INSERT_VAL       
1422      // out_INSERT_OOO_ENGINE_ACK        - ooo_engine. in_INSERT_ACK       
1423      //  in_INSERT_OOO_ENGINE_RD_USE     - ooo_engine.out_INSERT_RD_USE   
1424      //  in_INSERT_OOO_ENGINE_RD_NUM_REG - ooo_engine.out_INSERT_RD_NUM_REG
1425      //  in_INSERT_OOO_ENGINE_RE_USE     - ooo_engine.out_INSERT_RE_USE   
1426      //  in_INSERT_OOO_ENGINE_RE_NUM_REG - ooo_engine.out_INSERT_RE_NUM_REG
1427     
1428      // out_INSERT_EXECUTE_LOOP_VAL        - execute_loop. in_INSERT_ROB_VAL       
1429      //  in_INSERT_EXECUTE_LOOP_ACK        - execute_loop.out_INSERT_ROB_ACK       
1430      // out_INSERT_EXECUTE_LOOP_RD_USE     - execute_loop. in_INSERT_ROB_RD_USE   
1431      // out_INSERT_EXECUTE_LOOP_RD_NUM_REG - execute_loop. in_INSERT_ROB_RD_NUM_REG
1432      // out_INSERT_EXECUTE_LOOP_RE_USE     - execute_loop. in_INSERT_ROB_RE_USE   
1433      // out_INSERT_EXECUTE_LOOP_RE_NUM_REG - execute_loop. in_INSERT_ROB_RE_NUM_REG
1434
1435    }
1436
1437    // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1438#if DEBUG_Core == true
1439    _component->test_map(false);
1440#endif
1441
1442#ifdef POSITION
1443     if (usage_is_set(_usage,USE_POSITION))
1444       _component->generate_file();
1445#endif
1446
1447     log_end(Core,FUNCTION);
1448  };
1449
1450}; // end namespace core
1451}; // end namespace behavioural
1452}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.