Ignore:
Timestamp:
Jun 8, 2009, 10:43:30 PM (15 years ago)
Author:
rosiere
Message:

1) Fix performance
2) add auto generation to SPECINT2000
3) add reset in genMoore and genMealy

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

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h

    r122 r123  
    8585  public    : SC_IN (Toperation_t       ) ***  in_INSERT_OPERATION                 ;//[nb_rename_unit][nb_inst_insert]
    8686  public    : SC_IN (Tcontrol_t         ) ***  in_INSERT_NO_EXECUTE                ;//[nb_rename_unit][nb_inst_insert]
     87  public    : SC_IN (Tcontrol_t         ) ***  in_INSERT_LAST_EVENT                ;//[nb_rename_unit][nb_inst_insert]
    8788  public    : SC_IN (Tcontrol_t         ) ***  in_INSERT_IS_DELAY_SLOT             ;//[nb_rename_unit][nb_inst_insert]
    8889#ifdef DEBUG
     
    143144  public    : SC_IN (Tcontrol_t         ) ***  in_RETIRE_EVENT_ACK                 ;//[nb_front_end][nb_context]
    144145  public    : SC_OUT(Tevent_state_t     ) *** out_RETIRE_EVENT_STATE               ;//[nb_front_end][nb_context]
    145   public    : SC_OUT(Tcontrol_t         ) *** out_RETIRE_EVENT_FLUSH               ;//[nb_front_end][nb_context]
     146//public    : SC_OUT(Tcontrol_t         ) *** out_RETIRE_EVENT_FLUSH               ;//[nb_front_end][nb_context]
    146147  public    : SC_OUT(Tcontrol_t         ) *** out_RETIRE_EVENT_STOP                ;//[nb_front_end][nb_context]
    147148                                                                                   
     
    225226  public    : SC_OUT(Tcontrol_t         ) *** out_SPR_WRITE_SR_OV                  ;//[nb_front_end][nb_context]
    226227
     228    // ~~~~~[ interface : "info" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     229#ifdef DEBUG_TEST
     230  public    : SC_OUT(bool               )   * out_INFO_ROB_EMPTY                   ;
     231#endif
     232
    227233    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
    228234  private   : generic::priority::Priority   * _priority_insert                     ;
     
    243249  private   : Tcommit_event_state_t        ** reg_EVENT_STATE                      ;//[nb_front_end][nb_context]
    244250//private   : bool                         ** reg_EVENT_FLUSH                      ;//[nb_front_end][nb_context]
    245   private   : bool                         ** reg_EVENT_STOP                       ;//[nb_front_end][nb_context]
     251//private   : bool                         ** reg_EVENT_STOP                       ;//[nb_front_end][nb_context]
    246252  private   : uint32_t                     ** reg_EVENT_NUM_BANK                   ;//[nb_front_end][nb_context]
    247253  private   : uint32_t                     ** reg_EVENT_NUM_PTR                    ;//[nb_front_end][nb_context]
    248   private   : bool                         ** reg_EVENT_CAN_RESTART                ;//[nb_front_end][nb_context]
     254//private   : bool                         ** reg_EVENT_CAN_RESTART                ;//[nb_front_end][nb_context]
    249255  private   : uint32_t                     ** reg_EVENT_PACKET                     ;//[nb_front_end][nb_context]
    250256  private   : bool                         ** reg_EVENT_LAST                       ;//[nb_front_end][nb_context]
    251257  private   : uint32_t                     ** reg_EVENT_LAST_NUM_BANK              ;//[nb_front_end][nb_context]
    252258  private   : uint32_t                     ** reg_EVENT_LAST_NUM_PTR               ;//[nb_front_end][nb_context]
     259
     260  private   : bool                         ** reg_EVENT_NEXT_STOP                  ;//[nb_front_end][nb_context]
     261  private   : uint32_t                     ** reg_EVENT_NEXT_PACKET                ;//[nb_front_end][nb_context]
    253262
    254263//private   : Taddress_t                   ** reg_PC_PREVIOUS                      ;//[nb_front_end][nb_context]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Types.h

    r122 r123  
    6262  typedef enum
    6363    {
    64       COMMIT_EVENT_STATE_NO_EVENT  ,
    65       COMMIT_EVENT_STATE_EVENT     ,
    66       COMMIT_EVENT_STATE_WAIT_DECOD,
    67       COMMIT_EVENT_STATE_WAIT_END  ,
     64      COMMIT_EVENT_STATE_NO_EVENT     ,
     65      COMMIT_EVENT_STATE_NOT_YET_EVENT,
     66      COMMIT_EVENT_STATE_EVENT        ,
     67//    COMMIT_EVENT_STATE_WAIT_DECOD   ,
     68      COMMIT_EVENT_STATE_WAIT_END     ,
    6869      COMMIT_EVENT_STATE_END     
    6970    } Tcommit_event_state_t;
    7071
    71 #define commit_event_state_to_event_state(x) ((x==COMMIT_EVENT_STATE_EVENT)?EVENT_STATE_EVENT:((x==COMMIT_EVENT_STATE_WAIT_DECOD)?EVENT_STATE_WAITEND:((x==COMMIT_EVENT_STATE_WAIT_END)?EVENT_STATE_WAITEND:((x==COMMIT_EVENT_STATE_END)?EVENT_STATE_END:EVENT_STATE_NO_EVENT))))
     72#define commit_event_state_to_event_state(x) ((x==COMMIT_EVENT_STATE_EVENT)?EVENT_STATE_EVENT:((x==COMMIT_EVENT_STATE_WAIT_END)?EVENT_STATE_WAITEND:((x==COMMIT_EVENT_STATE_END)?EVENT_STATE_END:EVENT_STATE_NO_EVENT)))
     73// #define commit_event_state_to_event_state(x) ((x==COMMIT_EVENT_STATE_EVENT)?EVENT_STATE_EVENT:((x==COMMIT_EVENT_STATE_WAIT_DECOD)?EVENT_STATE_WAITEND:((x==COMMIT_EVENT_STATE_WAIT_END)?EVENT_STATE_WAITEND:((x==COMMIT_EVENT_STATE_END)?EVENT_STATE_END:EVENT_STATE_NO_EVENT))))
    7274
    7375
     
    147149      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_STORE_OK_WAIT_END          : return "ROB_STORE_OK_WAIT_END"           ; break;
    148150      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_STORE_KO_WAIT_END          : return "ROB_STORE_KO_WAIT_END"           ; break;
     151      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_STORE_EVENT                : return "ROB_STORE_EVENT"                 ; break;
    149152      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_OTHER_WAIT_END             : return "ROB_OTHER_WAIT_END"              ; break;
    150153      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_EVENT_WAIT_END             : return "ROB_EVENT_WAIT_END"              ; break;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit.cpp

    r121 r123  
    4040    usage_environment(_usage);
    4141
    42 #if DEBUG_Commit_unit == true
    43     log_printf(TRACE,Commit_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
    44 
    45     std::cout << *param << std::endl;
    46 #endif
     42// #if DEBUG_Commit_unit == true
     43//     log_printf(TRACE,Commit_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
     44
     45//     std::cout << *param << std::endl;
     46// #endif
    4747
    4848    log_printf(INFO,Commit_unit,FUNCTION,_("<%s> Allocation"),_name.c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp

    r122 r123  
    7171      _ALLOC2_SIGNAL_IN ( in_INSERT_OPERATION               ,"operation"            ,Toperation_t      ,_param->_size_operation             ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    7272      _ALLOC2_SIGNAL_IN ( in_INSERT_NO_EXECUTE              ,"no_execute"           ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     73      _ALLOC2_SIGNAL_IN ( in_INSERT_LAST_EVENT              ,"last_event"           ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    7374      _ALLOC2_SIGNAL_IN ( in_INSERT_IS_DELAY_SLOT           ,"is_delay_slot"        ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    7475#ifdef DEBUG
     
    141142      _ALLOC2_VALACK_IN ( in_RETIRE_EVENT_ACK               ,ACK,_param->_nb_front_end,_param->_nb_context[it1]);
    142143      _ALLOC2_SIGNAL_OUT(out_RETIRE_EVENT_STATE             ,"state"                ,Tevent_state_t    ,_param->_size_event_state           ,_param->_nb_front_end,_param->_nb_context[it1]);
    143       _ALLOC2_SIGNAL_OUT(out_RETIRE_EVENT_FLUSH             ,"flush"                ,Tcontrol_t        ,1                                   ,_param->_nb_front_end,_param->_nb_context[it1]);
     144//    _ALLOC2_SIGNAL_OUT(out_RETIRE_EVENT_FLUSH             ,"flush"                ,Tcontrol_t        ,1                                   ,_param->_nb_front_end,_param->_nb_context[it1]);
    144145      _ALLOC2_SIGNAL_OUT(out_RETIRE_EVENT_STOP              ,"stop"                 ,Tcontrol_t        ,1                                   ,_param->_nb_front_end,_param->_nb_context[it1]);
    145146
     
    282283    }
    283284
     285#ifdef DEBUG_TEST
     286    {
     287      ALLOC0_INTERFACE_BEGIN("info",OUT,EAST,_("Information."));
     288      ALLOC0_SIGNAL_OUT(out_INFO_ROB_EMPTY                   ,"rob_empty"   ,bool               ,1);
     289      ALLOC0_INTERFACE_END();
     290    }
     291#endif
     292
    284293    if (usage_is_set(_usage,USE_SYSTEMC))
    285294      {
     
    318327    ALLOC2(reg_EVENT_STATE          ,Tcommit_event_state_t,_param->_nb_front_end,_param->_nb_context [it1]);
    319328//  ALLOC2(reg_EVENT_FLUSH          ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
    320     ALLOC2(reg_EVENT_STOP           ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
     329//  ALLOC2(reg_EVENT_STOP           ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
    321330    ALLOC2(reg_EVENT_NUM_BANK       ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
    322331    ALLOC2(reg_EVENT_NUM_PTR        ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
    323     ALLOC2(reg_EVENT_CAN_RESTART    ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
     332//  ALLOC2(reg_EVENT_CAN_RESTART    ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
    324333    ALLOC2(reg_EVENT_PACKET         ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
    325334    ALLOC2(reg_EVENT_LAST           ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
    326335    ALLOC2(reg_EVENT_LAST_NUM_BANK  ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
    327336    ALLOC2(reg_EVENT_LAST_NUM_PTR   ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
     337
     338    ALLOC2(reg_EVENT_NEXT_STOP      ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
     339    ALLOC2(reg_EVENT_NEXT_PACKET    ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
    328340                                                         
    329341//  ALLOC2(reg_PC_PREVIOUS          ,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

    r122 r123  
    3838        DELETE2_SIGNAL( in_INSERT_OPERATION               ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_operation             );
    3939        DELETE2_SIGNAL( in_INSERT_NO_EXECUTE              ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
     40        DELETE2_SIGNAL( in_INSERT_LAST_EVENT              ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
    4041        DELETE2_SIGNAL( in_INSERT_IS_DELAY_SLOT           ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
    4142#ifdef DEBUG
     
    9495        DELETE2_SIGNAL( in_RETIRE_EVENT_ACK               ,_param->_nb_front_end,_param->_nb_context[it1],1);
    9596        DELETE2_SIGNAL(out_RETIRE_EVENT_STATE             ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_event_state);
    96         DELETE2_SIGNAL(out_RETIRE_EVENT_FLUSH             ,_param->_nb_front_end,_param->_nb_context[it1],1);
     97//      DELETE2_SIGNAL(out_RETIRE_EVENT_FLUSH             ,_param->_nb_front_end,_param->_nb_context[it1],1);
    9798        DELETE2_SIGNAL(out_RETIRE_EVENT_STOP              ,_param->_nb_front_end,_param->_nb_context[it1],1);
    9899
     
    167168        DELETE2_SIGNAL(out_SPR_WRITE_SR_OV                ,_param->_nb_front_end, _param->_nb_context[it1],1);
    168169
     170        DELETE0_SIGNAL(out_INFO_ROB_EMPTY                 ,1);
     171
    169172        // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
    170173        DELETE1(internal_BANK_INSERT_VAL             ,_param->_nb_bank);
     
    207210        DELETE2(reg_EVENT_STATE          ,_param->_nb_front_end,_param->_nb_context [it1]);
    208211//      DELETE2(reg_EVENT_FLUSH          ,_param->_nb_front_end,_param->_nb_context [it1]);
    209         DELETE2(reg_EVENT_STOP           ,_param->_nb_front_end,_param->_nb_context [it1]);
     212//      DELETE2(reg_EVENT_STOP           ,_param->_nb_front_end,_param->_nb_context [it1]);
    210213        DELETE2(reg_EVENT_NUM_BANK       ,_param->_nb_front_end,_param->_nb_context [it1]);
    211214        DELETE2(reg_EVENT_NUM_PTR        ,_param->_nb_front_end,_param->_nb_context [it1]);
    212         DELETE2(reg_EVENT_CAN_RESTART    ,_param->_nb_front_end,_param->_nb_context [it1]);
     215//         DELETE2(reg_EVENT_CAN_RESTART    ,_param->_nb_front_end,_param->_nb_context [it1]);
    213216        DELETE2(reg_EVENT_PACKET         ,_param->_nb_front_end,_param->_nb_context [it1]);
    214217        DELETE2(reg_EVENT_LAST           ,_param->_nb_front_end,_param->_nb_context [it1]);
    215218        DELETE2(reg_EVENT_LAST_NUM_BANK  ,_param->_nb_front_end,_param->_nb_context [it1]);
    216219        DELETE2(reg_EVENT_LAST_NUM_PTR   ,_param->_nb_front_end,_param->_nb_context [it1]);
     220
     221        DELETE2(reg_EVENT_NEXT_STOP      ,_param->_nb_front_end,_param->_nb_context [it1]);
     222        DELETE2(reg_EVENT_NEXT_PACKET    ,_param->_nb_front_end,_param->_nb_context [it1]);
    217223
    218224//      DELETE2(reg_PC_PREVIOUS          ,_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_commit.cpp

    r119 r123  
    2323    log_begin(Commit_unit,FUNCTION);
    2424    log_function(Commit_unit,FUNCTION,_name.c_str());
     25
     26    if (PORT_READ(in_NRESET))
     27      {
    2528
    2629#ifdef STATISTICS
     
    9699    for (uint32_t i=0; i<_param->_nb_inst_commit; i++)
    97100      PORT_WRITE(out_COMMIT_ACK [i],commit_ack [i]);
     101      }
     102    else
     103      {
     104        for (uint32_t i=0; i<_param->_nb_inst_commit; i++)
     105          PORT_WRITE(out_COMMIT_ACK [i],0);
     106      }
    98107   
    99108    log_end(Commit_unit,FUNCTION);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMealy_insert.cpp

    r122 r123  
    2424    log_function(Commit_unit,FUNCTION,_name.c_str());
    2525
     26    if (PORT_READ(in_NRESET))
     27      {
    2628    Tcontrol_t bank_full         [_param->_nb_bank];
    2729    Tcontrol_t insert_ack        [_param->_nb_rename_unit][_param->_max_nb_inst_insert];
     
    136138#endif
    137139        }
    138    
     140      }   
     141    else
     142      {
     143        for (uint32_t i=0; i<_param->_nb_bank; i++)
     144          internal_BANK_INSERT_VAL  [i] = false;
     145        for (uint32_t i=0; i<_param->_nb_rename_unit; i++)
     146          for (uint32_t j=0; j<_param->_nb_inst_insert[i]; j++)
     147            PORT_WRITE(out_INSERT_ACK       [i][j],0);
     148
     149      }
     150
    139151    log_end(Commit_unit,FUNCTION);
    140152  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMealy_retire.cpp

    r122 r123  
    2424    log_function(Commit_unit,FUNCTION,_name.c_str());
    2525
     26    if (PORT_READ(in_NRESET))
     27      {
    2628    Tcontrol_t retire_val          [_param->_nb_rename_unit][_param->_max_nb_inst_retire];
    2729    uint32_t   num_inst_retire     [_param->_nb_rename_unit];
     
    186188
    187189                  // if future event, don't update after this event
    188                   if (reg_EVENT_STOP [front_end_id][context_id] and
    189                       (reg_EVENT_PACKET [entry->front_end_id][entry->context_id]  == packet))
     190                  if ((reg_EVENT_STATE  [entry->front_end_id][entry->context_id] == COMMIT_EVENT_STATE_NOT_YET_EVENT) and
     191                      (reg_EVENT_PACKET [entry->front_end_id][entry->context_id] == packet))
    190192                    bypass = false;
    191193              }
     
    211213          PORT_WRITE(out_SPR_WRITE_SR_OV     [i][j], spr_write_sr_ov     [i][j]);
    212214        }
     215      }
     216    else
     217      {
     218        for (uint32_t i=0; i<_param->_nb_rename_unit; i++)
     219          for (uint32_t j=0; j<_param->_nb_inst_retire[i]; j++)
     220            PORT_WRITE(out_RETIRE_VAL [i][j],0);
     221      }
    213222
    214223    log_end(Commit_unit,FUNCTION);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMoore.cpp

    r122 r123  
    2424    log_function(Commit_unit,FUNCTION,_name.c_str());
    2525
     26    if (PORT_READ(in_NRESET))
     27      {
    2628    // ===================================================================
    2729    // =====[ REEXECUTE ]=================================================
     
    105107
    106108          internal_REEXECUTE_VAL      [i] = val;
    107           PORT_WRITE(out_REEXECUTE_VAL[i], internal_REEXECUTE_VAL [i]);
    108109        }
    109110    }
     
    148149
    149150                  // don't complete a branch when rob manage an present event
    150                   if ((reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_NO_EVENT) and
     151                  if (((reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_NO_EVENT) or
     152                       (reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_NOT_YET_EVENT)) and
    151153                      (state == ROB_BRANCH_COMPLETE))
    152154                    {
     
    154156
    155157                      // test if have a future event (stop is set)
    156                       log_printf(TRACE,Commit_unit,FUNCTION,"      * reg_EVENT_STOP   : %d",reg_EVENT_STOP [front_end_id][context_id]);
    157 
    158                       if (reg_EVENT_STOP [front_end_id][context_id])
     158//                       log_printf(TRACE,Commit_unit,FUNCTION,"      * reg_EVENT_STOP   : %d",reg_EVENT_STOP [front_end_id][context_id]);
     159
     160                      if (reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_NOT_YET_EVENT)
    159161                        {
    160162                          // Have future event, can complete the branch if the event is most speculative than this branchement
     
    204206
    205207          internal_BRANCH_COMPLETE_VAL [i] = val;
    206           PORT_WRITE(out_BRANCH_COMPLETE_VAL [i], internal_BRANCH_COMPLETE_VAL [i]);
    207208        }
    208209    }
     
    275276        }
    276277     
    277       PORT_WRITE(out_UPDATE_VAL, internal_UPDATE_VAL);
    278 
    279278      log_printf(TRACE,Commit_unit,FUNCTION,"  * UPDATE (end)");
    280279    }
     
    283282    // =====[ NB_INST ]===================================================
    284283    // ===================================================================
    285     for (uint32_t i=0; i<_param->_nb_front_end; i++)
    286       for (uint32_t j=0; j<_param->_nb_context [i]; j++)
    287         {
    288           PORT_WRITE(out_NB_INST_COMMIT_ALL [i][j], reg_NB_INST_COMMIT_ALL [i][j]);
    289           PORT_WRITE(out_NB_INST_COMMIT_MEM [i][j], reg_NB_INST_COMMIT_MEM [i][j]);
    290         }
     284    {
     285#ifdef DEBUG_TEST
     286      bool empty = true;
     287#endif
     288      for (uint32_t i=0; i<_param->_nb_front_end; i++)
     289        for (uint32_t j=0; j<_param->_nb_context [i]; j++)
     290          {
     291#ifdef DEBUG_TEST
     292            empty &= (reg_NB_INST_COMMIT_ALL [i][j] == 0);
     293#endif
     294            PORT_WRITE(out_NB_INST_COMMIT_ALL [i][j], reg_NB_INST_COMMIT_ALL [i][j]);
     295            PORT_WRITE(out_NB_INST_COMMIT_MEM [i][j], reg_NB_INST_COMMIT_MEM [i][j]);
     296          }
     297#ifdef DEBUG_TEST
     298      PORT_WRITE(out_INFO_ROB_EMPTY,empty);
     299#endif
     300    }
     301
    291302
    292303    // ===================================================================
     
    296307      for (uint32_t j=0; j<_param->_nb_context [i]; j++)
    297308        {
    298 //        bool flush = reg_EVENT_FLUSH [i][j];
    299           bool flush = (((reg_EVENT_STATE [i][j] == COMMIT_EVENT_STATE_EVENT) or
    300                          (reg_EVENT_STATE [i][j] == COMMIT_EVENT_STATE_WAIT_DECOD)) and
    301                         not reg_EVENT_CAN_RESTART[i][j]);
     309//           bool flush = (((reg_EVENT_STATE [i][j] == COMMIT_EVENT_STATE_EVENT) or
     310//                          (reg_EVENT_STATE [i][j] == COMMIT_EVENT_STATE_WAIT_DECOD)) and
     311//                         not reg_EVENT_CAN_RESTART[i][j]);
    302312
    303313          PORT_WRITE(out_RETIRE_EVENT_STATE [i][j], commit_event_state_to_event_state(reg_EVENT_STATE[i][j]));
    304           PORT_WRITE(out_RETIRE_EVENT_FLUSH [i][j], flush);
    305           PORT_WRITE(out_RETIRE_EVENT_STOP  [i][j], reg_EVENT_STOP [i][j]);
     314//        PORT_WRITE(out_RETIRE_EVENT_FLUSH [i][j], flush);
     315//        PORT_WRITE(out_RETIRE_EVENT_STOP  [i][j], reg_EVENT_STOP [i][j]);
     316          PORT_WRITE(out_RETIRE_EVENT_STOP  [i][j], ((reg_EVENT_STATE [i][j] == COMMIT_EVENT_STATE_NOT_YET_EVENT) or
     317                                                     reg_EVENT_NEXT_STOP [i][j]));
    306318        }
    307 
     319      }
     320    else
     321      {
     322        for (uint32_t i=0; i<_param->_nb_inst_reexecute; ++i)
     323          {
     324            internal_REEXECUTE_VAL      [i] = 0;
     325//             internal_REEXECUTE_NUM_BANK [i] = num_bank;
     326          }
     327
     328        for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++)
     329          {
     330            internal_BRANCH_COMPLETE_VAL [i] = 0;
     331//             internal_BRANCH_COMPLETE_NUM_BANK           [i] = num_bank;
     332          }
     333
     334        internal_UPDATE_VAL = 0;
     335//       internal_UPDATE_NUM_BANK = reg_NUM_BANK_HEAD;
     336
     337
     338        for (uint32_t i=0; i<_param->_nb_front_end; i++)
     339          for (uint32_t j=0; j<_param->_nb_context [i]; j++)
     340            {
     341              PORT_WRITE(out_RETIRE_EVENT_STATE [i][j], commit_event_state_to_event_state(COMMIT_EVENT_STATE_NO_EVENT));
     342//            PORT_WRITE(out_RETIRE_EVENT_FLUSH [i][j], flush);
     343//            PORT_WRITE(out_RETIRE_EVENT_STOP  [i][j], reg_EVENT_STOP [i][j]);
     344              PORT_WRITE(out_RETIRE_EVENT_STOP  [i][j], true);
     345            }
     346      }
     347
     348      for (uint32_t i=0; i<_param->_nb_inst_reexecute; ++i)
     349        PORT_WRITE(out_REEXECUTE_VAL[i], internal_REEXECUTE_VAL [i]);
     350      for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++)
     351        PORT_WRITE(out_BRANCH_COMPLETE_VAL [i], internal_BRANCH_COMPLETE_VAL [i]);
     352      PORT_WRITE(out_UPDATE_VAL, internal_UPDATE_VAL);
     353       
    308354    log_end(Commit_unit,FUNCTION);
    309355  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp

    r122 r123  
    5353              reg_EVENT_STATE           [i][j] = COMMIT_EVENT_STATE_NO_EVENT;
    5454//            reg_EVENT_FLUSH           [i][j] = false;
    55               reg_EVENT_STOP            [i][j] = false;
     55//            reg_EVENT_STOP            [i][j] = false;
    5656              reg_EVENT_LAST            [i][j] = false;
     57
     58              reg_EVENT_NEXT_STOP       [i][j] = false;
    5759
    5860//            reg_PC_PREVIOUS           [i][j] = (0x100-4)>>2;
     
    8688              //   * and decod_queue is empty
    8789              //   * and have an event or have a futur event
    88               if (not reg_EVENT_CAN_RESTART [i][j] and
    89                    (PORT_READ(in_NB_INST_DECOD_ALL [i][j]) == 0) and
    90                    (reg_EVENT_STOP [i][j] or (reg_EVENT_STATE [i][j] != COMMIT_EVENT_STATE_NO_EVENT)))
    91                 reg_EVENT_CAN_RESTART [i][j] = true;
     90//               if (not reg_EVENT_CAN_RESTART [i][j] and
     91//                    (PORT_READ(in_NB_INST_DECOD_ALL [i][j]) == 0) and
     92//                    (reg_EVENT_STOP [i][j] or (reg_EVENT_STATE [i][j] != COMMIT_EVENT_STATE_NO_EVENT)))
     93//                 reg_EVENT_CAN_RESTART [i][j] = true;
    9294
    9395              // Test event state
     
    100102                      {
    101103                        // A minor optimisation : test if wait_decod is previously empty.
    102                         if (not reg_EVENT_CAN_RESTART [i][j])
    103                           reg_EVENT_STATE [i][j] = COMMIT_EVENT_STATE_WAIT_DECOD;
    104                         else
     104//                         if (not reg_EVENT_CAN_RESTART [i][j])
     105//                           reg_EVENT_STATE [i][j] = COMMIT_EVENT_STATE_WAIT_DECOD;
     106//                         else
    105107                          reg_EVENT_STATE [i][j] = COMMIT_EVENT_STATE_WAIT_END;
    106108                      }
     
    108110                    break;
    109111                  }
    110                 case COMMIT_EVENT_STATE_WAIT_DECOD :
    111                   {
    112                     // Wait flush of decod_queue.
    113                     // Test if can restart now
    114                     if (reg_EVENT_CAN_RESTART [i][j])
    115                       {
    116                         //reg_EVENT_FLUSH [i][j] = false;
    117 
    118                         // A minor optimisation : test if the last element is already retire
    119                         if (not reg_EVENT_LAST [i][j])
    120                           reg_EVENT_STATE [i][j] = COMMIT_EVENT_STATE_WAIT_END;
    121                         else
    122                           reg_EVENT_STATE [i][j] = COMMIT_EVENT_STATE_END;
    123                       }
    124                     break;
    125                   }
     112//                 case COMMIT_EVENT_STATE_WAIT_DECOD :
     113//                   {
     114//                     // Wait flush of decod_queue.
     115//                     // Test if can restart now
     116//                     if (reg_EVENT_CAN_RESTART [i][j])
     117//                       {
     118//                         //reg_EVENT_FLUSH [i][j] = false;
     119
     120//                         // A minor optimisation : test if the last element is already retire
     121//                         if (not reg_EVENT_LAST [i][j])
     122//                           reg_EVENT_STATE [i][j] = COMMIT_EVENT_STATE_WAIT_END;
     123//                         else
     124//                           reg_EVENT_STATE [i][j] = COMMIT_EVENT_STATE_END;
     125//                       }
     126//                     break;
     127//                   }
    126128                case COMMIT_EVENT_STATE_WAIT_END :
    127129                  {
     
    138140                   
    139141                    // flush of re order buffer is finish
    140                     reg_EVENT_STATE [i][j] = COMMIT_EVENT_STATE_NO_EVENT;
    141142                    reg_EVENT_LAST  [i][j] = false;
     143
     144                    if (not reg_EVENT_NEXT_STOP [i][j])
     145                      reg_EVENT_STATE [i][j] = COMMIT_EVENT_STATE_NO_EVENT;
     146                    else
     147                      {
     148                        reg_EVENT_NEXT_STOP [i][j] = false;
     149                        reg_EVENT_PACKET [i][j] = reg_EVENT_NEXT_PACKET [i][j];
     150                        reg_EVENT_STATE         [i][j] = COMMIT_EVENT_STATE_NOT_YET_EVENT;
     151//                      reg_EVENT_STOP          [i][j] = true;
     152                        reg_EVENT_LAST_NUM_BANK [i][j] = ((reg_NUM_BANK_TAIL==0)?_param->_nb_bank:reg_NUM_BANK_TAIL)-1;
     153                        reg_EVENT_LAST_NUM_PTR  [i][j] = reg_NUM_PTR_TAIL;
     154                      }
     155
    142156                    break;
    143157                  }
    144158                  //case COMMIT_EVENT_STATE_NO_EVENT :
     159                  //case COMMIT_EVENT_STATE_NOT_YET_EVENT :
    145160                default : break;
    146161                }
     
    296311                      //     * or present_event
    297312                      //   * and not can_restart (previous empty decod queue), because between the event_stop (branch_complete) and the state event (miss in head), many cycle is occured.
    298                       bool flush = ((// present event
    299                                      ((reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_EVENT) or
    300                                       (reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_WAIT_DECOD)) or
    301                                      // futur event
    302                                      reg_EVENT_STOP [front_end_id][context_id])
    303                                     // can't restart
    304                                     and not reg_EVENT_CAN_RESTART[front_end_id][context_id]
    305                                     );
    306 
    307                       if (flush)
    308                         {
    309                           // A new invalid instruction is push in rob -> new last instruction
    310                           reg_EVENT_LAST          [front_end_id][context_id] = false;
    311                           reg_EVENT_LAST_NUM_BANK [front_end_id][context_id] = num_bank;
    312                           reg_EVENT_LAST_NUM_PTR  [front_end_id][context_id] = ptr;
    313                         }
     313//                       bool flush = ((// present event
     314//                                      ((reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_EVENT) or
     315//                                       (reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_WAIT_DECOD)
     316//                                       ) or
     317//                                      futur event
     318//                                      reg_EVENT_STOP [front_end_id][context_id])
     319//                                     // can't restart
     320//                                     and not reg_EVENT_CAN_RESTART[front_end_id][context_id]
     321//                                     );
     322
     323//                       if (flush)
     324//                         {
     325//                           // A new invalid instruction is push in rob -> new last instruction
     326//                           reg_EVENT_LAST          [front_end_id][context_id] = false;
     327//                           reg_EVENT_LAST_NUM_BANK [front_end_id][context_id] = num_bank;
     328//                           reg_EVENT_LAST_NUM_PTR  [front_end_id][context_id] = ptr;
     329//                         }
    314330                     
    315331                      // Update pointer
     
    359375                    // find the good entry !!!
    360376                    entry_t *       entry        = internal_BANK_COMMIT_ENTRY [i][j];
     377
     378                    log_printf(TRACE,Commit_unit,FUNCTION,"    * ptr        : %d",entry->ptr);
    361379                                                 
    362380                  //Toperation_t    operation    = PORT_READ(in_COMMIT_OPERATION   [x]);
     
    480498
    481499                    // Commit an instruction ...
    482                     // Test if have an event (miss_speculation or exception) and not manage a previous event
    483                     // if yes, this instruction would modify state machine. Also stop Re Order Buffer
    484 
    485 //                  bool flush = reg_EVENT_FLUSH [entry->front_end_id][entry->context_id];
    486                     bool flush = ((reg_EVENT_STATE [entry->front_end_id][entry->context_id] == COMMIT_EVENT_STATE_EVENT) or
    487                                   (reg_EVENT_STATE [entry->front_end_id][entry->context_id] == COMMIT_EVENT_STATE_WAIT_DECOD) or
    488                                   (reg_EVENT_STATE [entry->front_end_id][entry->context_id] == COMMIT_EVENT_STATE_WAIT_END));
    489                    
    490                     if ((have_exception or have_miss_speculation) and (not flush))
     500                    // Test if have an event (miss_speculation or exception)
     501
     502                    if (have_exception or have_miss_speculation)
    491503                      {
     504                        // Two case :
     505                        // if no previous manage event -> generate an event
     506                        // if    previous manage event -> next generate an event
     507
     508//                      bool flush = reg_EVENT_FLUSH [front_end_id][context_id];
     509                        bool flush = ((reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_EVENT) or
     510//                                    (reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_WAIT_DECOD) or
     511                                      (reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_WAIT_END) or
     512                                      (reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_END)
     513                                      );
     514                       
    492515                        uint32_t packet = ((entry->ptr << _param->_shift_num_slot) | i);
    493                        
    494                         // test have a previous event detected (event_stop = 1)
    495                         // if yes, test if the actual event if "before (in order)" that the previous event
    496                         if (reg_EVENT_STOP [entry->front_end_id][entry->context_id])
     516                        uint32_t _top   = ((_rob[ reg_NUM_BANK_HEAD].front()->ptr << _param->_shift_num_slot) | reg_NUM_BANK_HEAD);
     517                           
     518                        if (not flush)
    497519                          {
    498                             // Compare packet_id (by construction instruction is insert in order by increase packet_id)
    499 
    500                             uint32_t _top = ((_rob[ reg_NUM_BANK_HEAD].front()->ptr << _param->_shift_num_slot) | reg_NUM_BANK_HEAD);
    501                             uint32_t _old = reg_EVENT_PACKET [entry->front_end_id][entry->context_id];
    502                             uint32_t _new = packet;
    503                             if (_old < _top) _old = _old+_param->_size_queue;
    504                             if (_new < _top) _new = _new+_param->_size_queue;
    505                             if (_new < _old) reg_EVENT_PACKET [entry->front_end_id][entry->context_id] = packet;
     520                            bool     can    = true;
     521                            // test have a previous event detected (event_stop = 1)
     522                            // if yes, test if the actual event if "before (in order)" that the previous event
     523                            if (reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_NOT_YET_EVENT)
     524                              {
     525                                // Compare packet_id (by construction instruction is insert in order by increase packet_id)
     526                               
     527                                uint32_t _old = reg_EVENT_PACKET [front_end_id][context_id];
     528                                uint32_t _new = packet;
     529                                if (_old < _top) _old = _old+_param->_size_queue;
     530                                if (_new < _top) _new = _new+_param->_size_queue;
     531                                if (_new < _old) reg_EVENT_PACKET [front_end_id][context_id] = packet;
     532                                else can = false;
     533                              }
     534                            else
     535                              reg_EVENT_PACKET [front_end_id][context_id] = packet;
     536                           
     537                            if (can)
     538                              {
     539                                // have an error, stop issue instruction
     540                                reg_EVENT_STATE         [front_end_id][context_id] = COMMIT_EVENT_STATE_NOT_YET_EVENT;
     541                                //                      reg_EVENT_STOP          [front_end_id][context_id] = true;
     542                               
     543                                reg_EVENT_LAST_NUM_BANK [front_end_id][context_id] = ((reg_NUM_BANK_TAIL==0)?_param->_nb_bank:reg_NUM_BANK_TAIL)-1;
     544                                reg_EVENT_LAST_NUM_PTR  [front_end_id][context_id] = reg_NUM_PTR_TAIL;
     545                              }
    506546                          }
    507547                        else
    508                           reg_EVENT_PACKET [entry->front_end_id][entry->context_id] = packet;
    509                        
    510                         // have an error, stop issue instruction
    511                         reg_EVENT_STOP          [entry->front_end_id][entry->context_id] = true;
    512 //                         reg_EVENT_NUM_BANK      [entry->front_end_id][entry->context_id] = i;
    513 //                         reg_EVENT_NUM_PTR       [entry->front_end_id][entry->context_id] = entry->ptr;
    514 
    515 //                      reg_EVENT_CAN_RESTART   [entry->front_end_id][entry->context_id] = false;
    516                         reg_EVENT_LAST_NUM_BANK [entry->front_end_id][entry->context_id] = ((reg_NUM_BANK_TAIL==0)?_param->_nb_bank:reg_NUM_BANK_TAIL)-1;
    517                         reg_EVENT_LAST_NUM_PTR  [entry->front_end_id][entry->context_id] = reg_NUM_PTR_TAIL;
     548                          {
     549                            bool find = true;
     550
     551                            // already manage an event.
     552                            if (reg_EVENT_NEXT_STOP [front_end_id][context_id])
     553                              {
     554                                // after last ?
     555                                uint32_t _old = reg_EVENT_NEXT_PACKET [front_end_id][context_id];
     556                                uint32_t _new = packet;
     557                                if (_old < _top) _old = _old+_param->_size_queue;
     558                                if (_new < _top) _new = _new+_param->_size_queue;
     559                                if (_new > _old) reg_EVENT_NEXT_PACKET [front_end_id][context_id] = packet;
     560                                find = false;
     561                              }
     562                            else
     563                              {
     564                                // after last ?
     565                                uint32_t _old = ((reg_EVENT_LAST_NUM_PTR [front_end_id][context_id] << _param->_shift_num_slot) | reg_EVENT_LAST_NUM_BANK [front_end_id][context_id]);
     566                                uint32_t _new = packet;
     567                                if (_old < _top) _old = _old+_param->_size_queue;
     568                                if (_new < _top) _new = _new+_param->_size_queue;
     569                                if (_new > _old) reg_EVENT_NEXT_PACKET [front_end_id][context_id] = packet;
     570                                find = false;
     571                              }
     572
     573                            if (find)
     574                            reg_EVENT_NEXT_STOP [front_end_id][context_id] = true; // in all case : need stop
     575                          }
    518576                      }
    519                    
     577
    520578                    // Update Re Order Buffer
    521579                    entry->state        = state;
     
    633691                      {
    634692                          reg_EVENT_STATE         [front_end_id][context_id] = COMMIT_EVENT_STATE_EVENT;
    635 //                        reg_EVENT_FLUSH         [front_end_id][context_id] = true;
    636                           reg_EVENT_STOP          [front_end_id][context_id] = false; // instruction flow can continue
    637 //                        reg_EVENT_CAN_RESTART   [front_end_id][context_id] = false;
     693//                        reg_EVENT_STOP          [front_end_id][context_id] = false; // instruction flow can continue
    638694                          reg_EVENT_LAST          [front_end_id][context_id] = false;
    639695                          // it the head !
    640696                          reg_EVENT_PACKET        [front_end_id][context_id] = packet_id;
    641697                   
    642                           // If event is an load_miss, many instruction can be inserted.
    643                           // -> new last instruction
    644                           if (state == ROB_END_LOAD_MISS)
    645                             {
    646                             reg_EVENT_CAN_RESTART   [front_end_id][context_id] = false;
     698//                           // If event is an load_miss, many instruction can be inserted.
     699//                           // -> new last instruction
     700//                           if (state == ROB_END_LOAD_MISS)
     701//                             {
     702// //                             reg_EVENT_CAN_RESTART   [front_end_id][context_id] = false;
    647703                           
    648                             reg_EVENT_LAST_NUM_BANK [front_end_id][context_id] = ((reg_NUM_BANK_TAIL==0)?_param->_nb_bank:reg_NUM_BANK_TAIL)-1;
    649                             reg_EVENT_LAST_NUM_PTR  [front_end_id][context_id] = reg_NUM_PTR_TAIL;
    650                             }
     704//                             reg_EVENT_LAST_NUM_BANK [front_end_id][context_id] = ((reg_NUM_BANK_TAIL==0)?_param->_nb_bank:reg_NUM_BANK_TAIL)-1;
     705//                             reg_EVENT_LAST_NUM_PTR  [front_end_id][context_id] = reg_NUM_PTR_TAIL;
     706//                             }
    651707                        }
    652708                   
     
    654710                    //   * need event
    655711                    //   * packet id = last packet id
    656                     if ((reg_EVENT_STATE         [front_end_id][context_id] != COMMIT_EVENT_STATE_NO_EVENT) and
     712                    if (((reg_EVENT_STATE         [front_end_id][context_id] != COMMIT_EVENT_STATE_NO_EVENT     ) and
     713                         (reg_EVENT_STATE         [front_end_id][context_id] != COMMIT_EVENT_STATE_NOT_YET_EVENT)) and
    657714                        (reg_EVENT_LAST_NUM_BANK [front_end_id][context_id] == num_bank            ) and
    658715                        (reg_EVENT_LAST_NUM_PTR  [front_end_id][context_id] == entry->ptr          ))
     
    666723                    // Update pointer
    667724                    reg_NUM_BANK_HEAD = (num_bank+1)%_param->_nb_bank;
    668                    
    669                     // Remove entry
    670                     delete entry;
    671                     _rob [num_bank].pop_front();
    672725                   
    673726                    // Reset watch dog timer because have transaction on retire interface
     
    708761                    }
    709762#endif     
     763
     764                    // Remove entry
     765                    delete entry;
     766                    _rob [num_bank].pop_front();
    710767                  }
    711768              }
     
    775832              if (miss)
    776833                {
     834                  bool     can    = true;
    777835                  uint32_t packet = ((entry->ptr << _param->_shift_num_slot) | num_bank);
    778836                     
    779837                  // test if this packet is before previous event
    780                   if (reg_EVENT_STOP [entry->front_end_id][entry->context_id])
     838                  if (reg_EVENT_STATE [entry->front_end_id][entry->context_id] == COMMIT_EVENT_STATE_NOT_YET_EVENT)
    781839                    {
    782840                      uint32_t _top = ((_rob[ reg_NUM_BANK_HEAD].front()->ptr << _param->_shift_num_slot) | reg_NUM_BANK_HEAD);
     
    786844                      if (_new < _top) _new = _new+_param->_size_queue;
    787845                      if (_new < _old) reg_EVENT_PACKET [entry->front_end_id][entry->context_id] = packet;
     846                      else can = false;
    788847                    }
    789848                  else
    790849                    reg_EVENT_PACKET [entry->front_end_id][entry->context_id] = packet;
    791850
    792                   // In all case, stop instruction flow
    793                   reg_EVENT_STOP          [entry->front_end_id][entry->context_id] = true;
    794 //                   reg_EVENT_NUM_BANK      [entry->front_end_id][entry->context_id] = num_bank;
    795 //                   reg_EVENT_NUM_PTR       [entry->front_end_id][entry->context_id] = entry->ptr;
    796 
    797                   reg_EVENT_CAN_RESTART   [entry->front_end_id][entry->context_id] = false;
    798 
    799                   reg_EVENT_LAST_NUM_BANK [entry->front_end_id][entry->context_id] = ((reg_NUM_BANK_TAIL==0)?_param->_nb_bank:reg_NUM_BANK_TAIL)-1;
    800                   reg_EVENT_LAST_NUM_PTR  [entry->front_end_id][entry->context_id] = reg_NUM_PTR_TAIL;
     851                  if (can)
     852                    {
     853                      // In all case, stop instruction flow
     854                      reg_EVENT_STATE         [entry->front_end_id][entry->context_id] = COMMIT_EVENT_STATE_NOT_YET_EVENT;
     855//                    reg_EVENT_STOP          [entry->front_end_id][entry->context_id] = true;
     856
     857//                    reg_EVENT_CAN_RESTART   [entry->front_end_id][entry->context_id] = false;
     858
     859                      reg_EVENT_LAST_NUM_BANK [entry->front_end_id][entry->context_id] = ((reg_NUM_BANK_TAIL==0)?_param->_nb_bank:reg_NUM_BANK_TAIL)-1;
     860                      reg_EVENT_LAST_NUM_PTR  [entry->front_end_id][entry->context_id] = reg_NUM_PTR_TAIL;
     861                    }
    801862                }
    802863            }
     
    902963                     
    903964                      bool         flush         = ((reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_EVENT) or
    904                                                     (reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_WAIT_DECOD) or
     965//                                                  (reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_WAIT_DECOD) or
    905966                                                    (reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_WAIT_END));
    906967                      bool         speculative   = entry->speculative and not (depth == depth_min);
     
    10051066                     
    10061067                      // Test if this instruction is the last of event
    1007                       if ((reg_EVENT_STATE         [front_end_id][context_id] != COMMIT_EVENT_STATE_NO_EVENT) and
     1068                      if (((reg_EVENT_STATE         [front_end_id][context_id] != COMMIT_EVENT_STATE_NO_EVENT) and
     1069                           (reg_EVENT_STATE         [front_end_id][context_id] != COMMIT_EVENT_STATE_NOT_YET_EVENT)) and
    10081070                          (reg_EVENT_LAST_NUM_BANK [front_end_id][context_id] == num_bank            ) and
    10091071                          (reg_EVENT_LAST_NUM_PTR  [front_end_id][context_id] == entry->ptr          ))
     
    10441106            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_STATE       : %s - %s",toString(reg_EVENT_STATE [i][j]).c_str(),toString(commit_event_state_to_event_state(reg_EVENT_STATE [i][j])).c_str());
    10451107//          log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_FLUSH       : %d",reg_EVENT_FLUSH [i][j]);
    1046             log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_STOP        : %d",reg_EVENT_STOP  [i][j]);
    1047 //             log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT             : %d (bank %d, ptr %d)",((reg_EVENT_NUM_PTR [i][j] << _param->_shift_num_slot) | reg_EVENT_NUM_BANK [i][j]), reg_EVENT_NUM_BANK [i][j],reg_EVENT_NUM_PTR [i][j]);
    1048             log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_CAN_RESTART : %d",reg_EVENT_CAN_RESTART [i][j]);
     1108//          log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_STOP        : %d",reg_EVENT_STOP  [i][j]);
     1109//          log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT             : %d (bank %d, ptr %d)",((reg_EVENT_NUM_PTR [i][j] << _param->_shift_num_slot) | reg_EVENT_NUM_BANK [i][j]), reg_EVENT_NUM_BANK [i][j],reg_EVENT_NUM_PTR [i][j]);
     1110//          log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_CAN_RESTART : %d",reg_EVENT_CAN_RESTART [i][j]);
    10491111            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_PACKET      : %d",reg_EVENT_PACKET[i][j]);
    10501112            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_LAST        : %d",reg_EVENT_LAST [i][j]);
    10511113            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_LAST        : %d (bank %d, ptr %d)",((reg_EVENT_LAST_NUM_PTR [i][j] << _param->_shift_num_slot) | reg_EVENT_LAST_NUM_BANK [i][j]), reg_EVENT_LAST_NUM_BANK [i][j],reg_EVENT_LAST_NUM_PTR [i][j]);
     1114            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_NEXT_STOP   : %d",reg_EVENT_NEXT_STOP  [i][j]);
     1115            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_NEXT_PACKET : %d",reg_EVENT_NEXT_PACKET[i][j]);
    10521116            log_printf(TRACE,Commit_unit,FUNCTION,"      * NB_INST_ALL       : %d",reg_NB_INST_COMMIT_ALL[i][j]);
    10531117            log_printf(TRACE,Commit_unit,FUNCTION,"      * NB_INST_MEM       : %d",reg_NB_INST_COMMIT_MEM[i][j]);
     
    10651129        }
    10661130
    1067       bool all_empty = false;
     1131      bool     all_empty   = false;
     1132      uint32_t nb_write_rd = 0;
     1133      uint32_t nb_write_re = 0;
     1134
    10681135      while (not all_empty)
    10691136        {
     
    10781145                {
    10791146                  all_empty = false;
     1147
     1148                  nb_write_rd += ((*it)->write_rd)?1:0;
     1149                  nb_write_re += ((*it)->write_re)?1:0;
    10801150
    10811151                  log_printf(TRACE,Commit_unit,FUNCTION,"        [%.4d][%.4d] (%.4d) %.4d %.4d %.4d %.4d, %.3d %.3d, %.1d, %.1d %.4d, %.1d %.4d, %s",
     
    11301200            }
    11311201        }
     1202
     1203      log_printf(TRACE,Commit_unit,FUNCTION,"    * nb_write_rd   : %d",nb_write_rd);
     1204      log_printf(TRACE,Commit_unit,FUNCTION,"    * nb_write_re   : %d",nb_write_re);
    11321205    }
    11331206#endif
Note: See TracChangeset for help on using the changeset viewer.