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/Return_Address_Stack/src/Return_Address_Stack_transition.cpp

    r100 r107  
    237237              if (flush)
    238238                {
     239                  Tcontrol_t push  = PORT_READ(in_UPDATE_PUSH [i]);
     240                  Tptr_t     value = (push)?1:0;
     241
    239242                  // All pointer is set at 0
    240                   reg_TOP    [context_id] = 0;
     243                  reg_TOP    [context_id] = value;
    241244//                reg_BOTTOM [context_id] = 0;
    242                   reg_NB_ELT [context_id] = 0;
    243                  
    244                   reg_PREDICT_TOP    [context_id] = 0;
     245                  reg_NB_ELT [context_id] = value;
     246                 
     247                  reg_PREDICT_TOP    [context_id] = value;
    245248//                reg_PREDICT_BOTTOM [context_id] = 0;
    246                   reg_PREDICT_NB_ELT [context_id] = 0;
     249                  reg_PREDICT_NB_ELT [context_id] = value;
     250
     251                  if (push)
     252                    {
     253                      // reinsert push value
     254                      reg_stack [context_id][0]._address = PORT_READ(in_UPDATE_ADDRESS [i]);
     255                    }
    247256                }
    248257              else
     
    313322                          // previous is push, now must be pop
    314323
    315                           // Test if the stack is empty
    316                           if (nb_elt_old>0) // ??
     324                          // Test if the stack is empty (if previous flush)
     325                          if (nb_elt_old>0)
    317326                            {
    318327                              top_new = (top_old==0)?(_param->_size_queue[context_id]-1):(top_old-1);
Note: See TracChangeset for help on using the changeset viewer.