1 | /* |
---|
2 | * $Id: Rename_unit_allocation.cpp 145 2010-10-13 18:15:51Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/include/Rename_unit.h" |
---|
9 | #include "Behavioural/include/Allocation.h" |
---|
10 | |
---|
11 | namespace morpheo { |
---|
12 | namespace behavioural { |
---|
13 | namespace core { |
---|
14 | namespace multi_ooo_engine { |
---|
15 | namespace ooo_engine { |
---|
16 | namespace rename_unit { |
---|
17 | |
---|
18 | #undef FUNCTION |
---|
19 | #define FUNCTION "Rename_unit::allocation" |
---|
20 | void Rename_unit::allocation |
---|
21 | ( |
---|
22 | #ifdef STATISTICS |
---|
23 | morpheo::behavioural::Parameters_Statistics * param_statistics |
---|
24 | #else |
---|
25 | void |
---|
26 | #endif |
---|
27 | ) |
---|
28 | { |
---|
29 | log_begin(Rename_unit,FUNCTION); |
---|
30 | |
---|
31 | _component = new Component (_usage); |
---|
32 | |
---|
33 | Entity * entity = _component->set_entity (_name |
---|
34 | ,"Rename_unit" |
---|
35 | #ifdef POSITION |
---|
36 | ,COMBINATORY |
---|
37 | #endif |
---|
38 | ); |
---|
39 | |
---|
40 | _interfaces = entity->set_interfaces(); |
---|
41 | |
---|
42 | // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
43 | { |
---|
44 | Interface * interface = _interfaces->set_interface("" |
---|
45 | #ifdef POSITION |
---|
46 | ,IN |
---|
47 | ,SOUTH, |
---|
48 | "Generalist interface" |
---|
49 | #endif |
---|
50 | ); |
---|
51 | |
---|
52 | in_CLOCK = interface->set_signal_clk ("clock" ,1, CLOCK_VHDL_YES); |
---|
53 | in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); |
---|
54 | } |
---|
55 | |
---|
56 | // ~~~~~[ Interface : "rename_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
57 | { |
---|
58 | ALLOC2_INTERFACE_BEGIN("rename_in", IN, EAST, _("output of decod's stage"), _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
59 | |
---|
60 | _ALLOC2_VALACK_IN ( in_RENAME_IN_VAL ,VAL, _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
61 | _ALLOC2_VALACK_OUT(out_RENAME_IN_ACK ,ACK, _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
62 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_FRONT_END_ID ,"front_end_id" ,Tcontext_t ,_param->_size_front_end_id , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
63 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
64 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
65 | #ifdef STATISTICS |
---|
66 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_INSTRUCTION ,"instruction" ,uint32_t ,32 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
67 | #endif |
---|
68 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_TYPE ,"type" ,Ttype_t ,_param->_size_type , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
69 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_OPERATION ,"operation" ,Toperation_t ,_param->_size_operation , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
70 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NO_EXECUTE ,"no_execute" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
71 | // _ALLOC2_SIGNAL_IN ( in_RENAME_IN_HAVE_EVENT ,"have_event" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
72 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_LAST_EVENT ,"last_event" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
73 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_IS_DELAY_SLOT ,"is_delay_slot",Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
74 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_SAVE_RAT ,"save_rat" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
75 | #ifdef DEBUG |
---|
76 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS ,"address" ,Taddress_t ,_param->_size_instruction_address , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
77 | #endif |
---|
78 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS_NEXT ,"address_next" ,Taddress_t ,_param->_size_instruction_address , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
79 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
80 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_IMMEDIAT ,"immediat" ,Tgeneral_data_t ,_param->_size_general_data , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
81 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RA ,"read_ra" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
82 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RA ,"num_reg_ra" ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
83 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RB ,"read_rb" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
84 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RB ,"num_reg_rb" ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
85 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RC ,"read_rc" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
86 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RC ,"num_reg_rc" ,Tspecial_address_t,_param->_size_special_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
87 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_WRITE_RD ,"write_rd" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
88 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RD ,"num_reg_rd" ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
89 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_WRITE_RE ,"write_re" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
90 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RE ,"num_reg_re" ,Tspecial_address_t,_param->_size_special_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
91 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_EXCEPTION_USE ,"exception_use",Texception_t ,_param->_size_exception_use , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
92 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_EXCEPTION ,"exception" ,Texception_t ,_param->_size_exception , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
93 | |
---|
94 | ALLOC2_INTERFACE_END(_param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
95 | } |
---|
96 | |
---|
97 | // ~~~~~[ Interface "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
98 | { |
---|
99 | ALLOC1_INTERFACE_BEGIN("insert",OUT,WEST , _("Instruction with physical register"), _param->_nb_inst_insert); |
---|
100 | |
---|
101 | ALLOC1_VALACK_OUT (out_INSERT_VAL ,VAL); |
---|
102 | ALLOC1_VALACK_IN ( in_INSERT_ACK ,ACK); |
---|
103 | ALLOC1_SIGNAL_OUT (out_INSERT_FRONT_END_ID ,"front_end_id" ,Tcontext_t ,_param->_size_front_end_id ); |
---|
104 | ALLOC1_SIGNAL_OUT (out_INSERT_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id ); |
---|
105 | ALLOC1_SIGNAL_OUT (out_INSERT_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth ); |
---|
106 | #ifdef STATISTICS |
---|
107 | ALLOC1_SIGNAL_OUT (out_INSERT_INSTRUCTION ,"instruction" ,uint32_t ,32); |
---|
108 | #endif |
---|
109 | ALLOC1_SIGNAL_OUT (out_INSERT_TYPE ,"type" ,Ttype_t ,_param->_size_type ); |
---|
110 | ALLOC1_SIGNAL_OUT (out_INSERT_OPERATION ,"operation" ,Toperation_t ,_param->_size_operation ); |
---|
111 | ALLOC1_SIGNAL_OUT (out_INSERT_NO_EXECUTE ,"no_execute" ,Tcontrol_t ,1 ); |
---|
112 | ALLOC1_SIGNAL_OUT (out_INSERT_LAST_EVENT ,"last_event" ,Tcontrol_t ,1 ); |
---|
113 | ALLOC1_SIGNAL_OUT (out_INSERT_IS_DELAY_SLOT ,"is_delay_slot" ,Tcontrol_t ,1 ); |
---|
114 | ALLOC1_SIGNAL_OUT_COND(out_INSERT_SAVE_RAT ,"save_rat" ,Tcontrol_t ,1 ,_param->_rat_scheme == RAT_DEPTH_SAVE); |
---|
115 | #ifdef DEBUG |
---|
116 | ALLOC1_SIGNAL_OUT (out_INSERT_ADDRESS ,"address" ,Taddress_t ,_param->_size_instruction_address ); |
---|
117 | #endif |
---|
118 | ALLOC1_SIGNAL_OUT (out_INSERT_ADDRESS_NEXT ,"address_next" ,Taddress_t ,_param->_size_instruction_address ); |
---|
119 | ALLOC1_SIGNAL_OUT (out_INSERT_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t ,1 ); |
---|
120 | ALLOC1_SIGNAL_OUT (out_INSERT_IMMEDIAT ,"immediat" ,Tgeneral_data_t ,_param->_size_general_data ); |
---|
121 | ALLOC1_SIGNAL_OUT (out_INSERT_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t ,_param->_size_store_queue_ptr ); |
---|
122 | ALLOC1_SIGNAL_OUT (out_INSERT_STORE_QUEUE_PTR_READ ,"store_queue_ptr_read" ,Tlsq_ptr_t ,_param->_size_store_queue_ptr ); |
---|
123 | ALLOC1_SIGNAL_OUT (out_INSERT_STORE_QUEUE_EMPTY ,"store_queue_empty" ,Tcontrol_t ,1 ); |
---|
124 | ALLOC1_SIGNAL_OUT (out_INSERT_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t ,_param->_size_load_queue_ptr ); |
---|
125 | ALLOC1_SIGNAL_OUT (out_INSERT_EXCEPTION_USE ,"exception_use" ,Texception_t ,_param->_size_exception_use ); |
---|
126 | ALLOC1_SIGNAL_OUT (out_INSERT_EXCEPTION ,"exception" ,Texception_t ,_param->_size_exception ); |
---|
127 | ALLOC1_SIGNAL_OUT (out_INSERT_READ_RA ,"read_ra" ,Tcontrol_t ,1 ); |
---|
128 | #ifdef DEBUG |
---|
129 | ALLOC1_SIGNAL_OUT (out_INSERT_NUM_REG_RA_LOG ,"num_reg_ra_log" ,Tgeneral_address_t,_param->_size_general_register_logic); |
---|
130 | #endif |
---|
131 | ALLOC1_SIGNAL_OUT (out_INSERT_NUM_REG_RA_PHY ,"num_reg_ra_phy" ,Tgeneral_address_t,_param->_size_general_register ); |
---|
132 | ALLOC1_SIGNAL_OUT (out_INSERT_READ_RB ,"read_rb" ,Tcontrol_t ,1 ); |
---|
133 | #ifdef DEBUG |
---|
134 | ALLOC1_SIGNAL_OUT (out_INSERT_NUM_REG_RB_LOG ,"num_reg_rb_log" ,Tgeneral_address_t,_param->_size_general_register_logic); |
---|
135 | #endif |
---|
136 | ALLOC1_SIGNAL_OUT (out_INSERT_NUM_REG_RB_PHY ,"num_reg_rb_phy" ,Tgeneral_address_t,_param->_size_general_register ); |
---|
137 | ALLOC1_SIGNAL_OUT (out_INSERT_READ_RC ,"read_rc" ,Tcontrol_t ,1 ); |
---|
138 | #ifdef DEBUG |
---|
139 | ALLOC1_SIGNAL_OUT (out_INSERT_NUM_REG_RC_LOG ,"num_reg_rc_log" ,Tspecial_address_t,_param->_size_special_register_logic); |
---|
140 | #endif |
---|
141 | ALLOC1_SIGNAL_OUT (out_INSERT_NUM_REG_RC_PHY ,"num_reg_rc_phy" ,Tspecial_address_t,_param->_size_special_register ); |
---|
142 | ALLOC1_SIGNAL_OUT (out_INSERT_WRITE_RD ,"write_rd" ,Tcontrol_t ,1 ); |
---|
143 | ALLOC1_SIGNAL_OUT (out_INSERT_NUM_REG_RD_LOG ,"num_reg_rd_log" ,Tgeneral_address_t,_param->_size_general_register_logic); |
---|
144 | ALLOC1_SIGNAL_OUT (out_INSERT_NUM_REG_RD_PHY_OLD ,"num_reg_rd_phy_old" ,Tgeneral_address_t,_param->_size_general_register ); |
---|
145 | ALLOC1_SIGNAL_OUT (out_INSERT_NUM_REG_RD_PHY_NEW ,"num_reg_rd_phy_new" ,Tgeneral_address_t,_param->_size_general_register ); |
---|
146 | ALLOC1_SIGNAL_OUT (out_INSERT_WRITE_RE ,"write_re" ,Tcontrol_t ,1 ); |
---|
147 | ALLOC1_SIGNAL_OUT (out_INSERT_NUM_REG_RE_LOG ,"num_reg_re_log" ,Tspecial_address_t,_param->_size_special_register_logic); |
---|
148 | ALLOC1_SIGNAL_OUT (out_INSERT_NUM_REG_RE_PHY_OLD ,"num_reg_re_phy_old" ,Tspecial_address_t,_param->_size_special_register ); |
---|
149 | ALLOC1_SIGNAL_OUT (out_INSERT_NUM_REG_RE_PHY_NEW ,"num_reg_re_phy_new" ,Tspecial_address_t,_param->_size_special_register ); |
---|
150 | |
---|
151 | ALLOC1_INTERFACE_END(_param->_nb_inst_insert); |
---|
152 | } |
---|
153 | |
---|
154 | // ~~~~~[ Interface "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
155 | { |
---|
156 | ALLOC1_INTERFACE_BEGIN("retire",IN ,NORTH, _("Retire instruction, update renaming structure."), _param->_nb_inst_retire); |
---|
157 | |
---|
158 | ALLOC1_VALACK_IN ( in_RETIRE_VAL ,VAL); |
---|
159 | ALLOC1_VALACK_OUT(out_RETIRE_ACK ,ACK); |
---|
160 | ALLOC1_SIGNAL_IN ( in_RETIRE_FRONT_END_ID ,"front_end_id" ,Tcontext_t ,_param->_size_front_end_id ); |
---|
161 | ALLOC1_SIGNAL_IN ( in_RETIRE_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id ); |
---|
162 | // ALLOC1_SIGNAL_IN ( in_RETIRE_TYPE ,"type" ,Ttype_t ,_param->_size_type ); |
---|
163 | // ALLOC1_SIGNAL_IN ( in_RETIRE_OPERATION ,"operation" ,Toperation_t ,_param->_size_operation ); |
---|
164 | ALLOC1_SIGNAL_IN ( in_RETIRE_USE_STORE_QUEUE ,"use_store_queue" ,Tcontrol_t ,1 ); |
---|
165 | ALLOC1_SIGNAL_IN ( in_RETIRE_USE_LOAD_QUEUE ,"use_load_queue" ,Tcontrol_t ,1 ); |
---|
166 | ALLOC1_SIGNAL_IN ( in_RETIRE_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t ,_param->_size_store_queue_ptr ); |
---|
167 | ALLOC1_SIGNAL_IN ( in_RETIRE_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t ,_param->_size_load_queue_ptr ); |
---|
168 | // ALLOC1_SIGNAL_IN ( in_RETIRE_READ_RA ,"read_ra" ,Tcontrol_t ,1 ); |
---|
169 | // ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RA_PHY ,"num_reg_ra_phy" ,Tgeneral_address_t,_param->_size_general_register ); |
---|
170 | // ALLOC1_SIGNAL_IN ( in_RETIRE_READ_RB ,"read_rb" ,Tcontrol_t ,1 ); |
---|
171 | // ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RB_PHY ,"num_reg_rb_phy" ,Tgeneral_address_t,_param->_size_general_register ); |
---|
172 | // ALLOC1_SIGNAL_IN ( in_RETIRE_READ_RC ,"read_rc" ,Tcontrol_t ,1 ); |
---|
173 | // ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RC_PHY ,"num_reg_rc_phy" ,Tspecial_address_t,_param->_size_special_register ); |
---|
174 | ALLOC1_SIGNAL_IN ( in_RETIRE_WRITE_RD ,"write_rd" ,Tcontrol_t ,1 ); |
---|
175 | ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RD_LOG ,"num_reg_rd_log" ,Tgeneral_address_t,_param->_size_general_register_logic); |
---|
176 | ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RD_PHY_OLD ,"num_reg_rd_phy_old" ,Tgeneral_address_t,_param->_size_general_register ); |
---|
177 | ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RD_PHY_NEW ,"num_reg_rd_phy_new" ,Tgeneral_address_t,_param->_size_general_register ); |
---|
178 | ALLOC1_SIGNAL_IN ( in_RETIRE_WRITE_RE ,"write_re" ,Tcontrol_t ,1 ); |
---|
179 | ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_LOG ,"num_reg_re_log" ,Tspecial_address_t,_param->_size_special_register_logic); |
---|
180 | ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_PHY_OLD ,"num_reg_re_phy_old" ,Tspecial_address_t,_param->_size_special_register ); |
---|
181 | ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_PHY_NEW ,"num_reg_re_phy_new" ,Tspecial_address_t,_param->_size_special_register ); |
---|
182 | ALLOC1_SIGNAL_IN ( in_RETIRE_RESTORE ,"restore" ,Tcontrol_t ,1 ); |
---|
183 | ALLOC1_SIGNAL_IN ( in_RETIRE_RESTORE_RD_PHY_OLD ,"restore_rd_phy_old" ,Tcontrol_t ,1 ); |
---|
184 | ALLOC1_SIGNAL_IN ( in_RETIRE_RESTORE_RE_PHY_OLD ,"restore_re_phy_old" ,Tcontrol_t ,1 ); |
---|
185 | |
---|
186 | ALLOC1_INTERFACE_END(_param->_nb_inst_retire); |
---|
187 | } |
---|
188 | |
---|
189 | // ~~~~~[ Interface : "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
190 | { |
---|
191 | ALLOC2_INTERFACE_BEGIN("retire_event", IN,NORTH, _("Retire event"), _param->_nb_front_end, _param->_nb_context[it1]); |
---|
192 | |
---|
193 | _ALLOC2_VALACK_IN ( in_RETIRE_EVENT_VAL ,VAL,_param->_nb_front_end, _param->_nb_context[it1]); |
---|
194 | _ALLOC2_VALACK_OUT (out_RETIRE_EVENT_ACK ,ACK,_param->_nb_front_end, _param->_nb_context[it1]); |
---|
195 | _ALLOC2_SIGNAL_IN ( in_RETIRE_EVENT_STATE ,"state" ,Tevent_state_t ,_param->_size_event_state, _param->_nb_front_end, _param->_nb_context[it1]); |
---|
196 | // _ALLOC2_SIGNAL_IN ( in_RETIRE_EVENT_FLUSH ,"flush" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_context[it1]); |
---|
197 | _ALLOC2_SIGNAL_IN ( in_RETIRE_EVENT_STOP ,"stop" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_context[it1]); |
---|
198 | _ALLOC2_SIGNAL_IN_COND ( in_RETIRE_EVENT_TYPE ,"type" ,Tevent_type_t ,_param->_size_event_type , _param->_nb_front_end, _param->_nb_context[it1],_param->_rat_scheme == RAT_DEPTH_SAVE); |
---|
199 | _ALLOC2_SIGNAL_IN_COND ( in_RETIRE_EVENT_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth , _param->_nb_front_end, _param->_nb_context[it1],_param->_rat_scheme == RAT_DEPTH_SAVE); |
---|
200 | |
---|
201 | ALLOC2_INTERFACE_END(_param->_nb_front_end, _param->_nb_context[it1]); |
---|
202 | } |
---|
203 | |
---|
204 | // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
205 | { |
---|
206 | ALLOC2_INTERFACE_BEGIN("spr_read", IN,NORTH, _("Special register"), _param->_nb_front_end, _param->_nb_context[it1]); |
---|
207 | |
---|
208 | _ALLOC2_SIGNAL_IN (in_SPR_READ_SR ,"sr",Tspr_t ,_param->_size_spr, _param->_nb_front_end, _param->_nb_context[it1]); |
---|
209 | |
---|
210 | ALLOC2_INTERFACE_END(_param->_nb_front_end, _param->_nb_context[it1]); |
---|
211 | } |
---|
212 | |
---|
213 | // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
214 | { |
---|
215 | ALLOC2_INTERFACE_BEGIN("depth",IN,WEST,_("Interface with Prediction unit."),_param->_nb_front_end, _param->_nb_context[it1]); |
---|
216 | |
---|
217 | _ALLOC2_SIGNAL_IN ( in_DEPTH_MIN ,"MIN" ,Tdepth_t ,_param->_size_depth ,_param->_nb_front_end, _param->_nb_context[it1]); |
---|
218 | _ALLOC2_SIGNAL_IN ( in_DEPTH_MAX ,"MAX" ,Tdepth_t ,_param->_size_depth ,_param->_nb_front_end, _param->_nb_context[it1]); |
---|
219 | _ALLOC2_SIGNAL_IN ( in_DEPTH_FULL ,"FULL" ,Tcontrol_t ,1 ,_param->_nb_front_end, _param->_nb_context[it1]); |
---|
220 | |
---|
221 | ALLOC2_INTERFACE_END(_param->_nb_front_end,_param->_nb_context[it1]); |
---|
222 | } |
---|
223 | |
---|
224 | // ~~~~~[ interface : "info" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
225 | #ifdef DEBUG_TEST |
---|
226 | { |
---|
227 | ALLOC0_INTERFACE_BEGIN("info",IN, NORTH, _("Information")); |
---|
228 | |
---|
229 | ALLOC0_SIGNAL_IN ( in_INFO_ROB_EMPTY ,"rob_empty" ,bool ,1); |
---|
230 | |
---|
231 | ALLOC0_INTERFACE_END(); |
---|
232 | } |
---|
233 | #endif |
---|
234 | |
---|
235 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
236 | |
---|
237 | std::string name; |
---|
238 | |
---|
239 | { |
---|
240 | name = _name+"_rename_select"; |
---|
241 | log_printf(TRACE,Rename_unit,FUNCTION,_("Create : %s"),name.c_str()); |
---|
242 | |
---|
243 | _component_rename_select = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::rename_select::Rename_select |
---|
244 | (name.c_str() |
---|
245 | #ifdef STATISTICS |
---|
246 | ,param_statistics |
---|
247 | #endif |
---|
248 | ,_param->_param_rename_select |
---|
249 | ,_usage); |
---|
250 | |
---|
251 | _component->set_component (_component_rename_select->_component |
---|
252 | #ifdef POSITION |
---|
253 | , 50, 50, 10, 10 |
---|
254 | #endif |
---|
255 | ); |
---|
256 | } |
---|
257 | |
---|
258 | { |
---|
259 | name = _name+"_register_translation_unit"; |
---|
260 | log_printf(TRACE,Rename_unit,FUNCTION,_("Create : %s"),name.c_str()); |
---|
261 | |
---|
262 | _component_register_translation_unit = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::Register_translation_unit |
---|
263 | (name.c_str() |
---|
264 | #ifdef STATISTICS |
---|
265 | ,param_statistics |
---|
266 | #endif |
---|
267 | ,_param->_param_register_translation_unit |
---|
268 | ,_usage); |
---|
269 | |
---|
270 | _component->set_component (_component_register_translation_unit->_component |
---|
271 | #ifdef POSITION |
---|
272 | , 50, 50, 10, 10 |
---|
273 | #endif |
---|
274 | ); |
---|
275 | } |
---|
276 | |
---|
277 | { |
---|
278 | name = _name+"_load_store_pointer_unit"; |
---|
279 | log_printf(TRACE,Rename_unit,FUNCTION,_("Create : %s"),name.c_str()); |
---|
280 | |
---|
281 | _component_load_store_pointer_unit = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::load_store_pointer_unit::Load_Store_pointer_unit |
---|
282 | (name.c_str() |
---|
283 | #ifdef STATISTICS |
---|
284 | ,param_statistics |
---|
285 | #endif |
---|
286 | ,_param->_param_load_store_pointer_unit |
---|
287 | ,_usage); |
---|
288 | |
---|
289 | _component->set_component (_component_load_store_pointer_unit->_component |
---|
290 | #ifdef POSITION |
---|
291 | , 50, 50, 10, 10 |
---|
292 | #endif |
---|
293 | ); |
---|
294 | } |
---|
295 | |
---|
296 | { |
---|
297 | name = _name+"_glue"; |
---|
298 | log_printf(TRACE,Rename_unit,FUNCTION,_("Create : %s"),name.c_str()); |
---|
299 | |
---|
300 | _component_glue = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::rename_unit_glue::Rename_unit_Glue |
---|
301 | (name.c_str() |
---|
302 | #ifdef STATISTICS |
---|
303 | ,param_statistics |
---|
304 | #endif |
---|
305 | ,_param->_param_glue |
---|
306 | ,_usage); |
---|
307 | |
---|
308 | _component->set_component (_component_glue->_component |
---|
309 | #ifdef POSITION |
---|
310 | , 50, 50, 10, 10 |
---|
311 | #endif |
---|
312 | ); |
---|
313 | } |
---|
314 | |
---|
315 | // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
316 | std::string src,dest; |
---|
317 | |
---|
318 | // =================================================================== |
---|
319 | // =====[ rename_select ]============================================= |
---|
320 | // =================================================================== |
---|
321 | { |
---|
322 | src = _name+"_rename_select"; |
---|
323 | log_printf(TRACE,Rename_unit,FUNCTION,_("Instance : %s"),name.c_str()); |
---|
324 | |
---|
325 | { |
---|
326 | dest = _name; |
---|
327 | #ifdef POSITION |
---|
328 | _component->interface_map (src ,"", |
---|
329 | dest,""); |
---|
330 | #endif |
---|
331 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
332 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
333 | } |
---|
334 | |
---|
335 | for (uint32_t i=0; i<_param->_nb_front_end; i++) |
---|
336 | for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) |
---|
337 | { |
---|
338 | dest = _name; |
---|
339 | #ifdef POSITION |
---|
340 | _component->interface_map (src ,"rename_in_"+toString(i)+"_"+toString(j), |
---|
341 | dest,"rename_in_"+toString(i)+"_"+toString(j)); |
---|
342 | #endif |
---|
343 | |
---|
344 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_VAL" , |
---|
345 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_VAL" ); |
---|
346 | PORT_MAP(_component,src ,"out_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ACK" , |
---|
347 | dest,"out_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ACK" ); |
---|
348 | if (_param->_have_port_front_end_id) |
---|
349 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID" , |
---|
350 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID" ); |
---|
351 | if (_param->_have_port_context_id) |
---|
352 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID" , |
---|
353 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID" ); |
---|
354 | if (_param->_have_port_depth) |
---|
355 | { |
---|
356 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_DEPTH" , |
---|
357 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_DEPTH" ); |
---|
358 | } |
---|
359 | #ifdef STATISTICS |
---|
360 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_INSTRUCTION" , |
---|
361 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_INSTRUCTION" ); |
---|
362 | #endif |
---|
363 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_TYPE" , |
---|
364 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_TYPE" ); |
---|
365 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_OPERATION" , |
---|
366 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_OPERATION" ); |
---|
367 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NO_EXECUTE" , |
---|
368 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NO_EXECUTE" ); |
---|
369 | // PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_HAVE_EVENT" , |
---|
370 | // dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_HAVE_EVENT" ); |
---|
371 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_LAST_EVENT" , |
---|
372 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_LAST_EVENT" ); |
---|
373 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_IS_DELAY_SLOT", |
---|
374 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_IS_DELAY_SLOT"); |
---|
375 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_SAVE_RAT" , |
---|
376 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_SAVE_RAT" ); |
---|
377 | #ifdef DEBUG |
---|
378 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS" , |
---|
379 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS" ); |
---|
380 | #endif |
---|
381 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS_NEXT" , |
---|
382 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS_NEXT" ); |
---|
383 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_HAS_IMMEDIAT" , |
---|
384 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_HAS_IMMEDIAT" ); |
---|
385 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_IMMEDIAT" , |
---|
386 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_IMMEDIAT" ); |
---|
387 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_READ_RA" , |
---|
388 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_READ_RA" ); |
---|
389 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RA" , |
---|
390 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RA" ); |
---|
391 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_READ_RB" , |
---|
392 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_READ_RB" ); |
---|
393 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RB" , |
---|
394 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RB" ); |
---|
395 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_READ_RC" , |
---|
396 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_READ_RC" ); |
---|
397 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RC" , |
---|
398 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RC" ); |
---|
399 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_WRITE_RD" , |
---|
400 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_WRITE_RD" ); |
---|
401 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RD" , |
---|
402 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RD" ); |
---|
403 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_WRITE_RE" , |
---|
404 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_WRITE_RE" ); |
---|
405 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RE" , |
---|
406 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RE" ); |
---|
407 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_EXCEPTION_USE", |
---|
408 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_EXCEPTION_USE"); |
---|
409 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_EXCEPTION" , |
---|
410 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_EXCEPTION" ); |
---|
411 | } |
---|
412 | |
---|
413 | for (uint32_t i=0; i<_param->_nb_inst_insert; i++) |
---|
414 | { |
---|
415 | dest = _name; |
---|
416 | |
---|
417 | #ifdef POSITION |
---|
418 | _component->interface_map (src ,"rename_out_"+toString(i), |
---|
419 | dest,"insert_" +toString(i)); |
---|
420 | #endif |
---|
421 | |
---|
422 | if (_param->_have_port_depth and (_param->_rat_scheme != RAT_DEPTH_SAVE)) |
---|
423 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_DEPTH", |
---|
424 | dest,"out_INSERT_" +toString(i)+"_DEPTH"); |
---|
425 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_IS_DELAY_SLOT", |
---|
426 | dest,"out_INSERT_" +toString(i)+"_IS_DELAY_SLOT"); |
---|
427 | |
---|
428 | #ifdef STATISTICS |
---|
429 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_INSTRUCTION" , |
---|
430 | dest,"out_INSERT_" +toString(i)+"_INSTRUCTION" ); |
---|
431 | #endif |
---|
432 | #ifdef DEBUG |
---|
433 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_ADDRESS" , |
---|
434 | dest,"out_INSERT_" +toString(i)+"_ADDRESS" ); |
---|
435 | #endif |
---|
436 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_ADDRESS_NEXT", |
---|
437 | dest,"out_INSERT_" +toString(i)+"_ADDRESS_NEXT"); |
---|
438 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_HAS_IMMEDIAT", |
---|
439 | dest,"out_INSERT_" +toString(i)+"_HAS_IMMEDIAT"); |
---|
440 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_EXCEPTION_USE", |
---|
441 | dest,"out_INSERT_" +toString(i)+"_EXCEPTION_USE"); |
---|
442 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_LAST_EVENT", |
---|
443 | dest,"out_INSERT_" +toString(i)+"_LAST_EVENT"); |
---|
444 | |
---|
445 | dest = _name+"_register_translation_unit"; |
---|
446 | |
---|
447 | #ifdef POSITION |
---|
448 | _component->interface_map (src ,"rename_out_"+toString(i), |
---|
449 | dest,"rename_" +toString(i)); |
---|
450 | #endif |
---|
451 | |
---|
452 | if (_param->_rat_scheme != RAT_DEPTH_SAVE) |
---|
453 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_SAVE_RAT" , |
---|
454 | dest, "in_RENAME_" +toString(i)+"_SAVE_RAT" ); |
---|
455 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_READ_RA" , |
---|
456 | dest, "in_RENAME_" +toString(i)+"_READ_RA" ); |
---|
457 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RA", |
---|
458 | dest, "in_RENAME_" +toString(i)+"_NUM_REG_RA_LOG"); |
---|
459 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_READ_RB" , |
---|
460 | dest, "in_RENAME_" +toString(i)+"_READ_RB" ); |
---|
461 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RB", |
---|
462 | dest, "in_RENAME_" +toString(i)+"_NUM_REG_RB_LOG"); |
---|
463 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_READ_RC" , |
---|
464 | dest, "in_RENAME_" +toString(i)+"_READ_RC" ); |
---|
465 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RC", |
---|
466 | dest, "in_RENAME_" +toString(i)+"_NUM_REG_RC_LOG"); |
---|
467 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_WRITE_RD" , |
---|
468 | dest, "in_RENAME_" +toString(i)+"_WRITE_RD" ); |
---|
469 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RD", |
---|
470 | dest, "in_RENAME_" +toString(i)+"_NUM_REG_RD_LOG"); |
---|
471 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_WRITE_RE" , |
---|
472 | dest, "in_RENAME_" +toString(i)+"_WRITE_RE" ); |
---|
473 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RE", |
---|
474 | dest, "in_RENAME_" +toString(i)+"_NUM_REG_RE_LOG"); |
---|
475 | |
---|
476 | dest = _name+"_glue"; |
---|
477 | |
---|
478 | #ifdef POSITION |
---|
479 | _component->interface_map (src ,"rename_out_"+toString(i), |
---|
480 | dest,"insert_" +toString(i)); |
---|
481 | #endif |
---|
482 | |
---|
483 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+ "_VAL" , |
---|
484 | dest, "in_INSERT_" +toString(i)+"_RENAME_SELECT_VAL" ); |
---|
485 | COMPONENT_MAP(_component,src , "in_RENAME_OUT_"+toString(i)+ "_ACK" , |
---|
486 | dest,"out_INSERT_" +toString(i)+"_RENAME_SELECT_ACK" ); |
---|
487 | if (_param->_have_port_front_end_id) |
---|
488 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+ "_FRONT_END_ID" , |
---|
489 | dest, "in_INSERT_" +toString(i)+"_RENAME_SELECT_FRONT_END_ID" ); |
---|
490 | if (_param->_have_port_context_id) |
---|
491 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+ "_CONTEXT_ID" , |
---|
492 | dest, "in_INSERT_" +toString(i)+"_RENAME_SELECT_CONTEXT_ID" ); |
---|
493 | if (_param->_have_port_depth and (_param->_rat_scheme == RAT_DEPTH_SAVE)) |
---|
494 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+ "_DEPTH" , |
---|
495 | dest, "in_INSERT_" +toString(i)+"_RENAME_SELECT_DEPTH" ); |
---|
496 | if (_param->_rat_scheme == RAT_DEPTH_SAVE) |
---|
497 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+ "_SAVE_RAT" , |
---|
498 | dest, "in_INSERT_" +toString(i)+"_RENAME_SELECT_SAVE_RAT" ); |
---|
499 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+ "_TYPE" , |
---|
500 | dest, "in_INSERT_" +toString(i)+"_RENAME_SELECT_TYPE" ); |
---|
501 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+ "_OPERATION" , |
---|
502 | dest, "in_INSERT_" +toString(i)+"_RENAME_SELECT_OPERATION" ); |
---|
503 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+ "_IMMEDIAT" , |
---|
504 | dest, "in_INSERT_" +toString(i)+"_RENAME_SELECT_IMMEDIAT" ); |
---|
505 | // COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+ "_EXCEPTION_USE", |
---|
506 | // dest, "in_INSERT_" +toString(i)+"_RENAME_SELECT_EXCEPTION_USE"); |
---|
507 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+ "_EXCEPTION" , |
---|
508 | dest, "in_INSERT_" +toString(i)+"_RENAME_SELECT_EXCEPTION" ); |
---|
509 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+ "_NO_EXECUTE" , |
---|
510 | dest, "in_INSERT_" +toString(i)+"_RENAME_SELECT_NO_EXECUTE" ); |
---|
511 | } |
---|
512 | |
---|
513 | for (uint32_t i=0; i<_param->_nb_front_end; i++) |
---|
514 | for (uint32_t j=0; j<_param->_nb_context[i]; j++) |
---|
515 | { |
---|
516 | dest = _name; |
---|
517 | |
---|
518 | #ifdef POSITION |
---|
519 | _component->interface_map (src ,"retire_event_"+toString(i)+"_"+toString(j), |
---|
520 | dest,"retire_event_"+toString(i)+"_"+toString(j)); |
---|
521 | #endif |
---|
522 | // PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_FLUSH", |
---|
523 | // dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_FLUSH"); |
---|
524 | PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STOP", |
---|
525 | dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STOP"); |
---|
526 | } |
---|
527 | } |
---|
528 | |
---|
529 | // =================================================================== |
---|
530 | // =====[ register_translation_unit ]================================= |
---|
531 | // =================================================================== |
---|
532 | { |
---|
533 | src = _name+"_register_translation_unit"; |
---|
534 | log_printf(TRACE,Rename_unit,FUNCTION,_("Instance : %s"),name.c_str()); |
---|
535 | |
---|
536 | { |
---|
537 | dest = _name; |
---|
538 | #ifdef POSITION |
---|
539 | _component->interface_map (src ,"", |
---|
540 | dest,""); |
---|
541 | #endif |
---|
542 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
543 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
544 | } |
---|
545 | |
---|
546 | for (uint32_t i=0; i<_param->_nb_inst_insert; i++) |
---|
547 | { |
---|
548 | dest = _name+"_rename_select"; |
---|
549 | |
---|
550 | #ifdef POSITION |
---|
551 | _component->interface_map (src ,"rename_" +toString(i), |
---|
552 | dest,"rename_out_"+toString(i)); |
---|
553 | #endif |
---|
554 | |
---|
555 | dest = _name+"_glue"; |
---|
556 | |
---|
557 | #ifdef POSITION |
---|
558 | _component->interface_map (src ,"rename_"+toString(i), |
---|
559 | dest,"insert_"+toString(i)); |
---|
560 | #endif |
---|
561 | |
---|
562 | COMPONENT_MAP(_component,src , "in_RENAME_"+toString(i)+ "_VAL" , |
---|
563 | dest,"out_INSERT_"+toString(i)+"_REGISTER_TRANSLATION_VAL" ); |
---|
564 | COMPONENT_MAP(_component,src ,"out_RENAME_"+toString(i)+ "_ACK" , |
---|
565 | dest, "in_INSERT_"+toString(i)+"_REGISTER_TRANSLATION_ACK" ); |
---|
566 | if (_param->_have_port_front_end_id) |
---|
567 | COMPONENT_MAP(_component,src , "in_RENAME_"+toString(i)+ "_FRONT_END_ID", |
---|
568 | dest,"out_INSERT_"+toString(i)+"_REGISTER_TRANSLATION_FRONT_END_ID"); |
---|
569 | if (_param->_have_port_context_id) |
---|
570 | COMPONENT_MAP(_component,src , "in_RENAME_"+toString(i)+ "_CONTEXT_ID" , |
---|
571 | dest,"out_INSERT_"+toString(i)+"_REGISTER_TRANSLATION_CONTEXT_ID" ); |
---|
572 | if (_param->_have_port_depth and (_param->_rat_scheme == RAT_DEPTH_SAVE)) |
---|
573 | COMPONENT_MAP(_component,src , "in_RENAME_"+toString(i)+ "_DEPTH" , |
---|
574 | dest,"out_INSERT_"+toString(i)+"_REGISTER_TRANSLATION_DEPTH" ); |
---|
575 | if (_param->_rat_scheme == RAT_DEPTH_SAVE) |
---|
576 | COMPONENT_MAP(_component,src , "in_RENAME_"+toString(i)+ "_SAVE_RAT" , |
---|
577 | dest,"out_INSERT_"+toString(i)+"_REGISTER_TRANSLATION_SAVE_RAT" ); |
---|
578 | |
---|
579 | // in_RENAME_SAVE_RAS - rename_select |
---|
580 | // in_RENAME_READ_RA - rename_select |
---|
581 | // in_RENAME_NUM_REG_RA_LOG - rename_select |
---|
582 | // in_RENAME_READ_RB - rename_select |
---|
583 | // in_RENAME_NUM_REG_RB_LOG - rename_select |
---|
584 | // in_RENAME_READ_RC - rename_select |
---|
585 | // in_RENAME_NUM_REG_RC_LOG - rename_select |
---|
586 | // in_RENAME_WRITE_RD - rename_select |
---|
587 | // in_RENAME_NUM_REG_RD_LOG - rename_select |
---|
588 | // in_RENAME_WRITE_RE - rename_select |
---|
589 | // in_RENAME_NUM_REG_RE_LOG - rename_select |
---|
590 | |
---|
591 | } |
---|
592 | |
---|
593 | for (uint32_t i=0; i<_param->_nb_inst_insert; i++) |
---|
594 | { |
---|
595 | dest = _name; |
---|
596 | |
---|
597 | #ifdef POSITION |
---|
598 | _component->interface_map (src ,"insert_"+toString(i), |
---|
599 | dest,"insert_"+toString(i)); |
---|
600 | #endif |
---|
601 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_VAL" , |
---|
602 | dest,"out_INSERT_"+toString(i)+"_VAL" ); |
---|
603 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_ACK" , |
---|
604 | dest, "in_INSERT_"+toString(i)+"_ACK" ); |
---|
605 | // if (_param->_have_port_front_end_id) |
---|
606 | // PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_FRONT_END_ID" , |
---|
607 | // dest,"out_INSERT_"+toString(i)+"_FRONT_END_ID" ); |
---|
608 | // if (_param->_have_port_context_id) |
---|
609 | // PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_CONTEXT_ID" , |
---|
610 | // dest,"out_INSERT_"+toString(i)+"_CONTEXT_ID" ); |
---|
611 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_READ_RA" , |
---|
612 | dest,"out_INSERT_"+toString(i)+"_READ_RA" ); |
---|
613 | #ifdef DEBUG |
---|
614 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RA_LOG" , |
---|
615 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RA_LOG" ); |
---|
616 | #endif |
---|
617 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RA_PHY" , |
---|
618 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RA_PHY" ); |
---|
619 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_READ_RB" , |
---|
620 | dest,"out_INSERT_"+toString(i)+"_READ_RB" ); |
---|
621 | #ifdef DEBUG |
---|
622 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RB_LOG" , |
---|
623 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RB_LOG" ); |
---|
624 | #endif |
---|
625 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RB_PHY" , |
---|
626 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RB_PHY" ); |
---|
627 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_READ_RC" , |
---|
628 | dest,"out_INSERT_"+toString(i)+"_READ_RC" ); |
---|
629 | #ifdef DEBUG |
---|
630 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RC_LOG" , |
---|
631 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RC_LOG" ); |
---|
632 | #endif |
---|
633 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RC_PHY" , |
---|
634 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RC_PHY" ); |
---|
635 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_WRITE_RD" , |
---|
636 | dest,"out_INSERT_"+toString(i)+"_WRITE_RD" ); |
---|
637 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RD_LOG" , |
---|
638 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RD_LOG" ); |
---|
639 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RD_PHY_OLD", |
---|
640 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RD_PHY_OLD"); |
---|
641 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RD_PHY_NEW", |
---|
642 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RD_PHY_NEW"); |
---|
643 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_WRITE_RE" , |
---|
644 | dest,"out_INSERT_"+toString(i)+"_WRITE_RE" ); |
---|
645 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RE_LOG" , |
---|
646 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RE_LOG" ); |
---|
647 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RE_PHY_OLD", |
---|
648 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RE_PHY_OLD"); |
---|
649 | |
---|
650 | // HACK : use the field num_reg_re to pass the SM and SUMRA flag. |
---|
651 | // cf : rename_unit_glue and functionnal_unit/Operation |
---|
652 | dest = _name+"_glue"; |
---|
653 | |
---|
654 | COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(i)+ "_NUM_REG_RE_PHY_NEW", |
---|
655 | dest, "in_INSERT_"+toString(i)+"_REGISTER_TRANSLATION_NUM_REG_RE_PHY_NEW"); |
---|
656 | } |
---|
657 | |
---|
658 | for (uint32_t i=0; i<_param->_nb_inst_retire; i++) |
---|
659 | { |
---|
660 | dest = _name; |
---|
661 | |
---|
662 | #ifdef POSITION |
---|
663 | _component->interface_map (src ,"retire_"+toString(i), |
---|
664 | dest,"retire_"+toString(i)); |
---|
665 | #endif |
---|
666 | |
---|
667 | if (_param->_have_port_front_end_id) |
---|
668 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_FRONT_END_ID" , |
---|
669 | dest, "in_RETIRE_"+toString(i)+"_FRONT_END_ID" ); |
---|
670 | if (_param->_have_port_context_id) |
---|
671 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_CONTEXT_ID" , |
---|
672 | dest, "in_RETIRE_"+toString(i)+"_CONTEXT_ID" ); |
---|
673 | // PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_READ_RA" , |
---|
674 | // dest, "in_RETIRE_"+toString(i)+"_READ_RA" ); |
---|
675 | // PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RA_PHY" , |
---|
676 | // dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RA_PHY" ); |
---|
677 | // PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_READ_RB" , |
---|
678 | // dest, "in_RETIRE_"+toString(i)+"_READ_RB" ); |
---|
679 | // PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RB_PHY" , |
---|
680 | // dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RB_PHY" ); |
---|
681 | // PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_READ_RC" , |
---|
682 | // dest, "in_RETIRE_"+toString(i)+"_READ_RC" ); |
---|
683 | // PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RC_PHY" , |
---|
684 | // dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RC_PHY" ); |
---|
685 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_WRITE_RD" , |
---|
686 | dest, "in_RETIRE_"+toString(i)+"_WRITE_RD" ); |
---|
687 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RD_LOG" , |
---|
688 | dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RD_LOG" ); |
---|
689 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_OLD", |
---|
690 | dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_OLD"); |
---|
691 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_NEW", |
---|
692 | dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_NEW"); |
---|
693 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_WRITE_RE" , |
---|
694 | dest, "in_RETIRE_"+toString(i)+"_WRITE_RE" ); |
---|
695 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RE_LOG" , |
---|
696 | dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RE_LOG" ); |
---|
697 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_OLD", |
---|
698 | dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_OLD"); |
---|
699 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_NEW", |
---|
700 | dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_NEW"); |
---|
701 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_RESTORE" , |
---|
702 | dest, "in_RETIRE_"+toString(i)+"_RESTORE" ); |
---|
703 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_RESTORE_RD_PHY_OLD", |
---|
704 | dest, "in_RETIRE_"+toString(i)+"_RESTORE_RD_PHY_OLD"); |
---|
705 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_RESTORE_RE_PHY_OLD", |
---|
706 | dest, "in_RETIRE_"+toString(i)+"_RESTORE_RE_PHY_OLD"); |
---|
707 | |
---|
708 | dest = _name+"_glue"; |
---|
709 | |
---|
710 | #ifdef POSITION |
---|
711 | _component->interface_map (src ,"retire_"+toString(i), |
---|
712 | dest,"retire_"+toString(i)); |
---|
713 | #endif |
---|
714 | |
---|
715 | COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_VAL",dest,"out_RETIRE_"+toString(i)+"_REGISTER_TRANSLATION_VAL"); |
---|
716 | COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_ACK",dest, "in_RETIRE_"+toString(i)+"_REGISTER_TRANSLATION_ACK"); |
---|
717 | } |
---|
718 | |
---|
719 | for (uint32_t i=0; i<_param->_nb_front_end; i++) |
---|
720 | for (uint32_t j=0; j<_param->_nb_context[i]; j++) |
---|
721 | { |
---|
722 | dest = _name+"_glue"; |
---|
723 | |
---|
724 | #ifdef POSITION |
---|
725 | _component->interface_map (src ,"retire_event_"+toString(i)+"_"+toString(j), |
---|
726 | dest,"retire_event_"+toString(i)+"_"+toString(j)); |
---|
727 | #endif |
---|
728 | COMPONENT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+ "_VAL" , |
---|
729 | dest,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_REGISTER_TRANSLATION_VAL" ); |
---|
730 | COMPONENT_MAP(_component,src ,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+ "_ACK" , |
---|
731 | dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_REGISTER_TRANSLATION_ACK" ); |
---|
732 | |
---|
733 | dest = _name; |
---|
734 | |
---|
735 | #ifdef POSITION |
---|
736 | _component->interface_map (src ,"retire_event_"+toString(i)+"_"+toString(j), |
---|
737 | dest,"retire_event_"+toString(i)+"_"+toString(j)); |
---|
738 | #endif |
---|
739 | PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE", |
---|
740 | dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE"); |
---|
741 | if (_param->_rat_scheme == RAT_DEPTH_SAVE) |
---|
742 | { |
---|
743 | PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_TYPE" , |
---|
744 | dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_TYPE" ); |
---|
745 | if (_param->_have_port_depth) |
---|
746 | PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_DEPTH", |
---|
747 | dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_DEPTH"); |
---|
748 | } |
---|
749 | |
---|
750 | } |
---|
751 | |
---|
752 | for (uint32_t i=0; i<_param->_nb_front_end; i++) |
---|
753 | for (uint32_t j=0; j<_param->_nb_context[i]; j++) |
---|
754 | { |
---|
755 | dest = _name; |
---|
756 | |
---|
757 | #ifdef POSITION |
---|
758 | _component->interface_map (src ,"depth_"+toString(i)+"_"+toString(j), |
---|
759 | dest,"depth_"+toString(i)+"_"+toString(j)); |
---|
760 | #endif |
---|
761 | if (_param->_have_port_depth) |
---|
762 | { |
---|
763 | PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MIN" , |
---|
764 | dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MIN" ); |
---|
765 | PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MAX" , |
---|
766 | dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MAX" ); |
---|
767 | } |
---|
768 | PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_FULL", |
---|
769 | dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_FULL"); |
---|
770 | } |
---|
771 | |
---|
772 | #ifdef DEBUG_TEST |
---|
773 | { |
---|
774 | dest = _name; |
---|
775 | #ifdef POSITION |
---|
776 | _component->interface_map (src ,"info" |
---|
777 | dest,"info"); |
---|
778 | #endif |
---|
779 | |
---|
780 | PORT_MAP(_component,src , "in_INFO_ROB_EMPTY", |
---|
781 | dest, "in_INFO_ROB_EMPTY"); |
---|
782 | } |
---|
783 | #endif |
---|
784 | } |
---|
785 | |
---|
786 | // =================================================================== |
---|
787 | // =====[ load_store_pointer_unit ]=================================== |
---|
788 | // =================================================================== |
---|
789 | { |
---|
790 | src = _name+"_load_store_pointer_unit"; |
---|
791 | log_printf(TRACE,Rename_unit,FUNCTION,_("Instance : %s"),name.c_str()); |
---|
792 | |
---|
793 | { |
---|
794 | dest = _name; |
---|
795 | #ifdef POSITION |
---|
796 | _component->interface_map (src ,"", |
---|
797 | dest,""); |
---|
798 | #endif |
---|
799 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
800 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
801 | } |
---|
802 | |
---|
803 | for (uint32_t i=0; i<_param->_nb_inst_insert; i++) |
---|
804 | { |
---|
805 | dest = _name; |
---|
806 | |
---|
807 | #ifdef POSITION |
---|
808 | _component->interface_map (src ,"insert_"+toString(i), |
---|
809 | dest,"insert_"+toString(i)); |
---|
810 | #endif |
---|
811 | |
---|
812 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_STORE_QUEUE_PTR_WRITE", |
---|
813 | dest,"out_INSERT_"+toString(i)+"_STORE_QUEUE_PTR_WRITE"); |
---|
814 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_STORE_QUEUE_PTR_READ" , |
---|
815 | dest,"out_INSERT_"+toString(i)+"_STORE_QUEUE_PTR_READ" ); |
---|
816 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_STORE_QUEUE_EMPTY" , |
---|
817 | dest,"out_INSERT_"+toString(i)+"_STORE_QUEUE_EMPTY" ); |
---|
818 | if (_param->_have_port_load_queue_ptr) |
---|
819 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" , |
---|
820 | dest,"out_INSERT_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" ); |
---|
821 | |
---|
822 | dest = _name+"_glue"; |
---|
823 | |
---|
824 | #ifdef POSITION |
---|
825 | _component->interface_map (src ,"insert_"+toString(i), |
---|
826 | dest,"insert_"+toString(i)); |
---|
827 | #endif |
---|
828 | |
---|
829 | COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+ "_VAL" , |
---|
830 | dest,"out_INSERT_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_VAL" ); |
---|
831 | COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(i)+ "_ACK" , |
---|
832 | dest, "in_INSERT_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_ACK" ); |
---|
833 | if (_param->_have_port_front_end_id) |
---|
834 | COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+ "_FRONT_END_ID", |
---|
835 | dest,"out_INSERT_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_FRONT_END_ID"); |
---|
836 | if (_param->_have_port_context_id) |
---|
837 | COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+ "_CONTEXT_ID" , |
---|
838 | dest,"out_INSERT_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_CONTEXT_ID" ); |
---|
839 | COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+ "_TYPE" , |
---|
840 | dest,"out_INSERT_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_TYPE" ); |
---|
841 | COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+ "_OPERATION" , |
---|
842 | dest,"out_INSERT_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_OPERATION" ); |
---|
843 | } |
---|
844 | |
---|
845 | for (uint32_t i=0; i<_param->_nb_inst_retire; i++) |
---|
846 | { |
---|
847 | dest = _name; |
---|
848 | |
---|
849 | #ifdef POSITION |
---|
850 | _component->interface_map (src ,"retire_"+toString(i), |
---|
851 | dest,"retire_"+toString(i)); |
---|
852 | #endif |
---|
853 | |
---|
854 | if (_param->_have_port_front_end_id) |
---|
855 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_FRONT_END_ID" , |
---|
856 | dest, "in_RETIRE_"+toString(i)+"_FRONT_END_ID" ); |
---|
857 | if (_param->_have_port_context_id) |
---|
858 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_CONTEXT_ID" , |
---|
859 | dest, "in_RETIRE_"+toString(i)+"_CONTEXT_ID" ); |
---|
860 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_USE_STORE_QUEUE" , |
---|
861 | dest, "in_RETIRE_"+toString(i)+"_USE_STORE_QUEUE" ); |
---|
862 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_USE_LOAD_QUEUE" , |
---|
863 | dest, "in_RETIRE_"+toString(i)+"_USE_LOAD_QUEUE" ); |
---|
864 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_STORE_QUEUE_PTR_WRITE", |
---|
865 | dest, "in_RETIRE_"+toString(i)+"_STORE_QUEUE_PTR_WRITE"); |
---|
866 | if (_param->_have_port_load_queue_ptr) |
---|
867 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" , |
---|
868 | dest, "in_RETIRE_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" ); |
---|
869 | |
---|
870 | dest = _name+"_glue"; |
---|
871 | |
---|
872 | #ifdef POSITION |
---|
873 | _component->interface_map (src ,"retire_"+toString(i), |
---|
874 | dest,"retire_"+toString(i)); |
---|
875 | #endif |
---|
876 | |
---|
877 | COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(i)+ "_VAL" , |
---|
878 | dest,"out_RETIRE_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_VAL" ); |
---|
879 | COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+ "_ACK" , |
---|
880 | dest, "in_RETIRE_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_ACK" ); |
---|
881 | //// in_RETIRE_TYPE - glue |
---|
882 | //// in_RETIRE_OPERATION - glue |
---|
883 | } |
---|
884 | |
---|
885 | for (uint32_t i=0; i<_param->_nb_front_end; i++) |
---|
886 | for (uint32_t j=0; j<_param->_nb_context[i]; j++) |
---|
887 | { |
---|
888 | dest = _name+"_glue"; |
---|
889 | |
---|
890 | #ifdef POSITION |
---|
891 | _component->interface_map (src ,"retire_event_"+toString(i)+"_"+toString(j), |
---|
892 | dest,"retire_event_"+toString(i)+"_"+toString(j)); |
---|
893 | #endif |
---|
894 | COMPONENT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+ "_VAL" , |
---|
895 | dest,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_LOAD_STORE_QUEUE_POINTER_VAL" ); |
---|
896 | COMPONENT_MAP(_component,src ,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+ "_ACK" , |
---|
897 | dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_LOAD_STORE_QUEUE_POINTER_ACK" ); |
---|
898 | |
---|
899 | dest = _name; |
---|
900 | |
---|
901 | #ifdef POSITION |
---|
902 | _component->interface_map (src ,"retire_event_"+toString(i)+"_"+toString(j), |
---|
903 | dest,"retire_event_"+toString(i)+"_"+toString(j)); |
---|
904 | #endif |
---|
905 | PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE", |
---|
906 | dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE"); |
---|
907 | } |
---|
908 | } |
---|
909 | |
---|
910 | // =================================================================== |
---|
911 | // =====[ glue ]====================================================== |
---|
912 | // =================================================================== |
---|
913 | { |
---|
914 | src = _name+"_glue"; |
---|
915 | log_printf(TRACE,Rename_unit,FUNCTION,_("Instance : %s"),name.c_str()); |
---|
916 | |
---|
917 | { |
---|
918 | dest = _name; |
---|
919 | #ifdef POSITION |
---|
920 | _component->interface_map (src ,"", |
---|
921 | dest,""); |
---|
922 | #endif |
---|
923 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
924 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
925 | } |
---|
926 | |
---|
927 | for (uint32_t i=0; i<_param->_nb_inst_insert; i++) |
---|
928 | { |
---|
929 | dest = _name; |
---|
930 | |
---|
931 | #ifdef POSITION |
---|
932 | _component->interface_map (src ,"insert_"+toString(i), |
---|
933 | dest,"insert_"+toString(i)); |
---|
934 | #endif |
---|
935 | |
---|
936 | // //out_INSERT_VAL |
---|
937 | // // in_INSERT_ACK |
---|
938 | if (_param->_have_port_front_end_id) |
---|
939 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_FRONT_END_ID" , |
---|
940 | dest,"out_INSERT_"+toString(i)+"_FRONT_END_ID" ); |
---|
941 | if (_param->_have_port_context_id) |
---|
942 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_CONTEXT_ID" , |
---|
943 | dest,"out_INSERT_"+toString(i)+"_CONTEXT_ID" ); |
---|
944 | if (_param->_have_port_depth and (_param->_rat_scheme == RAT_DEPTH_SAVE)) |
---|
945 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_DEPTH" , |
---|
946 | dest,"out_INSERT_"+toString(i)+"_DEPTH" ); |
---|
947 | if (_param->_rat_scheme == RAT_DEPTH_SAVE) |
---|
948 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_SAVE_RAT" , |
---|
949 | dest,"out_INSERT_"+toString(i)+"_SAVE_RAT" ); |
---|
950 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_TYPE" , |
---|
951 | dest,"out_INSERT_"+toString(i)+"_TYPE" ); |
---|
952 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_OPERATION" , |
---|
953 | dest,"out_INSERT_"+toString(i)+"_OPERATION" ); |
---|
954 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_IMMEDIAT" , |
---|
955 | dest,"out_INSERT_"+toString(i)+"_IMMEDIAT" ); |
---|
956 | // PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_EXCEPTION_USE", |
---|
957 | // dest,"out_INSERT_"+toString(i)+"_EXCEPTION_USE"); |
---|
958 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_EXCEPTION" , |
---|
959 | dest,"out_INSERT_"+toString(i)+"_EXCEPTION" ); |
---|
960 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RE_PHY_NEW", |
---|
961 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RE_PHY_NEW"); |
---|
962 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NO_EXECUTE" , |
---|
963 | dest,"out_INSERT_"+toString(i)+"_NO_EXECUTE" ); |
---|
964 | |
---|
965 | // in_INSERT_RENAME_SELECT_VAL - rename_select |
---|
966 | // out_INSERT_RENAME_SELECT_ACK - rename_select |
---|
967 | // in_INSERT_RENAME_SELECT_FRONT_END_ID - rename_select |
---|
968 | // in_INSERT_RENAME_SELECT_CONTEXT_ID - rename_select |
---|
969 | // in_INSERT_RENAME_SELECT_TYPE - rename_select |
---|
970 | // in_INSERT_RENAME_SELECT_OPERATION - rename_select |
---|
971 | // in_INSERT_RENAME_SELECT_IMMEDIAT - rename_select |
---|
972 | // // in_INSERT_RENAME_SELECT_EXCEPTION_USE - rename_select |
---|
973 | // in_INSERT_RENAME_SELECT_EXCEPTION - rename_select |
---|
974 | |
---|
975 | // out_INSERT_REGISTER_TRANSLATION_VAL - register_translation_unit |
---|
976 | // in_INSERT_REGISTER_TRANSLATION_ACK - register_translation_unit |
---|
977 | // out_INSERT_REGISTER_TRANSLATION_FRONT_END_ID - register_translation_unit |
---|
978 | // out_INSERT_REGISTER_TRANSLATION_CONTEXT_ID - register_translation_unit |
---|
979 | // out_INSERT_REGISTER_TRANSLATION_NUM_REG_RE_PHY_NEW - register_translation_unit |
---|
980 | |
---|
981 | // out_INSERT_LOAD_STORE_QUEUE_POINTER_VAL - load_store_pointer_unit |
---|
982 | // in_INSERT_LOAD_STORE_QUEUE_POINTER_ACK - load_store_pointer_unit |
---|
983 | // out_INSERT_LOAD_STORE_QUEUE_POINTER_FRONT_END_ID - load_store_pointer_unit |
---|
984 | // out_INSERT_LOAD_STORE_QUEUE_POINTER_CONTEXT_ID - load_store_pointer_unit |
---|
985 | // out_INSERT_LOAD_STORE_QUEUE_POINTER_TYPE - load_store_pointer_unit |
---|
986 | // out_INSERT_LOAD_STORE_QUEUE_POINTER_OPERATION - load_store_pointer_unit |
---|
987 | } |
---|
988 | |
---|
989 | for (uint32_t i=0; i<_param->_nb_inst_retire; i++) |
---|
990 | { |
---|
991 | dest = _name; |
---|
992 | |
---|
993 | #ifdef POSITION |
---|
994 | _component->interface_map (src ,"retire_"+toString(i), |
---|
995 | dest,"retire_"+toString(i)); |
---|
996 | #endif |
---|
997 | |
---|
998 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_VAL", |
---|
999 | dest, "in_RETIRE_"+toString(i)+"_VAL"); |
---|
1000 | PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_ACK", |
---|
1001 | dest,"out_RETIRE_"+toString(i)+"_ACK"); |
---|
1002 | |
---|
1003 | // out_RETIRE_LOAD_STORE_QUEUE_POINTER_VAL - load_store_pointer_unit |
---|
1004 | // in_RETIRE_LOAD_STORE_QUEUE_POINTER_ACK - load_store_pointer_unit |
---|
1005 | // //out_RETIRE_LOAD_STORE_QUEUE_POINTER_TYPE - load_store_pointer_unit |
---|
1006 | // //out_RETIRE_LOAD_STORE_QUEUE_POINTER_OPERATION - load_store_pointer_unit |
---|
1007 | // out_RETIRE_REGISTER_TRANSLATION_VAL - register_translation_unit |
---|
1008 | // in_RETIRE_REGISTER_TRANSLATION_ACK - register_translation_unit |
---|
1009 | } |
---|
1010 | |
---|
1011 | for (uint32_t i=0; i<_param->_nb_front_end; i++) |
---|
1012 | for (uint32_t j=0; j<_param->_nb_context[i]; j++) |
---|
1013 | { |
---|
1014 | dest = _name; |
---|
1015 | |
---|
1016 | #ifdef POSITION |
---|
1017 | _component->interface_map (src ,"retire_event_"+toString(i)+"_"+toString(j), |
---|
1018 | dest,"retire_event_"+toString(i)+"_"+toString(j)); |
---|
1019 | #endif |
---|
1020 | |
---|
1021 | PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_VAL", |
---|
1022 | dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
1023 | PORT_MAP(_component,src ,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_ACK", |
---|
1024 | dest,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
1025 | |
---|
1026 | // out_RETIRE_EVENT_LOAD_STORE_QUEUE_POINTER_VAL - load_store_pointer_unit |
---|
1027 | // in_RETIRE_EVENT_LOAD_STORE_QUEUE_POINTER_ACK - load_store_pointer_unit |
---|
1028 | // out_RETIRE_EVENT_REGISTER_TRANSLATION_VAL - register_translation_unit |
---|
1029 | // in_RETIRE_EVENT_REGISTER_TRANSLATION_ACK - register_translation_unit |
---|
1030 | } |
---|
1031 | |
---|
1032 | |
---|
1033 | for (uint32_t i=0; i<_param->_nb_front_end; i++) |
---|
1034 | for (uint32_t j=0; j<_param->_nb_context[i]; j++) |
---|
1035 | { |
---|
1036 | dest = _name; |
---|
1037 | #ifdef POSITION |
---|
1038 | _component->interface_map (src ,"spr_read_"+toString(i)+"_"+toString(j), |
---|
1039 | dest,"spr_read_"+toString(i)+"_"+toString(j)); |
---|
1040 | #endif |
---|
1041 | |
---|
1042 | PORT_MAP(_component,src , "in_SPR_READ_"+toString(i)+"_"+toString(j)+"_SR", |
---|
1043 | dest, "in_SPR_READ_"+toString(i)+"_"+toString(j)+"_SR"); |
---|
1044 | } |
---|
1045 | } |
---|
1046 | |
---|
1047 | // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1048 | #if DEBUG_Rename_unit == true |
---|
1049 | _component->test_map(); |
---|
1050 | #endif |
---|
1051 | |
---|
1052 | #ifdef POSITION |
---|
1053 | if (usage_is_set(_usage,USE_POSITION)) |
---|
1054 | _component->generate_file(); |
---|
1055 | #endif |
---|
1056 | |
---|
1057 | log_end(Rename_unit,FUNCTION); |
---|
1058 | }; |
---|
1059 | |
---|
1060 | }; // end namespace rename_unit |
---|
1061 | }; // end namespace ooo_engine |
---|
1062 | }; // end namespace multi_ooo_engine |
---|
1063 | }; // end namespace core |
---|
1064 | |
---|
1065 | }; // end namespace behavioural |
---|
1066 | }; // end namespace morpheo |
---|