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

Almost complete design
with Test and test platform

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

Legend:

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

    r87 r88  
    3939
    4040    usage_environment(_usage);
     41
     42#if DEBUG_Decod_queue == true
     43    log_printf(INFO,Decod_queue,FUNCTION,_("<%s> Parameters"),_name.c_str());
     44
     45    std::cout << *param << std::endl;
     46#endif   
    4147
    4248    log_printf(INFO,Decod_queue,FUNCTION,_("Allocation"));
     
    98104        for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    99105          sensitive << (*(in_DECOD_OUT_ACK [i]));
    100         if (_param->_have_port_depth)
    101106          for (uint32_t i=0; i<_param->_nb_context; i++)
    102             sensitive << (*(in_DEPTH_TAIL      [i]))
    103                       << (*(in_DEPTH_NB_BRANCH [i]));
     107            {
     108              if (_param->_have_port_depth)
     109              sensitive << (*(in_DEPTH_MIN [i]));
     110              sensitive << (*(in_DEPTH_MAX [i]));
     111            }
    104112
    105113# ifdef SYSTEMCASS_SPECIFIC
     
    108116          {
    109117            (*(out_DECOD_OUT_VAL [i])) (*(in_DECOD_OUT_ACK [i]));
    110             if (_param->_have_port_depth)
    111               for (uint32_t j=0; j<_param->_nb_context; j++)
    112                 {
    113                   (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_TAIL      [j]));
    114                   (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_NB_BRANCH [j]));
    115                 }
     118            for (uint32_t j=0; j<_param->_nb_context; j++)
     119              {
     120                if (_param->_have_port_depth)
     121                (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_MIN [j]));
     122                (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_MAX [j]));
     123              }
    116124          }
    117125# endif   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_allocation.cpp

    r82 r88  
    6565      ALLOC1_SIGNAL_IN ( in_DECOD_IN_TYPE           ,"type"         ,Ttype_t            ,_param->_size_type                  );
    6666      ALLOC1_SIGNAL_IN ( in_DECOD_IN_OPERATION      ,"operation"    ,Toperation_t       ,_param->_size_operation             );
     67      ALLOC1_SIGNAL_IN ( in_DECOD_IN_NO_EXECUTE     ,"no_execute"   ,Tcontrol_t         ,1                                   );
    6768      ALLOC1_SIGNAL_IN ( in_DECOD_IN_IS_DELAY_SLOT  ,"is_delay_slot",Tcontrol_t         ,1                                   );
    6869      ALLOC1_SIGNAL_IN ( in_DECOD_IN_ADDRESS        ,"address"      ,Tgeneral_data_t    ,_param->_size_general_data          );
     
    8081      ALLOC1_SIGNAL_IN ( in_DECOD_IN_NUM_REG_RE     ,"num_reg_re"   ,Tspecial_address_t ,_param->_size_special_register_logic);
    8182      ALLOC1_SIGNAL_IN ( in_DECOD_IN_EXCEPTION_USE  ,"exception_use",Texception_t       ,_param->_size_exception_use         );
     83      ALLOC1_SIGNAL_IN ( in_DECOD_IN_EXCEPTION      ,"exception"    ,Texception_t       ,_param->_size_exception_decod       );
    8284    }
    8385
     
    9294      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_TYPE           ,"type"         ,Ttype_t            ,_param->_size_type                  );
    9395      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_OPERATION      ,"operation"    ,Toperation_t       ,_param->_size_operation             );
     96      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_NO_EXECUTE     ,"no_execute"   ,Tcontrol_t         ,1                                   );
    9497      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_IS_DELAY_SLOT  ,"is_delay_slot",Tcontrol_t         ,1                                   );
    9598      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_ADDRESS        ,"address"      ,Tgeneral_data_t    ,_param->_size_general_data          );
     
    107110      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_NUM_REG_RE     ,"num_reg_re"   ,Tspecial_address_t ,_param->_size_special_register_logic);
    108111      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_EXCEPTION_USE  ,"exception_use",Texception_t       ,_param->_size_exception_use         );
     112      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_EXCEPTION      ,"exception"    ,Texception_t       ,_param->_size_exception_decod       );
    109113    }
    110114
     
    113117      ALLOC1_INTERFACE("depth",IN ,NORTH,"Depth", _param->_nb_context);
    114118
    115       ALLOC1_SIGNAL_IN ( in_DEPTH_TAIL     ,"tail"     ,Tdepth_t           ,_param->_size_depth  );
    116       if (_param->_have_port_depth)
    117       ALLOC1_SIGNAL_IN ( in_DEPTH_NB_BRANCH,"nb_branch",Tdepth_t           ,_param->_size_depth+1);
     119      ALLOC1_SIGNAL_IN ( in_DEPTH_MIN      ,"min"      ,Tdepth_t           ,_param->_size_depth  );
     120      ALLOC1_SIGNAL_IN ( in_DEPTH_MAX      ,"max"      ,Tdepth_t           ,_param->_size_depth+1);
    118121    }
    119122
    120     // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
     123    // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
    121124    {
    122125      ALLOC1_INTERFACE("nb_inst",OUT,NORTH,"Instruction's number", _param->_nb_context);
    123126
    124       ALLOC1_SIGNAL_OUT(out_NB_INST_ALL    ,"all"      ,Tcontext_t         ,_param->_size_nb_inst+1);
     127      ALLOC1_SIGNAL_OUT(out_NB_INST_ALL    ,"all"      ,Tcontext_t         ,_param->_size_nb_inst_decod);
    125128    }
    126129
     130    if (usage_is_set(_usage,USE_SYSTEMC))
     131      {
    127132    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    128133    reg_QUEUE              = new std::list<decod_queue_entry_t*>;
     
    133138    internal_DECOD_OUT_VAL = new Tcontrol_t [_param->_nb_inst_decod];
    134139    internal_DECOD_OUT_ACK = new Tcontrol_t [_param->_nb_inst_decod];
     140      }
    135141   
    136142    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_deallocation.cpp

    r82 r88  
    3535        DELETE1_SIGNAL( in_DECOD_IN_TYPE           ,_param->_nb_inst_decod,_param->_size_type                  );
    3636        DELETE1_SIGNAL( in_DECOD_IN_OPERATION      ,_param->_nb_inst_decod,_param->_size_operation             );
     37        DELETE1_SIGNAL( in_DECOD_IN_NO_EXECUTE     ,_param->_nb_inst_decod,1                                   );
    3738        DELETE1_SIGNAL( in_DECOD_IN_IS_DELAY_SLOT  ,_param->_nb_inst_decod,1                                   );
    3839        DELETE1_SIGNAL( in_DECOD_IN_ADDRESS        ,_param->_nb_inst_decod,_param->_size_general_data          );
     
    5051        DELETE1_SIGNAL( in_DECOD_IN_NUM_REG_RE     ,_param->_nb_inst_decod,_param->_size_special_register_logic);
    5152        DELETE1_SIGNAL( in_DECOD_IN_EXCEPTION_USE  ,_param->_nb_inst_decod,_param->_size_exception_use         );
     53        DELETE1_SIGNAL( in_DECOD_IN_EXCEPTION      ,_param->_nb_inst_decod,_param->_size_exception             );
    5254       
    5355        DELETE1_SIGNAL(out_DECOD_OUT_VAL           ,_param->_nb_inst_decod,1);
     
    5759        DELETE1_SIGNAL(out_DECOD_OUT_TYPE          ,_param->_nb_inst_decod,_param->_size_type                  );
    5860        DELETE1_SIGNAL(out_DECOD_OUT_OPERATION     ,_param->_nb_inst_decod,_param->_size_operation             );
     61        DELETE1_SIGNAL(out_DECOD_OUT_NO_EXECUTE    ,_param->_nb_inst_decod,1                                   );
    5962        DELETE1_SIGNAL(out_DECOD_OUT_IS_DELAY_SLOT ,_param->_nb_inst_decod,1                                   );
    6063        DELETE1_SIGNAL(out_DECOD_OUT_ADDRESS       ,_param->_nb_inst_decod,_param->_size_general_data          );
     
    7275        DELETE1_SIGNAL(out_DECOD_OUT_NUM_REG_RE    ,_param->_nb_inst_decod,_param->_size_special_register_logic);
    7376        DELETE1_SIGNAL(out_DECOD_OUT_EXCEPTION_USE ,_param->_nb_inst_decod,_param->_size_exception_use         );
     77        DELETE1_SIGNAL(out_DECOD_OUT_EXCEPTION     ,_param->_nb_inst_decod,_param->_size_exception             );
    7478       
    75         DELETE1_SIGNAL( in_DEPTH_TAIL     ,_param->_nb_context,_param->_size_depth  );
    76         if (_param->_have_port_depth)
    77         DELETE1_SIGNAL( in_DEPTH_NB_BRANCH,_param->_nb_context,_param->_size_depth+1);
     79        DELETE1_SIGNAL( in_DEPTH_MIN               ,_param->_nb_context,_param->_size_depth  );
     80        DELETE1_SIGNAL( in_DEPTH_MAX               ,_param->_nb_context,_param->_size_depth+1);
    7881
    79         DELETE1_SIGNAL(out_NB_INST_ALL    ,_param->_nb_context,_param->_size_nb_inst+1);
     82        DELETE1_SIGNAL(out_NB_INST_ALL             ,_param->_nb_context,_param->_size_nb_inst_decod);
     83
     84        // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     85        delete    reg_QUEUE;
     86        delete [] reg_NB_INST;
     87       
     88        // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     89        delete [] internal_DECOD_IN_ACK ;
     90        delete [] internal_DECOD_OUT_VAL;
     91        delete [] internal_DECOD_OUT_ACK;
    8092      }
    81     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    82     delete    reg_QUEUE;
    83     delete [] reg_NB_INST;
    84    
    85     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    86     delete [] internal_DECOD_IN_ACK ;
    87     delete [] internal_DECOD_OUT_VAL;
    88     delete [] internal_DECOD_OUT_ACK;
    8993
    9094    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMealy_decod_out.cpp

    r82 r88  
    2323  {
    2424    log_begin(Decod_queue,FUNCTION);
     25    log_function(Decod_queue,FUNCTION,_name.c_str());
    2526
    2627    Tcontrol_t val [_param->_nb_inst_decod];
     
    3637        if (reg_QUEUE->front()->_val [i])
    3738          {
    38             log_printf(TRACE,Decod_queue,FUNCTION,_("Queue is not empty, slot [%d] is valid."),i);
     39            log_printf(TRACE,Decod_queue,FUNCTION,_("  * Queue is not empty, slot [%d] is valid."),i);
    3940
    4041            Tcontext_t context         = reg_QUEUE->front()->_context_id    [i];
    4142            Tdepth_t   depth           = reg_QUEUE->front()->_depth         [i];
    42             Tdepth_t   depth_base      = (_param->_have_port_depth)?PORT_READ(in_DEPTH_TAIL      [context]):0;
    43             Tdepth_t   depth_offset    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_NB_BRANCH [context]):0;
    44             Tdepth_t   depth_max       = depth_base + depth_offset;
     43            Tdepth_t   depth_min       = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [context]):0;
     44            Tdepth_t   depth_max       = PORT_READ(in_DEPTH_MAX[context]);
    4545
    4646            // is a valid instruction ?
    47             //  * depth must be lower that depth max
    48             Tcontrol_t is_valid        = depth <= ((depth>depth_base)?(depth_max):(depth_max%_param->_nb_branch_speculated [context]));
     47            // If DEPTH_CURRENT :
     48            // equal at     DEPTH_MIN            -> not speculative
     49            // not include ]DEPTH_MIN:DEPTH_MAX[ -> previous branch miss
     50            //     include ]DEPTH_MIN:DEPTH_MAX[ -> speculative
    4951
    50             log_printf(TRACE,Decod_queue,FUNCTION,_("  * is_valid : %d"),is_valid);
     52            // All case
     53            // ....... min ...X... max ....... OK
     54            // ....... min ....... max ...X... KO
     55            // ...X... min ....... max ....... KO
     56            // ....... max ....... min ...X... OK
     57            // ...X... max ....... min ....... OK
     58            // ....... max ...X... min ....... KO
     59
     60            Tcontrol_t is_valid        = ((depth == depth_min) or
     61                                          ((depth_min < depth_max)?
     62                                           (depth<depth_max):
     63                                           ((depth > depth_min) or (depth < depth_max))));
     64//          Tcontrol_t is_valid        = depth <= depth_max;
     65
     66            log_printf(TRACE,Decod_queue,FUNCTION,_("    * is_valid : %d"),is_valid);
    5167
    5268            internal_DECOD_OUT_VAL [i] = 1; // in all case, val is set (entry is not empty, and instruction is valid)
     
    6581    for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    6682      {
     83        log_printf(TRACE,Decod_queue,FUNCTION,_("  * DECOD_OUT_VAL : %d"),val [i]);
     84
    6785        PORT_WRITE(out_DECOD_OUT_VAL [i],val [i]);
    6886      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMoore.cpp

    r82 r88  
    2323  {
    2424    log_begin(Decod_queue,FUNCTION);
     25    log_function(Decod_queue,FUNCTION,_name.c_str());
    2526
    2627    //--------------------------------------------------------------------
     
    4950          PORT_WRITE(out_DECOD_OUT_TYPE          [i],reg_QUEUE->front()->_type          [i]);
    5051          PORT_WRITE(out_DECOD_OUT_OPERATION     [i],reg_QUEUE->front()->_operation     [i]);
     52          PORT_WRITE(out_DECOD_OUT_NO_EXECUTE    [i],reg_QUEUE->front()->_no_execute    [i]);
    5153          PORT_WRITE(out_DECOD_OUT_IS_DELAY_SLOT [i],reg_QUEUE->front()->_is_delay_slot [i]);
    5254          PORT_WRITE(out_DECOD_OUT_ADDRESS       [i],reg_QUEUE->front()->_address       [i]);
     
    6466          PORT_WRITE(out_DECOD_OUT_NUM_REG_RE    [i],reg_QUEUE->front()->_num_reg_re    [i]);
    6567          PORT_WRITE(out_DECOD_OUT_EXCEPTION_USE [i],reg_QUEUE->front()->_exception_use [i]);
     68          PORT_WRITE(out_DECOD_OUT_EXCEPTION     [i],reg_QUEUE->front()->_exception     [i]);
    6669        }
    6770
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_statistics_allocation.cpp

    r82 r88  
    2929                      param_statistics);
    3030
    31     _stat_nb_inst = new counter_t * [_param->_nb_context];
     31    _stat_use_queue = _stat->create_variable ("use_queue");
     32    _stat_nb_inst   = new counter_t * [_param->_nb_context];
    3233
    3334    std::string expr_average_inst = "";
     
    3536    for (uint32_t i=0; i<_param->_nb_context; i++)
    3637      {
    37         _stat_nb_inst [i] = _stat->create_variable("nb_inst_"+toString(i));
    38        
    39         _stat->create_expr_average_by_cycle("average_inst_"+toString(i), "nb_inst_"+toString(i), "", toString(_("Average instruction by cycle (context %d)"),i));
    40         _stat->create_expr_percent         ("percent_use_inst_"+toString(i) , "average_inst_"+toString(i), toString(_param->_size_queue), toString(_("Percent instruction by cycle (context %d)"),i));
    41 
    42         if (i == 0)
    43           expr_average_inst = "nb_inst_"+toString(i);
     38        _stat_nb_inst [i] = _stat->create_variable("nb_inst_"+toString(i));
     39       
     40        _stat->create_expr_average_by_cycle("average_inst_"+toString(i), "nb_inst_"+toString(i), "", toString(_("Average instruction number in decod_queue by cycle (context %d)"),i));
     41        _stat->create_expr_percent         ("percent_use_inst_"+toString(i) , "average_inst_"+toString(i), toString(_param->_size_queue), toString(_("Percent decod_queue's occupation (context %d)"),i));
     42       
     43        if (i == 0)
     44          expr_average_inst = "nb_inst_"+toString(i);
    4445        else
    4546          expr_average_inst = "+ nb_inst_"+toString(i) + " " +expr_average_inst;
    4647      }
    4748
    48     _stat->create_expr_average_by_cycle("average_inst", expr_average_inst, "", _("Average instruction by cycle (all context)"));
    49     _stat->create_expr_percent         ("percent_use_inst" , "average_inst", toString(_param->_size_queue), _("Percent instruction by cycle (all context)"));
     49    _stat->create_expr_average_by_cycle("average_inst", expr_average_inst, "", _("Average instruction number in decod_queue by cycle (all context)"));
     50    _stat->create_expr_percent         ("percent_use_inst" , "average_inst", toString(_param->_size_queue), _("Percent decod_queue's occupation (all context)"));
     51   
     52    _stat->create_expr_average_by_cycle("average_use_queue", "use_queue", "", _("Average slot decod_queue occupation by cycle."));
     53    _stat->create_expr_percent         ("percent_use_queue", "average_use_queue", toString(_param->_size_queue), _("Percent slot decod_queue occupation."));
    5054   
    5155    log_end(Decod_queue,FUNCTION);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_transition.cpp

    r87 r88  
    2323  {
    2424    log_begin(Decod_queue,FUNCTION);
     25    log_function(Decod_queue,FUNCTION,_name.c_str());
    2526
    2627    if (PORT_READ(in_NRESET) == 0)
     
    3536        //--------------------------------------------------------------------
    3637        //-----[ DECOD_IN ]---------------------------------------------------
    37         //--------------------------------------------------------------------
    38         for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
     38        //-------------------------------------------------------------------- 
     39        decod_queue_entry_t * entry = NULL;
     40        for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    3941          {
    40             decod_queue_entry_t * entry = NULL;
    4142            if (PORT_READ(in_DECOD_IN_VAL [i]) and internal_DECOD_IN_ACK[i])
    4243              {
    43                 log_printf(TRACE,Decod_queue,FUNCTION,_("DECOD_IN  [%d]"),i);
     44                log_printf(TRACE,Decod_queue,FUNCTION,_("  * DECOD_IN  [%d]"),i);
    4445
    4546                if (entry == NULL)
    46                   entry = new decod_queue_entry_t (_param->_nb_inst_decod);
     47                 {
     48                   // Once creation and insert in queue
     49                   entry = new decod_queue_entry_t (_param->_nb_inst_decod);
     50                   reg_QUEUE->push_back(entry);
     51                 }
    4752
    4853                Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_DECOD_IN_CONTEXT_ID [i]):0;
    4954
    50                 log_printf(TRACE,Decod_queue,FUNCTION,_("  * context : %d"),context);
     55                log_printf(TRACE,Decod_queue,FUNCTION,_("    * context : %d"),context);
    5156
    5257                entry->_val           [i] = 1;
     
    5560                entry->_type          [i] = PORT_READ(in_DECOD_IN_TYPE          [i]);
    5661                entry->_operation     [i] = PORT_READ(in_DECOD_IN_OPERATION     [i]);
     62                entry->_no_execute    [i] = PORT_READ(in_DECOD_IN_NO_EXECUTE    [i]);
    5763                entry->_is_delay_slot [i] = PORT_READ(in_DECOD_IN_IS_DELAY_SLOT [i]);
    5864                entry->_address       [i] = PORT_READ(in_DECOD_IN_ADDRESS       [i]);
     
    7076                entry->_num_reg_re    [i] = PORT_READ(in_DECOD_IN_NUM_REG_RE    [i]);
    7177                entry->_exception_use [i] = PORT_READ(in_DECOD_IN_EXCEPTION_USE [i]);
     78                entry->_exception     [i] = PORT_READ(in_DECOD_IN_EXCEPTION     [i]);
    7279
    7380                reg_NB_INST [context] ++;
    74                 reg_QUEUE->push_back(entry);
    7581
    76                 log_printf(TRACE,Decod_queue,FUNCTION,_("  * nb_inst : %d"),reg_NB_INST [context]);
    77                 log_printf(TRACE,Decod_queue,FUNCTION,_("  * PUSH queue"));
     82                log_printf(TRACE,Decod_queue,FUNCTION,_("    * nb_inst : %d"),reg_NB_INST [context]);
     83                log_printf(TRACE,Decod_queue,FUNCTION,_("    * PUSH queue"));
    7884              }
    7985          }
     
    9197                if (internal_DECOD_OUT_VAL [i] and internal_DECOD_OUT_ACK[i])
    9298                  {
    93                     log_printf(TRACE,Decod_queue,FUNCTION,_("DECOD_OUT [%d]"),i);
     99                    log_printf(TRACE,Decod_queue,FUNCTION,_("  * DECOD_OUT [%d]"),i);
    94100               
    95101                    reg_QUEUE->front()->_val [i] = 0;
    96102
    97103                    Tcontext_t context = reg_QUEUE->front()->_context_id [i];
    98                     log_printf(TRACE,Decod_queue,FUNCTION,_("  * context : %d"),context);
     104                    log_printf(TRACE,Decod_queue,FUNCTION,_("    * context : %d"),context);
    99105                   
    100106                    reg_NB_INST [context] --;
    101                     log_printf(TRACE,Decod_queue,FUNCTION,_("  * nb_inst : %d"),reg_NB_INST [context]);
     107                    log_printf(TRACE,Decod_queue,FUNCTION,_("    * nb_inst : %d"),reg_NB_INST [context]);
    102108                  }
    103109                // Test if slot is (again) valid, if yes, then have less one instruction in the entry
     
    108114            if (not find) // no valid instruction in current slot
    109115              {
    110                 log_printf(TRACE,Decod_queue,FUNCTION,_("  * POP  queue"));
     116                log_printf(TRACE,Decod_queue,FUNCTION,_("    * POP  queue"));
    111117
    112118                // can pop the slot
     
    117123      }
    118124
    119 #if (DEBUG >= DEBUG_TRACE) and (DEBUG_Decod_queue)
     125#if defined(DEBUG) and defined(DEBUG_Decod_queue) and (DEBUG >= DEBUG_TRACE)
     126    log_printf(TRACE,Decod_queue,FUNCTION,"  * Dump decod_queue");
    120127    uint32_t x=0;
    121128    for (std::list<decod_queue_entry_t*>::iterator it=reg_QUEUE->begin();
     
    123130         it++)
    124131      {
    125         log_printf(TRACE,Decod_queue,FUNCTION,"[%d] ",x);
     132        log_printf(TRACE,Decod_queue,FUNCTION,"    * [%d] ",x);
    126133
    127134        for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    128135          {
    129136            if ((*it)->_val [i])
    130               log_printf(TRACE,Decod_queue,FUNCTION," * [%d] %d, %d %d, %d %d %d, 0x%x, %d 0x%x, %d %d, %d %d, %d %d, %d %d, %d %d, %d "
     137              log_printf(TRACE,Decod_queue,FUNCTION,"      * [%d] %d, %d %d, %d %d %d %d, 0x%x, %d 0x%x, %d %d, %d %d, %d %d, %d %d, %d %d, %d %d"
    131138                         ,i
    132139                         ,(*it)->_val           [i]
     
    135142                         ,(*it)->_type          [i]
    136143                         ,(*it)->_operation     [i]
     144                         ,(*it)->_no_execute    [i]
    137145                         ,(*it)->_is_delay_slot [i]
    138146                         ,(*it)->_address       [i]
     
    150158                         ,(*it)->_num_reg_re    [i]
    151159                         ,(*it)->_exception_use [i]
     160                         ,(*it)->_exception     [i]
    152161                         );
    153162            else
    154               log_printf(TRACE,Decod_queue,FUNCTION," * [%d] %d"
     163              log_printf(TRACE,Decod_queue,FUNCTION,"      * [%d] %d"
    155164                         ,i
    156165                         ,(*it)->_val           [i]
     
    163172   
    164173#ifdef STATISTICS
    165     for (uint32_t i=0; i<_param->_nb_context; i++)
    166       *(_stat_nb_inst [i]) += reg_NB_INST [i];
     174    if (usage_is_set(_usage,USE_STATISTICS))
     175      {
     176        *(_stat_use_queue) += reg_QUEUE->size();
     177        for (uint32_t i=0; i<_param->_nb_context; i++)
     178          *(_stat_nb_inst [i]) += reg_NB_INST [i];
     179      }
    167180#endif
    168181
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Parameters.cpp

    r82 r88  
    1010
    1111namespace morpheo {
    12 namespace behavioural {
     12  namespace behavioural {
    1313namespace core {
    1414namespace multi_front_end {
     
    2424                          uint32_t   size_queue          ,
    2525                          uint32_t   size_general_data   ,
    26                           uint32_t * nb_branch_speculated)
     26                          uint32_t * nb_branch_speculated,
     27                          bool       is_toplevel         )
    2728  {
    2829    log_begin(Decod_queue,FUNCTION);
     
    3132    _nb_inst_decod        = nb_inst_decod       ;
    3233    _size_queue           = size_queue          ;
    33     _size_general_data    = size_general_data   ;
     34//  _size_general_data    = size_general_data   ;
    3435    _nb_branch_speculated = nb_branch_speculated;
    3536
     
    3738    _size_bank            = _size_queue / _nb_bank;
    3839   
    39     _size_context_id      = log2(nb_context);
    40     _size_depth           = log2(max<uint32_t>(_nb_branch_speculated,_nb_context));
    41     _size_nb_inst         = log2(_size_queue);
     40    test();
    4241
    43     _have_port_context_id = (_size_context_id > 0);
    44     _have_port_depth      = (_size_depth      > 0);
    45    
    46     test();
     42    if (is_toplevel)
     43      {
     44        _size_context_id      = log2(nb_context);
     45        _size_nb_inst_decod   = log2(_size_queue)+1;
     46        _size_depth           = log2(max<uint32_t>(_nb_branch_speculated,_nb_context));
     47        _size_general_data    = size_general_data;
     48
     49        _have_port_context_id = _size_context_id > 0;
     50        _have_port_depth      = _size_depth > 0;
     51
     52        copy ();
     53      }
     54
    4755    log_end(Decod_queue,FUNCTION);
    4856  };
     
    6270  {
    6371    log_begin(Decod_queue,FUNCTION);
     72
     73    log_end(Decod_queue,FUNCTION);
     74  };
     75
     76#undef  FUNCTION
     77#define FUNCTION "Decod_queue::copy"
     78  void Parameters::copy (void)
     79  {
     80    log_begin(Decod_queue,FUNCTION);
     81
    6482    log_end(Decod_queue,FUNCTION);
    6583  };
Note: See TracChangeset for help on using the changeset viewer.