Ignore:
Timestamp:
Aug 2, 2010, 8:56:05 PM (14 years ago)
Author:
rosiere
Message:

Add statistics in stage IFETCH, DECODE and COMMIT (insert, retire and commit)

File:
1 edited

Legend:

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

    r139 r141  
    8989    else
    9090      {
     91#ifdef STATISTICS
     92        uint32_t stat_nb_inst_insert [_param->_nb_rename_unit];
     93        uint32_t stat_nb_inst_retire [_param->_nb_rename_unit];
     94        uint32_t stat_nb_inst_commit [_param->_nb_rename_unit];
     95       
     96        if (usage_is_set(_usage,USE_STATISTICS))
     97          for (uint32_t i=0; i<_param->_nb_rename_unit; ++i)
     98            {
     99              stat_nb_inst_insert [i] = 0;
     100              stat_nb_inst_retire [i] = 0;
     101              stat_nb_inst_commit [i] = 0;
     102            }
     103#endif
     104
    91105        // Increase number idle cycle
    92106        for (uint32_t i=0; i<_param->_nb_front_end; i++)
     
    354368#ifdef STATISTICS
    355369                      if (usage_is_set(_usage,USE_STATISTICS))
    356                         (*_stat_nb_inst_insert [x]) ++;
     370                        stat_nb_inst_insert [x] ++;
    357371#endif
    358372                   
     
    433447                  {
    434448                    log_printf(TRACE,Commit_unit,FUNCTION,"  * COMMIT            [%d]",x);
     449                    log_printf(TRACE,Commit_unit,FUNCTION,"    * num_bank              : %d",i);
     450
     451                    // find the good entry !!!
     452                    entry_t *       entry        = internal_BANK_COMMIT_ENTRY [i][j];
    435453
    436454#ifdef STATISTICS
    437455                    if (usage_is_set(_usage,USE_STATISTICS))
    438                       (*_stat_nb_inst_commit) ++;
     456                      stat_nb_inst_commit [entry->rename_unit_id] ++;
    439457#endif
    440 
    441                     log_printf(TRACE,Commit_unit,FUNCTION,"    * num_bank              : %d",i);
    442 
    443                     // find the good entry !!!
    444                     entry_t *       entry        = internal_BANK_COMMIT_ENTRY [i][j];
    445458
    446459                    log_printf(TRACE,Commit_unit,FUNCTION,"    * ptr                   : %d",entry->ptr);
     
    720733#ifdef STATISTICS
    721734                if (usage_is_set(_usage,USE_STATISTICS))
    722                   (*_stat_nb_inst_retire [x]) ++;
     735                  stat_nb_inst_retire [x] ++;
    723736#endif
    724737               
     
    12901303                }
    12911304            }
     1305
     1306        for (uint32_t i=0; i<_param->_nb_rename_unit; ++i)
     1307          {
     1308            (*_stat_nb_inst_insert [i]) += stat_nb_inst_insert [i];
     1309            (*_stat_nb_inst_retire [i]) += stat_nb_inst_retire [i];
     1310            (*_stat_nb_inst_commit [i]) += stat_nb_inst_commit [i];
     1311          }
    12921312      }
    12931313#endif
Note: See TracChangeset for help on using the changeset viewer.