source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_allocation.cpp @ 88

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

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
File size: 61.7 KB
Line 
1/*
2 * $Id: Front_end_allocation.cpp 88 2008-12-10 18:31:39Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Front_end/Front_end/include/Front_end.h"
9#include "Behavioural/include/Allocation.h"
10#include "Common/include/Max.h"
11
12namespace morpheo                    {
13namespace behavioural {
14namespace core {
15namespace multi_front_end {
16namespace front_end {
17
18
19
20#undef  FUNCTION
21#define FUNCTION "Front_end::allocation"
22  void Front_end::allocation
23  (
24#ifdef STATISTICS
25   morpheo::behavioural::Parameters_Statistics * param_statistics
26#else
27   void
28#endif
29   )
30  {
31    log_begin(Front_end,FUNCTION);
32
33    _component   = new Component (_usage);
34
35    Entity * entity = _component->set_entity (_name       
36                                              ,"Front_end"
37#ifdef POSITION
38                                              ,COMBINATORY
39#endif
40                                              );
41
42    _interfaces = entity->set_interfaces();
43   
44    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45    {
46      Interface * interface = _interfaces->set_interface(""
47#ifdef POSITION
48                                                         ,IN
49                                                         ,SOUTH,
50                                                         "Generalist interface"
51#endif
52                                                         );
53     
54      in_CLOCK        = interface->set_signal_clk              ("clock" ,1, CLOCK_VHDL_YES);
55      in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
56    }
57
58    // ~~~~~[ Interface "icache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
59    {
60      ALLOC1_INTERFACE("icache_req",OUT, WEST, _("Instruction cache request."),_param->_nb_context);
61
62      ALLOC1_VALACK_OUT (out_ICACHE_REQ_VAL                   ,VAL);
63      ALLOC1_VALACK_IN  ( in_ICACHE_REQ_ACK                   ,ACK);
64//    ALLOC1_SIGNAL_OUT (out_ICACHE_REQ_THREAD_ID             ,"thread_id"        ,Tcontext_t           ,_param->_size_context_id           );
65      ALLOC1_SIGNAL_OUT (out_ICACHE_REQ_PACKET_ID             ,"packet_id"        ,Tpacket_t            ,_param->_size_ifetch_queue_ptr     );
66      ALLOC1_SIGNAL_OUT (out_ICACHE_REQ_ADDRESS               ,"address"          ,Ticache_instruction_t,_param->_size_instruction_address              );
67      ALLOC1_SIGNAL_OUT (out_ICACHE_REQ_TYPE                  ,"type"             ,Ticache_type_t       ,_param->_size_icache_type          );
68    }
69
70    // ~~~~~[ Interface "icache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71    {
72      ALLOC1_INTERFACE("icache_rsp",IN , WEST, _("Instruction cache respons."),_param->_nb_context);
73
74      ALLOC1_VALACK_IN  ( in_ICACHE_RSP_VAL                   ,VAL);
75      ALLOC1_VALACK_OUT (out_ICACHE_RSP_ACK                   ,ACK);
76//    ALLOC1_SIGNAL_IN  ( in_ICACHE_RSP_THREAD_ID             ,"thread_id"        ,Tcontext_t           ,_param->_size_context_id           );
77      ALLOC1_SIGNAL_IN  ( in_ICACHE_RSP_PACKET_ID             ,"packet_id"        ,Tpacket_t            ,_param->_size_ifetch_queue_ptr     );
78      ALLOC1_SIGNAL_IN  ( in_ICACHE_RSP_ERROR                 ,"error"            ,Ticache_error_t      ,_param->_size_icache_error         );
79    }
80    {
81      ALLOC2_INTERFACE("icache_rsp",IN , WEST, "Instruction cache respons.",_param->_nb_context,_param->_nb_inst_fetch[it1]);
82
83      _ALLOC2_SIGNAL_IN ( in_ICACHE_RSP_INSTRUCTION           ,"instruction"      ,Ticache_instruction_t,_param->_size_instruction ,_param->_nb_context,_param->_nb_inst_fetch[it1]);
84    }
85
86
87    // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
88    {
89      ALLOC1_INTERFACE("decod",OUT,EAST,_("Decoded instruction, send to ooo_engine"),_param->_sum_inst_decod);
90
91      ALLOC1_VALACK_OUT (out_DECOD_VAL                        , VAL);
92      ALLOC1_VALACK_IN  ( in_DECOD_ACK                        , ACK);
93      ALLOC1_SIGNAL_OUT (out_DECOD_CONTEXT_ID                 ,"CONTEXT_ID"       ,Tcontext_t           ,_param->_size_context_id            );
94      ALLOC1_SIGNAL_OUT (out_DECOD_DEPTH                      ,"DEPTH"            ,Tdepth_t             ,_param->_size_depth                 );
95      ALLOC1_SIGNAL_OUT (out_DECOD_TYPE                       ,"TYPE"             ,Ttype_t              ,_param->_size_type                  );
96      ALLOC1_SIGNAL_OUT (out_DECOD_OPERATION                  ,"OPERATION"        ,Toperation_t         ,_param->_size_operation             );
97      ALLOC1_SIGNAL_OUT (out_DECOD_NO_EXECUTE                 ,"NO_EXECUTE"       ,Tcontrol_t           ,1                                   );
98      ALLOC1_SIGNAL_OUT (out_DECOD_IS_DELAY_SLOT              ,"IS_DELAY_SLOT"    ,Tcontrol_t           ,1                                   );
99      ALLOC1_SIGNAL_OUT (out_DECOD_ADDRESS                    ,"ADDRESS"          ,Tgeneral_data_t      ,_param->_size_instruction_address   );
100      ALLOC1_SIGNAL_OUT (out_DECOD_HAS_IMMEDIAT               ,"HAS_IMMEDIAT"     ,Tcontrol_t           ,1                                   );
101      ALLOC1_SIGNAL_OUT (out_DECOD_IMMEDIAT                   ,"IMMEDIAT"         ,Tgeneral_data_t      ,_param->_size_general_data          );
102      ALLOC1_SIGNAL_OUT (out_DECOD_READ_RA                    ,"READ_RA"          ,Tcontrol_t           ,1                                   );
103      ALLOC1_SIGNAL_OUT (out_DECOD_NUM_REG_RA                 ,"NUM_REG_RA"       ,Tgeneral_address_t   ,_param->_size_general_register_logic);
104      ALLOC1_SIGNAL_OUT (out_DECOD_READ_RB                    ,"READ_RB"          ,Tcontrol_t           ,1                                   );
105      ALLOC1_SIGNAL_OUT (out_DECOD_NUM_REG_RB                 ,"NUM_REG_RB"       ,Tgeneral_address_t   ,_param->_size_general_register_logic);
106      ALLOC1_SIGNAL_OUT (out_DECOD_READ_RC                    ,"READ_RC"          ,Tcontrol_t           ,1                                   );
107      ALLOC1_SIGNAL_OUT (out_DECOD_NUM_REG_RC                 ,"NUM_REG_RC"       ,Tspecial_address_t   ,_param->_size_special_register_logic);
108      ALLOC1_SIGNAL_OUT (out_DECOD_WRITE_RD                   ,"WRITE_RD"         ,Tcontrol_t           ,1                                   );
109      ALLOC1_SIGNAL_OUT (out_DECOD_NUM_REG_RD                 ,"NUM_REG_RD"       ,Tgeneral_address_t   ,_param->_size_general_register_logic);
110      ALLOC1_SIGNAL_OUT (out_DECOD_WRITE_RE                   ,"WRITE_RE"         ,Tcontrol_t           ,1                                   );
111      ALLOC1_SIGNAL_OUT (out_DECOD_NUM_REG_RE                 ,"NUM_REG_RE"       ,Tspecial_address_t   ,_param->_size_special_register_logic);
112      ALLOC1_SIGNAL_OUT (out_DECOD_EXCEPTION_USE              ,"EXCEPTION_USE"    ,Texception_t         ,_param->_size_exception_use         );
113      ALLOC1_SIGNAL_OUT (out_DECOD_EXCEPTION                  ,"EXCEPTION"        ,Texception_t         ,_param->_size_exception             );
114    }
115   
116    // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
117    {
118      ALLOC1_INTERFACE("branch_complete",IN,EAST,_("Branch commit"),_param->_nb_inst_branch_complete);
119
120      ALLOC1_VALACK_IN  ( in_BRANCH_COMPLETE_VAL              , VAL);
121      ALLOC1_VALACK_OUT (out_BRANCH_COMPLETE_ACK              , ACK);
122      ALLOC1_SIGNAL_IN  ( in_BRANCH_COMPLETE_CONTEXT_ID       ,"CONTEXT_ID"       ,Tcontext_t           ,_param->_size_context_id);
123      ALLOC1_SIGNAL_IN  ( in_BRANCH_COMPLETE_DEPTH            ,"DEPTH"            ,Tdepth_t             ,_param->_size_depth     );
124      ALLOC1_SIGNAL_IN  ( in_BRANCH_COMPLETE_ADDRESS          ,"ADDRESS"          ,Taddress_t           ,_param->_size_instruction_address);
125      ALLOC1_SIGNAL_IN  ( in_BRANCH_COMPLETE_FLAG             ,"FLAG"             ,Tcontrol_t           ,1                       );
126      ALLOC1_SIGNAL_OUT (out_BRANCH_COMPLETE_MISS_PREDICTION  ,"MISS_PREDICTION"  ,Tcontrol_t           ,1                       );
127    }
128
129   // ~~~~~[ Interface : "commit_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
130    {
131      ALLOC_INTERFACE("commit_event",IN,EAST,_("Out Of Order engine have an event"));
132
133      ALLOC_VALACK_IN   ( in_COMMIT_EVENT_VAL                 , VAL);
134      ALLOC_VALACK_OUT  (out_COMMIT_EVENT_ACK                 , ACK);
135      ALLOC_SIGNAL_IN   ( in_COMMIT_EVENT_CONTEXT_ID          ,"CONTEXT_ID"       ,Tcontext_t           ,_param->_size_context_id);
136      ALLOC_SIGNAL_IN   ( in_COMMIT_EVENT_DEPTH               ,"DEPTH"            ,Tdepth_t             ,_param->_size_depth     );
137      ALLOC_SIGNAL_IN   ( in_COMMIT_EVENT_TYPE                ,"TYPE"             ,Tevent_type_t        ,_param->_size_event_type);
138      ALLOC_SIGNAL_IN   ( in_COMMIT_EVENT_IS_DELAY_SLOT       ,"IS_DELAY_SLOT"    ,Tcontrol_t           ,1                       );
139      ALLOC_SIGNAL_IN   ( in_COMMIT_EVENT_ADDRESS             ,"ADDRESS"          ,Taddress_t           ,_param->_size_instruction_address   );
140      ALLOC_SIGNAL_IN   ( in_COMMIT_EVENT_ADDRESS_EPCR        ,"ADDRESS_EPCR"     ,Taddress_t           ,_param->_size_instruction_address   );
141      ALLOC_SIGNAL_IN   ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL    ,"ADDRESS_EEAR_VAL" ,Tcontrol_t           ,1                       );
142      ALLOC_SIGNAL_IN   ( in_COMMIT_EVENT_ADDRESS_EEAR        ,"ADDRESS_EEAR"     ,Taddress_t           ,_param->_size_instruction_address   );
143    }
144
145    // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
146    {
147      ALLOC1_INTERFACE("event",OUT,EAST,_("Event interface"),_param->_nb_context);
148
149      ALLOC1_VALACK_OUT (out_EVENT_VAL                        , VAL);
150      ALLOC1_VALACK_IN  ( in_EVENT_ACK                        , ACK);
151      ALLOC1_SIGNAL_OUT (out_EVENT_ADDRESS                    ,"ADDRESS"          ,Taddress_t           ,_param->_size_instruction_address);
152      ALLOC1_SIGNAL_OUT (out_EVENT_ADDRESS_NEXT               ,"ADDRESS_NEXT"     ,Taddress_t           ,_param->_size_instruction_address); 
153      ALLOC1_SIGNAL_OUT (out_EVENT_ADDRESS_NEXT_VAL           ,"ADDRESS_NEXT_VAL" ,Tcontrol_t           ,1                    );
154      ALLOC1_SIGNAL_OUT (out_EVENT_IS_DS_TAKE                 ,"IS_DS_TAKE"       ,Tcontrol_t           ,1                    );
155    }
156
157    // ~~~~~[ Interface "spr_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
158    {
159      ALLOC1_INTERFACE("spr_event",OUT,EAST,_("Event interface with the special registerFile"),_param->_nb_context);
160
161      ALLOC1_VALACK_OUT (out_SPR_EVENT_VAL                    , VAL);
162      ALLOC1_VALACK_IN  ( in_SPR_EVENT_ACK                    , ACK);
163      ALLOC1_SIGNAL_OUT (out_SPR_EVENT_EPCR                   ,"EPCR"             ,Tspr_t               ,_param->_size_spr);
164      ALLOC1_SIGNAL_OUT (out_SPR_EVENT_EEAR_WEN               ,"EEAR_WEN"         ,Tcontrol_t           ,1                );
165      ALLOC1_SIGNAL_OUT (out_SPR_EVENT_EEAR                   ,"EEAR"             ,Tspr_t               ,_param->_size_spr);
166      ALLOC1_SIGNAL_OUT (out_SPR_EVENT_SR_DSX                 ,"SR_DSX"           ,Tcontrol_t           ,1                );
167      ALLOC1_SIGNAL_OUT (out_SPR_EVENT_SR_TO_ESR              ,"SR_TO_ESR"        ,Tcontrol_t           ,1                );
168    }                                                                                   
169
170    // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
171    {
172      ALLOC1_INTERFACE("nb_inst",IN,EAST,_("Instruction number"),_param->_nb_context);
173
174      ALLOC1_SIGNAL_IN  ( in_NB_INST_COMMIT_ALL               ,"COMMIT_ALL"       ,Tcounter_t           ,_param->_size_nb_inst_commit);
175      ALLOC1_SIGNAL_IN  ( in_NB_INST_COMMIT_MEM               ,"COMMIT_MEM"       ,Tcounter_t           ,_param->_size_nb_inst_commit);
176    }
177
178    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
179    {
180      ALLOC1_INTERFACE("depth",OUT,EAST,_("Interface depth"),_param->_nb_context);
181
182      ALLOC1_SIGNAL_OUT (out_DEPTH_MIN                        ,"MIN"              ,Tdepth_t             ,_param->_size_depth  );
183      ALLOC1_SIGNAL_OUT (out_DEPTH_MAX                        ,"MAX"              ,Tdepth_t             ,_param->_size_depth+1);
184    }
185
186    // ~~~~~[ Interface : "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
187    {
188      ALLOC1_INTERFACE("spr",IN,EAST,_("Interface with the special registerFile"),_param->_nb_context);
189     
190      ALLOC1_SIGNAL_IN  ( in_SPR_SR_IEE                       ,"SR_IEE"           ,Tcontrol_t           ,1);
191      ALLOC1_SIGNAL_IN  ( in_SPR_SR_EPH                       ,"SR_EPH"           ,Tcontrol_t           ,1);
192    }
193
194    // ~~~~~[ Interface : "interrupt" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
195    {
196      ALLOC1_INTERFACE("interrupt",IN,NORTH,_("Interrupt Exception"),_param->_nb_context);
197
198      ALLOC1_SIGNAL_IN  ( in_INTERRUPT_ENABLE                 ,"ENABLE"           ,Tcontrol_t           ,1);
199    }
200
201    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
202    std::string name;
203
204    _component_ifetch_unit = new morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::Ifetch_unit * [_param->_nb_context];
205   
206    for (uint32_t i=0; i<_param->_nb_context; ++i)
207    {
208      name = _name+"_ifetch_unit_"+toString(i);
209      log_printf(TRACE,Front_end,FUNCTION,_("Create   : %s"),name.c_str());
210     
211      _component_ifetch_unit [i] = new morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::Ifetch_unit
212        (name.c_str()
213#ifdef STATISTICS
214         ,param_statistics
215#endif
216         ,_param->_param_ifetch_unit [i]
217         ,_usage);
218     
219      _component->set_component (_component_ifetch_unit [i]->_component
220#ifdef POSITION
221                                 , 50, 50, 10, 10
222#endif
223                                 );
224    }
225
226    {
227      name = _name+"_prediction_unit";
228      log_printf(TRACE,Front_end,FUNCTION,_("Create   : %s"),name.c_str());
229     
230      _component_prediction_unit = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::Prediction_unit
231        (name.c_str()
232#ifdef STATISTICS
233         ,param_statistics
234#endif
235         ,_param->_param_prediction_unit
236         ,_usage);
237     
238      _component->set_component (_component_prediction_unit->_component
239#ifdef POSITION
240                                 , 50, 50, 10, 10
241#endif
242                                 );
243    }
244
245    _component_decod_unit = new morpheo::behavioural::core::multi_front_end::front_end::decod_unit::Decod_unit * [_param->_nb_decod_unit];
246   
247    for (uint32_t i=0; i<_param->_nb_decod_unit; ++i)
248    {
249      name = _name+"_decod_unit_"+toString(i);
250      log_printf(TRACE,Front_end,FUNCTION,_("Create   : %s"),name.c_str());
251     
252      _component_decod_unit [i] = new morpheo::behavioural::core::multi_front_end::front_end::decod_unit::Decod_unit
253        (name.c_str()
254#ifdef STATISTICS
255         ,param_statistics
256#endif
257         ,_param->_param_decod_unit [i]
258         ,_usage);
259     
260      _component->set_component (_component_decod_unit [i]->_component
261#ifdef POSITION
262                                 , 50, 50, 10, 10
263#endif
264                                 );
265    }
266
267    {
268      name = _name+"_context_state";
269      log_printf(TRACE,Front_end,FUNCTION,_("Create   : %s"),name.c_str());
270     
271      _component_context_state = new morpheo::behavioural::core::multi_front_end::front_end::context_state::Context_State
272        (name.c_str()
273#ifdef STATISTICS
274         ,param_statistics
275#endif
276         ,_param->_param_context_state
277         ,_usage);
278     
279      _component->set_component (_component_context_state->_component
280#ifdef POSITION
281                                 , 50, 50, 10, 10
282#endif
283                                 );
284    }
285
286    {
287      name = _name+"_glue";
288      log_printf(TRACE,Front_end,FUNCTION,_("Create   : %s"),name.c_str());
289     
290      _component_glue = new morpheo::behavioural::core::multi_front_end::front_end::front_end_glue::Front_end_Glue
291        (name.c_str()
292#ifdef STATISTICS
293         ,param_statistics
294#endif
295         ,_param->_param_glue
296         ,_usage);
297     
298      _component->set_component (_component_glue->_component
299#ifdef POSITION
300                                 , 50, 50, 10, 10
301#endif
302                                 );
303    }
304
305   
306    // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
307    std::string src,dest;
308
309    // ===================================================================
310    // =====[ ifetch_unit ]===============================================
311    // ===================================================================
312    for (uint32_t i=0; i<_param->_nb_context; ++i)
313    {
314      src = _name+"_ifetch_unit_"+toString(i);
315      log_printf(TRACE,Front_end,FUNCTION,_("Instance : %s"),src.c_str());
316           
317      {
318        dest = _name;
319#ifdef POSITION
320        _component->interface_map (src ,"",
321                                   dest,"");
322#endif
323        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
324        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
325      }
326
327      // ~~~~~[ Interface "icache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
328      {
329        dest = _name;
330#ifdef POSITION
331        _component->interface_map (src ,"icache_req",
332                                   dest,"icache_req_"+toString(i));
333#endif
334
335        PORT_MAP(_component,src ,"out_ICACHE_REQ_VAL"      ,dest,"out_ICACHE_REQ_"+toString(i)+"_VAL"      );
336        PORT_MAP(_component,src , "in_ICACHE_REQ_ACK"      ,dest, "in_ICACHE_REQ_"+toString(i)+"_ACK"      );
337      //PORT_MAP(_component,src ,"out_ICACHE_REQ_THREAD_ID",dest,"out_ICACHE_REQ_"+toString(i)+"_THREAD_ID");
338        if (_param->_have_port_ifetch_queue_ptr)
339        PORT_MAP(_component,src ,"out_ICACHE_REQ_PACKET_ID",dest,"out_ICACHE_REQ_"+toString(i)+"_PACKET_ID");
340        PORT_MAP(_component,src ,"out_ICACHE_REQ_ADDRESS"  ,dest,"out_ICACHE_REQ_"+toString(i)+"_ADDRESS"  );
341        PORT_MAP(_component,src ,"out_ICACHE_REQ_TYPE"     ,dest,"out_ICACHE_REQ_"+toString(i)+"_TYPE"     );
342      }
343
344      // ~~~~~[ Interface "icache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
345      {
346        dest = _name;
347#ifdef POSITION
348        _component->interface_map (src ,"icache_rsp",
349                                   dest,"icache_rsp_"+toString(i));
350#endif
351
352        PORT_MAP(_component,src , "in_ICACHE_RSP_VAL"        ,dest, "in_ICACHE_RSP_"+toString(i)+"_VAL"        );
353        PORT_MAP(_component,src ,"out_ICACHE_RSP_ACK"        ,dest,"out_ICACHE_RSP_"+toString(i)+"_ACK"        );
354//      PORT_MAP(_component,src , "in_ICACHE_RSP_THREAD_ID"  ,dest, "in_ICACHE_RSP_"+toString(i)+"_THREAD_ID"  );
355        if (_param->_have_port_ifetch_queue_ptr)
356        PORT_MAP(_component,src , "in_ICACHE_RSP_PACKET_ID"  ,dest, "in_ICACHE_RSP_"+toString(i)+"_PACKET_ID"  );
357        PORT_MAP(_component,src , "in_ICACHE_RSP_ERROR"      ,dest, "in_ICACHE_RSP_"+toString(i)+"_ERROR"      );
358
359        for (uint32_t j=0; j<_param->_nb_inst_fetch [i]; ++j)
360          {
361#ifdef POSITION
362            _component->interface_map (src ,"icache_rsp_"+toString(j),
363                                       dest,"icache_rsp_"+toString(i)+"_"+toString(j));
364#endif
365           
366            PORT_MAP(_component,src , "in_ICACHE_RSP_"+toString(j)+"_INSTRUCTION",dest, "in_ICACHE_RSP_"+toString(i)+"_"+toString(j)+"_INSTRUCTION");
367          }
368      }
369
370      // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
371      {
372        dest = _name+"_prediction_unit";
373#ifdef POSITION
374        _component->interface_map (src ,"predict"
375                                   dest,"predict_"+toString(i));
376#endif
377       
378        COMPONENT_MAP(_component,src ,"out_PREDICT_VAL"                        ,dest, "in_PREDICT_"+toString(i)+"_VAL"                        );
379        COMPONENT_MAP(_component,src , "in_PREDICT_ACK"                        ,dest,"out_PREDICT_"+toString(i)+"_ACK"                        );
380        COMPONENT_MAP(_component,src ,"out_PREDICT_PC_PREVIOUS"                ,dest, "in_PREDICT_"+toString(i)+"_PC_PREVIOUS"                );
381        COMPONENT_MAP(_component,src ,"out_PREDICT_PC_CURRENT"                 ,dest, "in_PREDICT_"+toString(i)+"_PC_CURRENT"                 );
382        COMPONENT_MAP(_component,src ,"out_PREDICT_PC_CURRENT_IS_DS_TAKE"      ,dest, "in_PREDICT_"+toString(i)+"_PC_CURRENT_IS_DS_TAKE"      );
383        COMPONENT_MAP(_component,src , "in_PREDICT_PC_NEXT"                    ,dest,"out_PREDICT_"+toString(i)+"_PC_NEXT"                    );
384        COMPONENT_MAP(_component,src , "in_PREDICT_PC_NEXT_IS_DS_TAKE"         ,dest,"out_PREDICT_"+toString(i)+"_PC_NEXT_IS_DS_TAKE"         );
385        if (_param->_have_port_inst_ifetch_ptr)
386        COMPONENT_MAP(_component,src , "in_PREDICT_INST_IFETCH_PTR"            ,dest,"out_PREDICT_"+toString(i)+"_INST_IFETCH_PTR"            );
387        COMPONENT_MAP(_component,src , "in_PREDICT_BRANCH_STATE"               ,dest,"out_PREDICT_"+toString(i)+"_BRANCH_STATE"               );
388        if (_param->_have_port_depth)
389        COMPONENT_MAP(_component,src , "in_PREDICT_BRANCH_UPDATE_PREDICTION_ID",dest,"out_PREDICT_"+toString(i)+"_BRANCH_UPDATE_PREDICTION_ID");
390       
391        for (uint32_t j=0; j<_param->_nb_inst_fetch[i]; ++j)
392          {
393#ifdef POSITION
394            _component->interface_map (src ,"predict_"+toString(j)
395                                       dest,"predict_"+toString(i)+"_"+toString(j));
396#endif
397           
398            COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(j)+                "_INSTRUCTION_ENABLE",
399                                     dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_INSTRUCTION_ENABLE");
400          }
401      }
402
403      // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
404      {
405        uint32_t num_decod_unit = _param->_link_context_to_decod_unit[i];
406        uint32_t num_context;
407
408        for (num_context=0; num_context<_param->_decod_unit_nb_context[num_decod_unit]; num_context ++)
409          if (_param->_translate_context_id_from_decod_unit [num_decod_unit][num_context] == i)
410            break;
411
412        dest = _name+"_decod_unit_"+toString(num_decod_unit);
413#ifdef POSITION
414        _component->interface_map (src ,"decod"
415                                   dest,"ifetch_"+toString(num_context));
416#endif
417       
418        ////out_DECOD_CONTEXT_ID
419
420        COMPONENT_MAP(_component,src ,"out_DECOD_ADDRESS"                    ,dest, "in_IFETCH_"+toString(num_context)+"_ADDRESS"                    );
421        if (_param->_have_port_inst_ifetch_ptr)
422        COMPONENT_MAP(_component,src ,"out_DECOD_INST_IFETCH_PTR"            ,dest, "in_IFETCH_"+toString(num_context)+"_INST_IFETCH_PTR"            );
423        COMPONENT_MAP(_component,src ,"out_DECOD_BRANCH_STATE"               ,dest, "in_IFETCH_"+toString(num_context)+"_BRANCH_STATE"               );
424        if (_param->_have_port_depth)
425        COMPONENT_MAP(_component,src ,"out_DECOD_BRANCH_UPDATE_PREDICTION_ID",dest, "in_IFETCH_"+toString(num_context)+"_BRANCH_UPDATE_PREDICTION_ID");
426        COMPONENT_MAP(_component,src ,"out_DECOD_EXCEPTION"                  ,dest, "in_IFETCH_"+toString(num_context)+"_EXCEPTION"                  );
427
428        for (uint32_t j=0; j<_param->_nb_inst_fetch [i];++j)
429          {
430            dest = _name+"_decod_unit_"+toString(num_decod_unit);
431#ifdef POSITION
432            _component->interface_map (src ,"decod_"+toString(j)
433                                       dest,"ifetch_"+toString(num_context)+"_"+toString(j));
434#endif
435       
436            COMPONENT_MAP(_component,src ,"out_DECOD_" +toString(j)+                          "_VAL"        ,
437                                     dest, "in_IFETCH_"+toString(num_context)+"_"+toString(j)+"_VAL"        );
438            COMPONENT_MAP(_component,src , "in_DECOD_" +toString(j)+                          "_ACK"        ,
439                                     dest,"out_IFETCH_"+toString(num_context)+"_"+toString(j)+"_ACK"        );
440            COMPONENT_MAP(_component,src ,"out_DECOD_" +toString(j)+                          "_INSTRUCTION",
441                                     dest, "in_IFETCH_"+toString(num_context)+"_"+toString(j)+"_INSTRUCTION");
442          }
443      }
444
445      // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
446      {
447        dest = _name+"_glue";
448#ifdef POSITION
449        _component->interface_map (src ,"event",
450                                   dest,"event_"+toString(i));
451#endif
452
453        COMPONENT_MAP(_component,src , "in_EVENT_VAL"             ,
454                                 dest,"out_EVENT_"+toString(i)+"_IFETCH_UNIT_VAL"             );
455        COMPONENT_MAP(_component,src ,"out_EVENT_ACK"             ,
456                                 dest, "in_EVENT_"+toString(i)+"_IFETCH_UNIT_ACK"             );
457        COMPONENT_MAP(_component,src , "in_EVENT_ADDRESS"         ,
458                                 dest,"out_EVENT_"+toString(i)+"_IFETCH_UNIT_ADDRESS"         );
459        COMPONENT_MAP(_component,src , "in_EVENT_ADDRESS_NEXT"    ,
460                                 dest,"out_EVENT_"+toString(i)+"_IFETCH_UNIT_ADDRESS_NEXT"    );
461        COMPONENT_MAP(_component,src , "in_EVENT_ADDRESS_NEXT_VAL",
462                                 dest,"out_EVENT_"+toString(i)+"_IFETCH_UNIT_ADDRESS_NEXT_VAL");
463        COMPONENT_MAP(_component,src , "in_EVENT_IS_DS_TAKE"      ,
464                                 dest,"out_EVENT_"+toString(i)+"_IFETCH_UNIT_IS_DS_TAKE"      );
465      }
466    }
467
468    // ===================================================================
469    // =====[ prediction_unit ]===========================================
470    // ===================================================================
471    {
472      src = _name+"_prediction_unit";
473      log_printf(TRACE,Front_end,FUNCTION,_("Instance : %s"),src.c_str());
474           
475      {
476        dest = _name;
477#ifdef POSITION
478        _component->interface_map (src ,"",
479                                   dest,"");
480#endif
481        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
482        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
483      }
484
485      // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
486      //   in_PREDICT_VAL                         - component_ifetch_unit
487      //  out_PREDICT_ACK                         - component_ifetch_unit
488      //   in_PREDICT_PC_PREVIOUS                 - component_ifetch_unit
489      //   in_PREDICT_PC_CURRENT                  - component_ifetch_unit
490      //   in_PREDICT_PC_CURRENT_IS_DS_TAKE       - component_ifetch_unit
491      //  out_PREDICT_PC_NEXT                     - component_ifetch_unit
492      //  out_PREDICT_PC_NEXT_IS_DS_TAKE          - component_ifetch_unit
493      //  out_PREDICT_INSTRUCTION_ENABLE          - component_ifetch_unit
494      //  out_PREDICT_INST_IFETCH_PTR             - component_ifetch_unit
495      //  out_PREDICT_BRANCH_STATE                - component_ifetch_unit
496      //  out_PREDICT_BRANCH_UPDATE_PREDICTION_ID - component_ifetch_unit
497
498      // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
499      //   in_DECOD_VAL                           - component_decod_unit
500      //  out_DECOD_ACK                           - component_decod_unit
501      //   in_DECOD_CONTEXT_ID                    - component_decod_unit
502      //   in_DECOD_MATCH_INST_IFETCH_PTR         - component_decod_unit
503      //   in_DECOD_BRANCH_STATE                  - component_decod_unit
504      //   in_DECOD_BRANCH_UPDATE_PREDICTION_ID   - component_decod_unit
505      //   in_DECOD_BRANCH_CONDITION              - component_decod_unit
506      //   in_DECOD_BRANCH_DIRECTION              - component_decod_unit
507      //   in_DECOD_ADDRESS_SRC                   - component_decod_unit
508      //   in_DECOD_ADDRESS_DEST                  - component_decod_unit
509
510      // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
511      for (uint32_t i=0; i<_param->_nb_inst_branch_complete; ++i)
512        {
513          dest = _name+"_glue";
514#ifdef POSITION
515          _component->interface_map (src ,"branch_complete_"+toString(i),
516                                     dest,"branch_complete_"+toString(i));
517#endif
518
519          COMPONENT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+                "_VAL"            ,
520                                   dest,"out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTION_UNIT_VAL"            );
521          COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+                "_ACK"            ,
522                                   dest, "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTION_UNIT_ACK"            );
523          COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+                "_MISS_PREDICTION",
524                                   dest, "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTION_UNIT_MISS_PREDICTION");
525
526          dest = _name;
527#ifdef POSITION
528          _component->interface_map (src ,"branch_complete_"+toString(i),
529                                     dest,"branch_complete_"+toString(i));
530#endif
531
532          if (_param->_have_port_context_id)
533          PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID",
534                              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID");
535          if (_param->_have_port_depth)
536          PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH"     ,
537                              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH"     );
538          PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"   ,
539                              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"   );
540          PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_FLAG"      ,
541                              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_FLAG"      );
542
543          dest = _name+"_context_state";
544#ifdef POSITION
545          _component->interface_map (src ,"branch_complete_"+toString(i),
546                                     dest,"branch_complete_"+toString(i));
547#endif
548
549          COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_TAKE"        ,
550                                   dest, "in_BRANCH_COMPLETE_"+toString(i)+"_TAKE"        );
551          COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC" ,
552                                   dest, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC" );
553          COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST",
554                                   dest, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST");
555        }
556
557      // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
558      for (uint32_t i=0; i<_param->_nb_context; ++i)
559        {
560          dest = _name+"_context_state";
561#ifdef POSITION
562          _component->interface_map (src ,"branch_event_"+toString(i),
563                                     dest,"branch_event_"+toString(i));
564#endif
565
566          COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_VAL"            ,
567                                   dest, "in_BRANCH_EVENT_"+toString(i)+"_VAL"            );
568          COMPONENT_MAP(_component,src , "in_BRANCH_EVENT_"+toString(i)+"_ACK"            ,
569                                   dest,"out_BRANCH_EVENT_"+toString(i)+"_ACK"            );
570//        COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_CONTEXT_ID"     ,
571//                                 dest, "in_BRANCH_EVENT_"+toString(i)+"_CONTEXT_ID"     );
572//        COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_DEPTH"          ,
573//                                 dest, "in_BRANCH_EVENT_"+toString(i)+"_DEPTH"          );
574//        COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_MISS_PREDICTION",
575//                                 dest, "in_BRANCH_EVENT_"+toString(i)+"_MISS_PREDICTION");
576          COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_SRC"    ,
577                                   dest, "in_BRANCH_EVENT_"+toString(i)+"_ADDRESS_SRC"    );
578          COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_DEST"   ,
579                                   dest, "in_BRANCH_EVENT_"+toString(i)+"_ADDRESS_DEST"   );
580        }
581
582      // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
583      for (uint32_t i=0; i<_param->_nb_context; ++i)
584        {
585          dest = _name+"_glue";
586#ifdef POSITION
587          _component->interface_map (src ,"depth_"+toString(i),
588                                     dest,"depth_"+toString(i));
589#endif
590
591          if (_param->_have_port_depth)
592            {
593          COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+                "_CURRENT",
594                                   dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_CURRENT");
595          COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+                "_MIN"    ,
596                                   dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_MIN"    );
597            }
598          COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+                "_MAX"    ,
599                                   dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_MAX"    );
600        }
601    }
602
603    // ===================================================================
604    // =====[ decod_unit ]================================================
605    // ===================================================================
606    {
607      uint32_t x=0;
608    for (uint32_t i=0; i<_param->_nb_decod_unit; ++i)
609    {
610      src = _name+"_decod_unit_"+toString(i);
611      log_printf(TRACE,Front_end,FUNCTION,_("Instance : %s"),src.c_str());
612           
613      {
614        dest = _name;
615#ifdef POSITION
616        _component->interface_map (src ,"",
617                                   dest,"");
618#endif
619        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
620        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
621      }
622
623      // ~~~~~[ Interface : "ifetch" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
624      //   in_IFETCH_VAL                         - component_ifetch_unit
625      //  out_IFETCH_ACK                         - component_ifetch_unit
626      //   in_IFETCH_INSTRUCTION                 - component_ifetch_unit
627      //   in_IFETCH_CONTEXT_ID                  - component_ifetch_unit
628      //   in_IFETCH_ADDRESS                     - component_ifetch_unit
629      //// in_IFETCH_ADDRESS_NEXT                - component_ifetch_unit
630      //   in_IFETCH_INST_IFETCH_PTR             - component_ifetch_unit
631      //   in_IFETCH_BRANCH_STATE                - component_ifetch_unit
632      //   in_IFETCH_BRANCH_UPDATE_PREDICTION_ID - component_ifetch_unit
633      //   in_IFETCH_EXCEPTION                   - component_ifetch_unit
634
635      for (uint32_t j=0; j<_param->_decod_unit_nb_context[i]; ++j)
636        {
637          dest = _name+"_glue";
638#ifdef POSITION
639          _component->interface_map (src ,"ifetch_"+toString(j),
640                                     dest,"ifetch_"+toString(i)+"_"+toString(j));
641#endif
642     
643          if (_param->_have_port_context_id)
644          COMPONENT_MAP(_component,src , "in_IFETCH_"+toString(j)                           +"_CONTEXT_ID",
645                                   dest,"out_IFETCH_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_CONTEXT_ID");
646        }
647
648      // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
649      for (uint32_t j=0; j<_param->_nb_inst_decod [i]; ++j)
650        {
651          dest = _name;
652#ifdef POSITION
653          _component->interface_map (src ,"decod_"+toString(j),
654                                     dest,"decod_"+toString(x));
655#endif
656
657         
658          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_VAL"          ,
659                              dest,"out_DECOD_"+toString(x)+"_VAL"          );
660          PORT_MAP(_component,src , "in_DECOD_"+toString(j)+"_ACK"          ,
661                              dest, "in_DECOD_"+toString(x)+"_ACK"          );
662          if (_param->_have_port_depth)
663          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_DEPTH"        ,
664                              dest,"out_DECOD_"+toString(x)+"_DEPTH"        );
665          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_TYPE"         ,
666                              dest,"out_DECOD_"+toString(x)+"_TYPE"         );
667          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_OPERATION"    ,
668                              dest,"out_DECOD_"+toString(x)+"_OPERATION"    );
669          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NO_EXECUTE"   ,
670                              dest,"out_DECOD_"+toString(x)+"_NO_EXECUTE"   );
671          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_IS_DELAY_SLOT",
672                              dest,"out_DECOD_"+toString(x)+"_IS_DELAY_SLOT");
673          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_ADDRESS"      ,
674                              dest,"out_DECOD_"+toString(x)+"_ADDRESS"      );
675          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_HAS_IMMEDIAT" ,
676                              dest,"out_DECOD_"+toString(x)+"_HAS_IMMEDIAT" );
677          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_IMMEDIAT"     ,
678                              dest,"out_DECOD_"+toString(x)+"_IMMEDIAT"     );
679          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_READ_RA"      ,
680                              dest,"out_DECOD_"+toString(x)+"_READ_RA"      );
681          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NUM_REG_RA"   ,
682                              dest,"out_DECOD_"+toString(x)+"_NUM_REG_RA"   );
683          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_READ_RB"      ,
684                              dest,"out_DECOD_"+toString(x)+"_READ_RB"      );
685          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NUM_REG_RB"   ,
686                              dest,"out_DECOD_"+toString(x)+"_NUM_REG_RB"   );
687          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_READ_RC"      ,
688                              dest,"out_DECOD_"+toString(x)+"_READ_RC"      );
689          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NUM_REG_RC"   ,
690                              dest,"out_DECOD_"+toString(x)+"_NUM_REG_RC"   );
691          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_WRITE_RD"     ,
692                              dest,"out_DECOD_"+toString(x)+"_WRITE_RD"     );
693          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NUM_REG_RD"   ,
694                              dest,"out_DECOD_"+toString(x)+"_NUM_REG_RD"   );
695          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_WRITE_RE"     ,
696                              dest,"out_DECOD_"+toString(x)+"_WRITE_RE"     );
697          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NUM_REG_RE"   ,
698                              dest,"out_DECOD_"+toString(x)+"_NUM_REG_RE"   );
699          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_EXCEPTION_USE",
700                              dest,"out_DECOD_"+toString(x)+"_EXCEPTION_USE");
701          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_EXCEPTION"    ,
702                              dest,"out_DECOD_"+toString(x)+"_EXCEPTION"    );
703
704          dest = _name+"_glue";
705#ifdef POSITION
706          _component->interface_map (src ,"decod_"+toString(j),
707                                     dest,"decod_"+toString(i)+"_"+toString(j));
708#endif
709
710          if (_param->_have_port_context_id)
711          COMPONENT_MAP(_component,src ,"out_DECOD_"+toString(j)+                           "_CONTEXT_ID"   ,
712                                   dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_CONTEXT_ID"   );
713
714          x++;
715        }
716     
717      // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
718      for (uint32_t j=0; j<_param->_nb_inst_decod[i]; ++j)
719        {
720          dest = _name+"_prediction_unit";
721#ifdef POSITION
722          _component->interface_map (src ,"predict_"+toString(j),
723                                     dest,"decod_"+toString(i)+"_"+toString(j));
724#endif
725
726          COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+                "_VAL"                        ,
727                                   dest, "in_DECOD_"  +toString(i)+"_"+toString(j)+"_VAL"                        );
728          COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(j)+                "_ACK"                        ,
729                                   dest,"out_DECOD_"  +toString(i)+"_"+toString(j)+"_ACK"                        );
730          if (_param->_have_port_context_id)
731          COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+                "_CONTEXT_ID"                 ,
732                                   dest, "in_DECOD_"  +toString(i)+"_"+toString(j)+"_CONTEXT_ID"                 );
733          COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+                "_MATCH_INST_IFETCH_PTR"      ,
734                                   dest, "in_DECOD_"  +toString(i)+"_"+toString(j)+"_MATCH_INST_IFETCH_PTR"      );
735          COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+                "_BRANCH_STATE"               ,
736                                   dest, "in_DECOD_"  +toString(i)+"_"+toString(j)+"_BRANCH_STATE"               );
737          if (_param->_have_port_depth)
738          COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+                "_BRANCH_UPDATE_PREDICTION_ID",
739                                   dest, "in_DECOD_"  +toString(i)+"_"+toString(j)+"_BRANCH_UPDATE_PREDICTION_ID");
740          COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+                "_BRANCH_CONDITION"           ,
741                                   dest, "in_DECOD_"  +toString(i)+"_"+toString(j)+"_BRANCH_CONDITION"           );
742          COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+                "_BRANCH_DIRECTION"           ,
743                                   dest, "in_DECOD_"  +toString(i)+"_"+toString(j)+"_BRANCH_DIRECTION"           );
744//        COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+                "_BRANCH_STACK_WRITE"         ,
745//                                 dest, "in_DECOD_"  +toString(i)+"_"+toString(j)+"_BRANCH_STACK_WRITE"         );
746          COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+                "_ADDRESS_SRC"                ,
747                                   dest, "in_DECOD_"  +toString(i)+"_"+toString(j)+"_ADDRESS_SRC"                );
748          COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+                "_ADDRESS_DEST"               ,
749                                   dest, "in_DECOD_"  +toString(i)+"_"+toString(j)+"_ADDRESS_DEST"               );
750//        COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(j)+                "_CAN_CONTINUE"               ,
751//                                 dest,"out_DECOD_"  +toString(i)+"_"+toString(j)+"_CAN_CONTINUE"               );
752
753        }
754
755      // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
756      for (uint32_t j=0; j<_param->_decod_unit_nb_context[i]; ++j)
757        {
758 //           uint32_t y=(_param->_translate_context_id_from_decod_unit[i])[j];
759
760          dest = _name+"_glue";
761#ifdef POSITION
762          _component->interface_map (src ,"depth_"+toString(j),
763                                     dest,"depth_"+toString(j));
764#endif
765
766          if (_param->_have_port_depth)
767          COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(j)+                           "_MIN",
768                                   dest,"out_DEPTH_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_MIN");
769          COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(j)+                           "_MAX",
770                                   dest,"out_DEPTH_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_MAX");
771        }
772
773      // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
774      for (uint32_t j=0; j<_param->_decod_unit_nb_context[i]; ++j)
775        {
776          uint32_t y=(_param->_translate_context_id_from_decod_unit[i])[j];
777
778          dest = _name+"_context_state";
779#ifdef POSITION
780          _component->interface_map (src ,"nb_inst_"+toString(j),
781                                     dest,"nb_inst_"+toString(y));
782#endif
783
784          COMPONENT_MAP(_component,src ,"out_NB_INST_"+toString(j)+"_DECOD_ALL",
785                                   dest, "in_NB_INST_"+toString(y)+"_DECOD_ALL");
786        }
787
788      // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
789      for (uint32_t j=0; j<_param->_decod_unit_nb_context[i]; ++j)
790        {
791          uint32_t y=(_param->_translate_context_id_from_decod_unit[i])[j];
792         
793          dest = _name+"_context_state";
794#ifdef POSITION
795          _component->interface_map (src ,"context_"+toString(j),
796                                     dest,"context_"+toString(y));
797#endif
798
799          COMPONENT_MAP(_component,src , "in_CONTEXT_"+toString(j)+"_DECOD_ENABLE",
800                                   dest,"out_CONTEXT_"+toString(y)+"_DECOD_ENABLE");
801
802          dest = _name+"_glue";
803#ifdef POSITION
804          _component->interface_map (src ,"context_"+toString(j),
805                                     dest,"context_"+toString(i)+"_"+toString(j));
806#endif
807
808          if (_param->_have_port_depth)
809          COMPONENT_MAP(_component,src , "in_CONTEXT_"+toString(j)+                           "_DEPTH",
810                                   dest,"out_CONTEXT_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_DEPTH");
811        }
812
813                                                                                     
814      // ~~~~~[ Interface : "context_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
815      {
816        dest = _name+"_context_state";
817#ifdef POSITION
818        _component->interface_map (src ,"context_event",
819                                   dest,"decod_event_"+toString(i));
820#endif
821     
822        COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_VAL"          ,dest, "in_DECOD_EVENT_"+toString(i)+"_VAL"          );
823        COMPONENT_MAP(_component,src , "in_CONTEXT_EVENT_ACK"          ,dest,"out_DECOD_EVENT_"+toString(i)+"_ACK"          );
824        if (_param->_have_port_context_id)
825        COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_CONTEXT_ID"   ,dest, "in_DECOD_EVENT_"+toString(i)+"_CONTEXT_ID"   );
826        if (_param->_have_port_depth)
827        COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_DEPTH"        ,dest, "in_DECOD_EVENT_"+toString(i)+"_DEPTH"        );
828        COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_TYPE"         ,dest, "in_DECOD_EVENT_"+toString(i)+"_TYPE"         );
829        COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_IS_DELAY_SLOT",dest, "in_DECOD_EVENT_"+toString(i)+"_IS_DELAY_SLOT");
830        COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_ADDRESS"      ,dest, "in_DECOD_EVENT_"+toString(i)+"_ADDRESS"      );
831        COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_ADDRESS_EPCR" ,dest, "in_DECOD_EVENT_"+toString(i)+"_ADDRESS_EPCR" );
832      }
833    }
834    }
835
836    // ===================================================================
837    // =====[ context_state ]=============================================
838    // ===================================================================
839    {
840      src = _name+"_context_state";
841      log_printf(TRACE,Front_end,FUNCTION,_("Instance : %s"),src.c_str());
842           
843      {
844        dest = _name;
845#ifdef POSITION
846        _component->interface_map (src ,"",
847                                   dest,"");
848#endif
849        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
850        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
851      }
852
853    // ~~~~~[ Interface : "decod_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
854      //   in_DECOD_EVENT_VAL                    - component_decod_unit
855      //  out_DECOD_EVENT_ACK                    - component_decod_unit
856      //   in_DECOD_EVENT_CONTEXT_ID             - component_decod_unit
857      //   in_DECOD_EVENT_DEPTH                  - component_decod_unit
858      //   in_DECOD_EVENT_TYPE                   - component_decod_unit
859      //   in_DECOD_EVENT_IS_DELAY_SLOT          - component_decod_unit
860      //   in_DECOD_EVENT_ADDRESS                - component_decod_unit
861      //   in_DECOD_EVENT_ADDRESS_EPCR           - component_decod_unit
862
863      // ~~~~~[ Interface : "commit_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
864      {
865        dest = _name;
866#ifdef POSITION
867        _component->interface_map (src ,"commit_event",
868                                   dest,"commit_event");
869#endif
870       
871        PORT_MAP(_component,src , "in_COMMIT_EVENT_VAL"             ,
872                            dest, "in_COMMIT_EVENT_VAL"             );
873        PORT_MAP(_component,src ,"out_COMMIT_EVENT_ACK"             ,
874                            dest,"out_COMMIT_EVENT_ACK"             );
875        if (_param->_have_port_context_id)
876        PORT_MAP(_component,src , "in_COMMIT_EVENT_CONTEXT_ID"      ,
877                            dest, "in_COMMIT_EVENT_CONTEXT_ID"      );
878        if (_param->_have_port_depth)
879        PORT_MAP(_component,src , "in_COMMIT_EVENT_DEPTH"           ,
880                            dest, "in_COMMIT_EVENT_DEPTH"           );
881        PORT_MAP(_component,src , "in_COMMIT_EVENT_TYPE"            ,
882                            dest, "in_COMMIT_EVENT_TYPE"            );
883        PORT_MAP(_component,src , "in_COMMIT_EVENT_IS_DELAY_SLOT"   ,
884                            dest, "in_COMMIT_EVENT_IS_DELAY_SLOT"   );
885        PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS"         ,
886                            dest, "in_COMMIT_EVENT_ADDRESS"         );
887        PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EPCR"    ,
888                            dest, "in_COMMIT_EVENT_ADDRESS_EPCR"    );
889        PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EEAR_VAL",
890                            dest, "in_COMMIT_EVENT_ADDRESS_EEAR_VAL");
891        PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EEAR"    ,
892                            dest, "in_COMMIT_EVENT_ADDRESS_EEAR"    );
893      }
894
895      // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
896      for (uint32_t i=0; i<_param->_nb_inst_branch_complete; ++i)
897        {
898          dest = _name+"_glue";
899#ifdef POSITION
900          _component->interface_map (src ,"branch_complete_"+toString(i),
901                                     dest,"branch_complete_"+toString(i));
902#endif
903
904          COMPONENT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+              "_VAL"            ,
905                                   dest,"out_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_STATE_VAL"            );
906          COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+              "_ACK"            ,
907                                   dest, "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_STATE_ACK"            );
908          COMPONENT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+              "_MISS_PREDICTION",
909                                   dest,"out_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_STATE_MISS_PREDICTION");
910
911          dest = _name;
912#ifdef POSITION
913          _component->interface_map (src ,"branch_complete_"+toString(i),
914                                     dest,"branch_complete_"+toString(i));
915#endif
916
917          if (_param->_have_port_context_id)
918          PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID",
919                              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID");
920          if (_param->_have_port_depth)
921          PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH"     ,
922                              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH"     );
923
924          //   in_BRANCH_COMPLETE_TAKE               - component_prediction_unit
925          //   in_BRANCH_COMPLETE_ADDRESS_SRC        - component_prediction_unit
926          //   in_BRANCH_COMPLETE_ADDRESS_DEST       - component_prediction_unit
927      }
928
929      // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
930      //   in_NB_INST_DECOD_ALL                  - component_decod_unit
931
932      for (uint32_t i=0; i<_param->_nb_context; ++i)
933        {
934          dest = _name;
935#ifdef POSITION
936          _component->interface_map (src ,"nb_inst",
937                                     dest,"nb_inst");
938#endif
939         
940          PORT_MAP(_component,src , "in_NB_INST_"+toString(i)+"_COMMIT_ALL",
941                              dest, "in_NB_INST_"+toString(i)+"_COMMIT_ALL");
942          PORT_MAP(_component,src , "in_NB_INST_"+toString(i)+"_COMMIT_MEM",
943                              dest, "in_NB_INST_"+toString(i)+"_COMMIT_MEM");
944      }
945
946      // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
947      for (uint32_t i=0; i<_param->_nb_context; ++i)
948        {
949          dest = _name+"_glue";
950#ifdef POSITION
951          _component->interface_map (src ,"event_"+toString(i),
952                                     dest,"event_"+toString(i));
953#endif
954
955          COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+              "_VAL"    ,
956                                   dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_VAL"    );
957          COMPONENT_MAP(_component,src , "in_EVENT_"+toString(i)+              "_ACK"    ,
958                                   dest,"out_EVENT_"+toString(i)+"_CONTEXT_STATE_ACK"    );
959          COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+              "_ADDRESS",
960                                   dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_ADDRESS");
961          COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+              "_ADDRESS_NEXT"    ,
962                                   dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_ADDRESS_NEXT"    ); 
963          COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+              "_ADDRESS_NEXT_VAL",
964                                   dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_ADDRESS_NEXT_VAL");
965          COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+              "_IS_DS_TAKE"      ,
966                                   dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_IS_DS_TAKE"      );
967        }
968
969      // ~~~~~[ Interface "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
970      for (uint32_t i=0; i<_param->_nb_context; ++i)
971        {
972          dest = _name;
973#ifdef POSITION
974          _component->interface_map (src ,"spr_event_"+toString(i),
975                                     dest,"spr_event_"+toString(i));
976#endif
977
978          PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_VAL"      ,
979                              dest,"out_SPR_EVENT_"+toString(i)+"_VAL"      );
980          PORT_MAP(_component,src , "in_SPR_EVENT_"+toString(i)+"_ACK"      ,
981                              dest, "in_SPR_EVENT_"+toString(i)+"_ACK"      );
982          PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_EPCR"     ,
983                              dest,"out_SPR_EVENT_"+toString(i)+"_EPCR"     );
984          PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_EEAR"     ,
985                              dest,"out_SPR_EVENT_"+toString(i)+"_EEAR"     );
986          PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_EEAR_WEN" ,
987                              dest,"out_SPR_EVENT_"+toString(i)+"_EEAR_WEN" );
988          PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_SR_DSX"   ,
989                              dest,"out_SPR_EVENT_"+toString(i)+"_SR_DSX"   );
990          PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_SR_TO_ESR",
991                              dest,"out_SPR_EVENT_"+toString(i)+"_SR_TO_ESR");
992        }
993
994      // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
995      //  out_CONTEXT_DECOD_ENABLE               - component_decod_unit
996
997      // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
998      for (uint32_t i=0; i<_param->_nb_context; ++i)
999        {
1000          dest = _name+"_glue";
1001#ifdef POSITION
1002          _component->interface_map (src ,"depth_"+toString(i),
1003                                     dest,"depth_"+toString(i));
1004#endif
1005
1006          if (_param->_have_port_depth)
1007          COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(i)+              "_MIN",
1008                                   dest,"out_DEPTH_"+toString(i)+"_CONTEXT_STATE_MIN");
1009        }
1010
1011      // ~~~~~[ Interface : "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1012      for (uint32_t i=0; i<_param->_nb_context; ++i)
1013        {
1014          dest = _name;
1015#ifdef POSITION
1016          _component->interface_map (src ,"spr_"+toString(i),
1017                                     dest,"spr_"+toString(i));
1018#endif
1019         
1020          PORT_MAP(_component,src , "in_SPR_"+toString(i)+"_SR_IEE",
1021                              dest, "in_SPR_"+toString(i)+"_SR_IEE");
1022          PORT_MAP(_component,src , "in_SPR_"+toString(i)+"_SR_EPH",
1023                              dest, "in_SPR_"+toString(i)+"_SR_EPH");
1024        }
1025
1026      // ~~~~~[ Interface : "interrupt" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1027      for (uint32_t i=0; i<_param->_nb_context; ++i)
1028        {
1029          dest = _name;
1030#ifdef POSITION
1031          _component->interface_map (src ,"interrupt_"+toString(i),
1032                                     dest,"interrupt_"+toString(i));
1033#endif
1034         
1035          PORT_MAP(_component,src , "in_INTERRUPT_"+toString(i)+"_ENABLE",
1036                              dest, "in_INTERRUPT_"+toString(i)+"_ENABLE");
1037        }
1038
1039    }
1040   
1041    // ===================================================================
1042    // =====[ glue ]======================================================
1043    // ===================================================================
1044    {
1045      src = _name+"_glue";
1046      log_printf(TRACE,Front_end,FUNCTION,_("Instance : %s"),src.c_str());
1047           
1048      {
1049        dest = _name;
1050#ifdef POSITION
1051        _component->interface_map (src ,"",
1052                                   dest,"");
1053#endif
1054        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
1055        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
1056      }
1057     
1058      // ~~~~~[ Interface : "ifetch" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1059      // out_IFETCH_DECOD_UNIT_CONTEXT_ID                       - component_decod_unit
1060     
1061      // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1062      uint32_t x=0;
1063      for (uint32_t i=0; i<_param->_nb_decod_unit; ++i)
1064        for (uint32_t j=0; j<_param->_nb_inst_decod[i];++j)
1065          {
1066            dest = _name;
1067#ifdef POSITION
1068            _component->interface_map (src ,"decod_"+toString(i)+"_"+toString(j),
1069                                       dest,"decod_"+toString(x));
1070#endif
1071           
1072            if (_param->_have_port_context_id)
1073            PORT_MAP(_component,src ,"out_DECOD_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID",
1074                                dest,"out_DECOD_"+toString(x)+                "_CONTEXT_ID");
1075            x++;
1076          }
1077      //  in_DECOD_DECOD_UNIT_CONTEXT_ID                        - component_decod_unit
1078   
1079      // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1080      for (uint32_t i=0; i<_param->_nb_inst_branch_complete; ++i)
1081        {
1082          dest = _name;
1083#ifdef POSITION
1084          _component->interface_map (src ,"branch_complete_"+toString(i),
1085                                     dest,"branch_complete_"+toString(i));
1086#endif
1087
1088          PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"            ,
1089                              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"            );
1090          PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK"            ,
1091                              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK"            );
1092          PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION",
1093                              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION");
1094        }
1095     
1096      //  out_BRANCH_COMPLETE_PREDICTION_UNIT_VAL               - component_prediction_unit
1097      //   in_BRANCH_COMPLETE_PREDICTION_UNIT_ACK               - component_prediction_unit
1098      //   in_BRANCH_COMPLETE_PREDICTION_UNIT_MISS_PREDICTION   - component_prediction_unit
1099      //  out_BRANCH_COMPLETE_CONTEXT_STATE_VAL                 - component_context_state
1100      //   in_BRANCH_COMPLETE_CONTEXT_STATE_ACK                 - component_context_state
1101      //  out_BRANCH_COMPLETE_CONTEXT_STATE_MISS_PREDICTION     - component_context_state
1102
1103      // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1104      for (uint32_t i=0; i<_param->_nb_context; ++i)
1105        {
1106          dest = _name;
1107#ifdef POSITION
1108          _component->interface_map (src ,"event_"+toString(i),
1109                                     dest,"event_"+toString(i));
1110#endif
1111
1112          PORT_MAP(_component,src ,"out_EVENT_"+toString(i)+"_VAL"             ,
1113                              dest,"out_EVENT_"+toString(i)+"_VAL"             );
1114          PORT_MAP(_component,src , "in_EVENT_"+toString(i)+"_ACK"             ,
1115                              dest, "in_EVENT_"+toString(i)+"_ACK"             );
1116          PORT_MAP(_component,src ,"out_EVENT_"+toString(i)+"_ADDRESS"         ,
1117                              dest,"out_EVENT_"+toString(i)+"_ADDRESS"         );
1118          PORT_MAP(_component,src ,"out_EVENT_"+toString(i)+"_ADDRESS_NEXT"    ,
1119                              dest,"out_EVENT_"+toString(i)+"_ADDRESS_NEXT"    );
1120          PORT_MAP(_component,src ,"out_EVENT_"+toString(i)+"_ADDRESS_NEXT_VAL",
1121                              dest,"out_EVENT_"+toString(i)+"_ADDRESS_NEXT_VAL");
1122          PORT_MAP(_component,src ,"out_EVENT_"+toString(i)+"_IS_DS_TAKE"      ,
1123                              dest,"out_EVENT_"+toString(i)+"_IS_DS_TAKE"      );
1124        }
1125
1126      //  out_EVENT_IFETCH_UNIT_VAL                             - component_ifetch_unit
1127      //   in_EVENT_IFETCH_UNIT_ACK                             - component_ifetch_unit
1128      //  out_EVENT_IFETCH_UNIT_ADDRESS                         - component_ifetch_unit
1129      //   in_EVENT_IFETCH_UNIT_ADDRESS_NEXT                    - component_ifetch_unit
1130      //  out_EVENT_IFETCH_UNIT_ADDRESS_NEXT_VAL                - component_ifetch_unit
1131      //   in_EVENT_IFETCH_UNIT_IS_DS_TAKE                      - component_ifetch_unit
1132      //   in_EVENT_CONTEXT_STATE_VAL                           - component_context_state
1133      //  out_EVENT_CONTEXT_STATE_ACK                           - component_context_state
1134      //   in_EVENT_CONTEXT_STATE_ADDRESS                       - component_context_state
1135      //   in_EVENT_CONTEXT_STATE_ADDRESS_NEXT                  - component_context_state
1136      //  out_EVENT_CONTEXT_STATE_ADDRESS_NEXT_VAL              - component_context_state
1137      //   in_EVENT_CONTEXT_STATE_IS_DS_TAKE                    - component_context_state
1138
1139      // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
1140      for (uint32_t i=0; i<_param->_nb_context; ++i)
1141        {
1142          dest = _name;
1143#ifdef POSITION
1144          _component->interface_map (src ,"depth_"+toString(i),
1145                                     dest,"depth_"+toString(i));
1146#endif
1147
1148          if (_param->_have_port_depth)
1149          PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_MIN",
1150                              dest,"out_DEPTH_"+toString(i)+"_MIN");
1151          PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_MAX",
1152                              dest,"out_DEPTH_"+toString(i)+"_MAX");
1153        }
1154     
1155      //   in_DEPTH_PREDICTION_UNIT_CURRENT                     - component_prediction_unit
1156      //   in_DEPTH_PREDICTION_UNIT_MIN                         - component_prediction_unit
1157      //   in_DEPTH_PREDICTION_UNIT_MAX                         - component_prediction_unit
1158      //  out_DEPTH_DECOD_UNIT_MIN                              - component_decod_unit
1159      //  out_DEPTH_DECOD_UNIT_MAX                              - component_decod_unit
1160      //  out_DEPTH_CONTEXT_STATE_MIN                           - component_context_state
1161     
1162      // ~~~~~[ Interface : "context"" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1163      //  out_CONTEXT_DECOD_UNIT_DEPTH                          - component_decod_unit
1164    }
1165   
1166    // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1167#if DEBUG_Front_end == true
1168    _component->test_map(false);
1169#endif
1170
1171#ifdef POSITION
1172     if (usage_is_set(_usage,USE_POSITION))
1173       _component->generate_file();
1174#endif
1175
1176     log_end(Front_end,FUNCTION);
1177  };
1178
1179}; // end namespace front_end
1180}; // end namespace multi_front_end
1181}; // end namespace core
1182
1183}; // end namespace behavioural
1184}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.