Ignore:
Timestamp:
Feb 27, 2009, 7:37:40 PM (15 years ago)
Author:
rosiere
Message:

1) Decod_queue : multi implementation (one_fifo, multi_fifo)
2) Issue_queue : multi implementation (in_order, out_of_order)
3) Direction : Add Meta predictor
4) Context_State : re add Branch_complete, More priority to Load miss (is not speculative)
5) Return_Address_Stack : update reg_PREDICT pointer on decod miss prediction
6) UPT : Fix bug in multi event
7) Prediction_glue : in read_stack case, insert in UPT pc_next
8) Rename select : when rob have an event (need flush), read_r{a,b,c} and write_r{d,e} is set at 0

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

    r107 r111  
    7676                  if (push)
    7777                    {
     78                      Taddress_t address = PORT_READ(in_PREDICT_ADDRESS_PUSH [i]);
     79
    7880                      log_printf(TRACE,Return_Address_Stack,FUNCTION,"    * push (call procedure)");
     81                      log_printf(TRACE,Return_Address_Stack,FUNCTION,"      * address_push        : 0x%.8x",address);
    7982
    8083                      // push : increase the top (circular)
     
    8285
    8386                      // Write new value in Queue
    84                       reg_stack [context][top_new]._address = PORT_READ(in_PREDICT_ADDRESS_PUSH [i]);
     87                      reg_stack [context][top_new]._address = address;
    8588
    8689                      // Test if full
     
    150153              if (push)
    151154                {
     155                  Taddress_t address = PORT_READ(in_DECOD_ADDRESS_PUSH [i]);
     156                 
    152157                  log_printf(TRACE,Return_Address_Stack,FUNCTION,"    * push (call procedure)");
     158                  log_printf(TRACE,Return_Address_Stack,FUNCTION,"      * address_push        : 0x%.8x",address);
    153159                 
    154160                  // push : increase the top (circular)
     
    156162                 
    157163                  // Write new value in Queue
    158                   reg_stack [context][top_new]._address = PORT_READ(in_DECOD_ADDRESS_PUSH [i]);
     164                  reg_stack [context][top_new]._address = address;
    159165                 
    160166                  // Test if full
     
    201207              //   if decod miss : ifetch can have predict call and return branchement. Also, the head of decod can be false
    202208
    203 //            Tcontrol_t miss       = PORT_READ(in_DECOD_MISS_PREDICTION [i]);
    204 
    205 //            if (miss)
    206 //              {
     209              Tcontrol_t miss       = PORT_READ(in_DECOD_MISS_PREDICTION [i]);
     210
     211              log_printf(TRACE,Return_Address_Stack,FUNCTION,"      * miss                : %d",miss);
     212
     213              if (miss)
     214                {
     215
    207216//                reg_PREDICT_BOTTOM [context] = reg_BOTTOM [context];
    208 //                reg_PREDICT_TOP    [context] = reg_TOP    [context];
    209 //                reg_PREDICT_NB_ELT [context] = reg_NB_ELT [context];
    210                  
    211 //                // Scan full assoc !!!
    212 //                for (uint32_t j=0; j<_param->_size_queue [context]; j++)
    213 //                  // Test if this slot is tagged with "predict" : if true, tagged as miss
    214 //                  if (reg_stack [context][j]._predict)
    215 //                    {
    216 //                      reg_stack [context][j]._predict = false;
    217 //                      reg_stack [context][j]._miss    = true;
    218 //                    }
    219 //              }
     217                  reg_PREDICT_TOP    [context] = reg_TOP    [context];
     218                  reg_PREDICT_NB_ELT [context] = reg_NB_ELT [context];
     219                }
    220220            }
    221221
     
    252252                    {
    253253                      // reinsert push value
    254                       reg_stack [context_id][0]._address = PORT_READ(in_UPDATE_ADDRESS [i]);
     254                      Taddress_t address = PORT_READ(in_UPDATE_ADDRESS [i]);
     255                 
     256                      log_printf(TRACE,Return_Address_Stack,FUNCTION,"    * flush and push");
     257                      log_printf(TRACE,Return_Address_Stack,FUNCTION,"      * address_push        : 0x%.8x",address);
     258
     259                      reg_stack [context_id][value]._address = address;
    255260                    }
    256261                }
     
    292297#endif
    293298
    294 
    295299                      Tptr_t     top_old    = (prediction_ifetch)?reg_PREDICT_TOP    [context_id]:reg_TOP    [context_id];
    296300                      Tptr_t     top_new    = top_old;
     
    320324                      if (push)
    321325                        {
     326                          log_printf(TRACE,Return_Address_Stack,FUNCTION,"    * previous is push, now pop");
     327
    322328                          // previous is push, now must be pop
    323329
     
    331337                      else
    332338                        {
     339                          log_printf(TRACE,Return_Address_Stack,FUNCTION,"    * previous is pop, now push");
     340
    333341                          // previous is pop, now must be push
    334342                          Taddress_t address           = PORT_READ(in_UPDATE_ADDRESS           [i]);
     343
     344                          log_printf(TRACE,Return_Address_Stack,FUNCTION,"    * address       : 0x%.8x",address);
    335345
    336346                          // push : increase the top (circular)
     
    345355                          top_new = index;
    346356                         
    347                           reg_stack [context_id][index]._address = address;
     357                          reg_stack [context_id][top_new]._address = address;
    348358                        }
    349359
     
    352362                      if (prediction_ifetch)
    353363                        {
    354                           log_printf(TRACE,Return_Address_Stack,FUNCTION,"      * reg_predict_top     : %d",top_new);
    355 //                        log_printf(TRACE,Return_Address_Stack,FUNCTION,"      * reg_predict_bottom  : %d",bottom_new);
    356                           log_printf(TRACE,Return_Address_Stack,FUNCTION,"      * reg_predict_nb_elt  : %d",nb_elt_new);
    357 
     364                          log_printf(TRACE,Return_Address_Stack,FUNCTION,"      * reg_predict_top     : %d",reg_TOP    [context_id]);
     365//                        log_printf(TRACE,Return_Address_Stack,FUNCTION,"      * reg_predict_bottom  : %d",reg_BOTTOM [context_id]);
     366                          log_printf(TRACE,Return_Address_Stack,FUNCTION,"      * reg_predict_nb_elt  : %d",reg_NB_ELT [context_id]);
     367
     368                          reg_PREDICT_TOP    [context_id] = reg_TOP    [context_id];
     369//                        reg_PREDICT_BOTTOM [context_id] = reg_BOTTOM [context_id];
     370                          reg_PREDICT_NB_ELT [context_id] = reg_NB_ELT [context_id];
     371
     372//                           log_printf(TRACE,Return_Address_Stack,FUNCTION,"      * reg_predict_top     : %d",top_new   );
     373// //                        log_printf(TRACE,Return_Address_Stack,FUNCTION,"      * reg_predict_bottom  : %d",bottom_new);
     374//                           log_printf(TRACE,Return_Address_Stack,FUNCTION,"      * reg_predict_nb_elt  : %d",nb_elt_new);
     375
     376//                           reg_PREDICT_TOP    [context_id] = top_new   ;
     377// //                        reg_PREDICT_BOTTOM [context_id] = bottom_new;
     378//                           reg_PREDICT_NB_ELT [context_id] = nb_elt_new;
     379
     380                        }
     381                      else
     382                        {
     383                          log_printf(TRACE,Return_Address_Stack,FUNCTION,"      * reg_top     : %d",top_new);
     384//                        log_printf(TRACE,Return_Address_Stack,FUNCTION,"      * reg_bottom  : %d",bottom_new);
     385                          log_printf(TRACE,Return_Address_Stack,FUNCTION,"      * reg_nb_elt  : %d",nb_elt_new);
     386
     387                          reg_TOP            [context_id] = top_new   ;
     388//                        reg_BOTTOM         [context_id] = bottom_new;
     389                          reg_NB_ELT         [context_id] = nb_elt_new;
    358390                          reg_PREDICT_TOP    [context_id] = top_new   ;
    359391//                        reg_PREDICT_BOTTOM [context_id] = bottom_new;
    360392                          reg_PREDICT_NB_ELT [context_id] = nb_elt_new;
    361                         }
    362                       else
    363                         {
    364                           log_printf(TRACE,Return_Address_Stack,FUNCTION,"      * reg_top     : %d",top_new);
    365 //                        log_printf(TRACE,Return_Address_Stack,FUNCTION,"      * reg_bottom  : %d",bottom_new);
    366                           log_printf(TRACE,Return_Address_Stack,FUNCTION,"      * reg_nb_elt  : %d",nb_elt_new);
    367 
    368                           reg_TOP            [context_id] = top_new   ;
    369 //                        reg_BOTTOM         [context_id] = bottom_new;
    370                           reg_NB_ELT         [context_id] = nb_elt_new;
    371393                        }
    372394                    }
Note: See TracChangeset for help on using the changeset viewer.