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

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

Almost complete design
with Test and test platform

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