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

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

1) Update Prediction Table - New architecture (systemC) done (and tested) -> need change interface in top level
2) Change documentation on VHDL generation
3) Change VHDL constant (case std_logic and std_logic_vector)

  • Property svn:keywords set to Id
File size: 61.9 KB
Line 
1/*
2 * $Id: Front_end_allocation.cpp 95 2008-12-16 16:24:26Z 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_VAL",
579                                   dest, "in_BRANCH_EVENT_"+toString(i)+"_ADDRESS_DEST_VAL");
580          COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_DEST"    ,
581                                   dest, "in_BRANCH_EVENT_"+toString(i)+"_ADDRESS_DEST"    );
582        }
583
584      // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
585      for (uint32_t i=0; i<_param->_nb_context; ++i)
586        {
587          dest = _name+"_glue";
588#ifdef POSITION
589          _component->interface_map (src ,"depth_"+toString(i),
590                                     dest,"depth_"+toString(i));
591#endif
592
593          if (_param->_have_port_depth)
594            {
595          COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+                "_CURRENT",
596                                   dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_CURRENT");
597          COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+                "_MIN"    ,
598                                   dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_MIN"    );
599            }
600          COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+                "_MAX"    ,
601                                   dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_MAX"    );
602        }
603    }
604
605    // ===================================================================
606    // =====[ decod_unit ]================================================
607    // ===================================================================
608    {
609      uint32_t x=0;
610    for (uint32_t i=0; i<_param->_nb_decod_unit; ++i)
611    {
612      src = _name+"_decod_unit_"+toString(i);
613      log_printf(TRACE,Front_end,FUNCTION,_("Instance : %s"),src.c_str());
614           
615      {
616        dest = _name;
617#ifdef POSITION
618        _component->interface_map (src ,"",
619                                   dest,"");
620#endif
621        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
622        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
623      }
624
625      // ~~~~~[ Interface : "ifetch" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
626      //   in_IFETCH_VAL                         - component_ifetch_unit
627      //  out_IFETCH_ACK                         - component_ifetch_unit
628      //   in_IFETCH_INSTRUCTION                 - component_ifetch_unit
629      //   in_IFETCH_CONTEXT_ID                  - component_ifetch_unit
630      //   in_IFETCH_ADDRESS                     - component_ifetch_unit
631      //// in_IFETCH_ADDRESS_NEXT                - component_ifetch_unit
632      //   in_IFETCH_INST_IFETCH_PTR             - component_ifetch_unit
633      //   in_IFETCH_BRANCH_STATE                - component_ifetch_unit
634      //   in_IFETCH_BRANCH_UPDATE_PREDICTION_ID - component_ifetch_unit
635      //   in_IFETCH_EXCEPTION                   - component_ifetch_unit
636
637      for (uint32_t j=0; j<_param->_decod_unit_nb_context[i]; ++j)
638        {
639          dest = _name+"_glue";
640#ifdef POSITION
641          _component->interface_map (src ,"ifetch_"+toString(j),
642                                     dest,"ifetch_"+toString(i)+"_"+toString(j));
643#endif
644     
645          if (_param->_have_port_context_id)
646          COMPONENT_MAP(_component,src , "in_IFETCH_"+toString(j)                           +"_CONTEXT_ID",
647                                   dest,"out_IFETCH_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_CONTEXT_ID");
648        }
649
650      // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
651      for (uint32_t j=0; j<_param->_nb_inst_decod [i]; ++j)
652        {
653          dest = _name;
654#ifdef POSITION
655          _component->interface_map (src ,"decod_"+toString(j),
656                                     dest,"decod_"+toString(x));
657#endif
658
659         
660          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_VAL"          ,
661                              dest,"out_DECOD_"+toString(x)+"_VAL"          );
662          PORT_MAP(_component,src , "in_DECOD_"+toString(j)+"_ACK"          ,
663                              dest, "in_DECOD_"+toString(x)+"_ACK"          );
664          if (_param->_have_port_depth)
665          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_DEPTH"        ,
666                              dest,"out_DECOD_"+toString(x)+"_DEPTH"        );
667          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_TYPE"         ,
668                              dest,"out_DECOD_"+toString(x)+"_TYPE"         );
669          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_OPERATION"    ,
670                              dest,"out_DECOD_"+toString(x)+"_OPERATION"    );
671          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NO_EXECUTE"   ,
672                              dest,"out_DECOD_"+toString(x)+"_NO_EXECUTE"   );
673          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_IS_DELAY_SLOT",
674                              dest,"out_DECOD_"+toString(x)+"_IS_DELAY_SLOT");
675          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_ADDRESS"      ,
676                              dest,"out_DECOD_"+toString(x)+"_ADDRESS"      );
677          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_HAS_IMMEDIAT" ,
678                              dest,"out_DECOD_"+toString(x)+"_HAS_IMMEDIAT" );
679          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_IMMEDIAT"     ,
680                              dest,"out_DECOD_"+toString(x)+"_IMMEDIAT"     );
681          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_READ_RA"      ,
682                              dest,"out_DECOD_"+toString(x)+"_READ_RA"      );
683          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NUM_REG_RA"   ,
684                              dest,"out_DECOD_"+toString(x)+"_NUM_REG_RA"   );
685          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_READ_RB"      ,
686                              dest,"out_DECOD_"+toString(x)+"_READ_RB"      );
687          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NUM_REG_RB"   ,
688                              dest,"out_DECOD_"+toString(x)+"_NUM_REG_RB"   );
689          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_READ_RC"      ,
690                              dest,"out_DECOD_"+toString(x)+"_READ_RC"      );
691          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NUM_REG_RC"   ,
692                              dest,"out_DECOD_"+toString(x)+"_NUM_REG_RC"   );
693          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_WRITE_RD"     ,
694                              dest,"out_DECOD_"+toString(x)+"_WRITE_RD"     );
695          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NUM_REG_RD"   ,
696                              dest,"out_DECOD_"+toString(x)+"_NUM_REG_RD"   );
697          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_WRITE_RE"     ,
698                              dest,"out_DECOD_"+toString(x)+"_WRITE_RE"     );
699          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NUM_REG_RE"   ,
700                              dest,"out_DECOD_"+toString(x)+"_NUM_REG_RE"   );
701          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_EXCEPTION_USE",
702                              dest,"out_DECOD_"+toString(x)+"_EXCEPTION_USE");
703          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_EXCEPTION"    ,
704                              dest,"out_DECOD_"+toString(x)+"_EXCEPTION"    );
705
706          dest = _name+"_glue";
707#ifdef POSITION
708          _component->interface_map (src ,"decod_"+toString(j),
709                                     dest,"decod_"+toString(i)+"_"+toString(j));
710#endif
711
712          if (_param->_have_port_context_id)
713          COMPONENT_MAP(_component,src ,"out_DECOD_"+toString(j)+                           "_CONTEXT_ID"   ,
714                                   dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_CONTEXT_ID"   );
715
716          x++;
717        }
718     
719      // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
720      for (uint32_t j=0; j<_param->_nb_inst_decod[i]; ++j)
721        {
722          dest = _name+"_prediction_unit";
723#ifdef POSITION
724          _component->interface_map (src ,"predict_"+toString(j),
725                                     dest,"decod_"+toString(i)+"_"+toString(j));
726#endif
727
728          COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+                "_VAL"                        ,
729                                   dest, "in_DECOD_"  +toString(i)+"_"+toString(j)+"_VAL"                        );
730          COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(j)+                "_ACK"                        ,
731                                   dest,"out_DECOD_"  +toString(i)+"_"+toString(j)+"_ACK"                        );
732          if (_param->_have_port_context_id)
733          COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+                "_CONTEXT_ID"                 ,
734                                   dest, "in_DECOD_"  +toString(i)+"_"+toString(j)+"_CONTEXT_ID"                 );
735          COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+                "_MATCH_INST_IFETCH_PTR"      ,
736                                   dest, "in_DECOD_"  +toString(i)+"_"+toString(j)+"_MATCH_INST_IFETCH_PTR"      );
737          COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+                "_BRANCH_STATE"               ,
738                                   dest, "in_DECOD_"  +toString(i)+"_"+toString(j)+"_BRANCH_STATE"               );
739          if (_param->_have_port_depth)
740          COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+                "_BRANCH_UPDATE_PREDICTION_ID",
741                                   dest, "in_DECOD_"  +toString(i)+"_"+toString(j)+"_BRANCH_UPDATE_PREDICTION_ID");
742          COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+                "_BRANCH_CONDITION"           ,
743                                   dest, "in_DECOD_"  +toString(i)+"_"+toString(j)+"_BRANCH_CONDITION"           );
744          COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+                "_BRANCH_DIRECTION"           ,
745                                   dest, "in_DECOD_"  +toString(i)+"_"+toString(j)+"_BRANCH_DIRECTION"           );
746//        COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+                "_BRANCH_STACK_WRITE"         ,
747//                                 dest, "in_DECOD_"  +toString(i)+"_"+toString(j)+"_BRANCH_STACK_WRITE"         );
748          COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+                "_ADDRESS_SRC"                ,
749                                   dest, "in_DECOD_"  +toString(i)+"_"+toString(j)+"_ADDRESS_SRC"                );
750          COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+                "_ADDRESS_DEST"               ,
751                                   dest, "in_DECOD_"  +toString(i)+"_"+toString(j)+"_ADDRESS_DEST"               );
752//        COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(j)+                "_CAN_CONTINUE"               ,
753//                                 dest,"out_DECOD_"  +toString(i)+"_"+toString(j)+"_CAN_CONTINUE"               );
754
755        }
756
757      // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
758      for (uint32_t j=0; j<_param->_decod_unit_nb_context[i]; ++j)
759        {
760 //           uint32_t y=(_param->_translate_context_id_from_decod_unit[i])[j];
761
762          dest = _name+"_glue";
763#ifdef POSITION
764          _component->interface_map (src ,"depth_"+toString(j),
765                                     dest,"depth_"+toString(j));
766#endif
767
768          if (_param->_have_port_depth)
769          COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(j)+                           "_MIN",
770                                   dest,"out_DEPTH_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_MIN");
771          COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(j)+                           "_MAX",
772                                   dest,"out_DEPTH_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_MAX");
773        }
774
775      // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
776      for (uint32_t j=0; j<_param->_decod_unit_nb_context[i]; ++j)
777        {
778          uint32_t y=(_param->_translate_context_id_from_decod_unit[i])[j];
779
780          dest = _name+"_context_state";
781#ifdef POSITION
782          _component->interface_map (src ,"nb_inst_"+toString(j),
783                                     dest,"nb_inst_"+toString(y));
784#endif
785
786          COMPONENT_MAP(_component,src ,"out_NB_INST_"+toString(j)+"_DECOD_ALL",
787                                   dest, "in_NB_INST_"+toString(y)+"_DECOD_ALL");
788        }
789
790      // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
791      for (uint32_t j=0; j<_param->_decod_unit_nb_context[i]; ++j)
792        {
793          uint32_t y=(_param->_translate_context_id_from_decod_unit[i])[j];
794         
795          dest = _name+"_context_state";
796#ifdef POSITION
797          _component->interface_map (src ,"context_"+toString(j),
798                                     dest,"context_"+toString(y));
799#endif
800
801          COMPONENT_MAP(_component,src , "in_CONTEXT_"+toString(j)+"_DECOD_ENABLE",
802                                   dest,"out_CONTEXT_"+toString(y)+"_DECOD_ENABLE");
803
804          dest = _name+"_glue";
805#ifdef POSITION
806          _component->interface_map (src ,"context_"+toString(j),
807                                     dest,"context_"+toString(i)+"_"+toString(j));
808#endif
809
810          if (_param->_have_port_depth)
811          COMPONENT_MAP(_component,src , "in_CONTEXT_"+toString(j)+                           "_DEPTH",
812                                   dest,"out_CONTEXT_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_DEPTH");
813        }
814
815                                                                                     
816      // ~~~~~[ Interface : "context_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
817      {
818        dest = _name+"_context_state";
819#ifdef POSITION
820        _component->interface_map (src ,"context_event",
821                                   dest,"decod_event_"+toString(i));
822#endif
823     
824        COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_VAL"          ,dest, "in_DECOD_EVENT_"+toString(i)+"_VAL"          );
825        COMPONENT_MAP(_component,src , "in_CONTEXT_EVENT_ACK"          ,dest,"out_DECOD_EVENT_"+toString(i)+"_ACK"          );
826        if (_param->_have_port_context_id)
827        COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_CONTEXT_ID"   ,dest, "in_DECOD_EVENT_"+toString(i)+"_CONTEXT_ID"   );
828        if (_param->_have_port_depth)
829        COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_DEPTH"        ,dest, "in_DECOD_EVENT_"+toString(i)+"_DEPTH"        );
830        COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_TYPE"         ,dest, "in_DECOD_EVENT_"+toString(i)+"_TYPE"         );
831        COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_IS_DELAY_SLOT",dest, "in_DECOD_EVENT_"+toString(i)+"_IS_DELAY_SLOT");
832        COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_ADDRESS"      ,dest, "in_DECOD_EVENT_"+toString(i)+"_ADDRESS"      );
833        COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_ADDRESS_EPCR" ,dest, "in_DECOD_EVENT_"+toString(i)+"_ADDRESS_EPCR" );
834      }
835    }
836    }
837
838    // ===================================================================
839    // =====[ context_state ]=============================================
840    // ===================================================================
841    {
842      src = _name+"_context_state";
843      log_printf(TRACE,Front_end,FUNCTION,_("Instance : %s"),src.c_str());
844           
845      {
846        dest = _name;
847#ifdef POSITION
848        _component->interface_map (src ,"",
849                                   dest,"");
850#endif
851        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
852        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
853      }
854
855    // ~~~~~[ Interface : "decod_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
856      //   in_DECOD_EVENT_VAL                    - component_decod_unit
857      //  out_DECOD_EVENT_ACK                    - component_decod_unit
858      //   in_DECOD_EVENT_CONTEXT_ID             - component_decod_unit
859      //   in_DECOD_EVENT_DEPTH                  - component_decod_unit
860      //   in_DECOD_EVENT_TYPE                   - component_decod_unit
861      //   in_DECOD_EVENT_IS_DELAY_SLOT          - component_decod_unit
862      //   in_DECOD_EVENT_ADDRESS                - component_decod_unit
863      //   in_DECOD_EVENT_ADDRESS_EPCR           - component_decod_unit
864
865      // ~~~~~[ Interface : "commit_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
866      {
867        dest = _name;
868#ifdef POSITION
869        _component->interface_map (src ,"commit_event",
870                                   dest,"commit_event");
871#endif
872       
873        PORT_MAP(_component,src , "in_COMMIT_EVENT_VAL"             ,
874                            dest, "in_COMMIT_EVENT_VAL"             );
875        PORT_MAP(_component,src ,"out_COMMIT_EVENT_ACK"             ,
876                            dest,"out_COMMIT_EVENT_ACK"             );
877        if (_param->_have_port_context_id)
878        PORT_MAP(_component,src , "in_COMMIT_EVENT_CONTEXT_ID"      ,
879                            dest, "in_COMMIT_EVENT_CONTEXT_ID"      );
880        if (_param->_have_port_depth)
881        PORT_MAP(_component,src , "in_COMMIT_EVENT_DEPTH"           ,
882                            dest, "in_COMMIT_EVENT_DEPTH"           );
883        PORT_MAP(_component,src , "in_COMMIT_EVENT_TYPE"            ,
884                            dest, "in_COMMIT_EVENT_TYPE"            );
885        PORT_MAP(_component,src , "in_COMMIT_EVENT_IS_DELAY_SLOT"   ,
886                            dest, "in_COMMIT_EVENT_IS_DELAY_SLOT"   );
887        PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS"         ,
888                            dest, "in_COMMIT_EVENT_ADDRESS"         );
889        PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EPCR"    ,
890                            dest, "in_COMMIT_EVENT_ADDRESS_EPCR"    );
891        PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EEAR_VAL",
892                            dest, "in_COMMIT_EVENT_ADDRESS_EEAR_VAL");
893        PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EEAR"    ,
894                            dest, "in_COMMIT_EVENT_ADDRESS_EEAR"    );
895      }
896
897      // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
898      for (uint32_t i=0; i<_param->_nb_inst_branch_complete; ++i)
899        {
900          dest = _name+"_glue";
901#ifdef POSITION
902          _component->interface_map (src ,"branch_complete_"+toString(i),
903                                     dest,"branch_complete_"+toString(i));
904#endif
905
906          COMPONENT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+              "_VAL"            ,
907                                   dest,"out_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_STATE_VAL"            );
908          COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+              "_ACK"            ,
909                                   dest, "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_STATE_ACK"            );
910          COMPONENT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+              "_MISS_PREDICTION",
911                                   dest,"out_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_STATE_MISS_PREDICTION");
912
913          dest = _name;
914#ifdef POSITION
915          _component->interface_map (src ,"branch_complete_"+toString(i),
916                                     dest,"branch_complete_"+toString(i));
917#endif
918
919          if (_param->_have_port_context_id)
920          PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID",
921                              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID");
922          if (_param->_have_port_depth)
923          PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH"     ,
924                              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH"     );
925
926          //   in_BRANCH_COMPLETE_TAKE               - component_prediction_unit
927          //   in_BRANCH_COMPLETE_ADDRESS_SRC        - component_prediction_unit
928          //   in_BRANCH_COMPLETE_ADDRESS_DEST       - component_prediction_unit
929      }
930
931      // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
932      //   in_NB_INST_DECOD_ALL                  - component_decod_unit
933
934      for (uint32_t i=0; i<_param->_nb_context; ++i)
935        {
936          dest = _name;
937#ifdef POSITION
938          _component->interface_map (src ,"nb_inst",
939                                     dest,"nb_inst");
940#endif
941         
942          PORT_MAP(_component,src , "in_NB_INST_"+toString(i)+"_COMMIT_ALL",
943                              dest, "in_NB_INST_"+toString(i)+"_COMMIT_ALL");
944          PORT_MAP(_component,src , "in_NB_INST_"+toString(i)+"_COMMIT_MEM",
945                              dest, "in_NB_INST_"+toString(i)+"_COMMIT_MEM");
946      }
947
948      // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
949      for (uint32_t i=0; i<_param->_nb_context; ++i)
950        {
951          dest = _name+"_glue";
952#ifdef POSITION
953          _component->interface_map (src ,"event_"+toString(i),
954                                     dest,"event_"+toString(i));
955#endif
956
957          COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+              "_VAL"    ,
958                                   dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_VAL"    );
959          COMPONENT_MAP(_component,src , "in_EVENT_"+toString(i)+              "_ACK"    ,
960                                   dest,"out_EVENT_"+toString(i)+"_CONTEXT_STATE_ACK"    );
961          COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+              "_ADDRESS",
962                                   dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_ADDRESS");
963          COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+              "_ADDRESS_NEXT"    ,
964                                   dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_ADDRESS_NEXT"    ); 
965          COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+              "_ADDRESS_NEXT_VAL",
966                                   dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_ADDRESS_NEXT_VAL");
967          COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+              "_IS_DS_TAKE"      ,
968                                   dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_IS_DS_TAKE"      );
969        }
970
971      // ~~~~~[ Interface "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
972      for (uint32_t i=0; i<_param->_nb_context; ++i)
973        {
974          dest = _name;
975#ifdef POSITION
976          _component->interface_map (src ,"spr_event_"+toString(i),
977                                     dest,"spr_event_"+toString(i));
978#endif
979
980          PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_VAL"      ,
981                              dest,"out_SPR_EVENT_"+toString(i)+"_VAL"      );
982          PORT_MAP(_component,src , "in_SPR_EVENT_"+toString(i)+"_ACK"      ,
983                              dest, "in_SPR_EVENT_"+toString(i)+"_ACK"      );
984          PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_EPCR"     ,
985                              dest,"out_SPR_EVENT_"+toString(i)+"_EPCR"     );
986          PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_EEAR"     ,
987                              dest,"out_SPR_EVENT_"+toString(i)+"_EEAR"     );
988          PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_EEAR_WEN" ,
989                              dest,"out_SPR_EVENT_"+toString(i)+"_EEAR_WEN" );
990          PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_SR_DSX"   ,
991                              dest,"out_SPR_EVENT_"+toString(i)+"_SR_DSX"   );
992          PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_SR_TO_ESR",
993                              dest,"out_SPR_EVENT_"+toString(i)+"_SR_TO_ESR");
994        }
995
996      // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
997      //  out_CONTEXT_DECOD_ENABLE               - component_decod_unit
998
999      // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1000      for (uint32_t i=0; i<_param->_nb_context; ++i)
1001        {
1002          dest = _name+"_glue";
1003#ifdef POSITION
1004          _component->interface_map (src ,"depth_"+toString(i),
1005                                     dest,"depth_"+toString(i));
1006#endif
1007
1008          if (_param->_have_port_depth)
1009          COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(i)+              "_MIN",
1010                                   dest,"out_DEPTH_"+toString(i)+"_CONTEXT_STATE_MIN");
1011        }
1012
1013      // ~~~~~[ Interface : "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1014      for (uint32_t i=0; i<_param->_nb_context; ++i)
1015        {
1016          dest = _name;
1017#ifdef POSITION
1018          _component->interface_map (src ,"spr_"+toString(i),
1019                                     dest,"spr_"+toString(i));
1020#endif
1021         
1022          PORT_MAP(_component,src , "in_SPR_"+toString(i)+"_SR_IEE",
1023                              dest, "in_SPR_"+toString(i)+"_SR_IEE");
1024          PORT_MAP(_component,src , "in_SPR_"+toString(i)+"_SR_EPH",
1025                              dest, "in_SPR_"+toString(i)+"_SR_EPH");
1026        }
1027
1028      // ~~~~~[ Interface : "interrupt" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1029      for (uint32_t i=0; i<_param->_nb_context; ++i)
1030        {
1031          dest = _name;
1032#ifdef POSITION
1033          _component->interface_map (src ,"interrupt_"+toString(i),
1034                                     dest,"interrupt_"+toString(i));
1035#endif
1036         
1037          PORT_MAP(_component,src , "in_INTERRUPT_"+toString(i)+"_ENABLE",
1038                              dest, "in_INTERRUPT_"+toString(i)+"_ENABLE");
1039        }
1040
1041    }
1042   
1043    // ===================================================================
1044    // =====[ glue ]======================================================
1045    // ===================================================================
1046    {
1047      src = _name+"_glue";
1048      log_printf(TRACE,Front_end,FUNCTION,_("Instance : %s"),src.c_str());
1049           
1050      {
1051        dest = _name;
1052#ifdef POSITION
1053        _component->interface_map (src ,"",
1054                                   dest,"");
1055#endif
1056        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
1057        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
1058      }
1059     
1060      // ~~~~~[ Interface : "ifetch" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1061      // out_IFETCH_DECOD_UNIT_CONTEXT_ID                       - component_decod_unit
1062     
1063      // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1064      uint32_t x=0;
1065      for (uint32_t i=0; i<_param->_nb_decod_unit; ++i)
1066        for (uint32_t j=0; j<_param->_nb_inst_decod[i];++j)
1067          {
1068            dest = _name;
1069#ifdef POSITION
1070            _component->interface_map (src ,"decod_"+toString(i)+"_"+toString(j),
1071                                       dest,"decod_"+toString(x));
1072#endif
1073           
1074            if (_param->_have_port_context_id)
1075            PORT_MAP(_component,src ,"out_DECOD_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID",
1076                                dest,"out_DECOD_"+toString(x)+                "_CONTEXT_ID");
1077            x++;
1078          }
1079      //  in_DECOD_DECOD_UNIT_CONTEXT_ID                        - component_decod_unit
1080   
1081      // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1082      for (uint32_t i=0; i<_param->_nb_inst_branch_complete; ++i)
1083        {
1084          dest = _name;
1085#ifdef POSITION
1086          _component->interface_map (src ,"branch_complete_"+toString(i),
1087                                     dest,"branch_complete_"+toString(i));
1088#endif
1089
1090          PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"            ,
1091                              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"            );
1092          PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK"            ,
1093                              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK"            );
1094          PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION",
1095                              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION");
1096        }
1097     
1098      //  out_BRANCH_COMPLETE_PREDICTION_UNIT_VAL               - component_prediction_unit
1099      //   in_BRANCH_COMPLETE_PREDICTION_UNIT_ACK               - component_prediction_unit
1100      //   in_BRANCH_COMPLETE_PREDICTION_UNIT_MISS_PREDICTION   - component_prediction_unit
1101      //  out_BRANCH_COMPLETE_CONTEXT_STATE_VAL                 - component_context_state
1102      //   in_BRANCH_COMPLETE_CONTEXT_STATE_ACK                 - component_context_state
1103      //  out_BRANCH_COMPLETE_CONTEXT_STATE_MISS_PREDICTION     - component_context_state
1104
1105      // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1106      for (uint32_t i=0; i<_param->_nb_context; ++i)
1107        {
1108          dest = _name;
1109#ifdef POSITION
1110          _component->interface_map (src ,"event_"+toString(i),
1111                                     dest,"event_"+toString(i));
1112#endif
1113
1114          PORT_MAP(_component,src ,"out_EVENT_"+toString(i)+"_VAL"             ,
1115                              dest,"out_EVENT_"+toString(i)+"_VAL"             );
1116          PORT_MAP(_component,src , "in_EVENT_"+toString(i)+"_ACK"             ,
1117                              dest, "in_EVENT_"+toString(i)+"_ACK"             );
1118          PORT_MAP(_component,src ,"out_EVENT_"+toString(i)+"_ADDRESS"         ,
1119                              dest,"out_EVENT_"+toString(i)+"_ADDRESS"         );
1120          PORT_MAP(_component,src ,"out_EVENT_"+toString(i)+"_ADDRESS_NEXT"    ,
1121                              dest,"out_EVENT_"+toString(i)+"_ADDRESS_NEXT"    );
1122          PORT_MAP(_component,src ,"out_EVENT_"+toString(i)+"_ADDRESS_NEXT_VAL",
1123                              dest,"out_EVENT_"+toString(i)+"_ADDRESS_NEXT_VAL");
1124          PORT_MAP(_component,src ,"out_EVENT_"+toString(i)+"_IS_DS_TAKE"      ,
1125                              dest,"out_EVENT_"+toString(i)+"_IS_DS_TAKE"      );
1126        }
1127
1128      //  out_EVENT_IFETCH_UNIT_VAL                             - component_ifetch_unit
1129      //   in_EVENT_IFETCH_UNIT_ACK                             - component_ifetch_unit
1130      //  out_EVENT_IFETCH_UNIT_ADDRESS                         - component_ifetch_unit
1131      //   in_EVENT_IFETCH_UNIT_ADDRESS_NEXT                    - component_ifetch_unit
1132      //  out_EVENT_IFETCH_UNIT_ADDRESS_NEXT_VAL                - component_ifetch_unit
1133      //   in_EVENT_IFETCH_UNIT_IS_DS_TAKE                      - component_ifetch_unit
1134      //   in_EVENT_CONTEXT_STATE_VAL                           - component_context_state
1135      //  out_EVENT_CONTEXT_STATE_ACK                           - component_context_state
1136      //   in_EVENT_CONTEXT_STATE_ADDRESS                       - component_context_state
1137      //   in_EVENT_CONTEXT_STATE_ADDRESS_NEXT                  - component_context_state
1138      //  out_EVENT_CONTEXT_STATE_ADDRESS_NEXT_VAL              - component_context_state
1139      //   in_EVENT_CONTEXT_STATE_IS_DS_TAKE                    - component_context_state
1140
1141      // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
1142      for (uint32_t i=0; i<_param->_nb_context; ++i)
1143        {
1144          dest = _name;
1145#ifdef POSITION
1146          _component->interface_map (src ,"depth_"+toString(i),
1147                                     dest,"depth_"+toString(i));
1148#endif
1149
1150          if (_param->_have_port_depth)
1151          PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_MIN",
1152                              dest,"out_DEPTH_"+toString(i)+"_MIN");
1153          PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_MAX",
1154                              dest,"out_DEPTH_"+toString(i)+"_MAX");
1155        }
1156     
1157      //   in_DEPTH_PREDICTION_UNIT_CURRENT                     - component_prediction_unit
1158      //   in_DEPTH_PREDICTION_UNIT_MIN                         - component_prediction_unit
1159      //   in_DEPTH_PREDICTION_UNIT_MAX                         - component_prediction_unit
1160      //  out_DEPTH_DECOD_UNIT_MIN                              - component_decod_unit
1161      //  out_DEPTH_DECOD_UNIT_MAX                              - component_decod_unit
1162      //  out_DEPTH_CONTEXT_STATE_MIN                           - component_context_state
1163     
1164      // ~~~~~[ Interface : "context"" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1165      //  out_CONTEXT_DECOD_UNIT_DEPTH                          - component_decod_unit
1166    }
1167   
1168    // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1169#if DEBUG_Front_end == true
1170    _component->test_map(false);
1171#endif
1172
1173#ifdef POSITION
1174     if (usage_is_set(_usage,USE_POSITION))
1175       _component->generate_file();
1176#endif
1177
1178     log_end(Front_end,FUNCTION);
1179  };
1180
1181}; // end namespace front_end
1182}; // end namespace multi_front_end
1183}; // end namespace core
1184
1185}; // end namespace behavioural
1186}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.