Ignore:
Timestamp:
Oct 20, 2009, 8:52:15 PM (15 years ago)
Author:
rosiere
Message:

1) Add new algo in ifetch queue
2) Add Cancel bit
3) new config

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_multi_fifo_transition.cpp

    r124 r136  
    5151        {
    5252#ifdef STATISTICS
    53           bool find = false;
    54 #endif
     53          uint32_t nb_decod_in = 0;
     54#endif
     55
    5556          for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    5657            if (PORT_READ(in_DECOD_IN_VAL [i]) and internal_DECOD_IN_ACK[i])
    5758              {
    5859                log_printf(TRACE,Decod_queue,FUNCTION,_("  * DECOD_IN  [%d]"),i);
    59                
     60               
     61#ifdef STATISTICS
     62                nb_decod_in ++;
     63#endif
     64 
    6065                // Create entry
    6166                decod_queue_entry_t * entry = new decod_queue_entry_t (1);
    6267                reg_QUEUE[reg_NUM_BANK_TAIL].push_back(entry);
    6368               
    64 #ifdef STATISTICS
    65                 find = true;
    66                 if (usage_is_set(_usage,USE_STATISTICS))
    67                   (*_stat_sum_inst_enable) ++;
    68 #endif
    69 
    7069                Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_DECOD_IN_CONTEXT_ID [i]):0;
    7170
     
    107106
    108107#ifdef STATISTICS
    109           if (usage_is_set(_usage,USE_STATISTICS))
    110             if (find)
    111               (*_stat_sum_transaction_decod_in) ++;
     108        if (usage_is_set(_usage,USE_STATISTICS))
     109          {
     110            if (nb_decod_in > 0)
     111              {
     112                if (nb_decod_in == _param->_nb_inst_decod)
     113                  (*_stat_decode_in_full) ++;
     114                else
     115                  (*_stat_decode_in_average) += nb_decod_in;
     116              }
     117            else
     118              {
     119                (*_stat_decode_in_empty) ++;
     120              }
     121          }
    112122#endif
    113123        }
     
    208218      {
    209219        for (uint32_t i=0; i<_param->_nb_bank; ++i)
    210           *(_stat_use_queue) += reg_QUEUE[i].size();
     220          (*_stat_use_queue) += reg_QUEUE[i].size();
    211221        for (uint32_t i=0; i<_param->_nb_context; i++)
    212           *(_stat_nb_inst [i]) += reg_NB_INST [i];
     222          (*_stat_nb_inst [i]) += reg_NB_INST [i];
    213223      }
    214224#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_one_fifo_transition.cpp

    r123 r136  
    4646        //-----[ DECOD_IN ]---------------------------------------------------
    4747        //-------------------------------------------------------------------- 
     48        {
    4849        decod_queue_entry_t * entry = NULL;
     50
     51#ifdef STATISTICS
     52        uint32_t nb_decod_in = 0;
     53#endif
     54
    4955        for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    5056          {
     
    5864                   entry = new decod_queue_entry_t (_param->_nb_inst_decod);
    5965                   reg_QUEUE->push_back(entry);
    60 
    61 #ifdef STATISTICS
    62                    if (usage_is_set(_usage,USE_STATISTICS))
    63                      (*_stat_sum_transaction_decod_in) ++;
    64 #endif
    6566                 }
    6667
    6768#ifdef STATISTICS
    68                 if (usage_is_set(_usage,USE_STATISTICS))
    69                   (*_stat_sum_inst_enable) ++;
     69                nb_decod_in ++;
    7070#endif
    7171
     
    106106              }
    107107          }
     108
     109#ifdef STATISTICS
     110        if (usage_is_set(_usage,USE_STATISTICS))
     111          {
     112            if (nb_decod_in > 0)
     113              {
     114                if (nb_decod_in == _param->_nb_inst_decod)
     115                  (*_stat_decode_in_full) ++;
     116                else
     117                  (*_stat_decode_in_average) += nb_decod_in;
     118              }
     119            else
     120              {
     121                (*_stat_decode_in_empty) ++;
     122              }
     123          }
     124#endif
     125        }
    108126
    109127        //--------------------------------------------------------------------
     
    217235    if (usage_is_set(_usage,USE_STATISTICS))
    218236      {
    219         *(_stat_use_queue) += reg_QUEUE->size();
     237        (*_stat_use_queue) += reg_QUEUE->size();
    220238        for (uint32_t i=0; i<_param->_nb_context; i++)
    221           *(_stat_nb_inst [i]) += reg_NB_INST [i];
     239          (*_stat_nb_inst [i]) += reg_NB_INST [i];
    222240      }
    223241#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_statistics_allocation.cpp

    r110 r136  
    1717namespace decod_queue {
    1818
    19 
    2019#undef  FUNCTION
    2120#define FUNCTION "Decod_queue::statistics_allocation"
     
    2928                      param_statistics);
    3029
    31     _stat_sum_transaction_decod_in = _stat->create_variable("sum_transaction_decod_in");
    32     _stat_sum_inst_enable          = _stat->create_variable("sum_inst_enable");
    33     _stat_average_occupation_bundle= _stat->create_counter ("average_occupation_bundle", "", "Occupation average of instruction's bundle.");
     30    _stat_decode_in_empty          = _stat->create_counter ("decode_in_empty"  , "", "Number cycle with no input instruction.");
     31    _stat_decode_in_full           = _stat->create_counter ("decode_in_full"   , "", toString("Number cycle with full input instruction (%d).",_param->_nb_inst_decod));
     32    _stat_decode_in_average        = _stat->create_counter ("decode_in_average", "", "Average decod instruction.");
    3433
    35     _stat->create_expr                 ("average_occupation_bundle" ,"/ sum_inst_enable sum_transaction_decod_in");
    36     _stat->create_expr_percent         ("percent_occupation_bundle" ,"average_occupation_bundle", toString(_param->_nb_inst_decod),"Percent of instruction's bundle occupation.");
     34    _stat->create_expr_average_by_cycle("average_decod_in", toString("+ * decode_in_full %d decode_in_average",_param->_nb_inst_decod), "", "Average instruction from decode unit");
     35    _stat->create_expr_percent         ("percent_decod_in" ,"average_decod_in", toString(_param->_nb_inst_decod),"Percent of instruction's bundle occupation.");
    3736
    3837    _stat_use_queue = _stat->create_variable ("use_queue");
Note: See TracChangeset for help on using the changeset viewer.