1 | /* |
---|
2 | * $Id$ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Register_unit_Glue.h" |
---|
9 | |
---|
10 | namespace morpheo { |
---|
11 | namespace behavioural { |
---|
12 | namespace core { |
---|
13 | namespace multi_execute_loop { |
---|
14 | namespace execute_loop { |
---|
15 | namespace register_unit { |
---|
16 | namespace register_unit_glue { |
---|
17 | |
---|
18 | |
---|
19 | #undef FUNCTION |
---|
20 | #define FUNCTION "Register_unit_Glue::Register_unit_Glue" |
---|
21 | Register_unit_Glue::Register_unit_Glue |
---|
22 | ( |
---|
23 | #ifdef SYSTEMC |
---|
24 | sc_module_name name, |
---|
25 | #else |
---|
26 | string name, |
---|
27 | #endif |
---|
28 | #ifdef STATISTICS |
---|
29 | morpheo::behavioural::Parameters_Statistics * param_statistics, |
---|
30 | #endif |
---|
31 | morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::register_unit_glue::Parameters * param, |
---|
32 | morpheo::behavioural::Tusage_t usage |
---|
33 | ): |
---|
34 | _name (name) |
---|
35 | ,_param (param) |
---|
36 | ,_usage (usage) |
---|
37 | // #ifdef STATISTICS |
---|
38 | // ,_param_statistics (param_statistics) |
---|
39 | // #endif |
---|
40 | { |
---|
41 | log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); |
---|
42 | |
---|
43 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Allocation"); |
---|
44 | allocation (); |
---|
45 | |
---|
46 | #ifdef STATISTICS |
---|
47 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Allocation of statistics"); |
---|
48 | |
---|
49 | // Allocation of statistics |
---|
50 | _stat = new Statistics (static_cast<string>(_name), |
---|
51 | param_statistics , |
---|
52 | param); |
---|
53 | #endif |
---|
54 | |
---|
55 | #ifdef VHDL |
---|
56 | // generate the vhdl |
---|
57 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Generate the vhdl"); |
---|
58 | |
---|
59 | vhdl(); |
---|
60 | #endif |
---|
61 | |
---|
62 | #ifdef SYSTEMC |
---|
63 | // Constant |
---|
64 | |
---|
65 | PORT_WRITE(out_CONST_0 ,0); |
---|
66 | PORT_WRITE(out_CONST_1 ,1); |
---|
67 | |
---|
68 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - transition"); |
---|
69 | |
---|
70 | SC_METHOD (transition); |
---|
71 | dont_initialize (); |
---|
72 | sensitive_pos << *(in_CLOCK); |
---|
73 | |
---|
74 | #ifdef SYSTEMCASS_SPECIFIC |
---|
75 | // List dependency information |
---|
76 | #endif |
---|
77 | |
---|
78 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_gpr_read"); |
---|
79 | |
---|
80 | SC_METHOD (genMealy_gpr_read); |
---|
81 | dont_initialize (); |
---|
82 | // sensitive_neg << *(in_CLOCK); |
---|
83 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
84 | { |
---|
85 | if (_param->_have_port_ooo_engine_id == true) |
---|
86 | sensitive << *(in_GPR_READ_OOO_ENGINE_ID [j]); |
---|
87 | |
---|
88 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
89 | sensitive << *(in_GPR_READ_REGISTERFILE_ACK [i][j]) |
---|
90 | << *(in_GPR_READ_REGISTERFILE_DATA [i][j]) |
---|
91 | << *(in_GPR_READ_STATUS_ACK [i][j]) |
---|
92 | << *(in_GPR_READ_STATUS_DATA_VAL [i][j]); |
---|
93 | } |
---|
94 | |
---|
95 | #ifdef SYSTEMCASS_SPECIFIC |
---|
96 | // List dependency information |
---|
97 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
98 | { |
---|
99 | if (_param->_have_port_ooo_engine_id == true) |
---|
100 | { |
---|
101 | (*(out_GPR_READ_ACK [j])) (*( in_GPR_READ_OOO_ENGINE_ID [j])); |
---|
102 | (*(out_GPR_READ_DATA_VAL [j])) (*( in_GPR_READ_OOO_ENGINE_ID [j])); |
---|
103 | (*(out_GPR_READ_DATA [j])) (*( in_GPR_READ_OOO_ENGINE_ID [j])); |
---|
104 | } |
---|
105 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
106 | { |
---|
107 | (*(out_GPR_READ_ACK [j])) (*( in_GPR_READ_REGISTERFILE_ACK [i][j])); |
---|
108 | (*(out_GPR_READ_ACK [j])) (*( in_GPR_READ_STATUS_ACK [i][j])); |
---|
109 | (*(out_GPR_READ_DATA [j])) (*( in_GPR_READ_REGISTERFILE_DATA [i][j])); |
---|
110 | (*(out_GPR_READ_DATA_VAL [j])) (*( in_GPR_READ_STATUS_DATA_VAL [i][j])); |
---|
111 | } |
---|
112 | } |
---|
113 | #endif |
---|
114 | |
---|
115 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_gpr_read_status"); |
---|
116 | |
---|
117 | SC_METHOD (genMealy_gpr_read_status); |
---|
118 | dont_initialize (); |
---|
119 | // sensitive_neg << *(in_CLOCK); |
---|
120 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
121 | { |
---|
122 | sensitive << *(in_GPR_READ_VAL [j]); |
---|
123 | if (_param->_have_port_ooo_engine_id == true) |
---|
124 | sensitive << *(in_GPR_READ_OOO_ENGINE_ID [j]); |
---|
125 | |
---|
126 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
127 | sensitive << *(in_GPR_READ_REGISTERFILE_ACK [i][j]); |
---|
128 | } |
---|
129 | |
---|
130 | #ifdef SYSTEMCASS_SPECIFIC |
---|
131 | // List dependency information |
---|
132 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
133 | { |
---|
134 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
135 | { |
---|
136 | (*(out_GPR_READ_STATUS_VAL [i][j])) (*( in_GPR_READ_VAL [j])); |
---|
137 | (*(out_GPR_READ_STATUS_VAL [i][j])) (*( in_GPR_READ_REGISTERFILE_ACK [i][j])); |
---|
138 | if (_param->_have_port_ooo_engine_id == true) |
---|
139 | (*(out_GPR_READ_STATUS_VAL [i][j])) (*( in_GPR_READ_OOO_ENGINE_ID [j])); |
---|
140 | } |
---|
141 | } |
---|
142 | #endif |
---|
143 | |
---|
144 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_gpr_read_registerfile"); |
---|
145 | |
---|
146 | SC_METHOD (genMealy_gpr_read_registerfile); |
---|
147 | dont_initialize (); |
---|
148 | // sensitive_neg << *(in_CLOCK); |
---|
149 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
150 | { |
---|
151 | sensitive << *(in_GPR_READ_VAL [j]); |
---|
152 | if (_param->_have_port_ooo_engine_id == true) |
---|
153 | sensitive << *(in_GPR_READ_OOO_ENGINE_ID [j]); |
---|
154 | |
---|
155 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
156 | sensitive << *(in_GPR_READ_STATUS_ACK [i][j]); |
---|
157 | } |
---|
158 | |
---|
159 | #ifdef SYSTEMCASS_SPECIFIC |
---|
160 | // List dependency information |
---|
161 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
162 | { |
---|
163 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
164 | { |
---|
165 | (*(out_GPR_READ_REGISTERFILE_VAL [i][j])) (*( in_GPR_READ_VAL [j])); |
---|
166 | (*(out_GPR_READ_REGISTERFILE_VAL [i][j])) (*( in_GPR_READ_STATUS_ACK [i][j])); |
---|
167 | if (_param->_have_port_ooo_engine_id == true) |
---|
168 | (*(out_GPR_READ_REGISTERFILE_VAL [i][j])) (*( in_GPR_READ_OOO_ENGINE_ID [j])); |
---|
169 | } |
---|
170 | } |
---|
171 | #endif |
---|
172 | |
---|
173 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_gpr_write"); |
---|
174 | |
---|
175 | SC_METHOD (genMealy_gpr_write); |
---|
176 | dont_initialize (); |
---|
177 | // sensitive_neg << *(in_CLOCK); |
---|
178 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
179 | { |
---|
180 | if (_param->_have_port_ooo_engine_id == true) |
---|
181 | sensitive << *(in_GPR_WRITE_OOO_ENGINE_ID [j]); |
---|
182 | |
---|
183 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
184 | sensitive << *(in_GPR_WRITE_REGISTERFILE_ACK [i][j]) |
---|
185 | << *(in_GPR_WRITE_STATUS_ACK [i][j]); |
---|
186 | } |
---|
187 | |
---|
188 | #ifdef SYSTEMCASS_SPECIFIC |
---|
189 | // List dependency information |
---|
190 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
191 | { |
---|
192 | if (_param->_have_port_ooo_engine_id == true) |
---|
193 | (*(out_GPR_WRITE_ACK [j])) (*( in_GPR_WRITE_OOO_ENGINE_ID [j])); |
---|
194 | |
---|
195 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
196 | { |
---|
197 | (*(out_GPR_WRITE_ACK [j])) (*( in_GPR_WRITE_REGISTERFILE_ACK [i][j])); |
---|
198 | (*(out_GPR_WRITE_ACK [j])) (*( in_GPR_WRITE_STATUS_ACK [i][j])); |
---|
199 | } |
---|
200 | } |
---|
201 | #endif |
---|
202 | |
---|
203 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_gpr_write_status"); |
---|
204 | |
---|
205 | SC_METHOD (genMealy_gpr_write_status); |
---|
206 | dont_initialize (); |
---|
207 | // sensitive_neg << *(in_CLOCK); |
---|
208 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
209 | { |
---|
210 | sensitive << *(in_GPR_WRITE_VAL [j]); |
---|
211 | if (_param->_have_port_ooo_engine_id == true) |
---|
212 | sensitive << *(in_GPR_WRITE_OOO_ENGINE_ID [j]); |
---|
213 | |
---|
214 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
215 | sensitive << *(in_GPR_WRITE_REGISTERFILE_ACK [i][j]); |
---|
216 | } |
---|
217 | |
---|
218 | #ifdef SYSTEMCASS_SPECIFIC |
---|
219 | // List dependency information |
---|
220 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
221 | { |
---|
222 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
223 | { |
---|
224 | (*(out_GPR_WRITE_STATUS_VAL [i][j])) (*( in_GPR_WRITE_VAL [j])); |
---|
225 | (*(out_GPR_WRITE_STATUS_VAL [i][j])) (*( in_GPR_WRITE_REGISTERFILE_ACK [i][j])); |
---|
226 | if (_param->_have_port_ooo_engine_id == true) |
---|
227 | (*(out_GPR_WRITE_STATUS_VAL [i][j])) (*( in_GPR_WRITE_OOO_ENGINE_ID [j])); |
---|
228 | } |
---|
229 | } |
---|
230 | #endif |
---|
231 | |
---|
232 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_gpr_write_registerfile"); |
---|
233 | |
---|
234 | SC_METHOD (genMealy_gpr_write_registerfile); |
---|
235 | dont_initialize (); |
---|
236 | // sensitive_neg << *(in_CLOCK); |
---|
237 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
238 | { |
---|
239 | sensitive << *(in_GPR_WRITE_VAL [j]); |
---|
240 | if (_param->_have_port_ooo_engine_id == true) |
---|
241 | sensitive << *(in_GPR_WRITE_OOO_ENGINE_ID [j]); |
---|
242 | |
---|
243 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
244 | sensitive << *(in_GPR_WRITE_STATUS_ACK [i][j]); |
---|
245 | } |
---|
246 | |
---|
247 | #ifdef SYSTEMCASS_SPECIFIC |
---|
248 | // List dependency information |
---|
249 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
250 | { |
---|
251 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
252 | { |
---|
253 | (*(out_GPR_WRITE_REGISTERFILE_VAL [i][j])) (*( in_GPR_WRITE_VAL [j])); |
---|
254 | (*(out_GPR_WRITE_REGISTERFILE_VAL [i][j])) (*( in_GPR_WRITE_STATUS_ACK [i][j])); |
---|
255 | if (_param->_have_port_ooo_engine_id == true) |
---|
256 | (*(out_GPR_WRITE_REGISTERFILE_VAL [i][j])) (*( in_GPR_WRITE_OOO_ENGINE_ID [j])); |
---|
257 | } |
---|
258 | } |
---|
259 | #endif |
---|
260 | |
---|
261 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_spr_read"); |
---|
262 | |
---|
263 | SC_METHOD (genMealy_spr_read); |
---|
264 | dont_initialize (); |
---|
265 | // sensitive_neg << *(in_CLOCK); |
---|
266 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
267 | { |
---|
268 | if (_param->_have_port_ooo_engine_id == true) |
---|
269 | sensitive << *(in_SPR_READ_OOO_ENGINE_ID [j]); |
---|
270 | |
---|
271 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
272 | sensitive << *(in_SPR_READ_REGISTERFILE_ACK [i][j]) |
---|
273 | << *(in_SPR_READ_REGISTERFILE_DATA [i][j]) |
---|
274 | << *(in_SPR_READ_STATUS_ACK [i][j]) |
---|
275 | << *(in_SPR_READ_STATUS_DATA_VAL [i][j]); |
---|
276 | } |
---|
277 | |
---|
278 | #ifdef SYSTEMCASS_SPECIFIC |
---|
279 | // List dependency information |
---|
280 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
281 | { |
---|
282 | if (_param->_have_port_ooo_engine_id == true) |
---|
283 | { |
---|
284 | (*(out_SPR_READ_ACK [j])) (*( in_SPR_READ_OOO_ENGINE_ID [j])); |
---|
285 | (*(out_SPR_READ_DATA_VAL [j])) (*( in_SPR_READ_OOO_ENGINE_ID [j])); |
---|
286 | (*(out_SPR_READ_DATA [j])) (*( in_SPR_READ_OOO_ENGINE_ID [j])); |
---|
287 | } |
---|
288 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
289 | { |
---|
290 | (*(out_SPR_READ_ACK [j])) (*( in_SPR_READ_REGISTERFILE_ACK [i][j])); |
---|
291 | (*(out_SPR_READ_ACK [j])) (*( in_SPR_READ_STATUS_ACK [i][j])); |
---|
292 | (*(out_SPR_READ_DATA [j])) (*( in_SPR_READ_REGISTERFILE_DATA [i][j])); |
---|
293 | (*(out_SPR_READ_DATA_VAL [j])) (*( in_SPR_READ_STATUS_DATA_VAL [i][j])); |
---|
294 | } |
---|
295 | } |
---|
296 | #endif |
---|
297 | |
---|
298 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_spr_read_status"); |
---|
299 | |
---|
300 | SC_METHOD (genMealy_spr_read_status); |
---|
301 | dont_initialize (); |
---|
302 | // sensitive_neg << *(in_CLOCK); |
---|
303 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
304 | { |
---|
305 | sensitive << *(in_SPR_READ_VAL [j]); |
---|
306 | if (_param->_have_port_ooo_engine_id == true) |
---|
307 | sensitive << *(in_SPR_READ_OOO_ENGINE_ID [j]); |
---|
308 | |
---|
309 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
310 | sensitive << *(in_SPR_READ_REGISTERFILE_ACK [i][j]); |
---|
311 | } |
---|
312 | |
---|
313 | #ifdef SYSTEMCASS_SPECIFIC |
---|
314 | // List dependency information |
---|
315 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
316 | { |
---|
317 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
318 | { |
---|
319 | (*(out_SPR_READ_STATUS_VAL [i][j])) (*( in_SPR_READ_VAL [j])); |
---|
320 | (*(out_SPR_READ_STATUS_VAL [i][j])) (*( in_SPR_READ_REGISTERFILE_ACK [i][j])); |
---|
321 | if (_param->_have_port_ooo_engine_id == true) |
---|
322 | (*(out_SPR_READ_STATUS_VAL [i][j])) (*( in_SPR_READ_OOO_ENGINE_ID [j])); |
---|
323 | } |
---|
324 | } |
---|
325 | #endif |
---|
326 | |
---|
327 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_spr_read_registerfile"); |
---|
328 | |
---|
329 | SC_METHOD (genMealy_spr_read_registerfile); |
---|
330 | dont_initialize (); |
---|
331 | // sensitive_neg << *(in_CLOCK); |
---|
332 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
333 | { |
---|
334 | sensitive << *(in_SPR_READ_VAL [j]); |
---|
335 | if (_param->_have_port_ooo_engine_id == true) |
---|
336 | sensitive << *(in_SPR_READ_OOO_ENGINE_ID [j]); |
---|
337 | |
---|
338 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
339 | sensitive << *(in_SPR_READ_STATUS_ACK [i][j]); |
---|
340 | } |
---|
341 | |
---|
342 | #ifdef SYSTEMCASS_SPECIFIC |
---|
343 | // List dependency information |
---|
344 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
345 | { |
---|
346 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
347 | { |
---|
348 | (*(out_SPR_READ_REGISTERFILE_VAL [i][j])) (*( in_SPR_READ_VAL [j])); |
---|
349 | (*(out_SPR_READ_REGISTERFILE_VAL [i][j])) (*( in_SPR_READ_STATUS_ACK [i][j])); |
---|
350 | if (_param->_have_port_ooo_engine_id == true) |
---|
351 | (*(out_SPR_READ_REGISTERFILE_VAL [i][j])) (*( in_SPR_READ_OOO_ENGINE_ID [j])); |
---|
352 | } |
---|
353 | } |
---|
354 | #endif |
---|
355 | |
---|
356 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_spr_write"); |
---|
357 | |
---|
358 | SC_METHOD (genMealy_spr_write); |
---|
359 | dont_initialize (); |
---|
360 | // sensitive_neg << *(in_CLOCK); |
---|
361 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
362 | { |
---|
363 | if (_param->_have_port_ooo_engine_id == true) |
---|
364 | sensitive << *(in_SPR_WRITE_OOO_ENGINE_ID [j]); |
---|
365 | |
---|
366 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
367 | sensitive << *(in_SPR_WRITE_REGISTERFILE_ACK [i][j]) |
---|
368 | << *(in_SPR_WRITE_STATUS_ACK [i][j]); |
---|
369 | } |
---|
370 | |
---|
371 | #ifdef SYSTEMCASS_SPECIFIC |
---|
372 | // List dependency information |
---|
373 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
374 | { |
---|
375 | if (_param->_have_port_ooo_engine_id == true) |
---|
376 | (*(out_SPR_WRITE_ACK [j])) (*( in_SPR_WRITE_OOO_ENGINE_ID [j])); |
---|
377 | |
---|
378 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
379 | { |
---|
380 | (*(out_SPR_WRITE_ACK [j])) (*( in_SPR_WRITE_REGISTERFILE_ACK [i][j])); |
---|
381 | (*(out_SPR_WRITE_ACK [j])) (*( in_SPR_WRITE_STATUS_ACK [i][j])); |
---|
382 | } |
---|
383 | } |
---|
384 | #endif |
---|
385 | |
---|
386 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_spr_write_status"); |
---|
387 | |
---|
388 | SC_METHOD (genMealy_spr_write_status); |
---|
389 | dont_initialize (); |
---|
390 | // sensitive_neg << *(in_CLOCK); |
---|
391 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
392 | { |
---|
393 | sensitive << *(in_SPR_WRITE_VAL [j]); |
---|
394 | if (_param->_have_port_ooo_engine_id == true) |
---|
395 | sensitive << *(in_SPR_WRITE_OOO_ENGINE_ID [j]); |
---|
396 | |
---|
397 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
398 | sensitive << *(in_SPR_WRITE_REGISTERFILE_ACK [i][j]); |
---|
399 | } |
---|
400 | |
---|
401 | #ifdef SYSTEMCASS_SPECIFIC |
---|
402 | // List dependency information |
---|
403 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
404 | { |
---|
405 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
406 | { |
---|
407 | (*(out_SPR_WRITE_STATUS_VAL [i][j])) (*( in_SPR_WRITE_VAL [j])); |
---|
408 | (*(out_SPR_WRITE_STATUS_VAL [i][j])) (*( in_SPR_WRITE_REGISTERFILE_ACK [i][j])); |
---|
409 | if (_param->_have_port_ooo_engine_id == true) |
---|
410 | (*(out_SPR_WRITE_STATUS_VAL [i][j])) (*( in_SPR_WRITE_OOO_ENGINE_ID [j])); |
---|
411 | } |
---|
412 | } |
---|
413 | #endif |
---|
414 | |
---|
415 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_spr_write_registerfile"); |
---|
416 | |
---|
417 | SC_METHOD (genMealy_spr_write_registerfile); |
---|
418 | dont_initialize (); |
---|
419 | // sensitive_neg << *(in_CLOCK); |
---|
420 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
421 | { |
---|
422 | sensitive << *(in_SPR_WRITE_VAL [j]); |
---|
423 | if (_param->_have_port_ooo_engine_id == true) |
---|
424 | sensitive << *(in_SPR_WRITE_OOO_ENGINE_ID [j]); |
---|
425 | |
---|
426 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
427 | sensitive << *(in_SPR_WRITE_STATUS_ACK [i][j]); |
---|
428 | } |
---|
429 | |
---|
430 | #ifdef SYSTEMCASS_SPECIFIC |
---|
431 | // List dependency information |
---|
432 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
433 | { |
---|
434 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
435 | { |
---|
436 | (*(out_SPR_WRITE_REGISTERFILE_VAL [i][j])) (*( in_SPR_WRITE_VAL [j])); |
---|
437 | (*(out_SPR_WRITE_REGISTERFILE_VAL [i][j])) (*( in_SPR_WRITE_STATUS_ACK [i][j])); |
---|
438 | if (_param->_have_port_ooo_engine_id == true) |
---|
439 | (*(out_SPR_WRITE_REGISTERFILE_VAL [i][j])) (*( in_SPR_WRITE_OOO_ENGINE_ID [j])); |
---|
440 | } |
---|
441 | } |
---|
442 | #endif |
---|
443 | |
---|
444 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_insert"); |
---|
445 | |
---|
446 | SC_METHOD (genMealy_insert); |
---|
447 | dont_initialize (); |
---|
448 | // sensitive_neg << *(in_CLOCK); |
---|
449 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
450 | { |
---|
451 | uint32_t x=_param->_nb_inst_insert_rob [i]; |
---|
452 | for (uint32_t j=0; j<x; j++) |
---|
453 | sensitive << *( in_INSERT_ROB_VAL [i][j]) |
---|
454 | << *( in_INSERT_ROB_RD_USE [i][j]) |
---|
455 | << *( in_INSERT_ROB_RE_USE [i][j]) |
---|
456 | << *( in_INSERT_ROB_GPR_STATUS_ACK [i][j]) |
---|
457 | << *( in_INSERT_ROB_SPR_STATUS_ACK [i][j]); |
---|
458 | } |
---|
459 | #ifdef SYSTEMCASS_SPECIFIC |
---|
460 | // List dependency information |
---|
461 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
462 | { |
---|
463 | uint32_t x=_param->_nb_inst_insert_rob [i]; |
---|
464 | for (uint32_t j=0; j<x; j++) |
---|
465 | { |
---|
466 | (*(out_INSERT_ROB_ACK [i][j]))(*( in_INSERT_ROB_GPR_STATUS_ACK [i][j])); |
---|
467 | (*(out_INSERT_ROB_ACK [i][j]))(*( in_INSERT_ROB_SPR_STATUS_ACK [i][j])); |
---|
468 | |
---|
469 | (*(out_INSERT_ROB_GPR_STATUS_VAL [i][j]))(*( in_INSERT_ROB_VAL [i][j])); |
---|
470 | (*(out_INSERT_ROB_GPR_STATUS_VAL [i][j]))(*( in_INSERT_ROB_RD_USE [i][j])); |
---|
471 | (*(out_INSERT_ROB_GPR_STATUS_VAL [i][j]))(*( in_INSERT_ROB_SPR_STATUS_ACK [i][j])); |
---|
472 | |
---|
473 | (*(out_INSERT_ROB_SPR_STATUS_VAL [i][j]))(*( in_INSERT_ROB_VAL [i][j])); |
---|
474 | (*(out_INSERT_ROB_SPR_STATUS_VAL [i][j]))(*( in_INSERT_ROB_RE_USE [i][j])); |
---|
475 | (*(out_INSERT_ROB_SPR_STATUS_VAL [i][j]))(*( in_INSERT_ROB_GPR_STATUS_ACK [i][j])); |
---|
476 | } |
---|
477 | } |
---|
478 | #endif |
---|
479 | |
---|
480 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_retire"); |
---|
481 | |
---|
482 | SC_METHOD (genMealy_retire); |
---|
483 | dont_initialize (); |
---|
484 | // sensitive_neg << *(in_CLOCK); |
---|
485 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
486 | { |
---|
487 | uint32_t x=_param->_nb_inst_retire_rob [i]; |
---|
488 | for (uint32_t j=0; j<x; j++) |
---|
489 | sensitive << *( in_RETIRE_ROB_VAL [i][j]) |
---|
490 | << *( in_RETIRE_ROB_RD_OLD_USE [i][j]) |
---|
491 | << *( in_RETIRE_ROB_RD_NEW_USE [i][j]) |
---|
492 | << *( in_RETIRE_ROB_RE_OLD_USE [i][j]) |
---|
493 | << *( in_RETIRE_ROB_RE_NEW_USE [i][j]) |
---|
494 | << *( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]) |
---|
495 | << *( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]) |
---|
496 | << *( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]) |
---|
497 | << *( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]); |
---|
498 | } |
---|
499 | #ifdef SYSTEMCASS_SPECIFIC |
---|
500 | // List dependency information |
---|
501 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
502 | { |
---|
503 | uint32_t x=_param->_nb_inst_retire_rob [i]; |
---|
504 | for (uint32_t j=0; j<x; j++) |
---|
505 | { |
---|
506 | (*(out_RETIRE_ROB_ACK [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j])); |
---|
507 | (*(out_RETIRE_ROB_ACK [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j])); |
---|
508 | (*(out_RETIRE_ROB_ACK [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j])); |
---|
509 | (*(out_RETIRE_ROB_ACK [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j])); |
---|
510 | |
---|
511 | (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_VAL [i][j])); |
---|
512 | (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_RD_OLD_USE [i][j])); |
---|
513 | (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j])); |
---|
514 | (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j])); |
---|
515 | (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j])); |
---|
516 | |
---|
517 | (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_VAL [i][j])); |
---|
518 | (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_RD_NEW_USE [i][j])); |
---|
519 | (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j])); |
---|
520 | (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j])); |
---|
521 | (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j])); |
---|
522 | |
---|
523 | (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_VAL [i][j])); |
---|
524 | (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_RE_OLD_USE [i][j])); |
---|
525 | (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j])); |
---|
526 | (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j])); |
---|
527 | (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j])); |
---|
528 | |
---|
529 | (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_VAL [i][j])); |
---|
530 | (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_RE_NEW_USE [i][j])); |
---|
531 | (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j])); |
---|
532 | (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j])); |
---|
533 | (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j])); |
---|
534 | } |
---|
535 | } |
---|
536 | #endif |
---|
537 | |
---|
538 | #endif |
---|
539 | log_printf(FUNC,Register_unit_Glue,FUNCTION,"End"); |
---|
540 | }; |
---|
541 | |
---|
542 | #undef FUNCTION |
---|
543 | #define FUNCTION "Register_unit_Glue::~Register_unit_Glue" |
---|
544 | Register_unit_Glue::~Register_unit_Glue (void) |
---|
545 | { |
---|
546 | log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); |
---|
547 | |
---|
548 | #ifdef STATISTICS |
---|
549 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Generate Statistics file"); |
---|
550 | |
---|
551 | _stat->generate_file(statistics(0)); |
---|
552 | delete _stat; |
---|
553 | #endif |
---|
554 | |
---|
555 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Deallocation"); |
---|
556 | deallocation (); |
---|
557 | |
---|
558 | log_printf(FUNC,Register_unit_Glue,FUNCTION,"End"); |
---|
559 | }; |
---|
560 | |
---|
561 | }; // end namespace register_unit_glue |
---|
562 | }; // end namespace register_unit |
---|
563 | }; // end namespace execute_loop |
---|
564 | }; // end namespace multi_execute_loop |
---|
565 | }; // end namespace core |
---|
566 | |
---|
567 | }; // end namespace behavioural |
---|
568 | }; // end namespace morpheo |
---|
569 | |
---|
570 | |
---|
571 | |
---|