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

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

1) Add soc test
2) fix bug (Pc management, Decod and execute, Update prediction ...)

  • Property svn:keywords set to Id
File size: 117.5 KB
Line 
1/*
2 * $Id: OOO_Engine_allocation.cpp 101 2009-01-15 17:19:08Z 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        std::vector<uint32_t>::iterator it = _param->_link_front_end_with_rename_unit[i].begin();
381        uint32_t x = 0;
382        for (uint32_t j=0; j<_param->_nb_front_end; j++)
383          {
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        for (uint32_t j=0; j<_param->_nb_inst_retire[i]; j++)
554          {
555            dest = _name+"_commit_unit";
556           
557#ifdef POSITION
558            _component->interface_map (src ,"retire_"+toString(j),
559                                       dest,"retire_"+toString(i)+"_"+toString(j));
560#endif
561
562
563
564            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_VAL"               ,
565                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_VAL"               );
566            COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(j)+                "_ACK"               ,
567                                     dest, "in_RETIRE_"+toString(i)+"_"+toString(j)+"_ACK"               );
568            if (_param->_have_port_front_end_id)
569            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_FRONT_END_ID"      ,
570                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID"      );
571            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_WRITE_RD"          ,
572                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_WRITE_RD"          );
573            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RD_PHY_OLD",
574                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RD_PHY_OLD");
575            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RD_PHY_NEW",
576                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RD_PHY_NEW");
577            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_WRITE_RE"          ,
578                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_WRITE_RE"          );
579            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RE_PHY_OLD",
580                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RE_PHY_OLD");
581            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RE_PHY_NEW",
582                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RE_PHY_NEW");
583            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_EVENT_STATE"       ,
584                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_EVENT_STATE"       );
585
586            if (_param->_have_port_context_id)
587            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_CONTEXT_ID"           ,
588                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID"           );
589//          COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_TYPE"                 ,
590//                                   dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_TYPE"                 );
591//          COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_OPERATION"            ,
592//                                   dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_OPERATION"            );
593            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_USE_STORE_QUEUE"      ,
594                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_USE_STORE_QUEUE"      );
595            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_USE_LOAD_QUEUE"       ,
596                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_USE_LOAD_QUEUE"       );
597            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_STORE_QUEUE_PTR_WRITE",
598                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_STORE_QUEUE_PTR_WRITE");
599            if (_param->_have_port_load_queue_ptr)
600            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_LOAD_QUEUE_PTR_WRITE" ,
601                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_LOAD_QUEUE_PTR_WRITE" );
602            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_READ_RA"              ,
603                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_READ_RA"              );
604            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RA_PHY"       ,
605                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RA_PHY"       );
606            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_READ_RB"              ,
607                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_READ_RB"              );
608            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RB_PHY"       ,
609                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RB_PHY"       );
610            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_READ_RC"              ,
611                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_READ_RC"              );
612            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RC_PHY"       ,
613                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RC_PHY"       );
614            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RD_LOG"       ,
615                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RD_LOG"       );
616            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RE_LOG"       ,
617                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RE_LOG"       );
618
619//             dest = _name+"_glue";
620           
621// #ifdef POSITION
622//             _component->interface_map (src ,"retire_"+toString(j),
623//                                        dest,"retire_"+toString(i)+"_"+toString(j));
624// #endif
625           
626//             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                            "_VAL"               ,
627//                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_VAL"               );
628//             COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(j)+                            "_ACK"               ,
629//                                      dest, "in_RETIRE_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_ACK"               );
630//             if (_param->_have_port_front_end_id)
631//             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                            "_FRONT_END_ID"      ,
632//                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_FRONT_END_ID"      );
633//             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                            "_WRITE_RD"          ,
634//                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_WRITE_RD"          );
635//             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                            "_NUM_REG_RD_PHY_OLD",
636//                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_NUM_REG_RD_PHY_OLD");
637//             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                            "_NUM_REG_RD_PHY_NEW",
638//                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_NUM_REG_RD_PHY_NEW");
639//             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                            "_WRITE_RE"          ,
640//                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_WRITE_RE"          );
641//             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                            "_NUM_REG_RE_PHY_OLD",
642//                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_NUM_REG_RE_PHY_OLD");
643//             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                            "_NUM_REG_RE_PHY_NEW",
644//                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_NUM_REG_RE_PHY_NEW");
645//             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                            "_EVENT_STATE"       ,
646//                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_EVENT_STATE"       );
647          }
648
649        // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
650        for (uint32_t i=0; i<_param->_nb_front_end; i++)
651          for (uint32_t j=0; j<_param->_nb_context[i]; j++)
652            {
653              dest = _name+"_glue";
654           
655#ifdef POSITION
656              _component->interface_map (src ,"spr_read_"+toString(i)+"_"+toString(j),
657                                         dest,"spr_"     +toString(i)+"_"+toString(j));
658#endif
659
660              COMPONENT_MAP(_component,src , "in_SPR_READ_"+toString(i)+"_"+toString(j)+            "_SR",
661                                       dest,"out_SPR_"     +toString(i)+"_"+toString(j)+"_RENAME_UNIT_SR");
662            }
663    }
664
665    // ===================================================================
666    // =====[ commit_unit ]===============================================
667    // ===================================================================
668    {
669      src = _name+"_commit_unit";
670      log_printf(TRACE,OOO_Engine,FUNCTION,_("Instance : %s"),name.c_str());
671           
672      {
673        dest = _name;
674#ifdef POSITION
675        _component->interface_map (src ,"",
676                                   dest,"");
677#endif
678        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
679        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
680      }
681
682      // ~~~~~[ Interface "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
683      for (uint32_t i=0; i<_param->_nb_rename_unit; ++i)
684        for (uint32_t j=0; j<_param->_nb_inst_insert[i]; j++)
685          {
686            dest = _name+"_glue";
687#ifdef POSITION
688            _component->interface_map (src ,"insert_"+toString(i)+"_"+toString(j),
689                                       dest,"insert_"+toString(i)+"_"+toString(j));
690#endif
691           
692            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_VAL"                  ,
693                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_VAL"                  );
694            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_"+toString(j)+            "_ACK"                  ,
695                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_ACK"                  );
696            if (_param->_have_port_front_end_id)
697            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_FRONT_END_ID"         ,
698                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_FRONT_END_ID"         );
699            if (_param->_have_port_context_id)
700            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_CONTEXT_ID"           ,
701                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_CONTEXT_ID"           );
702//          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_RENAME_UNIT_ID"       ,
703//                                   dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_RENAME_UNIT_ID"       );
704            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_TYPE"                 ,
705                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_TYPE"                 );
706            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_OPERATION"            ,
707                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_OPERATION"            );
708            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_NO_EXECUTE"           ,
709                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NO_EXECUTE"           );
710            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_STORE_QUEUE_PTR_WRITE",
711                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_STORE_QUEUE_PTR_WRITE");
712            if (_param->_have_port_load_queue_ptr)
713            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_LOAD_QUEUE_PTR_WRITE" ,
714                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_LOAD_QUEUE_PTR_WRITE" );
715            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_READ_RA"              ,
716                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_READ_RA"              );
717            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RA_PHY"       ,
718                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NUM_REG_RA_PHY"       );
719            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_READ_RB"              ,
720                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_READ_RB"              );
721            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RB_PHY"       ,
722                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NUM_REG_RB_PHY"       );
723            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_READ_RC"              ,
724                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_READ_RC"              );
725            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RC_PHY"       ,
726                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NUM_REG_RC_PHY"       );
727            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_WRITE_RD"             ,
728                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_WRITE_RD"             );
729            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RD_PHY_OLD"   ,
730                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NUM_REG_RD_PHY_OLD"   );
731            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RD_PHY_NEW"   ,
732                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NUM_REG_RD_PHY_NEW"   );
733            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_WRITE_RE"             ,
734                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_WRITE_RE"             );
735            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RE_PHY_OLD"   ,
736                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NUM_REG_RE_PHY_OLD"   );
737            COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RE_PHY_NEW"   ,
738                                     dest,"out_INSERT_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NUM_REG_RE_PHY_NEW"   );
739           
740            dest = _name+"_issue_queue";
741#ifdef POSITION
742            _component->interface_map (src ,"insert_"  +toString(i)+"_"+toString(j),
743                                       dest,"issue_in_"+toString(i)+"_"+toString(j));
744#endif
745           
746            if (_param->_have_port_rob_ptr)
747            COMPONENT_MAP(_component,src ,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_PACKET_ID",
748                                     dest, "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+"_PACKET_ID");
749
750            //    in_INSERT_DEPTH          - component_rename_unit
751            //    in_INSERT_ADDRESS        - component_rename_unit
752            //    in_INSERT_EXCEPTION_USE  - component_rename_unit
753            //    in_INSERT_EXCEPTION      - component_rename_unit
754            //    in_INSERT_NUM_REG_RA_LOG - component_rename_unit
755            //    in_INSERT_NUM_REG_RB_LOG - component_rename_unit
756            //    in_INSERT_NUM_REG_RC_LOG - component_rename_unit
757            //    in_INSERT_NUM_REG_RD_LOG - component_rename_unit
758            //    in_INSERT_NUM_REG_RE_LOG - component_rename_unit
759            //    in_INSERT_IS_DELAY_SLOT  - component_rename_unit
760          }
761                                                                                   
762      // ~~~~~[ Interface "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       
763      for (uint32_t i=0; i<_param->_nb_rename_unit; ++i)
764        for (uint32_t j=0; j<_param->_nb_inst_retire [i]; j++)
765          {
766//             dest = _name+"_glue";
767           
768// #ifdef POSITION
769//             _component->interface_map (src ,"retire_"+toString(i)+"_"+toString(j),
770//                                        dest,"retire_"+toString(i)+"_"+toString(j));
771// #endif
772
773//             COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_"+toString(j)+            "_VAL"               ,
774//                                      dest, "in_RETIRE_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_VAL"               );
775//             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_"+toString(j)+            "_ACK"               ,
776//                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_ACK"               );
777//             COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_"+toString(j)+            "_WRITE_RD"          ,
778//                                      dest, "in_RETIRE_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_WRITE_RD"          );
779//             if (_param->_have_port_front_end_id)
780//             COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_"+toString(j)+            "_FRONT_END_ID"      ,
781//                                      dest, "in_RETIRE_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_FRONT_END_ID"      );
782//             COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RD_PHY_OLD",
783//                                      dest, "in_RETIRE_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NUM_REG_RD_PHY_OLD");
784//             COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RD_PHY_NEW",
785//                                      dest, "in_RETIRE_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NUM_REG_RD_PHY_NEW");
786//             COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_"+toString(j)+            "_WRITE_RE"          ,
787//                                      dest, "in_RETIRE_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_WRITE_RE"          );
788//             COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RE_PHY_OLD",
789//                                      dest, "in_RETIRE_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NUM_REG_RE_PHY_OLD");
790//             COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RE_PHY_NEW",
791//                                      dest, "in_RETIRE_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_NUM_REG_RE_PHY_NEW");
792//             COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_"+toString(j)+            "_EVENT_STATE"       ,
793//                                      dest, "in_RETIRE_"+toString(i)+"_"+toString(j)+"_COMMIT_UNIT_EVENT_STATE"       );
794
795
796            //  out_RETIRE_VAL                       - component_rename_unit
797            //   in_RETIRE_ACK                       - component_rename_unit
798            //  out_RETIRE_WRITE_RD                  - component_rename_unit
799            //  out_RETIRE_FRONT_END_ID              - component_rename_unit
800            //  out_RETIRE_NUM_REG_RD_PHY_OLD        - component_rename_unit
801            //  out_RETIRE_NUM_REG_RD_PHY_NEW        - component_rename_unit
802            //  out_RETIRE_WRITE_RE                  - component_rename_unit
803            //  out_RETIRE_NUM_REG_RE_PHY_OLD        - component_rename_unit
804            //  out_RETIRE_NUM_REG_RE_PHY_NEW        - component_rename_unit
805            //  out_RETIRE_EVENT_STATE               - component_rename_unit
806   
807            //  out_RETIRE_CONTEXT_ID                - component_rename_unit
808            ////out_RETIRE_RENAME_UNIT_ID            - component_rename_unit
809            //  out_RETIRE_USE_STORE_QUEUE           - component_rename_unit
810            //  out_RETIRE_USE_LOAD_QUEUE            - component_rename_unit
811            //  out_RETIRE_STORE_QUEUE_PTR_WRITE     - component_rename_unit
812            //  out_RETIRE_LOAD_QUEUE_PTR_WRITE      - component_rename_unit
813            //  out_RETIRE_READ_RA                   - component_rename_unit
814            //  out_RETIRE_NUM_REG_RA_PHY            - component_rename_unit
815            //  out_RETIRE_READ_RB                   - component_rename_unit
816            //  out_RETIRE_NUM_REG_RB_PHY            - component_rename_unit
817            //  out_RETIRE_READ_RC                   - component_rename_unit
818            //  out_RETIRE_NUM_REG_RC_PHY            - component_rename_unit
819            //  out_RETIRE_NUM_REG_RD_LOG            - component_rename_unit
820            //  out_RETIRE_NUM_REG_RE_LOG            - component_rename_unit
821          }
822     
823      // ~~~~~[ Interface : "commit" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       
824      for (uint32_t i=0; i<_param->_nb_inst_commit; i++)
825        {
826          dest = _name+"_reexecute_unit";
827#ifdef POSITION
828          _component->interface_map (src ,"commit_"+toString(i),
829                                     dest,"commit_"+toString(i));
830#endif
831       
832          COMPONENT_MAP(_component,src , "in_COMMIT_"+toString(i)+"_VAL"        ,
833                                   dest,"out_COMMIT_"+toString(i)+"_VAL"        );
834          COMPONENT_MAP(_component,src ,"out_COMMIT_"+toString(i)+"_ACK"        ,
835                                   dest, "in_COMMIT_"+toString(i)+"_ACK"        );
836          COMPONENT_MAP(_component,src , "in_COMMIT_"+toString(i)+"_WEN"        ,
837                                   dest,"out_COMMIT_"+toString(i)+"_WEN"        );
838          if (_param->_have_port_rob_ptr)
839          COMPONENT_MAP(_component,src , "in_COMMIT_"+toString(i)+"_PACKET_ID"  ,
840                                   dest,"out_COMMIT_"+toString(i)+"_PACKET_ID"  );
841//        COMPONENT_MAP(_component,src , "in_COMMIT_"+toString(i)+"_OPERATION"  ,
842//                                 dest,"out_COMMIT_"+toString(i)+"_OPERATION"  );
843//        COMPONENT_MAP(_component,src , "in_COMMIT_"+toString(i)+"_TYPE"       ,
844//                                 dest,"out_COMMIT_"+toString(i)+"_TYPE"       );
845          COMPONENT_MAP(_component,src , "in_COMMIT_"+toString(i)+"_FLAGS"      ,
846                                   dest,"out_COMMIT_"+toString(i)+"_FLAGS"      );
847          COMPONENT_MAP(_component,src , "in_COMMIT_"+toString(i)+"_EXCEPTION"  ,
848                                   dest,"out_COMMIT_"+toString(i)+"_EXCEPTION"  );
849          COMPONENT_MAP(_component,src , "in_COMMIT_"+toString(i)+"_NO_SEQUENCE",
850                                   dest,"out_COMMIT_"+toString(i)+"_NO_SEQUENCE");
851          COMPONENT_MAP(_component,src , "in_COMMIT_"+toString(i)+"_ADDRESS"    ,
852                                   dest,"out_COMMIT_"+toString(i)+"_ADDRESS"    );
853          COMPONENT_MAP(_component,src ,"out_COMMIT_"+toString(i)+"_NUM_REG_RD" ,
854                                   dest, "in_COMMIT_"+toString(i)+"_NUM_REG_RD" );
855          //@@@@@@@@@@
856        }
857     
858      // ~~~~~[ Interface : "reexecute" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       
859      for (uint32_t i=0; i<_param->_nb_inst_reexecute; i++)
860        {
861          dest = _name+"_reexecute_unit";
862#ifdef POSITION
863          _component->interface_map (src ,"reexecute_"    +toString(i),
864                                     dest,"reexecute_rob_"+toString(i));
865#endif
866
867          COMPONENT_MAP(_component,src ,"out_REEXECUTE_"    +toString(i)+"_VAL"                  ,
868                                   dest, "in_REEXECUTE_ROB_"+toString(i)+"_VAL"                  );
869          COMPONENT_MAP(_component,src , "in_REEXECUTE_"    +toString(i)+"_ACK"                  ,
870                                   dest,"out_REEXECUTE_ROB_"+toString(i)+"_ACK"                  );
871          if (_param->_have_port_front_end_id)
872          COMPONENT_MAP(_component,src ,"out_REEXECUTE_"    +toString(i)+"_FRONT_END_ID"         ,
873                                   dest, "in_REEXECUTE_ROB_"+toString(i)+"_FRONT_END_ID"         );
874          if (_param->_have_port_context_id)
875          COMPONENT_MAP(_component,src ,"out_REEXECUTE_"    +toString(i)+"_CONTEXT_ID"           ,
876                                   dest, "in_REEXECUTE_ROB_"+toString(i)+"_CONTEXT_ID"           );
877          if (_param->_have_port_rob_ptr)
878          COMPONENT_MAP(_component,src ,"out_REEXECUTE_"    +toString(i)+"_PACKET_ID"            ,
879                                   dest, "in_REEXECUTE_ROB_"+toString(i)+"_PACKET_ID"            );
880          COMPONENT_MAP(_component,src ,"out_REEXECUTE_"    +toString(i)+"_OPERATION"            ,
881                                   dest, "in_REEXECUTE_ROB_"+toString(i)+"_OPERATION"            );
882          COMPONENT_MAP(_component,src ,"out_REEXECUTE_"    +toString(i)+"_TYPE"                 ,
883                                   dest, "in_REEXECUTE_ROB_"+toString(i)+"_TYPE"                 );
884          COMPONENT_MAP(_component,src ,"out_REEXECUTE_"    +toString(i)+"_STORE_QUEUE_PTR_WRITE",
885                                   dest, "in_REEXECUTE_ROB_"+toString(i)+"_STORE_QUEUE_PTR_WRITE");
886        }
887                                                                           
888      // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       
889      for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++)
890        {
891          dest = _name;
892#ifdef POSITION
893          _component->interface_map (src ,"branch_complete_"+toString(i),
894                                     dest,"branch_complete_"+toString(i));
895#endif
896
897          PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_VAL"            ,
898                              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_VAL"            );
899          PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_ACK"            ,
900                              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_ACK"            );
901          if (_param->_have_port_front_end_id)
902          PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_FRONT_END_ID"   ,
903                              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_FRONT_END_ID"   );
904          if (_param->_have_port_context_id)
905          PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID"     ,
906                              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID"     );
907          if (_param->_have_port_depth)
908          PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_DEPTH"          ,
909                              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_DEPTH"          );
910          PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"        ,
911                              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"        );
912          PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_NO_SEQUENCE"    ,
913                              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_NO_SEQUENCE"    );
914          PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION",
915                              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION");
916        }
917                                                                                   
918      // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
919      {
920        dest = _name;
921#ifdef POSITION
922        _component->interface_map (src ,"update",
923                                   dest,"commit_event");
924#endif
925
926        PORT_MAP(_component,src ,"out_UPDATE_VAL"             ,dest,"out_COMMIT_EVENT_VAL"             );
927        PORT_MAP(_component,src , "in_UPDATE_ACK"             ,dest, "in_COMMIT_EVENT_ACK"             );
928        if (_param->_have_port_front_end_id)
929        PORT_MAP(_component,src ,"out_UPDATE_FRONT_END_ID"    ,dest,"out_COMMIT_EVENT_FRONT_END_ID"    );
930        if (_param->_have_port_context_id)
931        PORT_MAP(_component,src ,"out_UPDATE_CONTEXT_ID"      ,dest,"out_COMMIT_EVENT_CONTEXT_ID"      );
932        if (_param->_have_port_depth)
933        PORT_MAP(_component,src ,"out_UPDATE_DEPTH"           ,dest,"out_COMMIT_EVENT_DEPTH"           );
934        PORT_MAP(_component,src ,"out_UPDATE_TYPE"            ,dest,"out_COMMIT_EVENT_TYPE"            );
935        PORT_MAP(_component,src ,"out_UPDATE_IS_DELAY_SLOT"   ,dest,"out_COMMIT_EVENT_IS_DELAY_SLOT"   );
936        PORT_MAP(_component,src ,"out_UPDATE_ADDRESS"         ,dest,"out_COMMIT_EVENT_ADDRESS"         );
937        PORT_MAP(_component,src ,"out_UPDATE_ADDRESS_EPCR"    ,dest,"out_COMMIT_EVENT_ADDRESS_EPCR"    );
938        PORT_MAP(_component,src ,"out_UPDATE_ADDRESS_EEAR_VAL",dest,"out_COMMIT_EVENT_ADDRESS_EEAR_VAL");
939        PORT_MAP(_component,src ,"out_UPDATE_ADDRESS_EEAR"    ,dest,"out_COMMIT_EVENT_ADDRESS_EEAR"    );
940      }
941
942      // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
943      for (uint32_t i=0; i<_param->_nb_front_end; i++)
944        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
945          {
946            dest = _name;
947#ifdef POSITION
948            _component->interface_map (src ,"event_"+toString(i)+"_"+toString(j),
949                                       dest,"event_"+toString(i)+"_"+toString(j));
950#endif
951           
952            PORT_MAP(_component,src , "in_EVENT_"+toString(i)+"_"+toString(j)+"_VAL"             ,
953                                dest, "in_EVENT_"+toString(i)+"_"+toString(j)+"_VAL"             );
954            PORT_MAP(_component,src ,"out_EVENT_"+toString(i)+"_"+toString(j)+"_ACK"             ,
955                                dest,"out_EVENT_"+toString(i)+"_"+toString(j)+"_ACK"             );
956            PORT_MAP(_component,src , "in_EVENT_"+toString(i)+"_"+toString(j)+"_ADDRESS"         ,
957                                dest, "in_EVENT_"+toString(i)+"_"+toString(j)+"_ADDRESS"         );
958            PORT_MAP(_component,src , "in_EVENT_"+toString(i)+"_"+toString(j)+"_ADDRESS_NEXT"    ,
959                                dest, "in_EVENT_"+toString(i)+"_"+toString(j)+"_ADDRESS_NEXT"    ); 
960            PORT_MAP(_component,src , "in_EVENT_"+toString(i)+"_"+toString(j)+"_ADDRESS_NEXT_VAL",
961                                dest, "in_EVENT_"+toString(i)+"_"+toString(j)+"_ADDRESS_NEXT_VAL");
962            PORT_MAP(_component,src , "in_EVENT_"+toString(i)+"_"+toString(j)+"_IS_DS_TAKE"      ,
963                                dest, "in_EVENT_"+toString(i)+"_"+toString(j)+"_IS_DS_TAKE"      );
964          }
965                                                                                   
966      // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       
967      for (uint32_t i=0; i<_param->_nb_front_end; i++)
968        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
969          {
970            dest = _name;
971#ifdef POSITION
972            _component->interface_map (src ,"nb_inst_"+toString(i)+"_"+toString(j),
973                                       dest,"nb_inst_"+toString(i)+"_"+toString(j));
974#endif
975
976            PORT_MAP(_component,src ,"out_NB_INST_"+toString(i)+"_"+toString(j)+"_COMMIT_ALL",
977                                dest,"out_NB_INST_"+toString(i)+"_"+toString(j)+"_COMMIT_ALL");
978            PORT_MAP(_component,src ,"out_NB_INST_"+toString(i)+"_"+toString(j)+"_COMMIT_MEM",
979                                dest,"out_NB_INST_"+toString(i)+"_"+toString(j)+"_COMMIT_MEM");
980          }
981
982      // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       
983      for (uint32_t i=0; i<_param->_nb_front_end; i++)
984        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
985          {
986            dest = _name;
987#ifdef POSITION
988            _component->interface_map (src ,"depth_"+toString(i)+"_"+toString(j),
989                                       dest,"depth_"+toString(i)+"_"+toString(j));
990#endif
991
992            if (_param->_have_port_depth)
993              {
994            PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MIN",
995                                dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MIN");
996            PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MAX",
997                                dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MAX");
998              }
999            PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_FULL",
1000                                dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_FULL");
1001          }
1002
1003      // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1004      for (uint32_t i=0; i<_param->_nb_front_end; i++)
1005        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
1006          {
1007            dest = _name+"_glue";
1008           
1009#ifdef POSITION
1010            _component->interface_map (src ,"spr_read_"+toString(i)+"_"+toString(j),
1011                                       dest,"spr_"     +toString(i)+"_"+toString(j));
1012#endif
1013
1014            COMPONENT_MAP(_component,src , "in_SPR_READ_"+toString(i)+"_"+toString(j)+            "_SR_OVE",
1015                                     dest,"out_SPR_"     +toString(i)+"_"+toString(j)+"_COMMIT_UNIT_SR_OVE");
1016          }
1017
1018      // ~~~~~[ Interface : "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1019      for (uint32_t i=0; i<_param->_nb_front_end; i++)
1020        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
1021          {
1022            dest = _name+"_special_register_unit";
1023#ifdef POSITION
1024            _component->interface_map (src ,"spr_write_" +toString(i)+"_"+toString(j),
1025                                       dest,"spr_commit_"+toString(i)+"_"+toString(j));
1026#endif
1027
1028            COMPONENT_MAP(_component,src ,"out_SPR_WRITE_" +toString(i)+"_"+toString(j)+"_VAL"      ,
1029                                     dest, "in_SPR_COMMIT_"+toString(i)+"_"+toString(j)+"_VAL"      );
1030            COMPONENT_MAP(_component,src , "in_SPR_WRITE_" +toString(i)+"_"+toString(j)+"_ACK"      ,
1031                                     dest,"out_SPR_COMMIT_"+toString(i)+"_"+toString(j)+"_ACK"      );
1032            COMPONENT_MAP(_component,src ,"out_SPR_WRITE_" +toString(i)+"_"+toString(j)+"_SR_F_VAL" ,
1033                                     dest, "in_SPR_COMMIT_"+toString(i)+"_"+toString(j)+"_SR_F_VAL" );
1034            COMPONENT_MAP(_component,src ,"out_SPR_WRITE_" +toString(i)+"_"+toString(j)+"_SR_F"     ,
1035                                     dest, "in_SPR_COMMIT_"+toString(i)+"_"+toString(j)+"_SR_F"     );
1036            COMPONENT_MAP(_component,src ,"out_SPR_WRITE_" +toString(i)+"_"+toString(j)+"_SR_CY_VAL",
1037                                     dest, "in_SPR_COMMIT_"+toString(i)+"_"+toString(j)+"_SR_CY_VAL");
1038            COMPONENT_MAP(_component,src ,"out_SPR_WRITE_" +toString(i)+"_"+toString(j)+"_SR_CY"    ,
1039                                     dest, "in_SPR_COMMIT_"+toString(i)+"_"+toString(j)+"_SR_CY"    );
1040            COMPONENT_MAP(_component,src ,"out_SPR_WRITE_" +toString(i)+"_"+toString(j)+"_SR_OV_VAL",
1041                                     dest, "in_SPR_COMMIT_"+toString(i)+"_"+toString(j)+"_SR_OV_VAL");
1042            COMPONENT_MAP(_component,src ,"out_SPR_WRITE_" +toString(i)+"_"+toString(j)+"_SR_OV"    ,
1043                                     dest, "in_SPR_COMMIT_"+toString(i)+"_"+toString(j)+"_SR_OV"    );
1044          }
1045     
1046    }
1047
1048    // ===================================================================
1049    // =====[ issue_queue ]===============================================
1050    // ===================================================================
1051    {
1052      src = _name+"_issue_queue";
1053      log_printf(TRACE,OOO_Engine,FUNCTION,_("Instance : %s"),name.c_str());
1054           
1055      {
1056        dest = _name;
1057#ifdef POSITION
1058        _component->interface_map (src ,"",
1059                                   dest,"");
1060#endif
1061        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
1062        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
1063      }
1064
1065      // ~~~~~[ Interface : "issue_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1066      for (uint32_t i=0; i<_param->_nb_rename_unit; ++i)
1067        for (uint32_t j=0; j<_param->_nb_inst_insert[i]; j++)
1068          {
1069            dest = _name+"_glue";
1070#ifdef POSITION
1071            _component->interface_map (src ,"issue_in_"+toString(i)+"_"+toString(j),
1072                                       dest,"insert_"  +toString(i)+"_"+toString(j));
1073#endif
1074
1075            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_VAL"                  ,
1076                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_VAL"                  );
1077            COMPONENT_MAP(_component,src ,"out_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_ACK"                  ,
1078                                     dest, "in_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_ACK"                  );
1079            if (_param->_have_port_context_id)
1080            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_CONTEXT_ID"           ,
1081                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_CONTEXT_ID"           );
1082            if (_param->_have_port_front_end_id)
1083            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_FRONT_END_ID"         ,
1084                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_FRONT_END_ID"         );
1085            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_OPERATION"            ,
1086                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_OPERATION"            );
1087            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_TYPE"                 ,
1088                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_TYPE"                 );
1089            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_STORE_QUEUE_PTR_WRITE",
1090                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_STORE_QUEUE_PTR_WRITE");
1091            if (_param->_have_port_load_queue_ptr)
1092            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_LOAD_QUEUE_PTR_WRITE" ,
1093                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_LOAD_QUEUE_PTR_WRITE" );
1094            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_HAS_IMMEDIAT"         ,
1095                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_HAS_IMMEDIAT"         );
1096            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_IMMEDIAT"             ,
1097                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_IMMEDIAT"             );
1098            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_READ_RA"              ,
1099                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_READ_RA"              );
1100            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RA"           ,
1101                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_NUM_REG_RA"           );
1102            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_READ_RB"              ,
1103                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_READ_RB"              );
1104            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RB"           ,
1105                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_NUM_REG_RB"           );
1106            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_READ_RC"              ,
1107                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_READ_RC"              );
1108            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RC"           ,
1109                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_NUM_REG_RC"           );
1110            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_WRITE_RD"             ,
1111                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_WRITE_RD"             );
1112            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RD"           ,
1113                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_NUM_REG_RD"           );
1114            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_WRITE_RE"             ,
1115                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_WRITE_RE"             );
1116            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_NUM_REG_RE"           ,
1117                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_NUM_REG_RE"           );
1118
1119
1120           
1121            //   in_ISSUE_IN_PACKET_ID - component_commit_unit
1122          }
1123
1124      // ~~~~~[ Interface : "reexecute" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1125      for (uint32_t i=0; i<_param->_nb_inst_reexecute; i++)
1126        {
1127          dest = _name+"_reexecute_unit";
1128#ifdef POSITION
1129          _component->interface_map (src ,"reexecute_"+toString(i),
1130                                     dest,"reexecute_"+toString(i));
1131#endif
1132       
1133         
1134          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_VAL"                  ,
1135                                   dest,"out_REEXECUTE_"+toString(i)+"_VAL"                  );
1136          COMPONENT_MAP(_component,src ,"out_REEXECUTE_"+toString(i)+"_ACK"                  ,
1137                                   dest, "in_REEXECUTE_"+toString(i)+"_ACK"                  );
1138          if (_param->_have_port_front_end_id)
1139          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_FRONT_END_ID"         ,
1140                                   dest,"out_REEXECUTE_"+toString(i)+"_FRONT_END_ID"         );
1141          if (_param->_have_port_context_id)
1142          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_CONTEXT_ID"           ,
1143                                   dest,"out_REEXECUTE_"+toString(i)+"_CONTEXT_ID"           );
1144          if (_param->_have_port_rob_ptr)
1145          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_PACKET_ID"            ,
1146                                   dest,"out_REEXECUTE_"+toString(i)+"_PACKET_ID"            );
1147          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_TYPE"                 ,
1148                                   dest,"out_REEXECUTE_"+toString(i)+"_TYPE"                 );
1149          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_OPERATION"            ,
1150                                   dest,"out_REEXECUTE_"+toString(i)+"_OPERATION"            );
1151          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_STORE_QUEUE_PTR_WRITE",
1152                                   dest,"out_REEXECUTE_"+toString(i)+"_STORE_QUEUE_PTR_WRITE");
1153          if (_param->_have_port_load_queue_ptr)
1154          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" ,
1155                                   dest,"out_REEXECUTE_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" );
1156          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_HAS_IMMEDIAT"         ,
1157                                   dest,"out_REEXECUTE_"+toString(i)+"_HAS_IMMEDIAT"         );
1158          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_IMMEDIAT"             ,
1159                                   dest,"out_REEXECUTE_"+toString(i)+"_IMMEDIAT"             );
1160          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_READ_RA"              ,
1161                                   dest,"out_REEXECUTE_"+toString(i)+"_READ_RA"              );
1162          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_NUM_REG_RA"           ,
1163                                   dest,"out_REEXECUTE_"+toString(i)+"_NUM_REG_RA"           );
1164          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_READ_RB"              ,
1165                                   dest,"out_REEXECUTE_"+toString(i)+"_READ_RB"              );
1166          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_NUM_REG_RB"           ,
1167                                   dest,"out_REEXECUTE_"+toString(i)+"_NUM_REG_RB"           );
1168          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_READ_RC"              ,
1169                                   dest,"out_REEXECUTE_"+toString(i)+"_READ_RC"              );
1170          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_NUM_REG_RC"           ,
1171                                   dest,"out_REEXECUTE_"+toString(i)+"_NUM_REG_RC"           );
1172          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_WRITE_RD"             ,
1173                                   dest,"out_REEXECUTE_"+toString(i)+"_WRITE_RD"             );
1174          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_NUM_REG_RD"           ,
1175                                   dest,"out_REEXECUTE_"+toString(i)+"_NUM_REG_RD"           );
1176          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_WRITE_RE"             ,
1177                                   dest,"out_REEXECUTE_"+toString(i)+"_WRITE_RE"             );
1178          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_NUM_REG_RE"           ,
1179                                   dest,"out_REEXECUTE_"+toString(i)+"_NUM_REG_RE"           );
1180        }
1181
1182      // ~~~~~[ Interface : "issue_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1183      for (uint32_t i=0; i<_param->_nb_inst_issue; i++)
1184        {
1185          dest = _name;
1186         
1187#ifdef POSITION
1188          _component->interface_map (src ,"issue_out_"+toString(i),
1189                                     dest,"issue_"    +toString(i));
1190#endif
1191
1192          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_VAL"                  ,
1193                              dest,"out_ISSUE_"    +toString(i)+"_VAL"                  );
1194          PORT_MAP(_component,src , "in_ISSUE_OUT_"+toString(i)+"_ACK"                  ,
1195                              dest, "in_ISSUE_"    +toString(i)+"_ACK"                  );
1196          if (_param->_have_port_front_end_id)
1197          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_FRONT_END_ID"         ,
1198                              dest,"out_ISSUE_"    +toString(i)+"_FRONT_END_ID"         );
1199          if (_param->_have_port_context_id)
1200          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_CONTEXT_ID"           ,
1201                              dest,"out_ISSUE_"    +toString(i)+"_CONTEXT_ID"           );
1202          if (_param->_have_port_rob_ptr)
1203          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_PACKET_ID"            ,
1204                              dest,"out_ISSUE_"    +toString(i)+"_PACKET_ID"            );
1205          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_TYPE"                 ,
1206                              dest,"out_ISSUE_"    +toString(i)+"_TYPE"                 );
1207          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_OPERATION"            ,
1208                              dest,"out_ISSUE_"    +toString(i)+"_OPERATION"            );
1209          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_STORE_QUEUE_PTR_WRITE",
1210                              dest,"out_ISSUE_"    +toString(i)+"_STORE_QUEUE_PTR_WRITE");
1211          if (_param->_have_port_load_queue_ptr)
1212          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" ,
1213                              dest,"out_ISSUE_"    +toString(i)+"_LOAD_QUEUE_PTR_WRITE" );
1214          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_HAS_IMMEDIAT"         ,
1215                              dest,"out_ISSUE_"    +toString(i)+"_HAS_IMMEDIAT"         );
1216          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_IMMEDIAT"             ,
1217                              dest,"out_ISSUE_"    +toString(i)+"_IMMEDIAT"             );
1218          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_READ_RA"              ,
1219                              dest,"out_ISSUE_"    +toString(i)+"_READ_RA"              );
1220          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_NUM_REG_RA"           ,
1221                              dest,"out_ISSUE_"    +toString(i)+"_NUM_REG_RA"           );
1222          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_READ_RB"              ,
1223                              dest,"out_ISSUE_"    +toString(i)+"_READ_RB"              );
1224          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_NUM_REG_RB"           ,
1225                              dest,"out_ISSUE_"    +toString(i)+"_NUM_REG_RB"           );
1226          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_READ_RC"              ,
1227                              dest,"out_ISSUE_"    +toString(i)+"_READ_RC"              );
1228          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_NUM_REG_RC"           ,
1229                              dest,"out_ISSUE_"    +toString(i)+"_NUM_REG_RC"           );
1230          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_WRITE_RD"             ,
1231                              dest,"out_ISSUE_"    +toString(i)+"_WRITE_RD"             );
1232          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_NUM_REG_RD"           ,
1233                              dest,"out_ISSUE_"    +toString(i)+"_NUM_REG_RD"           );
1234          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_WRITE_RE"             ,
1235                              dest,"out_ISSUE_"    +toString(i)+"_WRITE_RE"             );
1236          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_NUM_REG_RE"           ,
1237                              dest,"out_ISSUE_"    +toString(i)+"_NUM_REG_RE"           );
1238        }
1239    }
1240
1241    // ===================================================================
1242    // =====[ reexecute_unit ]============================================
1243    // ===================================================================
1244    {
1245      src = _name+"_reexecute_unit";
1246      log_printf(TRACE,OOO_Engine,FUNCTION,_("Instance : %s"),name.c_str());
1247           
1248      {
1249        dest = _name;
1250#ifdef POSITION
1251        _component->interface_map (src ,"",
1252                                   dest,"");
1253#endif
1254        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
1255        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
1256      }
1257
1258      // ~~~~~[ Interface "execute_loop" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1259      for (uint32_t i=0; i<_param->_nb_execute_loop; i++)
1260        for (uint32_t j=0; j<_param->_nb_inst_execute[i]; j++)
1261          {
1262            dest = _name;
1263#ifdef POSITION
1264            _component->interface_map (src ,"execute_loop_"+toString(i)+"_"+toString(j),
1265                                       dest,"execute_loop_"+toString(i)+"_"+toString(j));
1266#endif
1267
1268            PORT_MAP(_component,src , "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_VAL"         ,
1269                                dest, "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_VAL"         );
1270            PORT_MAP(_component,src ,"out_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_ACK"         ,
1271                                dest,"out_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_ACK"         );
1272            if (_param->_have_port_front_end_id)
1273            PORT_MAP(_component,src , "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID",
1274                                dest, "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID");
1275            if (_param->_have_port_context_id)
1276            PORT_MAP(_component,src , "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID"  ,
1277                                dest, "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID"  );
1278            if (_param->_have_port_rob_ptr)
1279            PORT_MAP(_component,src , "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_PACKET_ID"   ,
1280                                dest, "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_PACKET_ID"   );
1281//          PORT_MAP(_component,src , "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_TYPE"        ,
1282//                              dest, "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_TYPE"        );
1283//          PORT_MAP(_component,src , "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_OPERATION"   ,
1284//                              dest, "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_OPERATION"   );
1285            PORT_MAP(_component,src , "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_FLAGS"       ,
1286                                dest, "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_FLAGS"       );
1287            PORT_MAP(_component,src , "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_EXCEPTION"   ,
1288                                dest, "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_EXCEPTION"   );
1289            PORT_MAP(_component,src , "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_NO_SEQUENCE" ,
1290                                dest, "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_NO_SEQUENCE" );
1291            PORT_MAP(_component,src , "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_ADDRESS"     ,
1292                                dest, "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_ADDRESS"     );
1293            PORT_MAP(_component,src , "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_DATA"        ,
1294                                dest, "in_EXECUTE_LOOP_"+toString(i)+"_"+toString(j)+"_DATA"        );
1295          }
1296
1297      // ~~~~~[ Interface "commit" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1298      //  out_COMMIT_VAL                           - component_commit_unit
1299      //   in_COMMIT_ACK                           - component_commit_unit
1300      //  out_COMMIT_WEN                           - component_commit_unit
1301      //  out_COMMIT_FRONT_END_ID                  - component_commit_unit
1302      //  out_COMMIT_CONTEXT_ID                    - component_commit_unit
1303      //  out_COMMIT_PACKET_ID                     - component_commit_unit
1304      ////out_COMMIT_OPERATION                     - component_commit_unit
1305      ////out_COMMIT_TYPE                          - component_commit_unit
1306      //  out_COMMIT_FLAGS                         - component_commit_unit
1307      //  out_COMMIT_EXCEPTION                     - component_commit_unit
1308      //  out_COMMIT_NO_SEQUENCE                   - component_commit_unit
1309      //  out_COMMIT_ADDRESS                       - component_commit_unit
1310      //   in_COMMIT_NUM_REG_RD                    - component_commit_unit
1311     
1312      // ~~~~~[ Interface : "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1313      for (uint32_t i=0; i<_param->_nb_inst_reexecute; i++)
1314        {
1315          dest = _name+"_special_register_unit";
1316#ifdef POSITION
1317          _component->interface_map (src ,"spr_"+toString(i),
1318                                     dest,"spr_"+toString(i));
1319#endif
1320     
1321          COMPONENT_MAP(_component,src ,"out_SPR_"       +toString(i)+"_VAL"         ,
1322                                   dest, "in_SPR_ACCESS_"+toString(i)+"_VAL"         );
1323          COMPONENT_MAP(_component,src , "in_SPR_"       +toString(i)+"_ACK"         ,
1324                                   dest,"out_SPR_ACCESS_"+toString(i)+"_ACK"         );
1325          if (_param->_have_port_front_end_id)
1326          COMPONENT_MAP(_component,src ,"out_SPR_"       +toString(i)+"_FRONT_END_ID",
1327                                   dest, "in_SPR_ACCESS_"+toString(i)+"_FRONT_END_ID");
1328          if (_param->_have_port_context_id)
1329          COMPONENT_MAP(_component,src ,"out_SPR_"       +toString(i)+"_CONTEXT_ID"  ,
1330                                   dest, "in_SPR_ACCESS_"+toString(i)+"_CONTEXT_ID"  );
1331          COMPONENT_MAP(_component,src ,"out_SPR_"       +toString(i)+"_WEN"         ,
1332                                   dest, "in_SPR_ACCESS_"+toString(i)+"_WEN"         );
1333          COMPONENT_MAP(_component,src ,"out_SPR_"       +toString(i)+"_NUM_GROUP"   ,
1334                                   dest, "in_SPR_ACCESS_"+toString(i)+"_NUM_GROUP"   );
1335          COMPONENT_MAP(_component,src ,"out_SPR_"       +toString(i)+"_NUM_REG"     ,
1336                                   dest, "in_SPR_ACCESS_"+toString(i)+"_NUM_REG"     );
1337          COMPONENT_MAP(_component,src ,"out_SPR_"       +toString(i)+"_WDATA"       ,
1338                                   dest, "in_SPR_ACCESS_"+toString(i)+"_WDATA"       );
1339          COMPONENT_MAP(_component,src , "in_SPR_"       +toString(i)+"_RDATA"       ,
1340                                   dest,"out_SPR_ACCESS_"+toString(i)+"_RDATA"       );
1341          COMPONENT_MAP(_component,src , "in_SPR_"       +toString(i)+"_INVALID"     ,
1342                                   dest,"out_SPR_ACCESS_"+toString(i)+"_INVALID"     );
1343        }
1344
1345      // ~~~~~[ Interface : "reexecute_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1346      //   in_REEXECUTE_ROB_VAL                    - component_commit_unit
1347      //  out_REEXECUTE_ROB_ACK                    - component_commit_unit
1348      //   in_REEXECUTE_ROB_FRONT_END_ID           - component_commit_unit
1349      //   in_REEXECUTE_ROB_CONTEXT_ID             - component_commit_unit
1350      //   in_REEXECUTE_ROB_PACKET_ID              - component_commit_unit
1351      //   in_REEXECUTE_ROB_OPERATION              - component_commit_unit
1352      //   in_REEXECUTE_ROB_TYPE                   - component_commit_unit
1353      //   in_REEXECUTE_ROB_STORE_QUEUE_PTR_WRITE  - component_commit_unit
1354
1355      // ~~~~~[ Interface : "reexecute" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1356      //  out_REEXECUTE_VAL                        - component_issue_queue
1357      //   in_REEXECUTE_ACK                        - component_issue_queue
1358      //  out_REEXECUTE_CONTEXT_ID                 - component_issue_queue
1359      //  out_REEXECUTE_FRONT_END_ID               - component_issue_queue
1360      //  out_REEXECUTE_PACKET_ID                  - component_issue_queue
1361      //  out_REEXECUTE_OPERATION                  - component_issue_queue
1362      //  out_REEXECUTE_TYPE                       - component_issue_queue
1363      //  out_REEXECUTE_STORE_QUEUE_PTR_WRITE      - component_issue_queue
1364      //  out_REEXECUTE_LOAD_QUEUE_PTR_WRITE       - component_issue_queue
1365      //  out_REEXECUTE_HAS_IMMEDIAT               - component_issue_queue
1366      //  out_REEXECUTE_IMMEDIAT                   - component_issue_queue
1367      //  out_REEXECUTE_READ_RA                    - component_issue_queue
1368      //  out_REEXECUTE_NUM_REG_RA                 - component_issue_queue
1369      //  out_REEXECUTE_READ_RB                    - component_issue_queue
1370      //  out_REEXECUTE_NUM_REG_RB                 - component_issue_queue
1371      //  out_REEXECUTE_READ_RC                    - component_issue_queue
1372      //  out_REEXECUTE_NUM_REG_RC                 - component_issue_queue
1373      //  out_REEXECUTE_WRITE_RD                   - component_issue_queue
1374      //  out_REEXECUTE_NUM_REG_RD                 - component_issue_queue
1375      //  out_REEXECUTE_WRITE_RE                   - component_issue_queue
1376      //  out_REEXECUTE_NUM_REG_RE                 - component_issue_queue
1377    }
1378
1379    // ===================================================================
1380    // =====[ special_register_unit ]=====================================
1381    // ===================================================================
1382    {
1383      src = _name+"_special_register_unit";
1384      log_printf(TRACE,OOO_Engine,FUNCTION,_("Instance : %s"),name.c_str());
1385           
1386      {
1387        dest = _name;
1388#ifdef POSITION
1389        _component->interface_map (src ,"",
1390                                   dest,"");
1391#endif
1392        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
1393        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
1394      }
1395
1396      // ~~~~~[ Interface : "spr_access" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1397      //   in_SPR_ACCESS_VAL          - component_reexecute_unit
1398      //  out_SPR_ACCESS_ACK          - component_reexecute_unit
1399      //   in_SPR_ACCESS_FRONT_END_ID - component_reexecute_unit
1400      //   in_SPR_ACCESS_CONTEXT_ID   - component_reexecute_unit
1401      //   in_SPR_ACCESS_WEN          - component_reexecute_unit
1402      //   in_SPR_ACCESS_NUM_GROUP    - component_reexecute_unit
1403      //   in_SPR_ACCESS_NUM_REG      - component_reexecute_unit
1404      //   in_SPR_ACCESS_WDATA        - component_reexecute_unit
1405      //  out_SPR_ACCESS_RDATA        - component_reexecute_unit
1406      //  out_SPR_ACCESS_INVALID      - component_reexecute_unit
1407     
1408      // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1409      for (uint32_t i=0; i<_param->_nb_front_end; i++)
1410        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
1411          {
1412            dest = _name+"_glue";
1413           
1414#ifdef POSITION
1415            _component->interface_map (src ,"spr_read_"+toString(i)+"_"+toString(j),
1416                                       dest,"spr_"     +toString(i)+"_"+toString(j));
1417#endif
1418
1419            COMPONENT_MAP(_component,src ,"out_SPR_READ_"+toString(i)+"_"+toString(j)+                      "_SR",
1420                                     dest, "in_SPR_"     +toString(i)+"_"+toString(j)+"_SPECIAL_REGISTER_UNIT_SR");
1421          }
1422
1423      // ~~~~~[ Interface : "spr_commit" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1424      //   in_SPR_COMMIT_VAL          - component_commit_unit
1425      //  out_SPR_COMMIT_ACK          - component_commit_unit
1426      //   in_SPR_COMMIT_SR_F_VAL     - component_commit_unit
1427      //   in_SPR_COMMIT_SR_F         - component_commit_unit
1428      //   in_SPR_COMMIT_SR_CY_VAL    - component_commit_unit
1429      //   in_SPR_COMMIT_SR_CY        - component_commit_unit
1430      //   in_SPR_COMMIT_SR_OV_VAL    - component_commit_unit
1431      //   in_SPR_COMMIT_SR_OV        - component_commit_unit
1432
1433      // ~~~~~[ Interface "spr_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1434      for (uint32_t i=0; i<_param->_nb_front_end; i++)
1435        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
1436          {
1437            dest = _name;
1438#ifdef POSITION
1439            _component->interface_map (src ,"spr_event_"+toString(i)+"_"+toString(j),
1440                                       dest,"spr_event_"+toString(i)+"_"+toString(j));
1441#endif
1442
1443            PORT_MAP(_component,src , "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_VAL"      ,
1444                                dest, "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_VAL"      );
1445            PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_ACK"      ,
1446                                dest,"out_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_ACK"      );
1447            PORT_MAP(_component,src , "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_EPCR"     ,
1448                                dest, "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_EPCR"     );
1449            PORT_MAP(_component,src , "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_EEAR_WEN" ,
1450                                dest, "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_EEAR_WEN" );
1451            PORT_MAP(_component,src , "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_EEAR"     ,
1452                                dest, "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_EEAR"     );
1453            PORT_MAP(_component,src , "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_SR_DSX"   ,
1454                                dest, "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_SR_DSX"   );
1455            PORT_MAP(_component,src , "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_SR_TO_ESR",
1456                                dest, "in_SPR_EVENT_"+toString(i)+"_"+toString(j)+"_SR_TO_ESR");
1457          }
1458    }
1459
1460    // ===================================================================
1461    // =====[ glue ]======================================================
1462    // ===================================================================
1463    {
1464      src = _name+"_glue";
1465      log_printf(TRACE,OOO_Engine,FUNCTION,_("Instance : %s"),name.c_str());
1466           
1467      {
1468        dest = _name;
1469#ifdef POSITION
1470        _component->interface_map (src ,"",
1471                                   dest,"");
1472#endif
1473        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
1474        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
1475      }
1476
1477      // ~~~~~[ Interface : "rename" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1478      for (uint32_t i=0; i<_param->_nb_front_end; i++)
1479        for (uint32_t j=0; j<_param->_nb_inst_decod [i]; j++)
1480          {
1481            dest = _name;
1482#ifdef POSITION
1483            _component->interface_map (src ,"rename_"+toString(i)+"_"+toString(j),
1484                                       dest,"rename_"+toString(i)+"_"+toString(j));
1485#endif
1486           
1487            if (_param->_have_port_front_end_id)
1488            PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID",
1489                                dest, "in_RENAME_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID");
1490
1491            //  out_RENAME_RENAME_UNIT_FRONT_END_ID              - component_rename_unit
1492          }
1493
1494      // ~~~~~[ Interface : "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1495      for (uint32_t i=0; i<_param->_sum_inst_insert; i++)
1496        {
1497          dest = _name;
1498#ifdef POSITION
1499          _component->interface_map (src ,"insert_"+toString(i),
1500                                     dest,"insert_"+toString(i));
1501#endif
1502         
1503          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_VAL"       ,
1504                              dest,"out_INSERT_"+toString(i)+"_VAL"       );
1505          PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_ACK"       ,
1506                              dest, "in_INSERT_"+toString(i)+"_ACK"       );
1507          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_RD_USE"    ,
1508                              dest,"out_INSERT_"+toString(i)+"_RD_USE"    );
1509          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_RD_NUM_REG",
1510                              dest,"out_INSERT_"+toString(i)+"_RD_NUM_REG");
1511          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_RE_USE"    ,
1512                              dest,"out_INSERT_"+toString(i)+"_RE_USE"    );
1513          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_RE_NUM_REG",
1514                              dest,"out_INSERT_"+toString(i)+"_RE_NUM_REG");
1515        }
1516
1517      //   in_INSERT_RENAME_UNIT_VAL                       - component_rename_unit
1518      //  out_INSERT_RENAME_UNIT_ACK                       - component_rename_unit
1519      //   in_INSERT_RENAME_UNIT_FRONT_END_ID              - component_rename_unit
1520      //   in_INSERT_RENAME_UNIT_CONTEXT_ID                - component_rename_unit
1521      //   in_INSERT_RENAME_UNIT_TYPE                      - component_rename_unit
1522      //   in_INSERT_RENAME_UNIT_OPERATION                 - component_rename_unit
1523      //   in_INSERT_RENAME_UNIT_NO_EXECUTE                - component_rename_unit
1524      //   in_INSERT_RENAME_UNIT_HAS_IMMEDIAT              - component_rename_unit
1525      //   in_INSERT_RENAME_UNIT_IMMEDIAT                  - component_rename_unit
1526      //   in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_WRITE     - component_rename_unit
1527      //   in_INSERT_RENAME_UNIT_LOAD_QUEUE_PTR_WRITE      - component_rename_unit
1528      //   in_INSERT_RENAME_UNIT_READ_RA                   - component_rename_unit
1529      //   in_INSERT_RENAME_UNIT_NUM_REG_RA_PHY            - component_rename_unit
1530      //   in_INSERT_RENAME_UNIT_READ_RB                   - component_rename_unit
1531      //   in_INSERT_RENAME_UNIT_NUM_REG_RB_PHY            - component_rename_unit
1532      //   in_INSERT_RENAME_UNIT_READ_RC                   - component_rename_unit
1533      //   in_INSERT_RENAME_UNIT_NUM_REG_RC_PHY            - component_rename_unit
1534      //   in_INSERT_RENAME_UNIT_WRITE_RD                  - component_rename_unit
1535      //   in_INSERT_RENAME_UNIT_NUM_REG_RD_PHY_OLD        - component_rename_unit
1536      //   in_INSERT_RENAME_UNIT_NUM_REG_RD_PHY_NEW        - component_rename_unit
1537      //   in_INSERT_RENAME_UNIT_WRITE_RE                  - component_rename_unit
1538      //   in_INSERT_RENAME_UNIT_NUM_REG_RE_PHY_OLD        - component_rename_unit
1539      //   in_INSERT_RENAME_UNIT_NUM_REG_RE_PHY_NEW        - component_rename_unit
1540      // 
1541      //  out_INSERT_COMMIT_UNIT_VAL                       - component_commit_unit
1542      //   in_INSERT_COMMIT_UNIT_ACK                       - component_commit_unit
1543      //  out_INSERT_COMMIT_UNIT_FRONT_END_ID              - component_commit_unit
1544      //  out_INSERT_COMMIT_UNIT_CONTEXT_ID                - component_commit_unit
1545      ////out_INSERT_COMMIT_UNIT_RENAME_UNIT_ID            - component_commit_unit
1546      //  out_INSERT_COMMIT_UNIT_TYPE                      - component_commit_unit
1547      //  out_INSERT_COMMIT_UNIT_OPERATION                 - component_commit_unit
1548      //  out_INSERT_COMMIT_UNIT_NO_EXECUTE                - component_commit_unit
1549      //  out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_WRITE     - component_commit_unit
1550      //  out_INSERT_COMMIT_UNIT_LOAD_QUEUE_PTR_WRITE      - component_commit_unit
1551      //  out_INSERT_COMMIT_UNIT_READ_RA                   - component_commit_unit
1552      //  out_INSERT_COMMIT_UNIT_NUM_REG_RA_PHY            - component_commit_unit
1553      //  out_INSERT_COMMIT_UNIT_READ_RB                   - component_commit_unit
1554      //  out_INSERT_COMMIT_UNIT_NUM_REG_RB_PHY            - component_commit_unit
1555      //  out_INSERT_COMMIT_UNIT_READ_RC                   - component_commit_unit
1556      //  out_INSERT_COMMIT_UNIT_NUM_REG_RC_PHY            - component_commit_unit
1557      //  out_INSERT_COMMIT_UNIT_WRITE_RD                  - component_commit_unit
1558      //  out_INSERT_COMMIT_UNIT_NUM_REG_RD_PHY_OLD        - component_commit_unit
1559      //  out_INSERT_COMMIT_UNIT_NUM_REG_RD_PHY_NEW        - component_commit_unit
1560      //  out_INSERT_COMMIT_UNIT_WRITE_RE                  - component_commit_unit
1561      //  out_INSERT_COMMIT_UNIT_NUM_REG_RE_PHY_OLD        - component_commit_unit
1562      //  out_INSERT_COMMIT_UNIT_NUM_REG_RE_PHY_NEW        - component_commit_unit
1563      // 
1564      //  out_INSERT_ISSUE_QUEUE_VAL                       - component_issue_queue
1565      //   in_INSERT_ISSUE_QUEUE_ACK                       - component_issue_queue
1566      //  out_INSERT_ISSUE_QUEUE_CONTEXT_ID                - component_issue_queue
1567      //  out_INSERT_ISSUE_QUEUE_FRONT_END_ID              - component_issue_queue
1568      //  out_INSERT_ISSUE_QUEUE_OPERATION                 - component_issue_queue
1569      //  out_INSERT_ISSUE_QUEUE_TYPE                      - component_issue_queue
1570      //  out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_WRITE     - component_issue_queue
1571      //  out_INSERT_ISSUE_QUEUE_LOAD_QUEUE_PTR_WRITE      - component_issue_queue
1572      //  out_INSERT_ISSUE_QUEUE_HAS_IMMEDIAT              - component_issue_queue
1573      //  out_INSERT_ISSUE_QUEUE_IMMEDIAT                  - component_issue_queue
1574      //  out_INSERT_ISSUE_QUEUE_READ_RA                   - component_issue_queue
1575      //  out_INSERT_ISSUE_QUEUE_NUM_REG_RA                - component_issue_queue
1576      //  out_INSERT_ISSUE_QUEUE_READ_RB                   - component_issue_queue
1577      //  out_INSERT_ISSUE_QUEUE_NUM_REG_RB                - component_issue_queue
1578      //  out_INSERT_ISSUE_QUEUE_READ_RC                   - component_issue_queue
1579      //  out_INSERT_ISSUE_QUEUE_NUM_REG_RC                - component_issue_queue
1580      //  out_INSERT_ISSUE_QUEUE_WRITE_RD                  - component_issue_queue
1581      //  out_INSERT_ISSUE_QUEUE_NUM_REG_RD                - component_issue_queue
1582      //  out_INSERT_ISSUE_QUEUE_WRITE_RE                  - component_issue_queue
1583      //  out_INSERT_ISSUE_QUEUE_NUM_REG_RE                - component_issue_queue
1584
1585//       // ~~~~~[ Interface "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1586//       for (uint32_t i=0; i<_param->_sum_inst_retire; i++)
1587//         {
1588//           dest = _name;
1589// #ifdef POSITION
1590//           _component->interface_map (src ,"retire_"+toString(i),
1591//                                      dest,"retire_"+toString(i));
1592// #endif
1593
1594//           PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_VAL"           ,
1595//                               dest,"out_RETIRE_"+toString(i)+"_VAL"           );
1596//           PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_ACK"           ,
1597//                               dest, "in_RETIRE_"+toString(i)+"_ACK"           );
1598//           PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RD_OLD_USE"    ,
1599//                               dest,"out_RETIRE_"+toString(i)+"_RD_OLD_USE"    );
1600//           PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RD_OLD_NUM_REG",
1601//                               dest,"out_RETIRE_"+toString(i)+"_RD_OLD_NUM_REG");
1602//           PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RD_NEW_USE"    ,
1603//                               dest,"out_RETIRE_"+toString(i)+"_RD_NEW_USE"    );
1604//           PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RD_NEW_NUM_REG",
1605//                               dest,"out_RETIRE_"+toString(i)+"_RD_NEW_NUM_REG");
1606//           PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RE_OLD_USE"    ,
1607//                               dest,"out_RETIRE_"+toString(i)+"_RE_OLD_USE"    );
1608//           PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RE_OLD_NUM_REG",
1609//                               dest,"out_RETIRE_"+toString(i)+"_RE_OLD_NUM_REG");
1610//           PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RE_NEW_USE"    ,
1611//                               dest,"out_RETIRE_"+toString(i)+"_RE_NEW_USE"    );
1612//           PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RE_NEW_NUM_REG",
1613//                               dest,"out_RETIRE_"+toString(i)+"_RE_NEW_NUM_REG");
1614//         }
1615
1616      //  out_RETIRE_RENAME_UNIT_VAL                       - component_rename_unit
1617      //   in_RETIRE_RENAME_UNIT_ACK                       - component_rename_unit
1618      //  out_RETIRE_RENAME_UNIT_FRONT_END_ID              - component_rename_unit
1619      //  out_RETIRE_RENAME_UNIT_WRITE_RD                  - component_rename_unit
1620      //  out_RETIRE_RENAME_UNIT_NUM_REG_RD_PHY_OLD        - component_rename_unit
1621      //  out_RETIRE_RENAME_UNIT_NUM_REG_RD_PHY_NEW        - component_rename_unit
1622      //  out_RETIRE_RENAME_UNIT_WRITE_RE                  - component_rename_unit
1623      //  out_RETIRE_RENAME_UNIT_NUM_REG_RE_PHY_OLD        - component_rename_unit
1624      //  out_RETIRE_RENAME_UNIT_NUM_REG_RE_PHY_NEW        - component_rename_unit
1625      //  out_RETIRE_RENAME_UNIT_EVENT_STATE               - component_rename_unit
1626
1627      //   in_RETIRE_COMMIT_UNIT_VAL                       - component_commit_unit
1628      //  out_RETIRE_COMMIT_UNIT_ACK                       - component_commit_unit
1629      //   in_RETIRE_COMMIT_UNIT_FRONT_END_ID              - component_commit_unit
1630      //   in_RETIRE_COMMIT_UNIT_WRITE_RD                  - component_commit_unit
1631      //   in_RETIRE_COMMIT_UNIT_NUM_REG_RD_PHY_OLD        - component_commit_unit
1632      //   in_RETIRE_COMMIT_UNIT_NUM_REG_RD_PHY_NEW        - component_commit_unit
1633      //   in_RETIRE_COMMIT_UNIT_WRITE_RE                  - component_commit_unit
1634      //   in_RETIRE_COMMIT_UNIT_NUM_REG_RE_PHY_OLD        - component_commit_unit
1635      //   in_RETIRE_COMMIT_UNIT_NUM_REG_RE_PHY_NEW        - component_commit_unit
1636      //   in_RETIRE_COMMIT_UNIT_EVENT_STATE               - component_commit_unit
1637
1638      // ~~~~~[ Interface : "spr_sr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1639      for (uint32_t i=0; i<_param->_nb_front_end; i++)
1640        for (uint32_t j=0; j<_param->_nb_context [i]; j++)
1641          {
1642            dest = _name;
1643#ifdef POSITION
1644            _component->interface_map (src ,"spr_"+toString(i)+"_"+toString(j),
1645                                       dest,"spr_"+toString(i)+"_"+toString(j));
1646#endif
1647
1648            PORT_MAP(_component,src ,"out_SPR_"+toString(i)+"_"+toString(j)+"_SR_IEE",
1649                                dest,"out_SPR_"+toString(i)+"_"+toString(j)+"_SR_IEE");
1650            PORT_MAP(_component,src ,"out_SPR_"+toString(i)+"_"+toString(j)+"_SR_EPH",
1651                                dest,"out_SPR_"+toString(i)+"_"+toString(j)+"_SR_EPH");
1652
1653            //  out_SPR_RENAME_UNIT_SR                           - component_rename_unit
1654            //  out_SPR_COMMIT_UNIT_SR_OVE                       - component_commit_unit
1655            //   in_SPR_SPECIAL_REGISTER_UNIT_SR                 - component_special_register_unit
1656          }
1657
1658
1659    }
1660
1661    // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1662#if DEBUG_OOO_Engine == true
1663       _component->test_map();
1664#endif
1665
1666#ifdef POSITION
1667     if (usage_is_set(_usage,USE_POSITION))
1668       _component->generate_file();
1669#endif
1670
1671     log_end(OOO_Engine,FUNCTION);
1672    };
1673
1674}; // end namespace ooo_engine
1675}; // end namespace multi_ooo_engine
1676}; // end namespace core
1677
1678}; // end namespace behavioural
1679}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.