Changeset 115 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:
- Apr 20, 2009, 11:29:17 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
r112 r115 117 117 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht"); 118 118 119 Thistory_t bht_history = (history>>_param->_bht_history_ rshift)&_param->_bht_history_mask;119 Thistory_t bht_history = (history>>_param->_bht_history_shift )&_param->_bht_history_mask; 120 120 Thistory_t bht_num_reg = address & _param->_bht_address_mask; 121 121 … … 125 125 // BHT : shift register 126 126 if (not history_val) 127 bht_history = (direction)?_param->_bht_init_take:_param->_bht_init_ntake; 127 { 128 bht_history = (direction)?_param->_bht_init_take:_param->_bht_init_ntake; 129 } 128 130 else 129 bht_history = ((bht_history<<1) | direction)&_param->_bht_history_mask ; 131 { 132 bht_history = ((bht_history<<1) | direction)&_param->_bht_history_mask ; 133 } 130 134 131 135 pht_bht_history = bht_history; … … 138 142 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht"); 139 143 140 Thistory_t pht_history = (history>>_param->_pht_history_ rshift)&_param->_pht_history_mask;141 Thistory_t pht_num_ reg = pht_bht_history xor ((address&_param->_pht_address_share_mask)<<_param->_pht_address_share_lshift);142 Thistory_t pht_num_ bank= (address>>_param->_pht_address_bank_rshift)&_param->_pht_address_bank_mask;144 Thistory_t pht_history = (history>>_param->_pht_history_shift )&_param->_pht_history_mask; 145 Thistory_t pht_num_bank= (address>>_param->_pht_address_bank_shift )&_param->_pht_address_bank_mask; 146 Thistory_t pht_num_reg = pht_bht_history xor ((address&_param->_pht_address_share_mask)<<_param->_pht_address_share_shift); 143 147 144 148 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (old): %x",pht_bht_history); … … 149 153 // PHT : saturation counter 150 154 if (not history_val) 151 pht_history = (direction)?_param->_pht_init_take:_param->_pht_init_ntake; 155 { 156 pht_history = (direction)?_param->_pht_init_take:_param->_pht_init_ntake; 157 } 152 158 else 153 pht_history = (direction==1)?((pht_history<_param->_pht_counter_max)?(pht_history+1):(pht_history)):((pht_history>0)?(pht_history-1):(pht_history)); 159 { 160 pht_history = (direction==1)?((pht_history<_param->_pht_counter_max)?(pht_history+1):(pht_history)):((pht_history>0)?(pht_history-1):(pht_history)); 161 } 154 162 155 163 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (new): %x",pht_history);
Note: See TracChangeset
for help on using the changeset viewer.