Changeset 123 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit
- Timestamp:
- Jun 8, 2009, 10:43:30 PM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit
- Files:
-
- 33 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue.cpp
r88 r123 39 39 log_printf(FUNC,Branch_Target_Buffer_Glue,FUNCTION,"Begin"); 40 40 41 #if DEBUG_Branch_Target_Buffer_Glue == true42 log_printf(INFO,Branch_Target_Buffer_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());43 44 std::cout << *param << std::endl;45 #endif41 // #if DEBUG_Branch_Target_Buffer_Glue == true 42 // log_printf(INFO,Branch_Target_Buffer_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str()); 43 44 // std::cout << *param << std::endl; 45 // #endif 46 46 47 47 log_printf(INFO,Branch_Target_Buffer_Glue,FUNCTION,"Allocation"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_decod.cpp
r98 r123 25 25 log_function(Branch_Target_Buffer_Glue,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET)) 28 { 27 29 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 28 30 { … … 62 64 } 63 65 } 66 } 67 else 68 { 69 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 70 { 71 PORT_WRITE(out_DECOD_ACK [i], 0); 72 PORT_WRITE(out_DECOD_REGISTER_VAL [i], 0); 73 if (_param->_have_port_victim) 74 PORT_WRITE(out_DECOD_VICTIM_VAL [i], 0); 75 } 76 } 64 77 65 78 log_end(Branch_Target_Buffer_Glue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_predict.cpp
r108 r123 25 25 log_function(Branch_Target_Buffer_Glue,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET)) 28 { 27 29 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 28 30 { … … 83 85 } 84 86 } 87 } 88 else 89 { 90 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 91 { 92 PORT_WRITE(out_PREDICT_ACK [i], 0); 93 PORT_WRITE(out_PREDICT_REGISTER_VAL [i], 0); 94 if (_param->_have_port_victim) 95 PORT_WRITE(out_PREDICT_VICTIM_VAL [i], 0); 96 } 97 } 85 98 86 99 log_end(Branch_Target_Buffer_Glue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_update.cpp
r98 r123 25 25 log_function(Branch_Target_Buffer_Glue,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET)) 28 { 27 29 for (uint32_t i=0; i<_param->_nb_inst_update; i++) 28 30 { … … 52 54 } 53 55 } 56 } 57 else 58 { 59 for (uint32_t i=0; i<_param->_nb_inst_update; i++) 60 { 61 PORT_WRITE(out_UPDATE_ACK [i], 0); 62 PORT_WRITE(out_UPDATE_REGISTER_VAL [i], 0); 63 if (_param->_have_port_victim) 64 PORT_WRITE(out_UPDATE_VICTIM_VAL [i], 0); 65 } 66 } 54 67 55 68 log_end(Branch_Target_Buffer_Glue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register.cpp
r113 r123 38 38 log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"Begin"); 39 39 40 #if DEBUG_Branch_Target_Buffer_Register == true41 log_printf(INFO,Branch_Target_Buffer_Register,FUNCTION,_("<%s> Parameters"),_name.c_str());42 43 std::cout << *param << std::endl;44 #endif40 // #if DEBUG_Branch_Target_Buffer_Register == true 41 // log_printf(INFO,Branch_Target_Buffer_Register,FUNCTION,_("<%s> Parameters"),_name.c_str()); 42 43 // std::cout << *param << std::endl; 44 // #endif 45 45 46 46 log_printf(INFO,Branch_Target_Buffer_Register,FUNCTION,"Allocation"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_decod.cpp
r88 r123 25 25 log_function(Branch_Target_Buffer_Register,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET)) 28 { 27 29 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 28 30 { … … 55 57 } 56 58 } 57 59 } 60 else 61 { 62 // internal_DECOD_HIT [i] = hit ; 63 // internal_DECOD_NUM_BANK [i] = num_bank ; 64 // internal_DECOD_NUM_ENTRY [i] = num_entry; 65 } 66 58 67 log_end(Branch_Target_Buffer_Register,FUNCTION); 59 68 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_predict.cpp
r108 r123 25 25 log_function(Branch_Target_Buffer_Register,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET)) 28 { 27 29 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 28 30 { … … 64 66 } 65 67 } 68 } 69 // else 70 // { 71 // } 66 72 67 73 log_end(Branch_Target_Buffer_Register,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_update.cpp
r88 r123 25 25 log_function(Branch_Target_Buffer_Register,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET)) 28 { 27 29 for (uint32_t i=0; i<_param->_nb_inst_update; i++) 28 30 { … … 55 57 } 56 58 } 59 } 60 // else 61 // { 62 // internal_UPDATE_HIT [i] = hit ; 63 // internal_UPDATE_NUM_BANK [i] = num_bank ; 64 // internal_UPDATE_NUM_ENTRY [i] = num_entry; 65 // } 57 66 58 67 log_end(Branch_Target_Buffer_Register,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer.cpp
r88 r123 40 40 log_printf(INFO,Branch_Target_Buffer,FUNCTION,"Allocation"); 41 41 42 #if DEBUG_Branch_Target_Buffer == true43 log_printf(INFO,Branch_Target_Buffer,FUNCTION,_("<%s> Parameters"),_name.c_str());42 // #if DEBUG_Branch_Target_Buffer == true 43 // log_printf(INFO,Branch_Target_Buffer,FUNCTION,_("<%s> Parameters"),_name.c_str()); 44 44 45 std::cout << *param << std::endl;46 #endif45 // std::cout << *param << std::endl; 46 // #endif 47 47 48 48 allocation ( -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue.cpp
r112 r123 40 40 41 41 42 #if DEBUG_Direction_Glue == true43 log_printf(INFO,Direction_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());44 45 std::cout << *param << std::endl;46 #endif42 // #if DEBUG_Direction_Glue == true 43 // log_printf(INFO,Direction_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str()); 44 45 // std::cout << *param << std::endl; 46 // #endif 47 47 48 48 log_printf(INFO,Direction_Glue,FUNCTION,"Allocation"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue_genMealy_predict.cpp
r107 r123 26 26 log_function(Direction_Glue,FUNCTION,_name.c_str()); 27 27 28 if (PORT_READ(in_NRESET)) 29 { 30 // std::cout << "Kane (before) " << std::endl; 31 // std::cout << _param << std::endl; 32 // std::cout << _param->_nb_inst_update << std::endl; 33 // std::cout << _param->_nb_inst_predict<< std::endl; 34 // std::cout << "Kane (end) " << std::endl; 35 36 28 37 // constant direction : never / always 29 38 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) … … 31 40 log_printf(TRACE,Direction_Glue,FUNCTION," * PREDICT [%d]",i); 32 41 33 Tcontrol_t direction ;42 Tcontrol_t direction = false; 34 43 35 44 switch (_param->_predictor_scheme) … … 86 95 PORT_WRITE(out_PREDICT_DIRECTION [i], direction); 87 96 } 97 } 98 else 99 { 100 //RESET 101 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 102 { 103 if (_param->_have_component_meta_predictor) 104 { 105 PORT_WRITE(out_PREDICT_PREDICTOR_VAL [i], 0); 106 PORT_WRITE(out_PREDICT_ACK [i], 0); 107 } 108 } 109 } 88 110 89 111 log_end(Direction_Glue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue_genMealy_update.cpp
r112 r123 26 26 log_function(Direction_Glue,FUNCTION,_name.c_str()); 27 27 28 if (PORT_READ(in_NRESET)) 29 { 28 30 for (uint32_t i=0; i<_param->_nb_inst_update; i++) 29 31 { … … 35 37 PORT_WRITE(out_UPDATE_PREDICTOR_PREDICTION_IFETCH [i], PORT_READ(in_UPDATE_PREDICTION_IFETCH [i])); 36 38 } 37 39 } 40 else 41 { 42 // RESET 43 for (uint32_t i=0; i<_param->_nb_inst_update; i++) 44 { 45 PORT_WRITE(out_UPDATE_PREDICTOR_VAL [i], 0); 46 PORT_WRITE(out_UPDATE_ACK [i], 0); 47 } 48 } 49 38 50 log_end(Direction_Glue,FUNCTION); 39 51 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_predict.cpp
r111 r123 27 27 log_function(Meta_Predictor_Glue,FUNCTION,_name.c_str()); 28 28 29 if (PORT_READ(in_NRESET)) 30 { 29 31 for (uint32_t i=0; i<_param->_nb_inst_predict; ++i) 30 32 { … … 89 91 PORT_WRITE(out_PREDICT_DIRECTION [i],direction); 90 92 } 93 } 94 // else 95 // { 96 // } 91 97 92 98 log_end(Meta_Predictor_Glue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_predict_valack.cpp
r111 r123 27 27 log_function(Meta_Predictor_Glue,FUNCTION,_name.c_str()); 28 28 29 if (PORT_READ(in_NRESET)) 30 { 29 31 for (uint32_t i=0; i<_param->_nb_inst_predict; ++i) 30 32 { … … 40 42 41 43 PORT_WRITE(out_PREDICT_ACK [i],ack); 44 } 45 } 46 else 47 { 48 // Reset 49 for (uint32_t i=0; i<_param->_nb_inst_predict; ++i) 50 { 51 for (uint32_t j=0; j<_param->_nb_predictor; ++j) 52 PORT_WRITE(out_PREDICT_PREDICTOR_VAL [j][i],0); 53 PORT_WRITE(out_PREDICT_ACK [i],0); 54 } 42 55 } 43 56 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_update.cpp
r112 r123 27 27 log_function(Meta_Predictor_Glue,FUNCTION,_name.c_str()); 28 28 29 if (PORT_READ(in_NRESET)) 30 { 29 31 for (uint32_t i=0; i<_param->_nb_inst_update; ++i) 30 32 { … … 112 114 } 113 115 } 116 } 117 // else 118 // { 119 // // RESET 120 // } 114 121 115 122 log_end(Meta_Predictor_Glue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_update_valack.cpp
r111 r123 27 27 log_function(Meta_Predictor_Glue,FUNCTION,_name.c_str()); 28 28 29 if (PORT_READ(in_NRESET)) 30 { 29 31 for (uint32_t i=0; i<_param->_nb_inst_update; ++i) 30 32 { … … 40 42 41 43 PORT_WRITE(out_UPDATE_ACK [i],ack); 44 } 45 } 46 else 47 { 48 // RESET 49 for (uint32_t i=0; i<_param->_nb_inst_update; ++i) 50 { 51 for (uint32_t j=0; j<_param->_nb_predictor; ++j) 52 PORT_WRITE(out_UPDATE_PREDICTOR_VAL [j][i],0); 53 PORT_WRITE(out_UPDATE_ACK [i],0); 54 } 42 55 } 43 56 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_genMealy_predict.cpp
r119 r123 29 29 log_function(Two_Level_Branch_Predictor,FUNCTION,_name.c_str()); 30 30 31 if (PORT_READ(in_NRESET)) 32 { 31 33 // =================================================================== 32 34 // =====[ PREDICT ]=================================================== … … 95 97 PORT_WRITE(out_PREDICT_HISTORY [i],history ); 96 98 } 99 } 97 100 98 101 log_end(Two_Level_Branch_Predictor,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction.cpp
r88 r123 38 38 log_printf(FUNC,Direction,FUNCTION,"Begin"); 39 39 40 #if DEBUG_Direction == true41 log_printf(INFO,Direction,FUNCTION,_("<%s> Parameters"),_name.c_str());40 // #if DEBUG_Direction == true 41 // log_printf(INFO,Direction,FUNCTION,_("<%s> Parameters"),_name.c_str()); 42 42 43 std::cout << *param << std::endl;44 #endif43 // std::cout << *param << std::endl; 44 // #endif 45 45 46 46 log_printf(INFO,Direction,FUNCTION,"Allocation"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue.cpp
r110 r123 40 40 usage_environment(_usage); 41 41 42 #if DEBUG_Prediction_unit_Glue == true43 log_printf(INFO,Prediction_unit_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());44 45 std::cout << *param << std::endl;46 #endif42 // #if DEBUG_Prediction_unit_Glue == true 43 // log_printf(INFO,Prediction_unit_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str()); 44 45 // std::cout << *param << std::endl; 46 // #endif 47 47 48 48 log_printf(INFO,Prediction_unit_Glue,FUNCTION,"Allocation"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_decod.cpp
r110 r123 290 290 PORT_WRITE(out_DECOD_ACK [i][j], ack[j]); 291 291 } 292 else 293 { 294 // Reset 295 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 296 { 297 PORT_WRITE(out_DECOD_BTB_VAL [i], 0); 298 PORT_WRITE(out_DECOD_RAS_VAL [i], 0); 299 PORT_WRITE(out_DECOD_UPT_VAL [i], 0); 300 } 301 302 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 303 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 304 PORT_WRITE(out_DECOD_ACK [i][j], 0); 305 } 292 306 log_end(Prediction_unit_Glue,FUNCTION); 293 307 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_predict.cpp
r111 r123 420 420 PORT_WRITE(out_PREDICT_ACK[i],ack[i]); 421 421 } 422 else 423 { 424 // RESET 425 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 426 { 427 PORT_WRITE(out_PREDICT_BTB_VAL [i], 0); 428 PORT_WRITE(out_PREDICT_DIR_VAL [i], 0); 429 PORT_WRITE(out_PREDICT_RAS_VAL [i], 0); 430 PORT_WRITE(out_PREDICT_UPT_VAL [i], 0); 431 } 432 for (uint32_t i=0; i<_param->_nb_context; i++) 433 PORT_WRITE(out_PREDICT_ACK[i],0); 434 } 422 435 423 436 log_end(Prediction_unit_Glue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_update.cpp
r98 r123 25 25 log_function(Prediction_unit_Glue,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET)) 28 { 27 29 for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++) 28 30 { … … 88 90 PORT_WRITE(out_UPDATE_UPT_ACK [i], upt_ack); 89 91 } 92 } 93 else 94 { 95 // RESET 96 for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++) 97 { 98 PORT_WRITE(out_UPDATE_BTB_VAL [i], 0); 99 PORT_WRITE(out_UPDATE_DIR_VAL [i], 0); 100 PORT_WRITE(out_UPDATE_RAS_VAL [i], 0); 101 PORT_WRITE(out_UPDATE_UPT_ACK [i], 0); 102 } 103 } 90 104 91 105 log_end(Prediction_unit_Glue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack.cpp
r88 r123 38 38 log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin"); 39 39 40 #if DEBUG_Return_Address_Stac == true41 log_printf(INFO,Return_Address_Stac,FUNCTION,_("<%s> Parameters"),_name.c_str());40 // #if DEBUG_Return_Address_Stac == true 41 // log_printf(INFO,Return_Address_Stac,FUNCTION,_("<%s> Parameters"),_name.c_str()); 42 42 43 std::cout << *param << std::endl;44 #endif43 // std::cout << *param << std::endl; 44 // #endif 45 45 46 46 log_printf(INFO,Return_Address_Stack,FUNCTION,"Allocation"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_genMealy_decod.cpp
r118 r123 66 66 } 67 67 } 68 else 69 { 70 // internal_DECOD_HIT [i] = (push or (reg_NB_ELT[context]>0)); 71 } 72 68 73 log_end(Return_Address_Stack,FUNCTION); 69 74 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_genMealy_predict.cpp
r118 r123 25 25 log_function(Return_Address_Stack,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET) == 1)27 if (PORT_READ(in_NRESET)) 28 28 { 29 29 #ifdef DEBUG_TEST … … 69 69 } 70 70 } 71 else 72 { 73 // for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 74 // internal_PREDICT_HIT [i] = (push or (reg_PREDICT_NB_ELT[context]>0)); 75 76 } 71 77 72 78 log_end(Return_Address_Stack,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Types.h
r122 r123 54 54 UPT_EVENT_STATE_KO_DECODE_WAIT_END_EVENT , // prediction unit is ok, wait the end of event (send by Context State) 55 55 UPT_EVENT_STATE_KO_COMMIT_UPDATE_CONTEXT , // prediction unit is update, send signal to context manager 56 UPT_EVENT_STATE_KO_COMMIT_WAIT_END_EVENT // prediction unit is ok, wait the end of event (send by Context State) 56 UPT_EVENT_STATE_KO_COMMIT_WAIT_END_EVENT , // prediction unit is ok, wait the end of event (send by Context State) 57 UPT_EVENT_STATE_KO_COMMIT_WAIT_END_UPDATE // prediction unit is ok, wait the end of event (send by Context State) 57 58 } upt_event_state_t; 58 59 … … 226 227 case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPT_EVENT_STATE_KO_COMMIT_UPDATE_CONTEXT : return "UPT_EVENT_STATE_KO_COMMIT_UPDATE_CONTEXT" ; break; 227 228 case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPT_EVENT_STATE_KO_COMMIT_WAIT_END_EVENT : return "UPT_EVENT_STATE_KO_COMMIT_WAIT_END_EVENT" ; break; 229 case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPT_EVENT_STATE_KO_COMMIT_WAIT_END_UPDATE : return "UPT_EVENT_STATE_KO_COMMIT_WAIT_END_UPDATE" ; break; 228 230 default : return ""; break; 229 231 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table.cpp
r111 r123 40 40 usage_environment(_usage); 41 41 42 #if DEBUG_Update_Prediction_Table == true43 log_printf(INFO,Update_Prediction_Table,FUNCTION,_("<%s> Parameters"),_name.c_str());44 45 std::cout << *param << std::endl;46 #endif42 // #if DEBUG_Update_Prediction_Table == true 43 // log_printf(INFO,Update_Prediction_Table,FUNCTION,_("<%s> Parameters"),_name.c_str()); 44 45 // std::cout << *param << std::endl; 46 // #endif 47 47 48 48 log_printf(INFO,Update_Prediction_Table,FUNCTION,"Allocation"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_branch_complete.cpp
r122 r123 24 24 log_begin(Update_Prediction_Table,FUNCTION); 25 25 log_function(Update_Prediction_Table,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET)) 28 { 27 29 for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++) 28 30 #ifdef DEBUG_TEST … … 129 131 // PORT_WRITE(out_BRANCH_COMPLETE_ADDRESS_DEST [i], internal_BRANCH_COMPLETE_ADDRESS_DEST [i]); 130 132 } 131 133 } 132 134 log_end(Update_Prediction_Table,FUNCTION); 133 135 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_decod.cpp
r122 r123 68 68 } 69 69 } 70 else 71 { 72 // RESET 73 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 74 PORT_WRITE(out_DECOD_ACK [i], 0); 75 } 76 70 77 log_end(Update_Prediction_Table,FUNCTION); 71 78 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_predict.cpp
r122 r123 57 57 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * ACK : %d",internal_PREDICT_ACK [i]); 58 58 59 PORT_WRITE(out_PREDICT_ACK [i], internal_PREDICT_ACK [i]);60 59 if (_param->_have_port_depth) 61 60 PORT_WRITE(out_PREDICT_UPDATE_PREDICTION_ID [i], internal_PREDICT_UPDATE_PREDICTION_ID [i]); … … 63 62 64 63 }//don't reset 64 else 65 { 66 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 67 { 68 internal_PREDICT_ACK [i] = 0; 69 // internal_PREDICT_UPDATE_PREDICTION_ID [i] = top; 70 } 71 } 72 73 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 74 PORT_WRITE(out_PREDICT_ACK [i], internal_PREDICT_ACK [i]); 65 75 66 76 log_end(Update_Prediction_Table,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp
r122 r123 248 248 internal_UPDATE_CONTEXT_ID [i] = context; 249 249 250 PORT_WRITE(out_UPDATE_VAL [i],internal_UPDATE_VAL [i]);251 250 if (val) 252 251 { … … 282 281 Tcontrol_t val = ((reg_UPT_EVENT_STATE [i] == UPT_EVENT_STATE_KO_DECODE_UPDATE_CONTEXT) or 283 282 (reg_UPT_EVENT_STATE [i] == UPT_EVENT_STATE_KO_COMMIT_UPDATE_CONTEXT)); 284 PORT_WRITE(out_BRANCH_EVENT_VAL [i],val);285 283 if (_param->_have_port_depth) 286 284 PORT_WRITE(out_BRANCH_EVENT_DEPTH [i],reg_EVENT_DEPTH [i]); … … 301 299 internal_UPDATE_VAL [i] = 0; 302 300 internal_UPDATE_VAL_WITHOUT_ACK [i] = 0; 301 internal_UPDATE_CONTEXT_ID [i] = 0; 302 303 303 } 304 304 for (uint32_t i=0; i<_param->_nb_context; i++) … … 308 308 } 309 309 310 // Write output 311 for (uint32_t i=0; i<_param->_nb_inst_update; i++) 312 PORT_WRITE(out_UPDATE_VAL [i],internal_UPDATE_VAL [i]); 313 for (uint32_t i=0; i<_param->_nb_context; i++) 314 PORT_WRITE(out_BRANCH_EVENT_VAL [i],internal_BRANCH_EVENT_VAL [i]); 310 315 311 316 log_end(Update_Prediction_Table,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp
r122 r123 545 545 } 546 546 547 // Test if freeing the branch with no accurate ? 548 if ((reg_UPDATE_PREDICTION_TABLE [context][depth]._is_accurate == false) and not ko) 549 reg_IS_ACCURATE [context] = true; 550 547 551 // Update pointer 548 552 // * if update RAS : update pointer is decreaste until it equal at top pointer … … 577 581 } 578 582 579 reg_UPT_EVENT_STATE [context] = upt_event_state;580 583 } 581 584 else … … 593 596 } 594 597 595 // Test if freeing the branch with no accurate ? 596 if ((reg_UPDATE_PREDICTION_TABLE [context][depth]._is_accurate == false) and not ko) 597 reg_IS_ACCURATE [context] = true; 598 // special case : 599 if ((upt_event_state == UPT_EVENT_STATE_KO_COMMIT_WAIT_END_UPDATE) and 600 (reg_UPT_UPDATE [context] == reg_EVENT_UPT_PTR [context])) 601 { 602 reg_UPT_TOP [context] = reg_UPT_TOP_EVENT [context]; 603 reg_UPT_UPDATE [context] = reg_UPT_TOP_EVENT [context]; 604 reg_IS_ACCURATE [context] = true; 605 606 upt_event_state = UPT_EVENT_STATE_OK; 607 } 608 609 reg_UPT_EVENT_STATE [context] = upt_event_state; 598 610 599 611 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UPT_UPDATE (after ) : %d",reg_UPT_UPDATE[context]); … … 654 666 655 667 Taddress_t address_src = reg_UPDATE_PREDICTION_TABLE [context][depth]._address_src; 656 upt_state_t event_top= reg_UPDATE_PREDICTION_TABLE [context][top]._state;668 upt_state_t top_state = reg_UPDATE_PREDICTION_TABLE [context][top]._state; 657 669 658 670 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * upt_event_state : %s",toString(upt_event_state).c_str()); 659 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * event_top : %s",toString(event_top).c_str());671 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * top_state : %s",toString(top_state).c_str()); 660 672 661 673 bool previous_ufpt_event = (reg_UFPT_EVENT_STATE [i] == UFPT_EVENT_STATE_KO_FLUSH); … … 667 679 or (upt_event_state == UPT_EVENT_STATE_KO_EVENT_WAIT_UFPT) 668 680 or (upt_event_state == UPT_EVENT_STATE_KO_EVENT_FLUSH_UPT) 669 or (event_top == UPDATE_PREDICTION_STATE_END_KO ) 670 or (event_top == UPDATE_PREDICTION_STATE_KO ) 681 or (upt_event_state == UPT_EVENT_STATE_KO_COMMIT_WAIT_END_UPDATE) 682 or (top_state == UPDATE_PREDICTION_STATE_END_KO ) 683 or (top_state == UPDATE_PREDICTION_STATE_KO ) 671 684 ); 672 685 … … 706 719 reg_UPDATE_PREDICTION_TABLE [context][top]._retire_ok = false; 707 720 708 switch ( event_top)721 switch (top_state) 709 722 { 710 723 case UPDATE_PREDICTION_STATE_END_KO : 724 case UPDATE_PREDICTION_STATE_END : 711 725 { 712 726 // Have already update predictor … … 867 881 case UPT_EVENT_STATE_KO_COMMIT_WAIT_END_EVENT : 868 882 { 869 Tdepth_t depth = reg_EVENT_UPT_PTR [i]; 883 Tdepth_t depth = reg_EVENT_UPT_PTR [i]; 884 Tdepth_t update = reg_UPT_UPDATE [i]; 870 885 871 886 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * depth : %d",depth); … … 878 893 } 879 894 880 reg_UPT_TOP [i] = reg_UPT_TOP_EVENT [i]; 881 reg_UPT_UPDATE [i] = reg_UPT_TOP_EVENT [i]; 882 883 // break; continue 895 // Special case : branch_complete a speculative branch and the context_state signal the end of this event before the complete of previous branch 896 if (depth != update) 897 { 898 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * EVENT [%d] <- EVENT_STATE_COMMIT_WAIT_END_UPDATE (event)",i); 899 upt_event_state = UPT_EVENT_STATE_KO_COMMIT_WAIT_END_UPDATE; 900 901 break; // stop here 902 } 903 904 reg_UPT_TOP [i] = reg_UPT_TOP_EVENT [i]; 905 reg_UPT_UPDATE [i] = reg_UPT_TOP_EVENT [i]; 906 907 // break; continue 884 908 } 885 909 case UPT_EVENT_STATE_KO_DECODE_WAIT_END_EVENT : … … 906 930 // Flush UPFT 907 931 flush_UFPT [i] = true; 932 933 if (upt_event_state == UPT_EVENT_STATE_KO_COMMIT_WAIT_END_UPDATE) 934 { 935 reg_UPT_TOP [i] = reg_UPT_TOP_EVENT [i]; 936 reg_UPT_UPDATE [i] = reg_UPT_TOP_EVENT [i]; 937 reg_IS_ACCURATE [i] = true; 938 939 upt_event_state = UPT_EVENT_STATE_OK; 940 } 908 941 909 942 // Flush UPT … … 978 1011 reg_EVENT_UPT_PTR [i] = top; 979 1012 reg_EVENT_UPT_FULL [i] = (not empty and (bottom == reg_UPT_TOP [i])); 1013 // reg_EVENT_DEPTH [i] = PORT_READ(in_EVENT_DEPTH [i]);//(top+1)%_param->_size_upt_queue[i]; 980 1014 reg_EVENT_DEPTH [i] = top; 1015 981 1016 // reg_EVENT_ADDRESS_SRC [i] = address_src; // delay_slot is compute in I_State 982 1017 // reg_EVENT_ADDRESS_DEST_VAL[i] = good_take; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit.cpp
r88 r123 37 37 log_printf(FUNC,Prediction_unit,FUNCTION,"Begin"); 38 38 39 #if DEBUG_Prediction_unit == true40 log_printf(INFO,Prediction_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());39 // #if DEBUG_Prediction_unit == true 40 // log_printf(INFO,Prediction_unit,FUNCTION,_("<%s> Parameters"),_name.c_str()); 41 41 42 std::cout << *param << std::endl;43 #endif42 // std::cout << *param << std::endl; 43 // #endif 44 44 45 45 log_printf(INFO,Prediction_unit,FUNCTION,"Allocation");
Note: See TracChangeset
for help on using the changeset viewer.