Ignore:
Timestamp:
Dec 10, 2008, 7:31:39 PM (15 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_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      }
Note: See TracChangeset for help on using the changeset viewer.