Ignore:
Timestamp:
Jun 17, 2009, 2:11:25 PM (15 years ago)
Author:
rosiere
Message:

1) Add test and configuration
2) Fix Bug
3) Add log file in load store unit
4) Fix Bug in environment

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  
    7272                             
    7373    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 );
    7878
    7979    _bht_init_take           = static_cast<Thistory_t>(-1)&_bht_history_mask;
     
    8282    _pht_init_ntake          = _pht_init_take-1;           // size = 4 : 0111/2
    8383
    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);
    8888   
    8989    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  
    4242          Taddress_t address     = PORT_READ(in_PREDICT_ADDRESS   [i]);
    4343          Thistory_t history     = 0;
    44           Tcontrol_t direction;
     44          Tcontrol_t direction   = 0;
    4545
    4646          log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * address          : 0x%.8x",address);
     
    5858              pht_bht_history = bht_history;
    5959
    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);
    6262
    6363              history   = (bht_history << _param->_bht_history_shift )&_param->_bht_history_mask ;
     
    7373              Thistory_t pht_num_reg = (pht_bht_history xor ((address&_param->_pht_address_share_mask)<<_param->_pht_address_share_shift));
    7474
    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);
    7878
    7979              Thistory_t pht_history = reg_PHT [pht_num_bank][pht_num_reg];
    8080             
    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);
    8282             
    8383              history  |= (pht_history << _param->_pht_history_shift )&_param->_pht_history_mask;
     
    9292
    9393          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);
    9595
    9696          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  
    5252                      {
    5353                        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);
    5555
    5656// #ifdef DEBUG_TEST
     
    5959
    6060                        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);
    6262
    6363                       
    6464                        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);
    6666                        reg_BHT [bht_num_reg] = bht_history;
    6767                      }
     
    7171                        Thistory_t pht_num_reg = internal_PREDICT_PHT_NUM_REG  [i];
    7272                        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);
    7575
    7676                        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);
    7878                       
    7979                        // PHT : saturation counter
    8080                        pht_history = (direction==1)?((pht_history<_param->_pht_counter_max)?(pht_history+1):(pht_history)):((pht_history>0)?(pht_history-1):(pht_history));
    8181                       
    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);
    8383                       
    8484                        reg_PHT [pht_num_bank][pht_num_reg] = pht_history;
     
    9595            {
    9696              log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * UPDATE [%d]",i);
     97              if (_param->_update_on_prediction)
    9798              log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * miss             : %d",PORT_READ(in_UPDATE_MISS [i]));
    9899              log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * update_on_predict: %d",_param->_update_on_prediction);
     
    125126                      Thistory_t bht_num_reg = address & _param->_bht_address_mask;
    126127                     
    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);
    129130                     
    130131                      // BHT : shift register
     
    139140                       
    140141                      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);
    142143
    143144// #ifdef DEBUG_TEST
     
    156157                      Thistory_t pht_num_reg = pht_bht_history xor ((address&_param->_pht_address_share_mask)<<_param->_pht_address_share_shift);
    157158                     
    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);
    162163                     
    163164                      // PHT : saturation counter
     
    171172                        }
    172173                     
    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);
    174175                     
    175176                      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  
    141141          }
    142142       
    143 # 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   
     143// # 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   
    151151
    152152        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  
    258258                                                   "",
    259259                                                   "log",
    260                                                    false,
    261                                                    log_with_pid,
     260                                                   _simulation_file_with_date,
     261                                                   _simulation_file_with_pid,
    262262                                                   true);
    263263         
  • 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  
    120120                          branchement_log_file [num_thread]
    121121                            << 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 << " "
    124124                            << std::dec
    125125                            <<         reg_UPDATE_PREDICTION_TABLE [i][bottom]._good_take         << " - "
     
    127127                            <<         reg_UPDATE_PREDICTION_TABLE [i][bottom]._miss_prediction   << " "
    128128                            <<         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) << ")"
    130130                            << std::endl;
    131131                        }
     
    671671                        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * top_state           : %s",toString(top_state).c_str());
    672672                       
    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);
    674674                       
    675675                       
     
    11661166        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UFPT_NB_UPDATE      : %d",reg_UFPT_NB_UPDATE      [i]);
    11671167        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",
    11691170                     j,
    11701171                     reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._condition,
     
    11811182                     toString(reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state).c_str()
    11821183                     );
     1184          }
    11831185
    11841186        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * Dump UPT [%d] (Update_Prediction_Table)",i);
     
    11891191        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UPT_EMPTY           : %d",reg_UPT_EMPTY          [i]);
    11901192        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, %.8d %.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",
    11921194                     j,
    11931195                     reg_UPDATE_PREDICTION_TABLE [i][j]._condition,
Note: See TracChangeset for help on using the changeset viewer.