Ignore:
Timestamp:
May 25, 2009, 7:40:26 PM (15 years ago)
Author:
rosiere
Message:

1) Prediction unit : static prediction not blocking

File:
1 edited

Legend:

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

    r110 r119  
    6363    for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    6464      {
     65        log_printf(TRACE,Decod,FUNCTION,"  * DECOD [%d]",i);   
     66
    6567        while ((it != select->end())    and  // have a no scanned "slot_in" ?
    6668               (decod_val [i] == false) and  // have not a previous selected entry?
     
    7274            uint32_t   y = it->elt;
    7375
     76            log_printf(TRACE,Decod,FUNCTION,"    * IFETCH [%d][%d]",x,y);   
     77            log_printf(TRACE,Decod,FUNCTION,"      * in_IFETCH_VAL          : %d",PORT_READ(in_IFETCH_VAL [x][y]));
     78            log_printf(TRACE,Decod,FUNCTION,"      * can_continue           : %d",can_continue [x]               );
     79
    7480            // Test if this instruction is valid
    7581            if ((PORT_READ(in_IFETCH_VAL [x][y]) == 1) and // entry is valid
    7682                (can_continue [x]                == 1))    // context can decod instruction (have not a previous event)
    7783              {
    78                 log_printf(TRACE,Decod,FUNCTION,"  * IFETCH [%d][%d]",x,y);   
    79                 log_printf(TRACE,Decod,FUNCTION,"    * decod_ack [%d] : %d",i,PORT_READ(in_DECOD_ACK [i]));
     84                log_printf(TRACE,Decod,FUNCTION,"      * decod_ack              : %d",PORT_READ(in_DECOD_ACK [i]));
    8085
    8186                decod_val  [i]    = true;                        // fetch_val and decod_enable
     
    97102                  {
    98103                    // Decod !
    99                     log_printf(TRACE,Decod,FUNCTION,"  * DECOD [%d]",i);
    100                     log_printf(TRACE,Decod,FUNCTION,"    * context       : %d",x);
    101                     log_printf(TRACE,Decod,FUNCTION,"    * fetch         : %d",y);
    102                     log_printf(TRACE,Decod,FUNCTION,"    * address       : %.8x (%.8x)",addr,(addr<<2));
    103                     log_printf(TRACE,Decod,FUNCTION,"    * is_delay_slot : %d",internal_CONTEXT_IS_DELAY_SLOT [x]);
     104                    log_printf(TRACE,Decod,FUNCTION,"      * address                : %.8x (%.8x)",addr,(addr<<2));
     105                    log_printf(TRACE,Decod,FUNCTION,"      * is_delay_slot          : %d",internal_CONTEXT_IS_DELAY_SLOT [x]);
    104106                   
    105107                    instruction_decod (_decod_instruction, _decod_param[x]);
    106108
    107                     log_printf(TRACE,Decod,FUNCTION,"    * address_next  : %.8x (%.8x)",_decod_instruction->_address_next,(_decod_instruction->_address_next<<2));
     109                    log_printf(TRACE,Decod,FUNCTION,"      * address_next           : %.8x (%.8x)",_decod_instruction->_address_next,(_decod_instruction->_address_next<<2));
    108110                  }
    109111                else
     
    166168
    167169                // Branch predictor can accept : the depth is valid
    168                 log_printf(TRACE,Decod,FUNCTION,"    * context_depth_val : %d",PORT_READ(in_CONTEXT_DEPTH_VAL [x]));
     170                log_printf(TRACE,Decod,FUNCTION,"      * context_depth_val      : %d",PORT_READ(in_CONTEXT_DEPTH_VAL [x]));
    169171                decod_val   [i]    &= PORT_READ(in_CONTEXT_DEPTH_VAL [x]);
    170172                ifetch_ack  [x][y] &= PORT_READ(in_CONTEXT_DEPTH_VAL [x]);
     
    172174                if (type == TYPE_BRANCH)
    173175                  {
    174                     log_printf(TRACE,Decod,FUNCTION,"    * type is branch");
    175                     log_printf(TRACE,Decod,FUNCTION,"      * predict_val  : %d",ifetch_ack [x][y]);
    176                     log_printf(TRACE,Decod,FUNCTION,"      * predict_ack  : %d",PORT_READ(in_PREDICT_ACK [i]));
    177 
    178                     log_printf(TRACE,Decod,FUNCTION,"      * address src  : %.8x (%.8x)",_decod_instruction->_address     ,_decod_instruction->_address     <<2);
    179                     log_printf(TRACE,Decod,FUNCTION,"      * address dest : %.8x (%.8x)",_decod_instruction->_address_next,_decod_instruction->_address_next<<2);
     176                    log_printf(TRACE,Decod,FUNCTION,"      * Instruction is branch");
     177                    log_printf(TRACE,Decod,FUNCTION,"        * predict_val       : %d",ifetch_ack [x][y]);
     178                    log_printf(TRACE,Decod,FUNCTION,"        * predict_ack       : %d",PORT_READ(in_PREDICT_ACK [i]));
     179                                                         
     180                    log_printf(TRACE,Decod,FUNCTION,"        * address src       : %.8x (%.8x)",_decod_instruction->_address     ,_decod_instruction->_address     <<2);
     181                    log_printf(TRACE,Decod,FUNCTION,"        * address dest      : %.8x (%.8x)",_decod_instruction->_address_next,_decod_instruction->_address_next<<2);
    180182                   
    181183                    // test if have already decod an branch : one branch per context
     
    207209                if (event_type != EVENT_TYPE_NONE)
    208210                  {
     211                    log_printf(TRACE,Decod,FUNCTION,"      * Instruction make an EVENT (%s)",toString(event_type).c_str());
     212                    log_printf(TRACE,Decod,FUNCTION,"        * context_event_ack : %d",PORT_READ(in_CONTEXT_EVENT_ACK));
     213
    209214                    // speculative jump at the exception handler
    210215                    // if type = TYPE_BRANCH, also event_type == EVENT_TYPE_NONE
     
    243248
    244249            log_printf(TRACE,Decod,FUNCTION,"    - num_(decod, context, fetch) : %d %d %d",i, x, y);
    245             log_printf(TRACE,Decod,FUNCTION,"      - ifetch_ack        : %d",ifetch_ack  [x][y]);
    246             log_printf(TRACE,Decod,FUNCTION,"      - context_event_val : %d",context_event_val );
    247             log_printf(TRACE,Decod,FUNCTION,"      - predict_val       : %d",predict_val [i]   );
    248             log_printf(TRACE,Decod,FUNCTION,"      - decod_val         : %d",decod_val   [i]   );
     250            log_printf(TRACE,Decod,FUNCTION,"      - ifetch_ack             : %d",ifetch_ack  [x][y]);
     251            log_printf(TRACE,Decod,FUNCTION,"      - context_event_val      : %d",context_event_val );
     252            log_printf(TRACE,Decod,FUNCTION,"      - predict_val            : %d",predict_val [i]   );
     253            log_printf(TRACE,Decod,FUNCTION,"      - decod_val              : %d",decod_val   [i]   );
    249254           
    250255            it ++;
Note: See TracChangeset for help on using the changeset viewer.