1 | /* |
---|
2 | * $Id: Execute_loop_allocation.cpp 122 2009-06-03 08:15:51Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/include/Execute_loop.h" |
---|
9 | #include "Behavioural/include/Allocation.h" |
---|
10 | |
---|
11 | namespace morpheo { |
---|
12 | namespace behavioural { |
---|
13 | namespace core { |
---|
14 | namespace multi_execute_loop { |
---|
15 | namespace execute_loop { |
---|
16 | |
---|
17 | |
---|
18 | |
---|
19 | #undef FUNCTION |
---|
20 | #define FUNCTION "Execute_loop::allocation" |
---|
21 | void Execute_loop::allocation ( |
---|
22 | #ifdef STATISTICS |
---|
23 | morpheo::behavioural::Parameters_Statistics * param_statistics |
---|
24 | #else |
---|
25 | void |
---|
26 | #endif |
---|
27 | ) |
---|
28 | { |
---|
29 | log_printf(FUNC,Execute_loop,FUNCTION,"Begin"); |
---|
30 | |
---|
31 | _component = new Component (_usage); |
---|
32 | |
---|
33 | Entity * entity = _component->set_entity (_name |
---|
34 | ,"Execute_loop" |
---|
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 | // ~~~~~[ Interface "execute_loop_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
56 | { |
---|
57 | ALLOC1_INTERFACE_BEGIN("execute_loop_in", IN, EAST, "Operation's Input", _param->_nb_read_unit); |
---|
58 | |
---|
59 | ALLOC1_VALACK_IN ( in_EXECUTE_LOOP_IN_VAL,VAL); |
---|
60 | ALLOC1_VALACK_OUT(out_EXECUTE_LOOP_IN_ACK,ACK); |
---|
61 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id); |
---|
62 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_FRONT_END_ID ,"front_end_id" ,Tcontext_t ,_param->_size_front_end_id); |
---|
63 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_OOO_ENGINE_ID ,"ooo_engine_id" ,Tcontext_t ,_param->_size_ooo_engine_id); |
---|
64 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_PACKET_ID ,"packet_id" ,Tpacket_t ,_param->_size_rob_ptr ); |
---|
65 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_OPERATION ,"operation" ,Toperation_t ,_param->_size_operation); |
---|
66 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_TYPE ,"type" ,Ttype_t ,_param->_size_type); |
---|
67 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t ,_param->_size_store_queue_ptr); |
---|
68 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_STORE_QUEUE_PTR_READ ,"store_queue_ptr_read" ,Tlsq_ptr_t ,_param->_size_store_queue_ptr); |
---|
69 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_STORE_QUEUE_EMPTY ,"store_queue_empty" ,Tcontrol_t ,1); |
---|
70 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t ,_param->_size_load_queue_ptr); |
---|
71 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t ,1); |
---|
72 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_IMMEDIAT ,"immediat" ,Tgeneral_data_t ,_param->_size_general_data); |
---|
73 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_READ_RA ,"read_ra" ,Tcontrol_t ,1); |
---|
74 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_NUM_REG_RA ,"num_reg_ra" ,Tgeneral_address_t,_param->_size_general_register); |
---|
75 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_READ_RB ,"read_rb" ,Tcontrol_t ,1); |
---|
76 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_NUM_REG_RB ,"num_reg_rb" ,Tgeneral_address_t,_param->_size_general_register); |
---|
77 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_READ_RC ,"read_rc" ,Tcontrol_t ,1); |
---|
78 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_NUM_REG_RC ,"num_reg_rc" ,Tspecial_address_t,_param->_size_special_register); |
---|
79 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_WRITE_RD ,"write_rd" ,Tcontrol_t ,1); |
---|
80 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_NUM_REG_RD ,"num_reg_rd" ,Tgeneral_address_t,_param->_size_general_register); |
---|
81 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_WRITE_RE ,"write_re" ,Tcontrol_t ,1); |
---|
82 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_NUM_REG_RE ,"num_reg_re" ,Tspecial_address_t,_param->_size_special_register); |
---|
83 | |
---|
84 | ALLOC1_INTERFACE_END(param->_nb_read_unit); |
---|
85 | } |
---|
86 | // ~~~~~[ Interface "execute_loop_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
87 | { |
---|
88 | ALLOC1_INTERFACE_BEGIN("execute_loop_out",OUT, EAST, "Operation's Output", _param->_nb_write_unit); |
---|
89 | |
---|
90 | ALLOC1_VALACK_OUT(out_EXECUTE_LOOP_OUT_VAL,VAL); |
---|
91 | ALLOC1_VALACK_IN ( in_EXECUTE_LOOP_OUT_ACK,ACK); |
---|
92 | ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id); |
---|
93 | ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_FRONT_END_ID ,"front_end_id" ,Tcontext_t ,_param->_size_front_end_id); |
---|
94 | ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t ,_param->_size_ooo_engine_id); |
---|
95 | ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_PACKET_ID ,"packet_id" ,Tpacket_t ,_param->_size_rob_ptr ); |
---|
96 | // ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_OPERATION ,"operation" ,Toperation_t ,_param->_size_operation); |
---|
97 | // ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_TYPE ,"type" ,Ttype_t ,_param->_size_type); |
---|
98 | ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_FLAGS ,"flags" ,Tspecial_data_t,_param->_size_special_data); |
---|
99 | ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_EXCEPTION ,"exception" ,Texception_t ,_param->_size_exception); |
---|
100 | ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_NO_SEQUENCE ,"no_sequence" ,Tcontrol_t ,1); |
---|
101 | ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_ADDRESS ,"address" ,Taddress_t ,_param->_size_instruction_address); |
---|
102 | ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_DATA ,"data" ,Tgeneral_data_t,_param->_size_general_data); |
---|
103 | |
---|
104 | ALLOC1_INTERFACE_END(_param->_nb_write_unit); |
---|
105 | } |
---|
106 | // ~~~~~[ Interface "dcache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
107 | { |
---|
108 | ALLOC2_INTERFACE_BEGIN("dcache_req",OUT, NORTH, "Data cache port : request", _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
109 | |
---|
110 | _ALLOC2_VALACK_OUT(out_DCACHE_REQ_VAL,VAL, _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
111 | _ALLOC2_VALACK_IN ( in_DCACHE_REQ_ACK,ACK, _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
112 | _ALLOC2_SIGNAL_OUT(out_DCACHE_REQ_CONTEXT_ID,"context_id",Tcontext_t ,_param->_max_size_dcache_context_id, _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
113 | _ALLOC2_SIGNAL_OUT(out_DCACHE_REQ_PACKET_ID ,"packet_id" ,Tpacket_t ,_param->_max_size_dcache_packet_id , _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
114 | _ALLOC2_SIGNAL_OUT(out_DCACHE_REQ_ADDRESS ,"address" ,Tdcache_address_t,_param->_size_general_data , _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
115 | _ALLOC2_SIGNAL_OUT(out_DCACHE_REQ_TYPE ,"type" ,Tdcache_type_t ,_param->_size_dcache_type , _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
116 | _ALLOC2_SIGNAL_OUT(out_DCACHE_REQ_WDATA ,"wdata" ,Tdcache_data_t ,_param->_size_general_data , _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
117 | |
---|
118 | ALLOC2_INTERFACE_END(_param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
119 | } |
---|
120 | |
---|
121 | // ~~~~~[ Interface "dcache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
122 | { |
---|
123 | ALLOC2_INTERFACE_BEGIN("dcache_rsp",IN, NORTH, "Data cache port : respons", _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
124 | |
---|
125 | _ALLOC2_VALACK_IN ( in_DCACHE_RSP_VAL,VAL, _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
126 | _ALLOC2_VALACK_OUT(out_DCACHE_RSP_ACK,ACK, _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
127 | _ALLOC2_SIGNAL_IN ( in_DCACHE_RSP_CONTEXT_ID,"context_id",Tcontext_t ,_param->_max_size_dcache_context_id, _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
128 | _ALLOC2_SIGNAL_IN ( in_DCACHE_RSP_PACKET_ID ,"packet_id" ,Tpacket_t ,_param->_max_size_dcache_packet_id , _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
129 | _ALLOC2_SIGNAL_IN ( in_DCACHE_RSP_RDATA ,"rdata" ,Tdcache_data_t ,_param->_size_general_data , _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
130 | _ALLOC2_SIGNAL_IN ( in_DCACHE_RSP_ERROR ,"error" ,Tdcache_error_t,_param->_size_dcache_error , _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
131 | |
---|
132 | ALLOC2_INTERFACE_END(_param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
133 | } |
---|
134 | |
---|
135 | // ~~~~~[ Interface "insert_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
136 | { |
---|
137 | ALLOC2_INTERFACE_BEGIN("insert_rob",IN, EAST, "Rename's stage : insert a new instruction in the Re Order Buffer",_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]); |
---|
138 | |
---|
139 | _ALLOC2_VALACK_IN ( in_INSERT_ROB_VAL,VAL,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]); |
---|
140 | _ALLOC2_VALACK_OUT(out_INSERT_ROB_ACK,ACK,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]); |
---|
141 | |
---|
142 | _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RD_USE ,"rd_use" ,Tcontrol_t ,1 ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]); |
---|
143 | _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RD_NUM_REG,"rd_num_reg",Tgeneral_address_t,_param->_size_general_register,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]); |
---|
144 | _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RE_USE ,"re_use" ,Tcontrol_t ,1 ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]); |
---|
145 | _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RE_NUM_REG,"re_num_reg",Tspecial_address_t,_param->_size_special_register,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]); |
---|
146 | |
---|
147 | ALLOC2_INTERFACE_END(_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]); |
---|
148 | } |
---|
149 | |
---|
150 | // // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
151 | // { |
---|
152 | // ALLOC2_INTERFACE("retire_rob",IN, EAST, "Rename's stage : retire a new instruction in the Re Order Buffer",_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]); |
---|
153 | |
---|
154 | // _ALLOC2_VALACK_IN ( in_RETIRE_ROB_VAL,VAL,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]); |
---|
155 | // _ALLOC2_VALACK_OUT(out_RETIRE_ROB_ACK,ACK,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]); |
---|
156 | |
---|
157 | // _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RD_OLD_USE ,"rd_old_use" ,Tcontrol_t ,1 ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]); |
---|
158 | // _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RD_OLD_NUM_REG,"rd_old_num_reg",Tgeneral_address_t,_param->_size_general_register,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]); |
---|
159 | // _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RD_NEW_USE ,"rd_new_use" ,Tcontrol_t ,1 ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]); |
---|
160 | // _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RD_NEW_NUM_REG,"rd_new_num_reg",Tgeneral_address_t,_param->_size_general_register,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]); |
---|
161 | // _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RE_OLD_USE ,"re_old_use" ,Tcontrol_t ,1 ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]); |
---|
162 | // _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RE_OLD_NUM_REG,"re_old_num_reg",Tspecial_address_t,_param->_size_special_register,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]); |
---|
163 | // _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RE_NEW_USE ,"re_new_use" ,Tcontrol_t ,1 ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]); |
---|
164 | // _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RE_NEW_NUM_REG,"re_new_num_reg",Tspecial_address_t,_param->_size_special_register,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]); |
---|
165 | // } |
---|
166 | |
---|
167 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
168 | std::string name; |
---|
169 | |
---|
170 | { |
---|
171 | name = _name+"_glue"; |
---|
172 | log_printf(INFO,Core,FUNCTION,_("Create : %s"),name.c_str()); |
---|
173 | |
---|
174 | _component_glue = new morpheo::behavioural::core::multi_execute_loop::execute_loop::execute_loop_glue::Execute_loop_Glue |
---|
175 | (name.c_str() |
---|
176 | #ifdef STATISTICS |
---|
177 | ,param_statistics |
---|
178 | #endif |
---|
179 | ,_param->_param_glue |
---|
180 | ,_usage); |
---|
181 | |
---|
182 | _component->set_component (_component_glue->_component |
---|
183 | #ifdef POSITION |
---|
184 | , 50, 50, 10, 10 |
---|
185 | #endif |
---|
186 | ); |
---|
187 | } |
---|
188 | |
---|
189 | _component_read_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::Read_unit * [_param->_nb_read_unit]; |
---|
190 | for (uint32_t i=0; i<_param->_nb_read_unit; i++) |
---|
191 | { |
---|
192 | name = _name+"_read_unit_"+toString(i); |
---|
193 | log_printf(INFO,Core,FUNCTION,_("Create : %s"),name.c_str()); |
---|
194 | |
---|
195 | _component_read_unit [i] = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::Read_unit |
---|
196 | (name.c_str() |
---|
197 | #ifdef STATISTICS |
---|
198 | ,param_statistics |
---|
199 | #endif |
---|
200 | ,_param->_param_read_unit[i] |
---|
201 | ,_usage); |
---|
202 | |
---|
203 | _component->set_component (_component_read_unit [i]->_component |
---|
204 | #ifdef POSITION |
---|
205 | , 50, 50, 10, 10 |
---|
206 | #endif |
---|
207 | ); |
---|
208 | } |
---|
209 | |
---|
210 | _component_functionnal_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::Functionnal_unit * [_param->_nb_functionnal_unit]; |
---|
211 | for (uint32_t i=0; i<_param->_nb_functionnal_unit; i++) |
---|
212 | { |
---|
213 | name = _name+"_functionnal_unit_"+toString(i); |
---|
214 | log_printf(INFO,Core,FUNCTION,_("Create : %s"),name.c_str()); |
---|
215 | |
---|
216 | _component_functionnal_unit [i] = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::Functionnal_unit |
---|
217 | (name.c_str() |
---|
218 | #ifdef STATISTICS |
---|
219 | ,param_statistics |
---|
220 | #endif |
---|
221 | ,_param->_param_functionnal_unit[i] |
---|
222 | ,_usage); |
---|
223 | |
---|
224 | _component->set_component (_component_functionnal_unit [i]->_component |
---|
225 | #ifdef POSITION |
---|
226 | , 50, 50, 10, 10 |
---|
227 | #endif |
---|
228 | ); |
---|
229 | } |
---|
230 | |
---|
231 | _component_load_store_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit * [_param->_nb_load_store_unit]; |
---|
232 | for (uint32_t i=0; i<_param->_nb_load_store_unit; i++) |
---|
233 | { |
---|
234 | name = _name+"_load_store_unit_"+toString(i); |
---|
235 | log_printf(INFO,Core,FUNCTION,_("Create : %s"),name.c_str()); |
---|
236 | |
---|
237 | _component_load_store_unit [i] = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit |
---|
238 | (name.c_str() |
---|
239 | #ifdef STATISTICS |
---|
240 | ,param_statistics |
---|
241 | #endif |
---|
242 | ,_param->_param_load_store_unit[i] |
---|
243 | ,_usage); |
---|
244 | |
---|
245 | _component->set_component (_component_load_store_unit [i]->_component |
---|
246 | #ifdef POSITION |
---|
247 | , 50, 50, 10, 10 |
---|
248 | #endif |
---|
249 | ); |
---|
250 | } |
---|
251 | |
---|
252 | _component_write_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::Write_unit * [_param->_nb_write_unit]; |
---|
253 | for (uint32_t i=0; i<_param->_nb_write_unit; i++) |
---|
254 | { |
---|
255 | name = _name+"_write_unit_"+toString(i); |
---|
256 | log_printf(INFO,Core,FUNCTION,_("Create : %s"),name.c_str()); |
---|
257 | |
---|
258 | _component_write_unit [i] = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::Write_unit |
---|
259 | (name.c_str() |
---|
260 | #ifdef STATISTICS |
---|
261 | ,param_statistics |
---|
262 | #endif |
---|
263 | ,_param->_param_write_unit[i] |
---|
264 | ,_usage); |
---|
265 | |
---|
266 | _component->set_component (_component_write_unit [i]->_component |
---|
267 | #ifdef POSITION |
---|
268 | , 50, 50, 10, 10 |
---|
269 | #endif |
---|
270 | ); |
---|
271 | } |
---|
272 | |
---|
273 | { |
---|
274 | name = _name+"_read_unit_to_execution_unit"; |
---|
275 | log_printf(INFO,Core,FUNCTION,_("Create : %s"),name.c_str()); |
---|
276 | |
---|
277 | _component_read_unit_to_execution_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::network::read_unit_to_execution_unit::Read_unit_to_Execution_unit |
---|
278 | (name.c_str() |
---|
279 | #ifdef STATISTICS |
---|
280 | ,param_statistics |
---|
281 | #endif |
---|
282 | ,_param->_param_read_unit_to_execution_unit |
---|
283 | ,_usage); |
---|
284 | |
---|
285 | _component->set_component (_component_read_unit_to_execution_unit->_component |
---|
286 | #ifdef POSITION |
---|
287 | , 50, 50, 10, 10 |
---|
288 | #endif |
---|
289 | ); |
---|
290 | } |
---|
291 | |
---|
292 | { |
---|
293 | name = _name+"_execution_unit_to_write_unit"; |
---|
294 | log_printf(INFO,Core,FUNCTION,_("Create : %s"),name.c_str()); |
---|
295 | |
---|
296 | _component_execution_unit_to_write_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::network::execution_unit_to_write_unit::Execution_unit_to_Write_unit |
---|
297 | (name.c_str() |
---|
298 | #ifdef STATISTICS |
---|
299 | ,param_statistics |
---|
300 | #endif |
---|
301 | ,_param->_param_execution_unit_to_write_unit |
---|
302 | ,_usage); |
---|
303 | |
---|
304 | _component->set_component (_component_execution_unit_to_write_unit->_component |
---|
305 | #ifdef POSITION |
---|
306 | , 50, 50, 10, 10 |
---|
307 | #endif |
---|
308 | ); |
---|
309 | } |
---|
310 | |
---|
311 | { |
---|
312 | name = _name+"_register_unit"; |
---|
313 | log_printf(INFO,Core,FUNCTION,_("Create : %s"),name.c_str()); |
---|
314 | |
---|
315 | _component_register_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::Register_unit |
---|
316 | (name.c_str() |
---|
317 | #ifdef STATISTICS |
---|
318 | ,param_statistics |
---|
319 | #endif |
---|
320 | ,_param->_param_register_unit |
---|
321 | ,_usage); |
---|
322 | |
---|
323 | _component->set_component (_component_register_unit->_component |
---|
324 | #ifdef POSITION |
---|
325 | , 50, 50, 10, 10 |
---|
326 | #endif |
---|
327 | ); |
---|
328 | } |
---|
329 | |
---|
330 | // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
331 | std::string src,dest; |
---|
332 | |
---|
333 | // =================================================================== |
---|
334 | // =====[ GLUE ]====================================================== |
---|
335 | // =================================================================== |
---|
336 | { |
---|
337 | src = _name+"_glue"; |
---|
338 | log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
339 | |
---|
340 | { |
---|
341 | dest = _name; |
---|
342 | #ifdef POSITION |
---|
343 | _component->interface_map (src ,"", |
---|
344 | dest,""); |
---|
345 | #endif |
---|
346 | PORT_MAP(_component ,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
347 | PORT_MAP(_component ,src , "in_NRESET",dest, "in_NRESET"); |
---|
348 | } |
---|
349 | |
---|
350 | for (uint32_t i=0; i<_param->_nb_gpr_write; i++) |
---|
351 | { |
---|
352 | { |
---|
353 | dest = _name+"_write_unit_"+toString(i); |
---|
354 | |
---|
355 | #ifdef POSITION |
---|
356 | _component->interface_map (src ,"gpr_write_write_unit_"+toString(i), |
---|
357 | dest,"gpr_write"); |
---|
358 | #endif |
---|
359 | |
---|
360 | // in_GPR_WRITE_WRITE_UNIT_VAL |
---|
361 | // out_GPR_WRITE_WRITE_UNIT_ACK |
---|
362 | // in_GPR_WRITE_WRITE_UNIT_OOO_ENGINE_ID |
---|
363 | // in_GPR_WRITE_WRITE_UNIT_NUM_REG |
---|
364 | // in_GPR_WRITE_WRITE_UNIT_DATA |
---|
365 | } |
---|
366 | |
---|
367 | { |
---|
368 | dest = _name+"_register_unit"; |
---|
369 | |
---|
370 | #ifdef POSITION |
---|
371 | _component->interface_map (src ,"gpr_write_register_file_"+toString(i), |
---|
372 | dest,"gpr_write_"+toString(i)); |
---|
373 | #endif |
---|
374 | // out_GPR_WRITE_REGISTER_FILE_VAL |
---|
375 | // in_GPR_WRITE_REGISTER_FILE_ACK |
---|
376 | // out_GPR_WRITE_REGISTER_FILE_OOO_ENGINE_ID |
---|
377 | // out_GPR_WRITE_REGISTER_FILE_NUM_REG |
---|
378 | // out_GPR_WRITE_REGISTER_FILE_DATA |
---|
379 | } |
---|
380 | |
---|
381 | { |
---|
382 | dest = _name+"_read_unit_0"; |
---|
383 | |
---|
384 | #ifdef POSITION |
---|
385 | _component->interface_map (src ,"gpr_write_read_unit_"+toString(i), |
---|
386 | dest,"gpr_write"); |
---|
387 | #endif |
---|
388 | |
---|
389 | // out_GPR_WRITE_READ_UNIT_VAL |
---|
390 | // out_GPR_WRITE_READ_UNIT_OOO_ENGINE_ID |
---|
391 | // out_GPR_WRITE_READ_UNIT_NUM_REG |
---|
392 | // out_GPR_WRITE_READ_UNIT_DATA |
---|
393 | } |
---|
394 | } |
---|
395 | |
---|
396 | for (uint32_t i=0; i<_param->_nb_spr_write; i++) |
---|
397 | { |
---|
398 | { |
---|
399 | dest = _name+"_write_unit_"+toString(i); |
---|
400 | |
---|
401 | #ifdef POSITION |
---|
402 | _component->interface_map (src ,"spr_write_write_unit_"+toString(i), |
---|
403 | dest,"spr_write"); |
---|
404 | #endif |
---|
405 | |
---|
406 | // in_SPR_WRITE_WRITE_UNIT_VAL |
---|
407 | // out_SPR_WRITE_WRITE_UNIT_ACK |
---|
408 | // in_SPR_WRITE_WRITE_UNIT_OOO_ENGINE_ID |
---|
409 | // in_SPR_WRITE_WRITE_UNIT_NUM_REG |
---|
410 | // in_SPR_WRITE_WRITE_UNIT_DATA |
---|
411 | } |
---|
412 | |
---|
413 | { |
---|
414 | dest = _name+"_register_unit"; |
---|
415 | |
---|
416 | #ifdef POSITION |
---|
417 | _component->interface_map (src ,"spr_write_register_file_"+toString(i), |
---|
418 | dest,"spr_write_"+toString(i)); |
---|
419 | #endif |
---|
420 | // out_SPR_WRITE_REGISTER_FILE_VAL |
---|
421 | // in_SPR_WRITE_REGISTER_FILE_ACK |
---|
422 | // out_SPR_WRITE_REGISTER_FILE_OOO_ENGINE_ID |
---|
423 | // out_SPR_WRITE_REGISTER_FILE_NUM_REG |
---|
424 | // out_SPR_WRITE_REGISTER_FILE_DATA |
---|
425 | } |
---|
426 | |
---|
427 | { |
---|
428 | dest = _name+"_read_unit_0"; |
---|
429 | |
---|
430 | #ifdef POSITION |
---|
431 | _component->interface_map (src ,"spr_write_read_unit_"+toString(i), |
---|
432 | dest,"spr_write"); |
---|
433 | #endif |
---|
434 | |
---|
435 | // out_SPR_WRITE_READ_UNIT_VAL |
---|
436 | // out_SPR_WRITE_READ_UNIT_OOO_ENGINE_ID |
---|
437 | // out_SPR_WRITE_READ_UNIT_NUM_REG |
---|
438 | // out_SPR_WRITE_READ_UNIT_DATA |
---|
439 | } |
---|
440 | } |
---|
441 | |
---|
442 | |
---|
443 | } |
---|
444 | |
---|
445 | // =================================================================== |
---|
446 | // =====[ READ_UNIT ]================================================= |
---|
447 | // =================================================================== |
---|
448 | { |
---|
449 | uint32_t it_read_unit_out = 0; |
---|
450 | |
---|
451 | for (uint32_t i=0; i<_param->_nb_read_unit; i++) |
---|
452 | { |
---|
453 | src = _name+"_read_unit_"+toString(i); |
---|
454 | log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
455 | |
---|
456 | { |
---|
457 | dest = _name; |
---|
458 | #ifdef POSITION |
---|
459 | _component->interface_map (src ,"", |
---|
460 | dest,""); |
---|
461 | #endif |
---|
462 | PORT_MAP(_component ,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
463 | PORT_MAP(_component ,src , "in_NRESET",dest, "in_NRESET"); |
---|
464 | } |
---|
465 | |
---|
466 | // ~~~~~[ Interface "read_unit_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
467 | { |
---|
468 | dest = _name; |
---|
469 | #ifdef POSITION |
---|
470 | _component->interface_map (src ,"read_unit_in", |
---|
471 | dest,"execute_loop_in_"+toString(i)); |
---|
472 | #endif |
---|
473 | |
---|
474 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_VAL" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_VAL" ); |
---|
475 | PORT_MAP(_component ,src ,"out_READ_UNIT_IN_ACK" ,dest ,"out_EXECUTE_LOOP_IN_"+toString(i)+"_ACK" ); |
---|
476 | if (_param->_have_port_context_id) |
---|
477 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_CONTEXT_ID" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_CONTEXT_ID" ); |
---|
478 | if (_param->_have_port_front_end_id) |
---|
479 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_FRONT_END_ID" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_FRONT_END_ID" ); |
---|
480 | if (_param->_have_port_ooo_engine_id) |
---|
481 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_OOO_ENGINE_ID" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_OOO_ENGINE_ID" ); |
---|
482 | if (_param->_have_port_rob_ptr ) |
---|
483 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_PACKET_ID" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_PACKET_ID" ); |
---|
484 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_OPERATION" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_OPERATION" ); |
---|
485 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_TYPE" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_TYPE" ); |
---|
486 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_STORE_QUEUE_PTR_WRITE",dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_STORE_QUEUE_PTR_WRITE"); |
---|
487 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_STORE_QUEUE_PTR_READ" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_STORE_QUEUE_PTR_READ" ); |
---|
488 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_STORE_QUEUE_EMPTY" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_STORE_QUEUE_EMPTY" ); |
---|
489 | if (_param->_have_port_load_queue_ptr) |
---|
490 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_LOAD_QUEUE_PTR_WRITE" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" ); |
---|
491 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_HAS_IMMEDIAT" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_HAS_IMMEDIAT" ); |
---|
492 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_IMMEDIAT" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_IMMEDIAT" ); |
---|
493 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_READ_RA" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_READ_RA" ); |
---|
494 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_NUM_REG_RA" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_NUM_REG_RA" ); |
---|
495 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_READ_RB" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_READ_RB" ); |
---|
496 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_NUM_REG_RB" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_NUM_REG_RB" ); |
---|
497 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_READ_RC" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_READ_RC" ); |
---|
498 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_NUM_REG_RC" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_NUM_REG_RC" ); |
---|
499 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_WRITE_RD" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_WRITE_RD" ); |
---|
500 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_NUM_REG_RD" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_NUM_REG_RD" ); |
---|
501 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_WRITE_RE" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_WRITE_RE" ); |
---|
502 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_NUM_REG_RE" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_NUM_REG_RE" ); |
---|
503 | } |
---|
504 | |
---|
505 | // ~~~~~[ Interface "read_unit_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
506 | for (uint32_t j=0; j < _param->_nb_inst_retire[i]; j++) |
---|
507 | { |
---|
508 | dest = _name+"_read_unit_to_execution_unit"; |
---|
509 | |
---|
510 | #ifdef POSITION |
---|
511 | _component->interface_map (src ,"read_unit_"+toString(j), |
---|
512 | dest,"read_unit_"+toString(it_read_unit_out)); |
---|
513 | #endif |
---|
514 | |
---|
515 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_VAL" , |
---|
516 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_VAL" ); |
---|
517 | COMPONENT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(j )+"_ACK" , |
---|
518 | dest,"out_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_ACK" ); |
---|
519 | if (_param->_have_port_context_id) |
---|
520 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_CONTEXT_ID" , |
---|
521 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_CONTEXT_ID" ); |
---|
522 | if (_param->_have_port_front_end_id) |
---|
523 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_FRONT_END_ID" , |
---|
524 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_FRONT_END_ID" ); |
---|
525 | if (_param->_have_port_ooo_engine_id) |
---|
526 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_OOO_ENGINE_ID" , |
---|
527 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_OOO_ENGINE_ID" ); |
---|
528 | if (_param->_have_port_rob_ptr ) |
---|
529 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_PACKET_ID" , |
---|
530 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_PACKET_ID" ); |
---|
531 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_OPERATION" , |
---|
532 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_OPERATION" ); |
---|
533 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_TYPE" , |
---|
534 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_TYPE" ); |
---|
535 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_STORE_QUEUE_PTR_WRITE", |
---|
536 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_STORE_QUEUE_PTR_WRITE"); |
---|
537 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_STORE_QUEUE_PTR_READ" , |
---|
538 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_STORE_QUEUE_PTR_READ" ); |
---|
539 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_STORE_QUEUE_EMPTY" , |
---|
540 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_STORE_QUEUE_EMPTY" ); |
---|
541 | if (_param->_have_port_load_queue_ptr) |
---|
542 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_LOAD_QUEUE_PTR_WRITE" , |
---|
543 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_LOAD_QUEUE_PTR_WRITE" ); |
---|
544 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_HAS_IMMEDIAT" , |
---|
545 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_HAS_IMMEDIAT" ); |
---|
546 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_IMMEDIAT" , |
---|
547 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_IMMEDIAT" ); |
---|
548 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_DATA_RA" , |
---|
549 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_DATA_RA" ); |
---|
550 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_DATA_RB" , |
---|
551 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_DATA_RB" ); |
---|
552 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_DATA_RC" , |
---|
553 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_DATA_RC" ); |
---|
554 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_WRITE_RD" , |
---|
555 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_WRITE_RD" ); |
---|
556 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_NUM_REG_RD" , |
---|
557 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_NUM_REG_RD" ); |
---|
558 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_WRITE_RE" , |
---|
559 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_WRITE_RE" ); |
---|
560 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_NUM_REG_RE" , |
---|
561 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_NUM_REG_RE" ); |
---|
562 | |
---|
563 | } |
---|
564 | it_read_unit_out ++; |
---|
565 | |
---|
566 | // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
567 | { |
---|
568 | dest = _name+"_register_unit"; |
---|
569 | #ifdef POSITION |
---|
570 | _component->interface_map (src ,"gpr_read_0", |
---|
571 | dest,"gpr_read_"+toString(2*i )); |
---|
572 | _component->interface_map (src ,"gpr_read_1", |
---|
573 | dest,"gpr_read_"+toString(2*i+1)); |
---|
574 | #endif |
---|
575 | COMPONENT_MAP(_component ,src ,"out_GPR_READ_0_VAL" , dest, "in_GPR_READ_"+toString(2*i )+"_VAL" ); |
---|
576 | COMPONENT_MAP(_component ,src , "in_GPR_READ_0_ACK" , dest,"out_GPR_READ_"+toString(2*i )+"_ACK" ); |
---|
577 | if (_param->_have_port_ooo_engine_id) |
---|
578 | COMPONENT_MAP(_component ,src ,"out_GPR_READ_0_OOO_ENGINE_ID", dest, "in_GPR_READ_"+toString(2*i )+"_OOO_ENGINE_ID"); |
---|
579 | COMPONENT_MAP(_component ,src ,"out_GPR_READ_0_NUM_REG" , dest, "in_GPR_READ_"+toString(2*i )+"_NUM_REG" ); |
---|
580 | COMPONENT_MAP(_component ,src , "in_GPR_READ_0_DATA" , dest,"out_GPR_READ_"+toString(2*i )+"_DATA" ); |
---|
581 | COMPONENT_MAP(_component ,src , "in_GPR_READ_0_DATA_VAL" , dest,"out_GPR_READ_"+toString(2*i )+"_DATA_VAL" ); |
---|
582 | COMPONENT_MAP(_component ,src ,"out_GPR_READ_1_VAL" , dest, "in_GPR_READ_"+toString(2*i+1)+"_VAL" ); |
---|
583 | COMPONENT_MAP(_component ,src , "in_GPR_READ_1_ACK" , dest,"out_GPR_READ_"+toString(2*i+1)+"_ACK" ); |
---|
584 | if (_param->_have_port_ooo_engine_id) |
---|
585 | COMPONENT_MAP(_component ,src ,"out_GPR_READ_1_OOO_ENGINE_ID", dest, "in_GPR_READ_"+toString(2*i+1)+"_OOO_ENGINE_ID"); |
---|
586 | COMPONENT_MAP(_component ,src ,"out_GPR_READ_1_NUM_REG" , dest, "in_GPR_READ_"+toString(2*i+1)+"_NUM_REG" ); |
---|
587 | COMPONENT_MAP(_component ,src , "in_GPR_READ_1_DATA" , dest,"out_GPR_READ_"+toString(2*i+1)+"_DATA" ); |
---|
588 | COMPONENT_MAP(_component ,src , "in_GPR_READ_1_DATA_VAL" , dest,"out_GPR_READ_"+toString(2*i+1)+"_DATA_VAL" ); |
---|
589 | } |
---|
590 | |
---|
591 | // ~~~~~[ Interface "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
592 | { |
---|
593 | dest = _name+"_register_unit"; |
---|
594 | #ifdef POSITION |
---|
595 | _component->interface_map (src ,"spr_read_0", |
---|
596 | dest,"spr_read_"+toString(i)); |
---|
597 | #endif |
---|
598 | COMPONENT_MAP(_component ,src ,"out_SPR_READ_0_VAL" , dest, "in_SPR_READ_"+toString(i)+"_VAL" ); |
---|
599 | COMPONENT_MAP(_component ,src , "in_SPR_READ_0_ACK" , dest,"out_SPR_READ_"+toString(i)+"_ACK" ); |
---|
600 | if (_param->_have_port_ooo_engine_id) |
---|
601 | COMPONENT_MAP(_component ,src ,"out_SPR_READ_0_OOO_ENGINE_ID", dest, "in_SPR_READ_"+toString(i)+"_OOO_ENGINE_ID"); |
---|
602 | COMPONENT_MAP(_component ,src ,"out_SPR_READ_0_NUM_REG" , dest, "in_SPR_READ_"+toString(i)+"_NUM_REG" ); |
---|
603 | COMPONENT_MAP(_component ,src , "in_SPR_READ_0_DATA" , dest,"out_SPR_READ_"+toString(i)+"_DATA" ); |
---|
604 | COMPONENT_MAP(_component ,src , "in_SPR_READ_0_DATA_VAL" , dest,"out_SPR_READ_"+toString(i)+"_DATA_VAL" ); |
---|
605 | } |
---|
606 | |
---|
607 | // ~~~~~[ Interface "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
608 | uint32_t it_gpr_write = 0; |
---|
609 | for (std::set<uint32_t>::iterator it=_param->_set_read_unit_source_register_write[i].begin(); |
---|
610 | it!=_param->_set_read_unit_source_register_write[i].end(); |
---|
611 | it++) |
---|
612 | { |
---|
613 | uint32_t num_port = (*it); |
---|
614 | |
---|
615 | dest = _name+"_glue"; |
---|
616 | #ifdef POSITION |
---|
617 | _component->interface_map (src ,"gpr_write_"+toString(it_gpr_write), |
---|
618 | dest,"gpr_write_read_unit_"+toString(num_port)); |
---|
619 | #endif |
---|
620 | |
---|
621 | COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(it_gpr_write)+"_VAL" , |
---|
622 | dest,"out_GPR_WRITE_READ_UNIT_"+toString(num_port)+"_VAL" ); |
---|
623 | if (_param->_have_port_ooo_engine_id) |
---|
624 | COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(it_gpr_write)+"_OOO_ENGINE_ID", |
---|
625 | dest,"out_GPR_WRITE_READ_UNIT_"+toString(num_port)+"_OOO_ENGINE_ID"); |
---|
626 | COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(it_gpr_write)+"_NUM_REG" , |
---|
627 | dest,"out_GPR_WRITE_READ_UNIT_"+toString(num_port)+"_NUM_REG" ); |
---|
628 | COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(it_gpr_write)+"_DATA" , |
---|
629 | dest,"out_GPR_WRITE_READ_UNIT_"+toString(num_port)+"_DATA" ); |
---|
630 | |
---|
631 | it_gpr_write ++; |
---|
632 | } |
---|
633 | |
---|
634 | // ~~~~~[ Interface "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
635 | uint32_t it_spr_write = 0; |
---|
636 | for (std::set<uint32_t>::iterator it=_param->_set_read_unit_source_register_write[i].begin(); |
---|
637 | it!=_param->_set_read_unit_source_register_write[i].end(); |
---|
638 | it++) |
---|
639 | { |
---|
640 | uint32_t num_port = (*it); |
---|
641 | |
---|
642 | dest = _name+"_glue"; |
---|
643 | #ifdef POSITION |
---|
644 | _component->interface_map (src ,"spr_write_"+toString(it_spr_write), |
---|
645 | dest,"spr_write_read_unit_"+toString(num_port)); |
---|
646 | #endif |
---|
647 | |
---|
648 | COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(it_spr_write)+"_VAL" , |
---|
649 | dest,"out_SPR_WRITE_READ_UNIT_"+toString(num_port)+"_VAL" ); |
---|
650 | |
---|
651 | if (_param->_have_port_ooo_engine_id) |
---|
652 | COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(it_spr_write)+"_OOO_ENGINE_ID", |
---|
653 | dest,"out_SPR_WRITE_READ_UNIT_"+toString(num_port)+"_OOO_ENGINE_ID"); |
---|
654 | COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(it_spr_write)+"_NUM_REG" , |
---|
655 | dest,"out_SPR_WRITE_READ_UNIT_"+toString(num_port)+"_NUM_REG" ); |
---|
656 | COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(it_spr_write)+"_DATA" , |
---|
657 | dest,"out_SPR_WRITE_READ_UNIT_"+toString(num_port)+"_DATA" ); |
---|
658 | |
---|
659 | it_spr_write ++; |
---|
660 | } |
---|
661 | |
---|
662 | // ~~~~~[ Interface "bypass_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
663 | uint32_t it_bypass_write = 0; |
---|
664 | for (std::set<uint32_t>::iterator it=_param->_set_read_unit_source_bypass_write[i].begin(); |
---|
665 | it!=_param->_set_read_unit_source_bypass_write[i].end(); |
---|
666 | it++) |
---|
667 | { |
---|
668 | dest = _name+"_write_unit_"+toString(*it); |
---|
669 | |
---|
670 | for (uint32_t j=0; j<_param->_nb_bypass_write[*it]; j++) |
---|
671 | { |
---|
672 | #ifdef POSITION |
---|
673 | _component->interface_map (src ,"bypass_write_"+toString(it_bypass_write), |
---|
674 | dest,"bypass_write_"+toString(j)); |
---|
675 | #endif |
---|
676 | |
---|
677 | if (_param->_have_port_ooo_engine_id) |
---|
678 | COMPONENT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_OOO_ENGINE_ID", |
---|
679 | dest,"out_BYPASS_WRITE_"+toString(j )+"_OOO_ENGINE_ID"); |
---|
680 | COMPONENT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_VAL" , |
---|
681 | dest,"out_BYPASS_WRITE_"+toString(j )+"_GPR_VAL" ); |
---|
682 | COMPONENT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_NUM_REG" , |
---|
683 | dest,"out_BYPASS_WRITE_"+toString(j )+"_GPR_NUM_REG" ); |
---|
684 | COMPONENT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_DATA" , |
---|
685 | dest,"out_BYPASS_WRITE_"+toString(j )+"_GPR_DATA" ); |
---|
686 | COMPONENT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_VAL" , |
---|
687 | dest,"out_BYPASS_WRITE_"+toString(j )+"_SPR_VAL" ); |
---|
688 | COMPONENT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_NUM_REG" , |
---|
689 | dest,"out_BYPASS_WRITE_"+toString(j )+"_SPR_NUM_REG" ); |
---|
690 | COMPONENT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_DATA" , |
---|
691 | dest,"out_BYPASS_WRITE_"+toString(j )+"_SPR_DATA" ); |
---|
692 | |
---|
693 | #ifdef POSITION |
---|
694 | _component->interface_map (dest,"bypass_write_"+toString(j), |
---|
695 | src ,"bypass_write_"+toString(it_bypass_write)); |
---|
696 | #endif |
---|
697 | |
---|
698 | // if (_param->_have_port_ooo_engine_id) |
---|
699 | // PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j )+"_OOO_ENGINE_ID", |
---|
700 | // src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_OOO_ENGINE_ID"); |
---|
701 | // PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j )+"_GPR_VAL" , |
---|
702 | // src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_VAL" ); |
---|
703 | // PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j )+"_GPR_NUM_REG" , |
---|
704 | // src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_NUM_REG" ); |
---|
705 | // PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j )+"_GPR_DATA" , |
---|
706 | // src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_DATA" ); |
---|
707 | // PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j )+"_SPR_VAL" , |
---|
708 | // src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_VAL" ); |
---|
709 | // PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j )+"_SPR_NUM_REG" , |
---|
710 | // src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_NUM_REG" ); |
---|
711 | // PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j )+"_SPR_DATA" , |
---|
712 | // src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_DATA" ); |
---|
713 | |
---|
714 | it_bypass_write ++; |
---|
715 | } |
---|
716 | } |
---|
717 | |
---|
718 | // ~~~~~[ Interface "bypass_memory" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
719 | uint32_t it_bypass_memory = 0; |
---|
720 | for (std::set<uint32_t>::iterator it=_param->_set_read_unit_source_bypass_memory[i].begin(); |
---|
721 | it!=_param->_set_read_unit_source_bypass_memory[i].end(); |
---|
722 | it++) |
---|
723 | { |
---|
724 | dest = _name+"_load_store_unit_"+toString(_param->_translate_num_execute_unit[*it]); |
---|
725 | |
---|
726 | for (uint32_t j=0; j<_param->_nb_bypass_memory[_param->_translate_num_execute_unit[*it]]; j++) |
---|
727 | { |
---|
728 | #ifdef POSITION |
---|
729 | _component->interface_map (src ,"bypass_memory_"+toString(it_bypass_memory), |
---|
730 | dest,"bypass_memory_"+toString(j)); |
---|
731 | #endif |
---|
732 | |
---|
733 | if (_param->_have_port_ooo_engine_id) |
---|
734 | COMPONENT_MAP(_component ,src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_OOO_ENGINE_ID", |
---|
735 | dest,"out_BYPASS_MEMORY_"+toString(j )+"_OOO_ENGINE_ID"); |
---|
736 | COMPONENT_MAP(_component ,src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_VAL" , |
---|
737 | dest,"out_BYPASS_MEMORY_"+toString(j )+"_VAL" ); |
---|
738 | COMPONENT_MAP(_component ,src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_NUM_REG" , |
---|
739 | dest,"out_BYPASS_MEMORY_"+toString(j )+"_NUM_REG" ); |
---|
740 | COMPONENT_MAP(_component ,src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_DATA" , |
---|
741 | dest,"out_BYPASS_MEMORY_"+toString(j )+"_DATA" ); |
---|
742 | |
---|
743 | // port map to the "load_store_unit" component |
---|
744 | #ifdef POSITION |
---|
745 | _component->interface_map (dest,"bypass_memory_"+toString(j), |
---|
746 | src ,"bypass_memory_"+toString(it_bypass_memory)); |
---|
747 | #endif |
---|
748 | |
---|
749 | // if (_param->_have_port_ooo_engine_id) |
---|
750 | // PORT_MAP(_component ,dest,"out_BYPASS_MEMORY_"+toString(j )+"_OOO_ENGINE_ID", |
---|
751 | // src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_OOO_ENGINE_ID"); |
---|
752 | // PORT_MAP(_component ,dest,"out_BYPASS_MEMORY_"+toString(j )+"_VAL" , |
---|
753 | // src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_VAL" ); |
---|
754 | // PORT_MAP(_component ,dest,"out_BYPASS_MEMORY_"+toString(j )+"_NUM_REG" , |
---|
755 | // src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_NUM_REG" ); |
---|
756 | // PORT_MAP(_component ,dest,"out_BYPASS_MEMORY_"+toString(j )+"_DATA" , |
---|
757 | // src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_DATA" ); |
---|
758 | |
---|
759 | it_bypass_memory ++; |
---|
760 | } |
---|
761 | } |
---|
762 | } |
---|
763 | } |
---|
764 | |
---|
765 | // =================================================================== |
---|
766 | // =====[ EXECUTE_UNIT ]============================================== |
---|
767 | // =================================================================== |
---|
768 | for (uint32_t i=0; i<_param->_nb_execute_unit; i++) |
---|
769 | { |
---|
770 | uint32_t x=_param->_translate_num_execute_unit[i]; |
---|
771 | |
---|
772 | if (_param->_is_load_store_unit[i] == false) |
---|
773 | { |
---|
774 | // =================================================================== |
---|
775 | // =====[ FUNCTIONNAL_UNIT ]========================================== |
---|
776 | // =================================================================== |
---|
777 | |
---|
778 | src = _name+"_functionnal_unit_"+toString(x); |
---|
779 | log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
780 | |
---|
781 | { |
---|
782 | dest = _name; |
---|
783 | #ifdef POSITION |
---|
784 | _component->interface_map (src ,"", |
---|
785 | dest,""); |
---|
786 | #endif |
---|
787 | PORT_MAP(_component ,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
788 | PORT_MAP(_component ,src , "in_NRESET",dest, "in_NRESET"); |
---|
789 | } |
---|
790 | |
---|
791 | // ~~~~~[ Interface "execute_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
792 | { |
---|
793 | dest = _name+"_read_unit_to_execution_unit"; |
---|
794 | |
---|
795 | #ifdef POSITION |
---|
796 | _component->interface_map (src ,"execute_in", |
---|
797 | dest,"execute_unit_in_"+toString(i)+"_0"); |
---|
798 | #endif |
---|
799 | |
---|
800 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_VAL" , |
---|
801 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_VAL" ); |
---|
802 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_IN_ACK" , |
---|
803 | dest, "in_EXECUTE_UNIT_IN_"+toString(i)+"_0_ACK" ); |
---|
804 | if (_param->_have_port_context_id) |
---|
805 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_CONTEXT_ID" , |
---|
806 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_CONTEXT_ID" ); |
---|
807 | if (_param->_have_port_front_end_id) |
---|
808 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_FRONT_END_ID" , |
---|
809 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_FRONT_END_ID" ); |
---|
810 | if (_param->_have_port_ooo_engine_id) |
---|
811 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_OOO_ENGINE_ID" , |
---|
812 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_OOO_ENGINE_ID" ); |
---|
813 | if (_param->_have_port_rob_ptr ) |
---|
814 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_PACKET_ID" , |
---|
815 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_PACKET_ID" ); |
---|
816 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_OPERATION" , |
---|
817 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_OPERATION" ); |
---|
818 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_TYPE" , |
---|
819 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_TYPE" ); |
---|
820 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE", |
---|
821 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_STORE_QUEUE_PTR_WRITE"); |
---|
822 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_STORE_QUEUE_PTR_READ" , |
---|
823 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_STORE_QUEUE_PTR_READ" ); |
---|
824 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_STORE_QUEUE_EMPTY" , |
---|
825 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_STORE_QUEUE_EMPTY" ); |
---|
826 | if (_param->_have_port_load_queue_ptr) |
---|
827 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE" , |
---|
828 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_LOAD_QUEUE_PTR_WRITE" ); |
---|
829 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_HAS_IMMEDIAT" , |
---|
830 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_HAS_IMMEDIAT" ); |
---|
831 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_IMMEDIAT" , |
---|
832 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_IMMEDIAT" ); |
---|
833 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_DATA_RA" , |
---|
834 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_DATA_RA" ); |
---|
835 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_DATA_RB" , |
---|
836 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_DATA_RB" ); |
---|
837 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_DATA_RC" , |
---|
838 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_DATA_RC" ); |
---|
839 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_WRITE_RD" , |
---|
840 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_WRITE_RD" ); |
---|
841 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_NUM_REG_RD" , |
---|
842 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_NUM_REG_RD" ); |
---|
843 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_WRITE_RE" , |
---|
844 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_WRITE_RE" ); |
---|
845 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_NUM_REG_RE" , |
---|
846 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_NUM_REG_RE" ); |
---|
847 | } |
---|
848 | |
---|
849 | // ~~~~~[ Interface "execute_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
850 | { |
---|
851 | dest = _name+"_execution_unit_to_write_unit"; |
---|
852 | |
---|
853 | #ifdef POSITION |
---|
854 | _component->interface_map (src ,"execute_out", |
---|
855 | dest,"execute_unit_out_"+toString(i)+"_0"); |
---|
856 | #endif |
---|
857 | |
---|
858 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_VAL" , |
---|
859 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_VAL" ); |
---|
860 | COMPONENT_MAP(_component ,src , "in_EXECUTE_OUT_ACK" , |
---|
861 | dest,"out_EXECUTE_UNIT_OUT_"+toString(i)+"_0_ACK" ); |
---|
862 | if (_param->_have_port_context_id) |
---|
863 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_CONTEXT_ID" , |
---|
864 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_CONTEXT_ID" ); |
---|
865 | if (_param->_have_port_front_end_id) |
---|
866 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_FRONT_END_ID" , |
---|
867 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_FRONT_END_ID" ); |
---|
868 | if (_param->_have_port_ooo_engine_id) |
---|
869 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_OOO_ENGINE_ID", |
---|
870 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_OOO_ENGINE_ID"); |
---|
871 | if (_param->_have_port_rob_ptr ) |
---|
872 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_PACKET_ID" , |
---|
873 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_PACKET_ID" ); |
---|
874 | // COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_OPERATION" , |
---|
875 | // dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_OPERATION" ); |
---|
876 | // COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_TYPE" , |
---|
877 | // dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_TYPE" ); |
---|
878 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_WRITE_RD" , |
---|
879 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_WRITE_RD" ); |
---|
880 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_NUM_REG_RD" , |
---|
881 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_NUM_REG_RD" ); |
---|
882 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_DATA_RD" , |
---|
883 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_DATA_RD" ); |
---|
884 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_WRITE_RE" , |
---|
885 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_WRITE_RE" ); |
---|
886 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_NUM_REG_RE" , |
---|
887 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_NUM_REG_RE" ); |
---|
888 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_DATA_RE" , |
---|
889 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_DATA_RE" ); |
---|
890 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_EXCEPTION" , |
---|
891 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_EXCEPTION" ); |
---|
892 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_NO_SEQUENCE" , |
---|
893 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_NO_SEQUENCE" ); |
---|
894 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_ADDRESS" , |
---|
895 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_ADDRESS" ); |
---|
896 | } |
---|
897 | } |
---|
898 | else |
---|
899 | { |
---|
900 | // =================================================================== |
---|
901 | // =====[ LOAD_STORE_UNIT ]=========================================== |
---|
902 | // =================================================================== |
---|
903 | |
---|
904 | src = _name+"_load_store_unit_"+toString(x); |
---|
905 | log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
906 | |
---|
907 | // ~~~~~[ Interface "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
908 | { |
---|
909 | dest = _name; |
---|
910 | #ifdef POSITION |
---|
911 | _component->interface_map (src ,"", |
---|
912 | dest,""); |
---|
913 | #endif |
---|
914 | PORT_MAP(_component ,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
915 | PORT_MAP(_component ,src , "in_NRESET",dest, "in_NRESET"); |
---|
916 | } |
---|
917 | |
---|
918 | // ~~~~~[ Interface "memory_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
919 | for (uint32_t j=0; j<_param->_nb_inst_memory [x]; j++) |
---|
920 | { |
---|
921 | dest = _name+"_read_unit_to_execution_unit"; |
---|
922 | |
---|
923 | #ifdef POSITION |
---|
924 | _component->interface_map (src ,"memory_in_"+toString(j), |
---|
925 | dest,"execute_unit_in_"+toString(i)+"_"+toString(j)); |
---|
926 | #endif |
---|
927 | |
---|
928 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_VAL" , |
---|
929 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_VAL" ); |
---|
930 | COMPONENT_MAP(_component ,src ,"out_MEMORY_IN_"+toString(j)+"_ACK" , |
---|
931 | dest, "in_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_ACK" ); |
---|
932 | if (_param->_have_port_context_id) |
---|
933 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_CONTEXT_ID" , |
---|
934 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID" ); |
---|
935 | if (_param->_have_port_front_end_id) |
---|
936 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_FRONT_END_ID" , |
---|
937 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID" ); |
---|
938 | if (_param->_have_port_ooo_engine_id) |
---|
939 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_OOO_ENGINE_ID" , |
---|
940 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_OOO_ENGINE_ID" ); |
---|
941 | if (_param->_have_port_rob_ptr ) |
---|
942 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_PACKET_ID" , |
---|
943 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_PACKET_ID" ); |
---|
944 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_OPERATION" , |
---|
945 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_OPERATION" ); |
---|
946 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_TYPE" , |
---|
947 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_TYPE" ); |
---|
948 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_STORE_QUEUE_PTR_WRITE", |
---|
949 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_STORE_QUEUE_PTR_WRITE"); |
---|
950 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_STORE_QUEUE_PTR_READ", |
---|
951 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_STORE_QUEUE_PTR_READ" ); |
---|
952 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_STORE_QUEUE_EMPTY" , |
---|
953 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_STORE_QUEUE_EMPTY" ); |
---|
954 | if (_param->_have_port_load_queue_ptr) |
---|
955 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_LOAD_QUEUE_PTR_WRITE" , |
---|
956 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_LOAD_QUEUE_PTR_WRITE" ); |
---|
957 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_HAS_IMMEDIAT" , |
---|
958 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_HAS_IMMEDIAT" ); |
---|
959 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_IMMEDIAT" , |
---|
960 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_IMMEDIAT" ); |
---|
961 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_DATA_RA" , |
---|
962 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_DATA_RA" ); |
---|
963 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_DATA_RB" , |
---|
964 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_DATA_RB" ); |
---|
965 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_DATA_RC" , |
---|
966 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_DATA_RC" ); |
---|
967 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_WRITE_RD" , |
---|
968 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_WRITE_RD" ); |
---|
969 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_NUM_REG_RD" , |
---|
970 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RD" ); |
---|
971 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_WRITE_RE" , |
---|
972 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_WRITE_RE" ); |
---|
973 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_NUM_REG_RE" , |
---|
974 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RE" ); |
---|
975 | } |
---|
976 | |
---|
977 | // ~~~~~[ Interface "memory_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
978 | for (uint32_t j=0; j<_param->_nb_inst_memory [x]; j++) |
---|
979 | { |
---|
980 | dest = _name+"_execution_unit_to_write_unit"; |
---|
981 | |
---|
982 | #ifdef POSITION |
---|
983 | _component->interface_map (src ,"memory_out_"+toString(j) |
---|
984 | dest,"execute_unit_out_"+toString(i)+"_"+toString(j)); |
---|
985 | #endif |
---|
986 | |
---|
987 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_VAL" , |
---|
988 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_VAL" ); |
---|
989 | COMPONENT_MAP(_component ,src , "in_MEMORY_OUT_"+toString(j)+"_ACK" , |
---|
990 | dest,"out_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_ACK" ); |
---|
991 | if (_param->_have_port_context_id) |
---|
992 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_CONTEXT_ID" , |
---|
993 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID" ); |
---|
994 | if (_param->_have_port_front_end_id) |
---|
995 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_FRONT_END_ID" , |
---|
996 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID" ); |
---|
997 | if (_param->_have_port_ooo_engine_id) |
---|
998 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_OOO_ENGINE_ID", |
---|
999 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_OOO_ENGINE_ID"); |
---|
1000 | if (_param->_have_port_rob_ptr ) |
---|
1001 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_PACKET_ID" , |
---|
1002 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_PACKET_ID" ); |
---|
1003 | // COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_OPERATION" , |
---|
1004 | // dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_OPERATION" ); |
---|
1005 | // COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_TYPE" , |
---|
1006 | // dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_TYPE" ); |
---|
1007 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_WRITE_RD" , |
---|
1008 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_WRITE_RD" ); |
---|
1009 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_NUM_REG_RD" , |
---|
1010 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_NUM_REG_RD" ); |
---|
1011 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_DATA_RD" , |
---|
1012 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_DATA_RD" ); |
---|
1013 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_WRITE_RE" , |
---|
1014 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_WRITE_RE" ); |
---|
1015 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_NUM_REG_RE" , |
---|
1016 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_NUM_REG_RE" ); |
---|
1017 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_DATA_RE" , |
---|
1018 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_DATA_RE" ); |
---|
1019 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_EXCEPTION" , |
---|
1020 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_EXCEPTION" ); |
---|
1021 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_NO_SEQUENCE" , |
---|
1022 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_NO_SEQUENCE" ); |
---|
1023 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_ADDRESS" , |
---|
1024 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_ADDRESS" ); |
---|
1025 | } |
---|
1026 | |
---|
1027 | // ~~~~~[ Interface "dcache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1028 | for (uint32_t j=0; j<_param->_nb_cache_port [x]; j++) |
---|
1029 | { |
---|
1030 | dest = _name; |
---|
1031 | |
---|
1032 | #ifdef POSITION |
---|
1033 | _component->interface_map (src ,"dcache_req_"+toString(j), |
---|
1034 | dest,"dcache_req_"+toString(x)+"_"+toString(j)); |
---|
1035 | #endif |
---|
1036 | PORT_MAP(_component ,src ,"out_DCACHE_REQ_"+toString(j)+"_VAL" ,dest,"out_DCACHE_REQ_"+toString(x)+"_"+toString(j)+"_VAL" ); |
---|
1037 | PORT_MAP(_component ,src , "in_DCACHE_REQ_"+toString(j)+"_ACK" ,dest, "in_DCACHE_REQ_"+toString(x)+"_"+toString(j)+"_ACK" ); |
---|
1038 | if (_param->_have_port_dcache_context_id) |
---|
1039 | PORT_MAP(_component ,src ,"out_DCACHE_REQ_"+toString(j)+"_CONTEXT_ID",dest,"out_DCACHE_REQ_"+toString(x)+"_"+toString(j)+"_CONTEXT_ID"); |
---|
1040 | PORT_MAP(_component ,src ,"out_DCACHE_REQ_"+toString(j)+"_PACKET_ID" ,dest,"out_DCACHE_REQ_"+toString(x)+"_"+toString(j)+"_PACKET_ID" ); |
---|
1041 | PORT_MAP(_component ,src ,"out_DCACHE_REQ_"+toString(j)+"_ADDRESS" ,dest,"out_DCACHE_REQ_"+toString(x)+"_"+toString(j)+"_ADDRESS" ); |
---|
1042 | PORT_MAP(_component ,src ,"out_DCACHE_REQ_"+toString(j)+"_TYPE" ,dest,"out_DCACHE_REQ_"+toString(x)+"_"+toString(j)+"_TYPE" ); |
---|
1043 | PORT_MAP(_component ,src ,"out_DCACHE_REQ_"+toString(j)+"_WDATA" ,dest,"out_DCACHE_REQ_"+toString(x)+"_"+toString(j)+"_WDATA" ); |
---|
1044 | } |
---|
1045 | |
---|
1046 | // ~~~~~[ Interface "dcache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1047 | for (uint32_t j=0; j<_param->_nb_cache_port [x]; j++) |
---|
1048 | { |
---|
1049 | dest = _name; |
---|
1050 | |
---|
1051 | #ifdef POSITION |
---|
1052 | _component->interface_map (src ,"dcache_rsp_"+toString(j), |
---|
1053 | dest,"dcache_rsp_"+toString(x)+"_"+toString(j)); |
---|
1054 | #endif |
---|
1055 | PORT_MAP(_component ,src , "in_DCACHE_RSP_"+toString(j)+"_VAL" ,dest, "in_DCACHE_RSP_"+toString(x)+"_"+toString(j)+"_VAL" ); |
---|
1056 | PORT_MAP(_component ,src ,"out_DCACHE_RSP_"+toString(j)+"_ACK" ,dest,"out_DCACHE_RSP_"+toString(x)+"_"+toString(j)+"_ACK" ); |
---|
1057 | if (_param->_have_port_dcache_context_id) |
---|
1058 | PORT_MAP(_component ,src , "in_DCACHE_RSP_"+toString(j)+"_CONTEXT_ID",dest, "in_DCACHE_RSP_"+toString(x)+"_"+toString(j)+"_CONTEXT_ID"); |
---|
1059 | PORT_MAP(_component ,src , "in_DCACHE_RSP_"+toString(j)+"_PACKET_ID" ,dest, "in_DCACHE_RSP_"+toString(x)+"_"+toString(j)+"_PACKET_ID" ); |
---|
1060 | PORT_MAP(_component ,src , "in_DCACHE_RSP_"+toString(j)+"_RDATA" ,dest, "in_DCACHE_RSP_"+toString(x)+"_"+toString(j)+"_RDATA" ); |
---|
1061 | PORT_MAP(_component ,src , "in_DCACHE_RSP_"+toString(j)+"_ERROR" ,dest, "in_DCACHE_RSP_"+toString(x)+"_"+toString(j)+"_ERROR" ); |
---|
1062 | } |
---|
1063 | |
---|
1064 | // ~~~~~[ Interface "bypass_memory" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1065 | { |
---|
1066 | // Port map with "read_unit" is ok! |
---|
1067 | } |
---|
1068 | } |
---|
1069 | } |
---|
1070 | |
---|
1071 | // =================================================================== |
---|
1072 | // =====[ WRITE_UNIT ]================================================ |
---|
1073 | // =================================================================== |
---|
1074 | for (uint32_t i=0; i<_param->_nb_write_unit; i++) |
---|
1075 | { |
---|
1076 | src = _name+"_write_unit_"+toString(i); |
---|
1077 | log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
1078 | |
---|
1079 | { |
---|
1080 | dest = _name; |
---|
1081 | #ifdef POSITION |
---|
1082 | _component->interface_map (src ,"", |
---|
1083 | dest,""); |
---|
1084 | #endif |
---|
1085 | PORT_MAP(_component ,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
1086 | PORT_MAP(_component ,src , "in_NRESET",dest, "in_NRESET"); |
---|
1087 | } |
---|
1088 | |
---|
1089 | // -----[ Interface "write_unit_in" ]--------------------------------- |
---|
1090 | { |
---|
1091 | dest = _name+"_execution_unit_to_write_unit"; |
---|
1092 | #ifdef POSITION |
---|
1093 | _component->interface_map (src ,"write_unit_in", |
---|
1094 | dest,"execute_unit_in_"+toString(i)); |
---|
1095 | #endif |
---|
1096 | |
---|
1097 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_VAL" , |
---|
1098 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_VAL" ); |
---|
1099 | COMPONENT_MAP(_component ,src ,"out_WRITE_UNIT_IN_ACK" , |
---|
1100 | dest, "in_WRITE_UNIT_IN_"+toString(i)+"_ACK" ); |
---|
1101 | if (_param->_have_port_context_id) |
---|
1102 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_CONTEXT_ID" , |
---|
1103 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_CONTEXT_ID" ); |
---|
1104 | if (_param->_have_port_front_end_id) |
---|
1105 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_FRONT_END_ID" , |
---|
1106 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_FRONT_END_ID" ); |
---|
1107 | if (_param->_have_port_ooo_engine_id) |
---|
1108 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_OOO_ENGINE_ID", |
---|
1109 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_OOO_ENGINE_ID"); |
---|
1110 | if (_param->_have_port_rob_ptr ) |
---|
1111 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_PACKET_ID" , |
---|
1112 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_PACKET_ID" ); |
---|
1113 | // COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_OPERATION" , |
---|
1114 | // dest,"out_WRITE_UNIT_IN_"+toString(i)+"_OPERATION" ); |
---|
1115 | // COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_TYPE" , |
---|
1116 | // dest,"out_WRITE_UNIT_IN_"+toString(i)+"_TYPE" ); |
---|
1117 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_WRITE_RD" , |
---|
1118 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_WRITE_RD" ); |
---|
1119 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_NUM_REG_RD" , |
---|
1120 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_NUM_REG_RD" ); |
---|
1121 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_DATA_RD" , |
---|
1122 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_DATA_RD" ); |
---|
1123 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_WRITE_RE" , |
---|
1124 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_WRITE_RE" ); |
---|
1125 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_NUM_REG_RE" , |
---|
1126 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_NUM_REG_RE" ); |
---|
1127 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_DATA_RE" , |
---|
1128 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_DATA_RE" ); |
---|
1129 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_EXCEPTION" , |
---|
1130 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_EXCEPTION" ); |
---|
1131 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_NO_SEQUENCE" , |
---|
1132 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_NO_SEQUENCE" ); |
---|
1133 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_ADDRESS" , |
---|
1134 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_ADDRESS" ); |
---|
1135 | } |
---|
1136 | |
---|
1137 | // -----[ Interface "write_unit_out" ]-------------------------------- |
---|
1138 | { |
---|
1139 | dest = _name; |
---|
1140 | #ifdef POSITION |
---|
1141 | _component->interface_map (src ,"write_unit_out", |
---|
1142 | dest,"execute_loop_out_"+toString(i)); |
---|
1143 | #endif |
---|
1144 | |
---|
1145 | PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_VAL" , |
---|
1146 | dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_VAL" ); |
---|
1147 | PORT_MAP(_component ,src , "in_WRITE_UNIT_OUT_ACK" , |
---|
1148 | dest, "in_EXECUTE_LOOP_OUT_"+toString(i)+"_ACK" ); |
---|
1149 | if (_param->_have_port_context_id) |
---|
1150 | PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_CONTEXT_ID" , |
---|
1151 | dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_CONTEXT_ID" ); |
---|
1152 | if (_param->_have_port_front_end_id) |
---|
1153 | PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_FRONT_END_ID" , |
---|
1154 | dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_FRONT_END_ID" ); |
---|
1155 | if (_param->_have_port_ooo_engine_id) |
---|
1156 | PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_OOO_ENGINE_ID", |
---|
1157 | dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_OOO_ENGINE_ID"); |
---|
1158 | if (_param->_have_port_rob_ptr ) |
---|
1159 | PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_PACKET_ID" , |
---|
1160 | dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_PACKET_ID" ); |
---|
1161 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_OPERATION" , |
---|
1162 | // dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_OPERATION" ); |
---|
1163 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_TYPE" , |
---|
1164 | // dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_TYPE" ); |
---|
1165 | PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_FLAGS" , |
---|
1166 | dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_FLAGS" ); |
---|
1167 | PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_EXCEPTION" , |
---|
1168 | dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_EXCEPTION" ); |
---|
1169 | PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_NO_SEQUENCE" , |
---|
1170 | dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_NO_SEQUENCE" ); |
---|
1171 | PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_ADDRESS" , |
---|
1172 | dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_ADDRESS" ); |
---|
1173 | PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_DATA" , |
---|
1174 | dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_DATA" ); |
---|
1175 | } |
---|
1176 | |
---|
1177 | // -----[ Interface "gpr_write" ]------------------------------------- |
---|
1178 | { |
---|
1179 | dest = _name+"_glue"; |
---|
1180 | #ifdef POSITION |
---|
1181 | _component->interface_map (src ,"gpr_write", |
---|
1182 | dest,"gpr_write_write_unit_"+toString(i)); |
---|
1183 | #endif |
---|
1184 | |
---|
1185 | COMPONENT_MAP(_component ,src ,"out_GPR_WRITE_0_VAL" , |
---|
1186 | dest, "in_GPR_WRITE_WRITE_UNIT_"+toString(i)+"_VAL" ); |
---|
1187 | COMPONENT_MAP(_component ,src , "in_GPR_WRITE_0_ACK" , |
---|
1188 | dest,"out_GPR_WRITE_WRITE_UNIT_"+toString(i)+"_ACK" ); |
---|
1189 | if (_param->_have_port_ooo_engine_id) |
---|
1190 | COMPONENT_MAP(_component ,src ,"out_GPR_WRITE_0_OOO_ENGINE_ID", |
---|
1191 | dest, "in_GPR_WRITE_WRITE_UNIT_"+toString(i)+"_OOO_ENGINE_ID"); |
---|
1192 | COMPONENT_MAP(_component ,src ,"out_GPR_WRITE_0_NUM_REG" , |
---|
1193 | dest, "in_GPR_WRITE_WRITE_UNIT_"+toString(i)+"_NUM_REG" ); |
---|
1194 | COMPONENT_MAP(_component ,src ,"out_GPR_WRITE_0_DATA" , |
---|
1195 | dest, "in_GPR_WRITE_WRITE_UNIT_"+toString(i)+"_DATA" ); |
---|
1196 | } |
---|
1197 | |
---|
1198 | // -----[ Interface "spr_write" ]------------------------------------- |
---|
1199 | { |
---|
1200 | // Port map with "read_unit" is ok! |
---|
1201 | |
---|
1202 | dest = _name+"_glue"; |
---|
1203 | #ifdef POSITION |
---|
1204 | _component->interface_map (src ,"spr_write", |
---|
1205 | dest,"spr_write_write_unit_"+toString(i)); |
---|
1206 | #endif |
---|
1207 | |
---|
1208 | COMPONENT_MAP(_component ,src ,"out_SPR_WRITE_0_VAL" , |
---|
1209 | dest, "in_SPR_WRITE_WRITE_UNIT_"+toString(i)+"_VAL" ); |
---|
1210 | COMPONENT_MAP(_component ,src , "in_SPR_WRITE_0_ACK" , |
---|
1211 | dest,"out_SPR_WRITE_WRITE_UNIT_"+toString(i)+"_ACK" ); |
---|
1212 | if (_param->_have_port_ooo_engine_id) |
---|
1213 | COMPONENT_MAP(_component ,src ,"out_SPR_WRITE_0_OOO_ENGINE_ID", |
---|
1214 | dest, "in_SPR_WRITE_WRITE_UNIT_"+toString(i)+"_OOO_ENGINE_ID"); |
---|
1215 | COMPONENT_MAP(_component ,src ,"out_SPR_WRITE_0_NUM_REG" , |
---|
1216 | dest, "in_SPR_WRITE_WRITE_UNIT_"+toString(i)+"_NUM_REG" ); |
---|
1217 | COMPONENT_MAP(_component ,src ,"out_SPR_WRITE_0_DATA" , |
---|
1218 | dest, "in_SPR_WRITE_WRITE_UNIT_"+toString(i)+"_DATA" ); |
---|
1219 | } |
---|
1220 | |
---|
1221 | // -----[ Interface "bypass_write" ]---------------------------------- |
---|
1222 | { |
---|
1223 | // Port map with "read_unit" is ok! |
---|
1224 | } |
---|
1225 | } |
---|
1226 | |
---|
1227 | // =================================================================== |
---|
1228 | // =====[ REGISTER_UNIT ]============================================= |
---|
1229 | // =================================================================== |
---|
1230 | { |
---|
1231 | src = _name+"_register_unit"; |
---|
1232 | log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
1233 | |
---|
1234 | { |
---|
1235 | dest = _name; |
---|
1236 | #ifdef POSITION |
---|
1237 | _component->interface_map (src ,"", |
---|
1238 | dest,""); |
---|
1239 | #endif |
---|
1240 | PORT_MAP(_component ,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
1241 | PORT_MAP(_component ,src , "in_NRESET",dest, "in_NRESET"); |
---|
1242 | } |
---|
1243 | |
---|
1244 | // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1245 | for (uint32_t i=0; i<_param->_nb_read_unit; i++) |
---|
1246 | { |
---|
1247 | dest = _name+"_read_unit_"+toString(i); |
---|
1248 | #ifdef POSITION |
---|
1249 | _component->interface_map (src ,"gpr_read_"+toString(2*i ) |
---|
1250 | dest,"gpr_read_0"); |
---|
1251 | _component->interface_map (src ,"gpr_read_"+toString(2*i+1) |
---|
1252 | dest,"gpr_read_1"); |
---|
1253 | #endif |
---|
1254 | |
---|
1255 | // PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i )+"_VAL" ,dest,"out_GPR_READ_0_VAL" ); |
---|
1256 | // PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i )+"_ACK" ,dest, "in_GPR_READ_0_ACK" ); |
---|
1257 | // if (_param->_have_port_context_id) |
---|
1258 | // PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i )+"_OOO_ENGINE_ID",dest,"out_GPR_READ_0_OOO_ENGINE_ID"); |
---|
1259 | // PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i )+"_NUM_REG" ,dest,"out_GPR_READ_0_NUM_REG" ); |
---|
1260 | // PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i )+"_DATA" ,dest, "in_GPR_READ_0_DATA" ); |
---|
1261 | // PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i )+"_DATA_VAL" ,dest, "in_GPR_READ_0_DATA_VAL" ); |
---|
1262 | |
---|
1263 | // PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i+1)+"_VAL" ,dest,"out_GPR_READ_1_VAL" ); |
---|
1264 | // PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i+1)+"_ACK" ,dest, "in_GPR_READ_1_ACK" ); |
---|
1265 | // if (_param->_have_port_context_id) |
---|
1266 | // PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i+1)+"_OOO_ENGINE_ID",dest,"out_GPR_READ_1_OOO_ENGINE_ID"); |
---|
1267 | // PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i+1)+"_NUM_REG" ,dest,"out_GPR_READ_1_NUM_REG" ); |
---|
1268 | // PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i+1)+"_DATA" ,dest, "in_GPR_READ_1_DATA" ); |
---|
1269 | // PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i+1)+"_DATA_VAL" ,dest, "in_GPR_READ_1_DATA_VAL" ); |
---|
1270 | } |
---|
1271 | |
---|
1272 | // ~~~~~[ Interface "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1273 | for (uint32_t i=0; i<_param->_nb_write_unit; i++) |
---|
1274 | { |
---|
1275 | dest = _name+"_glue"; |
---|
1276 | #ifdef POSITION |
---|
1277 | _component->interface_map (src ,"gpr_write_"+toString(i), |
---|
1278 | dest,"gpr_write_register_file_"+toString(i)); |
---|
1279 | #endif |
---|
1280 | |
---|
1281 | COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(i)+"_VAL" ,dest,"out_GPR_WRITE_REGISTER_FILE_"+toString(i)+"_VAL" ); |
---|
1282 | COMPONENT_MAP(_component ,src ,"out_GPR_WRITE_"+toString(i)+"_ACK" ,dest, "in_GPR_WRITE_REGISTER_FILE_"+toString(i)+"_ACK" ); |
---|
1283 | if (_param->_have_port_ooo_engine_id) |
---|
1284 | COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID",dest,"out_GPR_WRITE_REGISTER_FILE_"+toString(i)+"_OOO_ENGINE_ID"); |
---|
1285 | COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(i)+"_NUM_REG" ,dest,"out_GPR_WRITE_REGISTER_FILE_"+toString(i)+"_NUM_REG" ); |
---|
1286 | COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(i)+"_DATA" ,dest,"out_GPR_WRITE_REGISTER_FILE_"+toString(i)+"_DATA" ); |
---|
1287 | } |
---|
1288 | |
---|
1289 | // ~~~~~[ Interface "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1290 | for (uint32_t i=0; i<_param->_nb_read_unit; i++) |
---|
1291 | { |
---|
1292 | dest = _name+"_read_unit_"+toString(i); |
---|
1293 | #ifdef POSITION |
---|
1294 | _component->interface_map (src ,"spr_read_"+toString(i), |
---|
1295 | dest,"spr_read_0"); |
---|
1296 | #endif |
---|
1297 | |
---|
1298 | // PORT_MAP(_component ,src , "in_SPR_READ_"+toString(i)+"_VAL" ,dest,"out_SPR_READ_0_VAL" ); |
---|
1299 | // PORT_MAP(_component ,src ,"out_SPR_READ_"+toString(i)+"_ACK" ,dest, "in_SPR_READ_0_ACK" ); |
---|
1300 | // if (_param->_have_port_context_id) |
---|
1301 | // PORT_MAP(_component ,src , "in_SPR_READ_"+toString(i)+"_OOO_ENGINE_ID",dest,"out_SPR_READ_0_OOO_ENGINE_ID"); |
---|
1302 | // PORT_MAP(_component ,src , "in_SPR_READ_"+toString(i)+"_NUM_REG" ,dest,"out_SPR_READ_0_NUM_REG" ); |
---|
1303 | // PORT_MAP(_component ,src ,"out_SPR_READ_"+toString(i)+"_DATA" ,dest, "in_SPR_READ_0_DATA" ); |
---|
1304 | // PORT_MAP(_component ,src ,"out_SPR_READ_"+toString(i)+"_DATA_VAL" ,dest, "in_SPR_READ_0_DATA_VAL" ); |
---|
1305 | } |
---|
1306 | |
---|
1307 | // ~~~~~[ Interface "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1308 | for (uint32_t i=0; i<_param->_nb_write_unit; i++) |
---|
1309 | { |
---|
1310 | dest = _name+"_glue"; |
---|
1311 | #ifdef POSITION |
---|
1312 | _component->interface_map (src ,"spr_write_"+toString(i), |
---|
1313 | dest,"spr_write_register_file_"+toString(i)); |
---|
1314 | #endif |
---|
1315 | |
---|
1316 | COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(i)+"_VAL" ,dest,"out_SPR_WRITE_REGISTER_FILE_"+toString(i)+"_VAL" ); |
---|
1317 | COMPONENT_MAP(_component ,src ,"out_SPR_WRITE_"+toString(i)+"_ACK" ,dest, "in_SPR_WRITE_REGISTER_FILE_"+toString(i)+"_ACK" ); |
---|
1318 | if (_param->_have_port_ooo_engine_id) |
---|
1319 | COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID",dest,"out_SPR_WRITE_REGISTER_FILE_"+toString(i)+"_OOO_ENGINE_ID"); |
---|
1320 | COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(i)+"_NUM_REG" ,dest,"out_SPR_WRITE_REGISTER_FILE_"+toString(i)+"_NUM_REG" ); |
---|
1321 | COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(i)+"_DATA" ,dest,"out_SPR_WRITE_REGISTER_FILE_"+toString(i)+"_DATA" ); |
---|
1322 | } |
---|
1323 | |
---|
1324 | // ~~~~~[ Interface "insert_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1325 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
1326 | { |
---|
1327 | uint32_t x=_param->_nb_inst_insert_rob [i]; |
---|
1328 | |
---|
1329 | for (uint32_t j=0; j<x; j++) |
---|
1330 | { |
---|
1331 | dest = _name; |
---|
1332 | #ifdef POSITION |
---|
1333 | _component->interface_map (src ,"insert_rob_"+toString(i)+"_"+toString(j), |
---|
1334 | dest,"insert_rob_"+toString(i)+"_"+toString(j)); |
---|
1335 | #endif |
---|
1336 | |
---|
1337 | PORT_MAP(_component ,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL" , |
---|
1338 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL" ); |
---|
1339 | PORT_MAP(_component ,src ,"out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK" , |
---|
1340 | dest,"out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK" ); |
---|
1341 | PORT_MAP(_component ,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE" , |
---|
1342 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE" ); |
---|
1343 | PORT_MAP(_component ,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_NUM_REG", |
---|
1344 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_NUM_REG"); |
---|
1345 | PORT_MAP(_component ,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE" , |
---|
1346 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE" ); |
---|
1347 | PORT_MAP(_component ,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_NUM_REG", |
---|
1348 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_NUM_REG"); |
---|
1349 | } |
---|
1350 | } |
---|
1351 | |
---|
1352 | // // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1353 | // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
1354 | // { |
---|
1355 | // uint32_t x=_param->_nb_inst_retire_rob [i]; |
---|
1356 | |
---|
1357 | // for (uint32_t j=0; j<x; j++) |
---|
1358 | // { |
---|
1359 | // dest = _name; |
---|
1360 | // #ifdef POSITION |
---|
1361 | // _component->interface_map (src ,"retire_rob_"+toString(i)+"_"+toString(j), |
---|
1362 | // dest,"retire_rob_"+toString(i)+"_"+toString(j)); |
---|
1363 | // #endif |
---|
1364 | |
---|
1365 | // PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL" , |
---|
1366 | // dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL" ); |
---|
1367 | // PORT_MAP(_component ,src ,"out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK" , |
---|
1368 | // dest,"out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK" ); |
---|
1369 | // PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE" , |
---|
1370 | // dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE" ); |
---|
1371 | // PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_NUM_REG", |
---|
1372 | // dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_NUM_REG"); |
---|
1373 | // PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE" , |
---|
1374 | // dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE" ); |
---|
1375 | // PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_NUM_REG", |
---|
1376 | // dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_NUM_REG"); |
---|
1377 | // PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE" , |
---|
1378 | // dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE" ); |
---|
1379 | // PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_NUM_REG", |
---|
1380 | // dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_NUM_REG"); |
---|
1381 | // PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE" , |
---|
1382 | // dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE" ); |
---|
1383 | // PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_NUM_REG", |
---|
1384 | // dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_NUM_REG"); |
---|
1385 | // } |
---|
1386 | // } |
---|
1387 | } |
---|
1388 | |
---|
1389 | // =================================================================== |
---|
1390 | // =====[ READ_UNIT_TO_EXECUTION_UNIT ]=============================== |
---|
1391 | // =================================================================== |
---|
1392 | { |
---|
1393 | src = _name+"_read_unit_to_execution_unit"; |
---|
1394 | log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
1395 | |
---|
1396 | { |
---|
1397 | dest = _name; |
---|
1398 | #ifdef POSITION |
---|
1399 | _component->interface_map (src ,"", |
---|
1400 | dest,""); |
---|
1401 | #endif |
---|
1402 | PORT_MAP(_component ,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
1403 | PORT_MAP(_component ,src , "in_NRESET",dest, "in_NRESET"); |
---|
1404 | } |
---|
1405 | |
---|
1406 | // ~~~~~[ Interface "read_unit_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1407 | uint32_t it_read_unit_out =0; |
---|
1408 | for (uint32_t i=0; i < _param->_nb_read_unit; i++) |
---|
1409 | for (uint32_t j=0; j < _param->_nb_inst_retire[i]; j++) |
---|
1410 | { |
---|
1411 | dest = _name+"_read_unit_"+toString(i); |
---|
1412 | |
---|
1413 | #ifdef POSITION |
---|
1414 | _component->interface_map (src ,"read_unit_"+toString(it_read_unit_out), |
---|
1415 | dest,"read_unit_"+toString(j)); |
---|
1416 | #endif |
---|
1417 | |
---|
1418 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_VAL" , |
---|
1419 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_VAL" ); |
---|
1420 | // PORT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_ACK" , |
---|
1421 | // dest, "in_READ_UNIT_OUT_"+toString(j )+"_ACK" ); |
---|
1422 | // if (_param->_have_port_context_id) |
---|
1423 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_CONTEXT_ID" , |
---|
1424 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_CONTEXT_ID" ); |
---|
1425 | // if (_param->_have_port_front_end_id) |
---|
1426 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_FRONT_END_ID" , |
---|
1427 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_FRONT_END_ID" ); |
---|
1428 | // if (_param->_have_port_ooo_engine_id) |
---|
1429 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_OOO_ENGINE_ID" , |
---|
1430 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_OOO_ENGINE_ID" ); |
---|
1431 | // if (_param->_have_port_rob_ptr ) |
---|
1432 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_PACKET_ID" , |
---|
1433 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_PACKET_ID" ); |
---|
1434 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_OPERATION" , |
---|
1435 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_OPERATION" ); |
---|
1436 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_TYPE" , |
---|
1437 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_TYPE" ); |
---|
1438 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_STORE_QUEUE_PTR_WRITE", |
---|
1439 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_STORE_QUEUE_PTR_WRITE"); |
---|
1440 | // if (_param->_have_port_load_queue_ptr) |
---|
1441 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_LOAD_QUEUE_PTR_WRITE" , |
---|
1442 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_LOAD_QUEUE_PTR_WRITE" ); |
---|
1443 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_HAS_IMMEDIAT" , |
---|
1444 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_HAS_IMMEDIAT" ); |
---|
1445 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_IMMEDIAT" , |
---|
1446 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_IMMEDIAT" ); |
---|
1447 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_DATA_RA" , |
---|
1448 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_DATA_RA" ); |
---|
1449 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_DATA_RB" , |
---|
1450 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_DATA_RB" ); |
---|
1451 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_DATA_RC" , |
---|
1452 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_DATA_RC" ); |
---|
1453 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_WRITE_RD" , |
---|
1454 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_WRITE_RD" ); |
---|
1455 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_NUM_REG_RD" , |
---|
1456 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_NUM_REG_RD" ); |
---|
1457 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_WRITE_RE" , |
---|
1458 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_WRITE_RE" ); |
---|
1459 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_NUM_REG_RE" , |
---|
1460 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_NUM_REG_RE" ); |
---|
1461 | |
---|
1462 | it_read_unit_out ++; |
---|
1463 | } |
---|
1464 | |
---|
1465 | // ~~~~~[ Interface "execute_unit_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1466 | for (uint32_t i=0; i<_param->_nb_execute_unit; i++) |
---|
1467 | { |
---|
1468 | uint32_t x=_param->_translate_num_execute_unit[i]; |
---|
1469 | |
---|
1470 | if (_param->_is_load_store_unit[i] == false) |
---|
1471 | { |
---|
1472 | dest = _name+"_functionnal_unit_"+toString(x); |
---|
1473 | |
---|
1474 | #ifdef POSITION |
---|
1475 | _component->interface_map (src ,"execute_unit_in_"+toString(i), |
---|
1476 | dest,"execute_in"); |
---|
1477 | #endif |
---|
1478 | |
---|
1479 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_VAL" , |
---|
1480 | // dest, "in_EXECUTE_IN_VAL" ); |
---|
1481 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_IN_"+toString(i)+"_ACK" , |
---|
1482 | // dest,"out_EXECUTE_IN_ACK" ); |
---|
1483 | // if (_param->_have_port_context_id) |
---|
1484 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_CONTEXT_ID" , |
---|
1485 | // dest, "in_EXECUTE_IN_CONTEXT_ID" ); |
---|
1486 | // if (_param->_have_port_front_end_id) |
---|
1487 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_FRONT_END_ID" , |
---|
1488 | // dest, "in_EXECUTE_IN_FRONT_END_ID" ); |
---|
1489 | // if (_param->_have_port_ooo_engine_id) |
---|
1490 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_OOO_ENGINE_ID" , |
---|
1491 | // dest, "in_EXECUTE_IN_OOO_ENGINE_ID" ); |
---|
1492 | // if (_param->_have_port_rob_ptr ) |
---|
1493 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_PACKET_ID" , |
---|
1494 | // dest, "in_EXECUTE_IN_PACKET_ID" ); |
---|
1495 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_OPERATION" , |
---|
1496 | // dest, "in_EXECUTE_IN_OPERATION" ); |
---|
1497 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_TYPE" , |
---|
1498 | // dest, "in_EXECUTE_IN_TYPE" ); |
---|
1499 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_STORE_QUEUE_PTR_WRITE", |
---|
1500 | // dest, "in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE"); |
---|
1501 | // if (_param->_have_port_load_queue_ptr) |
---|
1502 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" , |
---|
1503 | // dest, "in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE" ); |
---|
1504 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_HAS_IMMEDIAT" , |
---|
1505 | // dest, "in_EXECUTE_IN_HAS_IMMEDIAT" ); |
---|
1506 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_IMMEDIAT" , |
---|
1507 | // dest, "in_EXECUTE_IN_IMMEDIAT" ); |
---|
1508 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RA" , |
---|
1509 | // dest, "in_EXECUTE_IN_DATA_RA" ); |
---|
1510 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RB" , |
---|
1511 | // dest, "in_EXECUTE_IN_DATA_RB" ); |
---|
1512 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RC" , |
---|
1513 | // dest, "in_EXECUTE_IN_DATA_RC" ); |
---|
1514 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_WRITE_RD" , |
---|
1515 | // dest, "in_EXECUTE_IN_WRITE_RD" ); |
---|
1516 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_NUM_REG_RD" , |
---|
1517 | // dest, "in_EXECUTE_IN_NUM_REG_RD" ); |
---|
1518 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_WRITE_RE" , |
---|
1519 | // dest, "in_EXECUTE_IN_WRITE_RE" ); |
---|
1520 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_NUM_REG_RE" , |
---|
1521 | // dest, "in_EXECUTE_IN_NUM_REG_RE" ); |
---|
1522 | } |
---|
1523 | else |
---|
1524 | { |
---|
1525 | dest = _name+"_load_store_unit_"+toString(x); |
---|
1526 | |
---|
1527 | #ifdef POSITION |
---|
1528 | _component->interface_map (src ,"execute_unit_in_"+toString(i), |
---|
1529 | dest,"memory_in"); |
---|
1530 | #endif |
---|
1531 | |
---|
1532 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_VAL" , |
---|
1533 | // dest, "in_MEMORY_IN_VAL" ); |
---|
1534 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_IN_"+toString(i)+"_ACK" , |
---|
1535 | // dest,"out_MEMORY_IN_ACK" ); |
---|
1536 | // if (_param->_have_port_context_id) |
---|
1537 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_CONTEXT_ID" , |
---|
1538 | // dest, "in_MEMORY_IN_CONTEXT_ID" ); |
---|
1539 | // if (_param->_have_port_front_end_id) |
---|
1540 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_FRONT_END_ID" , |
---|
1541 | // dest, "in_MEMORY_IN_FRONT_END_ID" ); |
---|
1542 | // if (_param->_have_port_ooo_engine_id) |
---|
1543 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_OOO_ENGINE_ID" , |
---|
1544 | // dest, "in_MEMORY_IN_OOO_ENGINE_ID" ); |
---|
1545 | // if (_param->_have_port_rob_ptr ) |
---|
1546 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_PACKET_ID" , |
---|
1547 | // dest, "in_MEMORY_IN_PACKET_ID" ); |
---|
1548 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_OPERATION" , |
---|
1549 | // dest, "in_MEMORY_IN_OPERATION" ); |
---|
1550 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_TYPE" , |
---|
1551 | // dest, "in_MEMORY_IN_TYPE" ); |
---|
1552 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_STORE_QUEUE_PTR_WRITE", |
---|
1553 | // dest, "in_MEMORY_IN_STORE_QUEUE_PTR_WRITE"); |
---|
1554 | // if (_param->_have_port_load_queue_ptr) |
---|
1555 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" , |
---|
1556 | // dest, "in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE" ); |
---|
1557 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_HAS_IMMEDIAT" , |
---|
1558 | // dest, "in_MEMORY_IN_HAS_IMMEDIAT" ); |
---|
1559 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_IMMEDIAT" , |
---|
1560 | // dest, "in_MEMORY_IN_IMMEDIAT" ); |
---|
1561 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RA" , |
---|
1562 | // dest, "in_MEMORY_IN_DATA_RA" ); |
---|
1563 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RB" , |
---|
1564 | // dest, "in_MEMORY_IN_DATA_RB" ); |
---|
1565 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RC" , |
---|
1566 | // dest, "in_MEMORY_IN_DATA_RC" ); |
---|
1567 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_WRITE_RD" , |
---|
1568 | // dest, "in_MEMORY_IN_WRITE_RD" ); |
---|
1569 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_NUM_REG_RD" , |
---|
1570 | // dest, "in_MEMORY_IN_NUM_REG_RD" ); |
---|
1571 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_WRITE_RE" , |
---|
1572 | // dest, "in_MEMORY_IN_WRITE_RE" ); |
---|
1573 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_NUM_REG_RE" , |
---|
1574 | // dest, "in_MEMORY_IN_NUM_REG_RE" ); |
---|
1575 | } |
---|
1576 | } |
---|
1577 | } |
---|
1578 | |
---|
1579 | // =================================================================== |
---|
1580 | // =====[ EXECUTION_UNIT_TO_WRITE_UNIT ]============================== |
---|
1581 | // =================================================================== |
---|
1582 | { |
---|
1583 | src = _name+"_execution_unit_to_write_unit"; |
---|
1584 | log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
1585 | |
---|
1586 | { |
---|
1587 | dest = _name; |
---|
1588 | #ifdef POSITION |
---|
1589 | _component->interface_map (src ,"", |
---|
1590 | dest,""); |
---|
1591 | #endif |
---|
1592 | PORT_MAP(_component ,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
1593 | PORT_MAP(_component ,src , "in_NRESET",dest, "in_NRESET"); |
---|
1594 | } |
---|
1595 | |
---|
1596 | // ~~~~~[ Interface "execute_unit_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1597 | for (uint32_t i=0; i<_param->_nb_execute_unit; i++) |
---|
1598 | { |
---|
1599 | uint32_t x=_param->_translate_num_execute_unit[i]; |
---|
1600 | |
---|
1601 | if (_param->_is_load_store_unit[i] == false) |
---|
1602 | { |
---|
1603 | dest = _name+"_functionnal_unit_"+toString(x); |
---|
1604 | |
---|
1605 | #ifdef POSITION |
---|
1606 | _component->interface_map (src ,"execute_unit_out_"+toString(i), |
---|
1607 | dest,"execute_out"); |
---|
1608 | #endif |
---|
1609 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_VAL" , |
---|
1610 | // dest,"out_EXECUTE_OUT_VAL" ); |
---|
1611 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_OUT_"+toString(i)+"_ACK" , |
---|
1612 | // dest, "in_EXECUTE_OUT_ACK" ); |
---|
1613 | // if (_param->_have_port_context_id) |
---|
1614 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_CONTEXT_ID" , |
---|
1615 | // dest,"out_EXECUTE_OUT_CONTEXT_ID" ); |
---|
1616 | // if (_param->_have_port_front_end_id) |
---|
1617 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_FRONT_END_ID" , |
---|
1618 | // dest,"out_EXECUTE_OUT_FRONT_END_ID" ); |
---|
1619 | // if (_param->_have_port_ooo_engine_id) |
---|
1620 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_OOO_ENGINE_ID", |
---|
1621 | // dest,"out_EXECUTE_OUT_OOO_ENGINE_ID"); |
---|
1622 | // if (_param->_have_port_rob_ptr ) |
---|
1623 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_PACKET_ID" , |
---|
1624 | // dest,"out_EXECUTE_OUT_PACKET_ID" ); |
---|
1625 | // // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_OPERATION" , |
---|
1626 | // // dest,"out_EXECUTE_OUT_OPERATION" ); |
---|
1627 | // // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_TYPE" , |
---|
1628 | // // dest,"out_EXECUTE_OUT_TYPE" ); |
---|
1629 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_WRITE_RD" , |
---|
1630 | // dest,"out_EXECUTE_OUT_WRITE_RD" ); |
---|
1631 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NUM_REG_RD" , |
---|
1632 | // dest,"out_EXECUTE_OUT_NUM_REG_RD" ); |
---|
1633 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_DATA_RD" , |
---|
1634 | // dest,"out_EXECUTE_OUT_DATA_RD" ); |
---|
1635 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_WRITE_RE" , |
---|
1636 | // dest,"out_EXECUTE_OUT_WRITE_RE" ); |
---|
1637 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NUM_REG_RE" , |
---|
1638 | // dest,"out_EXECUTE_OUT_NUM_REG_RE" ); |
---|
1639 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_DATA_RE" , |
---|
1640 | // dest,"out_EXECUTE_OUT_DATA_RE" ); |
---|
1641 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_EXCEPTION" , |
---|
1642 | // dest,"out_EXECUTE_OUT_EXCEPTION" ); |
---|
1643 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NO_SEQUENCE" , |
---|
1644 | // dest,"out_EXECUTE_OUT_NO_SEQUENCE" ); |
---|
1645 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_ADDRESS" , |
---|
1646 | // dest,"out_EXECUTE_OUT_ADDRESS" ); |
---|
1647 | } |
---|
1648 | else |
---|
1649 | { |
---|
1650 | dest = _name+"_load_store_unit_"+toString(x); |
---|
1651 | |
---|
1652 | #ifdef POSITION |
---|
1653 | _component->interface_map (src ,"execute_unit_out_"+toString(i), |
---|
1654 | dest,"memory_out"); |
---|
1655 | #endif |
---|
1656 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_VAL" , |
---|
1657 | // dest,"out_MEMORY_OUT_VAL" ); |
---|
1658 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_OUT_"+toString(i)+"_ACK" , |
---|
1659 | // dest, "in_MEMORY_OUT_ACK" ); |
---|
1660 | // if (_param->_have_port_context_id) |
---|
1661 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_CONTEXT_ID" , |
---|
1662 | // dest,"out_MEMORY_OUT_CONTEXT_ID" ); |
---|
1663 | // if (_param->_have_port_front_end_id) |
---|
1664 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_FRONT_END_ID" , |
---|
1665 | // dest,"out_MEMORY_OUT_FRONT_END_ID" ); |
---|
1666 | // if (_param->_have_port_ooo_engine_id) |
---|
1667 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_OOO_ENGINE_ID", |
---|
1668 | // dest,"out_MEMORY_OUT_OOO_ENGINE_ID"); |
---|
1669 | // if (_param->_have_port_rob_ptr ) |
---|
1670 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_PACKET_ID" , |
---|
1671 | // dest,"out_MEMORY_OUT_PACKET_ID" ); |
---|
1672 | // // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_OPERATION" , |
---|
1673 | // // dest,"out_MEMORY_OUT_OPERATION" ); |
---|
1674 | // // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_TYPE" , |
---|
1675 | // // dest,"out_MEMORY_OUT_TYPE" ); |
---|
1676 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_WRITE_RD" , |
---|
1677 | // dest,"out_MEMORY_OUT_WRITE_RD" ); |
---|
1678 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NUM_REG_RD" , |
---|
1679 | // dest,"out_MEMORY_OUT_NUM_REG_RD" ); |
---|
1680 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_DATA_RD" , |
---|
1681 | // dest,"out_MEMORY_OUT_DATA_RD" ); |
---|
1682 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_WRITE_RE" , |
---|
1683 | // dest,"out_MEMORY_OUT_WRITE_RE" ); |
---|
1684 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NUM_REG_RE" , |
---|
1685 | // dest,"out_MEMORY_OUT_NUM_REG_RE" ); |
---|
1686 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_DATA_RE" , |
---|
1687 | // dest,"out_MEMORY_OUT_DATA_RE" ); |
---|
1688 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_EXCEPTION" , |
---|
1689 | // dest,"out_MEMORY_OUT_EXCEPTION" ); |
---|
1690 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NO_SEQUENCE" , |
---|
1691 | // dest,"out_MEMORY_OUT_NO_SEQUENCE" ); |
---|
1692 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_ADDRESS" , |
---|
1693 | // dest,"out_MEMORY_OUT_ADDRESS" ); |
---|
1694 | } |
---|
1695 | } |
---|
1696 | |
---|
1697 | // ~~~~~[ Interface "write_unit_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1698 | for (uint32_t i=0; i<_param->_nb_write_unit; i++) |
---|
1699 | { |
---|
1700 | dest = _name+"_write_unit_"+toString(i); |
---|
1701 | |
---|
1702 | #ifdef POSITION |
---|
1703 | _component->interface_map (src ,"write_unit_out_"+toString(i), |
---|
1704 | dest,"write_out"); |
---|
1705 | #endif |
---|
1706 | |
---|
1707 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_VAL" , |
---|
1708 | // dest, "in_WRITE_UNIT_IN_VAL" ); |
---|
1709 | // PORT_MAP(_component ,src , "in_WRITE_UNIT_IN_"+toString(i)+"_ACK" , |
---|
1710 | // dest,"out_WRITE_UNIT_IN_ACK" ); |
---|
1711 | // if (_param->_have_port_context_id) |
---|
1712 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_CONTEXT_ID" , |
---|
1713 | // dest, "in_WRITE_UNIT_IN_CONTEXT_ID" ); |
---|
1714 | // if (_param->_have_port_front_end_id) |
---|
1715 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_FRONT_END_ID" , |
---|
1716 | // dest, "in_WRITE_UNIT_IN_FRONT_END_ID" ); |
---|
1717 | // if (_param->_have_port_ooo_engine_id) |
---|
1718 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_OOO_ENGINE_ID", |
---|
1719 | // dest, "in_WRITE_UNIT_IN_OOO_ENGINE_ID"); |
---|
1720 | // if (_param->_have_port_rob_ptr ) |
---|
1721 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_PACKET_ID" , |
---|
1722 | // dest, "in_WRITE_UNIT_IN_PACKET_ID" ); |
---|
1723 | // // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_OPERATION" , |
---|
1724 | // // dest, "in_WRITE_UNIT_IN_OPERATION" ); |
---|
1725 | // // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_TYPE" , |
---|
1726 | // // dest, "in_WRITE_UNIT_IN_TYPE" ); |
---|
1727 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_WRITE_RD" , |
---|
1728 | // dest, "in_WRITE_UNIT_IN_WRITE_RD" ); |
---|
1729 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_NUM_REG_RD" , |
---|
1730 | // dest, "in_WRITE_UNIT_IN_NUM_REG_RD" ); |
---|
1731 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_DATA_RD" , |
---|
1732 | // dest, "in_WRITE_UNIT_IN_DATA_RD" ); |
---|
1733 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_WRITE_RE" , |
---|
1734 | // dest, "in_WRITE_UNIT_IN_WRITE_RE" ); |
---|
1735 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_NUM_REG_RE" , |
---|
1736 | // dest, "in_WRITE_UNIT_IN_NUM_REG_RE" ); |
---|
1737 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_DATA_RE" , |
---|
1738 | // dest, "in_WRITE_UNIT_IN_DATA_RE" ); |
---|
1739 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_EXCEPTION" , |
---|
1740 | // dest, "in_WRITE_UNIT_IN_EXCEPTION" ); |
---|
1741 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_NO_SEQUENCE" , |
---|
1742 | // dest, "in_WRITE_UNIT_IN_NO_SEQUENCE" ); |
---|
1743 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_ADDRESS" , |
---|
1744 | // dest, "in_WRITE_UNIT_IN_ADDRESS" ); |
---|
1745 | } |
---|
1746 | } |
---|
1747 | |
---|
1748 | #if DEBUG_Execute_loop == true |
---|
1749 | _component->test_map(); |
---|
1750 | #endif |
---|
1751 | |
---|
1752 | #ifdef POSITION |
---|
1753 | if (usage_is_set(_usage,USE_POSITION)) |
---|
1754 | _component->generate_file(); |
---|
1755 | #endif |
---|
1756 | |
---|
1757 | log_printf(FUNC,Execute_loop,FUNCTION,"End"); |
---|
1758 | }; |
---|
1759 | |
---|
1760 | }; // end namespace execute_loop |
---|
1761 | }; // end namespace multi_execute_loop |
---|
1762 | }; // end namespace core |
---|
1763 | |
---|
1764 | }; // end namespace behavioural |
---|
1765 | }; // end namespace morpheo |
---|