Ignore:
Timestamp:
Feb 11, 2009, 12:03:25 AM (15 years ago)
Author:
rosiere
Message:

1) Fix test in Direction_Glue for Conditionnal Branch
2) Fix Instruction Address Compute

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

    r106 r107  
    175175                Tcontrol_t          state_is_ok_ko           = ((state == UPDATE_PREDICTION_STATE_OK   ) or
    176176                                                                (state == UPDATE_PREDICTION_STATE_KO   ));
    177                 Tcontrol_t          state_is_event           = ((state == UPDATE_PREDICTION_STATE_KO   ) or
    178                                                                 (state == UPDATE_PREDICTION_STATE_EVENT)//  or
     177//                 Tcontrol_t          state_is_event           = ((state == UPDATE_PREDICTION_STATE_KO   ) or
     178//                                                                 (state == UPDATE_PREDICTION_STATE_EVENT)//  or
    179179//                                                                 ((have_event[context])?(state == UPDATE_PREDICTION_STATE_OK):false)
    180                                                                 );
    181                
    182                 Tcontrol_t          state_is_event_update    = state_is_event and     need_update(condition);
    183                 Tcontrol_t          state_is_event_no_update = state_is_event and not need_update(condition);
     180//                                                                 );
     181               
     182//                 Tcontrol_t          state_is_event_update    = state_is_event and     need_update(condition);
     183//                 Tcontrol_t          state_is_event_no_update = state_is_event and not need_update(condition);
    184184
    185185                if (retire_ras_from_upt [context])
    186186                  {
    187                 val                   = state_is_event_update;
    188                 val_without_ack       = state_is_event_no_update;
     187//                 val                   = state_is_event_update;
     188//                 val_without_ack       = state_is_event_no_update;
     189                val                   = ((state == UPDATE_PREDICTION_STATE_KO   ) or
     190                                         ((state == UPDATE_PREDICTION_STATE_EVENT) and need_update(condition)));
     191                val_without_ack       = ((state == UPDATE_PREDICTION_STATE_EVENT) and not need_update(condition));
    189192                  }
    190193                else
     
    205208                ras_flush             = (state == UPDATE_PREDICTION_STATE_KO); // miss prediction, RAS is corrupted
    206209                ras_push              = push_ras(condition);
    207                 ras_address           = reg_UPDATE_PREDICTION_TABLE [context][depth]._address_ras;
     210                // If corrupt, RAS must be flushed.
     211                // Also, if instruction l.jal, l.jalr, push addr+2 (delay slot), else (no flush) restore RAS
     212                ras_address           = (ras_flush)?(reg_UPDATE_PREDICTION_TABLE [context][depth]._address_src+2):reg_UPDATE_PREDICTION_TABLE [context][depth]._address_ras;
    208213                ras_index             = reg_UPDATE_PREDICTION_TABLE [context][depth]._index_ras;
    209214                ras_prediction_ifetch = ifetch;
Note: See TracChangeset for help on using the changeset viewer.