Ignore:
Timestamp:
Jun 26, 2009, 10:43:23 AM (15 years ago)
Author:
rosiere
Message:

1) Correct bug in link two signal
2) Fix error detected with valgrind
3) modif distexe script

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/include/Branch_Target_Buffer_Glue.h

    r82 r128  
    8282  public    : SC_IN (Tcontrol_t         ) ***  in_PREDICT_REGISTER_IS_ACCURATE   ; //[nb_inst_predict][associativity]
    8383
    84   public    : SC_IN (Tptr_t             )  **  in_PREDICT_SORT_VAL               ; //[nb_inst_predict]
     84  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_SORT_VAL               ; //[nb_inst_predict]
    8585  public    : SC_IN (Tptr_t             )  **  in_PREDICT_SORT_INDEX             ; //[nb_inst_predict]
    8686
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_allocation.cpp

    r112 r128  
    7474        if (_param->_have_port_victim)
    7575          {
    76         ALLOC1_SIGNAL_IN ( in_PREDICT_SORT_VAL  ,"sort_val"  ,Tptr_t,1);
    77         ALLOC1_SIGNAL_IN ( in_PREDICT_SORT_INDEX,"sort_index",Tptr_t,_param->_size_victim);
     76        ALLOC1_SIGNAL_IN ( in_PREDICT_SORT_VAL      , "sort_val"      ,Tcontrol_t         ,1);
     77        ALLOC1_SIGNAL_IN ( in_PREDICT_SORT_INDEX    , "sort_index"    ,Tptr_t             ,_param->_size_victim);
    7878
    7979        ALLOC1_SIGNAL_OUT(out_PREDICT_VICTIM_VAL    , "victim_val"    ,Tcontrol_t         , 1);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_predict.cpp

    r123 r128  
    3838        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * val          : %d",val         );
    3939        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * register_ack : %d",register_ack);
     40        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * port_victim  : %d",_param->_have_port_victim);
    4041        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * sort_val     : %d",sort_val    );
    4142        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * victim_ack   : %d",victim_ack  );
     
    5152
    5253        // Multiplexor
     54
    5355        PORT_WRITE(out_PREDICT_HIT          [i],hit);
    5456        PORT_WRITE(out_PREDICT_ADDRESS_SRC  [i],address_src);
     
    6466                                                    victim_ack
    6567                                                    ));
     68
    6669        PORT_WRITE(out_PREDICT_REGISTER_VAL   [i], (
    6770                                                    val          and
     
    8487        PORT_WRITE(out_PREDICT_VICTIM_INDEX   [i], index);
    8588          }
     89
    8690      }
    8791      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_transition.cpp

    r107 r128  
    2929        for (uint32_t i=0; i<_param->_size_bank; i++)
    3030          for (uint32_t j=0; j<_param->_associativity; j++)
    31             reg_BTB [i][j]._val = false;
     31            {
     32              reg_BTB [i][j]._val              = false;
     33              reg_BTB [i][j]._context          = 0; // not necessary
     34              reg_BTB [i][j]._address_dest_val = 0; // not necessary
     35              reg_BTB [i][j]._address_src      = 0; // not necessary
     36              reg_BTB [i][j]._address_dest     = 0; // not necessary
     37              reg_BTB [i][j]._condition        = 0; // not necessary
     38              reg_BTB [i][j]._last_take        = 0; // not necessary
     39              reg_BTB [i][j]._accurate         = 0; // not necessary
     40            }
    3241      }
    3342    else
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_deallocation.cpp

    r115 r128  
    6464      {
    6565        for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
    66           delete _component_sort [i];
     66        delete    _component_sort [i];
    6767        delete [] _component_sort;
    68         delete _component_victim;
     68        delete    _component_victim;
    6969      }
    7070    delete _component_branch_target_buffer_glue;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_statistics_allocation.cpp

    r88 r128  
    3535      }
    3636
    37 //     _stat->add_stat(_component_branch_target_buffer_glue    ->_stat);
     37    _stat->add_stat(_component_branch_target_buffer_glue    ->_stat);
    3838    _stat->add_stat(_component_branch_target_buffer_register->_stat);
    3939
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Parameters.cpp

    r111 r128  
    8080  {
    8181    log_begin(Meta_Predictor_Glue,FUNCTION);
     82
     83    DELETE1(_predictor_history_mask     ,_nb_predictor);
     84    DELETE1(_predictor_history_shift_msb,_nb_predictor);
     85    DELETE1(_predictor_history_shift    ,_nb_predictor);
     86
    8287    log_end(Meta_Predictor_Glue,FUNCTION);
    8388  };
     
    8893  {
    8994    log_begin(Meta_Predictor_Glue,FUNCTION);
    90 
    91     DELETE1(_predictor_history_mask ,_nb_predictor);
    92     DELETE1(_predictor_history_shift,_nb_predictor);
    93 
    9495    log_end(Meta_Predictor_Glue,FUNCTION);
    9596  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/src/Meta_Predictor_deallocation.cpp

    r112 r128  
    4545    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    4646
    47     DELETE0(_component_glue);
    48     DELETE1(_component_two_level_branch_predictor,_param->_nb_predictor);
     47    delete    _component_glue;
     48    for (uint32_t i=0; i<_param->_nb_predictor; ++i)
     49    delete    _component_two_level_branch_predictor [i];
     50    delete [] _component_two_level_branch_predictor;
    4951
    5052    delete _component;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/src/Meta_Predictor_statistics_allocation.cpp

    r110 r128  
    2828                      "Meta_Predictor",
    2929                      param_statistics);
     30
     31    for (uint32_t i=0; i<_param->_nb_predictor; ++i)
     32    _stat->add_stat(_component_two_level_branch_predictor [i]->_stat);
     33    _stat->add_stat(_component_glue                          ->_stat);
    3034   
    3135    log_end(Meta_Predictor,FUNCTION);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/src/Parameters.cpp

    r112 r128  
    122122    log_begin(Meta_Predictor,FUNCTION);
    123123
    124     DELETE1(_param_two_level_branch_predictor, _nb_predictor);
     124    delete    _param_glue;
     125    for (uint32_t i=0; i<_nb_predictor; ++i)
     126    delete    _param_two_level_branch_predictor [i];
     127    delete [] _param_two_level_branch_predictor;
    125128
    126129    DELETE1(_predictor_size_history          , _nb_predictor);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction_statistics_allocation.cpp

    r81 r128  
    2828                      param_statistics);
    2929
    30     _stat->add_stat(_component_glue->_stat);
     30    if (_param->_have_component_meta_predictor)
     31    _stat->add_stat(_component_meta_predictor->_stat);
     32    _stat->add_stat(_component_glue          ->_stat);
    3133   
    3234    log_printf(FUNC,Direction,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_transition.cpp

    r111 r128  
    3737//          reg_PREDICT_BOTTOM [i] = 0;
    3838            reg_PREDICT_NB_ELT [i] = 0;
     39
     40            for (uint32_t j=0; j<_param->_size_queue [i]; ++j)
     41            reg_stack [i][j]._address = 0; // not necessary
    3942          }
    4043      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Parameters.cpp

    r122 r128  
    6363    for (uint32_t i=0; i<_nb_thread; i++)
    6464      _have_thread[i] = false;
    65     for (uint32_t i=0; i<_nb_context; i++)
     65    for (uint32_t i=0; i<_nb_thread; i++)
    6666      _have_thread[_translate_num_context_to_num_thread [i]] = true;
    6767
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_deallocation.cpp

    r122 r128  
    172172
    173173#if defined(DEBUG) and defined(DEBUG_Update_Prediction_Table) and (DEBUG_Update_Prediction_Table == true)
    174     for (uint32_t i=0; i<_param->_nb_thread; ++i)
    175       if (_param->_have_thread [i])
    176         {
    177           branchement_log_file [i].close();
    178         }
     174    {
     175      for (uint32_t i=0; i<_param->_nb_thread; ++i)
     176        if (_param->_have_thread [i])
     177          {
     178            branchement_log_file [i].close();
     179          }
     180      delete [] branchement_log_file;
     181    }
    179182#endif
    180183
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_statistics_deallocation.cpp

    r97 r128  
    2929    delete    _stat;
    3030
    31     DELETE2(_stat_nb_branch_hit            ,_param->_nb_context,MAX_BRANCH_CONDITION);
    32     DELETE2(_stat_nb_branch_miss           ,_param->_nb_context,MAX_BRANCH_CONDITION);
    33     DELETE1(_stat_nb_branch_unused         ,_param->_nb_context);
    34     DELETE1(_stat_ufpt_queue_nb_elt        ,_param->_nb_context);
    35     DELETE1(_stat_upt_queue_nb_elt         ,_param->_nb_context);
     31    DELETE2(_stat_nb_branch_hit              ,_param->_nb_context,MAX_BRANCH_CONDITION);
     32    DELETE2(_stat_nb_branch_miss             ,_param->_nb_context,MAX_BRANCH_CONDITION);
     33    DELETE1(_stat_nb_branch_unused           ,_param->_nb_context);
     34
     35    DELETE1(_stat_nb_branch_ifetch_prediction,_param->_nb_context);
     36    DELETE1(_stat_nb_branch_accurate         ,_param->_nb_context);
     37
     38    DELETE1(_stat_ufpt_queue_nb_elt          ,_param->_nb_context);
     39    DELETE1(_stat_upt_queue_nb_elt           ,_param->_nb_context);
    3640   
    3741    log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp

    r124 r128  
    3434          {
    3535            for (uint32_t j=0; j<_param->_size_ufpt_queue[i]; ++j)
    36               reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state = UPDATE_FETCH_PREDICTION_STATE_EMPTY;
     36              {
     37            reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state            = UPDATE_FETCH_PREDICTION_STATE_EMPTY;
     38            reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._condition        = 0; // not necessary
     39            reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._address_src      = 0; // not necessary
     40            reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._address_dest     = 0; // not necessary
     41            reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._last_take        = 0; // not necessary
     42            reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._is_accurate      = 0; // not necessary
     43            reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._history          = 0; // not necessary
     44            reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._address_ras      = 0; // not necessary
     45            reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._index_ras        = 0; // not necessary
     46              }
    3747            reg_UFPT_BOTTOM          [i] = 0;
    3848            reg_UFPT_TOP             [i] = 0;
     
    4252                                                               
    4353            for (uint32_t j=0; j<_param->_size_upt_queue[i]; ++j)
    44               reg_UPDATE_PREDICTION_TABLE [i][j]._state = UPDATE_PREDICTION_STATE_EMPTY;
     54              {
     55            reg_UPDATE_PREDICTION_TABLE [i][j]._state            = UPDATE_PREDICTION_STATE_EMPTY;
     56            reg_UPDATE_PREDICTION_TABLE [i][j]._condition        = 0; // not necessary
     57            reg_UPDATE_PREDICTION_TABLE [i][j]._address_src      = 0; // not necessary
     58            reg_UPDATE_PREDICTION_TABLE [i][j]._address_dest     = 0; // not necessary
     59            reg_UPDATE_PREDICTION_TABLE [i][j]._last_take        = 0; // not necessary
     60            reg_UPDATE_PREDICTION_TABLE [i][j]._good_take        = 0; // not necessary
     61            reg_UPDATE_PREDICTION_TABLE [i][j]._is_accurate      = 0; // not necessary
     62            reg_UPDATE_PREDICTION_TABLE [i][j]._history          = 0; // not necessary
     63            reg_UPDATE_PREDICTION_TABLE [i][j]._address_ras      = 0; // not necessary
     64            reg_UPDATE_PREDICTION_TABLE [i][j]._index_ras        = 0; // not necessary
     65            reg_UPDATE_PREDICTION_TABLE [i][j]._ifetch_prediction= 0; // not necessary
     66            reg_UPDATE_PREDICTION_TABLE [i][j]._miss_commit      = 0; // not necessary
     67            reg_UPDATE_PREDICTION_TABLE [i][j]._retire_ok        = 0; // not necessary
     68            reg_UPDATE_PREDICTION_TABLE [i][j]._miss_prediction  = 0; // not necessary
     69              }
    4570            reg_UPT_BOTTOM           [i] = 0;
    4671            reg_UPT_TOP              [i] = 0;
     
    5479            reg_UPT_EVENT_STATE      [i] = UPT_EVENT_STATE_OK;
    5580
    56 //             reg_EVENT_VAL            [i] = false;
    57 //             reg_EVENT_STATE          [i] = EVENT_STATE_OK;
    58 //             reg_EVENT_IS_BRANCH      [i] = true;
     81            reg_EVENT_UPT_PTR          [i] = 0; // not necessary
     82            reg_EVENT_UPT_FULL         [i] = 0; // not necessary
     83
     84//          reg_EVENT_STATE            [i] = EVENT_STATE_OK; // not necessary
     85//          reg_EVENT_IS_BRANCH        [i] = true          ; // not necessary
     86
     87            reg_EVENT_DEPTH            [i] = 0; // not necessary
     88            reg_EVENT_ADDRESS_SRC      [i] = 0; // not necessary
     89            reg_EVENT_ADDRESS_DEST_VAL [i] = 0; // not necessary
     90            reg_EVENT_ADDRESS_DEST     [i] = 0; // not necessary
     91            reg_EVENT_CAN_CONTINUE     [i] = 0; // not necessary
     92
    5993          }
    6094      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_deallocation.cpp

    r119 r128  
    6666        DELETE1_SIGNAL( in_BRANCH_EVENT_ACK              ,_param->_nb_context,1);
    6767//      DELETE1_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID       ,_param->_nb_context,_param->_size_context_id);
    68 //      DELETE1_SIGNAL(out_BRANCH_EVENT_DEPTH            ,_param->_nb_context,_param->_size_depth);
     68        DELETE1_SIGNAL(out_BRANCH_EVENT_DEPTH            ,_param->_nb_context,_param->_size_depth);
    6969//      DELETE1_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION  ,_param->_nb_context,1);
    7070        DELETE1_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC      ,_param->_nb_context,_param->_size_instruction_address);
Note: See TracChangeset for help on using the changeset viewer.