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

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

1) Stat_list : fix retire old and new register bug
2) Stat_list : remove read_counter and valid flag, because validation of destination is in retire step (not in commit step)
3) Model : add class Model (cf Morpheo.sim)
4) Allocation : alloc_interface_begin and alloc_interface_end to delete temporary array.
5) Script : add distexe.sh
6) Add Comparator, Multiplier, Divider. But this component are not implemented
7) Software : add Dhrystone

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