Ignore:
Timestamp:
Dec 10, 2008, 7:31:39 PM (16 years ago)
Author:
rosiere
Message:

Almost complete design
with Test and test platform

File:
1 edited

Legend:

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

    r87 r88  
    2222  void Decod::transition (void)
    2323  {
    24     log_printf(FUNC,Decod,FUNCTION,"Begin");
     24    log_begin(Decod,FUNCTION);
    2525
    2626    if (PORT_READ(in_NRESET) == 0)
    2727      {
    28         reg_CONTEXT_PRIORITY = 0;
     28        _priority->reset();
    2929
    3030        for (uint32_t i=0; i<_param->_nb_context; i++)
     
    3636    else
    3737      {
    38         switch (_param->_priority)
    39           {
    40 //        case PRIORITY_STATIC :
    41 //          {
    42 //            reg_CONTEXT_PRIORITY = (reg_CONTEXT_PRIORITY+_param->_nb_context_select)%_param->_nb_context;
    43 //            break;
    44 //          }
    45           case PRIORITY_ROUND_ROBIN :
    46             {
    47               reg_CONTEXT_PRIORITY = (reg_CONTEXT_PRIORITY+1                         )%_param->_nb_context;
    48               break;
    49             }
    50           default:
    51             {
    52               break;
    53             }
    54           }
    55 
    56         // flush list
    57         select.clear();
    58        
    59         // Compute next scan order !!!
    60         switch (_param->_load_balancing)
    61           {
    62 //        case LOAD_BALANCING_BALANCE :
    63 //          {
    64 //            for (uint32_t j=0; j<_param->_max_nb_inst_fetch; j++)
    65 //              for (uint32_t i=0; i<_param->_nb_context_select; i++)
    66 //                {
    67 //                  uint32_t x=(reg_CONTEXT_PRIORITY+i)%_param->_nb_context;
    68                    
    69 //                  // Test valid inst_fetch
    70 //                  if (j < _param->_nb_inst_fetch[x])
    71 //                    select.push_back(select_t(x,j));
    72 //                }
    73                  
    74 //            break;
    75 //          }
    76           case LOAD_BALANCING_MAXIMUM_FOR_PRIORITY :
    77             {
    78 
    79               for (uint32_t i=0; i<_param->_nb_context_select; i++)
    80                 {
    81                   uint32_t x=(reg_CONTEXT_PRIORITY+i)%_param->_nb_context;
    82                  
    83                   for (uint32_t j=0; j<_param->_nb_inst_fetch[x]; j++)
    84                     select.push_back(select_t(x,j));
    85                 }
    86 
    87               break;
    88             }
    89           default :
    90             {
    91               break;
    92             }
    93           }
     38        _priority->transition();
    9439
    9540        // Compute "next previous" address
     
    9742          if (internal_CONTEXT_HAVE_TRANSACTION[i])
    9843            {
    99 #ifdef STATISTICS
    100               (*_stat_sum_inst_decod) ++;
    101 #endif
    102 
    10344              reg_CONTEXT_ADDRESS_PREVIOUS [i] = internal_CONTEXT_ADDRESS_PREVIOUS [i];
    10445              reg_CONTEXT_IS_DELAY_SLOT    [i] = internal_CONTEXT_IS_DELAY_SLOT    [i];
     
    10748//      for (uint32_t i=0; i<_param->_nb_context; i++)
    10849//        log_printf(TRACE,Decod,FUNCTION,"[%d] %.8x %d",i,reg_CONTEXT_ADDRESS_PREVIOUS [i], reg_CONTEXT_IS_DELAY_SLOT [i]);
     50
     51#ifdef STATISTICS
     52        if (usage_is_set(_usage,USE_STATISTICS))
     53          for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
     54            if (internal_DECOD_VAL [i] and PORT_READ(in_DECOD_ACK[i]))
     55              (*_stat_sum_inst_decod) ++;
     56#endif
    10957      }
    11058
     
    11361#endif
    11462
    115     log_printf(FUNC,Decod,FUNCTION,"End");
     63    log_end(Decod,FUNCTION);
    11664  };
    11765
Note: See TracChangeset for help on using the changeset viewer.