Ignore:
Timestamp:
Apr 20, 2009, 11:29:17 PM (15 years ago)
Author:
rosiere
Message:

1) Write queue with mealy
2) Network : fix bug
3) leak memory

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  
    117117                      log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * bht");
    118118
    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;
    120120                      Thistory_t bht_num_reg = address & _param->_bht_address_mask;
    121121                     
     
    125125                      // BHT : shift register
    126126                      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                        }
    128130                      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                        }
    130134                       
    131135                      pht_bht_history = bht_history;
     
    138142                      log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * pht");
    139143
    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);
    143147                     
    144148                      log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"    * bht_history (old): %x",pht_bht_history);
     
    149153                      // PHT : saturation counter
    150154                      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                        }
    152158                      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                        }
    154162                     
    155163                      log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"    * pht_history (new): %x",pht_history);
Note: See TracChangeset for help on using the changeset viewer.