Changeset 110 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_genMealy.cpp
- Timestamp:
- Feb 19, 2009, 5:31:47 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_genMealy.cpp
r108 r110 43 43 44 44 Tcontrol_t can_continue [_param->_nb_context]; 45 // Tcontrol_t can_continue_next [_param->_nb_context]; 46 // Tcontrol_t have_decod_branch [_param->_nb_context]; 45 Tcontrol_t have_decod_branch [_param->_nb_context]; 47 46 48 47 for (uint32_t i=0; i<_param->_nb_context; i++) … … 53 52 54 53 can_continue [i] = PORT_READ(in_CONTEXT_DECOD_ENABLE [i]); 55 // can_continue_next [i] = PORT_READ(in_CONTEXT_DECOD_ENABLE [i]); 56 // have_decod_branch [i] = false; 54 have_decod_branch [i] = false; 57 55 } 58 56 … … 80 78 log_printf(TRACE,Decod,FUNCTION," * IFETCH [%d][%d]",x,y); 81 79 log_printf(TRACE,Decod,FUNCTION," * decod_ack [%d] : %d",i,PORT_READ(in_DECOD_ACK [i])); 82 83 // can_continue [x] = can_continue_next [x];84 80 85 81 decod_val [i] = true; // fetch_val and decod_enable … … 131 127 132 128 Ttype_t type = _decod_instruction->_type; 133 Tdepth_t depth = (_param->_have_port_depth)?PORT_READ(in_CONTEXT_DEPTH [x]):0; // DEPTH_CURRENT 134 129 // Depth current. If have decod a branch and i can continue : depth = depth_next 130 Tdepth_t depth = (_param->_have_port_depth)?PORT_READ(in_CONTEXT_DEPTH [x]):0; 131 132 if ((_param->_nb_branch_speculated[x] > 0) and have_decod_branch [x]) 133 depth = (depth+1)%_param->_nb_branch_speculated[x]; 134 135 135 if (_param->_have_port_context_id) 136 136 PORT_WRITE(out_DECOD_CONTEXT_ID [i], x); … … 179 179 log_printf(TRACE,Decod,FUNCTION," * address dest : %.8x (%.8x)",_decod_instruction->_address_next,_decod_instruction->_address_next<<2); 180 180 181 predict_val [i] = ifetch_ack [x][y] // and decod_val [i] 181 // test if have already decod an branch : one branch per context 182 predict_val [i] = not have_decod_branch [x] and ifetch_ack [x][y] // and decod_val [i] 182 183 ; 183 decod_val [i] &= PORT_READ(in_PREDICT_ACK [i]);// predict_ack and fetch_val and decod_enable184 ifetch_ack [x][y] &= PORT_READ(in_PREDICT_ACK [i]);// predict_ack and fetch_val and decod_enable and decod_ack184 decod_val [i] &= not have_decod_branch [x] and PORT_READ(in_PREDICT_ACK [i]);// predict_ack and fetch_val and decod_enable 185 ifetch_ack [x][y] &= not have_decod_branch [x] and PORT_READ(in_PREDICT_ACK [i]);// predict_ack and fetch_val and decod_enable and decod_ack 185 186 186 187 if (_param->_have_port_context_id) … … 196 197 PORT_WRITE(out_PREDICT_ADDRESS_DEST [i],_decod_instruction->_address_next ); 197 198 198 //can_continue_next [x] = PORT_READ(in_PREDICT_CAN_CONTINUE [i]); // can continue is set if direction is "not take" (also, continue is sequential order) 199 can_continue [x] = false; // one branch per context, the DS don't execute 200 // can_continue_next [x] = false; // one branch per context, the DS don't execute 201 // have_decod_branch [x] = true; 199 // can continue is set if direction is "not take" (also, continue is sequential order) 200 201 // can_continue [x] = false; // one branch per context, the DS don't execute 202 can_continue [x]&= PORT_READ(in_PREDICT_CAN_CONTINUE [i]); // one branch per context, the DS don't execute 203 have_decod_branch [x] = true; 202 204 } 203 205
Note: See TracChangeset
for help on using the changeset viewer.