Changeset 124 for 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
- Timestamp:
- Jun 17, 2009, 2:11:25 PM (15 years ago)
- File:
-
- 1 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/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;
Note: See TracChangeset
for help on using the changeset viewer.