source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_allocation.cpp @ 104

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

Fix Bug :
1) Load Store Unit : check big endian
2) Commit unit & RAT : add retire_event interface

  • Property svn:keywords set to Id
File size: 116.7 KB
Line 
1/*
2 * $Id: OOO_Engine_allocation.cpp 104 2009-01-21 21:53:13Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/include/OOO_Engine.h"
9#include "Behavioural/include/Allocation.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14namespace multi_ooo_engine {
15namespace ooo_engine {
16
17#undef  FUNCTION
18#define FUNCTION "OOO_Engine::allocation"
19  void OOO_Engine::allocation
20  (
21#ifdef STATISTICS
22   morpheo::behavioural::Parameters_Statistics * param_statistics
23#else
24   void
25#endif
26   )
27  {
28    log_begin(OOO_Engine,FUNCTION);
29
30    _component   = new Component (_usage);
31
32    Entity * entity = _component->set_entity (_name       
33                                              ,"OOO_Engine"
34#ifdef POSITION
35                                              ,COMBINATORY
36#endif
37                                              );
38
39    _interfaces = entity->set_interfaces();
40   
41    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
42    {
43      Interface * interface = _interfaces->set_interface(""
44#ifdef POSITION
45                                                         ,IN
46                                                         ,SOUTH,
47                                                         "Generalist interface"
48#endif
49                                                         );
50     
51      in_CLOCK        = interface->set_signal_clk              ("clock" ,1, CLOCK_VHDL_YES);
52      in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
53    }
54
55    // ~~~~~[ Interface : "rename" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56    {
57      ALLOC2_INTERFACE("rename",IN,WEST,_("Instruction from front_end."),_param->_nb_front_end,_param->_nb_inst_decod[it1]);
58
59      _ALLOC2_VALACK_IN ( in_RENAME_VAL                       , VAL                                                                                 ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
60      _ALLOC2_VALACK_OUT(out_RENAME_ACK                       , ACK                                                                                 ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
61      _ALLOC2_SIGNAL_IN ( in_RENAME_FRONT_END_ID              ,"FRONT_END_ID"              ,Tcontext_t        ,_param->_size_front_end_id           ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
62      _ALLOC2_SIGNAL_IN ( in_RENAME_CONTEXT_ID                ,"CONTEXT_ID"                ,Tcontext_t        ,_param->_size_context_id             ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
63      _ALLOC2_SIGNAL_IN ( in_RENAME_DEPTH                     ,"DEPTH"                     ,Tdepth_t          ,_param->_size_depth                  ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
64      _ALLOC2_SIGNAL_IN ( in_RENAME_TYPE                      ,"TYPE"                      ,Ttype_t           ,_param->_size_type                   ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
65      _ALLOC2_SIGNAL_IN ( in_RENAME_OPERATION                 ,"OPERATION"                 ,Toperation_t      ,_param->_size_operation              ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
66      _ALLOC2_SIGNAL_IN ( in_RENAME_NO_EXECUTE                ,"NO_EXECUTE"                ,Tcontrol_t        ,1                                    ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
67      _ALLOC2_SIGNAL_IN ( in_RENAME_IS_DELAY_SLOT             ,"IS_DELAY_SLOT"             ,Tcontrol_t        ,1                                    ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
68      _ALLOC2_SIGNAL_IN ( in_RENAME_ADDRESS                   ,"ADDRESS"                   ,Taddress_t        ,_param->_size_instruction_address    ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
69      _ALLOC2_SIGNAL_IN ( in_RENAME_HAS_IMMEDIAT              ,"HAS_IMMEDIAT"              ,Tcontrol_t        ,1                                    ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
70      _ALLOC2_SIGNAL_IN ( in_RENAME_IMMEDIAT                  ,"IMMEDIAT"                  ,Tgeneral_data_t   ,_param->_size_general_data           ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
71      _ALLOC2_SIGNAL_IN ( in_RENAME_READ_RA                   ,"READ_RA"                   ,Tcontrol_t        ,1                                    ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
72      _ALLOC2_SIGNAL_IN ( in_RENAME_NUM_REG_RA                ,"NUM_REG_RA"                ,Tgeneral_address_t,_param->_size_general_register_logic ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
73      _ALLOC2_SIGNAL_IN ( in_RENAME_READ_RB                   ,"READ_RB"                   ,Tcontrol_t        ,1                                    ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
74      _ALLOC2_SIGNAL_IN ( in_RENAME_NUM_REG_RB                ,"NUM_REG_RB"                ,Tgeneral_address_t,_param->_size_general_register_logic ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
75      _ALLOC2_SIGNAL_IN ( in_RENAME_READ_RC                   ,"READ_RC"                   ,Tcontrol_t        ,1                                    ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
76      _ALLOC2_SIGNAL_IN ( in_RENAME_NUM_REG_RC                ,"NUM_REG_RC"                ,Tspecial_address_t,_param->_size_special_register_logic ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
77      _ALLOC2_SIGNAL_IN ( in_RENAME_WRITE_RD                  ,"WRITE_RD"                  ,Tcontrol_t        ,1                                    ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
78      _ALLOC2_SIGNAL_IN ( in_RENAME_NUM_REG_RD                ,"NUM_REG_RD"                ,Tgeneral_address_t,_param->_size_general_register_logic ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
79      _ALLOC2_SIGNAL_IN ( in_RENAME_WRITE_RE                  ,"WRITE_RE"                  ,Tcontrol_t        ,1                                    ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
80      _ALLOC2_SIGNAL_IN ( in_RENAME_NUM_REG_RE                ,"NUM_REG_RE"                ,Tspecial_address_t,_param->_size_special_register_logic ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
81      _ALLOC2_SIGNAL_IN ( in_RENAME_EXCEPTION_USE             ,"EXCEPTION_USE"             ,Texception_t      ,_param->_size_exception_use          ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
82      _ALLOC2_SIGNAL_IN ( in_RENAME_EXCEPTION                 ,"EXCEPTION"                 ,Texception_t      ,_param->_size_exception              ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
83    }
84
85    // ~~~~~[ Interface : "issue" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
86    {
87      ALLOC1_INTERFACE("issue",OUT,EAST,_("Instruction to execute_loop"),_param->_nb_inst_issue);
88
89      ALLOC1_VALACK_OUT (out_ISSUE_VAL                        , VAL                                                                                 );
90      ALLOC1_VALACK_IN  ( in_ISSUE_ACK                        , ACK                                                                                 );
91      ALLOC1_SIGNAL_OUT (out_ISSUE_FRONT_END_ID               ,"FRONT_END_ID"              ,Tcontext_t        ,_param->_size_front_end_id           );
92      ALLOC1_SIGNAL_OUT (out_ISSUE_CONTEXT_ID                 ,"CONTEXT_ID"                ,Tcontext_t        ,_param->_size_context_id             );
93      ALLOC1_SIGNAL_OUT (out_ISSUE_PACKET_ID                  ,"PACKET_ID"                 ,Tpacket_t         ,_param->_size_rob_ptr                );
94      ALLOC1_SIGNAL_OUT (out_ISSUE_TYPE                       ,"TYPE"                      ,Ttype_t           ,_param->_size_type                   );
95      ALLOC1_SIGNAL_OUT (out_ISSUE_OPERATION                  ,"OPERATION"                 ,Toperation_t      ,_param->_size_operation              );
96      ALLOC1_SIGNAL_OUT (out_ISSUE_STORE_QUEUE_PTR_WRITE      ,"STORE_QUEUE_PTR_WRITE"     ,Tlsq_ptr_t        ,_param->_size_store_queue_ptr        );
97      ALLOC1_SIGNAL_OUT (out_ISSUE_LOAD_QUEUE_PTR_WRITE       ,"LOAD_QUEUE_PTR_WRITE"      ,Tlsq_ptr_t        ,_param->_size_load_queue_ptr         );
98      ALLOC1_SIGNAL_OUT (out_ISSUE_HAS_IMMEDIAT               ,"HAS_IMMEDIAT"              ,Tcontrol_t        ,1                                    );
99      ALLOC1_SIGNAL_OUT (out_ISSUE_IMMEDIAT                   ,"IMMEDIAT"                  ,Tgeneral_data_t   ,_param->_size_general_data           );
100      ALLOC1_SIGNAL_OUT (out_ISSUE_READ_RA                    ,"READ_RA"                   ,Tcontrol_t        ,1                                    );
101      ALLOC1_SIGNAL_OUT (out_ISSUE_NUM_REG_RA                 ,"NUM_REG_RA"                ,Tgeneral_address_t,_param->_size_general_register       );
102      ALLOC1_SIGNAL_OUT (out_ISSUE_READ_RB                    ,"READ_RB"                   ,Tcontrol_t        ,1                                    );
103      ALLOC1_SIGNAL_OUT (out_ISSUE_NUM_REG_RB                 ,"NUM_REG_RB"                ,Tgeneral_address_t,_param->_size_general_register       );
104      ALLOC1_SIGNAL_OUT (out_ISSUE_READ_RC                    ,"READ_RC"                   ,Tcontrol_t        ,1                                    );
105      ALLOC1_SIGNAL_OUT (out_ISSUE_NUM_REG_RC                 ,"NUM_REG_RC"                ,Tspecial_address_t,_param->_size_special_register       );
106      ALLOC1_SIGNAL_OUT (out_ISSUE_WRITE_RD                   ,"WRITE_RD"                  ,Tcontrol_t        ,1                                    );
107      ALLOC1_SIGNAL_OUT (out_ISSUE_NUM_REG_RD                 ,"NUM_REG_RD"                ,Tgeneral_address_t,_param->_size_general_register       );
108      ALLOC1_SIGNAL_OUT (out_ISSUE_WRITE_RE                   ,"WRITE_RE"                  ,Tcontrol_t        ,1                                    );
109      ALLOC1_SIGNAL_OUT (out_ISSUE_NUM_REG_RE                 ,"NUM_REG_RE"                ,Tspecial_address_t,_param->_size_special_register       );
110    }
111
112    // ~~~~~[ Interface "execute_loop" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
113    {
114      ALLOC2_INTERFACE("execute_loop",IN,EAST,_("Instruction executed, from execute_loop."),_param->_nb_execute_loop,_param->_nb_inst_execute[it1]);
115
116      _ALLOC2_VALACK_IN ( in_EXECUTE_LOOP_VAL                 , VAL                                                                                 ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1]);
117      _ALLOC2_VALACK_OUT(out_EXECUTE_LOOP_ACK                 , ACK                                                                                 ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1]);
118      _ALLOC2_SIGNAL_IN ( in_EXECUTE_LOOP_FRONT_END_ID        ,"FRONT_END_ID"              ,Tcontext_t        ,_param->_size_front_end_id           ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1]);
119      _ALLOC2_SIGNAL_IN ( in_EXECUTE_LOOP_CONTEXT_ID          ,"CONTEXT_ID"                ,Tcontext_t        ,_param->_size_context_id             ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1]);
120      _ALLOC2_SIGNAL_IN ( in_EXECUTE_LOOP_PACKET_ID           ,"PACKET_ID"                 ,Tpacket_t         ,_param->_size_rob_ptr                ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1]);
121//    _ALLOC2_SIGNAL_IN ( in_EXECUTE_LOOP_TYPE                ,"TYPE"                      ,Ttype_t           ,_param->_size_type                   ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1]);
122//    _ALLOC2_SIGNAL_IN ( in_EXECUTE_LOOP_OPERATION           ,"OPERATION"                 ,Toperation_t      ,_param->_size_operation              ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1]);
123      _ALLOC2_SIGNAL_IN ( in_EXECUTE_LOOP_FLAGS               ,"FLAGS"                     ,Tspecial_data_t   ,_param->_size_special_data           ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1]);
124      _ALLOC2_SIGNAL_IN ( in_EXECUTE_LOOP_EXCEPTION           ,"EXCEPTION"                 ,Texception_t      ,_param->_size_exception              ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1]);
125      _ALLOC2_SIGNAL_IN ( in_EXECUTE_LOOP_NO_SEQUENCE         ,"NO_SEQUENCE"               ,Tcontrol_t        ,1                                    ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1]);
126      _ALLOC2_SIGNAL_IN ( in_EXECUTE_LOOP_ADDRESS             ,"ADDRESS"                   ,Taddress_t        ,_param->_size_instruction_address    ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1]);
127      _ALLOC2_SIGNAL_IN ( in_EXECUTE_LOOP_DATA                ,"DATA"                      ,Tgeneral_data_t   ,_param->_size_general_data           ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1]);
128    }
129
130    // ~~~~~[ Interface "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
131    {
132      ALLOC1_INTERFACE("insert",OUT,EAST,_("Interface with RegisterFile's stat-list (insert Re-Order-Buffer)."),_param->_sum_inst_insert);
133
134      ALLOC1_VALACK_OUT (out_INSERT_VAL                       , VAL);
135      ALLOC1_VALACK_IN  ( in_INSERT_ACK                       , ACK);
136      ALLOC1_SIGNAL_OUT (out_INSERT_RD_USE                    ,"RD_USE"                    ,Tcontrol_t        ,1                                    );
137      ALLOC1_SIGNAL_OUT (out_INSERT_RD_NUM_REG                ,"RD_NUM_REG"                ,Tgeneral_address_t,_param->_size_general_register       );
138      ALLOC1_SIGNAL_OUT (out_INSERT_RE_USE                    ,"RE_USE"                    ,Tcontrol_t        ,1                                    );
139      ALLOC1_SIGNAL_OUT (out_INSERT_RE_NUM_REG                ,"RE_NUM_REG"                ,Tspecial_address_t,_param->_size_special_register       );
140    }
141
142//     // ~~~~~[ Interface "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
143//     {
144//       ALLOC1_INTERFACE("retire",OUT,EAST,_("Interface with RegisterFile's stat-list (retire Re-Order-Buffer)."),_param->_sum_inst_retire);
145
146//       ALLOC1_VALACK_OUT (out_RETIRE_VAL                       , VAL);
147//       ALLOC1_VALACK_IN  ( in_RETIRE_ACK                       , ACK);
148//       ALLOC1_SIGNAL_OUT (out_RETIRE_RD_OLD_USE                ,"RD_OLD_USE"                ,Tcontrol_t        ,1                                    );
149//       ALLOC1_SIGNAL_OUT (out_RETIRE_RD_OLD_NUM_REG            ,"RD_OLD_NUM_REG"            ,Tgeneral_address_t,_param->_size_general_register       );
150//       ALLOC1_SIGNAL_OUT (out_RETIRE_RD_NEW_USE                ,"RD_NEW_USE"                ,Tcontrol_t        ,1                                    );
151//       ALLOC1_SIGNAL_OUT (out_RETIRE_RD_NEW_NUM_REG            ,"RD_NEW_NUM_REG"            ,Tgeneral_address_t,_param->_size_general_register       );
152//       ALLOC1_SIGNAL_OUT (out_RETIRE_RE_OLD_USE                ,"RE_OLD_USE"                ,Tcontrol_t        ,1                                    );
153//       ALLOC1_SIGNAL_OUT (out_RETIRE_RE_OLD_NUM_REG            ,"RE_OLD_NUM_REG"            ,Tspecial_address_t,_param->_size_special_register       );
154//       ALLOC1_SIGNAL_OUT (out_RETIRE_RE_NEW_USE                ,"RE_NEW_USE"                ,Tcontrol_t        ,1                                    );
155//       ALLOC1_SIGNAL_OUT (out_RETIRE_RE_NEW_NUM_REG            ,"RE_NEW_NUM_REG"            ,Tspecial_address_t,_param->_size_special_register       );
156//     }
157
158    // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
159    {
160      ALLOC1_INTERFACE("branch_complete",OUT,WEST,_("Instruction to execute_loop"),_param->_nb_inst_issue);
161
162      ALLOC1_VALACK_OUT (out_BRANCH_COMPLETE_VAL              , VAL);
163      ALLOC1_VALACK_IN  ( in_BRANCH_COMPLETE_ACK              , ACK);
164      ALLOC1_SIGNAL_OUT (out_BRANCH_COMPLETE_FRONT_END_ID     ,"FRONT_END_ID"              ,Tcontext_t        ,_param->_size_front_end_id           );
165      ALLOC1_SIGNAL_OUT (out_BRANCH_COMPLETE_CONTEXT_ID       ,"CONTEXT_ID"                ,Tcontext_t        ,_param->_size_context_id             );
166      ALLOC1_SIGNAL_OUT (out_BRANCH_COMPLETE_DEPTH            ,"DEPTH"                     ,Tdepth_t          ,_param->_size_depth                  );
167      ALLOC1_SIGNAL_OUT (out_BRANCH_COMPLETE_ADDRESS          ,"ADDRESS"                   ,Taddress_t        ,_param->_size_instruction_address    );
168      ALLOC1_SIGNAL_OUT (out_BRANCH_COMPLETE_NO_SEQUENCE      ,"NO_SEQUENCE"               ,Tcontrol_t        ,1                                    );
169      ALLOC1_SIGNAL_IN  ( in_BRANCH_COMPLETE_MISS_PREDICTION  ,"MISS_PREDICTION"           ,Tcontrol_t        ,1                                    );
170    }
171                                                                             
172    // ~~~~~[ Interface : "commit_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
173    {
174      ALLOC_INTERFACE("commit_event",OUT,WEST,_("Commit an event (exception)."));
175
176      ALLOC_VALACK_OUT  (out_COMMIT_EVENT_VAL                 , VAL);
177      ALLOC_VALACK_IN   ( in_COMMIT_EVENT_ACK                 , ACK);
178      ALLOC_SIGNAL_OUT  (out_COMMIT_EVENT_FRONT_END_ID        ,"FRONT_END_ID"              ,Tcontext_t        ,_param->_size_front_end_id           );
179      ALLOC_SIGNAL_OUT  (out_COMMIT_EVENT_CONTEXT_ID          ,"CONTEXT_ID"                ,Tcontext_t        ,_param->_size_context_id             );
180      ALLOC_SIGNAL_OUT  (out_COMMIT_EVENT_DEPTH               ,"DEPTH"                     ,Tdepth_t          ,_param->_size_depth                  );
181      ALLOC_SIGNAL_OUT  (out_COMMIT_EVENT_TYPE                ,"TYPE"                      ,Tevent_type_t     ,_param->_size_event_type             );
182      ALLOC_SIGNAL_OUT  (out_COMMIT_EVENT_IS_DELAY_SLOT       ,"IS_DELAY_SLOT"             ,Tcontrol_t        ,1                                    );
183      ALLOC_SIGNAL_OUT  (out_COMMIT_EVENT_ADDRESS             ,"ADDRESS"                   ,Taddress_t        ,_param->_size_instruction_address    );
184      ALLOC_SIGNAL_OUT  (out_COMMIT_EVENT_ADDRESS_EPCR        ,"ADDRESS_EPCR"              ,Taddress_t        ,_param->_size_instruction_address    );
185      ALLOC_SIGNAL_OUT  (out_COMMIT_EVENT_ADDRESS_EEAR_VAL    ,"ADDRESS_EEAR_VAL"          ,Tcontrol_t        ,1                                    );
186      ALLOC_SIGNAL_OUT  (out_COMMIT_EVENT_ADDRESS_EEAR        ,"ADDRESS_EEAR"              ,Tgeneral_data_t   ,_param->_size_general_data           );
187    }
188
189    // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
190    {
191      ALLOC2_INTERFACE("event",IN,WEST,_("Event from context_state."),_param->_nb_front_end,_param->_nb_context[it1]);
192
193      _ALLOC2_VALACK_IN ( in_EVENT_VAL                        , VAL                                                                                 ,_param->_nb_front_end,_param->_nb_context[it1]);
194      _ALLOC2_VALACK_OUT(out_EVENT_ACK                        , ACK                                                                                 ,_param->_nb_front_end,_param->_nb_context[it1]);
195      _ALLOC2_SIGNAL_IN ( in_EVENT_ADDRESS                    ,"ADDRESS"                   ,Taddress_t        ,_param->_size_instruction_address    ,_param->_nb_front_end,_param->_nb_context[it1]);
196      _ALLOC2_SIGNAL_IN ( in_EVENT_ADDRESS_NEXT               ,"ADDRESS_NEXT"              ,Taddress_t        ,_param->_size_instruction_address    ,_param->_nb_front_end,_param->_nb_context[it1]); 
197      _ALLOC2_SIGNAL_IN ( in_EVENT_ADDRESS_NEXT_VAL           ,"ADDRESS_NEXT_VAL"          ,Tcontrol_t        ,1                                    ,_param->_nb_front_end,_param->_nb_context[it1]);
198      _ALLOC2_SIGNAL_IN ( in_EVENT_IS_DS_TAKE                 ,"IS_DS_TAKE"                ,Tcontrol_t        ,1                                    ,_param->_nb_front_end,_param->_nb_context[it1]);
199    }
200
201    // ~~~~~[ Interface "spr_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
202    {
203      ALLOC2_INTERFACE("spr_event",IN,WEST,_("Exception : save spr and set a lot of special register."),_param->_nb_front_end,_param->_nb_context[it1]);
204
205      _ALLOC2_VALACK_IN ( in_SPR_EVENT_VAL                    , VAL                                                                                 ,_param->_nb_front_end,_param->_nb_context[it1]);
206      _ALLOC2_VALACK_OUT(out_SPR_EVENT_ACK                    , ACK                                                                                 ,_param->_nb_front_end,_param->_nb_context[it1]);
207      _ALLOC2_SIGNAL_IN ( in_SPR_EVENT_EPCR                   ,"EPCR"                      ,Tspr_t            ,_param->_size_spr                    ,_param->_nb_front_end,_param->_nb_context[it1]);
208      _ALLOC2_SIGNAL_IN ( in_SPR_EVENT_EEAR_WEN               ,"EEAR_WEN"                  ,Tcontrol_t        ,1                                    ,_param->_nb_front_end,_param->_nb_context[it1]);
209      _ALLOC2_SIGNAL_IN ( in_SPR_EVENT_EEAR                   ,"EEAR"                      ,Tspr_t            ,_param->_size_spr                    ,_param->_nb_front_end,_param->_nb_context[it1]);
210      _ALLOC2_SIGNAL_IN ( in_SPR_EVENT_SR_DSX                 ,"SR_DSX"                    ,Tcontrol_t        ,1                                    ,_param->_nb_front_end,_param->_nb_context[it1]);
211      _ALLOC2_SIGNAL_IN ( in_SPR_EVENT_SR_TO_ESR              ,"SR_TO_ESR"                 ,Tcontrol_t        ,1                                    ,_param->_nb_front_end,_param->_nb_context[it1]);
212    }
213                                                                                 
214    // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
215    {
216      ALLOC2_INTERFACE("nb_inst",OUT,WEST,_("Internal number instruction."),_param->_nb_front_end,_param->_nb_context[it1]);
217
218      _ALLOC2_SIGNAL_OUT(out_NB_INST_COMMIT_ALL               ,"COMMIT_ALL"                 ,Tcounter_t       ,_param->_size_nb_inst_commit         ,_param->_nb_front_end,_param->_nb_context[it1]);
219      _ALLOC2_SIGNAL_OUT(out_NB_INST_COMMIT_MEM               ,"COMMIT_MEM"                 ,Tcounter_t       ,_param->_size_nb_inst_commit         ,_param->_nb_front_end,_param->_nb_context[it1]);
220    }
221
222    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
223    {
224      ALLOC2_INTERFACE("depth",IN,WEST,_("Interface with Prediction unit."),_param->_nb_front_end, _param->_nb_context[it1]);
225
226      _ALLOC2_SIGNAL_IN ( in_DEPTH_MIN                        ,"MIN"                        ,Tdepth_t         ,_param->_size_depth                  ,_param->_nb_front_end, _param->_nb_context[it1]);
227      _ALLOC2_SIGNAL_IN ( in_DEPTH_MAX                        ,"MAX"                        ,Tdepth_t         ,_param->_size_depth                  ,_param->_nb_front_end, _param->_nb_context[it1]); 
228      _ALLOC2_SIGNAL_IN ( in_DEPTH_FULL                       ,"FULL"                       ,Tcontrol_t       ,1                                    ,_param->_nb_front_end, _param->_nb_context[it1]); 
229    }
230
231    // ~~~~~[ Interface : "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
232    {
233      ALLOC2_INTERFACE("spr",OUT,WEST,_("SPR"),_param->_nb_front_end,_param->_nb_context[it1]);
234
235      _ALLOC2_SIGNAL_OUT(out_SPR_SR_IEE                       ,"SR_IEE"                     ,Tcontrol_t       ,1                                    ,_param->_nb_front_end,_param->_nb_context[it1]);
236      _ALLOC2_SIGNAL_OUT(out_SPR_SR_EPH                       ,"SR_EPH"                     ,Tcontrol_t       ,1                                    ,_param->_nb_front_end,_param->_nb_context[it1]);
237    }
238
239    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
240    std::string name;
241
242    _component_rename_unit = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::Rename_unit * [_param->_nb_rename_unit];
243    for (uint32_t i=0; i<_param->_nb_rename_unit; ++i)
244      {
245        name = _name+"_rename_unit_"+toString(i);
246        log_printf(TRACE,OOO_Engine,FUNCTION,_("Create   : %s"),name.c_str());
247       
248        _component_rename_unit [i] = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::Rename_unit
249          (name.c_str()
250#ifdef STATISTICS
251           ,param_statistics
252#endif
253           ,_param->_param_rename_unit [i]
254           ,_usage);
255
256        _component->set_component (_component_rename_unit [i]->_component
257#ifdef POSITION
258                                   , 50, 50, 10, 10
259#endif
260                                   );
261      }
262
263    {
264      name = _name+"_commit_unit";
265      log_printf(TRACE,OOO_Engine,FUNCTION,_("Create   : %s"),name.c_str());
266     
267      _component_commit_unit = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::Commit_unit
268        (name.c_str()
269#ifdef STATISTICS
270         ,param_statistics
271#endif
272         ,_param->_param_commit_unit
273         ,_usage);
274     
275      _component->set_component (_component_commit_unit->_component
276#ifdef POSITION
277                                 , 50, 50, 10, 10
278#endif
279                                 );
280    }
281
282    {
283      name = _name+"_issue_queue";
284      log_printf(TRACE,OOO_Engine,FUNCTION,_("Create   : %s"),name.c_str());
285     
286      _component_issue_queue = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::Issue_queue
287        (name.c_str()
288#ifdef STATISTICS
289         ,param_statistics
290#endif
291         ,_param->_param_issue_queue
292         ,_usage);
293     
294      _component->set_component (_component_issue_queue->_component
295#ifdef POSITION
296                                 , 50, 50, 10, 10
297#endif
298                                 );
299    }
300
301    {
302      name = _name+"_reexecute_unit";
303      log_printf(TRACE,OOO_Engine,FUNCTION,_("Create   : %s"),name.c_str());
304     
305      _component_reexecute_unit = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::reexecute_unit::Reexecute_unit
306        (name.c_str()
307#ifdef STATISTICS
308         ,param_statistics
309#endif
310         ,_param->_param_reexecute_unit
311         ,_usage);
312     
313      _component->set_component (_component_reexecute_unit->_component
314#ifdef POSITION
315                                 , 50, 50, 10, 10
316#endif
317                                 );
318    }
319
320    {
321      name = _name+"_special_register_unit";
322      log_printf(TRACE,OOO_Engine,FUNCTION,_("Create   : %s"),name.c_str());
323     
324      _component_special_register_unit = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::special_register_unit::Special_Register_unit
325        (name.c_str()
326#ifdef STATISTICS
327         ,param_statistics
328#endif
329         ,_param->_param_special_register_unit
330         ,_usage);
331     
332      _component->set_component (_component_special_register_unit->_component
333#ifdef POSITION
334                                 , 50, 50, 10, 10
335#endif
336                                 );
337    }
338
339    {
340      name = _name+"_glue";
341      log_printf(TRACE,OOO_Engine,FUNCTION,_("Create   : %s"),name.c_str());
342     
343      _component_glue = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::ooo_engine_glue::OOO_Engine_Glue
344        (name.c_str()
345#ifdef STATISTICS
346         ,param_statistics
347#endif
348         ,_param->_param_glue
349         ,_usage);
350     
351      _component->set_component (_component_glue->_component
352#ifdef POSITION
353                                 , 50, 50, 10, 10
354#endif
355                                 );
356    }
357       
358    // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
359    std::string src,dest;
360
361    // ===================================================================
362    // =====[ rename_unit ]===============================================
363    // ===================================================================
364    for (uint32_t i=0; i<_param->_nb_rename_unit; ++i)
365      {
366        src = _name+"_rename_unit_"+toString(i);
367        log_printf(TRACE,OOO_Engine,FUNCTION,_("Instance : %s"),name.c_str());
368       
369        {
370          dest = _name;
371#ifdef POSITION
372          _component->interface_map (src ,"",
373                                     dest,"");
374#endif
375          PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
376          PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
377        }
378
379        // ~~~~~[ Interface : "rename_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
380        {
381          std::vector<uint32_t>::iterator it = _param->_link_front_end_with_rename_unit[i].begin();
382          uint32_t x = 0;
383          for (uint32_t j=0; j<_param->_nb_front_end; j++)
384            if (i == *it)
385              {
386                // this front end is link with this rename_unit
387                for (uint32_t k=0; k<_param->_nb_inst_decod [j]; k++)
388                  {
389                    dest = _name;
390
391#ifdef POSITION
392                    _component->interface_map (src ,"rename_in_"+toString(x)+"_"+toString(k),
393                                               dest,"rename_"   +toString(j)+"_"+toString(k));
394#endif
395
396                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_VAL"          ,
397                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_VAL"          );
398                    PORT_MAP(_component,src ,"out_RENAME_IN_"+toString(x)+"_"+toString(k)+"_ACK"          ,
399                                        dest,"out_RENAME_"   +toString(j)+"_"+toString(k)+"_ACK"          );
400                    if (_param->_have_port_context_id)
401                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_CONTEXT_ID"   ,
402                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_CONTEXT_ID"   );
403                    if (_param->_have_port_depth)
404                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_DEPTH"        ,
405                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_DEPTH"        );
406                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_TYPE"         ,
407                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_TYPE"         );
408                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_OPERATION"    ,
409                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_OPERATION"    );
410                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_NO_EXECUTE"   ,
411                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_NO_EXECUTE"   );
412                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_IS_DELAY_SLOT",
413                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_IS_DELAY_SLOT");
414                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_ADDRESS"      ,
415                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_ADDRESS"      );
416                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_HAS_IMMEDIAT" ,
417                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_HAS_IMMEDIAT" );
418                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_IMMEDIAT"     ,
419                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_IMMEDIAT"     );
420                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_READ_RA"      ,
421                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_READ_RA"      );
422                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_NUM_REG_RA"   ,
423                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_NUM_REG_RA"   );
424                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_READ_RB"      ,
425                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_READ_RB"      );
426                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_NUM_REG_RB"   ,
427                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_NUM_REG_RB"   );
428                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_READ_RC"      ,
429                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_READ_RC"      );
430                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_NUM_REG_RC"   ,
431                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_NUM_REG_RC"   );
432                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_WRITE_RD"     ,
433                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_WRITE_RD"     );
434                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_NUM_REG_RD"   ,
435                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_NUM_REG_RD"   );
436                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_WRITE_RE"     ,
437                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_WRITE_RE"     );
438                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_NUM_REG_RE"   ,
439                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_NUM_REG_RE"   );
440                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_EXCEPTION_USE",
441                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_EXCEPTION_USE");
442                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_EXCEPTION"    ,
443                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_EXCEPTION"    );
444
445                    // glue
446                    dest = _name+"_glue";
447
448#ifdef POSITION
449                    _component->interface_map (src ,"rename_in_"+toString(x)+"_"+toString(k),
450                                               dest,"rename_"   +toString(j)+"_"+toString(k));
451#endif
452
453                    if (_param->_have_port_front_end_id)
454                    COMPONENT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+            "_FRONT_END_ID" ,
455                                             dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_RENAME_UNIT_FRONT_END_ID" );
456                  }
457
458                x ++; 
459                it++;
460              }
461        }
462       
463        // ~~~~~[ Interface "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
464        for (uint32_t j=0; j<_param->_nb_inst_insert[i]; j++)
465          {
466            dest = _name+"_commit_unit";
467           
468#ifdef POSITION
469            _component->interface_map (src ,"insert_"+toString(j),
470                                       dest,"insert_"+toString(i)+"_"+toString(j));
471#endif
472
473            if (_param->_have_port_depth)
474            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)                +"_DEPTH"         ,
475                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_DEPTH"         );
476            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)                +"_IS_DELAY_SLOT" ,
477                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_IS_DELAY_SLOT" );
478            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)                +"_ADDRESS"       ,
479                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_ADDRESS"       );
480            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)                +"_EXCEPTION_USE" ,
481                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_EXCEPTION_USE" );
482            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)                +"_EXCEPTION"     ,
483                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_EXCEPTION"     );
484            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)                +"_NUM_REG_RA_LOG",
485                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_NUM_REG_RA_LOG");
486            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)                +"_NUM_REG_RB_LOG",
487                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_NUM_REG_RB_LOG");
488            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)                +"_NUM_REG_RC_LOG",
489                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_NUM_REG_RC_LOG");
490            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)                +"_NUM_REG_RD_LOG",
491                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_NUM_REG_RD_LOG");
492            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)                +"_NUM_REG_RE_LOG",
493                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_NUM_REG_RE_LOG");
494
495            dest = _name+"_glue";
496           
497#ifdef POSITION
498            _component->interface_map (src ,"insert_"+toString(j),
499                                       dest,"insert_"+toString(i)+"_"+toString(j));
500#endif
501           
502            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_VAL"                  ,
503                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_VAL"                  );
504            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(j)+                            "_ACK"                  ,
505                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_ACK"                  );
506            if (_param->_have_port_front_end_id)
507            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_FRONT_END_ID"         ,
508                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_FRONT_END_ID"         );
509            if (_param->_have_port_context_id)
510            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_CONTEXT_ID"           ,
511                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_CONTEXT_ID"           );
512            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_TYPE"                 ,
513                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_TYPE"                 );
514            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_OPERATION"            ,
515                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_OPERATION"            );
516            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_NO_EXECUTE"           ,
517                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_NO_EXECUTE"           );
518            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_HAS_IMMEDIAT"         ,
519                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_HAS_IMMEDIAT"         );
520            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_IMMEDIAT"             ,
521                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_IMMEDIAT"             );
522            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_STORE_QUEUE_PTR_WRITE",
523                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_STORE_QUEUE_PTR_WRITE");
524            if (_param->_have_port_load_queue_ptr)
525            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_LOAD_QUEUE_PTR_WRITE" ,
526                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_LOAD_QUEUE_PTR_WRITE" );
527            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_READ_RA"              ,
528                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_READ_RA"              );
529            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_NUM_REG_RA_PHY"       ,
530                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_NUM_REG_RA_PHY"       );
531            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_READ_RB"              ,
532                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_READ_RB"              );
533            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_NUM_REG_RB_PHY"       ,
534                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_NUM_REG_RB_PHY"       );
535            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_READ_RC"              ,
536                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_READ_RC"              );
537            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_NUM_REG_RC_PHY"       ,
538                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_NUM_REG_RC_PHY"       );
539            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_WRITE_RD"             ,
540                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_WRITE_RD"             );
541            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_NUM_REG_RD_PHY_OLD"   ,
542                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_NUM_REG_RD_PHY_OLD"   );
543            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_NUM_REG_RD_PHY_NEW"   ,
544                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_NUM_REG_RD_PHY_NEW"   );
545            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_WRITE_RE"             ,
546                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_WRITE_RE"             );
547            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_NUM_REG_RE_PHY_OLD"   ,
548                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_NUM_REG_RE_PHY_OLD"   );
549            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_NUM_REG_RE_PHY_NEW"   ,
550                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_NUM_REG_RE_PHY_NEW"   );
551          }
552
553        // ~~~~~[ Interface "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
554        for (uint32_t j=0; j<_param->_nb_inst_retire[i]; j++)
555          {
556            dest = _name+"_commit_unit";
557           
558#ifdef POSITION
559            _component->interface_map (src ,"retire_"+toString(j),
560                                       dest,"retire_"+toString(i)+"_"+toString(j));
561#endif
562
563
564
565            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_VAL"               ,
566                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_VAL"               );
567            COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(j)+                "_ACK"               ,
568                                     dest, "in_RETIRE_"+toString(i)+"_"+toString(j)+"_ACK"               );
569            if (_param->_have_port_front_end_id)
570            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_FRONT_END_ID"      ,
571                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID"      );
572            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_WRITE_RD"          ,
573                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_WRITE_RD"          );
574            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RD_PHY_OLD",
575                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RD_PHY_OLD");
576            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RD_PHY_NEW",
577                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RD_PHY_NEW");
578            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_WRITE_RE"          ,
579                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_WRITE_RE"          );
580            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RE_PHY_OLD",
581                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RE_PHY_OLD");
582            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RE_PHY_NEW",
583                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RE_PHY_NEW");
584            if (_param->_have_port_context_id)
585            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_CONTEXT_ID"           ,
586                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID"           );
587//          COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_TYPE"                 ,
588//                                   dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_TYPE"                 );
589//          COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_OPERATION"            ,
590//                                   dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_OPERATION"            );
591            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_USE_STORE_QUEUE"      ,
592                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_USE_STORE_QUEUE"      );
593            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_USE_LOAD_QUEUE"       ,
594                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_USE_LOAD_QUEUE"       );
595            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_STORE_QUEUE_PTR_WRITE",
596                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_STORE_QUEUE_PTR_WRITE");
597            if (_param->_have_port_load_queue_ptr)
598            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_LOAD_QUEUE_PTR_WRITE" ,
599                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_LOAD_QUEUE_PTR_WRITE" );
600            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_READ_RA"              ,
601                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_READ_RA"              );
602            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RA_PHY"       ,
603                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RA_PHY"       );
604            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_READ_RB"              ,
605                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_READ_RB"              );
606            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RB_PHY"       ,
607                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RB_PHY"       );
608            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_READ_RC"              ,
609                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_READ_RC"              );
610            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RC_PHY"       ,
611                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RC_PHY"       );
612            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RD_LOG"       ,
613                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RD_LOG"       );
614            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RE_LOG"       ,
615                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RE_LOG"       );
616          }
617
618        // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
619        {
620          std::vector<uint32_t>::iterator it = _param->_link_front_end_with_rename_unit[i].begin();
621          uint32_t x = 0;
622          for (uint32_t j=0; j<_param->_nb_front_end; j++)
623            if (i == (*it))
624              {
625                for (uint32_t k=0; k<_param->_nb_context[i]; k++)
626                  {
627                    dest = _name+"_commit_unit";
628                   
629#ifdef POSITION
630                    _component->interface_map (src ,"retire_event_"+toString(x)+"_"+toString(k),
631                                               dest,"retire_event_"+toString(j)+"_"+toString(k));
632#endif
633                    COMPONENT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(x)+"_"+toString(k)+"_VAL",
634                                             dest,"out_RETIRE_EVENT_"+toString(j)+"_"+toString(k)+"_VAL");
635                    COMPONENT_MAP(_component,src ,"out_RETIRE_EVENT_"+toString(x)+"_"+toString(k)+"_ACK",
636                                             dest, "in_RETIRE_EVENT_"+toString(j)+"_"+toString(k)+"_ACK");
637                    COMPONENT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(x)+"_"+toString(k)+"_STATE",
638                                             dest,"out_RETIRE_EVENT_"+toString(j)+"_"+toString(k)+"_STATE");
639                    x++;
640                    ++it;
641                  }
642              }
643        }
644
645        // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
646        {
647          std::vector<uint32_t>::iterator it = _param->_link_front_end_with_rename_unit[i].begin();
648          uint32_t x = 0;
649          for (uint32_t j=0; j<_param->_nb_front_end; j++)
650            if (i == *it)
651              {
652                for (uint32_t k=0; k<_param->_nb_context[j]; k++)
653                  {
654                    dest = _name+"_glue";
655                   
656#ifdef POSITION
657                    _component->interface_map (src ,"spr_read_"+toString(x)+"_"+toString(k),
658                                               dest,"spr_"     +toString(j)+"_"+toString(k));
659#endif
660
661                    COMPONENT_MAP(_component,src , "in_SPR_READ_"+toString(x)+"_"+toString(k)+            "_SR",
662                                             dest,"out_SPR_"     +toString(j)+"_"+toString(k)+"_RENAME_UNIT_SR");
663                  }
664                x++;
665                ++it;
666              }
667        }
668      }
669
670    // ===================================================================
671    // =====[ commit_unit ]===============================================
672    // ===================================================================
673    {
674      src = _name+"_commit_unit";
675      log_printf(TRACE,OOO_Engine,FUNCTION,_("Instance : %s"),name.c_str());
676           
677      {
678        dest = _name;
679#ifdef POSITION
680        _component->interface_map (src ,"",
681                                   dest,"");
682#endif
683        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
684        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
685      }
686
687      // ~~~~~[ Interface "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
688      for (uint32_t i=0; i<_param->_nb_rename_unit; ++i)
689        for (uint32_t j=0; j<_param->_nb_inst_insert[i]; j++)
690          {
691            dest = _name+"_glue";
692#ifdef POSITION
693            _component->interface_map (src ,"insert_"+toString(i)+"_"+toString(j),
694                                       dest,"insert_"+toString(i)+"_"+toString(j));
695#endif
696           
697            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_VAL"                  ,
698                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_VAL"                  );
699            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_"+toString(j)+            "_ACK"                  ,
700                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_ACK"                  );
701            if (_param->_have_port_front_end_id)
702            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_FRONT_END_ID"         ,
703                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_FRONT_END_ID"         );
704            if (_param->_have_port_context_id)
705            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_CONTEXT_ID"           ,
706                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_CONTEXT_ID"           );
707//          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_RENAME_UNIT_ID"       ,
708//                                   dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_RENAME_UNIT_ID"       );
709            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_TYPE"                 ,
710                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_TYPE"                 );
711            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_OPERATION"            ,
712                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_OPERATION"            );
713            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_NO_EXECUTE"           ,
714                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NO_EXECUTE"           );
715            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_STORE_QUEUE_PTR_WRITE",
716                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_STORE_QUEUE_PTR_WRITE");
717            if (_param->_have_port_load_queue_ptr)
718            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_LOAD_QUEUE_PTR_WRITE" ,
719                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_LOAD_QUEUE_PTR_WRITE" );
720            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_READ_RA"              ,
721                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_READ_RA"              );
722            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RA_PHY"       ,
723                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NUM_REG_RA_PHY"       );
724            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_READ_RB"              ,
725                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_READ_RB"              );
726            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RB_PHY"       ,
727                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NUM_REG_RB_PHY"       );
728            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_READ_RC"              ,
729                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_READ_RC"              );
730            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RC_PHY"       ,
731                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NUM_REG_RC_PHY"       );
732            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_WRITE_RD"             ,
733                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_WRITE_RD"             );
734            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RD_PHY_OLD"   ,
735                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NUM_REG_RD_PHY_OLD"   );
736            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RD_PHY_NEW"   ,
737                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NUM_REG_RD_PHY_NEW"   );
738            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_WRITE_RE"             ,
739                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_WRITE_RE"             );
740            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RE_PHY_OLD"   ,
741                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NUM_REG_RE_PHY_OLD"   );
742            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RE_PHY_NEW"   ,
743                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NUM_REG_RE_PHY_NEW"   );
744           
745            dest = _name+"_issue_queue";
746#ifdef POSITION
747            _component->interface_map (src ,"insert_"  +toString(i)+"_"+toString(j),
748                                       dest,"issue_in_"+toString(i)+"_"+toString(j));
749#endif
750           
751            if (_param->_have_port_rob_ptr)
752            COMPONENT_MAP(_component,src ,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_PACKET_ID",
753                                     dest, "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+"_PACKET_ID");
754
755            //    in_INSERT_DEPTH          - component_rename_unit
756            //    in_INSERT_ADDRESS        - component_rename_unit
757            //    in_INSERT_EXCEPTION_USE  - component_rename_unit
758            //    in_INSERT_EXCEPTION      - component_rename_unit
759            //    in_INSERT_NUM_REG_RA_LOG - component_rename_unit
760            //    in_INSERT_NUM_REG_RB_LOG - component_rename_unit
761            //    in_INSERT_NUM_REG_RC_LOG - component_rename_unit
762            //    in_INSERT_NUM_REG_RD_LOG - component_rename_unit
763            //    in_INSERT_NUM_REG_RE_LOG - component_rename_unit
764            //    in_INSERT_IS_DELAY_SLOT  - component_rename_unit
765          }
766                                                                                   
767      // ~~~~~[ Interface "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       
768      for (uint32_t i=0; i<_param->_nb_rename_unit; ++i)
769        for (uint32_t j=0; j<_param->_nb_inst_retire [i]; j++)
770          {
771//             dest = _name+"_glue";
772           
773// #ifdef POSITION
774//             _component->interface_map (src ,"retire_"+toString(i)+"_"+toString(j),
775//                                        dest,"retire_"+toString(i)+"_"+toString(j));
776// #endif
777
778//             COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_"+toString(j)+            "_VAL"               ,
779//                                      dest, "in_RETIRE_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_VAL"               );
780//             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_"+toString(j)+            "_ACK"               ,
781//                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_ACK"               );
782//             COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_"+toString(j)+            "_WRITE_RD"          ,
783//                                      dest, "in_RETIRE_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_WRITE_RD"          );
784//             if (_param->_have_port_front_end_id)
785//             COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_"+toString(j)+            "_FRONT_END_ID"      ,
786//                                      dest, "in_RETIRE_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_FRONT_END_ID"      );
787//             COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RD_PHY_OLD",
788//                                      dest, "in_RETIRE_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NUM_REG_RD_PHY_OLD");
789//             COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RD_PHY_NEW",
790//                                      dest, "in_RETIRE_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NUM_REG_RD_PHY_NEW");
791//             COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_"+toString(j)+            "_WRITE_RE"          ,
792//                                      dest, "in_RETIRE_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_WRITE_RE"          );
793//             COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RE_PHY_OLD",
794//                                      dest, "in_RETIRE_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NUM_REG_RE_PHY_OLD");
795//             COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RE_PHY_NEW",
796//                                      dest, "in_RETIRE_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NUM_REG_RE_PHY_NEW");
797//             COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_"+toString(j)+            "_EVENT_STATE"       ,
798//                                      dest, "in_RETIRE_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_EVENT_STATE"       );
799
800
801            //  out_RETIRE_VAL                       - component_rename_unit
802            //   in_RETIRE_ACK                       - component_rename_unit
803            //  out_RETIRE_WRITE_RD                  - component_rename_unit
804            //  out_RETIRE_FRONT_END_ID              - component_rename_unit
805            //  out_RETIRE_NUM_REG_RD_PHY_OLD        - component_rename_unit
806            //  out_RETIRE_NUM_REG_RD_PHY_NEW        - component_rename_unit
807            //  out_RETIRE_WRITE_RE                  - component_rename_unit
808            //  out_RETIRE_NUM_REG_RE_PHY_OLD        - component_rename_unit
809            //  out_RETIRE_NUM_REG_RE_PHY_NEW        - component_rename_unit
810            //  out_RETIRE_EVENT_STATE               - component_rename_unit
811   
812            //  out_RETIRE_CONTEXT_ID                - component_rename_unit
813            ////out_RETIRE_RENAME_UNIT_ID            - component_rename_unit
814            //  out_RETIRE_USE_STORE_QUEUE           - component_rename_unit
815            //  out_RETIRE_USE_LOAD_QUEUE            - component_rename_unit
816            //  out_RETIRE_STORE_QUEUE_PTR_WRITE     - component_rename_unit
817            //  out_RETIRE_LOAD_QUEUE_PTR_WRITE      - component_rename_unit
818            //  out_RETIRE_READ_RA                   - component_rename_unit
819            //  out_RETIRE_NUM_REG_RA_PHY            - component_rename_unit
820            //  out_RETIRE_READ_RB                   - component_rename_unit
821            //  out_RETIRE_NUM_REG_RB_PHY            - component_rename_unit
822            //  out_RETIRE_READ_RC                   - component_rename_unit
823            //  out_RETIRE_NUM_REG_RC_PHY            - component_rename_unit
824            //  out_RETIRE_NUM_REG_RD_LOG            - component_rename_unit
825            //  out_RETIRE_NUM_REG_RE_LOG            - component_rename_unit
826          }
827     
828      // ~~~~~[ Interface "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       
829        // out_RETIRE_VAL         - rename_unit.out_RETIRE_VAL       
830        //  in_RETIRE_ACK         - rename_unit. in_RETIRE_ACK       
831        // out_RETIRE_EVENT_STATE - rename_unit.out_RETIRE_EVENT_STATE
832 
833
834      // ~~~~~[ Interface : "commit" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       
835      for (uint32_t i=0; i<_param->_nb_inst_commit; i++)
836        {
837          dest = _name+"_reexecute_unit";
838#ifdef POSITION
839          _component->interface_map (src ,"commit_"+toString(i),
840                                     dest,"commit_"+toString(i));
841#endif
842       
843          COMPONENT_MAP(_component,src , "in_COMMIT_"+toString(i)+"_VAL"        ,
844                                   dest,"out_COMMIT_"+toString(i)+"_VAL"        );
845          COMPONENT_MAP(_component,src ,"out_COMMIT_"+toString(i)+"_ACK"        ,
846                                   dest, "in_COMMIT_"+toString(i)+"_ACK"        );
847          COMPONENT_MAP(_component,src , "in_COMMIT_"+toString(i)+"_WEN"        ,
848                                   dest,"out_COMMIT_"+toString(i)+"_WEN"        );
849          if (_param->_have_port_rob_ptr)
850          COMPONENT_MAP(_component,src , "in_COMMIT_"+toString(i)+"_PACKET_ID"  ,
851                                   dest,"out_COMMIT_"+toString(i)+"_PACKET_ID"  );
852//        COMPONENT_MAP(_component,src , "in_COMMIT_"+toString(i)+"_OPERATION"  ,
853//                                 dest,"out_COMMIT_"+toString(i)+"_OPERATION"  );
854//        COMPONENT_MAP(_component,src , "in_COMMIT_"+toString(i)+"_TYPE"       ,
855//                                 dest,"out_COMMIT_"+toString(i)+"_TYPE"       );
856          COMPONENT_MAP(_component,src , "in_COMMIT_"+toString(i)+"_FLAGS"      ,
857                                   dest,"out_COMMIT_"+toString(i)+"_FLAGS"      );
858          COMPONENT_MAP(_component,src , "in_COMMIT_"+toString(i)+"_EXCEPTION"  ,
859                                   dest,"out_COMMIT_"+toString(i)+"_EXCEPTION"  );
860          COMPONENT_MAP(_component,src , "in_COMMIT_"+toString(i)+"_NO_SEQUENCE",
861                                   dest,"out_COMMIT_"+toString(i)+"_NO_SEQUENCE");
862          COMPONENT_MAP(_component,src , "in_COMMIT_"+toString(i)+"_ADDRESS"    ,
863                                   dest,"out_COMMIT_"+toString(i)+"_ADDRESS"    );
864          COMPONENT_MAP(_component,src ,"out_COMMIT_"+toString(i)+"_NUM_REG_RD" ,
865                                   dest, "in_COMMIT_"+toString(i)+"_NUM_REG_RD" );
866          //@@@@@@@@@@
867        }
868     
869      // ~~~~~[ Interface : "reexecute" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       
870      for (uint32_t i=0; i<_param->_nb_inst_reexecute; i++)
871        {
872          dest = _name+"_reexecute_unit";
873#ifdef POSITION
874          _component->interface_map (src ,"reexecute_"    +toString(i),
875                                     dest,"reexecute_rob_"+toString(i));
876#endif
877
878          COMPONENT_MAP(_component,src ,"out_REEXECUTE_"    +toString(i)+"_VAL"                  ,
879                                   dest, "in_REEXECUTE_ROB_"+toString(i)+"_VAL"                  );
880          COMPONENT_MAP(_component,src , "in_REEXECUTE_"    +toString(i)+"_ACK"                  ,
881                                   dest,"out_REEXECUTE_ROB_"+toString(i)+"_ACK"                  );
882          if (_param->_have_port_front_end_id)
883          COMPONENT_MAP(_component,src ,"out_REEXECUTE_"    +toString(i)+"_FRONT_END_ID"         ,
884                                   dest, "in_REEXECUTE_ROB_"+toString(i)+"_FRONT_END_ID"         );
885          if (_param->_have_port_context_id)
886          COMPONENT_MAP(_component,src ,"out_REEXECUTE_"    +toString(i)+"_CONTEXT_ID"           ,
887                                   dest, "in_REEXECUTE_ROB_"+toString(i)+"_CONTEXT_ID"           );
888          if (_param->_have_port_rob_ptr)
889          COMPONENT_MAP(_component,src ,"out_REEXECUTE_"    +toString(i)+"_PACKET_ID"            ,
890                                   dest, "in_REEXECUTE_ROB_"+toString(i)+"_PACKET_ID"            );
891          COMPONENT_MAP(_component,src ,"out_REEXECUTE_"    +toString(i)+"_OPERATION"            ,
892                                   dest, "in_REEXECUTE_ROB_"+toString(i)+"_OPERATION"            );
893          COMPONENT_MAP(_component,src ,"out_REEXECUTE_"    +toString(i)+"_TYPE"                 ,
894                                   dest, "in_REEXECUTE_ROB_"+toString(i)+"_TYPE"                 );
895          COMPONENT_MAP(_component,src ,"out_REEXECUTE_"    +toString(i)+"_STORE_QUEUE_PTR_WRITE",
896                                   dest, "in_REEXECUTE_ROB_"+toString(i)+"_STORE_QUEUE_PTR_WRITE");
897        }
898                                                                           
899      // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       
900      for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++)
901        {
902          dest = _name;
903#ifdef POSITION
904          _component->interface_map (src ,"branch_complete_"+toString(i),
905                                     dest,"branch_complete_"+toString(i));
906#endif
907
908          PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_VAL"            ,
909                              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_VAL"            );
910          PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_ACK"            ,
911                              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_ACK"            );
912          if (_param->_have_port_front_end_id)
913          PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_FRONT_END_ID"   ,
914                              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_FRONT_END_ID"   );
915          if (_param->_have_port_context_id)
916          PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID"     ,
917                              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID"     );
918          if (_param->_have_port_depth)
919          PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_DEPTH"          ,
920                              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_DEPTH"          );
921          PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"        ,
922                              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"        );
923          PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_NO_SEQUENCE"    ,
924                              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_NO_SEQUENCE"    );
925          PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION",
926                              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION");
927        }
928                                                                                   
929      // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
930      {
931        dest = _name;
932#ifdef POSITION
933        _component->interface_map (src ,"update",
934                                   dest,"commit_event");
935#endif
936
937        PORT_MAP(_component,src ,"out_UPDATE_VAL"             ,dest,"out_COMMIT_EVENT_VAL"             );
938        PORT_MAP(_component,src , "in_UPDATE_ACK"             ,dest, "in_COMMIT_EVENT_ACK"             );
939        if (_param->_have_port_front_end_id)
940        PORT_MAP(_component,src ,"out_UPDATE_FRONT_END_ID"    ,dest,"out_COMMIT_EVENT_FRONT_END_ID"    );
941        if (_param->_have_port_context_id)
942        PORT_MAP(_component,src ,"out_UPDATE_CONTEXT_ID"      ,dest,"out_COMMIT_EVENT_CONTEXT_ID"      );
943        if (_param->_have_port_depth)
944        PORT_MAP(_component,src ,"out_UPDATE_DEPTH"           ,dest,"out_COMMIT_EVENT_DEPTH"           );
945        PORT_MAP(_component,src ,"out_UPDATE_TYPE"            ,dest,"out_COMMIT_EVENT_TYPE"            );
946        PORT_MAP(_component,src ,"out_UPDATE_IS_DELAY_SLOT"   ,dest,"out_COMMIT_EVENT_IS_DELAY_SLOT"   );
947        PORT_MAP(_component,src ,"out_UPDATE_ADDRESS"         ,dest,"out_COMMIT_EVENT_ADDRESS"         );
948        PORT_MAP(_component,src ,"out_UPDATE_ADDRESS_EPCR"    ,dest,"out_COMMIT_EVENT_ADDRESS_EPCR"    );
949        PORT_MAP(_component,src ,"out_UPDATE_ADDRESS_EEAR_VAL",dest,"out_COMMIT_EVENT_ADDRESS_EEAR_VAL");
950        PORT_MAP(_component,src ,"out_UPDATE_ADDRESS_EEAR"    ,dest,"out_COMMIT_EVENT_ADDRESS_EEAR"    );
951      }
952
953      // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
954      for (uint32_t i=0; i<_param->_nb_front_end; i++)
955        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
956          {
957            dest = _name;
958#ifdef POSITION
959            _component->interface_map (src ,"event_"+toString(i)+"_"+toString(j),
960                                       dest,"event_"+toString(i)+"_"+toString(j));
961#endif
962           
963            PORT_MAP(_component,src , "in_EVENT_"+toString(i)+"_"+toString(j)+"_VAL"             ,
964                                dest, "in_EVENT_"+toString(i)+"_"+toString(j)+"_VAL"             );
965            PORT_MAP(_component,src ,"out_EVENT_"+toString(i)+"_"+toString(j)+"_ACK"             ,
966                                dest,"out_EVENT_"+toString(i)+"_"+toString(j)+"_ACK"             );
967            PORT_MAP(_component,src , "in_EVENT_"+toString(i)+"_"+toString(j)+"_ADDRESS"         ,
968                                dest, "in_EVENT_"+toString(i)+"_"+toString(j)+"_ADDRESS"         );
969            PORT_MAP(_component,src , "in_EVENT_"+toString(i)+"_"+toString(j)+"_ADDRESS_NEXT"    ,
970                                dest, "in_EVENT_"+toString(i)+"_"+toString(j)+"_ADDRESS_NEXT"    ); 
971            PORT_MAP(_component,src , "in_EVENT_"+toString(i)+"_"+toString(j)+"_ADDRESS_NEXT_VAL",
972                                dest, "in_EVENT_"+toString(i)+"_"+toString(j)+"_ADDRESS_NEXT_VAL");
973            PORT_MAP(_component,src , "in_EVENT_"+toString(i)+"_"+toString(j)+"_IS_DS_TAKE"      ,
974                                dest, "in_EVENT_"+toString(i)+"_"+toString(j)+"_IS_DS_TAKE"      );
975          }
976                                                                                   
977      // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       
978      for (uint32_t i=0; i<_param->_nb_front_end; i++)
979        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
980          {
981            dest = _name;
982#ifdef POSITION
983            _component->interface_map (src ,"nb_inst_"+toString(i)+"_"+toString(j),
984                                       dest,"nb_inst_"+toString(i)+"_"+toString(j));
985#endif
986
987            PORT_MAP(_component,src ,"out_NB_INST_"+toString(i)+"_"+toString(j)+"_COMMIT_ALL",
988                                dest,"out_NB_INST_"+toString(i)+"_"+toString(j)+"_COMMIT_ALL");
989            PORT_MAP(_component,src ,"out_NB_INST_"+toString(i)+"_"+toString(j)+"_COMMIT_MEM",
990                                dest,"out_NB_INST_"+toString(i)+"_"+toString(j)+"_COMMIT_MEM");
991          }
992
993      // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       
994      for (uint32_t i=0; i<_param->_nb_front_end; i++)
995        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
996          {
997            dest = _name;
998#ifdef POSITION
999            _component->interface_map (src ,"depth_"+toString(i)+"_"+toString(j),
1000                                       dest,"depth_"+toString(i)+"_"+toString(j));
1001#endif
1002
1003            if (_param->_have_port_depth)
1004              {
1005            PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MIN",
1006                                dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MIN");
1007            PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MAX",
1008                                dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MAX");
1009              }
1010            PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_FULL",
1011                                dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_FULL");
1012          }
1013
1014      // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1015      for (uint32_t i=0; i<_param->_nb_front_end; i++)
1016        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
1017          {
1018            dest = _name+"_glue";
1019           
1020#ifdef POSITION
1021            _component->interface_map (src ,"spr_read_"+toString(i)+"_"+toString(j),
1022                                       dest,"spr_"     +toString(i)+"_"+toString(j));
1023#endif
1024
1025            COMPONENT_MAP(_component,src , "in_SPR_READ_"+toString(i)+"_"+toString(j)+            "_SR_OVE",
1026                                     dest,"out_SPR_"     +toString(i)+"_"+toString(j)+"_COMMIT_UNIT_SR_OVE");
1027          }
1028
1029      // ~~~~~[ Interface : "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1030      for (uint32_t i=0; i<_param->_nb_front_end; i++)
1031        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
1032          {
1033            dest = _name+"_special_register_unit";
1034#ifdef POSITION
1035            _component->interface_map (src ,"spr_write_" +toString(i)+"_"+toString(j),
1036                                       dest,"spr_commit_"+toString(i)+"_"+toString(j));
1037#endif
1038
1039            COMPONENT_MAP(_component,src ,"out_SPR_WRITE_" +toString(i)+"_"+toString(j)+"_VAL"      ,
1040                                     dest, "in_SPR_COMMIT_"+toString(i)+"_"+toString(j)+"_VAL"      );
1041            COMPONENT_MAP(_component,src , "in_SPR_WRITE_" +toString(i)+"_"+toString(j)+"_ACK"      ,
1042                                     dest,"out_SPR_COMMIT_"+toString(i)+"_"+toString(j)+"_ACK"      );
1043            COMPONENT_MAP(_component,src ,"out_SPR_WRITE_" +toString(i)+"_"+toString(j)+"_SR_F_VAL" ,
1044                                     dest, "in_SPR_COMMIT_"+toString(i)+"_"+toString(j)+"_SR_F_VAL" );
1045            COMPONENT_MAP(_component,src ,"out_SPR_WRITE_" +toString(i)+"_"+toString(j)+"_SR_F"     ,
1046                                     dest, "in_SPR_COMMIT_"+toString(i)+"_"+toString(j)+"_SR_F"     );
1047            COMPONENT_MAP(_component,src ,"out_SPR_WRITE_" +toString(i)+"_"+toString(j)+"_SR_CY_VAL",
1048                                     dest, "in_SPR_COMMIT_"+toString(i)+"_"+toString(j)+"_SR_CY_VAL");
1049            COMPONENT_MAP(_component,src ,"out_SPR_WRITE_" +toString(i)+"_"+toString(j)+"_SR_CY"    ,
1050                                     dest, "in_SPR_COMMIT_"+toString(i)+"_"+toString(j)+"_SR_CY"    );
1051            COMPONENT_MAP(_component,src ,"out_SPR_WRITE_" +toString(i)+"_"+toString(j)+"_SR_OV_VAL",
1052                                     dest, "in_SPR_COMMIT_"+toString(i)+"_"+toString(j)+"_SR_OV_VAL");
1053            COMPONENT_MAP(_component,src ,"out_SPR_WRITE_" +toString(i)+"_"+toString(j)+"_SR_OV"    ,
1054                                     dest, "in_SPR_COMMIT_"+toString(i)+"_"+toString(j)+"_SR_OV"    );
1055          }
1056    }
1057
1058    // ===================================================================
1059    // =====[ issue_queue ]===============================================
1060    // ===================================================================
1061    {
1062      src = _name+"_issue_queue";
1063      log_printf(TRACE,OOO_Engine,FUNCTION,_("Instance : %s"),name.c_str());
1064           
1065      {
1066        dest = _name;
1067#ifdef POSITION
1068        _component->interface_map (src ,"",
1069                                   dest,"");
1070#endif
1071        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
1072        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
1073      }
1074
1075      // ~~~~~[ Interface : "issue_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1076      for (uint32_t i=0; i<_param->_nb_rename_unit; ++i)
1077        for (uint32_t j=0; j<_param->_nb_inst_insert[i]; j++)
1078          {
1079            dest = _name+"_glue";
1080#ifdef POSITION
1081            _component->interface_map (src ,"issue_in_"+toString(i)+"_"+toString(j),
1082                                       dest,"insert_"  +toString(i)+"_"+toString(j));
1083#endif
1084
1085            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_VAL"                  ,
1086                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_VAL"                  );
1087            COMPONENT_MAP(_component,src ,"out_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_ACK"                  ,
1088                                     dest, "in_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_ACK"                  );
1089            if (_param->_have_port_context_id)
1090            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_CONTEXT_ID"           ,
1091                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_CONTEXT_ID"           );
1092            if (_param->_have_port_front_end_id)
1093            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_FRONT_END_ID"         ,
1094                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_FRONT_END_ID"         );
1095            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_OPERATION"            ,
1096                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_OPERATION"            );
1097            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_TYPE"                 ,
1098                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_TYPE"                 );
1099            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_STORE_QUEUE_PTR_WRITE",
1100                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_STORE_QUEUE_PTR_WRITE");
1101            if (_param->_have_port_load_queue_ptr)
1102            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_LOAD_QUEUE_PTR_WRITE" ,
1103                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_LOAD_QUEUE_PTR_WRITE" );
1104            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_HAS_IMMEDIAT"         ,
1105                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_HAS_IMMEDIAT"         );
1106            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_IMMEDIAT"             ,
1107                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_IMMEDIAT"             );
1108            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_READ_RA"              ,
1109                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_READ_RA"              );
1110            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RA"           ,
1111                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_NUM_REG_RA"           );
1112            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_READ_RB"              ,
1113                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_READ_RB"              );
1114            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RB"           ,
1115                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_NUM_REG_RB"           );
1116            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_READ_RC"              ,
1117                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_READ_RC"              );
1118            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RC"           ,
1119                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_NUM_REG_RC"           );
1120            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_WRITE_RD"             ,
1121                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_WRITE_RD"             );
1122            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RD"           ,
1123                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_NUM_REG_RD"           );
1124            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_WRITE_RE"             ,
1125                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_WRITE_RE"             );
1126            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RE"           ,
1127                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_NUM_REG_RE"           );
1128
1129
1130           
1131            //   in_ISSUE_IN_PACKET_ID - component_commit_unit
1132          }
1133
1134      // ~~~~~[ Interface : "reexecute" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1135      for (uint32_t i=0; i<_param->_nb_inst_reexecute; i++)
1136        {
1137          dest = _name+"_reexecute_unit";
1138#ifdef POSITION
1139          _component->interface_map (src ,"reexecute_"+toString(i),
1140                                     dest,"reexecute_"+toString(i));
1141#endif
1142       
1143         
1144          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_VAL"                  ,
1145                                   dest,"out_REEXECUTE_"+toString(i)+"_VAL"                  );
1146          COMPONENT_MAP(_component,src ,"out_REEXECUTE_"+toString(i)+"_ACK"                  ,
1147                                   dest, "in_REEXECUTE_"+toString(i)+"_ACK"                  );
1148          if (_param->_have_port_front_end_id)
1149          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_FRONT_END_ID"         ,
1150                                   dest,"out_REEXECUTE_"+toString(i)+"_FRONT_END_ID"         );
1151          if (_param->_have_port_context_id)
1152          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_CONTEXT_ID"           ,
1153                                   dest,"out_REEXECUTE_"+toString(i)+"_CONTEXT_ID"           );
1154          if (_param->_have_port_rob_ptr)
1155          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_PACKET_ID"            ,
1156                                   dest,"out_REEXECUTE_"+toString(i)+"_PACKET_ID"            );
1157          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_TYPE"                 ,
1158                                   dest,"out_REEXECUTE_"+toString(i)+"_TYPE"                 );
1159          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_OPERATION"            ,
1160                                   dest,"out_REEXECUTE_"+toString(i)+"_OPERATION"            );
1161          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_STORE_QUEUE_PTR_WRITE",
1162                                   dest,"out_REEXECUTE_"+toString(i)+"_STORE_QUEUE_PTR_WRITE");
1163          if (_param->_have_port_load_queue_ptr)
1164          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" ,
1165                                   dest,"out_REEXECUTE_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" );
1166          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_HAS_IMMEDIAT"         ,
1167                                   dest,"out_REEXECUTE_"+toString(i)+"_HAS_IMMEDIAT"         );
1168          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_IMMEDIAT"             ,
1169                                   dest,"out_REEXECUTE_"+toString(i)+"_IMMEDIAT"             );
1170          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_READ_RA"              ,
1171                                   dest,"out_REEXECUTE_"+toString(i)+"_READ_RA"              );
1172          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_NUM_REG_RA"           ,
1173                                   dest,"out_REEXECUTE_"+toString(i)+"_NUM_REG_RA"           );
1174          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_READ_RB"              ,
1175                                   dest,"out_REEXECUTE_"+toString(i)+"_READ_RB"              );
1176          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_NUM_REG_RB"           ,
1177                                   dest,"out_REEXECUTE_"+toString(i)+"_NUM_REG_RB"           );
1178          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_READ_RC"              ,
1179                                   dest,"out_REEXECUTE_"+toString(i)+"_READ_RC"              );
1180          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_NUM_REG_RC"           ,
1181                                   dest,"out_REEXECUTE_"+toString(i)+"_NUM_REG_RC"           );
1182          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_WRITE_RD"             ,
1183                                   dest,"out_REEXECUTE_"+toString(i)+"_WRITE_RD"             );
1184          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_NUM_REG_RD"           ,
1185                                   dest,"out_REEXECUTE_"+toString(i)+"_NUM_REG_RD"           );
1186          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_WRITE_RE"             ,
1187                                   dest,"out_REEXECUTE_"+toString(i)+"_WRITE_RE"             );
1188          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_NUM_REG_RE"           ,
1189                                   dest,"out_REEXECUTE_"+toString(i)+"_NUM_REG_RE"           );
1190        }
1191
1192      // ~~~~~[ Interface : "issue_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1193      for (uint32_t i=0; i<_param->_nb_inst_issue; i++)
1194        {
1195          dest = _name;
1196         
1197#ifdef POSITION
1198          _component->interface_map (src ,"issue_out_"+toString(i),
1199                                     dest,"issue_"    +toString(i));
1200#endif
1201
1202          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_VAL"                  ,
1203                              dest,"out_ISSUE_"    +toString(i)+"_VAL"                  );
1204          PORT_MAP(_component,src , "in_ISSUE_OUT_"+toString(i)+"_ACK"                  ,
1205                              dest, "in_ISSUE_"    +toString(i)+"_ACK"                  );
1206          if (_param->_have_port_front_end_id)
1207          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_FRONT_END_ID"         ,
1208                              dest,"out_ISSUE_"    +toString(i)+"_FRONT_END_ID"         );
1209          if (_param->_have_port_context_id)
1210          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_CONTEXT_ID"           ,
1211                              dest,"out_ISSUE_"    +toString(i)+"_CONTEXT_ID"           );
1212          if (_param->_have_port_rob_ptr)
1213          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_PACKET_ID"            ,
1214                              dest,"out_ISSUE_"    +toString(i)+"_PACKET_ID"            );
1215          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_TYPE"                 ,
1216                              dest,"out_ISSUE_"    +toString(i)+"_TYPE"                 );
1217          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_OPERATION"            ,
1218                              dest,"out_ISSUE_"    +toString(i)+"_OPERATION"            );
1219          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_STORE_QUEUE_PTR_WRITE",
1220                              dest,"out_ISSUE_"    +toString(i)+"_STORE_QUEUE_PTR_WRITE");
1221          if (_param->_have_port_load_queue_ptr)
1222          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" ,
1223                              dest,"out_ISSUE_"    +toString(i)+"_LOAD_QUEUE_PTR_WRITE" );
1224          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_HAS_IMMEDIAT"         ,
1225                              dest,"out_ISSUE_"    +toString(i)+"_HAS_IMMEDIAT"         );
1226          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_IMMEDIAT"             ,
1227                              dest,"out_ISSUE_"    +toString(i)+"_IMMEDIAT"             );
1228          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_READ_RA"              ,
1229                              dest,"out_ISSUE_"    +toString(i)+"_READ_RA"              );
1230          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_NUM_REG_RA"           ,
1231                              dest,"out_ISSUE_"    +toString(i)+"_NUM_REG_RA"           );
1232          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_READ_RB"              ,
1233                              dest,"out_ISSUE_"    +toString(i)+"_READ_RB"              );
1234          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_NUM_REG_RB"           ,
1235                              dest,"out_ISSUE_"    +toString(i)+"_NUM_REG_RB"           );
1236          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_READ_RC"              ,
1237                              dest,"out_ISSUE_"    +toString(i)+"_READ_RC"              );
1238          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_NUM_REG_RC"           ,
1239                              dest,"out_ISSUE_"    +toString(i)+"_NUM_REG_RC"           );
1240          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_WRITE_RD"             ,
1241                              dest,"out_ISSUE_"    +toString(i)+"_WRITE_RD"             );
1242          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_NUM_REG_RD"           ,
1243                              dest,"out_ISSUE_"    +toString(i)+"_NUM_REG_RD"           );
1244          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_WRITE_RE"             ,
1245                              dest,"out_ISSUE_"    +toString(i)+"_WRITE_RE"             );
1246          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_NUM_REG_RE"           ,
1247                              dest,"out_ISSUE_"    +toString(i)+"_NUM_REG_RE"           );
1248        }
1249    }
1250
1251    // ===================================================================
1252    // =====[ reexecute_unit ]============================================
1253    // ===================================================================
1254    {
1255      src = _name+"_reexecute_unit";
1256      log_printf(TRACE,OOO_Engine,FUNCTION,_("Instance : %s"),name.c_str());
1257           
1258      {
1259        dest = _name;
1260#ifdef POSITION
1261        _component->interface_map (src ,"",
1262                                   dest,"");
1263#endif
1264        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
1265        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
1266      }
1267
1268      // ~~~~~[ Interface "execute_loop" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1269      for (uint32_t i=0; i<_param->_nb_execute_loop; i++)
1270        for (uint32_t j=0; j<_param->_nb_inst_execute[i]; j++)
1271          {
1272            dest = _name;
1273#ifdef POSITION
1274            _component->interface_map (src ,"execute_loop_"+toString(i)+"_"+toString(j),
1275                                       dest,"execute_loop_"+toString(i)+"_"+toString(j));
1276#endif
1277
1278            PORT_MAP(_component,src , "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_VAL"         ,
1279                                dest, "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_VAL"         );
1280            PORT_MAP(_component,src ,"out_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_ACK"         ,
1281                                dest,"out_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_ACK"         );
1282            if (_param->_have_port_front_end_id)
1283            PORT_MAP(_component,src , "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID",
1284                                dest, "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID");
1285            if (_param->_have_port_context_id)
1286            PORT_MAP(_component,src , "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID"  ,
1287                                dest, "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID"  );
1288            if (_param->_have_port_rob_ptr)
1289            PORT_MAP(_component,src , "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_PACKET_ID"   ,
1290                                dest, "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_PACKET_ID"   );
1291//          PORT_MAP(_component,src , "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_TYPE"        ,
1292//                              dest, "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_TYPE"        );
1293//          PORT_MAP(_component,src , "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_OPERATION"   ,
1294//                              dest, "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_OPERATION"   );
1295            PORT_MAP(_component,src , "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_FLAGS"       ,
1296                                dest, "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_FLAGS"       );
1297            PORT_MAP(_component,src , "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_EXCEPTION"   ,
1298                                dest, "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_EXCEPTION"   );
1299            PORT_MAP(_component,src , "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_NO_SEQUENCE" ,
1300                                dest, "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_NO_SEQUENCE" );
1301            PORT_MAP(_component,src , "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_ADDRESS"     ,
1302                                dest, "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_ADDRESS"     );
1303            PORT_MAP(_component,src , "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_DATA"        ,
1304                                dest, "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_DATA"        );
1305          }
1306
1307      // ~~~~~[ Interface "commit" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1308      //  out_COMMIT_VAL                           - component_commit_unit
1309      //   in_COMMIT_ACK                           - component_commit_unit
1310      //  out_COMMIT_WEN                           - component_commit_unit
1311      //  out_COMMIT_FRONT_END_ID                  - component_commit_unit
1312      //  out_COMMIT_CONTEXT_ID                    - component_commit_unit
1313      //  out_COMMIT_PACKET_ID                     - component_commit_unit
1314      ////out_COMMIT_OPERATION                     - component_commit_unit
1315      ////out_COMMIT_TYPE                          - component_commit_unit
1316      //  out_COMMIT_FLAGS                         - component_commit_unit
1317      //  out_COMMIT_EXCEPTION                     - component_commit_unit
1318      //  out_COMMIT_NO_SEQUENCE                   - component_commit_unit
1319      //  out_COMMIT_ADDRESS                       - component_commit_unit
1320      //   in_COMMIT_NUM_REG_RD                    - component_commit_unit
1321     
1322      // ~~~~~[ Interface : "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1323      for (uint32_t i=0; i<_param->_nb_inst_reexecute; i++)
1324        {
1325          dest = _name+"_special_register_unit";
1326#ifdef POSITION
1327          _component->interface_map (src ,"spr_"+toString(i),
1328                                     dest,"spr_"+toString(i));
1329#endif
1330     
1331          COMPONENT_MAP(_component,src ,"out_SPR_"       +toString(i)+"_VAL"         ,
1332                                   dest, "in_SPR_ACCESS_"+toString(i)+"_VAL"         );
1333          COMPONENT_MAP(_component,src , "in_SPR_"       +toString(i)+"_ACK"         ,
1334                                   dest,"out_SPR_ACCESS_"+toString(i)+"_ACK"         );
1335          if (_param->_have_port_front_end_id)
1336          COMPONENT_MAP(_component,src ,"out_SPR_"       +toString(i)+"_FRONT_END_ID",
1337                                   dest, "in_SPR_ACCESS_"+toString(i)+"_FRONT_END_ID");
1338          if (_param->_have_port_context_id)
1339          COMPONENT_MAP(_component,src ,"out_SPR_"       +toString(i)+"_CONTEXT_ID"  ,
1340                                   dest, "in_SPR_ACCESS_"+toString(i)+"_CONTEXT_ID"  );
1341          COMPONENT_MAP(_component,src ,"out_SPR_"       +toString(i)+"_WEN"         ,
1342                                   dest, "in_SPR_ACCESS_"+toString(i)+"_WEN"         );
1343          COMPONENT_MAP(_component,src ,"out_SPR_"       +toString(i)+"_NUM_GROUP"   ,
1344                                   dest, "in_SPR_ACCESS_"+toString(i)+"_NUM_GROUP"   );
1345          COMPONENT_MAP(_component,src ,"out_SPR_"       +toString(i)+"_NUM_REG"     ,
1346                                   dest, "in_SPR_ACCESS_"+toString(i)+"_NUM_REG"     );
1347          COMPONENT_MAP(_component,src ,"out_SPR_"       +toString(i)+"_WDATA"       ,
1348                                   dest, "in_SPR_ACCESS_"+toString(i)+"_WDATA"       );
1349          COMPONENT_MAP(_component,src , "in_SPR_"       +toString(i)+"_RDATA"       ,
1350                                   dest,"out_SPR_ACCESS_"+toString(i)+"_RDATA"       );
1351          COMPONENT_MAP(_component,src , "in_SPR_"       +toString(i)+"_INVALID"     ,
1352                                   dest,"out_SPR_ACCESS_"+toString(i)+"_INVALID"     );
1353        }
1354
1355      // ~~~~~[ Interface : "reexecute_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1356      //   in_REEXECUTE_ROB_VAL                    - component_commit_unit
1357      //  out_REEXECUTE_ROB_ACK                    - component_commit_unit
1358      //   in_REEXECUTE_ROB_FRONT_END_ID           - component_commit_unit
1359      //   in_REEXECUTE_ROB_CONTEXT_ID             - component_commit_unit
1360      //   in_REEXECUTE_ROB_PACKET_ID              - component_commit_unit
1361      //   in_REEXECUTE_ROB_OPERATION              - component_commit_unit
1362      //   in_REEXECUTE_ROB_TYPE                   - component_commit_unit
1363      //   in_REEXECUTE_ROB_STORE_QUEUE_PTR_WRITE  - component_commit_unit
1364
1365      // ~~~~~[ Interface : "reexecute" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1366      //  out_REEXECUTE_VAL                        - component_issue_queue
1367      //   in_REEXECUTE_ACK                        - component_issue_queue
1368      //  out_REEXECUTE_CONTEXT_ID                 - component_issue_queue
1369      //  out_REEXECUTE_FRONT_END_ID               - component_issue_queue
1370      //  out_REEXECUTE_PACKET_ID                  - component_issue_queue
1371      //  out_REEXECUTE_OPERATION                  - component_issue_queue
1372      //  out_REEXECUTE_TYPE                       - component_issue_queue
1373      //  out_REEXECUTE_STORE_QUEUE_PTR_WRITE      - component_issue_queue
1374      //  out_REEXECUTE_LOAD_QUEUE_PTR_WRITE       - component_issue_queue
1375      //  out_REEXECUTE_HAS_IMMEDIAT               - component_issue_queue
1376      //  out_REEXECUTE_IMMEDIAT                   - component_issue_queue
1377      //  out_REEXECUTE_READ_RA                    - component_issue_queue
1378      //  out_REEXECUTE_NUM_REG_RA                 - component_issue_queue
1379      //  out_REEXECUTE_READ_RB                    - component_issue_queue
1380      //  out_REEXECUTE_NUM_REG_RB                 - component_issue_queue
1381      //  out_REEXECUTE_READ_RC                    - component_issue_queue
1382      //  out_REEXECUTE_NUM_REG_RC                 - component_issue_queue
1383      //  out_REEXECUTE_WRITE_RD                   - component_issue_queue
1384      //  out_REEXECUTE_NUM_REG_RD                 - component_issue_queue
1385      //  out_REEXECUTE_WRITE_RE                   - component_issue_queue
1386      //  out_REEXECUTE_NUM_REG_RE                 - component_issue_queue
1387    }
1388
1389    // ===================================================================
1390    // =====[ special_register_unit ]=====================================
1391    // ===================================================================
1392    {
1393      src = _name+"_special_register_unit";
1394      log_printf(TRACE,OOO_Engine,FUNCTION,_("Instance : %s"),name.c_str());
1395           
1396      {
1397        dest = _name;
1398#ifdef POSITION
1399        _component->interface_map (src ,"",
1400                                   dest,"");
1401#endif
1402        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
1403        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
1404      }
1405
1406      // ~~~~~[ Interface : "spr_access" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1407      //   in_SPR_ACCESS_VAL          - component_reexecute_unit
1408      //  out_SPR_ACCESS_ACK          - component_reexecute_unit
1409      //   in_SPR_ACCESS_FRONT_END_ID - component_reexecute_unit
1410      //   in_SPR_ACCESS_CONTEXT_ID   - component_reexecute_unit
1411      //   in_SPR_ACCESS_WEN          - component_reexecute_unit
1412      //   in_SPR_ACCESS_NUM_GROUP    - component_reexecute_unit
1413      //   in_SPR_ACCESS_NUM_REG      - component_reexecute_unit
1414      //   in_SPR_ACCESS_WDATA        - component_reexecute_unit
1415      //  out_SPR_ACCESS_RDATA        - component_reexecute_unit
1416      //  out_SPR_ACCESS_INVALID      - component_reexecute_unit
1417     
1418      // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1419      for (uint32_t i=0; i<_param->_nb_front_end; i++)
1420        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
1421          {
1422            dest = _name+"_glue";
1423           
1424#ifdef POSITION
1425            _component->interface_map (src ,"spr_read_"+toString(i)+"_"+toString(j),
1426                                       dest,"spr_"     +toString(i)+"_"+toString(j));
1427#endif
1428
1429            COMPONENT_MAP(_component,src ,"out_SPR_READ_"+toString(i)+"_"+toString(j)+                      "_SR",
1430                                     dest, "in_SPR_"     +toString(i)+"_"+toString(j)+"_SPECIAL_REGISTER_UNIT_SR");
1431          }
1432
1433      // ~~~~~[ Interface : "spr_commit" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1434      //   in_SPR_COMMIT_VAL          - component_commit_unit
1435      //  out_SPR_COMMIT_ACK          - component_commit_unit
1436      //   in_SPR_COMMIT_SR_F_VAL     - component_commit_unit
1437      //   in_SPR_COMMIT_SR_F         - component_commit_unit
1438      //   in_SPR_COMMIT_SR_CY_VAL    - component_commit_unit
1439      //   in_SPR_COMMIT_SR_CY        - component_commit_unit
1440      //   in_SPR_COMMIT_SR_OV_VAL    - component_commit_unit
1441      //   in_SPR_COMMIT_SR_OV        - component_commit_unit
1442
1443      // ~~~~~[ Interface "spr_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1444      for (uint32_t i=0; i<_param->_nb_front_end; i++)
1445        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
1446          {
1447            dest = _name;
1448#ifdef POSITION
1449            _component->interface_map (src ,"spr_event_"+toString(i)+"_"+toString(j),
1450                                       dest,"spr_event_"+toString(i)+"_"+toString(j));
1451#endif
1452
1453            PORT_MAP(_component,src , "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_VAL"      ,
1454                                dest, "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_VAL"      );
1455            PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_ACK"      ,
1456                                dest,"out_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_ACK"      );
1457            PORT_MAP(_component,src , "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_EPCR"     ,
1458                                dest, "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_EPCR"     );
1459            PORT_MAP(_component,src , "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_EEAR_WEN" ,
1460                                dest, "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_EEAR_WEN" );
1461            PORT_MAP(_component,src , "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_EEAR"     ,
1462                                dest, "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_EEAR"     );
1463            PORT_MAP(_component,src , "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_SR_DSX"   ,
1464                                dest, "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_SR_DSX"   );
1465            PORT_MAP(_component,src , "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_SR_TO_ESR",
1466                                dest, "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_SR_TO_ESR");
1467          }
1468    }
1469
1470    // ===================================================================
1471    // =====[ glue ]======================================================
1472    // ===================================================================
1473    {
1474      src = _name+"_glue";
1475      log_printf(TRACE,OOO_Engine,FUNCTION,_("Instance : %s"),name.c_str());
1476           
1477      {
1478        dest = _name;
1479#ifdef POSITION
1480        _component->interface_map (src ,"",
1481                                   dest,"");
1482#endif
1483        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
1484        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
1485      }
1486
1487      // ~~~~~[ Interface : "rename" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1488      for (uint32_t i=0; i<_param->_nb_front_end; i++)
1489        for (uint32_t j=0; j<_param->_nb_inst_decod [i]; j++)
1490          {
1491            dest = _name;
1492#ifdef POSITION
1493            _component->interface_map (src ,"rename_"+toString(i)+"_"+toString(j),
1494                                       dest,"rename_"+toString(i)+"_"+toString(j));
1495#endif
1496           
1497            if (_param->_have_port_front_end_id)
1498            PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID",
1499                                dest, "in_RENAME_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID");
1500
1501            //  out_RENAME_RENAME_UNIT_FRONT_END_ID              - component_rename_unit
1502          }
1503
1504      // ~~~~~[ Interface : "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1505      for (uint32_t i=0; i<_param->_sum_inst_insert; i++)
1506        {
1507          dest = _name;
1508#ifdef POSITION
1509          _component->interface_map (src ,"insert_"+toString(i),
1510                                     dest,"insert_"+toString(i));
1511#endif
1512         
1513          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_VAL"       ,
1514                              dest,"out_INSERT_"+toString(i)+"_VAL"       );
1515          PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_ACK"       ,
1516                              dest, "in_INSERT_"+toString(i)+"_ACK"       );
1517          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_RD_USE"    ,
1518                              dest,"out_INSERT_"+toString(i)+"_RD_USE"    );
1519          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_RD_NUM_REG",
1520                              dest,"out_INSERT_"+toString(i)+"_RD_NUM_REG");
1521          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_RE_USE"    ,
1522                              dest,"out_INSERT_"+toString(i)+"_RE_USE"    );
1523          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_RE_NUM_REG",
1524                              dest,"out_INSERT_"+toString(i)+"_RE_NUM_REG");
1525        }
1526
1527      //   in_INSERT_RENAME_UNIT_VAL                       - component_rename_unit
1528      //  out_INSERT_RENAME_UNIT_ACK                       - component_rename_unit
1529      //   in_INSERT_RENAME_UNIT_FRONT_END_ID              - component_rename_unit
1530      //   in_INSERT_RENAME_UNIT_CONTEXT_ID                - component_rename_unit
1531      //   in_INSERT_RENAME_UNIT_TYPE                      - component_rename_unit
1532      //   in_INSERT_RENAME_UNIT_OPERATION                 - component_rename_unit
1533      //   in_INSERT_RENAME_UNIT_NO_EXECUTE                - component_rename_unit
1534      //   in_INSERT_RENAME_UNIT_HAS_IMMEDIAT              - component_rename_unit
1535      //   in_INSERT_RENAME_UNIT_IMMEDIAT                  - component_rename_unit
1536      //   in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_WRITE     - component_rename_unit
1537      //   in_INSERT_RENAME_UNIT_LOAD_QUEUE_PTR_WRITE      - component_rename_unit
1538      //   in_INSERT_RENAME_UNIT_READ_RA                   - component_rename_unit
1539      //   in_INSERT_RENAME_UNIT_NUM_REG_RA_PHY            - component_rename_unit
1540      //   in_INSERT_RENAME_UNIT_READ_RB                   - component_rename_unit
1541      //   in_INSERT_RENAME_UNIT_NUM_REG_RB_PHY            - component_rename_unit
1542      //   in_INSERT_RENAME_UNIT_READ_RC                   - component_rename_unit
1543      //   in_INSERT_RENAME_UNIT_NUM_REG_RC_PHY            - component_rename_unit
1544      //   in_INSERT_RENAME_UNIT_WRITE_RD                  - component_rename_unit
1545      //   in_INSERT_RENAME_UNIT_NUM_REG_RD_PHY_OLD        - component_rename_unit
1546      //   in_INSERT_RENAME_UNIT_NUM_REG_RD_PHY_NEW        - component_rename_unit
1547      //   in_INSERT_RENAME_UNIT_WRITE_RE                  - component_rename_unit
1548      //   in_INSERT_RENAME_UNIT_NUM_REG_RE_PHY_OLD        - component_rename_unit
1549      //   in_INSERT_RENAME_UNIT_NUM_REG_RE_PHY_NEW        - component_rename_unit
1550      // 
1551      //  out_INSERT_COMMIT_UNIT_VAL                       - component_commit_unit
1552      //   in_INSERT_COMMIT_UNIT_ACK                       - component_commit_unit
1553      //  out_INSERT_COMMIT_UNIT_FRONT_END_ID              - component_commit_unit
1554      //  out_INSERT_COMMIT_UNIT_CONTEXT_ID                - component_commit_unit
1555      ////out_INSERT_COMMIT_UNIT_RENAME_UNIT_ID            - component_commit_unit
1556      //  out_INSERT_COMMIT_UNIT_TYPE                      - component_commit_unit
1557      //  out_INSERT_COMMIT_UNIT_OPERATION                 - component_commit_unit
1558      //  out_INSERT_COMMIT_UNIT_NO_EXECUTE                - component_commit_unit
1559      //  out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_WRITE     - component_commit_unit
1560      //  out_INSERT_COMMIT_UNIT_LOAD_QUEUE_PTR_WRITE      - component_commit_unit
1561      //  out_INSERT_COMMIT_UNIT_READ_RA                   - component_commit_unit
1562      //  out_INSERT_COMMIT_UNIT_NUM_REG_RA_PHY            - component_commit_unit
1563      //  out_INSERT_COMMIT_UNIT_READ_RB                   - component_commit_unit
1564      //  out_INSERT_COMMIT_UNIT_NUM_REG_RB_PHY            - component_commit_unit
1565      //  out_INSERT_COMMIT_UNIT_READ_RC                   - component_commit_unit
1566      //  out_INSERT_COMMIT_UNIT_NUM_REG_RC_PHY            - component_commit_unit
1567      //  out_INSERT_COMMIT_UNIT_WRITE_RD                  - component_commit_unit
1568      //  out_INSERT_COMMIT_UNIT_NUM_REG_RD_PHY_OLD        - component_commit_unit
1569      //  out_INSERT_COMMIT_UNIT_NUM_REG_RD_PHY_NEW        - component_commit_unit
1570      //  out_INSERT_COMMIT_UNIT_WRITE_RE                  - component_commit_unit
1571      //  out_INSERT_COMMIT_UNIT_NUM_REG_RE_PHY_OLD        - component_commit_unit
1572      //  out_INSERT_COMMIT_UNIT_NUM_REG_RE_PHY_NEW        - component_commit_unit
1573      // 
1574      //  out_INSERT_ISSUE_QUEUE_VAL                       - component_issue_queue
1575      //   in_INSERT_ISSUE_QUEUE_ACK                       - component_issue_queue
1576      //  out_INSERT_ISSUE_QUEUE_CONTEXT_ID                - component_issue_queue
1577      //  out_INSERT_ISSUE_QUEUE_FRONT_END_ID              - component_issue_queue
1578      //  out_INSERT_ISSUE_QUEUE_OPERATION                 - component_issue_queue
1579      //  out_INSERT_ISSUE_QUEUE_TYPE                      - component_issue_queue
1580      //  out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_WRITE     - component_issue_queue
1581      //  out_INSERT_ISSUE_QUEUE_LOAD_QUEUE_PTR_WRITE      - component_issue_queue
1582      //  out_INSERT_ISSUE_QUEUE_HAS_IMMEDIAT              - component_issue_queue
1583      //  out_INSERT_ISSUE_QUEUE_IMMEDIAT                  - component_issue_queue
1584      //  out_INSERT_ISSUE_QUEUE_READ_RA                   - component_issue_queue
1585      //  out_INSERT_ISSUE_QUEUE_NUM_REG_RA                - component_issue_queue
1586      //  out_INSERT_ISSUE_QUEUE_READ_RB                   - component_issue_queue
1587      //  out_INSERT_ISSUE_QUEUE_NUM_REG_RB                - component_issue_queue
1588      //  out_INSERT_ISSUE_QUEUE_READ_RC                   - component_issue_queue
1589      //  out_INSERT_ISSUE_QUEUE_NUM_REG_RC                - component_issue_queue
1590      //  out_INSERT_ISSUE_QUEUE_WRITE_RD                  - component_issue_queue
1591      //  out_INSERT_ISSUE_QUEUE_NUM_REG_RD                - component_issue_queue
1592      //  out_INSERT_ISSUE_QUEUE_WRITE_RE                  - component_issue_queue
1593      //  out_INSERT_ISSUE_QUEUE_NUM_REG_RE                - component_issue_queue
1594
1595//       // ~~~~~[ Interface "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1596//       for (uint32_t i=0; i<_param->_sum_inst_retire; i++)
1597//         {
1598//           dest = _name;
1599// #ifdef POSITION
1600//           _component->interface_map (src ,"retire_"+toString(i),
1601//                                      dest,"retire_"+toString(i));
1602// #endif
1603
1604//           PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_VAL"           ,
1605//                               dest,"out_RETIRE_"+toString(i)+"_VAL"           );
1606//           PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_ACK"           ,
1607//                               dest, "in_RETIRE_"+toString(i)+"_ACK"           );
1608//           PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RD_OLD_USE"    ,
1609//                               dest,"out_RETIRE_"+toString(i)+"_RD_OLD_USE"    );
1610//           PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RD_OLD_NUM_REG",
1611//                               dest,"out_RETIRE_"+toString(i)+"_RD_OLD_NUM_REG");
1612//           PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RD_NEW_USE"    ,
1613//                               dest,"out_RETIRE_"+toString(i)+"_RD_NEW_USE"    );
1614//           PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RD_NEW_NUM_REG",
1615//                               dest,"out_RETIRE_"+toString(i)+"_RD_NEW_NUM_REG");
1616//           PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RE_OLD_USE"    ,
1617//                               dest,"out_RETIRE_"+toString(i)+"_RE_OLD_USE"    );
1618//           PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RE_OLD_NUM_REG",
1619//                               dest,"out_RETIRE_"+toString(i)+"_RE_OLD_NUM_REG");
1620//           PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RE_NEW_USE"    ,
1621//                               dest,"out_RETIRE_"+toString(i)+"_RE_NEW_USE"    );
1622//           PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RE_NEW_NUM_REG",
1623//                               dest,"out_RETIRE_"+toString(i)+"_RE_NEW_NUM_REG");
1624//         }
1625
1626      //  out_RETIRE_RENAME_UNIT_VAL                       - component_rename_unit
1627      //   in_RETIRE_RENAME_UNIT_ACK                       - component_rename_unit
1628      //  out_RETIRE_RENAME_UNIT_FRONT_END_ID              - component_rename_unit
1629      //  out_RETIRE_RENAME_UNIT_WRITE_RD                  - component_rename_unit
1630      //  out_RETIRE_RENAME_UNIT_NUM_REG_RD_PHY_OLD        - component_rename_unit
1631      //  out_RETIRE_RENAME_UNIT_NUM_REG_RD_PHY_NEW        - component_rename_unit
1632      //  out_RETIRE_RENAME_UNIT_WRITE_RE                  - component_rename_unit
1633      //  out_RETIRE_RENAME_UNIT_NUM_REG_RE_PHY_OLD        - component_rename_unit
1634      //  out_RETIRE_RENAME_UNIT_NUM_REG_RE_PHY_NEW        - component_rename_unit
1635      //  out_RETIRE_RENAME_UNIT_EVENT_STATE               - component_rename_unit
1636
1637      //   in_RETIRE_COMMIT_UNIT_VAL                       - component_commit_unit
1638      //  out_RETIRE_COMMIT_UNIT_ACK                       - component_commit_unit
1639      //   in_RETIRE_COMMIT_UNIT_FRONT_END_ID              - component_commit_unit
1640      //   in_RETIRE_COMMIT_UNIT_WRITE_RD                  - component_commit_unit
1641      //   in_RETIRE_COMMIT_UNIT_NUM_REG_RD_PHY_OLD        - component_commit_unit
1642      //   in_RETIRE_COMMIT_UNIT_NUM_REG_RD_PHY_NEW        - component_commit_unit
1643      //   in_RETIRE_COMMIT_UNIT_WRITE_RE                  - component_commit_unit
1644      //   in_RETIRE_COMMIT_UNIT_NUM_REG_RE_PHY_OLD        - component_commit_unit
1645      //   in_RETIRE_COMMIT_UNIT_NUM_REG_RE_PHY_NEW        - component_commit_unit
1646      //   in_RETIRE_COMMIT_UNIT_EVENT_STATE               - component_commit_unit
1647
1648      // ~~~~~[ Interface : "spr_sr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1649      for (uint32_t i=0; i<_param->_nb_front_end; i++)
1650        for (uint32_t j=0; j<_param->_nb_context [i]; j++)
1651          {
1652            dest = _name;
1653#ifdef POSITION
1654            _component->interface_map (src ,"spr_"+toString(i)+"_"+toString(j),
1655                                       dest,"spr_"+toString(i)+"_"+toString(j));
1656#endif
1657
1658            PORT_MAP(_component,src ,"out_SPR_"+toString(i)+"_"+toString(j)+"_SR_IEE",
1659                                dest,"out_SPR_"+toString(i)+"_"+toString(j)+"_SR_IEE");
1660            PORT_MAP(_component,src ,"out_SPR_"+toString(i)+"_"+toString(j)+"_SR_EPH",
1661                                dest,"out_SPR_"+toString(i)+"_"+toString(j)+"_SR_EPH");
1662
1663            //  out_SPR_RENAME_UNIT_SR                           - component_rename_unit
1664            //  out_SPR_COMMIT_UNIT_SR_OVE                       - component_commit_unit
1665            //   in_SPR_SPECIAL_REGISTER_UNIT_SR                 - component_special_register_unit
1666          }
1667
1668
1669    }
1670
1671    // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1672#if DEBUG_OOO_Engine == true
1673       _component->test_map();
1674#endif
1675
1676#ifdef POSITION
1677     if (usage_is_set(_usage,USE_POSITION))
1678       _component->generate_file();
1679#endif
1680
1681     log_end(OOO_Engine,FUNCTION);
1682    };
1683
1684}; // end namespace ooo_engine
1685}; // end namespace multi_ooo_engine
1686}; // end namespace core
1687
1688}; // end namespace behavioural
1689}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.