Ignore:
Timestamp:
Jan 15, 2009, 6:19:08 PM (15 years ago)
Author:
rosiere
Message:

1) Add soc test
2) fix bug (Pc management, Decod and execute, Update prediction ...)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp

    r100 r101  
    347347        if (internal_REEXECUTE_VAL [0] and PORT_READ(in_REEXECUTE_ACK [0]))
    348348          {
     349            log_printf(TRACE,Commit_unit,FUNCTION,"  * REEXECUTE         [0]");
     350
    349351            uint32_t num_bank = internal_REEXECUTE_NUM_BANK [0];
    350352
     
    368370          if (internal_BRANCH_COMPLETE_VAL [i] and PORT_READ(in_BRANCH_COMPLETE_ACK [i]))
    369371            {
     372              log_printf(TRACE,Commit_unit,FUNCTION,"  * BRANCH_COMPLETE   [%d]",i);
     373              log_printf(TRACE,Commit_unit,FUNCTION,"    * miss_prediction : %d",PORT_READ(in_BRANCH_COMPLETE_MISS_PREDICTION [i]));
     374
    370375              uint32_t num_bank = internal_BRANCH_COMPLETE_NUM_BANK [i];
    371376             
     
    378383#endif
    379384
    380               entry->state = (PORT_READ(in_BRANCH_COMPLETE_MISS_PREDICTION [i]))?ROB_END_OK_SPECULATIVE:ROB_END_BRANCH_MISS_SPECULATIVE;
     385              entry->state = (PORT_READ(in_BRANCH_COMPLETE_MISS_PREDICTION [i]))?ROB_END_BRANCH_MISS_SPECULATIVE:ROB_END_OK_SPECULATIVE;
    381386//               entry->state = ROB_END_OK_SPECULATIVE;
    382387            }
     
    410415              Tdepth_t     depth        = entry->depth;
    411416
    412               Tdepth_t     depth_min    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [front_end_id][context_id]):0;
    413               Tdepth_t     depth_max    = PORT_READ(in_DEPTH_MAX[front_end_id][context_id]);
     417              Tdepth_t     depth_min    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN[front_end_id][context_id]):0;
     418              Tdepth_t     depth_max    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX[front_end_id][context_id]):0;
     419              Tcontrol_t   depth_full   = PORT_READ(in_DEPTH_FULL [front_end_id][context_id]);
    414420             
    415421              // is a valid instruction ?
    416422              // If DEPTH_CURRENT :
    417423              // equal at     DEPTH_MIN            -> not speculative
    418               // not include ]DEPTH_MIN:DEPTH_MAX[ -> previous branch miss
    419               //     include ]DEPTH_MIN:DEPTH_MAX[ -> speculative
     424              // not include ]DEPTH_MIN:DEPTH_MAX] -> previous branch miss
     425              //     include ]DEPTH_MIN:DEPTH_MAX] -> speculative
    420426             
    421427              // All case
     
    428434             
    429435              Tcontrol_t   is_valid      = ((depth == depth_min) or
    430                                             ((depth_min < depth_max)?
    431                                              (depth<depth_max):
    432                                              ((depth > depth_min) or (depth < depth_max))));
    433              
     436                                            depth_full or
     437                                            ((depth_min <= depth_max)?
     438                                             ((depth >= depth_min) and (depth <=depth_max)):
     439                                             ((depth >= depth_min) or  (depth <=depth_max))));
     440
     441              log_printf(TRACE,Commit_unit,FUNCTION,"  * HEAD              [%d]",i);
     442              log_printf(TRACE,Commit_unit,FUNCTION,"    * is_valid        : %d",is_valid);
     443              log_printf(TRACE,Commit_unit,FUNCTION,"    * depth           : %d",depth    );
     444              log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_min       : %d",depth_min);
     445              log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_max       : %d",depth_max);
     446
    434447              //------------------------------------------------------
    435448              // test if instruction is miss speculative
     
    542555                       toString((*it)->state).c_str() ,
    543556                       (*it)->ptr                     );
    544             log_printf(TRACE,Commit_unit,FUNCTION,"             %.1d %.5d %.6d, %.1d %.5d %.6d, %.1d %.5d %.6d, %.1d %.1d %.6d %.6d, %.1d %.1d %.6d %.6d ",
     557            log_printf(TRACE,Commit_unit,FUNCTION,"             %.1d %.2d %.6d, %.1d %.2d %.6d, %.1d %.1d %.6d, %.1d %.2d %.6d %.6d, %.1d %.1d %.6d %.6d ",
    545558                       (*it)->read_ra                 ,
    546559                       (*it)->num_reg_ra_log          ,
     
    562575           
    563576            log_printf(TRACE,Commit_unit,FUNCTION,"             %.2d %.2d %.1d %.1d %.8x",
     577                       (*it)->exception_use ,
    564578                       (*it)->exception     ,
    565                        (*it)->exception_use ,
    566579                       (*it)->flags         ,
    567580                       (*it)->no_sequence   ,
Note: See TracChangeset for help on using the changeset viewer.