Ignore:
Timestamp:
Jan 15, 2009, 6:19:08 PM (15 years ago)
Author:
rosiere
Message:

1) Add soc test
2) fix bug (Pc management, Decod and execute, Update prediction ...)

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

Legend:

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

    r98 r101  
    143143  ALLOC1_SC_SIGNAL( in_EVENT_DEPTH                    ," in_EVENT_DEPTH                    ",Tdepth_t           ,_param->_nb_context);
    144144
     145  ALLOC1_SC_SIGNAL(out_DEPTH_VAL                      ,"out_DEPTH_VAL                      ",Tcontrol_t         ,_param->_nb_context);
    145146  ALLOC1_SC_SIGNAL(out_DEPTH_CURRENT                  ,"out_DEPTH_CURRENT                  ",Tdepth_t           ,_param->_nb_context);
    146147  ALLOC1_SC_SIGNAL(out_DEPTH_MIN                      ,"out_DEPTH_MIN                      ",Tdepth_t           ,_param->_nb_context);
    147148  ALLOC1_SC_SIGNAL(out_DEPTH_MAX                      ,"out_DEPTH_MAX                      ",Tdepth_t           ,_param->_nb_context);
     149  ALLOC1_SC_SIGNAL(out_DEPTH_FULL                     ,"out_DEPTH_FULL                     ",Tcontrol_t         ,_param->_nb_context);
    148150 
    149151  /********************************************************
     
    239241  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_CURRENT                  ,_param->_nb_context);
    240242  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_MIN                      ,_param->_nb_context);
     243  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_MAX                      ,_param->_nb_context);
    241244    }
    242   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_MAX                      ,_param->_nb_context);
     245  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_VAL                      ,_param->_nb_context);
     246  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_FULL                     ,_param->_nb_context);
    243247
    244248  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    373377                 
    374378                  if (_param->_have_port_depth)
     379                    {
    375380                  TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    376381                  TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
    377                      
     382                    }
    378383                  SC_START(0); // fct melay
    379384                 
     
    404409           
    405410              if (_param->_have_port_depth)
     411                {
    406412              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    407413              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     414                }
    408415            }
    409416        }
     
    462469             
    463470              if (_param->_have_port_depth)
     471                {
    464472              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    465473              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     474                }
    466475            }
    467476        }
     
    490499
    491500                  if (_param->_have_port_depth)
     501                    {
    492502                  TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    493503                  TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     504                    }
    494505                 
    495506                  SC_START(0);
     
    516527             
    517528              if (_param->_have_port_depth)
     529                {
    518530              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    519531              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     532                }
    520533            }
    521534        }
     
    539552
    540553//                   if (_param->_have_port_depth)
     554//                     {
    541555//                   TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    542556//                   TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     557//                     }
    543558                 
    544559                  SC_START(0);
     
    654669                 
    655670                  if (_param->_have_port_depth)
     671                    {
    656672                  TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    657673                  TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
    658                      
     674                    }
    659675                  SC_START(0); // fct melay
    660676                 
     
    685701           
    686702              if (_param->_have_port_depth)
     703                {
    687704              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    688705              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     706                }
    689707            }
    690708        }
     
    764782             
    765783              if (_param->_have_port_depth)
     784                {
    766785              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    767786              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     787                }
    768788            }
    769789        }
     
    793813
    794814                  if (_param->_have_port_depth)
     815                    {
    795816                  TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    796817                  TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
    797                  
     818                    }
    798819                  SC_START(0);
    799820                 
     
    819840             
    820841              if (_param->_have_port_depth)
     842                {
    821843              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    822844              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     845                }
    823846            }
    824847        }
     
    10131036                 
    10141037                  if (_param->_have_port_depth)
     1038                    {
    10151039                  TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    10161040                  TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
    1017                      
     1041                    }
    10181042                  SC_START(0); // fct melay
    10191043                 
     
    10441068           
    10451069              if (_param->_have_port_depth)
     1070                {
    10461071              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    10471072              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     1073                }
    10481074            }
    10491075        }
     
    11231149             
    11241150              if (_param->_have_port_depth)
     1151                {
    11251152              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    11261153              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     1154                }
    11271155            }
    11281156        }
     
    11521180
    11531181                  if (_param->_have_port_depth)
     1182                    {
    11541183                  TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    11551184                  TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
    1156                  
     1185                    }             
    11571186                  SC_START(0);
    11581187                 
     
    11781207             
    11791208              if (_param->_have_port_depth)
     1209                {
    11801210              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    11811211              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     1212                }
    11821213            }
    11831214        }
     
    14501481                   
    14511482                    if (_param->_have_port_depth)
     1483                      {
    14521484                    TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    14531485                    TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
    1454                    
     1486                      }
    14551487                    SC_START(0); // fct melay
    14561488                   
     
    14811513               
    14821514                if (_param->_have_port_depth)
    1483                   TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     1515                  {
     1516                TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    14841517                TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     1518                  }
    14851519              }
    14861520          }
     
    15411575               
    15421576                if (_param->_have_port_depth)
    1543                   TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     1577                  {
     1578                TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    15441579                TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     1580                  }
    15451581              }
    15461582          }
     
    15931629                   
    15941630                    if (_param->_have_port_depth)
     1631                      {
    15951632                    TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    15961633                    TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
    1597                    
     1634                      }
    15981635                    SC_START(0); // fct melay
    15991636                   
     
    16241661               
    16251662                if (_param->_have_port_depth)
    1626                   TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     1663                  {
     1664                TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    16271665                TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     1666                  }
    16281667              }
    16291668          }
     
    16771716
    16781717                  if (_param->_have_port_depth)
     1718                    {
    16791719                  TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    16801720                  TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
    1681                  
     1721                    }
     1722
    16821723                  SC_START(0);
    16831724                 
     
    17111752             
    17121753              if (_param->_have_port_depth)
     1754                {
    17131755              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    17141756              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     1757                }
    17151758            }
    17161759          }
     
    17381781
    17391782                  if (_param->_have_port_depth)
     1783                    {
    17401784                  TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    17411785                  TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
    1742                  
     1786                    }
    17431787                  SC_START(0);
    17441788                 
     
    17721816             
    17731817              if (_param->_have_port_depth)
     1818                {
    17741819              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    17751820              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     1821                }
    17761822            }
    17771823          }
     
    21762222
    21772223  // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     2224  delete [] out_DEPTH_VAL;
    21782225  delete [] out_DEPTH_CURRENT;
    21792226  delete [] out_DEPTH_MIN;
    21802227  delete [] out_DEPTH_MAX;
     2228  delete [] out_DEPTH_FULL;
    21812229
    21822230#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Types.h

    r95 r101  
    2626      EVENT_STATE_FLUSH_UPT             , // in commit stage, detect a miss, context is stop and ufpt is flush, update RAS
    2727      EVENT_STATE_UPDATE_CONTEXT        , // prediction unit is update, send signal to context manager
    28       EVENT_STATE_WAIT_END_EVENT          // prediction unit is ok, wait the end of envent (send by Context State)
     28      EVENT_STATE_WAIT_END_EVENT          // prediction unit is ok, wait the end of event (send by Context State)
    2929    } event_state_t;
    3030
     
    4545      UPDATE_PREDICTION_STATE_EVENT             , // previous branch is a miss prediction
    4646      UPDATE_PREDICTION_STATE_END_OK            , // branch is updated,       update pointer
     47      UPDATE_PREDICTION_STATE_END_KO_WAIT_END   , // branch is updated, don't update pointer
    4748      UPDATE_PREDICTION_STATE_END_KO              // branch is updated, don't update pointer
    4849    } upt_state_t;
     
    147148      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_EVENT      : return "event"     ; break;
    148149      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_END_OK     : return "end_ok"    ; break;
     150      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_END_KO_WAIT_END: return "end_ko_wait_end"    ; break;
    149151      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_END_KO     : return "end_ko"    ; break;
    150152      default    : return ""      ; break;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h

    r98 r101  
    148148
    149149    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     150  public    : SC_OUT(Tcontrol_t         )  ** out_DEPTH_VAL                      ; //[nb_context]
    150151  public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_CURRENT                  ; //[nb_context]
    151152  public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_MIN                      ; //[nb_context]
    152153  public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_MAX                      ; //[nb_context]
     154  public    : SC_OUT(Tcontrol_t         )  ** out_DEPTH_FULL                     ; //[nb_context]
    153155    // If DEPTH_CURRENT :
    154156    // equal at     DEPTH_MIN            -> not speculative
     
    172174  private   : uint32_t                      * reg_UPT_TOP_EVENT                  ; //[nb_context]
    173175  private   : uint32_t                      * reg_UPT_UPDATE                     ; //[nb_context]
     176  private   : bool                          * reg_UPT_EMPTY                      ; //[nb_context]
    174177                                                                                             
    175178  private   : bool                          * reg_IS_ACCURATE                    ; //[nb_context]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp

    r98 r101  
    160160    {
    161161      ALLOC1_INTERFACE("depth",OUT,SOUTH, "depth", _param->_nb_context);
    162       ALLOC1_SIGNAL_OUT(out_DEPTH_CURRENT,"CURRENT",Tdepth_t,_param->_size_depth);
    163       ALLOC1_SIGNAL_OUT(out_DEPTH_MIN    ,"MIN"    ,Tdepth_t,_param->_size_depth);
    164       ALLOC1_SIGNAL_OUT(out_DEPTH_MAX    ,"MAX"    ,Tdepth_t,_param->_size_depth+1);
     162      ALLOC1_SIGNAL_OUT(out_DEPTH_VAL    ,"VAL"    ,Tcontrol_t,1);
     163      ALLOC1_SIGNAL_OUT(out_DEPTH_CURRENT,"CURRENT",Tdepth_t  ,_param->_size_depth);
     164      ALLOC1_SIGNAL_OUT(out_DEPTH_MIN    ,"MIN"    ,Tdepth_t  ,_param->_size_depth);
     165      ALLOC1_SIGNAL_OUT(out_DEPTH_MAX    ,"MAX"    ,Tdepth_t  ,_param->_size_depth);
     166      ALLOC1_SIGNAL_OUT(out_DEPTH_FULL   ,"FULL"   ,Tcontrol_t,1);
    165167    }
    166168
     
    201203    ALLOC1(reg_UPT_TOP_EVENT                ,uint32_t     ,_param->_nb_context);
    202204    ALLOC1(reg_UPT_UPDATE                   ,uint32_t     ,_param->_nb_context);
     205    ALLOC1(reg_UPT_EMPTY                    ,bool         ,_param->_nb_context);
    203206
    204207    ALLOC1(reg_EVENT_STATE                  ,event_state_t,_param->_nb_context);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_deallocation.cpp

    r98 r101  
    117117
    118118        // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     119        DELETE1_SIGNAL(out_DEPTH_VAL          ,_param->_nb_context,1);
    119120        DELETE1_SIGNAL(out_DEPTH_CURRENT      ,_param->_nb_context,_param->_size_depth);
    120121        DELETE1_SIGNAL(out_DEPTH_MIN          ,_param->_nb_context,_param->_size_depth);
    121         DELETE1_SIGNAL(out_DEPTH_MAX          ,_param->_nb_context,_param->_size_depth+1);
     122        DELETE1_SIGNAL(out_DEPTH_MAX          ,_param->_nb_context,_param->_size_depth);
     123        DELETE1_SIGNAL(out_DEPTH_FULL         ,_param->_nb_context,1);
    122124
    123125        // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    154156        DELETE1(reg_UPT_TOP_EVENT                ,_param->_nb_context);
    155157        DELETE1(reg_UPT_UPDATE                   ,_param->_nb_context);
     158        DELETE1(reg_UPT_EMPTY                    ,_param->_nb_context);
    156159       
    157160        DELETE1(reg_EVENT_STATE                  ,_param->_nb_context);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp

    r98 r101  
    3434    for (uint32_t i=0; i<_param->_nb_context; i++)
    3535      {
     36        // is a valid instruction ?
     37        // If DEPTH_CURRENT :
     38        // equal at     DEPTH_MIN            -> not speculative
     39        // not include ]DEPTH_MIN:DEPTH_MAX] -> previous branch miss
     40        //     include ]DEPTH_MIN:DEPTH_MAX] -> speculative
     41
     42        PORT_WRITE(out_DEPTH_VAL     [i],(reg_UPDATE_PREDICTION_TABLE [i][reg_UPT_TOP [i]]._state == UPDATE_PREDICTION_STATE_EMPTY));
    3643        if (_param->_have_port_depth)
    3744          {
    3845        PORT_WRITE(out_DEPTH_CURRENT [i], reg_UPT_TOP    [i]);
    3946        PORT_WRITE(out_DEPTH_MIN     [i], reg_UPT_BOTTOM [i]);
    40           }
    4147        PORT_WRITE(out_DEPTH_MAX     [i], reg_UPT_TOP    [i]);
     48          }
     49        PORT_WRITE(out_DEPTH_FULL    [i], not reg_UPT_EMPTY [i] and (reg_UPT_TOP [i] == reg_UPT_BOTTOM [i]));
     50
     51//         bool empty = reg_UPT_EMPTY [i];
     52//      PORT_WRITE(out_DEPTH_MAX     [i], ((empty)?reg_UPT_BOTTOM [i]:((reg_UPT_TOP [i]==0)?(_param->_size_upt_queue[i]-1):(reg_UPT_TOP [i]-1))));
    4253      }
    4354
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp

    r98 r101  
    4646            reg_UPT_TOP_EVENT        [i] = 0;
    4747            reg_UPT_UPDATE           [i] = 0;
     48            reg_UPT_EMPTY            [i] = true;
    4849                                                                                   
    4950            reg_IS_ACCURATE          [i] = true;
     
    8788            // UPDATE_PREDICTION_TABLE
    8889            {
    89               uint32_t bottom = reg_UPT_BOTTOM [i];
    90               bool     end_ok = (reg_UPDATE_PREDICTION_TABLE [i][bottom]._state == UPDATE_PREDICTION_STATE_END_OK);
    91               bool     end_ko = (reg_UPDATE_PREDICTION_TABLE [i][bottom]._state == UPDATE_PREDICTION_STATE_END_KO);
     90              uint32_t      bottom      = reg_UPT_BOTTOM [i];
     91              bool          end_ok      = (reg_UPDATE_PREDICTION_TABLE [i][bottom]._state == UPDATE_PREDICTION_STATE_END_OK);
     92              bool          end_ko      = (reg_UPDATE_PREDICTION_TABLE [i][bottom]._state == UPDATE_PREDICTION_STATE_END_KO);
     93//               event_state_t event_state = reg_EVENT_STATE [i];
    9294
    9395              // Test if state is end
     96//               if ((end_ok or end_ko) and
     97//                   ((event_state != EVENT_STATE_UPDATE_CONTEXT) and
     98//                    (event_state != EVENT_STATE_WAIT_END_EVENT)))
    9499              if (end_ok or end_ko)
    95100                {
     
    102107                  // Update pointer
    103108                  reg_UPT_BOTTOM [i] = (bottom+1)%_param->_size_upt_queue[i];
     109
     110                  if (reg_UPT_BOTTOM [i] == reg_UPT_TOP [i])
     111                    reg_UPT_EMPTY [i] = true; // free a slot
     112
    104113//                   if (bottom = reg_UPT_UPDATE [i])
    105114//                     reg_UPT_UPDATE [i] = reg_UPT_BOTTOM [i];
     
    108117                      reg_UPT_TOP    [i] = reg_UPT_TOP_EVENT [i];
    109118                      reg_UPT_UPDATE [i] = reg_UPT_TOP_EVENT [i];
     119
     120                      if (reg_UPT_BOTTOM [i] != reg_UPT_TOP [i])
     121                        reg_UPT_EMPTY [i] = false;
    110122                    }
    111123                }
     
    290302              // Update pointer
    291303              reg_UPT_TOP     [context] = (upt_ptr_write+1)%_param->_size_upt_queue [context];
     304              reg_UPT_EMPTY   [context] = false;
    292305//            reg_UPT_UPDATE  [context] = reg_UPT_TOP [context];
    293306            }
     
    338351                  reg_UPT_TOP_EVENT [context] = top;
    339352
     353                  if (reg_UPT_BOTTOM [context] == reg_UPT_TOP [context])
     354                    reg_UPT_EMPTY [i] = true;
     355
    340356#ifdef DEBUG_TEST
    341357                  if (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_WAIT_END)
     
    483499                      if (ko)
    484500                        {
     501                          // Ko : wait end of all instruction
     502//                           log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UPT  [%d][%d].state <- UPDATE_PREDICTION_STATE_END_KO_WAIT_END (update)",context,depth);
     503                         
     504//                           reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_END_KO_WAIT_END;
     505
    485506                          log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UPT  [%d][%d].state <- UPDATE_PREDICTION_STATE_END_KO (update)",context,depth);
    486507                         
     
    535556                     
    536557                      // Free the branch with no accurate ?
    537                       if (reg_UPDATE_PREDICTION_TABLE [context][depth]._is_accurate == false)
     558                      if ( (reg_UPDATE_PREDICTION_TABLE [context][depth]._is_accurate == false) and not ko)
    538559                        reg_IS_ACCURATE [context] = true;
    539560                    }
     
    587608//            Tdepth_t       depth       = PORT_READ(in_EVENT_DEPTH [i]);
    588609           
    589               // Test if end of miss
     610              // Test if end of miss -> all previous branch is complete
     611              //                     -> all next     branch is finish
    590612              if (event_type  == EVENT_TYPE_MISS_SPECULATION)
    591613                {
     
    602624                 
    603625                  reg_EVENT_STATE [i] = EVENT_STATE_OK;
     626                  reg_IS_ACCURATE [i] = true;
     627
     628//                   Tdepth_t depth = reg_UPT_TOP [i];
     629
     630#ifdef DEBUG_TEST
     631//                   if (reg_UPDATE_PREDICTION_TABLE [i][depth]._state != UPDATE_PREDICTION_STATE_END_KO_WAIT_END)
     632//                     throw ERRORMORPHEO(FUNCTION,_("Event : invalid upt event state."));
     633//                   if (reg_UPDATE_PREDICTION_TABLE [i][depth]._state != UPDATE_PREDICTION_STATE_END_KO)
     634//                     throw ERRORMORPHEO(FUNCTION,_("Event : invalid upt event state."));
     635#endif
     636                 
     637//                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UPT  [%d][%d].state <- UPDATE_PREDICTION_STATE_END_KO (update)",i,depth);
     638                         
     639//                   reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_END_KO;
     640
    604641                }
    605642            }
     
    699736        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UPT_TOP_EVENT       : %d",reg_UPT_TOP_EVENT      [i]);
    700737        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UPT_UPDATE          : %d",reg_UPT_UPDATE         [i]);
     738        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UPT_EMPTY           : %d",reg_UPT_EMPTY          [i]);
    701739        for (uint32_t j=0; j<_param->_size_upt_queue[i]; j++)
    702740          log_printf(TRACE,Update_Prediction_Table,FUNCTION,"        [%d] %.4d, %.8x %.8x, %.1d %.1d %.1d, %.8d %.8x %.4d - %s",
Note: See TracChangeset for help on using the changeset viewer.