Ignore:
Timestamp:
Mar 18, 2009, 11:36:26 PM (15 years ago)
Author:
rosiere
Message:

1) Stat_list : fix retire old and new register bug
2) Stat_list : remove read_counter and valid flag, because validation of destination is in retire step (not in commit step)
3) Model : add class Model (cf Morpheo.sim)
4) Allocation : alloc_interface_begin and alloc_interface_end to delete temporary array.
5) Script : add distexe.sh
6) Add Comparator, Multiplier, Divider. But this component are not implemented
7) Software : add Dhrystone

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

    r111 r112  
    4949              reg_EVENT_STATE           [i][j] = EVENT_STATE_NO_EVENT;
    5050              reg_EVENT_FLUSH           [i][j] = false;
     51              reg_EVENT_STOP            [i][j] = false;
    5152
    5253//            reg_PC_PREVIOUS           [i][j] = (0x100-4)>>2;
     
    9091                      reg_EVENT_STATE [i][j] = EVENT_STATE_END;
    9192                      reg_EVENT_FLUSH [i][j] = false;
     93                      //reg_EVENT_STOP  [i][j] = false;
    9294                    }
    9395                  break;
     
    324326                      case ROB_BRANCH_WAIT_END : {state = (have_exception)?ROB_END_EXCEPTION_WAIT_HEAD:ROB_BRANCH_COMPLETE; break;}
    325327                        // Store KO
    326                       case ROB_MISS_WAIT_END   : {state = ROB_END_KO_SPECULATIVE; break;}
     328                      case ROB_EVENT_WAIT_END  : {state = ROB_END_KO_SPECULATIVE; break;}
    327329                        // Store OK, Load and other instruction
    328330                      case ROB_OTHER_WAIT_END  : {state = (have_exception)?ROB_END_EXCEPTION_WAIT_HEAD:((have_miss_speculation)?ROB_END_LOAD_MISS_SPECULATIVE:ROB_END_OK_SPECULATIVE); break;}
     
    333335                        }
    334336                      }
     337
     338                    if ((have_exception or have_miss_speculation) and
     339                        (reg_EVENT_FLUSH [entry->front_end_id][entry->context_id] == 0))
     340                      reg_EVENT_STOP [entry->front_end_id][entry->context_id] = true;
    335341
    336342                    // update Re Order Buffer
     
    364370               
    365371                log_printf(TRACE,Commit_unit,FUNCTION,"  * RETIRE            [%d][%d]",x,y);
     372                log_printf(TRACE,Commit_unit,FUNCTION,"    * num_bank     : %d",num_bank     );
    366373               
    367374#ifdef DEBUG_TEST
     
    381388                log_printf(TRACE,Commit_unit,FUNCTION,"    * front_end_id : %d",front_end_id );
    382389                log_printf(TRACE,Commit_unit,FUNCTION,"    * context_id   : %d",context_id   );
     390                log_printf(TRACE,Commit_unit,FUNCTION,"    * rob_ptr      : %d",((num_bank << _param->_shift_num_bank) | entry->ptr));
    383391                log_printf(TRACE,Commit_unit,FUNCTION,"    * num_thread   : %d",num_thread   );
    384392                log_printf(TRACE,Commit_unit,FUNCTION,"    * type         : %s",toString(type).c_str());
     
    406414//                     throw ERRORMORPHEO(FUNCTION,toString(_("Retire : Instruction's address_next (%.8x) is different of commit_unit's address_next (%.8x)"),entry->address_next,reg_PC_NEXT [front_end_id][context_id]));
    407415                  }
    408                
     416
    409417                if ((state == ROB_END_BRANCH_MISS) or
    410418                    (state == ROB_END_LOAD_MISS))
    411                   {
    412                     reg_EVENT_STATE [front_end_id][context_id] = EVENT_STATE_EVENT;
    413                     reg_EVENT_FLUSH [front_end_id][context_id] = true;
    414                   }
     419                    {
     420                      reg_EVENT_STATE [front_end_id][context_id] = EVENT_STATE_EVENT;
     421                      reg_EVENT_FLUSH [front_end_id][context_id] = true;
     422                      reg_EVENT_STOP  [front_end_id][context_id] = false;
     423                    }
    415424               
    416425#if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true)
     
    475484              {
    476485              case ROB_STORE_HEAD_OK : {state = ROB_OTHER_WAIT_END; break; }
    477               case ROB_STORE_HEAD_KO : {state = ROB_MISS_WAIT_END ; break; }
     486              case ROB_STORE_HEAD_KO : {state = ROB_EVENT_WAIT_END; break; }
    478487              default : {throw ERRORMORPHEO(FUNCTION,_("Reexecute : invalid state value.\n"));}
    479488              }
     
    500509                throw ERRORMORPHEO(FUNCTION,_("Branch_complete : Invalid state value.\n"));
    501510#endif
    502 
    503               entry->state = (PORT_READ(in_BRANCH_COMPLETE_MISS_PREDICTION [i]))?ROB_END_BRANCH_MISS_SPECULATIVE:ROB_END_OK_SPECULATIVE;
     511              Tcontrol_t miss = PORT_READ(in_BRANCH_COMPLETE_MISS_PREDICTION [i]);
     512             
     513              entry->state = (miss)?ROB_END_BRANCH_MISS_SPECULATIVE:ROB_END_OK_SPECULATIVE;
     514             
     515              if (miss and (reg_EVENT_FLUSH [entry->front_end_id][entry->context_id] == 0))
     516                reg_EVENT_STOP [entry->front_end_id][entry->context_id] = true;
     517
     518
    504519//               entry->state = ROB_END_OK_SPECULATIVE;
    505520            }
     
    612627                  switch (state)
    613628                    {
    614                     case ROB_BRANCH_WAIT_END             : {state = ROB_MISS_WAIT_END; break;}
    615                     case ROB_BRANCH_COMPLETE             : {state = ROB_END_MISS     ; break;}
     629                    case ROB_BRANCH_WAIT_END             : {state = ROB_EVENT_WAIT_END; break;}
     630                    case ROB_BRANCH_COMPLETE             : {state = ROB_END_MISS      ; break;}
    616631                    case ROB_END_BRANCH_MISS             :
    617                     case ROB_END_BRANCH_MISS_SPECULATIVE : {state = ROB_END_MISS     ; break;}
     632                    case ROB_END_BRANCH_MISS_SPECULATIVE : {state = ROB_END_MISS      ; break;}
    618633                    case ROB_END_LOAD_MISS_UPDATE        :
    619634                    case ROB_END_LOAD_MISS               :
    620                     case ROB_END_LOAD_MISS_SPECULATIVE   : {state = ROB_END_MISS     ; break;}
    621                     case ROB_STORE_WAIT_HEAD_OK          : {state = ROB_STORE_HEAD_KO; break;}
     635                    case ROB_END_LOAD_MISS_SPECULATIVE   : {state = ROB_END_MISS      ; break;}
     636                    case ROB_STORE_WAIT_HEAD_OK          : {state = ROB_STORE_HEAD_KO ; break;}
    622637                  //case ROB_STORE_WAIT_HEAD_KO          : {state = ; break;}
    623                     case ROB_OTHER_WAIT_END              : {state = ROB_MISS_WAIT_END; break;}
     638                    case ROB_OTHER_WAIT_END              : {state = ROB_EVENT_WAIT_END; break;}
    624639                    case ROB_END_OK                      :
    625                     case ROB_END_OK_SPECULATIVE          : {state = ROB_END_MISS     ; break;}
     640                    case ROB_END_OK_SPECULATIVE          : {state = ROB_END_MISS      ; break;}
    626641                    case ROB_END_KO                      :
    627                     case ROB_END_KO_SPECULATIVE          : {state = ROB_END_MISS     ; break;}
     642                    case ROB_END_KO_SPECULATIVE          : {state = ROB_END_MISS      ; break;}
    628643                    case ROB_END_EXCEPTION_UPDATE        :
    629644                    case ROB_END_EXCEPTION               :
    630                     case ROB_END_EXCEPTION_WAIT_HEAD     : {state = ROB_END_MISS     ; break;}
     645                    case ROB_END_EXCEPTION_WAIT_HEAD     : {state = ROB_END_MISS      ; break;}
    631646                                                         
    632647                      // don't change                   
    633648                    case ROB_STORE_HEAD_KO               : {break;}
    634                     case ROB_MISS_WAIT_END               : {break;}
     649                    case ROB_EVENT_WAIT_END              : {break;}
    635650                    case ROB_END_MISS                    : {break;}
    636651                                                         
     
    671686                    case ROB_STORE_WAIT_HEAD_OK      : {state = ROB_STORE_HEAD_OK;        break;}
    672687                    case ROB_END_EXCEPTION_WAIT_HEAD : {state = ROB_END_EXCEPTION_UPDATE; break;}
    673                     default : {break;} // else, no change
     688                    default : {break;} // else, no change
    674689                    }
    675690                }
     
    701716            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_STATE  : %s",toString(reg_EVENT_STATE [i][j]).c_str());
    702717            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_FLUSH  : %d",reg_EVENT_FLUSH [i][j]);
     718            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_STOP   : %d",reg_EVENT_STOP  [i][j]);
    703719            log_printf(TRACE,Commit_unit,FUNCTION,"      * NB_INST_ALL  : %d",reg_NB_INST_COMMIT_ALL[i][j]);
    704720            log_printf(TRACE,Commit_unit,FUNCTION,"      * NB_INST_MEM  : %d",reg_NB_INST_COMMIT_MEM[i][j]);
     
    784800//            or (entry->state == ROB_STORE_HEAD_KO              )
    785801//            or (entry->state == ROB_OTHER_WAIT_END             )
    786 //            or (entry->state == ROB_MISS_WAIT_END              )
     802//            or (entry->state == ROB_EVENT_WAIT_END             )
    787803//            or (entry->state == ROB_END_OK_SPECULATIVE         )
    788804              or (entry->state == ROB_END_OK                     )
Note: See TracChangeset for help on using the changeset viewer.