1 | #ifdef SYSTEMC |
---|
2 | //#if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
3 | /* |
---|
4 | * $Id$ |
---|
5 | * |
---|
6 | * [ Description ] |
---|
7 | * |
---|
8 | */ |
---|
9 | |
---|
10 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Register_unit_Glue.h" |
---|
11 | |
---|
12 | namespace morpheo { |
---|
13 | namespace behavioural { |
---|
14 | namespace core { |
---|
15 | namespace multi_execute_loop { |
---|
16 | namespace execute_loop { |
---|
17 | namespace register_unit { |
---|
18 | namespace register_unit_glue { |
---|
19 | |
---|
20 | |
---|
21 | #undef FUNCTION |
---|
22 | #define FUNCTION "Register_unit_Glue::genMealy_spr_read_registerfile" |
---|
23 | void Register_unit_Glue::genMealy_spr_read_registerfile (void) |
---|
24 | { |
---|
25 | log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); |
---|
26 | |
---|
27 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
28 | { |
---|
29 | Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_READ_OOO_ENGINE_ID[j]):0; |
---|
30 | Tcontrol_t val = PORT_READ(in_SPR_READ_VAL [j]); |
---|
31 | Tcontrol_t status_ack = PORT_READ(in_SPR_READ_STATUS_ACK [ooo_engine_id][j]); |
---|
32 | |
---|
33 | Tcontrol_t registerfile_val = val and status_ack; |
---|
34 | |
---|
35 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
36 | { |
---|
37 | Tcontrol_t id = (i == ooo_engine_id)?1:0; |
---|
38 | PORT_WRITE(out_SPR_READ_REGISTERFILE_VAL [i][j], (id and registerfile_val)); |
---|
39 | } |
---|
40 | } |
---|
41 | |
---|
42 | log_printf(FUNC,Register_unit_Glue,FUNCTION,"End"); |
---|
43 | }; |
---|
44 | |
---|
45 | }; // end namespace register_unit_glue |
---|
46 | }; // end namespace register_unit |
---|
47 | }; // end namespace execute_loop |
---|
48 | }; // end namespace multi_execute_loop |
---|
49 | }; // end namespace core |
---|
50 | |
---|
51 | }; // end namespace behavioural |
---|
52 | }; // end namespace morpheo |
---|
53 | #endif |
---|
54 | //#endif |
---|