Changeset 124 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit
- Timestamp:
- Jun 17, 2009, 2:11:25 PM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Parameters.cpp
r115 r124 72 72 73 73 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _size_history : %d",_size_history ); 74 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _bht_history_mask : 0x% x",_bht_history_mask );75 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _bht_history_shift : % d",_bht_history_shift );76 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_history_mask : 0x% x",_pht_history_mask );77 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_history_shift : % d",_pht_history_shift );74 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _bht_history_mask : 0x%llx",_bht_history_mask ); 75 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _bht_history_shift : %lld",_bht_history_shift ); 76 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_history_mask : 0x%llx",_pht_history_mask ); 77 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_history_shift : %lld",_pht_history_shift ); 78 78 79 79 _bht_init_take = static_cast<Thistory_t>(-1)&_bht_history_mask; … … 82 82 _pht_init_ntake = _pht_init_take-1; // size = 4 : 0111/2 83 83 84 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _bht_init_take : 0x% x",_bht_init_take );85 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _bht_init_ntake : 0x% x",_bht_init_ntake);86 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_init_take : 0x% x",_pht_init_take );87 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_init_ntake : 0x% x",_pht_init_ntake);84 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _bht_init_take : 0x%llx",_bht_init_take ); 85 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _bht_init_ntake : 0x%llx",_bht_init_ntake); 86 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_init_take : 0x%llx",_pht_init_take ); 87 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_init_ntake : 0x%llx",_pht_init_ntake); 88 88 89 89 if (_have_bht) -
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
r123 r124 42 42 Taddress_t address = PORT_READ(in_PREDICT_ADDRESS [i]); 43 43 Thistory_t history = 0; 44 Tcontrol_t direction ;44 Tcontrol_t direction = 0; 45 45 46 46 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * address : 0x%.8x",address); … … 58 58 pht_bht_history = bht_history; 59 59 60 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history : 0x% x",bht_history);61 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_num_reg : % d",bht_num_reg);60 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history : 0x%llx",bht_history); 61 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_num_reg : %lld",bht_num_reg); 62 62 63 63 history = (bht_history << _param->_bht_history_shift )&_param->_bht_history_mask ; … … 73 73 Thistory_t pht_num_reg = (pht_bht_history xor ((address&_param->_pht_address_share_mask)<<_param->_pht_address_share_shift)); 74 74 75 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history : 0x% x",pht_bht_history);76 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_reg : % d",pht_num_reg);77 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_bank : % d",pht_num_bank);75 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history : 0x%llx",pht_bht_history); 76 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_reg : %lld",pht_num_reg); 77 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_bank : %lld",pht_num_bank); 78 78 79 79 Thistory_t pht_history = reg_PHT [pht_num_bank][pht_num_reg]; 80 80 81 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history : 0x% x",pht_history);81 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history : 0x%llx",pht_history); 82 82 83 83 history |= (pht_history << _param->_pht_history_shift )&_param->_pht_history_mask; … … 92 92 93 93 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * direction : %d",direction); 94 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * history : 0x% x",history);94 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * history : 0x%llx",history); 95 95 96 96 PORT_WRITE(out_PREDICT_DIRECTION [i],direction); -
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_transition.cpp
r119 r124 52 52 { 53 53 Thistory_t bht_num_reg = internal_PREDICT_BHT_NUM_REG [i]; 54 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_num_reg : % d",bht_num_reg);54 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_num_reg : %lld",bht_num_reg); 55 55 56 56 // #ifdef DEBUG_TEST … … 59 59 60 60 Thistory_t bht_history = reg_BHT[bht_num_reg]; 61 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (old): % x",bht_history);61 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (old): %llx",bht_history); 62 62 63 63 64 64 bht_history = ((bht_history<<1) | direction)&_param->_bht_history_mask ; 65 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (new): % x",bht_history);65 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (new): %llx",bht_history); 66 66 reg_BHT [bht_num_reg] = bht_history; 67 67 } … … 71 71 Thistory_t pht_num_reg = internal_PREDICT_PHT_NUM_REG [i]; 72 72 Thistory_t pht_num_bank= internal_PREDICT_PHT_NUM_BANK [i]; 73 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_reg : % d",pht_num_reg);74 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_bank : % d",pht_num_bank);73 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_reg : %lld",pht_num_reg); 74 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_bank : %lld",pht_num_bank); 75 75 76 76 Thistory_t pht_history = reg_PHT [pht_num_bank][pht_num_reg]; 77 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (old): % x",pht_history);77 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (old): %llx",pht_history); 78 78 79 79 // PHT : saturation counter 80 80 pht_history = (direction==1)?((pht_history<_param->_pht_counter_max)?(pht_history+1):(pht_history)):((pht_history>0)?(pht_history-1):(pht_history)); 81 81 82 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (new): % x",pht_history);82 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (new): %llx",pht_history); 83 83 84 84 reg_PHT [pht_num_bank][pht_num_reg] = pht_history; … … 95 95 { 96 96 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * UPDATE [%d]",i); 97 if (_param->_update_on_prediction) 97 98 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * miss : %d",PORT_READ(in_UPDATE_MISS [i])); 98 99 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * update_on_predict: %d",_param->_update_on_prediction); … … 125 126 Thistory_t bht_num_reg = address & _param->_bht_address_mask; 126 127 127 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (old): % x",bht_history);128 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_num_reg : % x",bht_num_reg);128 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (old): %llx",bht_history); 129 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_num_reg : %llx",bht_num_reg); 129 130 130 131 // BHT : shift register … … 139 140 140 141 pht_bht_history = bht_history; 141 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (new): % x",bht_history);142 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (new): %llx",bht_history); 142 143 143 144 // #ifdef DEBUG_TEST … … 156 157 Thistory_t pht_num_reg = pht_bht_history xor ((address&_param->_pht_address_share_mask)<<_param->_pht_address_share_shift); 157 158 158 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (old): % x",pht_bht_history);159 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (old): % x",pht_history);160 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_reg : % x",pht_num_reg);161 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_bank : % x",pht_num_bank);159 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (old): %llx",pht_bht_history); 160 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (old): %llx",pht_history); 161 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_reg : %llx",pht_num_reg); 162 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_bank : %llx",pht_num_bank); 162 163 163 164 // PHT : saturation counter … … 171 172 } 172 173 173 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (new): % x",pht_history);174 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (new): %llx",pht_history); 174 175 175 176 reg_PHT [pht_num_bank][pht_num_reg] = pht_history; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table.cpp
r123 r124 141 141 } 142 142 143 # ifdef SYSTEMCASS_SPECIFIC144 // List dependency information145 for (uint32_t i=0; i<_param->_nb_inst_decod; i++)146 {147 if (_param->_have_port_context_id)148 (*(out_DECOD_ACK [i])) (*(in_DECOD_CONTEXT_ID [i]));149 }150 # endif143 // # ifdef SYSTEMCASS_SPECIFIC 144 // // List dependency information 145 // for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 146 // { 147 // if (_param->_have_port_context_id) 148 // (*(out_DECOD_ACK [i])) (*(in_DECOD_CONTEXT_ID [i])); 149 // } 150 // # endif 151 151 152 152 log_printf(INFO,Update_Prediction_Table,FUNCTION,"Method - genMealy_branch_complete"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp
r122 r124 258 258 "", 259 259 "log", 260 false,261 log_with_pid,260 _simulation_file_with_date, 261 _simulation_file_with_pid, 262 262 true); 263 263 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp
r123 r124 120 120 branchement_log_file [num_thread] 121 121 << std::hex 122 << "0x" << reg_UPDATE_PREDICTION_TABLE [i][bottom]._address_src<< " "123 << "0x" << reg_UPDATE_PREDICTION_TABLE [i][bottom]._address_dest<< " "122 << "0x" << std::setfill('0') << std::setw(_param->_size_general_data/4) << reg_UPDATE_PREDICTION_TABLE [i][bottom]._address_src << " " 123 << "0x" << std::setfill('0') << std::setw(_param->_size_general_data/4) << reg_UPDATE_PREDICTION_TABLE [i][bottom]._address_dest << " " 124 124 << std::dec 125 125 << reg_UPDATE_PREDICTION_TABLE [i][bottom]._good_take << " - " … … 127 127 << reg_UPDATE_PREDICTION_TABLE [i][bottom]._miss_prediction << " " 128 128 << reg_UPDATE_PREDICTION_TABLE [i][bottom]._ifetch_prediction << " " 129 << "(" << (uint32_t)reg_UPDATE_PREDICTION_TABLE [i][bottom]._condition<< ")"129 << "(" << toString(reg_UPDATE_PREDICTION_TABLE [i][bottom]._condition) << ")" 130 130 << std::endl; 131 131 } … … 671 671 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * top_state : %s",toString(top_state).c_str()); 672 672 673 bool previous_ufpt_event = (reg_UFPT_EVENT_STATE [ i] == UFPT_EVENT_STATE_KO_FLUSH);673 bool previous_ufpt_event = (reg_UFPT_EVENT_STATE [context] == UFPT_EVENT_STATE_KO_FLUSH); 674 674 675 675 … … 1166 1166 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UFPT_NB_UPDATE : %d",reg_UFPT_NB_UPDATE [i]); 1167 1167 for (uint32_t j=0; j<_param->_size_ufpt_queue[i]; j++) 1168 log_printf(TRACE,Update_Prediction_Table,FUNCTION," [%d] %.4d, %.8x (%.8x) %.8x (%.8x), %.1d %.1d, %.8d %.8x (%.8x) %.4d - %s", 1168 { 1169 log_printf(TRACE,Update_Prediction_Table,FUNCTION," [%d] %.4d, %.8x (%.8x) %.8x (%.8x), %.1d %.1d, %.8lld %.8x (%.8x) %.4d - %s", 1169 1170 j, 1170 1171 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._condition, … … 1181 1182 toString(reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state).c_str() 1182 1183 ); 1184 } 1183 1185 1184 1186 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * Dump UPT [%d] (Update_Prediction_Table)",i); … … 1189 1191 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UPT_EMPTY : %d",reg_UPT_EMPTY [i]); 1190 1192 for (uint32_t j=0; j<_param->_size_upt_queue[i]; j++) 1191 log_printf(TRACE,Update_Prediction_Table,FUNCTION," [%d] %.4d, %.8x (%.8x) %.8x (%.8x), %.1d %.1d %.1d, %.8 d %.8x (%.8x) %.4d - %s",1193 log_printf(TRACE,Update_Prediction_Table,FUNCTION," [%d] %.4d, %.8x (%.8x) %.8x (%.8x), %.1d %.1d %.1d, %.8lld %.8x (%.8x) %.4d - %s", 1192 1194 j, 1193 1195 reg_UPDATE_PREDICTION_TABLE [i][j]._condition,
Note: See TracChangeset
for help on using the changeset viewer.