1 | |
---|
2 | #ifdef SYSTEMC |
---|
3 | //#if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
4 | /* |
---|
5 | * $Id: Register_unit_Glue_genMealy_spr_read.cpp 128 2009-06-26 08:43:23Z rosiere $ |
---|
6 | * |
---|
7 | * [ Description ] |
---|
8 | * |
---|
9 | */ |
---|
10 | |
---|
11 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Register_unit_Glue.h" |
---|
12 | |
---|
13 | namespace morpheo { |
---|
14 | namespace behavioural { |
---|
15 | namespace core { |
---|
16 | namespace multi_execute_loop { |
---|
17 | namespace execute_loop { |
---|
18 | namespace register_unit { |
---|
19 | namespace register_unit_glue { |
---|
20 | |
---|
21 | |
---|
22 | #undef FUNCTION |
---|
23 | #define FUNCTION "Register_unit_Glue::genMealy_spr_read" |
---|
24 | void Register_unit_Glue::genMealy_spr_read (void) |
---|
25 | { |
---|
26 | log_begin(Register_unit_Glue,FUNCTION); |
---|
27 | log_function(Register_unit_Glue,FUNCTION,_name.c_str()); |
---|
28 | |
---|
29 | if (PORT_READ(in_NRESET)) |
---|
30 | { |
---|
31 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
32 | { |
---|
33 | Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_READ_OOO_ENGINE_ID[j]):0; |
---|
34 | Tcontrol_t registerfile_ack = PORT_READ(in_SPR_READ_REGISTERFILE_ACK [ooo_engine_id][j]); |
---|
35 | Tcontrol_t status_ack = PORT_READ(in_SPR_READ_STATUS_ACK [ooo_engine_id][j]); |
---|
36 | |
---|
37 | // multiplexor |
---|
38 | PORT_WRITE(out_SPR_READ_ACK [j], registerfile_ack and status_ack); |
---|
39 | PORT_WRITE(out_SPR_READ_DATA [j], PORT_READ(in_SPR_READ_REGISTERFILE_DATA[ooo_engine_id][j])); |
---|
40 | PORT_WRITE(out_SPR_READ_DATA_VAL [j], PORT_READ(in_SPR_READ_STATUS_DATA_VAL [ooo_engine_id][j])); |
---|
41 | } |
---|
42 | } |
---|
43 | else |
---|
44 | { |
---|
45 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
46 | PORT_WRITE(out_SPR_READ_ACK [j], 0); |
---|
47 | } |
---|
48 | |
---|
49 | log_end(Register_unit_Glue,FUNCTION); |
---|
50 | }; |
---|
51 | |
---|
52 | }; // end namespace register_unit_glue |
---|
53 | }; // end namespace register_unit |
---|
54 | }; // end namespace execute_loop |
---|
55 | }; // end namespace multi_execute_loop |
---|
56 | }; // end namespace core |
---|
57 | |
---|
58 | }; // end namespace behavioural |
---|
59 | }; // end namespace morpheo |
---|
60 | #endif |
---|
61 | //#endif |
---|