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_Front_end/Front_end/Ifetch_unit/Ifetch_queue
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/include/Ifetch_queue.h

    r136 r141  
    5555  private   : counter_t                      * _sum_use_queue_error_wait_rsp;
    5656
    57   private   : counter_t                      * _sum_inst_enable;
    5857  private   : counter_t                      * _sum_transaction_address;
    5958
    60   private   : counter_t                      * _average_occupation_bundle;
     59  private   : counters_t                     * _stat_nb_inst_fetch;
     60   
    6161#endif
    6262
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_function_full_assoc_transition.cpp

    r136 r141  
    5151        // =====[ ADDRESS ]==========================================
    5252        // ==========================================================
     53#ifdef STATISTICS
     54        uint32_t stat_nb_inst_fetch=0;
     55#endif
     56
    5357        if (PORT_READ(in_ADDRESS_VAL) and internal_ADDRESS_ACK)
    5458          {
     
    7074                Tcontrol_t enable = PORT_READ(in_ADDRESS_INSTRUCTION_ENABLE [i]);
    7175#ifdef STATISTICS
    72                 if (usage_is_set(_usage,USE_STATISTICS))
    73                   (*_sum_inst_enable) += enable;
     76                stat_nb_inst_fetch+=enable;
    7477#endif
    7578                _queue[reg_PTR_WRITE]->_instruction_enable [i]      = enable;
     
    8386            reg_PTR_WRITE = (reg_PTR_WRITE+1)%_param->_size_queue;
    8487          }
     88
     89#ifdef STATISTICS
     90        if (usage_is_set(_usage,USE_STATISTICS))
     91          (*_stat_nb_inst_fetch)+=stat_nb_inst_fetch;
     92#endif
     93
    8594
    8695        // ==========================================================
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_function_no_assoc_transition.cpp

    r136 r141  
    5151        // =====[ ADDRESS ]==========================================
    5252        // ==========================================================
     53#ifdef STATISTICS
     54        uint32_t stat_nb_inst_fetch=0;
     55#endif
     56
    5357        if (PORT_READ(in_ADDRESS_VAL) and internal_ADDRESS_ACK)
    5458          {
     
    7074                Tcontrol_t enable = PORT_READ(in_ADDRESS_INSTRUCTION_ENABLE [i]);
    7175#ifdef STATISTICS
    72                 if (usage_is_set(_usage,USE_STATISTICS))
    73                   (*_sum_inst_enable) += enable;
     76                 stat_nb_inst_fetch += enable;
    7477#endif
    7578                _queue[reg_PTR_WRITE]->_instruction_enable [i]      = enable;
     
    8386            reg_PTR_WRITE = (reg_PTR_WRITE+1)%_param->_size_queue;
    8487          }
     88#ifdef STATISTICS
     89        if (usage_is_set(_usage,USE_STATISTICS))
     90          (*_stat_nb_inst_fetch) += stat_nb_inst_fetch;
     91#endif
    8592
    8693        // ==========================================================
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_statistics_allocation.cpp

    r110 r141  
    3434    _sum_use_queue_have_rsp       = _stat->create_variable("sum_use_queue_have_rsp");
    3535    _sum_use_queue_error_wait_rsp = _stat->create_variable("sum_use_queue_error_wait_rsp");
    36     _sum_inst_enable              = _stat->create_variable("sum_inst_enable");
    3736
    38     _average_occupation_bundle    = _stat->create_counter ("average_occupation_bundle", "", "Occupation average of instruction's bundle.");
    39 
    40     _stat->create_expr                 ("average_occupation_bundle" ,"/ sum_inst_enable sum_transaction_address");
    41     _stat->create_expr_percent         ("percent_occupation_bundle" ,"average_occupation_bundle", toString(_param->_nb_instruction),"Percent of instruction's bundle occupation.");
    4237    _stat->create_expr                 ("sum_use_queue"             ,"+ + sum_use_queue_wait_rsp sum_use_queue_have_rsp sum_use_queue_error_wait_rsp");
    4338    _stat->create_expr_average_by_cycle("average_use_queue"               ,"sum_use_queue"               ,"","Average occupation of ifetch queue");
     
    4843
    4944    _stat->create_expr_average         ("average_miss_icache"             ,"+ sum_use_queue_wait_rsp sum_use_queue_error_wait_rsp", "sum_transaction_address", "", "Average Miss Instruction Cache");
     45
     46    _stat_nb_inst_fetch     = _stat->create_counters("nb_inst_fetch",_param->_nb_instruction,"",
     47                                                     _("Number bundle with %d instruction(s)."),
     48                                                     _("Percent of bundle with %d instruction(s)."),
     49                                                     _("Average instruction in a bundle.")
     50                                                     );
    5051
    5152    log_printf(FUNC,Ifetch_queue,FUNCTION,"End");
Note: See TracChangeset for help on using the changeset viewer.