Ignore:
Timestamp:
Feb 1, 2011, 9:57:54 PM (13 years ago)
Author:
rosiere
Message:

1) Integration of RegisterFile_Internal_Banked in RegisterFile?
2) Erase "read_write" interface in RegisterFile_Monolithic component
3) Add smith predictor parameters in Load_store_pointer_unit.
4) Fix not statistics flags

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

    r124 r146  
    1010// #include <assert.h>
    1111
    12 namespace morpheo                    {
     12namespace morpheo {
    1313namespace behavioural {
    1414namespace core {
     
    7777                        log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * pht_history (old): %llx",pht_history);
    7878                       
     79                        // TODO -> don't change PHT here !
     80                        Thistory_t min = 0;
     81                        Thistory_t max = _param->_pht_counter_max;
     82
    7983                        // PHT : saturation counter
    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                        
     84                        switch (_param->_pht_scheme)
     85                          {
     86                          case PHT_SCHEME_COUNTER :
     87                            {
     88                              pht_history = (direction==1)?((pht_history<max)?(pht_history+1):(max)):((pht_history>min)?(pht_history-1):(min));
     89                              break;
     90                            }
     91                          case PHT_SCHEME_FSM :
     92                            {
     93                              Thistory_t down = _param->_pht_threshold_down;
     94                              Thistory_t up   = _param->_pht_threshold_up;
     95
     96                              pht_history = (direction==1)?(((pht_history==max) or (pht_history==up))?(max):(pht_history+1)):(((pht_history==min) or (pht_history==down))?(min):(pht_history-1));
     97                              break;
     98                            }
     99                          default :
     100                            {
     101                              break;
     102                            }
     103                          }
     104
    82105                        log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * pht_history (new): %llx",pht_history);
    83106                       
     
    169192                      else
    170193                        {
    171                           pht_history = (direction==1)?((pht_history<_param->_pht_counter_max)?(pht_history+1):(pht_history)):((pht_history>0)?(pht_history-1):(pht_history));
     194                          Thistory_t min = 0;
     195                          Thistory_t max = _param->_pht_counter_max;
     196                         
     197                          // PHT : saturation counter
     198                          switch (_param->_pht_scheme)
     199                            {
     200                            case PHT_SCHEME_COUNTER :
     201                              {
     202                                //  [ 11 ] -- NT -> [ 10 ]
     203                                //  [    ] <-  T -- [    ]
     204                                //                   ^  |
     205                                //                   |  |
     206                                //                   T NT
     207                                //                   |  |
     208                                //                   |  V
     209                                //  [ 00 ] --  T -> [ 01 ]
     210                                //  [    ] <- NT -- [    ]
     211
     212                                pht_history = (direction==1)?((pht_history<max)?(pht_history+1):(max)):((pht_history>min)?(pht_history-1):(min));
     213                                break;
     214                              }
     215                            case PHT_SCHEME_FSM :
     216                              {
     217                                //  [11] -- NT -> [10]
     218                                //  [  ] <-  T -- [  ]
     219                                //   ^              |
     220                                //   |              |
     221                                //   T             NT
     222                                //   |              |
     223                                //   |              V
     224                                //  [00] -- NT -> [00]
     225                                //  [  ] <-  T -- [  ]
     226
     227                                Thistory_t down = _param->_pht_threshold_down;
     228                                Thistory_t up   = _param->_pht_threshold_up;
     229                               
     230                                pht_history = (direction==1)?(((pht_history==max) or (pht_history==up))?(max):(pht_history+1)):(((pht_history==min) or (pht_history==down))?(min):(pht_history-1));
     231                                break;
     232                              }
     233                            default :
     234                              {
     235                                break;
     236                              }
     237                            }
    172238                        }
    173239                     
Note: See TracChangeset for help on using the changeset viewer.