[60] | 1 | #ifdef SYSTEMC |
---|
| 2 | //#if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
| 3 | /* |
---|
| 4 | * $Id: Register_unit_Glue_genMealy_gpr_write.cpp 88 2008-12-10 18:31:39Z rosiere $ |
---|
| 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_gpr_write" |
---|
| 23 | void Register_unit_Glue::genMealy_gpr_write (void) |
---|
| 24 | { |
---|
[88] | 25 | log_begin(Register_unit_Glue,FUNCTION); |
---|
| 26 | log_function(Register_unit_Glue,FUNCTION,_name.c_str()); |
---|
| 27 | // if (not PORT_READ(in_NRESET)) |
---|
| 28 | // { |
---|
| 29 | // for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
| 30 | // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 31 | // PORT_WRITE(out_GPR_WRITE_ACK [j], 0); |
---|
| 32 | // } |
---|
| 33 | // else |
---|
[60] | 34 | { |
---|
[88] | 35 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
| 36 | { |
---|
| 37 | Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_WRITE_OOO_ENGINE_ID[j]):0; |
---|
| 38 | Tcontrol_t registerfile_ack = PORT_READ(in_GPR_WRITE_REGISTERFILE_ACK [ooo_engine_id][j]); |
---|
| 39 | Tcontrol_t status_ack = PORT_READ(in_GPR_WRITE_STATUS_ACK [ooo_engine_id][j]); |
---|
| 40 | |
---|
| 41 | // multiplexor |
---|
| 42 | PORT_WRITE(out_GPR_WRITE_ACK [j],registerfile_ack and status_ack); |
---|
| 43 | } |
---|
[60] | 44 | } |
---|
[88] | 45 | |
---|
| 46 | log_end(Register_unit_Glue,FUNCTION); |
---|
[60] | 47 | }; |
---|
| 48 | |
---|
| 49 | }; // end namespace register_unit_glue |
---|
| 50 | }; // end namespace register_unit |
---|
| 51 | }; // end namespace execute_loop |
---|
| 52 | }; // end namespace multi_execute_loop |
---|
| 53 | }; // end namespace core |
---|
| 54 | |
---|
| 55 | }; // end namespace behavioural |
---|
| 56 | }; // end namespace morpheo |
---|
| 57 | #endif |
---|
| 58 | //#endif |
---|