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)

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

Legend:

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

    r139 r141  
    5555#ifdef STATISTICS
    5656  public    : Stat                           * _stat;
    57   public    : counter_t                     ** _stat_nb_inst_insert               ;//[nb_rename_unit]
    58   public    : counter_t                     ** _stat_nb_inst_retire               ;//[nb_rename_unit]
    59   public    : counter_t                      * _stat_nb_inst_commit               ;
     57
     58  public    : counters_t                    ** _stat_nb_inst_insert               ;//[nb_rename_unit]
     59  public    : counters_t                    ** _stat_nb_inst_retire               ;//[nb_rename_unit]
     60  public    : counters_t                    ** _stat_nb_inst_commit               ;//[nb_rename_unit]
     61
    6062  public    : counter_t                      * _stat_nb_inst_commit_conflit_access;
    6163  public    : counter_t                     ** _stat_nb_inst_retire_ok            ;//[nb_thread]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_allocation.cpp

    r137 r141  
    4848    }
    4949
    50     _stat_nb_inst_insert         = new counter_t * [_param->_nb_rename_unit];
    51     _stat_nb_inst_retire         = new counter_t * [_param->_nb_rename_unit];
    5250    _stat_nb_inst_retire_ok      = new counter_t * [_param->_nb_thread];
    5351    _stat_nb_inst_retire_ko      = new counter_t * [_param->_nb_thread];
     
    5553    _stat_nb_inst_type           = new counter_t * [_param->_nb_type];
    5654    _stat_bank_nb_inst           = new counter_t * [_param->_nb_bank];
    57 
    58     {
    59       std::string sum_nb_inst_insert    = "0";
    60       std::string sum_nb_inst_retire    = "0";
    61 
    62       for (uint32_t i=0; i<_param->_nb_rename_unit; i++)
    63         {
    64           _stat_nb_inst_insert    [i] = _stat->create_variable("nb_inst_insert_"   +toString(i));
    65           _stat_nb_inst_retire    [i] = _stat->create_variable("nb_inst_retire_"   +toString(i));
    66          
    67           _stat->create_expr_average_by_cycle("average_use_interface_insert_"+toString(i), "nb_inst_insert_"+toString(i), "", toString(_("Average instruction by cycle on insert interface (rename_unit %d)"),i));
    68           _stat->create_expr_average_by_cycle("average_use_interface_retire_"+toString(i), "nb_inst_retire_"+toString(i), "", toString(_("Average instruction by cycle on retire interface (rename_unit %d)"),i));
    69           _stat->create_expr_percent         ("percent_use_interface_insert_"+toString(i) , "average_use_interface_insert_"+toString(i), toString(_param->_nb_inst_insert [i]), toString(_("Percent usage of insert interface (rename_unit %d)"),i));
    70           _stat->create_expr_percent         ("percent_use_interface_retire_"+toString(i) , "average_use_interface_retire_"+toString(i), toString(_param->_nb_inst_retire [i]), toString(_("Percent usage of retire interface (rename_unit %d)"),i));
    71 
    72           sum_nb_inst_insert    = "+ nb_inst_insert_"+   toString(i) + " " +sum_nb_inst_insert;
    73           sum_nb_inst_retire    = "+ nb_inst_retire_"+   toString(i) + " " +sum_nb_inst_retire;
    74         }
    75 
    76       _stat->create_expr_average_by_cycle("average_inst_insert"   , sum_nb_inst_insert   , "", _("Average instruction insert by cycle"));
    77       _stat->create_expr_average_by_cycle("average_inst_retire"   , sum_nb_inst_retire   , "", _("Average instruction retire by cycle"));
    78     }
    7955
    8056    {
     
    163139        }
    164140    }
    165 
    166     _stat_nb_inst_commit = _stat->create_variable("nb_inst_commit");
    167     _stat->create_expr_average_by_cycle("average_use_interface_commit","nb_inst_commit", "", _("Average instruction by cycle on commit interface"));
    168     _stat->create_expr_percent         ("percent_use_interface_commit", "average_use_interface_commit", toString(_param->_nb_inst_commit), _("Percent usage of commit interface"));
    169 
    170     _stat_nb_inst_commit_conflit_access = _stat->create_variable("nb_inst_commit_conflit_access");
    171     _stat->create_expr_average_by_cycle("average_use_interface_commit_conflit_access","nb_inst_commit_conflit_access", "", _("Average access conflit by cycle on commit interface"));
    172     _stat->create_expr_percent         ("percent_use_interface_commit_conflit_access","average_use_interface_commit_conflit_access", "average_use_interface_commit", _("Percent access conflit on commit interface"));
    173141
    174142    // bank/queue occupation
     
    192160    }
    193161
     162    _stat_nb_inst_insert         = new counters_t * [_param->_nb_rename_unit];
     163    _stat_nb_inst_retire         = new counters_t * [_param->_nb_rename_unit];
     164    _stat_nb_inst_commit         = new counters_t * [_param->_nb_rename_unit];
     165
     166    std::string average_nb_inst_commit = "0";
     167   
     168    for (uint32_t i=0; i<_param->_nb_rename_unit; i++)
     169      {
     170        _stat_nb_inst_insert [i] = _stat->create_counters("nb_inst_insert_"+toString(i),_param->_nb_inst_insert[i],"",
     171                                                             _("Cycle number with %d instruction(s) included ")+toString(_("(rename_unit %d)."),i),
     172                                                             _("Percent of cycle number with %d instruction(s) included ")+toString(_("(rename_unit %d)."),i),
     173                                                             _("Average of instruction(s) included ")+toString(_("(rename_unit %d)."),i)
     174                                                             );
     175       
     176        _stat_nb_inst_retire [i] = _stat->create_counters("nb_inst_retire_"+toString(i),_param->_nb_inst_retire[i],"",
     177                                                             _("Cycle number with %d instruction(s) removed ")+toString(_("(rename_unit %d)."),i),
     178                                                             _("Percent of cycle number with %d instruction(s) removed ")+toString(_("(rename_unit %d)."),i),
     179                                                             _("Average of instruction(s) removed ")+toString(_("(rename_unit %d)."),i)
     180                                                             );
     181       
     182        _stat_nb_inst_commit [i] = _stat->create_counters("nb_inst_commit_"+toString(i),_param->_nb_inst_commit,"",
     183                                                             _("Cycle number with %d instruction(s) commited ")+toString(_("(rename_unit %d)."),i),
     184                                                             _("Percent of cycle number with %d instruction(s) commited ")+toString(_("(rename_unit %d)."),i),
     185                                                             _("Average of instruction(s) commited "+toString(_("(rename_unit %d)."),i))
     186                                                             );
     187
     188        average_nb_inst_commit = "+ average_nb_inst_commit_"+toString(i) + " " + average_nb_inst_commit;
     189      }
     190
     191    _stat_nb_inst_commit_conflit_access = _stat->create_variable("nb_inst_commit_conflit_access");
     192    _stat->create_expr_average_by_cycle("average_use_interface_commit_conflit_access","nb_inst_commit_conflit_access", "", _("Average access conflit by cycle on commit interface"));
     193    _stat->create_expr_percent         ("percent_use_interface_commit_conflit_access","average_use_interface_commit_conflit_access", average_nb_inst_commit, _("Percent access conflit on commit interface"));
    194194
    195195    log_end(Commit_unit,FUNCTION);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_deallocation.cpp

    r137 r141  
    2727    delete _stat;
    2828
    29     delete [] _stat_nb_inst_insert;
    30     delete [] _stat_nb_inst_retire;
    3129    delete [] _stat_nb_inst_retire_ok;
    3230    delete [] _stat_nb_inst_retire_ko;
     
    4038    delete [] _stat_nb_cycle_state_wait_end      ;
    4139
    42    
     40    delete [] _stat_nb_inst_insert;
     41    delete [] _stat_nb_inst_retire;
     42    delete [] _stat_nb_inst_commit;
     43       
    4344    log_end(Commit_unit,FUNCTION);
    4445  };
  • 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.