Changeset 136 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_insert.cpp
- Timestamp:
- Oct 20, 2009, 8:52:15 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_insert.cpp
r128 r136 28 28 if (PORT_READ(in_NRESET)) 29 29 { 30 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 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); 30 for (uint32_t i=0; i<_param->_nb_inst_issue; i++) 31 { 32 Tcontrol_t val = PORT_READ(in_ISSUE_VAL [i]); 33 Tcontrol_t gpr_use = PORT_READ(in_ISSUE_RD_USE [i]); 34 Tcontrol_t spr_use = PORT_READ(in_ISSUE_RE_USE [i]); 35 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id)?PORT_READ(in_ISSUE_VAL [i]):0; 36 Tcontrol_t gpr_status_ack = PORT_READ(in_ISSUE_GPR_STATUS_ACK [ooo_engine_id][i]); 37 Tcontrol_t spr_status_ack = PORT_READ(in_ISSUE_SPR_STATUS_ACK [ooo_engine_id][i]); 47 38 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); 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); 47 48 log_printf(TRACE,Register_unit_Glue,FUNCTION," * issue [%d]",i); 49 log_printf(TRACE,Register_unit_Glue,FUNCTION," * ooo_engine_id (w) : %d",ooo_engine_id ); 50 log_printf(TRACE,Register_unit_Glue,FUNCTION," * val (r) : %d",val ); 51 log_printf(TRACE,Register_unit_Glue,FUNCTION," * ack (w) : %d",ack ); 52 log_printf(TRACE,Register_unit_Glue,FUNCTION," * gpr_use (rd) (r) : %d",gpr_use ); 53 log_printf(TRACE,Register_unit_Glue,FUNCTION," * gpr_status_val (w) : %d",gpr_status_val); 54 log_printf(TRACE,Register_unit_Glue,FUNCTION," * gpr_status_ack (r) : %d",gpr_status_ack); 55 log_printf(TRACE,Register_unit_Glue,FUNCTION," * spr_use (re) (r) : %d",spr_use ); 56 log_printf(TRACE,Register_unit_Glue,FUNCTION," * spr_status_val (w) : %d",spr_status_val); 57 log_printf(TRACE,Register_unit_Glue,FUNCTION," * spr_status_ack (r) : %d",spr_status_ack); 58 59 PORT_WRITE(out_ISSUE_ACK [i], ack ); 60 PORT_WRITE(out_ISSUE_GPR_STATUS_VAL [ooo_engine_id][i], gpr_status_val); 61 PORT_WRITE(out_ISSUE_SPR_STATUS_VAL [ooo_engine_id][i], spr_status_val); 57 62 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); 63 for (uint32_t j=0; j<_param->_nb_ooo_engine; ++j) 64 if (j!=ooo_engine_id) 65 { 66 PORT_WRITE(out_ISSUE_GPR_STATUS_VAL [j][i], 0); 67 PORT_WRITE(out_ISSUE_SPR_STATUS_VAL [j][i], 0); 68 } 61 69 } 62 70 } 63 71 else 64 72 { 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 } 73 for (uint32_t i=0; i<_param->_nb_inst_issue; i++) 74 { 75 PORT_WRITE(out_ISSUE_ACK [i], 0); 76 for (uint32_t j=0; j<_param->_nb_ooo_engine; j++) 77 { 78 PORT_WRITE(out_ISSUE_GPR_STATUS_VAL [j][i], 0); 79 PORT_WRITE(out_ISSUE_SPR_STATUS_VAL [j][i], 0); 80 } 81 } 72 82 } 83 84 // if (PORT_READ(in_NRESET)) 85 // { 86 // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 87 // for (uint32_t j=0; j<_param->_nb_inst_insert_rob [i]; j++) 88 // { 89 // Tcontrol_t val = PORT_READ(in_INSERT_ROB_VAL [i][j]); 90 // Tcontrol_t gpr_use = PORT_READ(in_INSERT_ROB_RD_USE [i][j]); 91 // Tcontrol_t spr_use = PORT_READ(in_INSERT_ROB_RE_USE [i][j]); 92 // Tcontrol_t gpr_status_ack = PORT_READ(in_INSERT_ROB_GPR_STATUS_ACK [i][j]); 93 // Tcontrol_t spr_status_ack = PORT_READ(in_INSERT_ROB_SPR_STATUS_ACK [i][j]); 94 95 // Tcontrol_t ack = (gpr_status_ack and 96 // spr_status_ack); 97 // Tcontrol_t gpr_status_val = (val and 98 // gpr_use and 99 // spr_status_ack); 100 // Tcontrol_t spr_status_val = (val and 101 // spr_use and 102 // gpr_status_ack); 103 104 // log_printf(TRACE,Register_unit_Glue,FUNCTION," * insert_rob [%d][%d]",i,j); 105 // log_printf(TRACE,Register_unit_Glue,FUNCTION," * val (r) : %d",val ); 106 // log_printf(TRACE,Register_unit_Glue,FUNCTION," * ack (w) : %d",ack ); 107 // log_printf(TRACE,Register_unit_Glue,FUNCTION," * gpr_use (rd) (r) : %d",gpr_use ); 108 // log_printf(TRACE,Register_unit_Glue,FUNCTION," * gpr_status_val (w) : %d",gpr_status_val); 109 // log_printf(TRACE,Register_unit_Glue,FUNCTION," * gpr_status_ack (r) : %d",gpr_status_ack); 110 // log_printf(TRACE,Register_unit_Glue,FUNCTION," * spr_use (re) (r) : %d",spr_use ); 111 // log_printf(TRACE,Register_unit_Glue,FUNCTION," * spr_status_val (w) : %d",spr_status_val); 112 // log_printf(TRACE,Register_unit_Glue,FUNCTION," * spr_status_ack (r) : %d",spr_status_ack); 113 114 // PORT_WRITE(out_INSERT_ROB_ACK [i][j], ack ); 115 // PORT_WRITE(out_INSERT_ROB_GPR_STATUS_VAL [i][j], gpr_status_val); 116 // PORT_WRITE(out_INSERT_ROB_SPR_STATUS_VAL [i][j], spr_status_val); 117 // } 118 // } 119 // else 120 // { 121 // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 122 // for (uint32_t j=0; j<_param->_nb_inst_insert_rob [i]; j++) 123 // { 124 // PORT_WRITE(out_INSERT_ROB_ACK [i][j], 0); 125 // PORT_WRITE(out_INSERT_ROB_GPR_STATUS_VAL [i][j], 0); 126 // PORT_WRITE(out_INSERT_ROB_SPR_STATUS_VAL [i][j], 0); 127 // } 128 // } 73 129 74 130 log_end(Register_unit_Glue,FUNCTION);
Note: See TracChangeset
for help on using the changeset viewer.