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

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

1) Bug fix : Load Miss Speculation (in Commit_unit, Update Prediction Table and Context State)
2) Change address, in rob write address_next.
3) Move Meta_Predictor in save directory

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