Ignore:
Timestamp:
Feb 5, 2009, 12:18:31 PM (15 years ago)
Author:
rosiere
Message:

1) Bug fix : Load Miss Speculation (in Commit_unit, Update Prediction Table and Context State)
2) Change address, in rob write address_next.
3) Move Meta_Predictor in save directory

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/SelfTest/src/test.cpp

    r104 r105  
    6868  ALLOC2_SC_SIGNAL( in_INSERT_NO_EXECUTE              ," in_INSERT_NO_EXECUTE              ",Tcontrol_t        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    6969  ALLOC2_SC_SIGNAL( in_INSERT_IS_DELAY_SLOT           ," in_INSERT_IS_DELAY_SLOT           ",Tcontrol_t        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    70   ALLOC2_SC_SIGNAL( in_INSERT_ADDRESS                 ," in_INSERT_ADDRESS                 ",Taddress_t        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     70  ALLOC2_SC_SIGNAL( in_INSERT_ADDRESS_NEXT            ," in_INSERT_ADDRESS_NEXT            ",Taddress_t        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    7171  ALLOC2_SC_SIGNAL( in_INSERT_EXCEPTION               ," in_INSERT_EXCEPTION               ",Texception_t      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    7272  ALLOC2_SC_SIGNAL( in_INSERT_EXCEPTION_USE           ," in_INSERT_EXCEPTION_USE           ",Texception_t      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     
    153153  ALLOC_SC_SIGNAL (out_UPDATE_IS_DELAY_SLOT            ,"out_UPDATE_IS_DELAY_SLOT            ",Tcontrol_t        );
    154154  ALLOC_SC_SIGNAL (out_UPDATE_ADDRESS                  ,"out_UPDATE_ADDRESS                  ",Taddress_t        );
     155  ALLOC_SC_SIGNAL (out_UPDATE_ADDRESS_EPCR_VAL         ,"out_UPDATE_ADDRESS_EPCR_VAL         ",Tcontrol_t        );
    155156  ALLOC_SC_SIGNAL (out_UPDATE_ADDRESS_EPCR             ,"out_UPDATE_ADDRESS_EPCR             ",Taddress_t        );
    156157  ALLOC_SC_SIGNAL (out_UPDATE_ADDRESS_EEAR_VAL         ,"out_UPDATE_ADDRESS_EEAR_VAL         ",Tcontrol_t        );
     
    205206  INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_IS_DELAY_SLOT           ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    206207  INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_NO_EXECUTE              ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    207   INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_ADDRESS                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     208  INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_ADDRESS_NEXT            ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    208209  INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_EXCEPTION               ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    209210  INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_EXCEPTION_USE           ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     
    302303  INSTANCE_SC_SIGNAL (_Commit_unit,out_UPDATE_IS_DELAY_SLOT            );
    303304  INSTANCE_SC_SIGNAL (_Commit_unit,out_UPDATE_ADDRESS                  );
     305  INSTANCE_SC_SIGNAL (_Commit_unit,out_UPDATE_ADDRESS_EPCR_VAL         );
    304306  INSTANCE_SC_SIGNAL (_Commit_unit,out_UPDATE_ADDRESS_EPCR             );
    305307  INSTANCE_SC_SIGNAL (_Commit_unit,out_UPDATE_ADDRESS_EEAR_VAL         );
     
    418420                  in_INSERT_IS_DELAY_SLOT           [i][j]->write(0);
    419421                  in_INSERT_NO_EXECUTE              [i][j]->write(0);
    420                   in_INSERT_ADDRESS                 [i][j]->write(addr);
     422                  in_INSERT_ADDRESS_NEXT            [i][j]->write(addr);
    421423                  in_INSERT_EXCEPTION               [i][j]->write(0);
    422424                  in_INSERT_EXCEPTION_USE           [i][j]->write(0);
     
    615617  DELETE2_SC_SIGNAL( in_INSERT_NO_EXECUTE              ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    616618  DELETE2_SC_SIGNAL( in_INSERT_IS_DELAY_SLOT           ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    617   DELETE2_SC_SIGNAL( in_INSERT_ADDRESS                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     619  DELETE2_SC_SIGNAL( in_INSERT_ADDRESS_NEXT            ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    618620  DELETE2_SC_SIGNAL( in_INSERT_EXCEPTION               ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    619621  DELETE2_SC_SIGNAL( in_INSERT_EXCEPTION_USE           ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     
    698700  DELETE_SC_SIGNAL (out_UPDATE_IS_DELAY_SLOT            );
    699701  DELETE_SC_SIGNAL (out_UPDATE_ADDRESS                  );
     702  DELETE_SC_SIGNAL (out_UPDATE_ADDRESS_EPCR_VAL         );
    700703  DELETE_SC_SIGNAL (out_UPDATE_ADDRESS_EPCR             );
    701704  DELETE_SC_SIGNAL (out_UPDATE_ADDRESS_EEAR_VAL         );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h

    r104 r105  
    8383  public    : SC_IN (Tcontrol_t         ) ***  in_INSERT_NO_EXECUTE                ;//[nb_rename_unit][nb_inst_insert]
    8484  public    : SC_IN (Tcontrol_t         ) ***  in_INSERT_IS_DELAY_SLOT             ;//[nb_rename_unit][nb_inst_insert]
    85   public    : SC_IN (Taddress_t         ) ***  in_INSERT_ADDRESS                   ;//[nb_rename_unit][nb_inst_insert]
     85  public    : SC_IN (Taddress_t         ) ***  in_INSERT_ADDRESS_NEXT              ;//[nb_rename_unit][nb_inst_insert]
    8686  public    : SC_IN (Texception_t       ) ***  in_INSERT_EXCEPTION                 ;//[nb_rename_unit][nb_inst_insert]
    8787  public    : SC_IN (Texception_t       ) ***  in_INSERT_EXCEPTION_USE             ;//[nb_rename_unit][nb_inst_insert]
     
    179179  public    : SC_OUT(Tcontrol_t         )   * out_UPDATE_IS_DELAY_SLOT             ;
    180180  public    : SC_OUT(Taddress_t         )   * out_UPDATE_ADDRESS                   ;
     181  public    : SC_OUT(Tcontrol_t         )   * out_UPDATE_ADDRESS_EPCR_VAL          ;
    181182  public    : SC_OUT(Taddress_t         )   * out_UPDATE_ADDRESS_EPCR              ;
    182183  public    : SC_OUT(Tcontrol_t         )   * out_UPDATE_ADDRESS_EEAR_VAL          ;
     
    229230  private   : bool                         ** reg_EVENT_FLUSH                      ;//[nb_front_end][nb_context]
    230231
    231   private   : Taddress_t                   ** reg_PC_PREVIOUS                      ;//[nb_front_end][nb_context]
     232//private   : Taddress_t                   ** reg_PC_PREVIOUS                      ;//[nb_front_end][nb_context]
    232233  private   : Taddress_t                   ** reg_PC_CURRENT                       ;//[nb_front_end][nb_context]
    233234  private   : Taddress_t                   ** reg_PC_CURRENT_IS_DS                 ;//[nb_front_end][nb_context]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Types.h

    r100 r105  
    4242      ROB_END_BRANCH_MISS_SPECULATIVE, //
    4343      ROB_END_BRANCH_MISS            , //
     44      ROB_END_LOAD_MISS_SPECULATIVE  , //
     45      ROB_END_LOAD_MISS_UPDATE       , //
     46      ROB_END_LOAD_MISS              , //
    4447      ROB_END_MISS                   , //
    4548      ROB_END_EXCEPTION_WAIT_HEAD    , //
    46       ROB_END_EXCEPTION               //
     49      ROB_END_EXCEPTION_UPDATE       , //
     50      ROB_END_EXCEPTION                //
    4751    } rob_state_t;
    4852
     
    5862  public  : Toperation_t       operation               ;
    5963  public  : Tcontrol_t         is_delay_slot           ;
    60   public  : Tgeneral_data_t    address                 ;
     64//public  : Tgeneral_data_t    address                 ;
    6165  public  : Tcontrol_t         use_store_queue         ;
    6266  public  : Tcontrol_t         use_load_queue          ;
     
    8690  public  : Tspecial_data_t    flags                   ;
    8791  public  : Tcontrol_t         no_sequence             ;
    88   public  : Tgeneral_data_t    data_commit             ; // branch's destination
     92//public  : Tgeneral_data_t    data_commit             ; // branch's destination
     93  public  : Taddress_t         address_next            ;
    8994
    9095//   public  : entry_t (uint32_t           ptr                     ,
     
    177182      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_END_BRANCH_MISS_SPECULATIVE: return "ROB_END_BRANCH_MISS_SPECULATIVE" ; break;
    178183      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_END_BRANCH_MISS            : return "ROB_END_BRANCH_MISS"             ; break;
     184      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_END_LOAD_MISS_SPECULATIVE  : return "ROB_END_LOAD_MISS_SPECULATIVE"   ; break;
     185      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_END_LOAD_MISS_UPDATE       : return "ROB_END_LOAD_MISS_UPDATE"        ; break;
     186      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_END_LOAD_MISS              : return "ROB_END_LOAD_MISS"               ; break;
    179187      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_END_MISS                   : return "ROB_END_MISS"                    ; break;
    180188      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_END_EXCEPTION_WAIT_HEAD    : return "ROB_END_EXCEPTION_WAIT_HEAD"     ; break;
     189      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_END_EXCEPTION_UPDATE       : return "ROB_END_EXCEPTION_UPDATE"        ; break;
    181190      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_END_EXCEPTION              : return "ROB_END_EXCEPTION"               ; break;
    182191
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp

    r104 r105  
    7171      _ALLOC2_SIGNAL_IN ( in_INSERT_NO_EXECUTE              ,"no_execute"           ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    7272      _ALLOC2_SIGNAL_IN ( in_INSERT_IS_DELAY_SLOT           ,"is_delay_slot"        ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    73       _ALLOC2_SIGNAL_IN ( in_INSERT_ADDRESS                 ,"address"              ,Taddress_t        ,_param->_size_instruction_address   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     73      _ALLOC2_SIGNAL_IN ( in_INSERT_ADDRESS_NEXT            ,"address_next"         ,Taddress_t        ,_param->_size_instruction_address   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    7474      _ALLOC2_SIGNAL_IN ( in_INSERT_EXCEPTION               ,"exception"            ,Texception_t      ,_param->_size_exception             ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    7575      _ALLOC2_SIGNAL_IN ( in_INSERT_EXCEPTION_USE           ,"exception_use"        ,Texception_t      ,_param->_size_exception             ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     
    192192      ALLOC_SIGNAL_OUT(out_UPDATE_IS_DELAY_SLOT            ,"is_delay_slot"   ,Tcontrol_t         ,1);
    193193      ALLOC_SIGNAL_OUT(out_UPDATE_ADDRESS                  ,"address"         ,Taddress_t         ,_param->_size_instruction_address);
     194      ALLOC_SIGNAL_OUT(out_UPDATE_ADDRESS_EPCR_VAL         ,"address_epcr_val",Tcontrol_t         ,1);
    194195      ALLOC_SIGNAL_OUT(out_UPDATE_ADDRESS_EPCR             ,"address_epcr"    ,Taddress_t         ,_param->_size_instruction_address);
    195196      ALLOC_SIGNAL_OUT(out_UPDATE_ADDRESS_EEAR_VAL         ,"address_eear_val",Tcontrol_t         ,1);
     
    284285    ALLOC2(reg_EVENT_FLUSH          ,bool          ,_param->_nb_front_end,_param->_nb_context [it1]);
    285286
    286     ALLOC2(reg_PC_PREVIOUS          ,Taddress_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
     287//  ALLOC2(reg_PC_PREVIOUS          ,Taddress_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
    287288    ALLOC2(reg_PC_CURRENT           ,Taddress_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
    288289    ALLOC2(reg_PC_CURRENT_IS_DS     ,Taddress_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp

    r104 r105  
    3939        DELETE2_SIGNAL( in_INSERT_NO_EXECUTE              ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
    4040        DELETE2_SIGNAL( in_INSERT_IS_DELAY_SLOT           ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
    41         DELETE2_SIGNAL( in_INSERT_ADDRESS                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_instruction_address               );
     41        DELETE2_SIGNAL( in_INSERT_ADDRESS_NEXT            ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_instruction_address               );
    4242        DELETE2_SIGNAL( in_INSERT_EXCEPTION               ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_exception             );
    4343        DELETE2_SIGNAL( in_INSERT_EXCEPTION_USE           ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_exception             );
     
    129129        DELETE_SIGNAL (out_UPDATE_IS_DELAY_SLOT            ,1                         );
    130130        DELETE_SIGNAL (out_UPDATE_ADDRESS                  ,_param->_size_instruction_address     );
     131        DELETE_SIGNAL (out_UPDATE_ADDRESS_EPCR_VAL         ,1                         );
    131132        DELETE_SIGNAL (out_UPDATE_ADDRESS_EPCR             ,_param->_size_instruction_address     );
    132133        DELETE_SIGNAL (out_UPDATE_ADDRESS_EEAR_VAL         ,1                         );
     
    188189        DELETE2(reg_EVENT_STATE          ,_param->_nb_front_end,_param->_nb_context [it1]);
    189190        DELETE2(reg_EVENT_FLUSH          ,_param->_nb_front_end,_param->_nb_context [it1]);
    190         DELETE2(reg_PC_PREVIOUS          ,_param->_nb_front_end,_param->_nb_context [it1]);
     191//      DELETE2(reg_PC_PREVIOUS          ,_param->_nb_front_end,_param->_nb_context [it1]);
    191192        DELETE2(reg_PC_CURRENT           ,_param->_nb_front_end,_param->_nb_context [it1]);
    192193        DELETE2(reg_PC_CURRENT_IS_DS     ,_param->_nb_front_end,_param->_nb_context [it1]);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMealy_retire.cpp

    r104 r105  
    8080                    (state == ROB_END_KO         ) or
    8181                    (state == ROB_END_BRANCH_MISS) or
     82                    (state == ROB_END_LOAD_MISS  ) or
    8283                    (state == ROB_END_MISS       )//  or
    8384//                  (state == ROB_END_EXCEPTION)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMoore.cpp

    r104 r105  
    9999                      if (_param->_have_port_depth)
    100100                      PORT_WRITE(out_BRANCH_COMPLETE_DEPTH        [i], entry->depth           );
    101                       PORT_WRITE(out_BRANCH_COMPLETE_ADDRESS      [i], entry->data_commit     );
     101                      PORT_WRITE(out_BRANCH_COMPLETE_ADDRESS      [i], entry->address_next    );
    102102//                    PORT_WRITE(out_BRANCH_COMPLETE_FLAG         [i],(entry->flags&FLAG_F)!=0);
    103103                      PORT_WRITE(out_BRANCH_COMPLETE_NO_SEQUENCE  [i], entry->no_sequence     );
     
    117117    // ===================================================================
    118118    {
    119       Tcontrol_t val = false;
    120 
    121       if (not _rob[reg_NUM_BANK_HEAD].empty())
    122         {
    123           entry_t    * entry = _rob [reg_NUM_BANK_HEAD].front();
    124           rob_state_t  state = entry->state;
    125 
    126           val   = (state == ROB_END_EXCEPTION);
    127          
    128           if (val)
    129             {
    130               throw ERRORMORPHEO(FUNCTION,_("Moore : exception is not yet supported (Coming Soon).\n"));
    131             }
    132         }
     119      internal_UPDATE_VAL = 0;
     120      internal_UPDATE_NUM_BANK = reg_NUM_BANK_HEAD;
     121
     122      if (not _rob[internal_UPDATE_NUM_BANK].empty())
     123        {
     124          log_printf(TRACE,Commit_unit,FUNCTION,"  * UPDATE");
     125          log_printf(TRACE,Commit_unit,FUNCTION,"    * num_bank : %d",internal_UPDATE_NUM_BANK);
     126
     127          entry_t * entry = _rob [internal_UPDATE_NUM_BANK].front();
     128
     129          switch (entry->state)
     130            {
     131            case ROB_END_EXCEPTION_UPDATE :
     132              {
     133                internal_UPDATE_VAL = 1;
     134                throw ERRORMORPHEO(FUNCTION,_("Moore : exception is not yet supported (Coming Soon).\n"));
     135                break;
     136              }
     137            case ROB_END_LOAD_MISS_UPDATE :
     138              {
     139                log_printf(TRACE,Commit_unit,FUNCTION,"    * ROB_END_LOAD_MISS_UPDATE");
     140
     141                internal_UPDATE_VAL = 1;
     142
     143                Tcontext_t front_end_id = entry->front_end_id;
     144                Tcontext_t context_id   = entry->context_id  ;
     145
     146                log_printf(TRACE,Commit_unit,FUNCTION,"      * front_end_id : %d",front_end_id);
     147                log_printf(TRACE,Commit_unit,FUNCTION,"      * context_id   : %d",context_id  );
     148
     149                if (_param->_have_port_front_end_id)
     150                PORT_WRITE(out_UPDATE_FRONT_END_ID    ,front_end_id);
     151                if (_param->_have_port_context_id)
     152                PORT_WRITE(out_UPDATE_CONTEXT_ID      ,context_id  );
     153                if (_param->_have_port_depth)
     154                PORT_WRITE(out_UPDATE_DEPTH           ,entry->depth);
     155                PORT_WRITE(out_UPDATE_TYPE            ,EVENT_TYPE_LOAD_MISS_SPECULATION);
     156//                 PORT_WRITE(out_UPDATE_IS_DELAY_SLOT   ,reg_PC_CURRENT_IS_DS      [front_end_id][context_id]);
     157//                 PORT_WRITE(out_UPDATE_ADDRESS         ,reg_PC_CURRENT            [front_end_id][context_id]);
     158//                 PORT_WRITE(out_UPDATE_ADDRESS_EPCR_VAL,reg_PC_CURRENT_IS_DS_TAKE [front_end_id][context_id]);
     159//                 PORT_WRITE(out_UPDATE_ADDRESS_EPCR    ,reg_PC_NEXT               [front_end_id][context_id]);
     160//                 PORT_WRITE(out_UPDATE_ADDRESS_EEAR_VAL,0);
     161// //              PORT_WRITE(out_UPDATE_ADDRESS_EEAR    ,);
     162
     163                PORT_WRITE(out_UPDATE_IS_DELAY_SLOT   ,0);
     164                PORT_WRITE(out_UPDATE_ADDRESS         ,reg_PC_NEXT [front_end_id][context_id]);
     165                PORT_WRITE(out_UPDATE_ADDRESS_EPCR_VAL,0);
     166//              PORT_WRITE(out_UPDATE_ADDRESS_EPCR    ,);
     167                PORT_WRITE(out_UPDATE_ADDRESS_EEAR_VAL,0);
     168//              PORT_WRITE(out_UPDATE_ADDRESS_EEAR    ,);
     169
     170                break;
     171              }
     172            default :
     173              {
     174//                 internal_UPDATE_VAL = 0;
     175              }
     176            }
     177        }
     178     
     179      PORT_WRITE(out_UPDATE_VAL, internal_UPDATE_VAL);
     180
     181      log_printf(TRACE,Commit_unit,FUNCTION,"  * UPDATE (end)");
    133182    }
    134183 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp

    r104 r105  
    5151              reg_PC_CURRENT_IS_DS      [i][j] = 0;
    5252              reg_PC_CURRENT_IS_DS_TAKE [i][j] = 0;
    53 //            reg_PC_NEXT               [i][j] = (0x100+4)>>2;
     53              reg_PC_NEXT               [i][j] = (0x100+4)>>2;
    5454            }
    5555
     
    138138                  entry->operation               = operation;
    139139                  entry->is_delay_slot           = PORT_READ(in_INSERT_IS_DELAY_SLOT         [x][y]);
    140                   entry->address                 = PORT_READ(in_INSERT_ADDRESS               [x][y]);
     140//                entry->address                 = PORT_READ(in_INSERT_ADDRESS               [x][y]);
    141141                  entry->exception               = exception;
    142142                  entry->exception_use           = PORT_READ(in_INSERT_EXCEPTION_USE         [x][y]);
     
    162162                  entry->num_reg_re_phy_old      = PORT_READ(in_INSERT_NUM_REG_RE_PHY_OLD    [x][y]);
    163163                  entry->num_reg_re_phy_new      = PORT_READ(in_INSERT_NUM_REG_RE_PHY_NEW    [x][y]);
     164                  entry->no_sequence             = type == TYPE_BRANCH;
     165                  entry->address_next            = PORT_READ(in_INSERT_ADDRESS_NEXT          [x][y]);
    164166
    165167                  // Test if exception :
     
    295297                      case ROB_MISS_WAIT_END   : {state = ROB_END_KO_SPECULATIVE; break;}
    296298                        // Store OK, Load and other instruction
    297                       case ROB_OTHER_WAIT_END  : {state = (have_exception)?ROB_END_EXCEPTION_WAIT_HEAD:((have_miss_speculation)?ROB_END_MISS:ROB_END_OK_SPECULATIVE); break;}
     299                      case ROB_OTHER_WAIT_END  : {state = (have_exception)?ROB_END_EXCEPTION_WAIT_HEAD:((have_miss_speculation)?ROB_END_LOAD_MISS_SPECULATIVE:ROB_END_OK_SPECULATIVE); break;}
    298300                      default :
    299301                        {
     
    304306
    305307                    // update Re Order Buffer
    306                     entry->state       = state;
    307                     entry->exception   = exception;
    308                     entry->flags       = PORT_READ(in_COMMIT_FLAGS       [x]);
    309                     entry->no_sequence = PORT_READ(in_COMMIT_NO_SEQUENCE [x]);
    310                     entry->data_commit = PORT_READ(in_COMMIT_ADDRESS     [x]);
     308                    entry->state        = state;
     309                    entry->exception    = exception;
     310                    entry->flags        = PORT_READ(in_COMMIT_FLAGS       [x]);
     311                    entry->no_sequence  = PORT_READ(in_COMMIT_NO_SEQUENCE [x]);
     312                    // jalr, jr : address_dest is in register
     313                    if ((entry->type      == TYPE_BRANCH) and
     314                        (entry->operation == OPERATION_BRANCH_L_JALR) and
     315                        (entry->read_rb))
     316                    entry->address_next = PORT_READ(in_COMMIT_ADDRESS     [x]);
    311317                  }
    312318              }
     
    345351              Ttype_t    type         = entry->type        ;
    346352
    347               if (state == ROB_END_BRANCH_MISS)
     353              if ((state == ROB_END_OK         ) or // LOAD_MISS
     354//                (state == ROB_END_KO         ) or
     355                  (state == ROB_END_BRANCH_MISS)//  or
     356//                (state == ROB_END_LOAD_MISS  ) or
     357//                (state == ROB_END_MISS       ) or
     358//                (state == ROB_END_EXCEPTION  )
     359                  )
     360                {
     361//                reg_PC_PREVIOUS           [front_end_id][context_id] = reg_PC_CURRENT [front_end_id][context_id];
     362                  reg_PC_CURRENT            [front_end_id][context_id] = reg_PC_NEXT    [front_end_id][context_id];
     363                  reg_PC_CURRENT_IS_DS      [front_end_id][context_id] = entry->type == TYPE_BRANCH;
     364                  reg_PC_CURRENT_IS_DS_TAKE [front_end_id][context_id] = entry->no_sequence;
     365                  reg_PC_NEXT               [front_end_id][context_id] = (entry->no_sequence)?(entry->address_next):(reg_PC_CURRENT [front_end_id][context_id]+1);
     366                }
     367
     368              if ((state == ROB_END_BRANCH_MISS) or
     369                  (state == ROB_END_LOAD_MISS))
    348370                {
    349371                  reg_EVENT_STATE [front_end_id][context_id] = EVENT_STATE_EVENT;
    350372                  reg_EVENT_FLUSH [front_end_id][context_id] = true;
    351 
    352                   // TODO Compute address !!!!!!!!!!!
    353373                }
    354374             
     
    412432        // =====[ UPDATE ]====================================================
    413433        // ===================================================================
    414         {
    415           // Not yet implemented
    416         }
     434        if (internal_UPDATE_VAL and PORT_READ(in_UPDATE_ACK))
     435          {
     436            log_printf(TRACE,Commit_unit,FUNCTION,"  * UPDATE");
     437
     438            entry_t * entry = _rob [internal_UPDATE_NUM_BANK].front();
     439
     440            switch (entry->state)
     441              {
     442//               case ROB_END_EXCEPTION_UPDATE :
     443//                 {
     444//                   entry->state = ROB_END_KO;
     445//                   throw ERRORMORPHEO(FUNCTION,_("Moore : exception is not yet supported (Coming Soon).\n"));
     446//                   break;
     447//                 }
     448              case ROB_END_LOAD_MISS_UPDATE :
     449                {
     450                  log_printf(TRACE,Commit_unit,FUNCTION,"    * ROB_END_LOAD_MISS_UPDATE");
     451
     452                  entry->state = ROB_END_LOAD_MISS;
     453                  break;
     454                }
     455              default :
     456                {
     457                  throw ERRORMORPHEO(FUNCTION,_("Update : invalid state.\n"));
     458                  break;
     459                }
     460              }
     461
     462          }
    417463
    418464        // ===================================================================
     
    438484
    439485              Tdepth_t     depth_min    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN[front_end_id][context_id]):0;
    440 //               Tdepth_t     depth_max    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX[front_end_id][context_id]):0;
    441 //               Tcontrol_t   depth_full   = PORT_READ(in_DEPTH_FULL [front_end_id][context_id]);
     486              Tdepth_t     depth_max    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX[front_end_id][context_id]):0;
     487              Tcontrol_t   depth_full   = PORT_READ(in_DEPTH_FULL [front_end_id][context_id]);
    442488             
    443489              // is a valid instruction ?
     
    455501              // ....... max ...X... min ....... KO
    456502             
    457 //               Tcontrol_t   is_valid      = ((depth == depth_min) or
    458 //                                             depth_full or
    459 //                                             ((depth_min <= depth_max)?
    460 //                                              ((depth >= depth_min) and (depth <=depth_max)):
    461 //                                              ((depth >= depth_min) or  (depth <=depth_max))));
    462 
    463503              bool         flush         = reg_EVENT_FLUSH [front_end_id][context_id];
    464               Tcontrol_t   is_valid      = ((depth == depth_min) and not flush);
     504
     505              Tcontrol_t   is_valid      = (((depth == depth_min) or
     506                                             depth_full or
     507                                             ((depth_min <= depth_max)?
     508                                              ((depth >= depth_min) and (depth <=depth_max)):
     509                                              ((depth >= depth_min) or  (depth <=depth_max))))
     510                                             and not flush);
     511
     512//            Tcontrol_t   is_valid      = ((depth == depth_min) and not flush);
    465513
    466514              log_printf(TRACE,Commit_unit,FUNCTION,"  * HEAD              [%d]",i);
    467               log_printf(TRACE,Commit_unit,FUNCTION,"    * is_valid        : %d",is_valid);
     515              log_printf(TRACE,Commit_unit,FUNCTION,"    * is_valid        : %d ((depth == depth_min) and not flush)",is_valid);
    468516              log_printf(TRACE,Commit_unit,FUNCTION,"    * depth           : %d",depth    );
    469517              log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_min       : %d",depth_min);
    470 //               log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_max       : %d",depth_max);
     518              log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_max       : %d",depth_max);
     519              log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_full      : %d",depth_full);
    471520              log_printf(TRACE,Commit_unit,FUNCTION,"    * flush           : %d",flush);
    472521
     
    481530                    case ROB_BRANCH_COMPLETE             : {state = ROB_END_MISS     ; break;}
    482531                    case ROB_END_BRANCH_MISS_SPECULATIVE : {state = ROB_END_MISS     ; break;}
     532                    case ROB_END_LOAD_MISS_SPECULATIVE   : {state = ROB_END_MISS     ; break;}
    483533                    case ROB_STORE_WAIT_HEAD_OK          : {state = ROB_STORE_HEAD_KO; break;}
    484534                  //case ROB_STORE_WAIT_HEAD_KO          : {state = ; break;}
     
    498548                    case ROB_END_KO                      :
    499549                    case ROB_END_BRANCH_MISS             :
     550                    case ROB_END_LOAD_MISS_UPDATE        :
     551                    case ROB_END_LOAD_MISS               :
     552                    case ROB_END_EXCEPTION_UPDATE        :
    500553                    case ROB_END_EXCEPTION               :
    501554                    default                              :
     
    517570                    case ROB_END_KO_SPECULATIVE          : {state = ROB_END_KO                 ; break;}
    518571                    case ROB_END_BRANCH_MISS_SPECULATIVE : {state = ROB_END_BRANCH_MISS        ; break;}
     572                    case ROB_END_LOAD_MISS_SPECULATIVE   : {state = ROB_END_LOAD_MISS_UPDATE   ; break;}
    519573                    default : {break;}
    520574                  }
     
    528582                  switch (state)
    529583                    {
    530                     case ROB_STORE_WAIT_HEAD_OK      : {state = ROB_STORE_HEAD_OK; break;}
    531                     case ROB_END_EXCEPTION_WAIT_HEAD : {state = ROB_END_EXCEPTION; break;}
     584                    case ROB_STORE_WAIT_HEAD_OK      : {state = ROB_STORE_HEAD_OK;        break;}
     585                    case ROB_END_EXCEPTION_WAIT_HEAD : {state = ROB_END_EXCEPTION_UPDATE; break;}
    532586                    default : {break;}
    533587                    }
     
    549603      for (uint32_t j=0; j<_param->_nb_context [i]; j++)
    550604        {
    551           log_printf(TRACE,Commit_unit,FUNCTION,"    * [%d][%d] num_inst_all : %d, num_inst_mem : %d",i,j,reg_NB_INST_COMMIT_ALL[i][j],reg_NB_INST_COMMIT_MEM[i][j]);
    552605          log_printf(TRACE,Commit_unit,FUNCTION,"    * [%d][%d] state        : %s",i,j,toString(reg_EVENT_STATE [i][j]).c_str());
     606          log_printf(TRACE,Commit_unit,FUNCTION,"    * num_inst_all : %d",reg_NB_INST_COMMIT_ALL[i][j]);
     607          log_printf(TRACE,Commit_unit,FUNCTION,"    * num_inst_mem : %d",reg_NB_INST_COMMIT_MEM[i][j]);
     608          log_printf(TRACE,Commit_unit,FUNCTION,"    * PC_CURRENT   : %.8x - %d %d",reg_PC_CURRENT [i][j], reg_PC_CURRENT_IS_DS [i][j], reg_PC_CURRENT_IS_DS_TAKE [i][j]);
     609          log_printf(TRACE,Commit_unit,FUNCTION,"    * PC_NEXT      : %.8x",reg_PC_NEXT [i][j]);
    553610        }
    554611       
     
    567624             it++)
    568625          {
    569             log_printf(TRACE,Commit_unit,FUNCTION,"      [%.4d] %.4d %.4d %.4d %.4d, %.3d %.3d, %.8x (%.8x) %.1d, %.1d %.4d, %.1d %.4d, %s - %d",
     626            log_printf(TRACE,Commit_unit,FUNCTION,"      [%.4d] %.4d %.4d %.4d %.4d, %.3d %.3d, %.1d, %.1d %.4d, %.1d %.4d, %s - %d",
    570627                       x,
    571628                       (*it)->front_end_id            ,
     
    575632                       (*it)->type                    ,
    576633                       (*it)->operation               ,
    577                        (*it)->address                 ,
    578                        (*it)->address << 2            ,
     634//                     (*it)->address                 ,
     635//                     (*it)->address << 2            ,
    579636                       (*it)->is_delay_slot           ,
    580637                       (*it)->use_store_queue         ,
     
    603660                       (*it)->num_reg_re_phy_new      );
    604661           
    605             log_printf(TRACE,Commit_unit,FUNCTION,"             %.2d %.2d %.1d %.1d %.8x",
     662            log_printf(TRACE,Commit_unit,FUNCTION,"             %.2d %.2d %.1d %.1d %.8x (%.8x)",
    606663                       (*it)->exception_use ,
    607664                       (*it)->exception     ,
    608665                       (*it)->flags         ,
    609666                       (*it)->no_sequence   ,
    610                        (*it)->data_commit   
     667                       (*it)->address_next  ,
     668                       (*it)->address_next<<2
    611669                       );
    612670
Note: See TracChangeset for help on using the changeset viewer.