source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/src/Rename_unit_allocation.cpp @ 121

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

1) Commit_unit : remove read information of ROB

  • Property svn:keywords set to Id
File size: 47.7 KB
Line 
1/*
2 * $Id: Rename_unit_allocation.cpp 121 2009-05-27 10:13:56Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/include/Rename_unit.h"
9#include "Behavioural/include/Allocation.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14namespace multi_ooo_engine {
15namespace ooo_engine {
16namespace rename_unit {
17
18
19
20#undef  FUNCTION
21#define FUNCTION "Rename_unit::allocation"
22  void Rename_unit::allocation
23  (
24#ifdef STATISTICS
25   morpheo::behavioural::Parameters_Statistics * param_statistics
26#else
27   void
28#endif
29   )
30  {
31    log_begin(Rename_unit,FUNCTION);
32
33    _component   = new Component (_usage);
34
35    Entity * entity = _component->set_entity (_name       
36                                              ,"Rename_unit"
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 : "rename_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
59    {
60      ALLOC2_INTERFACE_BEGIN("rename_in", IN, EAST, _("output of decod's stage"), _param->_nb_front_end, _param->_nb_inst_decod[it1]);
61     
62      _ALLOC2_VALACK_IN ( in_RENAME_IN_VAL           ,VAL, _param->_nb_front_end, _param->_nb_inst_decod[it1]);
63      _ALLOC2_VALACK_OUT(out_RENAME_IN_ACK           ,ACK, _param->_nb_front_end, _param->_nb_inst_decod[it1]);
64      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_FRONT_END_ID  ,"front_end_id" ,Tcontext_t        ,_param->_size_front_end_id          , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
65      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_CONTEXT_ID    ,"context_id"   ,Tcontext_t        ,_param->_size_context_id            , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
66      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_DEPTH         ,"depth"        ,Tdepth_t          ,_param->_size_depth                 , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
67      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_TYPE          ,"type"         ,Ttype_t           ,_param->_size_type                  , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
68      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_OPERATION     ,"operation"    ,Toperation_t      ,_param->_size_operation             , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
69      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NO_EXECUTE    ,"no_execute"   ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
70      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_IS_DELAY_SLOT ,"is_delay_slot",Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
71#ifdef DEBUG
72      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS       ,"address"      ,Taddress_t        ,_param->_size_instruction_address   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
73#endif
74      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS_NEXT  ,"address_next" ,Taddress_t        ,_param->_size_instruction_address   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
75      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_HAS_IMMEDIAT  ,"has_immediat" ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
76      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_IMMEDIAT      ,"immediat"     ,Tgeneral_data_t   ,_param->_size_general_data          , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
77      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RA       ,"read_ra"      ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
78      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RA    ,"num_reg_ra"   ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]);
79      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RB       ,"read_rb"      ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
80      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RB    ,"num_reg_rb"   ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]);
81      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RC       ,"read_rc"      ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
82      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RC    ,"num_reg_rc"   ,Tspecial_address_t,_param->_size_special_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]);
83      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_WRITE_RD      ,"write_rd"     ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
84      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RD    ,"num_reg_rd"   ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]);
85      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_WRITE_RE      ,"write_re"     ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
86      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RE    ,"num_reg_re"   ,Tspecial_address_t,_param->_size_special_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]);
87      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_EXCEPTION_USE ,"exception_use",Texception_t      ,_param->_size_exception_use         , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
88      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_EXCEPTION     ,"exception"    ,Texception_t      ,_param->_size_exception             , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
89
90      ALLOC2_INTERFACE_END(_param->_nb_front_end, _param->_nb_inst_decod[it1]);
91    }
92
93    // ~~~~~[ Interface "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94    {
95      ALLOC1_INTERFACE_BEGIN("insert",OUT,WEST , _("Instruction with physical register"), _param->_nb_inst_insert);
96     
97      ALLOC1_VALACK_OUT(out_INSERT_VAL                  ,VAL);
98      ALLOC1_VALACK_IN ( in_INSERT_ACK                  ,ACK);
99      ALLOC1_SIGNAL_OUT(out_INSERT_FRONT_END_ID         ,"front_end_id"         ,Tcontext_t        ,_param->_size_front_end_id          );
100      ALLOC1_SIGNAL_OUT(out_INSERT_CONTEXT_ID           ,"context_id"           ,Tcontext_t        ,_param->_size_context_id            );
101      ALLOC1_SIGNAL_OUT(out_INSERT_DEPTH                ,"depth"                ,Tdepth_t          ,_param->_size_depth                 );
102      ALLOC1_SIGNAL_OUT(out_INSERT_TYPE                 ,"type"                 ,Ttype_t           ,_param->_size_type                  );
103      ALLOC1_SIGNAL_OUT(out_INSERT_OPERATION            ,"operation"            ,Toperation_t      ,_param->_size_operation             );
104      ALLOC1_SIGNAL_OUT(out_INSERT_NO_EXECUTE           ,"no_execute"           ,Tcontrol_t        ,1                                   );
105      ALLOC1_SIGNAL_OUT(out_INSERT_IS_DELAY_SLOT        ,"is_delay_slot"        ,Tcontrol_t        ,1                                   );
106#ifdef DEBUG
107      ALLOC1_SIGNAL_OUT(out_INSERT_ADDRESS              ,"address"              ,Taddress_t        ,_param->_size_instruction_address   );
108#endif
109      ALLOC1_SIGNAL_OUT(out_INSERT_ADDRESS_NEXT         ,"address_next"         ,Taddress_t        ,_param->_size_instruction_address   );
110      ALLOC1_SIGNAL_OUT(out_INSERT_HAS_IMMEDIAT         ,"has_immediat"         ,Tcontrol_t        ,1                                   );
111      ALLOC1_SIGNAL_OUT(out_INSERT_IMMEDIAT             ,"immediat"             ,Tgeneral_data_t   ,_param->_size_general_data          );
112      ALLOC1_SIGNAL_OUT(out_INSERT_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t        ,_param->_size_store_queue_ptr       );
113      ALLOC1_SIGNAL_OUT(out_INSERT_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,_param->_size_load_queue_ptr        );
114      ALLOC1_SIGNAL_OUT(out_INSERT_EXCEPTION_USE        ,"exception_use"        ,Texception_t      ,_param->_size_exception_use         );
115      ALLOC1_SIGNAL_OUT(out_INSERT_EXCEPTION            ,"exception"            ,Texception_t      ,_param->_size_exception             );
116      ALLOC1_SIGNAL_OUT(out_INSERT_READ_RA              ,"read_ra"              ,Tcontrol_t        ,1                                   );
117#ifdef DEBUG
118      ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RA_LOG       ,"num_reg_ra_log"       ,Tgeneral_address_t,_param->_size_general_register_logic);
119#endif
120      ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RA_PHY       ,"num_reg_ra_phy"       ,Tgeneral_address_t,_param->_size_general_register      );
121      ALLOC1_SIGNAL_OUT(out_INSERT_READ_RB              ,"read_rb"              ,Tcontrol_t        ,1                                   );
122#ifdef DEBUG
123      ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RB_LOG       ,"num_reg_rb_log"       ,Tgeneral_address_t,_param->_size_general_register_logic);
124#endif
125      ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RB_PHY       ,"num_reg_rb_phy"       ,Tgeneral_address_t,_param->_size_general_register      );
126      ALLOC1_SIGNAL_OUT(out_INSERT_READ_RC              ,"read_rc"              ,Tcontrol_t        ,1                                   );
127#ifdef DEBUG
128      ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RC_LOG       ,"num_reg_rc_log"       ,Tspecial_address_t,_param->_size_special_register_logic);
129#endif
130      ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RC_PHY       ,"num_reg_rc_phy"       ,Tspecial_address_t,_param->_size_special_register      );
131      ALLOC1_SIGNAL_OUT(out_INSERT_WRITE_RD             ,"write_rd"             ,Tcontrol_t        ,1                                   );
132      ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RD_LOG       ,"num_reg_rd_log"       ,Tgeneral_address_t,_param->_size_general_register_logic);
133      ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RD_PHY_OLD   ,"num_reg_rd_phy_old"   ,Tgeneral_address_t,_param->_size_general_register      );
134      ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RD_PHY_NEW   ,"num_reg_rd_phy_new"   ,Tgeneral_address_t,_param->_size_general_register      );
135      ALLOC1_SIGNAL_OUT(out_INSERT_WRITE_RE             ,"write_re"             ,Tcontrol_t        ,1                                   );
136      ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RE_LOG       ,"num_reg_re_log"       ,Tspecial_address_t,_param->_size_special_register_logic);
137      ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RE_PHY_OLD   ,"num_reg_re_phy_old"   ,Tspecial_address_t,_param->_size_special_register      );
138      ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RE_PHY_NEW   ,"num_reg_re_phy_new"   ,Tspecial_address_t,_param->_size_special_register      );
139
140      ALLOC1_INTERFACE_END(_param->_nb_inst_insert);
141    }
142
143    // ~~~~~[ Interface "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
144    {
145      ALLOC1_INTERFACE_BEGIN("retire",IN ,NORTH, _("Retire instruction, update renaming structure."), _param->_nb_inst_retire);
146
147      ALLOC1_VALACK_IN ( in_RETIRE_VAL                  ,VAL);
148      ALLOC1_VALACK_OUT(out_RETIRE_ACK                  ,ACK);
149      ALLOC1_SIGNAL_IN ( in_RETIRE_FRONT_END_ID         ,"front_end_id"         ,Tcontext_t        ,_param->_size_front_end_id          );
150      ALLOC1_SIGNAL_IN ( in_RETIRE_CONTEXT_ID           ,"context_id"           ,Tcontext_t        ,_param->_size_context_id            );
151//    ALLOC1_SIGNAL_IN ( in_RETIRE_TYPE                 ,"type"                 ,Ttype_t           ,_param->_size_type                  );
152//    ALLOC1_SIGNAL_IN ( in_RETIRE_OPERATION            ,"operation"            ,Toperation_t      ,_param->_size_operation             );
153      ALLOC1_SIGNAL_IN ( in_RETIRE_USE_STORE_QUEUE      ,"use_store_queue"      ,Tcontrol_t        ,1                                   );
154      ALLOC1_SIGNAL_IN ( in_RETIRE_USE_LOAD_QUEUE       ,"use_load_queue"       ,Tcontrol_t        ,1                                   );
155      ALLOC1_SIGNAL_IN ( in_RETIRE_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t        ,_param->_size_store_queue_ptr       );
156      ALLOC1_SIGNAL_IN ( in_RETIRE_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,_param->_size_load_queue_ptr        );
157//       ALLOC1_SIGNAL_IN ( in_RETIRE_READ_RA              ,"read_ra"              ,Tcontrol_t        ,1                                   );
158//       ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RA_PHY       ,"num_reg_ra_phy"       ,Tgeneral_address_t,_param->_size_general_register      );
159//       ALLOC1_SIGNAL_IN ( in_RETIRE_READ_RB              ,"read_rb"              ,Tcontrol_t        ,1                                   );
160//       ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RB_PHY       ,"num_reg_rb_phy"       ,Tgeneral_address_t,_param->_size_general_register      );
161//       ALLOC1_SIGNAL_IN ( in_RETIRE_READ_RC              ,"read_rc"              ,Tcontrol_t        ,1                                   );
162//       ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RC_PHY       ,"num_reg_rc_phy"       ,Tspecial_address_t,_param->_size_special_register      );
163      ALLOC1_SIGNAL_IN ( in_RETIRE_WRITE_RD             ,"write_rd"             ,Tcontrol_t        ,1                                   );
164      ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RD_LOG       ,"num_reg_rd_log"       ,Tgeneral_address_t,_param->_size_general_register_logic);
165      ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RD_PHY_OLD   ,"num_reg_rd_phy_old"   ,Tgeneral_address_t,_param->_size_general_register      );
166      ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RD_PHY_NEW   ,"num_reg_rd_phy_new"   ,Tgeneral_address_t,_param->_size_general_register      );
167      ALLOC1_SIGNAL_IN ( in_RETIRE_WRITE_RE             ,"write_re"             ,Tcontrol_t        ,1                                   );
168      ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_LOG       ,"num_reg_re_log"       ,Tspecial_address_t,_param->_size_special_register_logic);
169      ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_PHY_OLD   ,"num_reg_re_phy_old"   ,Tspecial_address_t,_param->_size_special_register      );
170      ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_PHY_NEW   ,"num_reg_re_phy_new"   ,Tspecial_address_t,_param->_size_special_register      );
171
172      ALLOC1_INTERFACE_END(_param->_nb_inst_retire);
173    }
174
175    // ~~~~~[ Interface : "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
176    {
177      ALLOC2_INTERFACE_BEGIN("retire_event", IN,NORTH, _("Retire event"), _param->_nb_front_end, _param->_nb_context[it1]);
178
179      _ALLOC2_VALACK_IN ( in_RETIRE_EVENT_VAL           ,VAL,_param->_nb_front_end, _param->_nb_context[it1]);
180      _ALLOC2_VALACK_OUT(out_RETIRE_EVENT_ACK           ,ACK,_param->_nb_front_end, _param->_nb_context[it1]);
181      _ALLOC2_SIGNAL_IN ( in_RETIRE_EVENT_STATE         ,"state"                ,Tevent_state_t    ,_param->_size_event_state, _param->_nb_front_end, _param->_nb_context[it1]);
182
183      ALLOC2_INTERFACE_END(_param->_nb_front_end, _param->_nb_context[it1]);
184    }
185
186    // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
187    {
188      ALLOC2_INTERFACE_BEGIN("spr_read", IN,NORTH, _("Special register"), _param->_nb_front_end, _param->_nb_context[it1]);
189
190      _ALLOC2_SIGNAL_IN (in_SPR_READ_SR                 ,"sr",Tspr_t            ,_param->_size_spr, _param->_nb_front_end, _param->_nb_context[it1]);
191
192      ALLOC2_INTERFACE_END(_param->_nb_front_end, _param->_nb_context[it1]);
193    }
194
195    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
196
197    std::string name;
198
199    {
200      name = _name+"_rename_select";
201      log_printf(TRACE,Rename_unit,FUNCTION,_("Create   : %s"),name.c_str());
202     
203      _component_rename_select = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::rename_select::Rename_select
204        (name.c_str()
205#ifdef STATISTICS
206         ,param_statistics
207#endif
208         ,_param->_param_rename_select
209         ,_usage);
210     
211      _component->set_component (_component_rename_select->_component
212#ifdef POSITION
213                                 , 50, 50, 10, 10
214#endif
215                                 );
216    }
217
218    {
219      name = _name+"_register_translation_unit";
220      log_printf(TRACE,Rename_unit,FUNCTION,_("Create   : %s"),name.c_str());
221     
222      _component_register_translation_unit = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::Register_translation_unit
223        (name.c_str()
224#ifdef STATISTICS
225         ,param_statistics
226#endif
227         ,_param->_param_register_translation_unit
228         ,_usage);
229     
230      _component->set_component (_component_register_translation_unit->_component
231#ifdef POSITION
232                                 , 50, 50, 10, 10
233#endif
234                                 );
235    }
236
237    {
238      name = _name+"_load_store_pointer_unit";
239      log_printf(TRACE,Rename_unit,FUNCTION,_("Create   : %s"),name.c_str());
240     
241      _component_load_store_pointer_unit = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::load_store_pointer_unit::Load_Store_pointer_unit
242        (name.c_str()
243#ifdef STATISTICS
244         ,param_statistics
245#endif
246         ,_param->_param_load_store_pointer_unit
247         ,_usage);
248     
249      _component->set_component (_component_load_store_pointer_unit->_component
250#ifdef POSITION
251                                 , 50, 50, 10, 10
252#endif
253                                 );
254    }
255
256    {
257      name = _name+"_glue";
258      log_printf(TRACE,Rename_unit,FUNCTION,_("Create   : %s"),name.c_str());
259     
260      _component_glue = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::rename_unit_glue::Rename_unit_Glue
261        (name.c_str()
262#ifdef STATISTICS
263         ,param_statistics
264#endif
265         ,_param->_param_glue
266         ,_usage);
267     
268      _component->set_component (_component_glue->_component
269#ifdef POSITION
270                                 , 50, 50, 10, 10
271#endif
272                                 );
273    }
274   
275    // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
276    std::string src,dest;
277
278    // ===================================================================
279    // =====[ rename_select ]=============================================
280    // ===================================================================
281    {
282      src = _name+"_rename_select";
283      log_printf(TRACE,Rename_unit,FUNCTION,_("Instance : %s"),name.c_str());
284           
285      {
286        dest = _name;
287#ifdef POSITION
288        _component->interface_map (src ,"",
289                                   dest,"");
290#endif
291        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
292        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
293      }
294
295      for (uint32_t i=0; i<_param->_nb_front_end; i++)
296        for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
297          {
298            dest = _name;
299#ifdef POSITION
300            _component->interface_map (src ,"rename_in_"+toString(i)+"_"+toString(j),
301                                       dest,"rename_in_"+toString(i)+"_"+toString(j));
302#endif     
303
304            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_VAL"          ,
305                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_VAL"          );
306            PORT_MAP(_component,src ,"out_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ACK"          ,
307                                dest,"out_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ACK"          );
308            if (_param->_have_port_front_end_id)
309            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID" ,
310                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID" );
311            if (_param->_have_port_context_id)
312            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID"   ,
313                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID"   );
314            if (_param->_have_port_depth)
315            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_DEPTH"        ,
316                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_DEPTH"        );
317            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_TYPE"         ,
318                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_TYPE"         );
319            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_OPERATION"    ,
320                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_OPERATION"    );
321            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NO_EXECUTE"   ,
322                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NO_EXECUTE"   );
323            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_IS_DELAY_SLOT",
324                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_IS_DELAY_SLOT");
325#ifdef DEBUG
326            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS"      ,
327                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS"      );
328#endif
329            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS_NEXT" ,
330                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS_NEXT" );
331            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_HAS_IMMEDIAT" ,
332                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_HAS_IMMEDIAT" );
333            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_IMMEDIAT"     ,
334                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_IMMEDIAT"     );
335            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_READ_RA"      ,
336                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_READ_RA"      );
337            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RA"   ,
338                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RA"   );
339            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_READ_RB"      ,
340                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_READ_RB"      );
341            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RB"   ,
342                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RB"   );
343            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_READ_RC"      ,
344                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_READ_RC"      );
345            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RC"   ,
346                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RC"   );
347            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_WRITE_RD"     ,
348                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_WRITE_RD"     );
349            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RD"   ,
350                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RD"   );
351            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_WRITE_RE"     ,
352                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_WRITE_RE"     );
353            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RE"   ,
354                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RE"   );
355            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_EXCEPTION_USE",
356                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_EXCEPTION_USE");
357            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_EXCEPTION"    ,
358                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_EXCEPTION"    );
359          }
360
361      for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
362        {
363          dest = _name;
364
365#ifdef POSITION
366          _component->interface_map (src ,"rename_out_"+toString(i),
367                                     dest,"insert_"    +toString(i));
368#endif
369
370          PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_IS_DELAY_SLOT",
371                              dest,"out_INSERT_"    +toString(i)+"_IS_DELAY_SLOT");
372          if (_param->_have_port_depth)
373          PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_DEPTH"       ,
374                              dest,"out_INSERT_"    +toString(i)+"_DEPTH"       );
375#ifdef DEBUG
376          PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_ADDRESS"     ,
377                              dest,"out_INSERT_"    +toString(i)+"_ADDRESS"     );
378#endif
379          PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_ADDRESS_NEXT",
380                              dest,"out_INSERT_"    +toString(i)+"_ADDRESS_NEXT");
381          PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_HAS_IMMEDIAT",
382                              dest,"out_INSERT_"    +toString(i)+"_HAS_IMMEDIAT");
383          PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_EXCEPTION_USE",
384                              dest,"out_INSERT_"    +toString(i)+"_EXCEPTION_USE");
385
386          dest = _name+"_register_translation_unit";
387
388#ifdef POSITION
389          _component->interface_map (src ,"rename_out_"+toString(i),
390                                     dest,"rename_"    +toString(i));
391#endif
392
393          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_READ_RA"   ,
394                                   dest, "in_RENAME_"    +toString(i)+"_READ_RA"   );
395          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RA",
396                                   dest, "in_RENAME_"    +toString(i)+"_NUM_REG_RA_LOG");
397          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_READ_RB"   ,
398                                   dest, "in_RENAME_"    +toString(i)+"_READ_RB"   );
399          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RB",
400                                   dest, "in_RENAME_"    +toString(i)+"_NUM_REG_RB_LOG");
401          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_READ_RC"   ,
402                                   dest, "in_RENAME_"    +toString(i)+"_READ_RC"   );
403          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RC",
404                                   dest, "in_RENAME_"    +toString(i)+"_NUM_REG_RC_LOG");
405          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_WRITE_RD"  ,
406                                   dest, "in_RENAME_"    +toString(i)+"_WRITE_RD"  );
407          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RD",
408                                   dest, "in_RENAME_"    +toString(i)+"_NUM_REG_RD_LOG");
409          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_WRITE_RE"  ,
410                                   dest, "in_RENAME_"    +toString(i)+"_WRITE_RE"  );
411          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RE",
412                                   dest, "in_RENAME_"    +toString(i)+"_NUM_REG_RE_LOG");
413
414          dest = _name+"_glue";
415
416#ifdef POSITION
417          _component->interface_map (src ,"rename_out_"+toString(i),
418                                     dest,"insert_"    +toString(i));
419#endif
420         
421          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+              "_VAL"          ,
422                                   dest, "in_INSERT_"    +toString(i)+"_RENAME_SELECT_VAL"          );
423          COMPONENT_MAP(_component,src , "in_RENAME_OUT_"+toString(i)+              "_ACK"          ,
424                                   dest,"out_INSERT_"    +toString(i)+"_RENAME_SELECT_ACK"          );
425          if (_param->_have_port_front_end_id)
426          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+              "_FRONT_END_ID" ,
427                                   dest, "in_INSERT_"    +toString(i)+"_RENAME_SELECT_FRONT_END_ID" );
428          if (_param->_have_port_context_id)
429          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+              "_CONTEXT_ID"   ,
430                                   dest, "in_INSERT_"    +toString(i)+"_RENAME_SELECT_CONTEXT_ID"   );
431          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+              "_TYPE"         ,
432                                   dest, "in_INSERT_"    +toString(i)+"_RENAME_SELECT_TYPE"         );
433          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+              "_OPERATION"    ,
434                                   dest, "in_INSERT_"    +toString(i)+"_RENAME_SELECT_OPERATION"    );
435          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+              "_IMMEDIAT"    ,
436                                   dest, "in_INSERT_"    +toString(i)+"_RENAME_SELECT_IMMEDIAT"     );
437//        COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+              "_EXCEPTION_USE",
438//                                 dest, "in_INSERT_"    +toString(i)+"_RENAME_SELECT_EXCEPTION_USE");
439          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+              "_EXCEPTION"    ,
440                                   dest, "in_INSERT_"    +toString(i)+"_RENAME_SELECT_EXCEPTION"    );
441          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+              "_NO_EXECUTE"   ,
442                                   dest, "in_INSERT_"    +toString(i)+"_RENAME_SELECT_NO_EXECUTE"   );
443        }
444
445      for (uint32_t i=0; i<_param->_nb_front_end; i++)
446        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
447          {
448            dest = _name;
449           
450#ifdef POSITION
451            _component->interface_map (src ,"retire_event_"+toString(i)+"_"+toString(j),
452                                       dest,"retire_event_"+toString(i)+"_"+toString(j));
453#endif     
454            PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE",
455                                dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE");
456          }
457    }
458
459    // ===================================================================
460    // =====[ register_translation_unit ]=================================
461    // ===================================================================
462    {
463      src = _name+"_register_translation_unit";
464      log_printf(TRACE,Rename_unit,FUNCTION,_("Instance : %s"),name.c_str());
465           
466      {
467        dest = _name;
468#ifdef POSITION
469        _component->interface_map (src ,"",
470                                   dest,"");
471#endif
472        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
473        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
474      }
475
476      for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
477        {
478          dest = _name+"_rename_select";
479
480#ifdef POSITION
481          _component->interface_map (src ,"rename_"    +toString(i),
482                                     dest,"rename_out_"+toString(i));
483#endif     
484
485          dest = _name+"_glue";
486
487#ifdef POSITION
488          _component->interface_map (src ,"rename_"+toString(i),
489                                     dest,"insert_"+toString(i));
490#endif     
491
492          COMPONENT_MAP(_component,src , "in_RENAME_"+toString(i)+                     "_VAL"         ,
493                                   dest,"out_INSERT_"+toString(i)+"_REGISTER_TRANSLATION_VAL"         );
494          COMPONENT_MAP(_component,src ,"out_RENAME_"+toString(i)+                     "_ACK"         ,
495                                   dest, "in_INSERT_"+toString(i)+"_REGISTER_TRANSLATION_ACK"         );
496          if (_param->_have_port_front_end_id)
497          COMPONENT_MAP(_component,src , "in_RENAME_"+toString(i)+                     "_FRONT_END_ID",
498                                   dest,"out_INSERT_"+toString(i)+"_REGISTER_TRANSLATION_FRONT_END_ID");
499          if (_param->_have_port_context_id)
500          COMPONENT_MAP(_component,src , "in_RENAME_"+toString(i)+                     "_CONTEXT_ID"  ,
501                                   dest,"out_INSERT_"+toString(i)+"_REGISTER_TRANSLATION_CONTEXT_ID"  );
502
503          //  in_RENAME_READ_RA           - rename_select
504          //  in_RENAME_NUM_REG_RA_LOG    - rename_select
505          //  in_RENAME_READ_RB           - rename_select
506          //  in_RENAME_NUM_REG_RB_LOG    - rename_select
507          //  in_RENAME_READ_RC           - rename_select
508          //  in_RENAME_NUM_REG_RC_LOG    - rename_select
509          //  in_RENAME_WRITE_RD          - rename_select
510          //  in_RENAME_NUM_REG_RD_LOG    - rename_select
511          //  in_RENAME_WRITE_RE          - rename_select
512          //  in_RENAME_NUM_REG_RE_LOG    - rename_select
513
514        }
515
516      for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
517        {
518          dest = _name;
519
520#ifdef POSITION
521          _component->interface_map (src ,"insert_"+toString(i),
522                                     dest,"insert_"+toString(i));
523#endif     
524          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_VAL"               ,
525                              dest,"out_INSERT_"+toString(i)+"_VAL"               );
526          PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_ACK"               ,
527                              dest, "in_INSERT_"+toString(i)+"_ACK"               );
528          if (_param->_have_port_front_end_id)
529          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_FRONT_END_ID"      ,
530                              dest,"out_INSERT_"+toString(i)+"_FRONT_END_ID"      );
531          if (_param->_have_port_context_id)
532          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_CONTEXT_ID"        ,
533                              dest,"out_INSERT_"+toString(i)+"_CONTEXT_ID"        );
534          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_READ_RA"           ,
535                              dest,"out_INSERT_"+toString(i)+"_READ_RA"           );
536#ifdef DEBUG
537          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RA_LOG"    ,
538                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RA_LOG"    );
539#endif
540          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RA_PHY"    ,
541                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RA_PHY"    );
542          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_READ_RB"           ,
543                              dest,"out_INSERT_"+toString(i)+"_READ_RB"           );
544#ifdef DEBUG
545          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RB_LOG"    ,
546                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RB_LOG"    );
547#endif
548          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RB_PHY"    ,
549                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RB_PHY"    );
550          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_READ_RC"           ,
551                              dest,"out_INSERT_"+toString(i)+"_READ_RC"           );
552#ifdef DEBUG
553          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RC_LOG"    ,
554                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RC_LOG"    );
555#endif
556          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RC_PHY"    ,
557                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RC_PHY"    );
558          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_WRITE_RD"          ,
559                              dest,"out_INSERT_"+toString(i)+"_WRITE_RD"          );
560          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RD_LOG"    ,
561                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RD_LOG"    );
562          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RD_PHY_OLD",
563                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RD_PHY_OLD");
564          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RD_PHY_NEW",
565                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RD_PHY_NEW");
566          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_WRITE_RE"          ,
567                              dest,"out_INSERT_"+toString(i)+"_WRITE_RE"          );
568          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RE_LOG"    ,
569                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RE_LOG"    );
570          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RE_PHY_OLD",
571                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RE_PHY_OLD");
572
573          // HACK : use the field num_reg_re to pass the SM and SUMRA flag.
574          // cf : rename_unit_glue and functionnal_unit/Operation
575          dest = _name+"_glue";
576
577          COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(i)+                     "_NUM_REG_RE_PHY_NEW",
578                                   dest, "in_INSERT_"+toString(i)+"_REGISTER_TRANSLATION_NUM_REG_RE_PHY_NEW");
579        }
580
581      for (uint32_t i=0; i<_param->_nb_inst_retire; i++)
582        {
583          dest = _name;
584         
585#ifdef POSITION
586          _component->interface_map (src ,"retire_"+toString(i),
587                                     dest,"retire_"+toString(i));
588#endif     
589         
590          if (_param->_have_port_front_end_id)
591          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_FRONT_END_ID"      ,
592                              dest, "in_RETIRE_"+toString(i)+"_FRONT_END_ID"      );
593          if (_param->_have_port_context_id)
594          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_CONTEXT_ID"        ,
595                              dest, "in_RETIRE_"+toString(i)+"_CONTEXT_ID"        );
596//        PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_READ_RA"           ,
597//                            dest, "in_RETIRE_"+toString(i)+"_READ_RA"           );
598//        PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RA_PHY"    ,
599//                            dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RA_PHY"    );
600//        PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_READ_RB"           ,
601//                            dest, "in_RETIRE_"+toString(i)+"_READ_RB"           );
602//        PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RB_PHY"    ,
603//                            dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RB_PHY"    );
604//        PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_READ_RC"           ,
605//                            dest, "in_RETIRE_"+toString(i)+"_READ_RC"           );
606//        PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RC_PHY"    ,
607//                            dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RC_PHY"    );
608          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_WRITE_RD"          ,
609                              dest, "in_RETIRE_"+toString(i)+"_WRITE_RD"          );
610          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RD_LOG"    ,
611                              dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RD_LOG"    );
612          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_OLD",
613                              dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_OLD");
614          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_NEW",
615                              dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_NEW");
616          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_WRITE_RE"          ,
617                              dest, "in_RETIRE_"+toString(i)+"_WRITE_RE"          );
618          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RE_LOG"    ,
619                              dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RE_LOG"    );
620          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_OLD",
621                              dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_OLD");
622          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_NEW",
623                              dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_NEW");
624
625          dest = _name+"_glue";
626         
627#ifdef POSITION
628          _component->interface_map (src ,"retire_"+toString(i),
629                                     dest,"retire_"+toString(i));
630#endif     
631
632          COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_VAL",dest,"out_RETIRE_"+toString(i)+"_REGISTER_TRANSLATION_VAL");
633          COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_ACK",dest, "in_RETIRE_"+toString(i)+"_REGISTER_TRANSLATION_ACK");
634        }
635
636      for (uint32_t i=0; i<_param->_nb_front_end; i++)
637        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
638          {
639            dest = _name;
640           
641#ifdef POSITION
642            _component->interface_map (src ,"retire_event_"+toString(i)+"_"+toString(j),
643                                       dest,"retire_event_"+toString(i)+"_"+toString(j));
644#endif     
645            PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_VAL"  ,
646                                dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_VAL"  );
647            PORT_MAP(_component,src ,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_ACK"  ,
648                                dest,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_ACK"  );
649            PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE",
650                                dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE");
651          }
652    }
653
654    // ===================================================================
655    // =====[ load_store_pointer_unit ]===================================
656    // ===================================================================
657    {
658      src = _name+"_load_store_pointer_unit";
659      log_printf(TRACE,Rename_unit,FUNCTION,_("Instance : %s"),name.c_str());
660           
661      {
662        dest = _name;
663#ifdef POSITION
664        _component->interface_map (src ,"",
665                                   dest,"");
666#endif
667        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
668        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
669      }
670
671      for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
672        {
673          dest = _name;
674
675#ifdef POSITION
676          _component->interface_map (src ,"insert_"+toString(i),
677                                     dest,"insert_"+toString(i));
678#endif     
679
680          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_STORE_QUEUE_PTR_WRITE",
681                              dest,"out_INSERT_"+toString(i)+"_STORE_QUEUE_PTR_WRITE");
682          if (_param->_have_port_load_queue_ptr)
683          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" ,
684                              dest,"out_INSERT_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" );
685
686          dest = _name+"_glue";
687
688#ifdef POSITION
689          _component->interface_map (src ,"insert_"+toString(i),
690                                     dest,"insert_"+toString(i));
691#endif     
692         
693          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+                         "_VAL"         ,
694                                   dest,"out_INSERT_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_VAL"         );
695          COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(i)+                         "_ACK"         ,
696                                   dest, "in_INSERT_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_ACK"         );
697          if (_param->_have_port_front_end_id)
698          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+                         "_FRONT_END_ID",
699                                   dest,"out_INSERT_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_FRONT_END_ID");
700          if (_param->_have_port_context_id)
701          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+                         "_CONTEXT_ID"  ,
702                                   dest,"out_INSERT_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_CONTEXT_ID"  );
703          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+                         "_TYPE"        ,
704                                   dest,"out_INSERT_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_TYPE"        );
705          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+                         "_OPERATION"   ,
706                                   dest,"out_INSERT_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_OPERATION"   );
707        }
708
709      for (uint32_t i=0; i<_param->_nb_inst_retire; i++)
710        {
711          dest = _name;
712         
713#ifdef POSITION
714          _component->interface_map (src ,"retire_"+toString(i),
715                                     dest,"retire_"+toString(i));
716#endif     
717
718          if (_param->_have_port_front_end_id)
719          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_FRONT_END_ID"         ,
720                              dest, "in_RETIRE_"+toString(i)+"_FRONT_END_ID"         );
721          if (_param->_have_port_context_id)                                         
722          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_CONTEXT_ID"           ,
723                              dest, "in_RETIRE_"+toString(i)+"_CONTEXT_ID"           );
724          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_USE_STORE_QUEUE"      ,     
725                              dest, "in_RETIRE_"+toString(i)+"_USE_STORE_QUEUE"      );
726          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_USE_LOAD_QUEUE"       ,     
727                              dest, "in_RETIRE_"+toString(i)+"_USE_LOAD_QUEUE"       );
728          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_STORE_QUEUE_PTR_WRITE",
729                              dest, "in_RETIRE_"+toString(i)+"_STORE_QUEUE_PTR_WRITE");
730          if (_param->_have_port_load_queue_ptr)
731          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" ,
732                              dest, "in_RETIRE_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" );
733
734          dest = _name+"_glue";
735
736#ifdef POSITION
737          _component->interface_map (src ,"retire_"+toString(i),
738                                     dest,"retire_"+toString(i));
739#endif     
740         
741          COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(i)+                         "_VAL"         ,
742                                   dest,"out_RETIRE_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_VAL"         );
743          COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+                         "_ACK"         ,
744                                   dest, "in_RETIRE_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_ACK"         );
745          //// in_RETIRE_TYPE         - glue
746          //// in_RETIRE_OPERATION    - glue
747        }
748    }
749
750    // ===================================================================
751    // =====[ glue ]======================================================
752    // ===================================================================
753    {
754      src = _name+"_glue";
755      log_printf(TRACE,Rename_unit,FUNCTION,_("Instance : %s"),name.c_str());
756           
757      {
758        dest = _name;
759#ifdef POSITION
760        _component->interface_map (src ,"",
761                                   dest,"");
762#endif
763        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
764        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
765      }
766
767      for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
768        {
769          dest = _name;
770
771#ifdef POSITION
772          _component->interface_map (src ,"insert_"+toString(i),
773                                     dest,"insert_"+toString(i));
774#endif     
775
776          // //out_INSERT_VAL
777          // // in_INSERT_ACK
778          if (_param->_have_port_front_end_id)
779          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_FRONT_END_ID" ,
780                              dest,"out_INSERT_"+toString(i)+"_FRONT_END_ID" );
781          if (_param->_have_port_context_id)
782          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_CONTEXT_ID"   ,
783                              dest,"out_INSERT_"+toString(i)+"_CONTEXT_ID"   );
784          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_TYPE"         ,
785                              dest,"out_INSERT_"+toString(i)+"_TYPE"         );
786          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_OPERATION"    ,
787                              dest,"out_INSERT_"+toString(i)+"_OPERATION"    );
788          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_IMMEDIAT"     ,
789                              dest,"out_INSERT_"+toString(i)+"_IMMEDIAT"     );
790//        PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_EXCEPTION_USE",
791//                            dest,"out_INSERT_"+toString(i)+"_EXCEPTION_USE");
792          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_EXCEPTION"    ,
793                              dest,"out_INSERT_"+toString(i)+"_EXCEPTION"    );
794          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RE_PHY_NEW",
795                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RE_PHY_NEW");
796          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NO_EXECUTE"  ,
797                              dest,"out_INSERT_"+toString(i)+"_NO_EXECUTE"  );
798         
799          //    in_INSERT_RENAME_SELECT_VAL                       - rename_select
800          //   out_INSERT_RENAME_SELECT_ACK                       - rename_select
801          //    in_INSERT_RENAME_SELECT_FRONT_END_ID              - rename_select
802          //    in_INSERT_RENAME_SELECT_CONTEXT_ID                - rename_select
803          //    in_INSERT_RENAME_SELECT_TYPE                      - rename_select
804          //    in_INSERT_RENAME_SELECT_OPERATION                 - rename_select
805          //    in_INSERT_RENAME_SELECT_IMMEDIAT                  - rename_select
806//        //    in_INSERT_RENAME_SELECT_EXCEPTION_USE             - rename_select
807          //    in_INSERT_RENAME_SELECT_EXCEPTION                 - rename_select
808                                                                 
809          //   out_INSERT_REGISTER_TRANSLATION_VAL                - register_translation_unit
810          //    in_INSERT_REGISTER_TRANSLATION_ACK                - register_translation_unit
811          //   out_INSERT_REGISTER_TRANSLATION_FRONT_END_ID       - register_translation_unit
812          //   out_INSERT_REGISTER_TRANSLATION_CONTEXT_ID         - register_translation_unit
813          //   out_INSERT_REGISTER_TRANSLATION_NUM_REG_RE_PHY_NEW - register_translation_unit
814         
815          //   out_INSERT_LOAD_STORE_QUEUE_POINTER_VAL            - load_store_pointer_unit
816          //    in_INSERT_LOAD_STORE_QUEUE_POINTER_ACK            - load_store_pointer_unit
817          //   out_INSERT_LOAD_STORE_QUEUE_POINTER_FRONT_END_ID   - load_store_pointer_unit
818          //   out_INSERT_LOAD_STORE_QUEUE_POINTER_CONTEXT_ID     - load_store_pointer_unit
819          //   out_INSERT_LOAD_STORE_QUEUE_POINTER_TYPE           - load_store_pointer_unit
820          //   out_INSERT_LOAD_STORE_QUEUE_POINTER_OPERATION      - load_store_pointer_unit
821        }
822
823      for (uint32_t i=0; i<_param->_nb_inst_retire; i++)
824        {
825          dest = _name;
826
827#ifdef POSITION
828          _component->interface_map (src ,"retire_"+toString(i),
829                                     dest,"retire_"+toString(i));
830#endif     
831         
832          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_VAL",
833                              dest, "in_RETIRE_"+toString(i)+"_VAL");
834          PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_ACK",
835                              dest,"out_RETIRE_"+toString(i)+"_ACK");
836
837          //   out_RETIRE_LOAD_STORE_QUEUE_POINTER_VAL          - load_store_pointer_unit
838          //    in_RETIRE_LOAD_STORE_QUEUE_POINTER_ACK          - load_store_pointer_unit
839          // //out_RETIRE_LOAD_STORE_QUEUE_POINTER_TYPE         - load_store_pointer_unit
840          // //out_RETIRE_LOAD_STORE_QUEUE_POINTER_OPERATION    - load_store_pointer_unit
841          //   out_RETIRE_REGISTER_TRANSLATION_VAL              - register_translation_unit
842          //    in_RETIRE_REGISTER_TRANSLATION_ACK              - register_translation_unit
843        }
844
845      for (uint32_t i=0; i<_param->_nb_front_end; i++)
846        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
847          {
848            dest = _name;
849#ifdef POSITION
850            _component->interface_map (src ,"spr_read_"+toString(i)+"_"+toString(j),
851                                       dest,"spr_read_"+toString(i)+"_"+toString(j));
852#endif     
853
854            PORT_MAP(_component,src , "in_SPR_READ_"+toString(i)+"_"+toString(j)+"_SR",
855                                dest, "in_SPR_READ_"+toString(i)+"_"+toString(j)+"_SR");
856          }
857    }
858
859    // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
860#if DEBUG_Rename_unit == true
861    _component->test_map();
862#endif
863
864#ifdef POSITION
865     if (usage_is_set(_usage,USE_POSITION))
866       _component->generate_file();
867#endif
868
869     log_end(Rename_unit,FUNCTION);
870  };
871
872}; // end namespace rename_unit
873}; // end namespace ooo_engine
874}; // end namespace multi_ooo_engine
875}; // end namespace core
876
877}; // end namespace behavioural
878}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.