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

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

1) decod_queue : add reg_LAST_SLOT.
2) Commit : insert on event -> to pop decod_queue. Head test : add information (speculative or not)
3) Context State / UPT : Branch miss and Load miss in same cycle.
4) Free List : Bank is on LSB not MSB.
5) Platforms : move data

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