Ignore:
Timestamp:
Aug 4, 2010, 10:09:03 PM (14 years ago)
Author:
rosiere
Message:

1) Full parallel compilation
2) Add statistics in ROB : list instruction affinity

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

Legend:

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

    r88 r142  
    2727                                        $(Behavioural_LIBRARY) 
    2828
    29 Commit_unit_DIR_LIBRARY         =       -L$(Commit_unit_DIR)/lib        \
    30                                         $(Priority_DIR_LIBRARY)         \
    31                                         $(Behavioural_DIR_LIBRARY)
    32 
    3329#-----[ Rules ]--------------------------------------------
    3430
    35 Commit_unit_library             :
     31Commit_unit_library_only        :
     32                                @\
     33                                $(MAKE) --directory=$(Commit_unit_DIR) --makefile=Makefile;
     34
     35Commit_unit_library_clean_only  :
     36                                @\
     37                                $(MAKE) --directory=$(Commit_unit_DIR) --makefile=Makefile clean;
     38
     39Commit_unit_library             : Commit_unit_library_only
    3640                                @\
    3741                                $(MAKE) Behavioural_library;            \
    38                                 $(MAKE) Priority_library;               \
    39                                 $(MAKE) --directory=$(Commit_unit_DIR) --makefile=Makefile;
     42                                $(MAKE) Priority_library;
    4043
    41 Commit_unit_library_clean       :
     44Commit_unit_library_clean       : Commit_unit_library_clean_only
    4245                                @\
    4346                                $(MAKE) Behavioural_library_clean;      \
    44                                 $(MAKE) Priority_library_clean;         \
    45                                 $(MAKE) --directory=$(Commit_unit_DIR) --makefile=Makefile clean;
     47                                $(MAKE) Priority_library_clean;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h

    r141 r142  
    3535namespace morpheo {
    3636namespace behavioural {
    37 
    3837namespace core {
    3938namespace multi_ooo_engine {
     
    4140namespace commit_unit {
    4241
     42#ifdef STATISTICS
     43  typedef std::map<uint32_t,uint32_t> stat_inst_fusion_t;
     44#endif
    4345
    4446  class Commit_unit
     
    7173  public    : counter_t                     ** _stat_nb_cycle_state_event         ;//[nb_thread]
    7274  public    : counter_t                     ** _stat_nb_cycle_state_wait_end      ;//[nb_thread]
     75
     76// public    : uint32_t                       * _stat_last_inst                    ;//[nb_thread]
     77  public    : uint32_t                       * _stat_last_inst_type               ;//[nb_thread]
     78  public    : uint32_t                       * _stat_last_inst_operation          ;//[nb_thread]
     79  public    : stat_inst_fusion_t             * _stat_inst_fusion                  ;//[nb_thread]
    7380#endif
    7481
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_allocation.cpp

    r141 r142  
    88
    99#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h"
     10#include "Behavioural/include/Allocation.h"
    1011
    1112namespace morpheo {
     
    169170      {
    170171        _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                                                              );
     172                                                          _("Cycle number with %d instruction(s) included ")+toString(_("(rename_unit %d)."),i),
     173                                                          _("Percent of cycle number with %d instruction(s) included ")+toString(_("(rename_unit %d)."),i),
     174                                                          _("Average of instruction(s) included ")+toString(_("(rename_unit %d)."),i)
     175                                                          );
    175176       
    176177        _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                                                              );
     178                                                          _("Cycle number with %d instruction(s) removed ")+toString(_("(rename_unit %d)."),i),
     179                                                          _("Percent of cycle number with %d instruction(s) removed ")+toString(_("(rename_unit %d)."),i),
     180                                                          _("Average of instruction(s) removed ")+toString(_("(rename_unit %d)."),i)
     181                                                          );
    181182       
    182183        _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                                                              );
     184                                                          _("Cycle number with %d instruction(s) commited ")+toString(_("(rename_unit %d)."),i),
     185                                                          _("Percent of cycle number with %d instruction(s) commited ")+toString(_("(rename_unit %d)."),i),
     186                                                          _("Average of instruction(s) commited ")+toString(_("(rename_unit %d)."),i)
     187                                                          );
    187188
    188189        average_nb_inst_commit = "+ average_nb_inst_commit_"+toString(i) + " " + average_nb_inst_commit;
     
    192193    _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"));
    193194    _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"));
     195
     196
     197//  ALLOC1(_stat_last_inst          ,uint32_t          ,_param->_nb_thread);
     198    ALLOC1(_stat_last_inst_type     ,uint32_t          ,_param->_nb_thread);
     199    ALLOC1(_stat_last_inst_operation,uint32_t          ,_param->_nb_thread);
     200    ALLOC1(_stat_inst_fusion        ,stat_inst_fusion_t,_param->_nb_thread);
     201
     202    for (uint32_t i=0; i<_param->_nb_thread; ++i)
     203      {
     204      //_stat_last_inst           [i] = INSTRUCTION_L_NOP;
     205        _stat_last_inst_type      [i] = instruction_information(INSTRUCTION_L_NOP)._type     ;
     206        _stat_last_inst_operation [i] = instruction_information(INSTRUCTION_L_NOP)._operation;
     207      }
    194208
    195209    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

    r141 r142  
    88
    99#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h"
     10#include "Behavioural/include/Allocation.h"
     11#include "Common/include/BitManipulation.h"
    1012
    1113namespace morpheo {
     
    4143    delete [] _stat_nb_inst_retire;
    4244    delete [] _stat_nb_inst_commit;
     45
     46//  uint32_t mask_inst      = gen_mask<uint32_t>(SIZE_INSTRUCTION);
     47    uint32_t mask_type      = gen_mask<uint32_t>(SIZE_TYPE       );
     48    uint32_t mask_operation = gen_mask<uint32_t>(SIZE_OPERATION  );
     49
     50    for (uint32_t i=0; i<_param->_nb_thread; ++i)
     51      for(stat_inst_fusion_t::iterator it = _stat_inst_fusion [i].begin();
     52          it != _stat_inst_fusion [i].end();
     53          ++it)
     54        {
     55          uint32_t value = it->second;
     56
     57          if (value != 0)
     58            {
     59              uint32_t inst = it->first;
     60
     61              type_t   type_0      = static_cast<type_t>((inst>>(SIZE_TYPE+2*SIZE_OPERATION))&mask_type     );
     62              uint32_t operation_0 =                     (inst>>(SIZE_TYPE+  SIZE_OPERATION))&mask_operation ;
     63              type_t   type_1      = static_cast<type_t>((inst>>(            SIZE_OPERATION))&mask_type     );
     64              uint32_t operation_1 =                      inst                               &mask_operation ;
     65
     66              // log_printf(STAT,Commit_unit,FUNCTION,
     67              msgInformation(
     68                           //"  * %s - %s : %d\n"
     69                           //,toString_instruction((inst>>SIZE_INSTRUCTION)&mask_inst).c_str()
     70                           //,toString_instruction( inst                   &mask_inst).c_str(),value
     71                             "  * %s.%s - %s.%s : %d\n"
     72                             ,toString          (type_0            ).c_str()
     73                             ,toString_operation(type_0,operation_0).c_str()
     74                             ,toString          (type_1            ).c_str()
     75                             ,toString_operation(type_1,operation_1).c_str()
     76                             ,value
     77                             );
     78            }
     79        }
     80
     81 // DELETE1(_stat_last_inst          ,_param->_nb_thread);
     82    DELETE1(_stat_last_inst_type     ,_param->_nb_thread);
     83    DELETE1(_stat_last_inst_operation,_param->_nb_thread);
     84    DELETE1(_stat_inst_fusion        ,_param->_nb_thread);
    4385       
    4486    log_end(Commit_unit,FUNCTION);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp

    r141 r142  
    770770                    can_continue = true;
    771771
    772                     Tcontext_t  front_end_id = entry->front_end_id;
    773                     Tcontext_t  context_id   = entry->context_id  ;
    774                     uint32_t    num_thread   = _param->_translate_num_context_to_num_thread [front_end_id][context_id];
    775                     rob_state_t state        = entry->state_old;
    776                     Ttype_t     type         = entry->type        ;
    777                     bool        retire_ok    = false;
    778                     uint32_t    packet_id    = ((entry->ptr << _param->_shift_num_slot) | num_bank);
     772                    Tcontext_t   front_end_id = entry->front_end_id;
     773                    Tcontext_t   context_id   = entry->context_id  ;
     774                    uint32_t     num_thread   = _param->_translate_num_context_to_num_thread [front_end_id][context_id];
     775                    rob_state_t  state        = entry->state_old;
     776                    Ttype_t      type         = entry->type        ;
     777                    Toperation_t operation    = entry->operation   ;
     778                    bool         retire_ok    = false;
     779                    uint32_t     packet_id    = ((entry->ptr << _param->_shift_num_slot) | num_bank);
    779780                   
    780781                    log_printf(TRACE,Commit_unit,FUNCTION,"    * front_end_id : %d",front_end_id );
     
    875876                            (*_stat_nb_inst_instruction [instruction]) ++;
    876877                            (*_stat_nb_inst_type        [type]       ) ++;
     878
     879                          //uint32_t index = (_stat_last_inst [num_thread] << SIZE_INSTRUCTION) | instruction;
     880                            uint32_t index = ((_stat_last_inst_type      [num_thread] << (SIZE_TYPE+2*SIZE_OPERATION)) |
     881                                              (_stat_last_inst_operation [num_thread] << (SIZE_TYPE+  SIZE_OPERATION)) |
     882                                              (                type                   << (            SIZE_OPERATION)) |
     883                                              (                operation                                             ));
     884
     885                            _stat_inst_fusion [num_thread][index] ++;
     886                           
     887                          //_stat_last_inst           [num_thread] = instruction;
     888                            _stat_last_inst_type      [num_thread] = type       ;
     889                            _stat_last_inst_operation [num_thread] = operation  ;
    877890                          }
    878891                        else
     
    893906                          << "{" << ((retire_ok)?"OK":"KO") << "} ";
    894907                       
    895                         if ((type == TYPE_MEMORY) and  is_operation_memory_load(entry->operation))
     908                        if ((type == TYPE_MEMORY) and  is_operation_memory_load(operation))
    896909                          instruction_log_file [num_thread] << std::hex << entry->load_data << std::dec;
    897910                       
Note: See TracChangeset for help on using the changeset viewer.