[60] | 1 | #ifdef SYSTEMC |
---|
| 2 | //#if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
| 3 | /* |
---|
| 4 | * $Id: Register_unit_Glue_genMealy_insert.cpp 128 2009-06-26 08:43:23Z 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_insert" |
---|
| 23 | void Register_unit_Glue::genMealy_insert (void) |
---|
| 24 | { |
---|
[88] | 25 | log_begin(Register_unit_Glue,FUNCTION); |
---|
| 26 | log_function(Register_unit_Glue,FUNCTION,_name.c_str()); |
---|
[60] | 27 | |
---|
[123] | 28 | if (PORT_READ(in_NRESET)) |
---|
| 29 | { |
---|
[60] | 30 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
[88] | 31 | for (uint32_t j=0; j<_param->_nb_inst_insert_rob [i]; j++) |
---|
| 32 | { |
---|
| 33 | Tcontrol_t val = PORT_READ(in_INSERT_ROB_VAL [i][j]); |
---|
| 34 | Tcontrol_t gpr_use = PORT_READ(in_INSERT_ROB_RD_USE [i][j]); |
---|
| 35 | Tcontrol_t spr_use = PORT_READ(in_INSERT_ROB_RE_USE [i][j]); |
---|
| 36 | Tcontrol_t gpr_status_ack = PORT_READ(in_INSERT_ROB_GPR_STATUS_ACK [i][j]); |
---|
| 37 | Tcontrol_t spr_status_ack = PORT_READ(in_INSERT_ROB_SPR_STATUS_ACK [i][j]); |
---|
| 38 | |
---|
| 39 | Tcontrol_t ack = (gpr_status_ack and |
---|
| 40 | spr_status_ack); |
---|
| 41 | Tcontrol_t gpr_status_val = (val and |
---|
| 42 | gpr_use and |
---|
| 43 | spr_status_ack); |
---|
| 44 | Tcontrol_t spr_status_val = (val and |
---|
| 45 | spr_use and |
---|
| 46 | gpr_status_ack); |
---|
[60] | 47 | |
---|
[128] | 48 | log_printf(TRACE,Register_unit_Glue,FUNCTION," * insert_rob [%d][%d]",i,j); |
---|
| 49 | log_printf(TRACE,Register_unit_Glue,FUNCTION," * val (r) : %d",val ); |
---|
| 50 | log_printf(TRACE,Register_unit_Glue,FUNCTION," * ack (w) : %d",ack ); |
---|
| 51 | log_printf(TRACE,Register_unit_Glue,FUNCTION," * gpr_use (rd) (r) : %d",gpr_use ); |
---|
| 52 | log_printf(TRACE,Register_unit_Glue,FUNCTION," * gpr_status_val (w) : %d",gpr_status_val); |
---|
| 53 | log_printf(TRACE,Register_unit_Glue,FUNCTION," * gpr_status_ack (r) : %d",gpr_status_ack); |
---|
| 54 | log_printf(TRACE,Register_unit_Glue,FUNCTION," * spr_use (re) (r) : %d",spr_use ); |
---|
| 55 | log_printf(TRACE,Register_unit_Glue,FUNCTION," * spr_status_val (w) : %d",spr_status_val); |
---|
| 56 | log_printf(TRACE,Register_unit_Glue,FUNCTION," * spr_status_ack (r) : %d",spr_status_ack); |
---|
[60] | 57 | |
---|
[88] | 58 | PORT_WRITE(out_INSERT_ROB_ACK [i][j], ack ); |
---|
| 59 | PORT_WRITE(out_INSERT_ROB_GPR_STATUS_VAL [i][j], gpr_status_val); |
---|
| 60 | PORT_WRITE(out_INSERT_ROB_SPR_STATUS_VAL [i][j], spr_status_val); |
---|
| 61 | } |
---|
[123] | 62 | } |
---|
| 63 | else |
---|
| 64 | { |
---|
| 65 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 66 | for (uint32_t j=0; j<_param->_nb_inst_insert_rob [i]; j++) |
---|
| 67 | { |
---|
| 68 | PORT_WRITE(out_INSERT_ROB_ACK [i][j], 0); |
---|
| 69 | PORT_WRITE(out_INSERT_ROB_GPR_STATUS_VAL [i][j], 0); |
---|
| 70 | PORT_WRITE(out_INSERT_ROB_SPR_STATUS_VAL [i][j], 0); |
---|
| 71 | } |
---|
| 72 | } |
---|
[88] | 73 | |
---|
| 74 | log_end(Register_unit_Glue,FUNCTION); |
---|
[60] | 75 | }; |
---|
| 76 | |
---|
| 77 | }; // end namespace register_unit_glue |
---|
| 78 | }; // end namespace register_unit |
---|
| 79 | }; // end namespace execute_loop |
---|
| 80 | }; // end namespace multi_execute_loop |
---|
| 81 | }; // end namespace core |
---|
| 82 | |
---|
| 83 | }; // end namespace behavioural |
---|
| 84 | }; // end namespace morpheo |
---|
| 85 | #endif |
---|
| 86 | //#endif |
---|