Ignore:
Timestamp:
Feb 16, 2010, 1:35:48 PM (14 years ago)
Author:
rosiere
Message:

Various modif (add test, and vhdl)

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

Legend:

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

    r136 r137  
    6666//    _ALLOC2_SIGNAL_IN ( in_INSERT_RENAME_UNIT_ID          ,"rename_unit_id"       ,Tcontext_t        ,_param->_size_rename_unit_id        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    6767      _ALLOC2_SIGNAL_IN ( in_INSERT_DEPTH                   ,"depth"                ,Tdepth_t          ,_param->_size_depth                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     68#ifdef STATISTICS
     69      _ALLOC2_SIGNAL_IN ( in_INSERT_INSTRUCTION             ,"instruction"          ,uint32_t          ,32                                  ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     70#endif
    6871      _ALLOC2_SIGNAL_IN ( in_INSERT_TYPE                    ,"type"                 ,Ttype_t           ,_param->_size_type                  ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    6972      _ALLOC2_SIGNAL_IN ( in_INSERT_OPERATION               ,"operation"            ,Toperation_t      ,_param->_size_operation             ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     
    7679      _ALLOC2_SIGNAL_IN ( in_INSERT_ADDRESS_NEXT            ,"address_next"         ,Taddress_t        ,_param->_size_instruction_address   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    7780      _ALLOC2_SIGNAL_IN ( in_INSERT_EXCEPTION               ,"exception"            ,Texception_t      ,_param->_size_exception             ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    78       _ALLOC2_SIGNAL_IN ( in_INSERT_EXCEPTION_USE           ,"exception_use"        ,Texception_t      ,_param->_size_exception             ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     81      _ALLOC2_SIGNAL_IN ( in_INSERT_EXCEPTION_USE           ,"exception_use"        ,Texception_t      ,_param->_size_exception_use         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    7982      _ALLOC2_SIGNAL_IN ( in_INSERT_STORE_QUEUE_PTR_WRITE   ,"store_queue_ptr_write",Tlsq_ptr_t        ,_param->_size_store_queue_ptr       ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    8083      _ALLOC2_SIGNAL_IN ( in_INSERT_LOAD_QUEUE_PTR_WRITE    ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,_param->_size_load_queue_ptr        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     
    8386      _ALLOC2_SIGNAL_IN ( in_INSERT_NUM_REG_RA_LOG          ,"num_reg_ra_log"       ,Tgeneral_address_t,_param->_size_general_register_logic,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    8487      _ALLOC2_SIGNAL_IN ( in_INSERT_NUM_REG_RA_PHY          ,"num_reg_ra_phy"       ,Tgeneral_address_t,_param->_size_general_register      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     88#endif
    8589      _ALLOC2_SIGNAL_IN ( in_INSERT_READ_RB                 ,"read_rb"              ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     90#ifdef DEBUG
    8691      _ALLOC2_SIGNAL_IN ( in_INSERT_NUM_REG_RB_LOG          ,"num_reg_rb_log"       ,Tgeneral_address_t,_param->_size_general_register_logic,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    8792      _ALLOC2_SIGNAL_IN ( in_INSERT_NUM_REG_RB_PHY          ,"num_reg_rb_phy"       ,Tgeneral_address_t,_param->_size_general_register      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp

    r136 r137  
    3535//      DELETE2_SIGNAL( in_INSERT_RENAME_UNIT_ID          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_rename_unit_id        );
    3636        DELETE2_SIGNAL( in_INSERT_DEPTH                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_depth                 );
     37#ifdef STATISTICS
     38        DELETE2_SIGNAL( in_INSERT_INSTRUCTION             ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],32);
     39#endif
    3740        DELETE2_SIGNAL( in_INSERT_TYPE                    ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_type                  );
    3841        DELETE2_SIGNAL( in_INSERT_OPERATION               ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_operation             );
     
    5255        DELETE2_SIGNAL( in_INSERT_NUM_REG_RA_LOG          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_general_register_logic);
    5356        DELETE2_SIGNAL( in_INSERT_NUM_REG_RA_PHY          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_general_register      );
     57#endif
    5458        DELETE2_SIGNAL( in_INSERT_READ_RB                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
     59#ifdef DEBUG
    5560        DELETE2_SIGNAL( in_INSERT_NUM_REG_RB_LOG          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_general_register_logic);
    5661        DELETE2_SIGNAL( in_INSERT_NUM_REG_RB_PHY          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_general_register      );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_allocation.cpp

    r124 r137  
    5252    _stat_nb_inst_retire_ok      = new counter_t * [_param->_nb_thread];
    5353    _stat_nb_inst_retire_ko      = new counter_t * [_param->_nb_thread];
     54    _stat_nb_inst_instruction    = new counter_t * [NB_INSTRUCTION];
    5455    _stat_nb_inst_type           = new counter_t * [_param->_nb_type];
    5556    _stat_bank_nb_inst           = new counter_t * [_param->_nb_bank];
    56    
     57
    5758    {
    5859      std::string sum_nb_inst_insert    = "0";
     
    129130
    130131      for (uint32_t i=0; i<_param->_nb_type; i++)
    131         if (is_type_valid(i))
     132        if (is_type_valid(i))
    132133          {
    133134            _stat_nb_inst_type [i] = _stat->create_variable("nb_inst_type_"+toString(i));
     
    139140        if (is_type_valid(i))
    140141          {
    141             std::string name = toString(static_cast<type_t>(i)).c_str();
    142 //          _stat->create_expr_average_by_cycle("average_inst_type_"+toString(name), "nb_inst_type_"+toString(i), "", toString(_("Average instruction retire ok by cycle (type %s)"),name.c_str()));
    143             _stat->create_expr_percent         ("percent_inst_type_"+toString(name), "nb_inst_type_"+toString(i), sum_nb_inst_type, toString(_("Percent instruction retire ok by cycle (type %s)"),name.c_str()));
    144           }
     142            std::string name = toString(static_cast<type_t>(i));
     143
     144            _stat->create_expr_percent         ("percent_type_"+toString(name), "nb_inst_type_"+toString(i), sum_nb_inst_type, toString(_("Percent instruction retire ok by cycle (type %s)"),name.c_str()));
     145          }
     146    }
     147
     148    {
     149      std::string sum_nb_inst_instruction = "0";
     150
     151      for (uint32_t i=0; i<NB_INSTRUCTION; i++)
     152        {
     153          _stat_nb_inst_instruction [i] = _stat->create_variable("nb_inst_instruction_"+toString(i));
     154         
     155          sum_nb_inst_instruction = "+ nb_inst_instruction_"+toString(i) + " " +sum_nb_inst_instruction;
     156        }
     157 
     158      for (uint32_t i=0; i<NB_INSTRUCTION; i++)
     159        {
     160          std::string name = toString_instruction(i).c_str();
     161
     162          _stat->create_expr_percent         ("percent_instruction_"+toString(name), "nb_inst_instruction_"+toString(i), sum_nb_inst_instruction, toString(_("Percent instruction retire ok by cycle (instruction %s)"),name.c_str()));
     163        }
    145164    }
    146165
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_deallocation.cpp

    r124 r137  
    3131    delete [] _stat_nb_inst_retire_ok;
    3232    delete [] _stat_nb_inst_retire_ko;
     33    delete [] _stat_nb_inst_instruction;
    3334    delete [] _stat_nb_inst_type;
    3435    delete [] _stat_bank_nb_inst;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp

    r136 r137  
    252252                      entry->rename_unit_id          = x;
    253253                      entry->depth                   = (_param->_have_port_depth)?PORT_READ(in_INSERT_DEPTH [x][y]):0;
     254#ifdef STATISTICS
     255                      entry->instruction             = PORT_READ(in_INSERT_INSTRUCTION           [x][y]);
     256#endif
    254257                      entry->type                    = type;
    255258                      entry->operation               = operation;
     
    266269                      entry->num_reg_ra_log          = PORT_READ(in_INSERT_NUM_REG_RA_LOG        [x][y]);
    267270                      entry->num_reg_ra_phy          = PORT_READ(in_INSERT_NUM_REG_RA_PHY        [x][y]);
     271#endif
    268272                      entry->read_rb                 = PORT_READ(in_INSERT_READ_RB               [x][y]);
     273#ifdef DEBUG
    269274                      entry->num_reg_rb_log          = PORT_READ(in_INSERT_NUM_REG_RB_LOG        [x][y]);
    270275                      entry->num_reg_rb_phy          = PORT_READ(in_INSERT_NUM_REG_RB_PHY        [x][y]);
     
    287292#ifdef DEBUG       
    288293                      entry->address                 = PORT_READ(in_INSERT_ADDRESS               [x][y]);
    289 #else
    290                       entry->address                 = 0; // not necessary
    291294#endif               
    292295                      entry->address_next            = PORT_READ(in_INSERT_ADDRESS_NEXT          [x][y]);
     
    823826                        if (retire_ok)
    824827                          {
    825                             (*_stat_nb_inst_retire_ok [num_thread]) ++;
    826                             (*_stat_nb_inst_type      [type]      ) ++;
     828                            uint32_t instruction = entry->instruction;
     829
     830                            (*_stat_nb_inst_retire_ok   [num_thread] ) ++;
     831                            (*_stat_nb_inst_instruction [instruction]) ++;
     832                            (*_stat_nb_inst_type        [type]       ) ++;
    827833                          }
    828834                        else
     
    10481054                      // Read information
    10491055                      rob_state_t  state        = entry->state;
    1050                       Tdepth_t     depth        = entry->depth;
    1051                      
    1052                       Tdepth_t     depth_min    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN[front_end_id][context_id]):0;
    1053                       Tdepth_t     depth_max    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX[front_end_id][context_id]):0;
    1054                       Tcontrol_t   depth_full   = PORT_READ(in_DEPTH_FULL [front_end_id][context_id]);
     1056//                       Tdepth_t     depth        = entry->depth;
     1057                     
     1058//                       Tdepth_t     depth_min    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN[front_end_id][context_id]):0;
     1059//                       Tdepth_t     depth_max    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX[front_end_id][context_id]):0;
     1060//                       Tcontrol_t   depth_full   = PORT_READ(in_DEPTH_FULL [front_end_id][context_id]);
    10551061                     
    10561062                      // is a valid instruction ?
     
    10881094                     
    10891095                      log_printf(TRACE,Commit_unit,FUNCTION,"    * is_valid        : %d ((depth == depth_min) and not flush)",is_valid);
    1090                       log_printf(TRACE,Commit_unit,FUNCTION,"    * depth           : %d",depth    );
    1091                       log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_min       : %d",depth_min);
    1092                       log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_max       : %d",depth_max);
    1093                       log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_full      : %d",depth_full);
     1096//                       log_printf(TRACE,Commit_unit,FUNCTION,"    * depth           : %d",depth    );
     1097//                       log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_min       : %d",depth_min);
     1098//                       log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_max       : %d",depth_max);
     1099//                       log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_full      : %d",depth_full);
    10941100                      log_printf(TRACE,Commit_unit,FUNCTION,"    * speculative     : %d",speculative);
    10951101                      log_printf(TRACE,Commit_unit,FUNCTION,"    * flush           : %d",flush);
Note: See TracChangeset for help on using the changeset viewer.