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