1 | /* |
---|
2 | * $Id: Front_end_allocation.cpp 112 2009-03-18 22:36:26Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Core/Multi_Front_end/Front_end/include/Front_end.h" |
---|
9 | #include "Behavioural/include/Allocation.h" |
---|
10 | #include "Common/include/Max.h" |
---|
11 | |
---|
12 | namespace morpheo { |
---|
13 | namespace behavioural { |
---|
14 | namespace core { |
---|
15 | namespace multi_front_end { |
---|
16 | namespace front_end { |
---|
17 | |
---|
18 | |
---|
19 | |
---|
20 | #undef FUNCTION |
---|
21 | #define FUNCTION "Front_end::allocation" |
---|
22 | void Front_end::allocation |
---|
23 | ( |
---|
24 | #ifdef STATISTICS |
---|
25 | morpheo::behavioural::Parameters_Statistics * param_statistics |
---|
26 | #else |
---|
27 | void |
---|
28 | #endif |
---|
29 | ) |
---|
30 | { |
---|
31 | log_begin(Front_end,FUNCTION); |
---|
32 | |
---|
33 | _component = new Component (_usage); |
---|
34 | |
---|
35 | Entity * entity = _component->set_entity (_name |
---|
36 | ,"Front_end" |
---|
37 | #ifdef POSITION |
---|
38 | ,COMBINATORY |
---|
39 | #endif |
---|
40 | ); |
---|
41 | |
---|
42 | _interfaces = entity->set_interfaces(); |
---|
43 | |
---|
44 | // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
45 | { |
---|
46 | Interface * interface = _interfaces->set_interface("" |
---|
47 | #ifdef POSITION |
---|
48 | ,IN |
---|
49 | ,SOUTH, |
---|
50 | "Generalist interface" |
---|
51 | #endif |
---|
52 | ); |
---|
53 | |
---|
54 | in_CLOCK = interface->set_signal_clk ("clock" ,1, CLOCK_VHDL_YES); |
---|
55 | in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); |
---|
56 | } |
---|
57 | |
---|
58 | // ~~~~~[ Interface "icache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
59 | { |
---|
60 | ALLOC1_INTERFACE_BEGIN("icache_req",OUT, WEST, _("Instruction cache request."),_param->_nb_context); |
---|
61 | |
---|
62 | ALLOC1_VALACK_OUT (out_ICACHE_REQ_VAL ,VAL); |
---|
63 | ALLOC1_VALACK_IN ( in_ICACHE_REQ_ACK ,ACK); |
---|
64 | // ALLOC1_SIGNAL_OUT (out_ICACHE_REQ_THREAD_ID ,"thread_id" ,Tcontext_t ,_param->_size_context_id ); |
---|
65 | ALLOC1_SIGNAL_OUT (out_ICACHE_REQ_PACKET_ID ,"packet_id" ,Tpacket_t ,_param->_size_ifetch_queue_ptr ); |
---|
66 | ALLOC1_SIGNAL_OUT (out_ICACHE_REQ_ADDRESS ,"address" ,Ticache_instruction_t,_param->_size_instruction_address ); |
---|
67 | ALLOC1_SIGNAL_OUT (out_ICACHE_REQ_TYPE ,"type" ,Ticache_type_t ,_param->_size_icache_type ); |
---|
68 | |
---|
69 | ALLOC1_INTERFACE_END(_param->_nb_context); |
---|
70 | } |
---|
71 | |
---|
72 | // ~~~~~[ Interface "icache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
73 | { |
---|
74 | ALLOC1_INTERFACE_BEGIN("icache_rsp",IN , WEST, _("Instruction cache respons."),_param->_nb_context); |
---|
75 | |
---|
76 | ALLOC1_VALACK_IN ( in_ICACHE_RSP_VAL ,VAL); |
---|
77 | ALLOC1_VALACK_OUT (out_ICACHE_RSP_ACK ,ACK); |
---|
78 | // ALLOC1_SIGNAL_IN ( in_ICACHE_RSP_THREAD_ID ,"thread_id" ,Tcontext_t ,_param->_size_context_id ); |
---|
79 | ALLOC1_SIGNAL_IN ( in_ICACHE_RSP_PACKET_ID ,"packet_id" ,Tpacket_t ,_param->_size_ifetch_queue_ptr ); |
---|
80 | ALLOC1_SIGNAL_IN ( in_ICACHE_RSP_ERROR ,"error" ,Ticache_error_t ,_param->_size_icache_error ); |
---|
81 | |
---|
82 | ALLOC1_INTERFACE_END(_param->_nb_context); |
---|
83 | } |
---|
84 | { |
---|
85 | ALLOC2_INTERFACE_BEGIN("icache_rsp",IN , WEST, _("Instruction cache respons."),_param->_nb_context,_param->_nb_inst_fetch[it1]); |
---|
86 | |
---|
87 | _ALLOC2_SIGNAL_IN ( in_ICACHE_RSP_INSTRUCTION ,"instruction" ,Ticache_instruction_t,_param->_size_instruction ,_param->_nb_context,_param->_nb_inst_fetch[it1]); |
---|
88 | |
---|
89 | ALLOC2_INTERFACE_END(_param->_nb_context,_param->_nb_inst_fetch[it1]); |
---|
90 | } |
---|
91 | |
---|
92 | // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
93 | { |
---|
94 | ALLOC1_INTERFACE_BEGIN("decod",OUT,EAST,_("Decoded instruction, send to ooo_engine"),_param->_sum_inst_decod); |
---|
95 | |
---|
96 | ALLOC1_VALACK_OUT (out_DECOD_VAL , VAL); |
---|
97 | ALLOC1_VALACK_IN ( in_DECOD_ACK , ACK); |
---|
98 | ALLOC1_SIGNAL_OUT (out_DECOD_CONTEXT_ID ,"CONTEXT_ID" ,Tcontext_t ,_param->_size_context_id ); |
---|
99 | ALLOC1_SIGNAL_OUT (out_DECOD_DEPTH ,"DEPTH" ,Tdepth_t ,_param->_size_depth ); |
---|
100 | ALLOC1_SIGNAL_OUT (out_DECOD_TYPE ,"TYPE" ,Ttype_t ,_param->_size_type ); |
---|
101 | ALLOC1_SIGNAL_OUT (out_DECOD_OPERATION ,"OPERATION" ,Toperation_t ,_param->_size_operation ); |
---|
102 | ALLOC1_SIGNAL_OUT (out_DECOD_NO_EXECUTE ,"NO_EXECUTE" ,Tcontrol_t ,1 ); |
---|
103 | ALLOC1_SIGNAL_OUT (out_DECOD_IS_DELAY_SLOT ,"IS_DELAY_SLOT" ,Tcontrol_t ,1 ); |
---|
104 | #ifdef DEBUG |
---|
105 | ALLOC1_SIGNAL_OUT (out_DECOD_ADDRESS ,"ADDRESS" ,Tgeneral_data_t ,_param->_size_instruction_address ); |
---|
106 | #endif |
---|
107 | ALLOC1_SIGNAL_OUT (out_DECOD_ADDRESS_NEXT ,"ADDRESS_NEXT" ,Tgeneral_data_t ,_param->_size_instruction_address ); |
---|
108 | ALLOC1_SIGNAL_OUT (out_DECOD_HAS_IMMEDIAT ,"HAS_IMMEDIAT" ,Tcontrol_t ,1 ); |
---|
109 | ALLOC1_SIGNAL_OUT (out_DECOD_IMMEDIAT ,"IMMEDIAT" ,Tgeneral_data_t ,_param->_size_general_data ); |
---|
110 | ALLOC1_SIGNAL_OUT (out_DECOD_READ_RA ,"READ_RA" ,Tcontrol_t ,1 ); |
---|
111 | ALLOC1_SIGNAL_OUT (out_DECOD_NUM_REG_RA ,"NUM_REG_RA" ,Tgeneral_address_t ,_param->_size_general_register_logic); |
---|
112 | ALLOC1_SIGNAL_OUT (out_DECOD_READ_RB ,"READ_RB" ,Tcontrol_t ,1 ); |
---|
113 | ALLOC1_SIGNAL_OUT (out_DECOD_NUM_REG_RB ,"NUM_REG_RB" ,Tgeneral_address_t ,_param->_size_general_register_logic); |
---|
114 | ALLOC1_SIGNAL_OUT (out_DECOD_READ_RC ,"READ_RC" ,Tcontrol_t ,1 ); |
---|
115 | ALLOC1_SIGNAL_OUT (out_DECOD_NUM_REG_RC ,"NUM_REG_RC" ,Tspecial_address_t ,_param->_size_special_register_logic); |
---|
116 | ALLOC1_SIGNAL_OUT (out_DECOD_WRITE_RD ,"WRITE_RD" ,Tcontrol_t ,1 ); |
---|
117 | ALLOC1_SIGNAL_OUT (out_DECOD_NUM_REG_RD ,"NUM_REG_RD" ,Tgeneral_address_t ,_param->_size_general_register_logic); |
---|
118 | ALLOC1_SIGNAL_OUT (out_DECOD_WRITE_RE ,"WRITE_RE" ,Tcontrol_t ,1 ); |
---|
119 | ALLOC1_SIGNAL_OUT (out_DECOD_NUM_REG_RE ,"NUM_REG_RE" ,Tspecial_address_t ,_param->_size_special_register_logic); |
---|
120 | ALLOC1_SIGNAL_OUT (out_DECOD_EXCEPTION_USE ,"EXCEPTION_USE" ,Texception_t ,_param->_size_exception_use ); |
---|
121 | ALLOC1_SIGNAL_OUT (out_DECOD_EXCEPTION ,"EXCEPTION" ,Texception_t ,_param->_size_exception ); |
---|
122 | |
---|
123 | ALLOC1_INTERFACE_END(_param->_sum_inst_decod); |
---|
124 | } |
---|
125 | |
---|
126 | // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
127 | { |
---|
128 | ALLOC1_INTERFACE_BEGIN("branch_complete",IN,EAST,_("Branch commit"),_param->_nb_inst_branch_complete); |
---|
129 | |
---|
130 | ALLOC1_VALACK_IN ( in_BRANCH_COMPLETE_VAL , VAL); |
---|
131 | ALLOC1_VALACK_OUT (out_BRANCH_COMPLETE_ACK , ACK); |
---|
132 | ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_CONTEXT_ID ,"CONTEXT_ID" ,Tcontext_t ,_param->_size_context_id); |
---|
133 | ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_DEPTH ,"DEPTH" ,Tdepth_t ,_param->_size_depth ); |
---|
134 | ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS ,"ADDRESS" ,Taddress_t ,_param->_size_instruction_address); |
---|
135 | ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_NO_SEQUENCE ,"NO_SEQUENCE" ,Tcontrol_t ,1 ); |
---|
136 | ALLOC1_SIGNAL_OUT (out_BRANCH_COMPLETE_MISS_PREDICTION ,"MISS_PREDICTION" ,Tcontrol_t ,1 ); |
---|
137 | |
---|
138 | ALLOC1_INTERFACE_END(_param->_nb_inst_branch_complete); |
---|
139 | } |
---|
140 | |
---|
141 | // ~~~~~[ Interface : "commit_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
142 | { |
---|
143 | ALLOC0_INTERFACE_BEGIN("commit_event",IN,EAST,_("Out Of Order engine have an event")); |
---|
144 | |
---|
145 | ALLOC0_VALACK_IN ( in_COMMIT_EVENT_VAL , VAL); |
---|
146 | ALLOC0_VALACK_OUT (out_COMMIT_EVENT_ACK , ACK); |
---|
147 | ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_CONTEXT_ID ,"CONTEXT_ID" ,Tcontext_t ,_param->_size_context_id); |
---|
148 | ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_DEPTH ,"DEPTH" ,Tdepth_t ,_param->_size_depth ); |
---|
149 | ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_TYPE ,"TYPE" ,Tevent_type_t ,_param->_size_event_type); |
---|
150 | ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_IS_DELAY_SLOT ,"IS_DELAY_SLOT" ,Tcontrol_t ,1 ); |
---|
151 | ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS ,"ADDRESS" ,Taddress_t ,_param->_size_instruction_address ); |
---|
152 | ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS_EPCR_VAL ,"ADDRESS_EPCR_VAL" ,Tcontrol_t ,1 ); |
---|
153 | ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS_EPCR ,"ADDRESS_EPCR" ,Taddress_t ,_param->_size_instruction_address ); |
---|
154 | ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL ,"ADDRESS_EEAR_VAL" ,Tcontrol_t ,1 ); |
---|
155 | ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS_EEAR ,"ADDRESS_EEAR" ,Tgeneral_data_t ,_param->_size_general_data ); |
---|
156 | |
---|
157 | ALLOC0_INTERFACE_END(); |
---|
158 | } |
---|
159 | |
---|
160 | // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
161 | { |
---|
162 | ALLOC1_INTERFACE_BEGIN("event",OUT,EAST,_("Event interface"),_param->_nb_context); |
---|
163 | |
---|
164 | ALLOC1_VALACK_OUT (out_EVENT_VAL , VAL); |
---|
165 | ALLOC1_VALACK_IN ( in_EVENT_ACK , ACK); |
---|
166 | ALLOC1_SIGNAL_OUT (out_EVENT_ADDRESS ,"ADDRESS" ,Taddress_t ,_param->_size_instruction_address); |
---|
167 | ALLOC1_SIGNAL_OUT (out_EVENT_ADDRESS_NEXT ,"ADDRESS_NEXT" ,Taddress_t ,_param->_size_instruction_address); |
---|
168 | ALLOC1_SIGNAL_OUT (out_EVENT_ADDRESS_NEXT_VAL ,"ADDRESS_NEXT_VAL" ,Tcontrol_t ,1 ); |
---|
169 | ALLOC1_SIGNAL_OUT (out_EVENT_IS_DS_TAKE ,"IS_DS_TAKE" ,Tcontrol_t ,1 ); |
---|
170 | |
---|
171 | ALLOC1_INTERFACE_END(_param->_nb_context); |
---|
172 | } |
---|
173 | |
---|
174 | // ~~~~~[ Interface "spr_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
175 | { |
---|
176 | ALLOC1_INTERFACE_BEGIN("spr_event",OUT,EAST,_("Event interface with the special registerFile"),_param->_nb_context); |
---|
177 | |
---|
178 | ALLOC1_VALACK_OUT (out_SPR_EVENT_VAL , VAL); |
---|
179 | ALLOC1_VALACK_IN ( in_SPR_EVENT_ACK , ACK); |
---|
180 | ALLOC1_SIGNAL_OUT (out_SPR_EVENT_EPCR ,"EPCR" ,Tspr_t ,_param->_size_spr); |
---|
181 | ALLOC1_SIGNAL_OUT (out_SPR_EVENT_EEAR_WEN ,"EEAR_WEN" ,Tcontrol_t ,1 ); |
---|
182 | ALLOC1_SIGNAL_OUT (out_SPR_EVENT_EEAR ,"EEAR" ,Tspr_t ,_param->_size_spr); |
---|
183 | ALLOC1_SIGNAL_OUT (out_SPR_EVENT_SR_DSX ,"SR_DSX" ,Tcontrol_t ,1 ); |
---|
184 | ALLOC1_SIGNAL_OUT (out_SPR_EVENT_SR_TO_ESR ,"SR_TO_ESR" ,Tcontrol_t ,1 ); |
---|
185 | |
---|
186 | ALLOC1_INTERFACE_END(_param->_nb_context); |
---|
187 | } |
---|
188 | |
---|
189 | // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
190 | { |
---|
191 | ALLOC1_INTERFACE_BEGIN("nb_inst",IN,EAST,_("Instruction number"),_param->_nb_context); |
---|
192 | |
---|
193 | ALLOC1_SIGNAL_IN ( in_NB_INST_COMMIT_ALL ,"COMMIT_ALL" ,Tcounter_t ,_param->_size_nb_inst_commit); |
---|
194 | ALLOC1_SIGNAL_IN ( in_NB_INST_COMMIT_MEM ,"COMMIT_MEM" ,Tcounter_t ,_param->_size_nb_inst_commit); |
---|
195 | ALLOC1_SIGNAL_OUT (out_NB_INST_DECOD_ALL ,"DECOD_ALL" ,Tcounter_t ,_param->_size_nb_inst_decod ); |
---|
196 | |
---|
197 | ALLOC1_INTERFACE_END(_param->_nb_context); |
---|
198 | } |
---|
199 | |
---|
200 | // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
201 | { |
---|
202 | ALLOC1_INTERFACE_BEGIN("depth",OUT,EAST,_("Interface depth"),_param->_nb_context); |
---|
203 | |
---|
204 | ALLOC1_SIGNAL_OUT (out_DEPTH_MIN ,"MIN" ,Tdepth_t ,_param->_size_depth); |
---|
205 | ALLOC1_SIGNAL_OUT (out_DEPTH_MAX ,"MAX" ,Tdepth_t ,_param->_size_depth); |
---|
206 | ALLOC1_SIGNAL_OUT (out_DEPTH_FULL ,"FULL" ,Tcontrol_t ,1); |
---|
207 | |
---|
208 | ALLOC1_INTERFACE_END(_param->_nb_context); |
---|
209 | } |
---|
210 | |
---|
211 | // ~~~~~[ Interface : "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
212 | { |
---|
213 | ALLOC1_INTERFACE_BEGIN("spr",IN,EAST,_("Interface with the special registerFile"),_param->_nb_context); |
---|
214 | |
---|
215 | ALLOC1_SIGNAL_IN ( in_SPR_SR_IEE ,"SR_IEE" ,Tcontrol_t ,1); |
---|
216 | ALLOC1_SIGNAL_IN ( in_SPR_SR_EPH ,"SR_EPH" ,Tcontrol_t ,1); |
---|
217 | |
---|
218 | ALLOC1_INTERFACE_END(_param->_nb_context); |
---|
219 | } |
---|
220 | |
---|
221 | // ~~~~~[ Interface : "interrupt" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
222 | { |
---|
223 | ALLOC1_INTERFACE_BEGIN("interrupt",IN,NORTH,_("Interrupt Exception"),_param->_nb_context); |
---|
224 | |
---|
225 | ALLOC1_SIGNAL_IN ( in_INTERRUPT_ENABLE ,"ENABLE" ,Tcontrol_t ,1); |
---|
226 | |
---|
227 | ALLOC1_INTERFACE_END(_param->_nb_context); |
---|
228 | } |
---|
229 | |
---|
230 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
231 | std::string name; |
---|
232 | |
---|
233 | _component_ifetch_unit = new morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::Ifetch_unit * [_param->_nb_context]; |
---|
234 | |
---|
235 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
236 | { |
---|
237 | name = _name+"_ifetch_unit_"+toString(i); |
---|
238 | log_printf(TRACE,Front_end,FUNCTION,_("Create : %s"),name.c_str()); |
---|
239 | |
---|
240 | _component_ifetch_unit [i] = new morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::Ifetch_unit |
---|
241 | (name.c_str() |
---|
242 | #ifdef STATISTICS |
---|
243 | ,param_statistics |
---|
244 | #endif |
---|
245 | ,_param->_param_ifetch_unit [i] |
---|
246 | ,_usage); |
---|
247 | |
---|
248 | _component->set_component (_component_ifetch_unit [i]->_component |
---|
249 | #ifdef POSITION |
---|
250 | , 50, 50, 10, 10 |
---|
251 | #endif |
---|
252 | ); |
---|
253 | } |
---|
254 | |
---|
255 | { |
---|
256 | name = _name+"_prediction_unit"; |
---|
257 | log_printf(TRACE,Front_end,FUNCTION,_("Create : %s"),name.c_str()); |
---|
258 | |
---|
259 | _component_prediction_unit = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::Prediction_unit |
---|
260 | (name.c_str() |
---|
261 | #ifdef STATISTICS |
---|
262 | ,param_statistics |
---|
263 | #endif |
---|
264 | ,_param->_param_prediction_unit |
---|
265 | ,_usage); |
---|
266 | |
---|
267 | _component->set_component (_component_prediction_unit->_component |
---|
268 | #ifdef POSITION |
---|
269 | , 50, 50, 10, 10 |
---|
270 | #endif |
---|
271 | ); |
---|
272 | } |
---|
273 | |
---|
274 | _component_decod_unit = new morpheo::behavioural::core::multi_front_end::front_end::decod_unit::Decod_unit * [_param->_nb_decod_unit]; |
---|
275 | |
---|
276 | for (uint32_t i=0; i<_param->_nb_decod_unit; ++i) |
---|
277 | { |
---|
278 | name = _name+"_decod_unit_"+toString(i); |
---|
279 | log_printf(TRACE,Front_end,FUNCTION,_("Create : %s"),name.c_str()); |
---|
280 | |
---|
281 | _component_decod_unit [i] = new morpheo::behavioural::core::multi_front_end::front_end::decod_unit::Decod_unit |
---|
282 | (name.c_str() |
---|
283 | #ifdef STATISTICS |
---|
284 | ,param_statistics |
---|
285 | #endif |
---|
286 | ,_param->_param_decod_unit [i] |
---|
287 | ,_usage); |
---|
288 | |
---|
289 | _component->set_component (_component_decod_unit [i]->_component |
---|
290 | #ifdef POSITION |
---|
291 | , 50, 50, 10, 10 |
---|
292 | #endif |
---|
293 | ); |
---|
294 | } |
---|
295 | |
---|
296 | { |
---|
297 | name = _name+"_context_state"; |
---|
298 | log_printf(TRACE,Front_end,FUNCTION,_("Create : %s"),name.c_str()); |
---|
299 | |
---|
300 | _component_context_state = new morpheo::behavioural::core::multi_front_end::front_end::context_state::Context_State |
---|
301 | (name.c_str() |
---|
302 | #ifdef STATISTICS |
---|
303 | ,param_statistics |
---|
304 | #endif |
---|
305 | ,_param->_param_context_state |
---|
306 | ,_usage); |
---|
307 | |
---|
308 | _component->set_component (_component_context_state->_component |
---|
309 | #ifdef POSITION |
---|
310 | , 50, 50, 10, 10 |
---|
311 | #endif |
---|
312 | ); |
---|
313 | } |
---|
314 | |
---|
315 | { |
---|
316 | name = _name+"_glue"; |
---|
317 | log_printf(TRACE,Front_end,FUNCTION,_("Create : %s"),name.c_str()); |
---|
318 | |
---|
319 | _component_glue = new morpheo::behavioural::core::multi_front_end::front_end::front_end_glue::Front_end_Glue |
---|
320 | (name.c_str() |
---|
321 | #ifdef STATISTICS |
---|
322 | ,param_statistics |
---|
323 | #endif |
---|
324 | ,_param->_param_glue |
---|
325 | ,_usage); |
---|
326 | |
---|
327 | _component->set_component (_component_glue->_component |
---|
328 | #ifdef POSITION |
---|
329 | , 50, 50, 10, 10 |
---|
330 | #endif |
---|
331 | ); |
---|
332 | } |
---|
333 | |
---|
334 | |
---|
335 | // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
336 | std::string src,dest; |
---|
337 | |
---|
338 | // =================================================================== |
---|
339 | // =====[ ifetch_unit ]=============================================== |
---|
340 | // =================================================================== |
---|
341 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
342 | { |
---|
343 | src = _name+"_ifetch_unit_"+toString(i); |
---|
344 | log_printf(TRACE,Front_end,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
345 | |
---|
346 | { |
---|
347 | dest = _name; |
---|
348 | #ifdef POSITION |
---|
349 | _component->interface_map (src ,"", |
---|
350 | dest,""); |
---|
351 | #endif |
---|
352 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
353 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
354 | } |
---|
355 | |
---|
356 | // ~~~~~[ Interface "icache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
357 | { |
---|
358 | dest = _name; |
---|
359 | #ifdef POSITION |
---|
360 | _component->interface_map (src ,"icache_req", |
---|
361 | dest,"icache_req_"+toString(i)); |
---|
362 | #endif |
---|
363 | |
---|
364 | PORT_MAP(_component,src ,"out_ICACHE_REQ_VAL" ,dest,"out_ICACHE_REQ_"+toString(i)+"_VAL" ); |
---|
365 | PORT_MAP(_component,src , "in_ICACHE_REQ_ACK" ,dest, "in_ICACHE_REQ_"+toString(i)+"_ACK" ); |
---|
366 | //PORT_MAP(_component,src ,"out_ICACHE_REQ_THREAD_ID",dest,"out_ICACHE_REQ_"+toString(i)+"_THREAD_ID"); |
---|
367 | if (_param->_have_port_ifetch_queue_ptr) |
---|
368 | PORT_MAP(_component,src ,"out_ICACHE_REQ_PACKET_ID",dest,"out_ICACHE_REQ_"+toString(i)+"_PACKET_ID"); |
---|
369 | PORT_MAP(_component,src ,"out_ICACHE_REQ_ADDRESS" ,dest,"out_ICACHE_REQ_"+toString(i)+"_ADDRESS" ); |
---|
370 | PORT_MAP(_component,src ,"out_ICACHE_REQ_TYPE" ,dest,"out_ICACHE_REQ_"+toString(i)+"_TYPE" ); |
---|
371 | } |
---|
372 | |
---|
373 | // ~~~~~[ Interface "icache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
374 | { |
---|
375 | dest = _name; |
---|
376 | #ifdef POSITION |
---|
377 | _component->interface_map (src ,"icache_rsp", |
---|
378 | dest,"icache_rsp_"+toString(i)); |
---|
379 | #endif |
---|
380 | |
---|
381 | PORT_MAP(_component,src , "in_ICACHE_RSP_VAL" ,dest, "in_ICACHE_RSP_"+toString(i)+"_VAL" ); |
---|
382 | PORT_MAP(_component,src ,"out_ICACHE_RSP_ACK" ,dest,"out_ICACHE_RSP_"+toString(i)+"_ACK" ); |
---|
383 | // PORT_MAP(_component,src , "in_ICACHE_RSP_THREAD_ID" ,dest, "in_ICACHE_RSP_"+toString(i)+"_THREAD_ID" ); |
---|
384 | if (_param->_have_port_ifetch_queue_ptr) |
---|
385 | PORT_MAP(_component,src , "in_ICACHE_RSP_PACKET_ID" ,dest, "in_ICACHE_RSP_"+toString(i)+"_PACKET_ID" ); |
---|
386 | PORT_MAP(_component,src , "in_ICACHE_RSP_ERROR" ,dest, "in_ICACHE_RSP_"+toString(i)+"_ERROR" ); |
---|
387 | |
---|
388 | for (uint32_t j=0; j<_param->_nb_inst_fetch [i]; ++j) |
---|
389 | { |
---|
390 | #ifdef POSITION |
---|
391 | _component->interface_map (src ,"icache_rsp_"+toString(j), |
---|
392 | dest,"icache_rsp_"+toString(i)+"_"+toString(j)); |
---|
393 | #endif |
---|
394 | |
---|
395 | PORT_MAP(_component,src , "in_ICACHE_RSP_"+toString(j)+"_INSTRUCTION",dest, "in_ICACHE_RSP_"+toString(i)+"_"+toString(j)+"_INSTRUCTION"); |
---|
396 | } |
---|
397 | } |
---|
398 | |
---|
399 | // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
400 | { |
---|
401 | dest = _name+"_prediction_unit"; |
---|
402 | #ifdef POSITION |
---|
403 | _component->interface_map (src ,"predict" |
---|
404 | dest,"predict_"+toString(i)); |
---|
405 | #endif |
---|
406 | |
---|
407 | COMPONENT_MAP(_component,src ,"out_PREDICT_VAL" ,dest, "in_PREDICT_"+toString(i)+"_VAL" ); |
---|
408 | COMPONENT_MAP(_component,src , "in_PREDICT_ACK" ,dest,"out_PREDICT_"+toString(i)+"_ACK" ); |
---|
409 | COMPONENT_MAP(_component,src ,"out_PREDICT_PC_PREVIOUS" ,dest, "in_PREDICT_"+toString(i)+"_PC_PREVIOUS" ); |
---|
410 | COMPONENT_MAP(_component,src ,"out_PREDICT_PC_CURRENT" ,dest, "in_PREDICT_"+toString(i)+"_PC_CURRENT" ); |
---|
411 | COMPONENT_MAP(_component,src ,"out_PREDICT_PC_CURRENT_IS_DS_TAKE" ,dest, "in_PREDICT_"+toString(i)+"_PC_CURRENT_IS_DS_TAKE" ); |
---|
412 | COMPONENT_MAP(_component,src , "in_PREDICT_PC_NEXT" ,dest,"out_PREDICT_"+toString(i)+"_PC_NEXT" ); |
---|
413 | COMPONENT_MAP(_component,src , "in_PREDICT_PC_NEXT_IS_DS_TAKE" ,dest,"out_PREDICT_"+toString(i)+"_PC_NEXT_IS_DS_TAKE" ); |
---|
414 | if (_param->_have_port_inst_ifetch_ptr) |
---|
415 | COMPONENT_MAP(_component,src , "in_PREDICT_INST_IFETCH_PTR" ,dest,"out_PREDICT_"+toString(i)+"_INST_IFETCH_PTR" ); |
---|
416 | COMPONENT_MAP(_component,src , "in_PREDICT_BRANCH_STATE" ,dest,"out_PREDICT_"+toString(i)+"_BRANCH_STATE" ); |
---|
417 | if (_param->_have_port_depth) |
---|
418 | COMPONENT_MAP(_component,src , "in_PREDICT_BRANCH_UPDATE_PREDICTION_ID",dest,"out_PREDICT_"+toString(i)+"_BRANCH_UPDATE_PREDICTION_ID"); |
---|
419 | |
---|
420 | for (uint32_t j=0; j<_param->_nb_inst_fetch[i]; ++j) |
---|
421 | { |
---|
422 | #ifdef POSITION |
---|
423 | _component->interface_map (src ,"predict_"+toString(j) |
---|
424 | dest,"predict_"+toString(i)+"_"+toString(j)); |
---|
425 | #endif |
---|
426 | |
---|
427 | COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(j)+ "_INSTRUCTION_ENABLE", |
---|
428 | dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_INSTRUCTION_ENABLE"); |
---|
429 | } |
---|
430 | } |
---|
431 | |
---|
432 | // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
433 | { |
---|
434 | uint32_t num_decod_unit = _param->_link_context_to_decod_unit[i]; |
---|
435 | uint32_t num_context; |
---|
436 | |
---|
437 | for (num_context=0; num_context<_param->_decod_unit_nb_context[num_decod_unit]; num_context ++) |
---|
438 | if (_param->_translate_context_id_from_decod_unit [num_decod_unit][num_context] == i) |
---|
439 | break; |
---|
440 | |
---|
441 | dest = _name+"_decod_unit_"+toString(num_decod_unit); |
---|
442 | #ifdef POSITION |
---|
443 | _component->interface_map (src ,"decod" |
---|
444 | dest,"ifetch_"+toString(num_context)); |
---|
445 | #endif |
---|
446 | |
---|
447 | ////out_DECOD_CONTEXT_ID |
---|
448 | |
---|
449 | COMPONENT_MAP(_component,src ,"out_DECOD_ADDRESS" ,dest, "in_IFETCH_"+toString(num_context)+"_ADDRESS" ); |
---|
450 | if (_param->_have_port_inst_ifetch_ptr) |
---|
451 | COMPONENT_MAP(_component,src ,"out_DECOD_INST_IFETCH_PTR" ,dest, "in_IFETCH_"+toString(num_context)+"_INST_IFETCH_PTR" ); |
---|
452 | COMPONENT_MAP(_component,src ,"out_DECOD_BRANCH_STATE" ,dest, "in_IFETCH_"+toString(num_context)+"_BRANCH_STATE" ); |
---|
453 | if (_param->_have_port_depth) |
---|
454 | COMPONENT_MAP(_component,src ,"out_DECOD_BRANCH_UPDATE_PREDICTION_ID",dest, "in_IFETCH_"+toString(num_context)+"_BRANCH_UPDATE_PREDICTION_ID"); |
---|
455 | COMPONENT_MAP(_component,src ,"out_DECOD_EXCEPTION" ,dest, "in_IFETCH_"+toString(num_context)+"_EXCEPTION" ); |
---|
456 | |
---|
457 | for (uint32_t j=0; j<_param->_nb_inst_fetch [i];++j) |
---|
458 | { |
---|
459 | dest = _name+"_decod_unit_"+toString(num_decod_unit); |
---|
460 | #ifdef POSITION |
---|
461 | _component->interface_map (src ,"decod_"+toString(j) |
---|
462 | dest,"ifetch_"+toString(num_context)+"_"+toString(j)); |
---|
463 | #endif |
---|
464 | |
---|
465 | COMPONENT_MAP(_component,src ,"out_DECOD_" +toString(j)+ "_VAL" , |
---|
466 | dest, "in_IFETCH_"+toString(num_context)+"_"+toString(j)+"_VAL" ); |
---|
467 | COMPONENT_MAP(_component,src , "in_DECOD_" +toString(j)+ "_ACK" , |
---|
468 | dest,"out_IFETCH_"+toString(num_context)+"_"+toString(j)+"_ACK" ); |
---|
469 | COMPONENT_MAP(_component,src ,"out_DECOD_" +toString(j)+ "_INSTRUCTION", |
---|
470 | dest, "in_IFETCH_"+toString(num_context)+"_"+toString(j)+"_INSTRUCTION"); |
---|
471 | } |
---|
472 | } |
---|
473 | |
---|
474 | // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
475 | { |
---|
476 | dest = _name+"_glue"; |
---|
477 | #ifdef POSITION |
---|
478 | _component->interface_map (src ,"event", |
---|
479 | dest,"event_"+toString(i)); |
---|
480 | #endif |
---|
481 | |
---|
482 | COMPONENT_MAP(_component,src , "in_EVENT_VAL" , |
---|
483 | dest,"out_EVENT_"+toString(i)+"_IFETCH_UNIT_VAL" ); |
---|
484 | COMPONENT_MAP(_component,src ,"out_EVENT_ACK" , |
---|
485 | dest, "in_EVENT_"+toString(i)+"_IFETCH_UNIT_ACK" ); |
---|
486 | COMPONENT_MAP(_component,src , "in_EVENT_ADDRESS" , |
---|
487 | dest,"out_EVENT_"+toString(i)+"_IFETCH_UNIT_ADDRESS" ); |
---|
488 | COMPONENT_MAP(_component,src , "in_EVENT_ADDRESS_NEXT" , |
---|
489 | dest,"out_EVENT_"+toString(i)+"_IFETCH_UNIT_ADDRESS_NEXT" ); |
---|
490 | COMPONENT_MAP(_component,src , "in_EVENT_ADDRESS_NEXT_VAL", |
---|
491 | dest,"out_EVENT_"+toString(i)+"_IFETCH_UNIT_ADDRESS_NEXT_VAL"); |
---|
492 | COMPONENT_MAP(_component,src , "in_EVENT_IS_DS_TAKE" , |
---|
493 | dest,"out_EVENT_"+toString(i)+"_IFETCH_UNIT_IS_DS_TAKE" ); |
---|
494 | } |
---|
495 | } |
---|
496 | |
---|
497 | // =================================================================== |
---|
498 | // =====[ prediction_unit ]=========================================== |
---|
499 | // =================================================================== |
---|
500 | { |
---|
501 | src = _name+"_prediction_unit"; |
---|
502 | log_printf(TRACE,Front_end,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
503 | |
---|
504 | { |
---|
505 | dest = _name; |
---|
506 | #ifdef POSITION |
---|
507 | _component->interface_map (src ,"", |
---|
508 | dest,""); |
---|
509 | #endif |
---|
510 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
511 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
512 | } |
---|
513 | |
---|
514 | // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
515 | // in_PREDICT_VAL - component_ifetch_unit |
---|
516 | // out_PREDICT_ACK - component_ifetch_unit |
---|
517 | // in_PREDICT_PC_PREVIOUS - component_ifetch_unit |
---|
518 | // in_PREDICT_PC_CURRENT - component_ifetch_unit |
---|
519 | // in_PREDICT_PC_CURRENT_IS_DS_TAKE - component_ifetch_unit |
---|
520 | // out_PREDICT_PC_NEXT - component_ifetch_unit |
---|
521 | // out_PREDICT_PC_NEXT_IS_DS_TAKE - component_ifetch_unit |
---|
522 | // out_PREDICT_INSTRUCTION_ENABLE - component_ifetch_unit |
---|
523 | // out_PREDICT_INST_IFETCH_PTR - component_ifetch_unit |
---|
524 | // out_PREDICT_BRANCH_STATE - component_ifetch_unit |
---|
525 | // out_PREDICT_BRANCH_UPDATE_PREDICTION_ID - component_ifetch_unit |
---|
526 | |
---|
527 | // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
528 | // in_DECOD_VAL - component_decod_unit |
---|
529 | // out_DECOD_ACK - component_decod_unit |
---|
530 | // in_DECOD_CONTEXT_ID - component_decod_unit |
---|
531 | // in_DECOD_MATCH_INST_IFETCH_PTR - component_decod_unit |
---|
532 | // in_DECOD_BRANCH_STATE - component_decod_unit |
---|
533 | // in_DECOD_BRANCH_UPDATE_PREDICTION_ID - component_decod_unit |
---|
534 | // in_DECOD_BRANCH_CONDITION - component_decod_unit |
---|
535 | // in_DECOD_BRANCH_DIRECTION - component_decod_unit |
---|
536 | // in_DECOD_ADDRESS_SRC - component_decod_unit |
---|
537 | // in_DECOD_ADDRESS_DEST - component_decod_unit |
---|
538 | |
---|
539 | // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
540 | for (uint32_t i=0; i<_param->_nb_inst_branch_complete; ++i) |
---|
541 | { |
---|
542 | dest = _name+"_glue"; |
---|
543 | #ifdef POSITION |
---|
544 | _component->interface_map (src ,"branch_complete_"+toString(i), |
---|
545 | dest,"branch_complete_"+toString(i)); |
---|
546 | #endif |
---|
547 | |
---|
548 | COMPONENT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+ "_VAL" , |
---|
549 | dest,"out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTION_UNIT_VAL" ); |
---|
550 | COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+ "_ACK" , |
---|
551 | dest, "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTION_UNIT_ACK" ); |
---|
552 | COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+ "_MISS_PREDICTION", |
---|
553 | dest, "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTION_UNIT_MISS_PREDICTION"); |
---|
554 | |
---|
555 | dest = _name; |
---|
556 | #ifdef POSITION |
---|
557 | _component->interface_map (src ,"branch_complete_"+toString(i), |
---|
558 | dest,"branch_complete_"+toString(i)); |
---|
559 | #endif |
---|
560 | |
---|
561 | if (_param->_have_port_context_id) |
---|
562 | PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID", |
---|
563 | dest, "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID"); |
---|
564 | if (_param->_have_port_depth) |
---|
565 | PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH" , |
---|
566 | dest, "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH" ); |
---|
567 | PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS" , |
---|
568 | dest, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS" ); |
---|
569 | PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_NO_SEQUENCE", |
---|
570 | dest, "in_BRANCH_COMPLETE_"+toString(i)+"_NO_SEQUENCE"); |
---|
571 | |
---|
572 | // dest = _name+"_context_state"; |
---|
573 | // #ifdef POSITION |
---|
574 | // _component->interface_map (src ,"branch_complete_"+toString(i), |
---|
575 | // dest,"branch_complete_"+toString(i)); |
---|
576 | // #endif |
---|
577 | |
---|
578 | // COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_TAKE" , |
---|
579 | // dest, "in_BRANCH_COMPLETE_"+toString(i)+"_TAKE" ); |
---|
580 | // COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC" , |
---|
581 | // dest, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC" ); |
---|
582 | // COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST", |
---|
583 | // dest, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST"); |
---|
584 | } |
---|
585 | |
---|
586 | // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
587 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
588 | { |
---|
589 | dest = _name+"_context_state"; |
---|
590 | #ifdef POSITION |
---|
591 | _component->interface_map (src ,"branch_event_"+toString(i), |
---|
592 | dest,"branch_event_"+toString(i)); |
---|
593 | #endif |
---|
594 | |
---|
595 | COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_VAL" , |
---|
596 | dest, "in_BRANCH_EVENT_"+toString(i)+"_VAL" ); |
---|
597 | COMPONENT_MAP(_component,src , "in_BRANCH_EVENT_"+toString(i)+"_ACK" , |
---|
598 | dest,"out_BRANCH_EVENT_"+toString(i)+"_ACK" ); |
---|
599 | // COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_CONTEXT_ID" , |
---|
600 | // dest, "in_BRANCH_EVENT_"+toString(i)+"_CONTEXT_ID" ); |
---|
601 | if (_param->_have_port_depth) |
---|
602 | COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_DEPTH" , |
---|
603 | dest, "in_BRANCH_EVENT_"+toString(i)+"_DEPTH" ); |
---|
604 | // COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_MISS_PREDICTION" , |
---|
605 | // dest, "in_BRANCH_EVENT_"+toString(i)+"_MISS_PREDICTION" ); |
---|
606 | COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_SRC" , |
---|
607 | dest, "in_BRANCH_EVENT_"+toString(i)+"_ADDRESS_SRC" ); |
---|
608 | COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_DEST_VAL", |
---|
609 | dest, "in_BRANCH_EVENT_"+toString(i)+"_ADDRESS_DEST_VAL"); |
---|
610 | COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_DEST" , |
---|
611 | dest, "in_BRANCH_EVENT_"+toString(i)+"_ADDRESS_DEST" ); |
---|
612 | } |
---|
613 | |
---|
614 | // ~~~~~[ Interface : "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
615 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
616 | { |
---|
617 | dest = _name+"_glue"; |
---|
618 | #ifdef POSITION |
---|
619 | _component->interface_map (src ,"event_"+toString(i), |
---|
620 | dest,"event_"+toString(i)); |
---|
621 | #endif |
---|
622 | COMPONENT_MAP(_component,src , "in_EVENT_"+toString(i)+ "_VAL" , |
---|
623 | dest,"out_EVENT_"+toString(i)+"_PREDICTION_UNIT_VAL" ); |
---|
624 | COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+ "_ACK" , |
---|
625 | dest, "in_EVENT_"+toString(i)+"_PREDICTION_UNIT_ACK" ); |
---|
626 | COMPONENT_MAP(_component,src , "in_EVENT_"+toString(i)+ "_TYPE" , |
---|
627 | dest,"out_EVENT_"+toString(i)+"_PREDICTION_UNIT_TYPE" ); |
---|
628 | if (_param->_have_port_depth) |
---|
629 | COMPONENT_MAP(_component,src , "in_EVENT_"+toString(i)+ "_DEPTH", |
---|
630 | dest,"out_EVENT_"+toString(i)+"_PREDICTION_UNIT_DEPTH"); |
---|
631 | } |
---|
632 | |
---|
633 | // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
634 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
635 | { |
---|
636 | dest = _name+"_glue"; |
---|
637 | #ifdef POSITION |
---|
638 | _component->interface_map (src ,"depth_"+toString(i), |
---|
639 | dest,"depth_"+toString(i)); |
---|
640 | #endif |
---|
641 | |
---|
642 | COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+ "_VAL", |
---|
643 | dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_VAL"); |
---|
644 | if (_param->_have_port_depth) |
---|
645 | { |
---|
646 | COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+ "_CURRENT", |
---|
647 | dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_CURRENT"); |
---|
648 | COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+ "_MIN" , |
---|
649 | dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_MIN" ); |
---|
650 | COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+ "_MAX" , |
---|
651 | dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_MAX" ); |
---|
652 | } |
---|
653 | COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+ "_FULL" , |
---|
654 | dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_FULL" ); |
---|
655 | } |
---|
656 | } |
---|
657 | |
---|
658 | // =================================================================== |
---|
659 | // =====[ decod_unit ]================================================ |
---|
660 | // =================================================================== |
---|
661 | { |
---|
662 | uint32_t x=0; |
---|
663 | for (uint32_t i=0; i<_param->_nb_decod_unit; ++i) |
---|
664 | { |
---|
665 | src = _name+"_decod_unit_"+toString(i); |
---|
666 | log_printf(TRACE,Front_end,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
667 | |
---|
668 | { |
---|
669 | dest = _name; |
---|
670 | #ifdef POSITION |
---|
671 | _component->interface_map (src ,"", |
---|
672 | dest,""); |
---|
673 | #endif |
---|
674 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
675 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
676 | } |
---|
677 | |
---|
678 | // ~~~~~[ Interface : "ifetch" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
679 | // in_IFETCH_VAL - component_ifetch_unit |
---|
680 | // out_IFETCH_ACK - component_ifetch_unit |
---|
681 | // in_IFETCH_INSTRUCTION - component_ifetch_unit |
---|
682 | // in_IFETCH_CONTEXT_ID - component_ifetch_unit |
---|
683 | // in_IFETCH_ADDRESS - component_ifetch_unit |
---|
684 | //// in_IFETCH_ADDRESS_NEXT - component_ifetch_unit |
---|
685 | // in_IFETCH_INST_IFETCH_PTR - component_ifetch_unit |
---|
686 | // in_IFETCH_BRANCH_STATE - component_ifetch_unit |
---|
687 | // in_IFETCH_BRANCH_UPDATE_PREDICTION_ID - component_ifetch_unit |
---|
688 | // in_IFETCH_EXCEPTION - component_ifetch_unit |
---|
689 | |
---|
690 | for (uint32_t j=0; j<_param->_decod_unit_nb_context[i]; ++j) |
---|
691 | { |
---|
692 | dest = _name+"_glue"; |
---|
693 | #ifdef POSITION |
---|
694 | _component->interface_map (src ,"ifetch_"+toString(j), |
---|
695 | dest,"ifetch_"+toString(i)+"_"+toString(j)); |
---|
696 | #endif |
---|
697 | |
---|
698 | if (_param->_have_port_context_id) |
---|
699 | COMPONENT_MAP(_component,src , "in_IFETCH_"+toString(j) +"_CONTEXT_ID", |
---|
700 | dest,"out_IFETCH_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_CONTEXT_ID"); |
---|
701 | } |
---|
702 | |
---|
703 | // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
704 | for (uint32_t j=0; j<_param->_nb_inst_decod [i]; ++j) |
---|
705 | { |
---|
706 | dest = _name; |
---|
707 | #ifdef POSITION |
---|
708 | _component->interface_map (src ,"decod_"+toString(j), |
---|
709 | dest,"decod_"+toString(x)); |
---|
710 | #endif |
---|
711 | |
---|
712 | |
---|
713 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_VAL" , |
---|
714 | dest,"out_DECOD_"+toString(x)+"_VAL" ); |
---|
715 | PORT_MAP(_component,src , "in_DECOD_"+toString(j)+"_ACK" , |
---|
716 | dest, "in_DECOD_"+toString(x)+"_ACK" ); |
---|
717 | if (_param->_have_port_depth) |
---|
718 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_DEPTH" , |
---|
719 | dest,"out_DECOD_"+toString(x)+"_DEPTH" ); |
---|
720 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_TYPE" , |
---|
721 | dest,"out_DECOD_"+toString(x)+"_TYPE" ); |
---|
722 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_OPERATION" , |
---|
723 | dest,"out_DECOD_"+toString(x)+"_OPERATION" ); |
---|
724 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NO_EXECUTE" , |
---|
725 | dest,"out_DECOD_"+toString(x)+"_NO_EXECUTE" ); |
---|
726 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_IS_DELAY_SLOT", |
---|
727 | dest,"out_DECOD_"+toString(x)+"_IS_DELAY_SLOT"); |
---|
728 | #ifdef DEBUG |
---|
729 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_ADDRESS" , |
---|
730 | dest,"out_DECOD_"+toString(x)+"_ADDRESS" ); |
---|
731 | #endif |
---|
732 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_ADDRESS_NEXT" , |
---|
733 | dest,"out_DECOD_"+toString(x)+"_ADDRESS_NEXT" ); |
---|
734 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_HAS_IMMEDIAT" , |
---|
735 | dest,"out_DECOD_"+toString(x)+"_HAS_IMMEDIAT" ); |
---|
736 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_IMMEDIAT" , |
---|
737 | dest,"out_DECOD_"+toString(x)+"_IMMEDIAT" ); |
---|
738 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_READ_RA" , |
---|
739 | dest,"out_DECOD_"+toString(x)+"_READ_RA" ); |
---|
740 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NUM_REG_RA" , |
---|
741 | dest,"out_DECOD_"+toString(x)+"_NUM_REG_RA" ); |
---|
742 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_READ_RB" , |
---|
743 | dest,"out_DECOD_"+toString(x)+"_READ_RB" ); |
---|
744 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NUM_REG_RB" , |
---|
745 | dest,"out_DECOD_"+toString(x)+"_NUM_REG_RB" ); |
---|
746 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_READ_RC" , |
---|
747 | dest,"out_DECOD_"+toString(x)+"_READ_RC" ); |
---|
748 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NUM_REG_RC" , |
---|
749 | dest,"out_DECOD_"+toString(x)+"_NUM_REG_RC" ); |
---|
750 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_WRITE_RD" , |
---|
751 | dest,"out_DECOD_"+toString(x)+"_WRITE_RD" ); |
---|
752 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NUM_REG_RD" , |
---|
753 | dest,"out_DECOD_"+toString(x)+"_NUM_REG_RD" ); |
---|
754 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_WRITE_RE" , |
---|
755 | dest,"out_DECOD_"+toString(x)+"_WRITE_RE" ); |
---|
756 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NUM_REG_RE" , |
---|
757 | dest,"out_DECOD_"+toString(x)+"_NUM_REG_RE" ); |
---|
758 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_EXCEPTION_USE", |
---|
759 | dest,"out_DECOD_"+toString(x)+"_EXCEPTION_USE"); |
---|
760 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_EXCEPTION" , |
---|
761 | dest,"out_DECOD_"+toString(x)+"_EXCEPTION" ); |
---|
762 | |
---|
763 | dest = _name+"_glue"; |
---|
764 | #ifdef POSITION |
---|
765 | _component->interface_map (src ,"decod_"+toString(j), |
---|
766 | dest,"decod_"+toString(i)+"_"+toString(j)); |
---|
767 | #endif |
---|
768 | |
---|
769 | if (_param->_have_port_context_id) |
---|
770 | COMPONENT_MAP(_component,src ,"out_DECOD_"+toString(j)+ "_CONTEXT_ID" , |
---|
771 | dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_CONTEXT_ID" ); |
---|
772 | |
---|
773 | x++; |
---|
774 | } |
---|
775 | |
---|
776 | // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
777 | for (uint32_t j=0; j<_param->_nb_inst_decod[i]; ++j) |
---|
778 | { |
---|
779 | dest = _name+"_prediction_unit"; |
---|
780 | #ifdef POSITION |
---|
781 | _component->interface_map (src ,"predict_"+toString(j), |
---|
782 | dest,"decod_"+toString(i)+"_"+toString(j)); |
---|
783 | #endif |
---|
784 | |
---|
785 | COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+ "_VAL" , |
---|
786 | dest, "in_DECOD_" +toString(i)+"_"+toString(j)+"_VAL" ); |
---|
787 | COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(j)+ "_ACK" , |
---|
788 | dest,"out_DECOD_" +toString(i)+"_"+toString(j)+"_ACK" ); |
---|
789 | if (_param->_have_port_context_id) |
---|
790 | COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+ "_CONTEXT_ID" , |
---|
791 | dest, "in_DECOD_" +toString(i)+"_"+toString(j)+"_CONTEXT_ID" ); |
---|
792 | COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+ "_MATCH_INST_IFETCH_PTR" , |
---|
793 | dest, "in_DECOD_" +toString(i)+"_"+toString(j)+"_MATCH_INST_IFETCH_PTR" ); |
---|
794 | COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+ "_BRANCH_STATE" , |
---|
795 | dest, "in_DECOD_" +toString(i)+"_"+toString(j)+"_BRANCH_STATE" ); |
---|
796 | if (_param->_have_port_depth) |
---|
797 | COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+ "_BRANCH_UPDATE_PREDICTION_ID", |
---|
798 | dest, "in_DECOD_" +toString(i)+"_"+toString(j)+"_BRANCH_UPDATE_PREDICTION_ID"); |
---|
799 | COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+ "_BRANCH_CONDITION" , |
---|
800 | dest, "in_DECOD_" +toString(i)+"_"+toString(j)+"_BRANCH_CONDITION" ); |
---|
801 | COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+ "_BRANCH_DIRECTION" , |
---|
802 | dest, "in_DECOD_" +toString(i)+"_"+toString(j)+"_BRANCH_DIRECTION" ); |
---|
803 | // COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+ "_BRANCH_STACK_WRITE" , |
---|
804 | // dest, "in_DECOD_" +toString(i)+"_"+toString(j)+"_BRANCH_STACK_WRITE" ); |
---|
805 | COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+ "_ADDRESS_SRC" , |
---|
806 | dest, "in_DECOD_" +toString(i)+"_"+toString(j)+"_ADDRESS_SRC" ); |
---|
807 | COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+ "_ADDRESS_DEST" , |
---|
808 | dest, "in_DECOD_" +toString(i)+"_"+toString(j)+"_ADDRESS_DEST" ); |
---|
809 | COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(j)+ "_CAN_CONTINUE" , |
---|
810 | dest,"out_DECOD_" +toString(i)+"_"+toString(j)+"_CAN_CONTINUE" ); |
---|
811 | |
---|
812 | } |
---|
813 | |
---|
814 | // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
815 | for (uint32_t j=0; j<_param->_decod_unit_nb_context[i]; ++j) |
---|
816 | { |
---|
817 | // uint32_t y=(_param->_translate_context_id_from_decod_unit[i])[j]; |
---|
818 | |
---|
819 | dest = _name+"_glue"; |
---|
820 | #ifdef POSITION |
---|
821 | _component->interface_map (src ,"depth_"+toString(j), |
---|
822 | dest,"depth_"+toString(j)); |
---|
823 | #endif |
---|
824 | |
---|
825 | if (_param->_have_port_depth) |
---|
826 | { |
---|
827 | COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(j)+ "_MIN", |
---|
828 | dest,"out_DEPTH_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_MIN"); |
---|
829 | COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(j)+ "_MAX", |
---|
830 | dest,"out_DEPTH_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_MAX"); |
---|
831 | } |
---|
832 | COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(j)+ "_FULL", |
---|
833 | dest,"out_DEPTH_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_FULL"); |
---|
834 | |
---|
835 | } |
---|
836 | |
---|
837 | // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
838 | for (uint32_t j=0; j<_param->_decod_unit_nb_context[i]; ++j) |
---|
839 | { |
---|
840 | uint32_t y=(_param->_translate_context_id_from_decod_unit[i])[j]; |
---|
841 | |
---|
842 | dest = _name+"_glue"; |
---|
843 | #ifdef POSITION |
---|
844 | _component->interface_map (src ,"nb_inst_"+toString(j), |
---|
845 | dest,"nb_inst_"+toString(y)); |
---|
846 | #endif |
---|
847 | |
---|
848 | COMPONENT_MAP(_component,src ,"out_NB_INST_"+toString(j)+ "_DECOD_ALL", |
---|
849 | dest, "in_NB_INST_"+toString(y)+"_DECOD_UNIT_DECOD_ALL"); |
---|
850 | } |
---|
851 | |
---|
852 | // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
853 | for (uint32_t j=0; j<_param->_decod_unit_nb_context[i]; ++j) |
---|
854 | { |
---|
855 | uint32_t y=(_param->_translate_context_id_from_decod_unit[i])[j]; |
---|
856 | |
---|
857 | dest = _name+"_context_state"; |
---|
858 | #ifdef POSITION |
---|
859 | _component->interface_map (src ,"context_"+toString(j), |
---|
860 | dest,"context_"+toString(y)); |
---|
861 | #endif |
---|
862 | |
---|
863 | COMPONENT_MAP(_component,src , "in_CONTEXT_"+toString(j)+"_DECOD_ENABLE", |
---|
864 | dest,"out_CONTEXT_"+toString(y)+"_DECOD_ENABLE"); |
---|
865 | |
---|
866 | dest = _name+"_glue"; |
---|
867 | #ifdef POSITION |
---|
868 | _component->interface_map (src ,"context_"+toString(j), |
---|
869 | dest,"context_"+toString(i)+"_"+toString(j)); |
---|
870 | #endif |
---|
871 | |
---|
872 | COMPONENT_MAP(_component,src , "in_CONTEXT_"+toString(j)+ "_DEPTH_VAL", |
---|
873 | dest,"out_CONTEXT_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_DEPTH_VAL"); |
---|
874 | if (_param->_have_port_depth) |
---|
875 | COMPONENT_MAP(_component,src , "in_CONTEXT_"+toString(j)+ "_DEPTH", |
---|
876 | dest,"out_CONTEXT_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_DEPTH"); |
---|
877 | } |
---|
878 | |
---|
879 | |
---|
880 | // ~~~~~[ Interface : "context_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
881 | { |
---|
882 | dest = _name+"_context_state"; |
---|
883 | #ifdef POSITION |
---|
884 | _component->interface_map (src ,"context_event", |
---|
885 | dest,"decod_event_"+toString(i)); |
---|
886 | #endif |
---|
887 | |
---|
888 | COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_VAL" ,dest, "in_DECOD_EVENT_"+toString(i)+"_VAL" ); |
---|
889 | COMPONENT_MAP(_component,src , "in_CONTEXT_EVENT_ACK" ,dest,"out_DECOD_EVENT_"+toString(i)+"_ACK" ); |
---|
890 | if (_param->_have_port_context_id) |
---|
891 | COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_CONTEXT_ID" ,dest, "in_DECOD_EVENT_"+toString(i)+"_CONTEXT_ID" ); |
---|
892 | if (_param->_have_port_depth) |
---|
893 | COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_DEPTH" ,dest, "in_DECOD_EVENT_"+toString(i)+"_DEPTH" ); |
---|
894 | COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_TYPE" ,dest, "in_DECOD_EVENT_"+toString(i)+"_TYPE" ); |
---|
895 | COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_IS_DELAY_SLOT",dest, "in_DECOD_EVENT_"+toString(i)+"_IS_DELAY_SLOT"); |
---|
896 | COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_ADDRESS" ,dest, "in_DECOD_EVENT_"+toString(i)+"_ADDRESS" ); |
---|
897 | COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_ADDRESS_EPCR" ,dest, "in_DECOD_EVENT_"+toString(i)+"_ADDRESS_EPCR" ); |
---|
898 | } |
---|
899 | } |
---|
900 | } |
---|
901 | |
---|
902 | // =================================================================== |
---|
903 | // =====[ context_state ]============================================= |
---|
904 | // =================================================================== |
---|
905 | { |
---|
906 | src = _name+"_context_state"; |
---|
907 | log_printf(TRACE,Front_end,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
908 | |
---|
909 | { |
---|
910 | dest = _name; |
---|
911 | #ifdef POSITION |
---|
912 | _component->interface_map (src ,"", |
---|
913 | dest,""); |
---|
914 | #endif |
---|
915 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
916 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
917 | } |
---|
918 | |
---|
919 | // ~~~~~[ Interface : "decod_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
920 | // in_DECOD_EVENT_VAL - component_decod_unit |
---|
921 | // out_DECOD_EVENT_ACK - component_decod_unit |
---|
922 | // in_DECOD_EVENT_CONTEXT_ID - component_decod_unit |
---|
923 | // in_DECOD_EVENT_DEPTH - component_decod_unit |
---|
924 | // in_DECOD_EVENT_TYPE - component_decod_unit |
---|
925 | // in_DECOD_EVENT_IS_DELAY_SLOT - component_decod_unit |
---|
926 | // in_DECOD_EVENT_ADDRESS - component_decod_unit |
---|
927 | // in_DECOD_EVENT_ADDRESS_EPCR - component_decod_unit |
---|
928 | |
---|
929 | // ~~~~~[ Interface : "commit_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
930 | { |
---|
931 | dest = _name; |
---|
932 | #ifdef POSITION |
---|
933 | _component->interface_map (src ,"commit_event", |
---|
934 | dest,"commit_event"); |
---|
935 | #endif |
---|
936 | |
---|
937 | PORT_MAP(_component,src , "in_COMMIT_EVENT_VAL" , |
---|
938 | dest, "in_COMMIT_EVENT_VAL" ); |
---|
939 | PORT_MAP(_component,src ,"out_COMMIT_EVENT_ACK" , |
---|
940 | dest,"out_COMMIT_EVENT_ACK" ); |
---|
941 | if (_param->_have_port_context_id) |
---|
942 | PORT_MAP(_component,src , "in_COMMIT_EVENT_CONTEXT_ID" , |
---|
943 | dest, "in_COMMIT_EVENT_CONTEXT_ID" ); |
---|
944 | if (_param->_have_port_depth) |
---|
945 | PORT_MAP(_component,src , "in_COMMIT_EVENT_DEPTH" , |
---|
946 | dest, "in_COMMIT_EVENT_DEPTH" ); |
---|
947 | PORT_MAP(_component,src , "in_COMMIT_EVENT_TYPE" , |
---|
948 | dest, "in_COMMIT_EVENT_TYPE" ); |
---|
949 | PORT_MAP(_component,src , "in_COMMIT_EVENT_IS_DELAY_SLOT" , |
---|
950 | dest, "in_COMMIT_EVENT_IS_DELAY_SLOT" ); |
---|
951 | PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS" , |
---|
952 | dest, "in_COMMIT_EVENT_ADDRESS" ); |
---|
953 | PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EPCR_VAL", |
---|
954 | dest, "in_COMMIT_EVENT_ADDRESS_EPCR_VAL"); |
---|
955 | PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EPCR" , |
---|
956 | dest, "in_COMMIT_EVENT_ADDRESS_EPCR" ); |
---|
957 | PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EEAR_VAL", |
---|
958 | dest, "in_COMMIT_EVENT_ADDRESS_EEAR_VAL"); |
---|
959 | PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EEAR" , |
---|
960 | dest, "in_COMMIT_EVENT_ADDRESS_EEAR" ); |
---|
961 | } |
---|
962 | |
---|
963 | // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
964 | for (uint32_t i=0; i<_param->_nb_inst_branch_complete; ++i) |
---|
965 | { |
---|
966 | dest = _name+"_glue"; |
---|
967 | #ifdef POSITION |
---|
968 | _component->interface_map (src ,"branch_complete_"+toString(i), |
---|
969 | dest,"branch_complete_"+toString(i)); |
---|
970 | #endif |
---|
971 | |
---|
972 | COMPONENT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+ "_VAL" , |
---|
973 | dest,"out_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_STATE_VAL" ); |
---|
974 | COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+ "_ACK" , |
---|
975 | dest, "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_STATE_ACK" ); |
---|
976 | COMPONENT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+ "_MISS_PREDICTION", |
---|
977 | dest,"out_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_STATE_MISS_PREDICTION"); |
---|
978 | |
---|
979 | dest = _name; |
---|
980 | #ifdef POSITION |
---|
981 | _component->interface_map (src ,"branch_complete_"+toString(i), |
---|
982 | dest,"branch_complete_"+toString(i)); |
---|
983 | #endif |
---|
984 | |
---|
985 | if (_param->_have_port_context_id) |
---|
986 | PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID", |
---|
987 | dest, "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID"); |
---|
988 | if (_param->_have_port_depth) |
---|
989 | PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH" , |
---|
990 | dest, "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH" ); |
---|
991 | |
---|
992 | // in_BRANCH_COMPLETE_TAKE - component_prediction_unit |
---|
993 | // in_BRANCH_COMPLETE_ADDRESS_SRC - component_prediction_unit |
---|
994 | // in_BRANCH_COMPLETE_ADDRESS_DEST - component_prediction_unit |
---|
995 | } |
---|
996 | |
---|
997 | // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
998 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
999 | { |
---|
1000 | dest = _name; |
---|
1001 | #ifdef POSITION |
---|
1002 | _component->interface_map (src ,"nb_inst_"+toString(i), |
---|
1003 | dest,"nb_inst_"+toString(i)); |
---|
1004 | #endif |
---|
1005 | |
---|
1006 | PORT_MAP(_component,src , "in_NB_INST_"+toString(i)+"_COMMIT_ALL", |
---|
1007 | dest, "in_NB_INST_"+toString(i)+"_COMMIT_ALL"); |
---|
1008 | PORT_MAP(_component,src , "in_NB_INST_"+toString(i)+"_COMMIT_MEM", |
---|
1009 | dest, "in_NB_INST_"+toString(i)+"_COMMIT_MEM"); |
---|
1010 | |
---|
1011 | dest = _name+"_glue"; |
---|
1012 | #ifdef POSITION |
---|
1013 | _component->interface_map (src ,"nb_inst_"+toString(i), |
---|
1014 | dest,"nb_inst_"+toString(i)); |
---|
1015 | #endif |
---|
1016 | |
---|
1017 | COMPONENT_MAP(_component,src , "in_NB_INST_"+toString(i)+ "_DECOD_ALL", |
---|
1018 | dest,"out_NB_INST_"+toString(i)+"_CONTEXT_STATE_DECOD_ALL"); |
---|
1019 | } |
---|
1020 | |
---|
1021 | // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1022 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
1023 | { |
---|
1024 | dest = _name+"_glue"; |
---|
1025 | #ifdef POSITION |
---|
1026 | _component->interface_map (src ,"event_"+toString(i), |
---|
1027 | dest,"event_"+toString(i)); |
---|
1028 | #endif |
---|
1029 | |
---|
1030 | COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+ "_VAL" , |
---|
1031 | dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_VAL" ); |
---|
1032 | COMPONENT_MAP(_component,src , "in_EVENT_"+toString(i)+ "_ACK" , |
---|
1033 | dest,"out_EVENT_"+toString(i)+"_CONTEXT_STATE_ACK" ); |
---|
1034 | COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+ "_ADDRESS", |
---|
1035 | dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_ADDRESS"); |
---|
1036 | COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+ "_ADDRESS_NEXT" , |
---|
1037 | dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_ADDRESS_NEXT" ); |
---|
1038 | COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+ "_ADDRESS_NEXT_VAL", |
---|
1039 | dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_ADDRESS_NEXT_VAL"); |
---|
1040 | COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+ "_IS_DS_TAKE" , |
---|
1041 | dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_IS_DS_TAKE" ); |
---|
1042 | COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+ "_TYPE" , |
---|
1043 | dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_TYPE" ); |
---|
1044 | if (_param->_have_port_depth) |
---|
1045 | COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+ "_DEPTH" , |
---|
1046 | dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_DEPTH" ); |
---|
1047 | } |
---|
1048 | |
---|
1049 | // ~~~~~[ Interface "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1050 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
1051 | { |
---|
1052 | dest = _name; |
---|
1053 | #ifdef POSITION |
---|
1054 | _component->interface_map (src ,"spr_event_"+toString(i), |
---|
1055 | dest,"spr_event_"+toString(i)); |
---|
1056 | #endif |
---|
1057 | |
---|
1058 | PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_VAL" , |
---|
1059 | dest,"out_SPR_EVENT_"+toString(i)+"_VAL" ); |
---|
1060 | PORT_MAP(_component,src , "in_SPR_EVENT_"+toString(i)+"_ACK" , |
---|
1061 | dest, "in_SPR_EVENT_"+toString(i)+"_ACK" ); |
---|
1062 | PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_EPCR" , |
---|
1063 | dest,"out_SPR_EVENT_"+toString(i)+"_EPCR" ); |
---|
1064 | PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_EEAR" , |
---|
1065 | dest,"out_SPR_EVENT_"+toString(i)+"_EEAR" ); |
---|
1066 | PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_EEAR_WEN" , |
---|
1067 | dest,"out_SPR_EVENT_"+toString(i)+"_EEAR_WEN" ); |
---|
1068 | PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_SR_DSX" , |
---|
1069 | dest,"out_SPR_EVENT_"+toString(i)+"_SR_DSX" ); |
---|
1070 | PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_SR_TO_ESR", |
---|
1071 | dest,"out_SPR_EVENT_"+toString(i)+"_SR_TO_ESR"); |
---|
1072 | } |
---|
1073 | |
---|
1074 | // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1075 | // out_CONTEXT_DECOD_ENABLE - component_decod_unit |
---|
1076 | |
---|
1077 | // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1078 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
1079 | { |
---|
1080 | dest = _name+"_glue"; |
---|
1081 | #ifdef POSITION |
---|
1082 | _component->interface_map (src ,"depth_"+toString(i), |
---|
1083 | dest,"depth_"+toString(i)); |
---|
1084 | #endif |
---|
1085 | |
---|
1086 | if (_param->_have_port_depth) |
---|
1087 | COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(i)+ "_MIN", |
---|
1088 | dest,"out_DEPTH_"+toString(i)+"_CONTEXT_STATE_MIN"); |
---|
1089 | } |
---|
1090 | |
---|
1091 | // ~~~~~[ Interface : "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1092 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
1093 | { |
---|
1094 | dest = _name; |
---|
1095 | #ifdef POSITION |
---|
1096 | _component->interface_map (src ,"spr_"+toString(i), |
---|
1097 | dest,"spr_"+toString(i)); |
---|
1098 | #endif |
---|
1099 | |
---|
1100 | PORT_MAP(_component,src , "in_SPR_"+toString(i)+"_SR_IEE", |
---|
1101 | dest, "in_SPR_"+toString(i)+"_SR_IEE"); |
---|
1102 | PORT_MAP(_component,src , "in_SPR_"+toString(i)+"_SR_EPH", |
---|
1103 | dest, "in_SPR_"+toString(i)+"_SR_EPH"); |
---|
1104 | } |
---|
1105 | |
---|
1106 | // ~~~~~[ Interface : "interrupt" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1107 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
1108 | { |
---|
1109 | dest = _name; |
---|
1110 | #ifdef POSITION |
---|
1111 | _component->interface_map (src ,"interrupt_"+toString(i), |
---|
1112 | dest,"interrupt_"+toString(i)); |
---|
1113 | #endif |
---|
1114 | |
---|
1115 | PORT_MAP(_component,src , "in_INTERRUPT_"+toString(i)+"_ENABLE", |
---|
1116 | dest, "in_INTERRUPT_"+toString(i)+"_ENABLE"); |
---|
1117 | } |
---|
1118 | |
---|
1119 | } |
---|
1120 | |
---|
1121 | // =================================================================== |
---|
1122 | // =====[ glue ]====================================================== |
---|
1123 | // =================================================================== |
---|
1124 | { |
---|
1125 | src = _name+"_glue"; |
---|
1126 | log_printf(TRACE,Front_end,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
1127 | |
---|
1128 | { |
---|
1129 | dest = _name; |
---|
1130 | #ifdef POSITION |
---|
1131 | _component->interface_map (src ,"", |
---|
1132 | dest,""); |
---|
1133 | #endif |
---|
1134 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
1135 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
1136 | } |
---|
1137 | |
---|
1138 | // ~~~~~[ Interface : "ifetch" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1139 | // out_IFETCH_DECOD_UNIT_CONTEXT_ID - component_decod_unit |
---|
1140 | |
---|
1141 | // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1142 | uint32_t x=0; |
---|
1143 | for (uint32_t i=0; i<_param->_nb_decod_unit; ++i) |
---|
1144 | for (uint32_t j=0; j<_param->_nb_inst_decod[i];++j) |
---|
1145 | { |
---|
1146 | dest = _name; |
---|
1147 | #ifdef POSITION |
---|
1148 | _component->interface_map (src ,"decod_"+toString(i)+"_"+toString(j), |
---|
1149 | dest,"decod_"+toString(x)); |
---|
1150 | #endif |
---|
1151 | |
---|
1152 | if (_param->_have_port_context_id) |
---|
1153 | PORT_MAP(_component,src ,"out_DECOD_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID", |
---|
1154 | dest,"out_DECOD_"+toString(x)+ "_CONTEXT_ID"); |
---|
1155 | x++; |
---|
1156 | } |
---|
1157 | // in_DECOD_DECOD_UNIT_CONTEXT_ID - component_decod_unit |
---|
1158 | |
---|
1159 | // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1160 | for (uint32_t i=0; i<_param->_nb_inst_branch_complete; ++i) |
---|
1161 | { |
---|
1162 | dest = _name; |
---|
1163 | #ifdef POSITION |
---|
1164 | _component->interface_map (src ,"branch_complete_"+toString(i), |
---|
1165 | dest,"branch_complete_"+toString(i)); |
---|
1166 | #endif |
---|
1167 | |
---|
1168 | PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_VAL" , |
---|
1169 | dest, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL" ); |
---|
1170 | PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK" , |
---|
1171 | dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK" ); |
---|
1172 | PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION", |
---|
1173 | dest,"out_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION"); |
---|
1174 | } |
---|
1175 | |
---|
1176 | // out_BRANCH_COMPLETE_PREDICTION_UNIT_VAL - component_prediction_unit |
---|
1177 | // in_BRANCH_COMPLETE_PREDICTION_UNIT_ACK - component_prediction_unit |
---|
1178 | // in_BRANCH_COMPLETE_PREDICTION_UNIT_MISS_PREDICTION - component_prediction_unit |
---|
1179 | // out_BRANCH_COMPLETE_CONTEXT_STATE_VAL - component_context_state |
---|
1180 | // in_BRANCH_COMPLETE_CONTEXT_STATE_ACK - component_context_state |
---|
1181 | // out_BRANCH_COMPLETE_CONTEXT_STATE_MISS_PREDICTION - component_context_state |
---|
1182 | |
---|
1183 | // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1184 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
1185 | { |
---|
1186 | dest = _name; |
---|
1187 | #ifdef POSITION |
---|
1188 | _component->interface_map (src ,"event_"+toString(i), |
---|
1189 | dest,"event_"+toString(i)); |
---|
1190 | #endif |
---|
1191 | |
---|
1192 | PORT_MAP(_component,src ,"out_EVENT_"+toString(i)+"_VAL" , |
---|
1193 | dest,"out_EVENT_"+toString(i)+"_VAL" ); |
---|
1194 | PORT_MAP(_component,src , "in_EVENT_"+toString(i)+"_ACK" , |
---|
1195 | dest, "in_EVENT_"+toString(i)+"_ACK" ); |
---|
1196 | PORT_MAP(_component,src ,"out_EVENT_"+toString(i)+"_ADDRESS" , |
---|
1197 | dest,"out_EVENT_"+toString(i)+"_ADDRESS" ); |
---|
1198 | PORT_MAP(_component,src ,"out_EVENT_"+toString(i)+"_ADDRESS_NEXT" , |
---|
1199 | dest,"out_EVENT_"+toString(i)+"_ADDRESS_NEXT" ); |
---|
1200 | PORT_MAP(_component,src ,"out_EVENT_"+toString(i)+"_ADDRESS_NEXT_VAL", |
---|
1201 | dest,"out_EVENT_"+toString(i)+"_ADDRESS_NEXT_VAL"); |
---|
1202 | PORT_MAP(_component,src ,"out_EVENT_"+toString(i)+"_IS_DS_TAKE" , |
---|
1203 | dest,"out_EVENT_"+toString(i)+"_IS_DS_TAKE" ); |
---|
1204 | } |
---|
1205 | |
---|
1206 | // out_EVENT_IFETCH_UNIT_VAL - component_ifetch_unit |
---|
1207 | // in_EVENT_IFETCH_UNIT_ACK - component_ifetch_unit |
---|
1208 | // out_EVENT_IFETCH_UNIT_ADDRESS - component_ifetch_unit |
---|
1209 | // out_EVENT_IFETCH_UNIT_ADDRESS_NEXT - component_ifetch_unit |
---|
1210 | // out_EVENT_IFETCH_UNIT_ADDRESS_NEXT_VAL - component_ifetch_unit |
---|
1211 | // in_EVENT_IFETCH_UNIT_IS_DS_TAKE - component_ifetch_unit |
---|
1212 | // out_EVENT_PREDICTION_UNIT_VAL - component_prediction_unit |
---|
1213 | // in_EVENT_PREDICTION_UNIT_ACK - component_prediction_unit |
---|
1214 | // out_EVENT_PREDICTION_UNIT_TYPE - component_prediction_unit |
---|
1215 | // out_EVENT_PREDICTION_UNIT_DEPTH - component_prediction_unit |
---|
1216 | // in_EVENT_CONTEXT_STATE_VAL - component_context_state |
---|
1217 | // out_EVENT_CONTEXT_STATE_ACK - component_context_state |
---|
1218 | // in_EVENT_CONTEXT_STATE_ADDRESS - component_context_state |
---|
1219 | // in_EVENT_CONTEXT_STATE_ADDRESS_NEXT - component_context_state |
---|
1220 | // in_EVENT_CONTEXT_STATE_ADDRESS_NEXT_VAL - component_context_state |
---|
1221 | // in_EVENT_CONTEXT_STATE_IS_DS_TAKE - component_context_state |
---|
1222 | // in_EVENT_CONTEXT_STATE_TYPE - component_context_state |
---|
1223 | // in_EVENT_CONTEXT_STATE_DEPTH - component_context_state |
---|
1224 | |
---|
1225 | // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1226 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
1227 | { |
---|
1228 | dest = _name; |
---|
1229 | #ifdef POSITION |
---|
1230 | _component->interface_map (src ,"depth_"+toString(i), |
---|
1231 | dest,"depth_"+toString(i)); |
---|
1232 | #endif |
---|
1233 | |
---|
1234 | if (_param->_have_port_depth) |
---|
1235 | { |
---|
1236 | PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_MIN", |
---|
1237 | dest,"out_DEPTH_"+toString(i)+"_MIN"); |
---|
1238 | PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_MAX", |
---|
1239 | dest,"out_DEPTH_"+toString(i)+"_MAX"); |
---|
1240 | } |
---|
1241 | PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_FULL", |
---|
1242 | dest,"out_DEPTH_"+toString(i)+"_FULL"); |
---|
1243 | } |
---|
1244 | |
---|
1245 | // in_DEPTH_PREDICTION_UNIT_VAL - component_prediction_unit |
---|
1246 | // in_DEPTH_PREDICTION_UNIT_CURRENT - component_prediction_unit |
---|
1247 | // in_DEPTH_PREDICTION_UNIT_MIN - component_prediction_unit |
---|
1248 | // in_DEPTH_PREDICTION_UNIT_MAX - component_prediction_unit |
---|
1249 | // in_DEPTH_PREDICTION_UNIT_FULL - component_prediction_unit |
---|
1250 | // out_DEPTH_DECOD_UNIT_MIN - component_decod_unit |
---|
1251 | // out_DEPTH_DECOD_UNIT_MAX - component_decod_unit |
---|
1252 | // out_DEPTH_DECOD_UNIT_FULL - component_decod_unit |
---|
1253 | // out_DEPTH_CONTEXT_STATE_MIN - component_context_state |
---|
1254 | |
---|
1255 | // ~~~~~[ Interface : "context"" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1256 | // out_CONTEXT_DECOD_UNIT_DEPTH_VAL - component_decod_unit |
---|
1257 | // out_CONTEXT_DECOD_UNIT_DEPTH - component_decod_unit |
---|
1258 | |
---|
1259 | // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1260 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
1261 | { |
---|
1262 | dest = _name; |
---|
1263 | #ifdef POSITION |
---|
1264 | _component->interface_map (src ,"nb_inst_"+toString(i), |
---|
1265 | dest,"nb_inst_"+toString(i)); |
---|
1266 | #endif |
---|
1267 | |
---|
1268 | PORT_MAP(_component,src ,"out_NB_INST_"+toString(i)+"_DECOD_ALL", |
---|
1269 | dest,"out_NB_INST_"+toString(i)+"_DECOD_ALL"); |
---|
1270 | |
---|
1271 | // in_NB_INST_DECOD_UNIT_DECOD_ALL - component_decod_unit |
---|
1272 | // out_NB_INST_CONTEXT_STATE_DECOD_ALL - component_context_state |
---|
1273 | } |
---|
1274 | } |
---|
1275 | |
---|
1276 | // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
1277 | #if DEBUG_Front_end == true |
---|
1278 | _component->test_map(false); |
---|
1279 | #endif |
---|
1280 | |
---|
1281 | #ifdef POSITION |
---|
1282 | if (usage_is_set(_usage,USE_POSITION)) |
---|
1283 | _component->generate_file(); |
---|
1284 | #endif |
---|
1285 | |
---|
1286 | log_end(Front_end,FUNCTION); |
---|
1287 | }; |
---|
1288 | |
---|
1289 | }; // end namespace front_end |
---|
1290 | }; // end namespace multi_front_end |
---|
1291 | }; // end namespace core |
---|
1292 | |
---|
1293 | }; // end namespace behavioural |
---|
1294 | }; // end namespace morpheo |
---|