Changeset 128 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit
- Timestamp:
- Jun 26, 2009, 10:43:23 AM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit
- Files:
-
- 17 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/include/Branch_Target_Buffer_Glue.h
r82 r128 82 82 public : SC_IN (Tcontrol_t ) *** in_PREDICT_REGISTER_IS_ACCURATE ; //[nb_inst_predict][associativity] 83 83 84 public : SC_IN (T ptr_t) ** in_PREDICT_SORT_VAL ; //[nb_inst_predict]84 public : SC_IN (Tcontrol_t ) ** in_PREDICT_SORT_VAL ; //[nb_inst_predict] 85 85 public : SC_IN (Tptr_t ) ** in_PREDICT_SORT_INDEX ; //[nb_inst_predict] 86 86 -
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_allocation.cpp
r112 r128 74 74 if (_param->_have_port_victim) 75 75 { 76 ALLOC1_SIGNAL_IN ( in_PREDICT_SORT_VAL ,"sort_val" ,Tptr_t,1);77 ALLOC1_SIGNAL_IN ( in_PREDICT_SORT_INDEX ,"sort_index",Tptr_t,_param->_size_victim);76 ALLOC1_SIGNAL_IN ( in_PREDICT_SORT_VAL , "sort_val" ,Tcontrol_t ,1); 77 ALLOC1_SIGNAL_IN ( in_PREDICT_SORT_INDEX , "sort_index" ,Tptr_t ,_param->_size_victim); 78 78 79 79 ALLOC1_SIGNAL_OUT(out_PREDICT_VICTIM_VAL , "victim_val" ,Tcontrol_t , 1); -
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
r123 r128 38 38 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * val : %d",val ); 39 39 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * register_ack : %d",register_ack); 40 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * port_victim : %d",_param->_have_port_victim); 40 41 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * sort_val : %d",sort_val ); 41 42 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * victim_ack : %d",victim_ack ); … … 51 52 52 53 // Multiplexor 54 53 55 PORT_WRITE(out_PREDICT_HIT [i],hit); 54 56 PORT_WRITE(out_PREDICT_ADDRESS_SRC [i],address_src); … … 64 66 victim_ack 65 67 )); 68 66 69 PORT_WRITE(out_PREDICT_REGISTER_VAL [i], ( 67 70 val and … … 84 87 PORT_WRITE(out_PREDICT_VICTIM_INDEX [i], index); 85 88 } 89 86 90 } 87 91 } -
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_transition.cpp
r107 r128 29 29 for (uint32_t i=0; i<_param->_size_bank; i++) 30 30 for (uint32_t j=0; j<_param->_associativity; j++) 31 reg_BTB [i][j]._val = false; 31 { 32 reg_BTB [i][j]._val = false; 33 reg_BTB [i][j]._context = 0; // not necessary 34 reg_BTB [i][j]._address_dest_val = 0; // not necessary 35 reg_BTB [i][j]._address_src = 0; // not necessary 36 reg_BTB [i][j]._address_dest = 0; // not necessary 37 reg_BTB [i][j]._condition = 0; // not necessary 38 reg_BTB [i][j]._last_take = 0; // not necessary 39 reg_BTB [i][j]._accurate = 0; // not necessary 40 } 32 41 } 33 42 else -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_deallocation.cpp
r115 r128 64 64 { 65 65 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 66 delete_component_sort [i];66 delete _component_sort [i]; 67 67 delete [] _component_sort; 68 delete _component_victim;68 delete _component_victim; 69 69 } 70 70 delete _component_branch_target_buffer_glue; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_statistics_allocation.cpp
r88 r128 35 35 } 36 36 37 //_stat->add_stat(_component_branch_target_buffer_glue ->_stat);37 _stat->add_stat(_component_branch_target_buffer_glue ->_stat); 38 38 _stat->add_stat(_component_branch_target_buffer_register->_stat); 39 39 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Parameters.cpp
r111 r128 80 80 { 81 81 log_begin(Meta_Predictor_Glue,FUNCTION); 82 83 DELETE1(_predictor_history_mask ,_nb_predictor); 84 DELETE1(_predictor_history_shift_msb,_nb_predictor); 85 DELETE1(_predictor_history_shift ,_nb_predictor); 86 82 87 log_end(Meta_Predictor_Glue,FUNCTION); 83 88 }; … … 88 93 { 89 94 log_begin(Meta_Predictor_Glue,FUNCTION); 90 91 DELETE1(_predictor_history_mask ,_nb_predictor);92 DELETE1(_predictor_history_shift,_nb_predictor);93 94 95 log_end(Meta_Predictor_Glue,FUNCTION); 95 96 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/src/Meta_Predictor_deallocation.cpp
r112 r128 45 45 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 46 46 47 DELETE0(_component_glue); 48 DELETE1(_component_two_level_branch_predictor,_param->_nb_predictor); 47 delete _component_glue; 48 for (uint32_t i=0; i<_param->_nb_predictor; ++i) 49 delete _component_two_level_branch_predictor [i]; 50 delete [] _component_two_level_branch_predictor; 49 51 50 52 delete _component; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/src/Meta_Predictor_statistics_allocation.cpp
r110 r128 28 28 "Meta_Predictor", 29 29 param_statistics); 30 31 for (uint32_t i=0; i<_param->_nb_predictor; ++i) 32 _stat->add_stat(_component_two_level_branch_predictor [i]->_stat); 33 _stat->add_stat(_component_glue ->_stat); 30 34 31 35 log_end(Meta_Predictor,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/src/Parameters.cpp
r112 r128 122 122 log_begin(Meta_Predictor,FUNCTION); 123 123 124 DELETE1(_param_two_level_branch_predictor, _nb_predictor); 124 delete _param_glue; 125 for (uint32_t i=0; i<_nb_predictor; ++i) 126 delete _param_two_level_branch_predictor [i]; 127 delete [] _param_two_level_branch_predictor; 125 128 126 129 DELETE1(_predictor_size_history , _nb_predictor); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction_statistics_allocation.cpp
r81 r128 28 28 param_statistics); 29 29 30 _stat->add_stat(_component_glue->_stat); 30 if (_param->_have_component_meta_predictor) 31 _stat->add_stat(_component_meta_predictor->_stat); 32 _stat->add_stat(_component_glue ->_stat); 31 33 32 34 log_printf(FUNC,Direction,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_transition.cpp
r111 r128 37 37 // reg_PREDICT_BOTTOM [i] = 0; 38 38 reg_PREDICT_NB_ELT [i] = 0; 39 40 for (uint32_t j=0; j<_param->_size_queue [i]; ++j) 41 reg_stack [i][j]._address = 0; // not necessary 39 42 } 40 43 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Parameters.cpp
r122 r128 63 63 for (uint32_t i=0; i<_nb_thread; i++) 64 64 _have_thread[i] = false; 65 for (uint32_t i=0; i<_nb_ context; i++)65 for (uint32_t i=0; i<_nb_thread; i++) 66 66 _have_thread[_translate_num_context_to_num_thread [i]] = true; 67 67 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_deallocation.cpp
r122 r128 172 172 173 173 #if defined(DEBUG) and defined(DEBUG_Update_Prediction_Table) and (DEBUG_Update_Prediction_Table == true) 174 for (uint32_t i=0; i<_param->_nb_thread; ++i) 175 if (_param->_have_thread [i]) 176 { 177 branchement_log_file [i].close(); 178 } 174 { 175 for (uint32_t i=0; i<_param->_nb_thread; ++i) 176 if (_param->_have_thread [i]) 177 { 178 branchement_log_file [i].close(); 179 } 180 delete [] branchement_log_file; 181 } 179 182 #endif 180 183 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_statistics_deallocation.cpp
r97 r128 29 29 delete _stat; 30 30 31 DELETE2(_stat_nb_branch_hit ,_param->_nb_context,MAX_BRANCH_CONDITION); 32 DELETE2(_stat_nb_branch_miss ,_param->_nb_context,MAX_BRANCH_CONDITION); 33 DELETE1(_stat_nb_branch_unused ,_param->_nb_context); 34 DELETE1(_stat_ufpt_queue_nb_elt ,_param->_nb_context); 35 DELETE1(_stat_upt_queue_nb_elt ,_param->_nb_context); 31 DELETE2(_stat_nb_branch_hit ,_param->_nb_context,MAX_BRANCH_CONDITION); 32 DELETE2(_stat_nb_branch_miss ,_param->_nb_context,MAX_BRANCH_CONDITION); 33 DELETE1(_stat_nb_branch_unused ,_param->_nb_context); 34 35 DELETE1(_stat_nb_branch_ifetch_prediction,_param->_nb_context); 36 DELETE1(_stat_nb_branch_accurate ,_param->_nb_context); 37 38 DELETE1(_stat_ufpt_queue_nb_elt ,_param->_nb_context); 39 DELETE1(_stat_upt_queue_nb_elt ,_param->_nb_context); 36 40 37 41 log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp
r124 r128 34 34 { 35 35 for (uint32_t j=0; j<_param->_size_ufpt_queue[i]; ++j) 36 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state = UPDATE_FETCH_PREDICTION_STATE_EMPTY; 36 { 37 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state = UPDATE_FETCH_PREDICTION_STATE_EMPTY; 38 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._condition = 0; // not necessary 39 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._address_src = 0; // not necessary 40 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._address_dest = 0; // not necessary 41 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._last_take = 0; // not necessary 42 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._is_accurate = 0; // not necessary 43 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._history = 0; // not necessary 44 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._address_ras = 0; // not necessary 45 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._index_ras = 0; // not necessary 46 } 37 47 reg_UFPT_BOTTOM [i] = 0; 38 48 reg_UFPT_TOP [i] = 0; … … 42 52 43 53 for (uint32_t j=0; j<_param->_size_upt_queue[i]; ++j) 44 reg_UPDATE_PREDICTION_TABLE [i][j]._state = UPDATE_PREDICTION_STATE_EMPTY; 54 { 55 reg_UPDATE_PREDICTION_TABLE [i][j]._state = UPDATE_PREDICTION_STATE_EMPTY; 56 reg_UPDATE_PREDICTION_TABLE [i][j]._condition = 0; // not necessary 57 reg_UPDATE_PREDICTION_TABLE [i][j]._address_src = 0; // not necessary 58 reg_UPDATE_PREDICTION_TABLE [i][j]._address_dest = 0; // not necessary 59 reg_UPDATE_PREDICTION_TABLE [i][j]._last_take = 0; // not necessary 60 reg_UPDATE_PREDICTION_TABLE [i][j]._good_take = 0; // not necessary 61 reg_UPDATE_PREDICTION_TABLE [i][j]._is_accurate = 0; // not necessary 62 reg_UPDATE_PREDICTION_TABLE [i][j]._history = 0; // not necessary 63 reg_UPDATE_PREDICTION_TABLE [i][j]._address_ras = 0; // not necessary 64 reg_UPDATE_PREDICTION_TABLE [i][j]._index_ras = 0; // not necessary 65 reg_UPDATE_PREDICTION_TABLE [i][j]._ifetch_prediction= 0; // not necessary 66 reg_UPDATE_PREDICTION_TABLE [i][j]._miss_commit = 0; // not necessary 67 reg_UPDATE_PREDICTION_TABLE [i][j]._retire_ok = 0; // not necessary 68 reg_UPDATE_PREDICTION_TABLE [i][j]._miss_prediction = 0; // not necessary 69 } 45 70 reg_UPT_BOTTOM [i] = 0; 46 71 reg_UPT_TOP [i] = 0; … … 54 79 reg_UPT_EVENT_STATE [i] = UPT_EVENT_STATE_OK; 55 80 56 // reg_EVENT_VAL [i] = false; 57 // reg_EVENT_STATE [i] = EVENT_STATE_OK; 58 // reg_EVENT_IS_BRANCH [i] = true; 81 reg_EVENT_UPT_PTR [i] = 0; // not necessary 82 reg_EVENT_UPT_FULL [i] = 0; // not necessary 83 84 // reg_EVENT_STATE [i] = EVENT_STATE_OK; // not necessary 85 // reg_EVENT_IS_BRANCH [i] = true ; // not necessary 86 87 reg_EVENT_DEPTH [i] = 0; // not necessary 88 reg_EVENT_ADDRESS_SRC [i] = 0; // not necessary 89 reg_EVENT_ADDRESS_DEST_VAL [i] = 0; // not necessary 90 reg_EVENT_ADDRESS_DEST [i] = 0; // not necessary 91 reg_EVENT_CAN_CONTINUE [i] = 0; // not necessary 92 59 93 } 60 94 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_deallocation.cpp
r119 r128 66 66 DELETE1_SIGNAL( in_BRANCH_EVENT_ACK ,_param->_nb_context,1); 67 67 // DELETE1_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID ,_param->_nb_context,_param->_size_context_id); 68 //DELETE1_SIGNAL(out_BRANCH_EVENT_DEPTH ,_param->_nb_context,_param->_size_depth);68 DELETE1_SIGNAL(out_BRANCH_EVENT_DEPTH ,_param->_nb_context,_param->_size_depth); 69 69 // DELETE1_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION ,_param->_nb_context,1); 70 70 DELETE1_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC ,_param->_nb_context,_param->_size_instruction_address);
Note: See TracChangeset
for help on using the changeset viewer.