Ignore:
Timestamp:
May 1, 2008, 6:48:45 PM (16 years ago)
Author:
rosiere
Message:
  • support locale (now must "just" translate)
  • update all component with new test format
  • update all component with usage
  • New component : decod queue and prediction_unit
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp

    r81 r82  
    2828    // ===================================================================
    2929
    30     if (_param->_have_port_depth)
    31       for (uint32_t i=0; i<_param->_nb_context; i++)
    32         {
    33           PORT_WRITE(out_DEPTH_NB_BRANCH [i], reg_NB_ELT [i]);
    34           PORT_WRITE(out_DEPTH_TAIL      [i], reg_BOTTOM [i]);
    35         }
    36 
     30    for (uint32_t i=0; i<_param->_nb_context; i++)
     31      {
     32        if (_param->_have_port_depth [i])
     33          {
     34            PORT_WRITE(out_DEPTH_TAIL      [i], reg_BOTTOM [i]);
     35          }
     36        PORT_WRITE(out_DEPTH_NB_BRANCH [i], reg_NB_ELT [i]);
     37      }
    3738    // ===================================================================
    3839    // =====[ UPDATE ]====================================================
     
    7273                                           (cond == BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK) or
    7374                                           (cond == BRANCH_CONDITION_READ_STACK));
    74              
     75           
     76            Tcontrol_t          push = ((cond == BRANCH_CONDITION_NONE_WITH_WRITE_STACK) or
     77                                        (cond == BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK));
     78
    7579            if (_param->_have_port_context_id)
    7680            PORT_WRITE(out_UPDATE_CONTEXT_ID            [i],context);
     
    8589            PORT_WRITE(out_UPDATE_DIR_HISTORY           [i],reg_UPDATE_PREDICTION_TABLE [context][depth]._history     );
    8690            PORT_WRITE(out_UPDATE_RAS_VAL               [i],ras_val);
     91            PORT_WRITE(out_UPDATE_RAS_PUSH              [i],push);
    8792            PORT_WRITE(out_UPDATE_RAS_ADDRESS           [i],reg_UPDATE_PREDICTION_TABLE [context][depth]._address_ras );
    8893            PORT_WRITE(out_UPDATE_RAS_INDEX             [i],reg_UPDATE_PREDICTION_TABLE [context][depth]._index_ras   );
     
    99104      }
    100105
     106    // ===================================================================
     107    // =====[ BRANCH_EVENT ]==============================================
     108    // ===================================================================
     109    for (uint32_t i=0; i<_param->_nb_context; i++)
     110      {
     111        Tdepth_t   depth   = (reg_BOTTOM [i] + reg_NB_ELT_UPDATE [i])%_param->_size_queue [i];
     112        state_t    state   = reg_UPDATE_PREDICTION_TABLE [i][depth]._state;
     113       
     114        Tcontrol_t val     = (state == UPDATE_PREDICTION_STATE_EVENT);
     115
     116        if (val)
     117          {
     118            PORT_WRITE(out_BRANCH_EVENT_ADDRESS_SRC  [i], reg_UPDATE_PREDICTION_TABLE [i][depth]._address_src );
     119            PORT_WRITE(out_BRANCH_EVENT_ADDRESS_DEST [i], reg_UPDATE_PREDICTION_TABLE [i][depth]._address_dest);
     120            internal_BRANCH_EVENT_DEPTH [i] = depth;
     121          }
     122
     123        internal_BRANCH_EVENT_VAL   [i] = val;
     124        PORT_WRITE(out_BRANCH_EVENT_VAL [i], internal_BRANCH_EVENT_VAL [i]);
     125      }
    101126    log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End");
    102127  };
Note: See TracChangeset for help on using the changeset viewer.