Changeset 145 for trunk


Ignore:
Timestamp:
Oct 13, 2010, 8:15:51 PM (14 years ago)
Author:
rosiere
Message:

1) add test with SPECINT2K
2) new config of Selftest
3) modif RAT to support multiple depth_save ... but not finish (need fix Update Prediction Table)
4) add Function_pointer but need fix

Location:
trunk
Files:
127 added
2 deleted
107 edited
204 moved

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/Environment/Makefile

    r142 r145  
    4646#-----[ Rules ]--------------------------------------------
    4747
    48 all                             : all_parallel
     48all                             : $(DIR_LIB)
     49                                @\
     50                                $(MAKE) all_parallel; \
     51                                $(MAKE) $(LIBRARY_FILE);
    4952
    5053all_step                        :
     
    5659                                $(MAKE) lib_ramlock;    \
    5760                                $(MAKE) lib_sim2os;     \
    58                                 $(MAKE) lib_tty;        \
    59                                 $(MAKE) $(LIBRARY_FILE);
     61                                $(MAKE) lib_tty;
    6062
    6163all_parallel                    :       lib_cache      \
     
    6668                                        lib_sim2os     \
    6769                                        lib_tty
    68                                 @\
    69                                 $(MAKE) $(LIBRARY_FILE);
    7070
    7171lib_cache                       :
     
    9191                                $(MAKE) --directory=$(DIR_TTY)        only;
    9292
    93 $(LIBRARY_FILE)                 : $(DIR_LIB) $(Environment_OBJECTS_DEPS)
     93$(LIBRARY_FILE)                 : $(Environment_OBJECTS_DEPS)
    9494                                @\
    9595                                $(ECHO) "Archive            : $@";\
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Load_store_unit.h

    r138 r145  
    237237  public  : void     genMealy_retire           (void);
    238238   
    239   public  : void     function_speculative_load_access_transition      (void);
    240   public  : void     function_speculative_load_access_genMoore        (void);
    241   public  : void     function_speculative_load_access_genMealy_dcache (void);
    242   public  : void     function_speculative_load_access_genMealy_insert (void);
    243   public  : void     function_speculative_load_access_genMealy_retire (void);
     239  public  : void     function_speculative_load_commit_transition      (void);
     240  public  : void     function_speculative_load_commit_genMoore        (void);
     241  public  : void     function_speculative_load_commit_genMealy_dcache (void);
     242  public  : void     function_speculative_load_commit_genMealy_insert (void);
     243  public  : void     function_speculative_load_commit_genMealy_retire (void);
    244244#endif                                         
    245245
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Types.h

    r138 r145  
    3434    {
    3535       NO_SPECULATIVE_LOAD     //each load wait all previous store before the data cache access
    36      ,SPECULATIVE_LOAD_ACCESS //each load wait all previous store before the commiting
    37     //,SPECULATIVE_LOAD_COMMIT //each load commit the result before the end of dependence's check
    38     //,SPECULATIVE_LOAD_BYPASS //each load bypass the result before the end of dependence's check
     36   // ,SPECULATIVE_LOAD_ACCESS //each load wait all previous store before the commiting
     37   // ,SPECULATIVE_LOAD_ACCESS == (SPECULATIVE_LOAD_COMMIT and speculative_commit_predictor_scheme == PREDICTOR_NEVER_TAKE)
     38      ,SPECULATIVE_LOAD_COMMIT //each load commit the result before the end of dependence's check
    3939    } Tspeculative_load_t;
    4040 
     
    218218      {
    219219      case morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::NO_SPECULATIVE_LOAD     : return "no_speculative_load"    ; break;
    220       case morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_ACCESS : return "speculative_load_access"; break;
    221 //    case morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_COMMIT : return "speculative_load_commit"; break;
     220//    case morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_ACCESS : return "speculative_load_access"; break;
     221      case morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_COMMIT : return "speculative_load_commit"; break;
    222222//    case morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_BYPASS : return "speculative_load_bypass"; break;
    223223      default    : return ""      ; break;
     
    230230        (x.compare(toString(                      morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::NO_SPECULATIVE_LOAD     )) == 0))
    231231      return morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::NO_SPECULATIVE_LOAD;
    232     if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_ACCESS))) == 0) or
    233         (x.compare(toString(                      morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_ACCESS )) == 0))
    234       return morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_ACCESS;
    235 //  if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_COMMIT))) == 0) or
    236 //      (x.compare(toString(                      morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_COMMIT )) == 0))
    237 //    return morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_COMMIT;
     232//  if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_ACCESS))) == 0) or
     233//      (x.compare(toString(                      morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_ACCESS )) == 0))
     234//    return morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_ACCESS;
     235    if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_COMMIT))) == 0) or
     236        (x.compare(toString(                      morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_COMMIT )) == 0))
     237      return morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_COMMIT;
    238238//  if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_BYPASS))) == 0) or
    239239//      (x.compare(toString(                      morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_BYPASS )) == 0))
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit.cpp

    r138 r145  
    7777    switch (_param->_speculative_load)
    7878      {
    79       case SPECULATIVE_LOAD_ACCESS :
     79      case SPECULATIVE_LOAD_COMMIT :
    8080        {
    81           function_transition      = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_access_transition     ;
    82           function_genMoore        = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_access_genMoore       ;
    83           function_genMealy_dcache = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_access_genMealy_dcache;
    84           function_genMealy_insert = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_access_genMealy_insert;
    85           function_genMealy_retire = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_access_genMealy_retire;
     81          function_transition      = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_commit_transition     ;
     82          function_genMoore        = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_commit_genMoore       ;
     83          function_genMealy_dcache = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_commit_genMealy_dcache;
     84          function_genMealy_insert = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_commit_genMealy_insert;
     85          function_genMealy_retire = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_commit_genMealy_retire;
    8686          break;
    8787        }
    8888      case NO_SPECULATIVE_LOAD     :
    89       // case SPECULATIVE_LOAD_COMMIT :
    90       //case SPECULATIVE_LOAD_BYPASS :
     89      // case SPECULATIVE_LOAD_ACCESS :
    9190      default                      :
    9291        {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_genMealy_dcache.cpp

    r144 r145  
    2121
    2222#undef  FUNCTION
    23 #define FUNCTION "Load_store_unit::function_speculative_load_access_genMealy_dcache"
    24   void Load_store_unit::function_speculative_load_access_genMealy_dcache (void)
     23#define FUNCTION "Load_store_unit::function_speculative_load_commit_genMealy_dcache"
     24  void Load_store_unit::function_speculative_load_commit_genMealy_dcache (void)
    2525  {
    2626    log_begin(Load_store_unit,FUNCTION);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_genMealy_insert.cpp

    r144 r145  
    2121
    2222#undef  FUNCTION
    23 #define FUNCTION "Load_store_unit::function_speculative_load_access_genMealy_insert"
    24   void Load_store_unit::function_speculative_load_access_genMealy_insert (void)
     23#define FUNCTION "Load_store_unit::function_speculative_load_commit_genMealy_insert"
     24  void Load_store_unit::function_speculative_load_commit_genMealy_insert (void)
    2525  {
    2626    log_begin(Load_store_unit,FUNCTION);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_genMealy_retire.cpp

    r144 r145  
    2121
    2222#undef  FUNCTION
    23 #define FUNCTION "Load_store_unit::function_speculative_load_access_genMealy_retire"
    24   void Load_store_unit::function_speculative_load_access_genMealy_retire (void)
     23#define FUNCTION "Load_store_unit::function_speculative_load_commit_genMealy_retire"
     24  void Load_store_unit::function_speculative_load_commit_genMealy_retire (void)
    2525  {
    2626    log_begin(Load_store_unit,FUNCTION);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_genMoore.cpp

    r144 r145  
    2121
    2222#undef  FUNCTION
    23 #define FUNCTION "Load_store_unit::function_speculative_load_access_genMoore"
    24   void Load_store_unit::function_speculative_load_access_genMoore (void)
     23#define FUNCTION "Load_store_unit::function_speculative_load_commit_genMoore"
     24  void Load_store_unit::function_speculative_load_commit_genMoore (void)
    2525  {
    2626    log_begin(Load_store_unit,FUNCTION);
     
    5656      {
    5757//      internal_MEMORY_OUT_PTR = (reg_LOAD_QUEUE_PTR_READ+1)%_param->_size_load_queue;
    58         internal_MEMORY_OUT_VAL = ((_load_queue[internal_MEMORY_OUT_PTR]._state == LOAD_QUEUE_COMMIT_CHECK) or
    59                                    (_load_queue[internal_MEMORY_OUT_PTR]._state == LOAD_QUEUE_COMMIT));
     58
     59        // have valid entry if :
     60        //  * load_queue entry need commit
     61        //  * load_queue entry have rsp and can make a speculative commit
     62        internal_MEMORY_OUT_VAL = ((_load_queue[internal_MEMORY_OUT_PTR]._state == LOAD_QUEUE_COMMIT) or
     63                                   (_load_queue[internal_MEMORY_OUT_PTR]._can_speculative_commit and (_load_queue[internal_MEMORY_OUT_PTR]._state == LOAD_QUEUE_COMMIT_CHECK))
     64                                   );
    6065       
    6166        if (internal_MEMORY_OUT_VAL)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_transition.cpp

    r144 r145  
    228228
    229229#undef  FUNCTION
    230 #define FUNCTION "Load_store_unit::function_speculative_load_access_transition"
    231   void Load_store_unit::function_speculative_load_access_transition (void)
     230#define FUNCTION "Load_store_unit::function_speculative_load_commit_transition"
     231  void Load_store_unit::function_speculative_load_commit_transition (void)
    232232  {
    233233    log_begin(Load_store_unit,FUNCTION);
     
    659659                                  // The check is finish if all bit is set
    660660                                  end_check = (_load_queue[index_load_queue]._check_hit_byte == _param->_mask_check_hit_byte);
     661
     662                                  // TODO : autoriser l'envoie de la donnée !
    661663                                }
    662664                            }
     
    922924                  case STORE_QUEUE_COMMIT                  :
    923925                    {
    924                       throw ERRORMORPHEO(FUNCTION,"<Load_store_unit::function_speculative_load_access_transition> Invalid state and operation");
     926                      throw ERRORMORPHEO(FUNCTION,"Invalid state and operation");
    925927                    }
    926928                  }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Parameters_msg_error.cpp

    r138 r145  
    3030    switch (_speculative_load)
    3131      {
    32       case SPECULATIVE_LOAD_ACCESS :
     32      case SPECULATIVE_LOAD_COMMIT :
     33      // case SPECULATIVE_LOAD_ACCESS :
    3334        {
    34           if (not (_nb_bypass_memory == 0))
    35             test.error(_("Bypass memory is not supported. Please wait a next revision.\n"));
    36  
    3735          break;
    3836        }
    3937      case NO_SPECULATIVE_LOAD     :
    40       // case SPECULATIVE_LOAD_BYPASS :
    41       // case SPECULATIVE_LOAD_COMMIT :
    4238      default                      :
    4339        {
    44           if (not (_nb_bypass_memory == 0))
    45             test.error(toString(_("In the load scheme '%s', they have none bypass.\n"),toString(_speculative_load).c_str()));
    46 
    47           test.error(toString(_("Speculative load scheme '%s' is not supported. Please wait a next revision.\n"),toString(_speculative_load).c_str()));
     40          test.error(toString(_("Speculative load scheme '%s' is not yet supported.\n"),toString(_speculative_load).c_str()));
    4841          break;
    4942        }
    5043      }
    5144
     45    if (_nb_bypass_memory > 0)
     46      switch (_speculative_load)
     47        {
     48        case SPECULATIVE_LOAD_COMMIT :
     49          {
     50            break;
     51          }
     52        case NO_SPECULATIVE_LOAD     :
     53        // case SPECULATIVE_LOAD_ACCESS :
     54        default                      :
     55          {
     56            test.error(toString(_("In the load scheme '%s', they have none bypass.\n"),toString(_speculative_load).c_str()));
     57            break;
     58          }
     59        }
     60     
    5261    if (not (_size_store_queue >= 2))
    5362      test.error(_("Store queue must have at less two slot.\n"));
     
    6675      case PREDICTOR_NEVER_TAKE  :
    6776      case PREDICTOR_ALWAYS_TAKE :
     77        {
     78          break;
     79        }
    6880      case PREDICTOR_COUNTER     :
    6981        {
     82          test.error(toString(_("Predictor scheme \"%s\" is not yet supported.\n"),toString(_speculative_commit_predictor_scheme).c_str()));
     83
    7084          break;
    7185        }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/src/Parameters.cpp

    r138 r145  
    88#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/include/Parameters.h"
    99#include "Behavioural/include/Allocation.h"
     10#include "Behavioural/include/Types.h"
    1011#include "Common/include/Max.h"
    1112
     
    373374    uint32_t size_general_register   = log2(_max_nb_general_register);
    374375    uint32_t size_special_register   = log2(_max_nb_special_register);
    375    
     376
     377    bool speculative_commit = false;
     378    for (uint32_t i=0; i<_nb_execute_unit; i++)
     379      if (_is_load_store_unit [i])
     380        {
     381          uint32_t x = _translate_num_execute_unit [i];
     382     
     383          speculative_commit |=  ((_speculative_load[x] == multi_execute_unit::execute_unit::load_store_unit::NO_SPECULATIVE_LOAD) and (_speculative_commit_predictor_scheme[x] != PREDICTOR_NEVER_TAKE));
     384        }
     385    log_printf(TRACE,Execute_loop,FUNCTION," * speculative_commit : %d",speculative_commit);
     386
    376387    test();
    377388
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Types.h

    r120 r145  
    3232      CONTEXT_STATE_KO_MISS_BRANCH_ADDR                , // update address manager
    3333      CONTEXT_STATE_KO_MISS_BRANCH_WAITEND             , // wait end of event (miss branch)
     34      CONTEXT_STATE_KO_MISS_BRANCH_INACCURATE          , // wait end of event (miss branch)
    3435      CONTEXT_STATE_KO_MISS_LOAD_ADDR                  , // update address manager
    3536      CONTEXT_STATE_KO_MISS_LOAD_WAITEND               , // wait end of event (miss load))
     
    6970      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_BRANCH_ADDR                 : return "context_state_ko_miss_branch_addr"                ; break;
    7071      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_BRANCH_WAITEND              : return "context_state_ko_miss_branch_waitend"             ; break;
     72      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_BRANCH_INACCURATE           : return "context_state_ko_miss_branch_inaccurate"          ; break;
    7173      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE : return "context_state_ko_miss_load_and_branch_wait_update"; break;
    7274      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR        : return "context_state_ko_miss_load_and_branch_addr"       ; break;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_statistics_allocation.cpp

    r120 r145  
    4040    for (uint32_t i=0; i<_param->_nb_context; ++i)
    4141      {
    42         _stat_nb_cycle_state_ok                      [i] = _stat->create_counter("nb_cycle_state_ok_"                     +toString(i),"",toString(_("Number of cycle in state ok                      (context %d)"),i));
    43         _stat_nb_cycle_state_ko_excep                [i] = _stat->create_counter("nb_cycle_state_ko_excep_"               +toString(i),"",toString(_("Number of cycle in state ko_excep                (context %d)"),i));
    44         _stat_nb_cycle_state_ko_miss_branch          [i] = _stat->create_counter("nb_cycle_state_ko_miss_branch_"         +toString(i),"",toString(_("Number of cycle in state ko_miss_branch          (context %d)"),i));
    45         _stat_nb_cycle_state_ko_miss_load            [i] = _stat->create_counter("nb_cycle_state_ko_miss_load_"           +toString(i),"",toString(_("Number of cycle in state ko_miss_load            (context %d)"),i));
    46         _stat_nb_cycle_state_ko_miss_load_and_branch [i] = _stat->create_counter("nb_cycle_state_ko_miss_load_and_branch_"+toString(i),"",toString(_("Number of cycle in state ko_miss_load_and_branch (context %d)"),i));
    47         _stat_nb_cycle_state_ko_msync                [i] = _stat->create_counter("nb_cycle_state_ko_msync_"               +toString(i),"",toString(_("Number of cycle in state ko_msync                (context %d)"),i));
    48         _stat_nb_cycle_state_ko_psync                [i] = _stat->create_counter("nb_cycle_state_ko_psync_"               +toString(i),"",toString(_("Number of cycle in state ko_psync                (context %d)"),i));
    49         _stat_nb_cycle_state_ko_csync                [i] = _stat->create_counter("nb_cycle_state_ko_csync_"               +toString(i),"",toString(_("Number of cycle in state ko_csync                (context %d)"),i));
    50         _stat_nb_cycle_state_ko_spr                  [i] = _stat->create_counter("nb_cycle_state_ko_spr_"                 +toString(i),"",toString(_("Number of cycle in state ko_spr                  (context %d)"),i));
    51 
     42        _stat_nb_cycle_state_ok                      [i] = _stat->create_variable("nb_cycle_state_ok_"                     +toString(i));
     43        _stat_nb_cycle_state_ko_excep                [i] = _stat->create_variable("nb_cycle_state_ko_excep_"               +toString(i));
     44        _stat_nb_cycle_state_ko_miss_branch          [i] = _stat->create_variable("nb_cycle_state_ko_miss_branch_"         +toString(i));
     45        _stat_nb_cycle_state_ko_miss_load            [i] = _stat->create_variable("nb_cycle_state_ko_miss_load_"           +toString(i));
     46        _stat_nb_cycle_state_ko_miss_load_and_branch [i] = _stat->create_variable("nb_cycle_state_ko_miss_load_and_branch_"+toString(i));
     47        _stat_nb_cycle_state_ko_msync                [i] = _stat->create_variable("nb_cycle_state_ko_msync_"               +toString(i));
     48        _stat_nb_cycle_state_ko_psync                [i] = _stat->create_variable("nb_cycle_state_ko_psync_"               +toString(i));
     49        _stat_nb_cycle_state_ko_csync                [i] = _stat->create_variable("nb_cycle_state_ko_csync_"               +toString(i));
     50        _stat_nb_cycle_state_ko_spr                  [i] = _stat->create_variable("nb_cycle_state_ko_spr_"                 +toString(i));
    5251
    5352        _stat->create_expr_percent("percent_state_ok_"                     +toString(i),"nb_cycle_state_ok_"                     +toString(i),"cycle",toString(_("Percent of cycle in state ok                      (context %d)"),i));
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_transition.cpp

    r128 r145  
    3333  (((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR                ) or  \
    3434    (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND             ) or  \
     35    (state == CONTEXT_STATE_KO_MISS_BRANCH_INACCURATE          ) or  \
    3536    (state == CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE         ))?PRIORITY_MISS_BRANCH: \
    3637   ((state == EVENT_TYPE_EXCEPTION)?PRIORITY_EXCEPTION:                           \
     
    112113//                  state = CONTEXT_STATE_OK;
    113114                    state = CONTEXT_STATE_KO_MISS_BRANCH_ADDR;
     115                  break;
     116                }
     117              case CONTEXT_STATE_KO_MISS_BRANCH_INACCURATE :
     118                {
     119                  if (inst_all == 0)
     120//                  state = CONTEXT_STATE_OK;
     121                    state = CONTEXT_STATE_OK;
    114122                  break;
    115123                }
     
    321329                      if (can_continue)
    322330                        reg_STATE                [i] =  CONTEXT_STATE_KO_MISS_BRANCH_ADDR;
    323                       else
    324                         {
    325 // #if (MANAGE_EVENT == MANAGE_EVENT_NO_WAIT)
    326 //                           reg_STATE                [i] =  CONTEXT_STATE_KO_MISS_BRANCH_ADDR;
    327 // #else
    328                           reg_STATE                [i] =  CONTEXT_STATE_KO_MISS_BRANCH_WAITEND;
    329 // #endif
    330                         }
     331                      else
     332                        // cf UPT : dest_val = direction, accurate depend of jump type (e.g. jr is inacurate)
     333                        // reg_STATE                [i] =  CONTEXT_STATE_KO_MISS_BRANCH_WAITEND;
     334                        reg_STATE                [i] =  CONTEXT_STATE_KO_MISS_BRANCH_INACCURATE;
    331335
    332336                      reg_EVENT_ADDRESS          [i] = PORT_READ(in_BRANCH_EVENT_ADDRESS_SRC  [i])+1; // address delay slot
     
    647651                        case CONTEXT_STATE_KO_MISS_BRANCH_ADDR             :
    648652                        case CONTEXT_STATE_KO_MISS_BRANCH_WAITEND          :
     653                        case CONTEXT_STATE_KO_MISS_BRANCH_INACCURATE       :
    649654                        case CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR    :
    650655                        case CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAITEND :
     
    752757          case CONTEXT_STATE_KO_EXCEP_SPR                       : (*_stat_nb_cycle_state_ko_excep                [i])++; break;
    753758
     759          case CONTEXT_STATE_KO_MISS_BRANCH_INACCURATE          :
    754760          case CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE         :
    755761          case CONTEXT_STATE_KO_MISS_BRANCH_ADDR                :
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_genMealy.cpp

    r139 r145  
    7171    std::list<generic::priority::select_t> * select = _priority->select();
    7272    std::list<generic::priority::select_t>::iterator it=select->begin();
     73
    7374    for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    7475      {
     
    7677
    7778        bool ifetch_val = false;
    78         while ((it != select->end())    and  // have a no scanned "slot_in" ?
     79
     80        while ((it != select->end())    and  // have a no scanned instruction from ifetch_unit ?
    7981//             (decod_val [i] == false) and  // have not a previous selected entry?
    8082               (ifetch_val    == false) and  // not find ifetch instruction valid
    81                (context_event_val == false)) // Have not a context_event (spr_access, exception, ...)
     83               (context_event_val == false)) // Have not a context_event (spr_access, exception, ...) (ONCE CONTEXT PER CYCLE (context state moore easy))
    8284          {
    8385//          predict_val [i] = false;
    8486
    85             Tcontext_t x = it->grp;
    86             uint32_t   y = it->elt;
     87            Tcontext_t x = it->grp; // num_front_end
     88            uint32_t   y = it->elt; // num_instruction
    8789
    8890            log_printf(TRACE,Decod,FUNCTION,"    * IFETCH [%d][%d]",x,y);   
     
    102104                Tgeneral_data_t addr = PORT_READ(in_IFETCH_ADDRESS [x][y]);
    103105
     106                // Read instruction and set default value
    104107                _decod_instruction->_instruction        = PORT_READ(in_IFETCH_INSTRUCTION [x][y]);
    105108                _decod_instruction->_context_id         = x;
     
    132135                _decod_instruction->_branch_direction   = 0; // not necessary
    133136                _decod_instruction->_event_type         = EVENT_TYPE_NONE; // not necessary
    134                
    135 
    136 
    137                 // Test IFetch exception
     137
     138                // Test if ifetch_unit have an exception (per example : IBERR)
    138139                Texception_t ifetch_exception = PORT_READ(in_IFETCH_EXCEPTION [x][y]);
    139140
    140141                if (ifetch_exception == EXCEPTION_IFETCH_NONE)
    141142                  {
    142                     // Decod !
     143                    // No exception, can Decod !
    143144                    log_printf(TRACE,Decod,FUNCTION,"      * address                : %.8x (%.8x)",addr,(addr<<2));
    144145                    log_printf(TRACE,Decod,FUNCTION,"      * is_delay_slot          : %d",internal_CONTEXT_IS_DELAY_SLOT [x]);
     
    150151                else
    151152                  {
    152                     // No decod : nop
     153                    // Exception : transform this instruction in a nop
     154                    //  * INSTRUCTION_TLB 
     155                    //  * INSTRUCTION_PAGE
     156                    //  * BUS_ERROR       
     157
     158                    log_printf(TRACE,Decod,FUNCTION,"      * exception -> change instruction in a l.nop");
     159                   
    153160                    instruction_l_nop (_decod_instruction, _decod_param[x]);
    154161
     
    156163                    _decod_instruction->_exception     = exception_ifetch_to_exception_decod(ifetch_exception);
    157164                   
    158                     // INSTRUCTION_TLB 
    159                     // INSTRUCTION_PAGE
    160                     // BUS_ERROR       
    161165                    if (_decod_instruction->_is_delay_slot)
    162166                      _decod_instruction->_address_next       = _decod_instruction->_address_previous;
     
    167171                  }
    168172
    169                 Ttype_t      type      = _decod_instruction->_type;
    170                 // Depth current. If have decod a branch and i can continue : depth = depth_next
    171                 Tdepth_t     depth     = (_param->_have_port_depth)?PORT_READ(in_CONTEXT_DEPTH [x]):0;
    172                 // Tcontrol_t   save_rat  = internal_CONTEXT_SAVE_RAT [x];
    173                 Tcontrol_t   no_execute = _decod_instruction->_no_execute;
    174 
     173                Ttype_t             type             = _decod_instruction->_type;
     174                Tdepth_t            depth            = (_param->_have_port_depth)?PORT_READ(in_CONTEXT_DEPTH [x]):0;
     175                Tbranch_condition_t branch_condition = _decod_instruction->_branch_condition;
     176               
     177                // Save RAT if instruction is a branch and is conditionnal (not l.j and not l.jal)
     178
     179              //Tcontrol_t          save_rat         = internal_CONTEXT_SAVE_RAT [x];
     180                // Tcontrol_t          save_rat         = ((type == TYPE_BRANCH) and
     181                //                                         not ((branch_condition==BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK) or
     182                //                                              (branch_condition==BRANCH_CONDITION_NONE_WITH_WRITE_STACK)));
     183
     184                Tcontrol_t          save_rat         = ((type == TYPE_BRANCH) and
     185                                                        not (branch_condition==BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK));
     186
     187                // FIXME : depth+1 valid ???????
    175188                if ((_param->_nb_branch_speculated[x] > 0) and have_decod_branch [x])
    176189                  depth = (depth+1)%_param->_nb_branch_speculated[x];
    177                
     190
     191                // Write output
    178192                if (_param->_have_port_context_id)
    179193                PORT_WRITE(out_DECOD_CONTEXT_ID    [i], x);
     
    185199                PORT_WRITE(out_DECOD_TYPE          [i], type);
    186200                PORT_WRITE(out_DECOD_OPERATION     [i], _decod_instruction->_operation     );
    187                 PORT_WRITE(out_DECOD_NO_EXECUTE    [i], no_execute);
     201                PORT_WRITE(out_DECOD_NO_EXECUTE    [i], _decod_instruction->_no_execute    );
    188202                PORT_WRITE(out_DECOD_IS_DELAY_SLOT [i], _decod_instruction->_is_delay_slot );
    189                 // PORT_WRITE(out_DECOD_SAVE_RAT      [i], save_rat);
    190                 PORT_WRITE(out_DECOD_SAVE_RAT      [i], ((type == TYPE_BRANCH) and not no_execute));
     203                PORT_WRITE(out_DECOD_SAVE_RAT      [i], save_rat);
    191204#ifdef DEBUG
    192205                PORT_WRITE(out_DECOD_ADDRESS       [i], addr);
    193206#endif
    194 //                 if ((type == TYPE_BRANCH) and
    195 //                     ((_decod_instruction->_branch_condition = BRANCH_CONDITION_FLAG_SET) or
    196 //                      (_decod_instruction->_branch_condition = BRANCH_CONDITION_FLAG_UNSET)))
    197 //                 PORT_WRITE(out_DECOD_ADDRESS_NEXT  [i], _decod_instruction->_address+2);
    198 //                 else
    199207                PORT_WRITE(out_DECOD_ADDRESS_NEXT  [i], _decod_instruction->_address_next  );
    200208                PORT_WRITE(out_DECOD_HAS_IMMEDIAT  [i], _decod_instruction->_has_immediat  );
     
    206214                PORT_WRITE(out_DECOD_READ_RC       [i], _decod_instruction->_read_rc       );
    207215                PORT_WRITE(out_DECOD_NUM_REG_RC    [i], _decod_instruction->_num_reg_rc    );
    208                 PORT_WRITE(out_DECOD_WRITE_RD      [i],(_decod_instruction->_num_reg_rd!=0)?_decod_instruction->_write_rd:0);
     216                PORT_WRITE(out_DECOD_WRITE_RD      [i],(_decod_instruction->_num_reg_rd!=0)?_decod_instruction->_write_rd:0); // don't write in RD if RD=0
    209217                PORT_WRITE(out_DECOD_NUM_REG_RD    [i], _decod_instruction->_num_reg_rd    );
    210218                PORT_WRITE(out_DECOD_WRITE_RE      [i], _decod_instruction->_write_re      );
     
    224232                    log_printf(TRACE,Decod,FUNCTION,"        * predict_val       : %d",ifetch_ack [x][y]);
    225233                    log_printf(TRACE,Decod,FUNCTION,"        * predict_ack       : %d",PORT_READ(in_PREDICT_ACK [i]));
    226                                                          
    227234                    log_printf(TRACE,Decod,FUNCTION,"        * address src       : %.8x (%.8x)",_decod_instruction->_address     ,_decod_instruction->_address     <<2);
    228235                    log_printf(TRACE,Decod,FUNCTION,"        * address dest      : %.8x (%.8x)",_decod_instruction->_address_next,_decod_instruction->_address_next<<2);
    229236                   
    230                     // test if have already decod an branch : one branch per context
    231                     predict_val [i]     = not have_decod_branch [x] and ifetch_ack  [x][y] // and decod_val [i]
    232                       ;
     237                    // test if have already decod an branch : ONCE BRANCH PER CONTEXT
     238                    predict_val [i]     = not have_decod_branch [x] and ifetch_ack  [x][y]; // and decod_val [i]
    233239                    decod_val   [i]    &= not have_decod_branch [x] and PORT_READ(in_PREDICT_ACK [i]);// predict_ack and fetch_val and decod_enable                 
    234240                    ifetch_ack  [x][y] &= not have_decod_branch [x] and PORT_READ(in_PREDICT_ACK [i]);// predict_ack and fetch_val and decod_enable and decod_ack
     
    252258                if (_param->_have_port_depth)
    253259                PORT_WRITE(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [i],PORT_READ(in_IFETCH_BRANCH_UPDATE_PREDICTION_ID [x][y]));
    254                 PORT_WRITE(out_PREDICT_BRANCH_CONDITION            [i],_decod_instruction->_branch_condition  );
     260                PORT_WRITE(out_PREDICT_BRANCH_CONDITION            [i],branch_condition);
    255261//              PORT_WRITE(out_PREDICT_BRANCH_STACK_WRITE          [i],_decod_instruction->_branch_stack_write);
    256262                PORT_WRITE(out_PREDICT_BRANCH_DIRECTION            [i],_decod_instruction->_branch_direction  );
     
    266272                    // speculative jump at the exception handler
    267273                    // if type = TYPE_BRANCH, also event_type == EVENT_TYPE_NONE
    268                     context_event_val   = ifetch_ack  [x][y] // and decod_val [i]
    269                       ;
     274                    context_event_val   = ifetch_ack  [x][y]; // and decod_val [i]
    270275                    decod_val   [i]    &= PORT_READ(in_CONTEXT_EVENT_ACK);// context_event_ack and fetch_val and decod_enable             
    271276                    ifetch_ack  [x][y] &= PORT_READ(in_CONTEXT_EVENT_ACK);// context_event_ack and fetch_val and decod_enable and decod_ack
     
    277282                    CONTEXT_EVENT_ADDRESS       = _decod_instruction->_address;
    278283                    CONTEXT_EVENT_ADDRESS_EPCR  = _decod_instruction->_address_next ;
    279                
    280284                  }
    281285
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_function_full_assoc_transition.cpp

    r141 r145  
    205205        for (uint32_t i=0; i<_param->_size_queue; i++)
    206206          {
     207            uint32_t index=(i+reg_PTR_READ)%_param->_size_queue;
     208
    207209            log_printf(TRACE,Ifetch_queue,FUNCTION,"    * [%d] 0x%.8x (0x%.8x) %d - %d %d %d - %s",
    208                        i,
    209                        _queue [i]->_address,
    210                        _queue [i]->_address<<2,
    211                        _queue [i]->_inst_ifetch_ptr,
    212                        _queue [i]->_branch_state,
    213                        _queue [i]->_branch_update_prediction_id,
    214                        _queue [i]->_exception,
    215                        toString(_queue [i]->_state).c_str()
     210                       index,
     211                       _queue [index]->_address,
     212                       _queue [index]->_address<<2,
     213                       _queue [index]->_inst_ifetch_ptr,
     214                       _queue [index]->_branch_state,
     215                       _queue [index]->_branch_update_prediction_id,
     216                       _queue [index]->_exception,
     217                       toString(_queue [index]->_state).c_str()
    216218                       );
    217219           
    218             for (uint32_t j=0; j<_param->_nb_instruction; j++)
    219               log_printf(TRACE,Ifetch_queue,FUNCTION,"      * %d 0x%.8x", _queue [i]->_instruction_enable[j], _queue [i]->_instruction[j]);
     220            if (_queue [index]->_state != IFETCH_QUEUE_STATE_EMPTY)
     221              for (uint32_t j=0; j<_param->_nb_instruction; j++)
     222                log_printf(TRACE,Ifetch_queue,FUNCTION,"      * %d 0x%.8x (0x%.8x)", _queue [index]->_instruction_enable[j], _queue [index]->_instruction[j],(_queue [index]->_address+j)<<2);
    220223          }
    221224#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_function_no_assoc_transition.cpp

    r141 r145  
    173173        for (uint32_t i=0; i<_param->_size_queue; i++)
    174174          {
     175            uint32_t index=(i+reg_PTR_READ)%_param->_size_queue;
    175176            log_printf(TRACE,Ifetch_queue,FUNCTION,"    * [%d] 0x%.8x (0x%.8x) %d - %d %d %d - %s",
    176                        i,
    177                        _queue [i]->_address,
    178                        _queue [i]->_address<<2,
    179                        _queue [i]->_inst_ifetch_ptr,
    180                        _queue [i]->_branch_state,
    181                        _queue [i]->_branch_update_prediction_id,
    182                        _queue [i]->_exception,
    183                        toString(_queue [i]->_state).c_str()
     177                       index,
     178                       _queue [index]->_address,
     179                       _queue [index]->_address<<2,
     180                       _queue [index]->_inst_ifetch_ptr,
     181                       _queue [index]->_branch_state,
     182                       _queue [index]->_branch_update_prediction_id,
     183                       _queue [index]->_exception,
     184                       toString(_queue [index]->_state).c_str()
    184185                       );
    185186           
    186             for (uint32_t j=0; j<_param->_nb_instruction; j++)
    187               log_printf(TRACE,Ifetch_queue,FUNCTION,"      * %d 0x%.8x", _queue [i]->_instruction_enable[j], _queue [i]->_instruction[j]);
     187            if (_queue [index]->_state != IFETCH_QUEUE_STATE_EMPTY)
     188              for (uint32_t j=0; j<_param->_nb_instruction; j++)
     189                log_printf(TRACE,Ifetch_queue,FUNCTION,"      * %d 0x%.8x (0x%.8x)", _queue [index]->_instruction_enable[j], _queue [index]->_instruction[j],(_queue [index]->_address+j)<<2);
    188190          }
    189191#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_decod.cpp

    r123 r145  
    7878          //   * branch was not detected
    7979          Tcontrol_t        miss_decod            = (branch_state == BRANCH_STATE_NONE);
    80           Tcontrol_t        can_continue          = false;
     80          Tcontrol_t        can_continue          = PORT_READ(in_DECOD_UPT_CAN_CONTINUE [port]);
    8181
    8282          log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"  * DECOD [%d][%d]          : valid",decod_unit,i);
     
    212212                }
    213213
    214               can_continue = false; // need update upt
     214              // can_continue = false; // need update upt
     215              can_continue &= not take;
    215216            }
    216217          else
     
    218219              log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * hit");
    219220
    220               if (branch_state == BRANCH_STATE_SPEC_NTAKE)
    221                 can_continue = PORT_READ(in_DECOD_UPT_CAN_CONTINUE [port]);
    222               else
    223                 // BRANCH_STATE_NONE       -> miss
    224                 // BRANCH_STATE_NSPEC_TAKE -> take
    225                 // BRANCH_STATE_SPEC_TAKE  -> take
    226                 can_continue = false;
    227 
     221//            can_continue = PORT_READ(in_DECOD_UPT_CAN_CONTINUE [port]);
    228222//            miss_decod = false;
    229223//            // Hit speculation
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp

    r134 r145  
    9090            reg_EVENT_ADDRESS_DEST     [i] = 0; // not necessary
    9191            reg_EVENT_CAN_CONTINUE     [i] = 0; // not necessary
    92 
    9392          }
    9493      }
     
    328327                {
    329328                  // Have a miss !!!
    330                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * miss !!!");
     329                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * miss !!!");
    331330
    332331                  condition   = PORT_READ(in_DECOD_BTB_CONDITION [i]);
     
    350349                  bool flush_ufpt = (not (can_continue and not direction and not miss_ifetch));
    351350
    352                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * can_continue: %d",can_continue);
    353                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * direction   : %d",direction   );
    354                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * miss_ifetch : %d",miss_ifetch );
    355                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * flush_ufpt: %d",flush_ufpt  );
     351                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * can_continue: %d",can_continue);
     352                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * direction   : %d",direction   );
     353                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * miss_ifetch : %d",miss_ifetch );
     354                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"        * flush_ufpt: %d",flush_ufpt  );
    356355
    357356                  // Test if can continue without flushing the ufpt (and ifetch_queue)
     
    378377
    379378                      reg_UPT_EVENT_STATE [context] = UPT_EVENT_STATE_KO_DECODE_UPDATE_CONTEXT;
    380                       log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UPT_EVENT_STATE [%d] <- %s (decod, miss)",context,toString(reg_UPT_EVENT_STATE [context]).c_str());
     379                      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * UPT_EVENT_STATE [%d] <- %s (decod, miss)",context,toString(reg_UPT_EVENT_STATE [context]).c_str());
    381380
    382381                      // Need Flush UPFT
     
    820819                            reg_EVENT_ADDRESS_DEST_VAL[context] = good_take;
    821820                            reg_EVENT_ADDRESS_DEST    [context] = good_addr;
    822                             reg_EVENT_CAN_CONTINUE    [context] = false;
    823                            
     821                            reg_EVENT_CAN_CONTINUE    [context] = true;
     822                            // reg_EVENT_CAN_CONTINUE    [context] = false;
    824823                          }
    825824                       
     
    11841183        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_UFPT_STATE      : %s"  ,toString(reg_UFPT_EVENT_STATE [i]).c_str());
    11851184        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_UPT_STATE       : %s"  ,toString(reg_UPT_EVENT_STATE [i]).c_str());
    1186 //         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_VAL             : %d"  ,reg_EVENT_VAL             [i]);
     1185//      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_VAL             : %d"  ,reg_EVENT_VAL             [i]);
    11871186        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_UPT_PTR         : %d"  ,reg_EVENT_UPT_PTR         [i]);
    11881187        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_UPT_FULL        : %d"  ,reg_EVENT_UPT_FULL        [i]);
    1189 //         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_IS_BRANCH       : %d"  ,reg_EVENT_IS_BRANCH       [i]);
     1188//      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_IS_BRANCH       : %d"  ,reg_EVENT_IS_BRANCH       [i]);
    11901189        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_DEPTH           : %d"  ,reg_EVENT_DEPTH           [i]);
    11911190        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_ADDRESS_SRC     : %.8x (%.8x)",reg_EVENT_ADDRESS_SRC     [i],reg_EVENT_ADDRESS_SRC     [i]<<2);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h

    r142 r145  
    7474  public    : counter_t                     ** _stat_nb_cycle_state_wait_end      ;//[nb_thread]
    7575
    76 // public    : uint32_t                       * _stat_last_inst                    ;//[nb_thread]
     76//public    : uint32_t                       * _stat_last_inst                    ;//[nb_thread]
    7777  public    : uint32_t                       * _stat_last_inst_type               ;//[nb_thread]
    7878  public    : uint32_t                       * _stat_last_inst_operation          ;//[nb_thread]
     
    9797//public    : SC_IN (Tcontext_t         ) ***  in_INSERT_RENAME_UNIT_ID            ;//[nb_rename_unit][nb_inst_insert]
    9898  public    : SC_IN (Tdepth_t           ) ***  in_INSERT_DEPTH                     ;//[nb_rename_unit][nb_inst_insert]
     99  public    : SC_IN (Tcontrol_t         ) ***  in_INSERT_SAVE_RAT                  ;//[nb_rename_unit][nb_inst_insert]
    99100#ifdef STATISTICS
    100101  public    : SC_IN (uint32_t           ) ***  in_INSERT_INSTRUCTION               ;//[nb_rename_unit][nb_inst_insert]
     
    141142  public    : SC_OUT(Tcontext_t         ) *** out_RETIRE_CONTEXT_ID                ;//[nb_rename_unit][nb_inst_retire]
    142143//public    : SC_OUT(Tcontext_t         ) *** out_RETIRE_RENAME_UNIT_ID            ;//[nb_rename_unit][nb_inst_retire]
     144//public    : SC_OUT(Tdepth_t           ) *** out_RETIRE_DEPTH                     ;//[nb_rename_unit][nb_inst_retire]
    143145  public    : SC_OUT(Tcontrol_t         ) *** out_RETIRE_USE_STORE_QUEUE           ;//[nb_rename_unit][nb_inst_retire]
    144146  public    : SC_OUT(Tcontrol_t         ) *** out_RETIRE_USE_LOAD_QUEUE            ;//[nb_rename_unit][nb_inst_retire]
     
    234236  public    : SC_IN (Tcounter_t         ) ***  in_NB_INST_DECOD_ALL                ;//[nb_front_end][nb_context]
    235237                                                                                   
    236     // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
    237   public    : SC_IN (Tdepth_t           ) ***  in_DEPTH_MIN                        ;//[nb_front_end][nb_context]
    238   public    : SC_IN (Tdepth_t           ) ***  in_DEPTH_MAX                        ;//[nb_front_end][nb_context]
    239   public    : SC_IN (Tcontrol_t         ) ***  in_DEPTH_FULL                       ;//[nb_front_end][nb_context]
     238//  // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
     239//public    : SC_IN (Tdepth_t           ) ***  in_DEPTH_MIN                        ;//[nb_front_end][nb_context]
     240//public    : SC_IN (Tdepth_t           ) ***  in_DEPTH_MAX                        ;//[nb_front_end][nb_context]
     241//public    : SC_IN (Tcontrol_t         ) ***  in_DEPTH_FULL                       ;//[nb_front_end][nb_context]
    240242
    241243    // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    272274  private   : Tcounter_t                   ** reg_NB_INST_COMMIT_ALL               ;//[nb_front_end][nb_context]
    273275  private   : Tcounter_t                   ** reg_NB_INST_COMMIT_MEM               ;//[nb_front_end][nb_context]
     276  private   : Tcounter_t                  *** reg_NB_INST_DEPTH                    ;//[nb_front_end][nb_context][nb_branch_speculated]
    274277
    275278  private   : Tcommit_event_state_t        ** reg_EVENT_STATE                      ;//[nb_front_end][nb_context]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Parameters.h

    r139 r145  
    2424  {
    2525    //-----[ fields ]------------------------------------------------------------
    26   public : uint32_t             _nb_front_end                       ;
    27   public : uint32_t           * _nb_context                         ;//[nb_front_end]
    28   public : uint32_t             _nb_rename_unit                     ;
    29   public : uint32_t             _size_queue                         ;
    30   public : uint32_t             _nb_bank                            ;
    31   public : Tretire_ooo_scheme_t _retire_ooo_scheme                  ;
    32   public : uint32_t           * _nb_inst_insert                     ;//[nb_rename_unit]
    33   public : uint32_t           * _nb_inst_retire                     ;//[nb_rename_unit]
    34   public : uint32_t             _nb_inst_commit                     ;
    35   public : uint32_t             _nb_inst_reexecute                  ;
    36   public : uint32_t             _nb_inst_branch_complete            ;
    37   public : uint32_t          ** _nb_branch_speculated               ;//[nb_front_end][nb_context]
    38 //public : uint32_t             _size_general_data                  ;
    39 //public : uint32_t             _size_store_queue_ptr               ;
    40 //public : uint32_t             _size_load_queue_ptr                ;
    41 //public : uint32_t             _size_general_register              ;
    42 //public : uint32_t             _size_special_register              ;
    43   public : Trat_scheme_t      * _rat_scheme                         ;//[nb_front_end]
    44   public : Tpriority_t          _priority                           ;
    45   public : Tload_balancing_t    _load_balancing                     ;
    46   public : uint32_t             _nb_rename_unit_select              ;
    47   public : uint32_t             _nb_thread                          ;
    48   public : uint32_t          ** _translate_num_context_to_num_thread;//[nb_front_end][nb_context]
    49   public : const uint32_t       _nb_bank_access_commit              ;
     26  public : uint32_t               _nb_front_end                       ;
     27  public : uint32_t             * _nb_context                         ;//[nb_front_end]
     28  public : uint32_t               _nb_rename_unit                     ;
     29  public : uint32_t               _size_queue                         ;
     30  public : uint32_t               _nb_bank                            ;
     31  public : Tretire_ooo_scheme_t   _retire_ooo_scheme                  ;
     32  public : uint32_t             * _nb_inst_insert                     ;//[nb_rename_unit]
     33  public : uint32_t             * _nb_inst_retire                           ;//[nb_rename_unit]
     34  public : uint32_t               _nb_inst_commit                     ;
     35  public : uint32_t               _nb_inst_reexecute                  ;
     36  public : uint32_t               _nb_inst_branch_complete            ;
     37  public : uint32_t            ** _nb_branch_speculated               ;//[nb_front_end][nb_context]
     38//public : uint32_t               _size_general_data                  ;
     39//public : uint32_t               _size_store_queue_ptr               ;
     40//public : uint32_t               _size_load_queue_ptr                ;
     41//public : uint32_t               _size_general_register              ;
     42//public : uint32_t               _size_special_register              ;
     43  public : Trat_scheme_t        * _rat_scheme                         ;//[nb_rename_unit]
     44  public : std::vector<uint32_t>* _link_front_end_with_rename_unit    ;//[nb_rename_unit]
    5045
    51   public : uint32_t             _max_nb_context          ;
    52   public : uint32_t             _max_nb_inst_insert      ;
    53   public : uint32_t             _max_nb_inst_retire      ;
    54 //public : uint32_t             _size_address            ;
    55 //public : uint32_t             _size_front_end_id       ;
    56 //public : uint32_t             _size_context_id         ;
    57   public : uint32_t             _size_rename_unit_id     ;   
    58   public : uint32_t             _size_bank               ;
    59 //public : uint32_t             _size_nb_inst            ;
    60 //public : uint32_t             _size_packet_id          ;
    61   public : uint32_t          ** _array_size_depth        ;//[nb_front_end][nb_context]
    62 //public : uint32_t             _max_size_depth          ;
    63                              
    64 //public : Tpacket_t            _shift_num_bank          ;
    65   public : Tpacket_t            _mask_num_bank           ;
    66   public : Tpacket_t            _shift_num_slot          ;
    67 //public : Tpacket_t            _mask_num_slot           ;
     46  public : Tpriority_t            _priority                           ;
     47  public : Tload_balancing_t      _load_balancing                     ;
     48  public : uint32_t               _nb_rename_unit_select              ;
     49  public : uint32_t               _nb_thread                          ;
     50  public : uint32_t            ** _translate_num_context_to_num_thread;//[nb_front_end][nb_context]
     51  public : Trat_scheme_t        * _front_end_rat_scheme               ;//[nb_front_end]
     52  public : const uint32_t         _nb_bank_access_commit              ;
     53                               
     54  public : uint32_t               _max_nb_context          ;
     55  public : uint32_t               _max_nb_inst_insert      ;
     56  public : uint32_t               _max_nb_inst_retire      ;
     57//public : uint32_t               _size_address            ;
     58//public : uint32_t               _size_front_end_id       ;
     59//public : uint32_t               _size_context_id         ;
     60  public : uint32_t               _size_rename_unit_id     ;   
     61  public : uint32_t               _size_bank               ;
     62//public : uint32_t               _size_nb_inst            ;
     63//public : uint32_t               _size_packet_id          ;
     64  public : uint32_t            ** _array_size_depth        ;//[nb_front_end][nb_context]
     65//public : uint32_t               _max_size_depth          ;
     66                               
     67//public : Tpacket_t              _shift_num_bank          ;
     68  public : Tpacket_t              _mask_num_bank           ;
     69  public : Tpacket_t              _shift_num_slot          ;
     70//public : Tpacket_t              _mask_num_slot           ;
    6871                             
    6972                             
     
    7982
    8083    //-----[ methods ]-----------------------------------------------------------
    81   public : Parameters  (uint32_t             nb_front_end                       ,
    82                         uint32_t           * nb_context                         ,//[nb_front_end]
    83                         uint32_t             nb_rename_unit                     ,
    84                         uint32_t             size_queue                         ,
    85                         uint32_t             nb_bank                            ,
    86                         Tretire_ooo_scheme_t retire_ooo_scheme                  ,
    87                         uint32_t           * nb_inst_insert                     ,//[nb_rename_unit]
    88                         uint32_t           * nb_inst_retire                     ,//[nb_rename_unit]
    89                         uint32_t             nb_inst_commit                     ,
    90                         uint32_t             nb_inst_reexecute                  ,
    91                         uint32_t             nb_inst_branch_complete            ,
    92                         uint32_t          ** nb_branch_speculated               ,//[nb_front_end][nb_context]
    93                         uint32_t             size_nb_inst_decod                 ,
    94                         uint32_t             size_general_data                  ,
    95                         uint32_t             size_store_queue_ptr               ,
    96                         uint32_t             size_load_queue_ptr                ,
    97                         uint32_t             size_general_register              ,
    98                         uint32_t             size_special_register              ,
    99                         Trat_scheme_t      * rat_scheme                         ,//[nb_front_end]
    100                         Tpriority_t          priority                           ,
    101                         Tload_balancing_t    load_balancing                     ,
    102                         uint32_t             nb_rename_unit_select              ,
    103                         uint32_t             nb_thread                          ,
    104                         uint32_t          ** translate_num_context_to_num_thread, //[nb_front_end][nb_context]
    105                         bool                 is_toplevel=false
     84  public : Parameters  (uint32_t               nb_front_end                       ,
     85                        uint32_t             * nb_context                         ,//[nb_front_end]
     86                        uint32_t               nb_rename_unit                     ,
     87                        uint32_t               size_queue                         ,
     88                        uint32_t               nb_bank                            ,
     89                        Tretire_ooo_scheme_t   retire_ooo_scheme                  ,
     90                        uint32_t             * nb_inst_insert                     ,//[nb_rename_unit]
     91                        uint32_t             * nb_inst_retire                     ,//[nb_rename_unit]
     92                        uint32_t               nb_inst_commit                     ,
     93                        uint32_t               nb_inst_reexecute                  ,
     94                        uint32_t               nb_inst_branch_complete            ,
     95                        uint32_t            ** nb_branch_speculated               ,//[nb_front_end][nb_context]
     96                        uint32_t               size_nb_inst_decod                 ,
     97                        uint32_t               size_general_data                  ,
     98                        uint32_t               size_store_queue_ptr               ,
     99                        uint32_t               size_load_queue_ptr                ,
     100                        uint32_t               size_general_register              ,
     101                        uint32_t               size_special_register              ,
     102                        Trat_scheme_t        * rat_scheme                         ,//[nb_rename_unit]
     103                        std::vector<uint32_t>* link_front_end_with_rename_unit    ,//[nb_rename_unit]
     104                        Tpriority_t            priority                           ,
     105                        Tload_balancing_t      load_balancing                     ,
     106                        uint32_t               nb_rename_unit_select              ,
     107                        uint32_t               nb_thread                          ,
     108                        uint32_t            ** translate_num_context_to_num_thread, //[nb_front_end][nb_context]
     109                        bool                   is_toplevel=false
    106110                        );
    107111//   public : Parameters  (Parameters & param) ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Types.h

    r139 r145  
    8181  public  : rob_state_t        state                   ;
    8282  public  : rob_state_t        state_old               ;
     83//public  : Tcontrol_t         restore                 ;
     84
    8385  public  : uint32_t           ptr                     ;
    8486  public  : Tcontext_t         front_end_id            ;
     
    207209  };
    208210
     211  template<> inline std::string toString<morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::Tcommit_event_state_t>(const morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::Tcommit_event_state_t& x)
     212  {
     213    switch (x)
     214      {
     215      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::COMMIT_EVENT_STATE_NO_EVENT      : return "COMMIT_EVENT_STATE_NO_EVENT"     ; break;
     216      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::COMMIT_EVENT_STATE_NOT_YET_EVENT : return "COMMIT_EVENT_STATE_NOT_YET_EVENT"; break;
     217      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::COMMIT_EVENT_STATE_EVENT         : return "COMMIT_EVENT_STATE_EVENT"        ; break;
     218//    case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::COMMIT_EVENT_STATE_WAIT_DECOD    : return "COMMIT_EVENT_STATE_WAIT_DECOD"   ; break;
     219      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::COMMIT_EVENT_STATE_WAIT_END      : return "COMMIT_EVENT_STATE_WAIT_END"     ; break;
     220//    case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::COMMIT_EVENT_STATE_END           : return "COMMIT_EVENT_STATE_END"          ; break;
     221
     222      default    : return ""      ; break;
     223      }
     224  };
     225
     226
    209227}; // end namespace morpheo             
    210228
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit.cpp

    r132 r145  
    115115        sensitive << (*(in_CLOCK)).neg() // need internal register
    116116                  << (*(in_NRESET));
     117
     118        for (uint32_t i=0; i<_param->_nb_rename_unit; i++)
     119          if (_param->_rat_scheme[i] == RAT_DEPTH_SAVE)
     120            for (uint32_t j=0; j<_param->_nb_inst_insert[i]; j++)
     121              {
     122                if (_param->_have_port_front_end_id  )
     123                sensitive << (*(in_INSERT_FRONT_END_ID [i][j]));
     124                if (_param->_have_port_context_id  )
     125                sensitive << (*(in_INSERT_CONTEXT_ID   [i][j]));
     126                if (_param->_have_port_depth)
     127                sensitive << (*(in_INSERT_DEPTH        [i][j]));
     128                sensitive << (*(in_INSERT_SAVE_RAT     [i][j]));
     129              }
     130
     131
    117132//      for (uint32_t i=0; i<_param->_nb_rename_unit; i++)
    118133//        for (uint32_t j=0; j<_param->_nb_inst_insert[i]; j++)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp

    r139 r145  
    5959      ALLOC2_INTERFACE_BEGIN("insert", IN, SOUTH, _("Interface with rename_unit."),_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    6060
    61       _ALLOC2_VALACK_IN ( in_INSERT_VAL                     ,VAL,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    62       _ALLOC2_VALACK_OUT(out_INSERT_ACK                     ,ACK,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    63       _ALLOC2_SIGNAL_IN ( in_INSERT_FRONT_END_ID            ,"front_end_id"         ,Tcontext_t        ,_param->_size_front_end_id          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    64       _ALLOC2_SIGNAL_IN ( in_INSERT_CONTEXT_ID              ,"context_id"           ,Tcontext_t        ,_param->_size_context_id            ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    65       _ALLOC2_SIGNAL_OUT(out_INSERT_PACKET_ID               ,"packet_id"            ,Tpacket_t         ,_param->_size_rob_ptr               ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    66 //    _ALLOC2_SIGNAL_IN ( in_INSERT_RENAME_UNIT_ID          ,"rename_unit_id"       ,Tcontext_t        ,_param->_size_rename_unit_id        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    67       _ALLOC2_SIGNAL_IN ( in_INSERT_DEPTH                   ,"depth"                ,Tdepth_t          ,_param->_size_depth                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    68 #ifdef STATISTICS
    69       _ALLOC2_SIGNAL_IN ( in_INSERT_INSTRUCTION             ,"instruction"          ,uint32_t          ,32                                  ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    70 #endif
    71       _ALLOC2_SIGNAL_IN ( in_INSERT_TYPE                    ,"type"                 ,Ttype_t           ,_param->_size_type                  ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    72       _ALLOC2_SIGNAL_IN ( in_INSERT_OPERATION               ,"operation"            ,Toperation_t      ,_param->_size_operation             ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    73       _ALLOC2_SIGNAL_IN ( in_INSERT_NO_EXECUTE              ,"no_execute"           ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    74       _ALLOC2_SIGNAL_IN ( in_INSERT_LAST_EVENT              ,"last_event"           ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    75       _ALLOC2_SIGNAL_IN ( in_INSERT_IS_DELAY_SLOT           ,"is_delay_slot"        ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    76 #ifdef DEBUG
    77       _ALLOC2_SIGNAL_IN ( in_INSERT_ADDRESS                 ,"address"              ,Taddress_t        ,_param->_size_instruction_address   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    78 #endif
    79       _ALLOC2_SIGNAL_IN ( in_INSERT_ADDRESS_NEXT            ,"address_next"         ,Taddress_t        ,_param->_size_instruction_address   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    80       _ALLOC2_SIGNAL_IN ( in_INSERT_EXCEPTION               ,"exception"            ,Texception_t      ,_param->_size_exception             ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    81       _ALLOC2_SIGNAL_IN ( in_INSERT_EXCEPTION_USE           ,"exception_use"        ,Texception_t      ,_param->_size_exception_use         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    82       _ALLOC2_SIGNAL_IN ( in_INSERT_STORE_QUEUE_PTR_WRITE   ,"store_queue_ptr_write",Tlsq_ptr_t        ,_param->_size_store_queue_ptr       ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    83       _ALLOC2_SIGNAL_IN ( in_INSERT_LOAD_QUEUE_PTR_WRITE    ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,_param->_size_load_queue_ptr        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    84 #ifdef DEBUG
    85       _ALLOC2_SIGNAL_IN ( in_INSERT_READ_RA                 ,"read_ra"              ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    86       _ALLOC2_SIGNAL_IN ( in_INSERT_NUM_REG_RA_LOG          ,"num_reg_ra_log"       ,Tgeneral_address_t,_param->_size_general_register_logic,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    87       _ALLOC2_SIGNAL_IN ( in_INSERT_NUM_REG_RA_PHY          ,"num_reg_ra_phy"       ,Tgeneral_address_t,_param->_size_general_register      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    88 #endif
    89       _ALLOC2_SIGNAL_IN ( in_INSERT_READ_RB                 ,"read_rb"              ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    90 #ifdef DEBUG
    91       _ALLOC2_SIGNAL_IN ( in_INSERT_NUM_REG_RB_LOG          ,"num_reg_rb_log"       ,Tgeneral_address_t,_param->_size_general_register_logic,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    92       _ALLOC2_SIGNAL_IN ( in_INSERT_NUM_REG_RB_PHY          ,"num_reg_rb_phy"       ,Tgeneral_address_t,_param->_size_general_register      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    93       _ALLOC2_SIGNAL_IN ( in_INSERT_READ_RC                 ,"read_rc"              ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    94       _ALLOC2_SIGNAL_IN ( in_INSERT_NUM_REG_RC_LOG          ,"num_reg_rc_log"       ,Tspecial_address_t,_param->_size_special_register_logic,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    95       _ALLOC2_SIGNAL_IN ( in_INSERT_NUM_REG_RC_PHY          ,"num_reg_rc_phy"       ,Tspecial_address_t,_param->_size_special_register      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    96 #endif
    97       _ALLOC2_SIGNAL_IN ( in_INSERT_WRITE_RD                ,"write_rd"             ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    98       _ALLOC2_SIGNAL_IN ( in_INSERT_NUM_REG_RD_LOG          ,"num_reg_rd_log"       ,Tgeneral_address_t,_param->_size_general_register_logic,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    99       _ALLOC2_SIGNAL_IN ( in_INSERT_NUM_REG_RD_PHY_OLD      ,"num_reg_rd_phy_old"   ,Tgeneral_address_t,_param->_size_general_register      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    100       _ALLOC2_SIGNAL_IN ( in_INSERT_NUM_REG_RD_PHY_NEW      ,"num_reg_rd_phy_new"   ,Tgeneral_address_t,_param->_size_general_register      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    101       _ALLOC2_SIGNAL_IN ( in_INSERT_WRITE_RE                ,"write_re"             ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    102       _ALLOC2_SIGNAL_IN ( in_INSERT_NUM_REG_RE_LOG          ,"num_reg_re_log"       ,Tspecial_address_t,_param->_size_special_register_logic,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    103       _ALLOC2_SIGNAL_IN ( in_INSERT_NUM_REG_RE_PHY_OLD      ,"num_reg_re_phy_old"   ,Tspecial_address_t,_param->_size_special_register      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    104       _ALLOC2_SIGNAL_IN ( in_INSERT_NUM_REG_RE_PHY_NEW      ,"num_reg_re_phy_new"   ,Tspecial_address_t,_param->_size_special_register      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     61      _ALLOC2_VALACK_IN      ( in_INSERT_VAL                     ,VAL,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     62      _ALLOC2_VALACK_OUT     (out_INSERT_ACK                     ,ACK,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     63      _ALLOC2_SIGNAL_IN      ( in_INSERT_FRONT_END_ID            ,"front_end_id"         ,Tcontext_t        ,_param->_size_front_end_id          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     64      _ALLOC2_SIGNAL_IN      ( in_INSERT_CONTEXT_ID              ,"context_id"           ,Tcontext_t        ,_param->_size_context_id            ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     65      _ALLOC2_SIGNAL_OUT     (out_INSERT_PACKET_ID               ,"packet_id"            ,Tpacket_t         ,_param->_size_rob_ptr               ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     66//    _ALLOC2_SIGNAL_IN      ( in_INSERT_RENAME_UNIT_ID          ,"rename_unit_id"       ,Tcontext_t        ,_param->_size_rename_unit_id        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     67      _ALLOC2_SIGNAL_IN      ( in_INSERT_DEPTH                   ,"depth"                ,Tdepth_t          ,_param->_size_depth                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     68      _ALLOC2_SIGNAL_IN_COND ( in_INSERT_SAVE_RAT                ,"save_rat"             ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_rat_scheme[it1] == RAT_DEPTH_SAVE);
     69#ifdef STATISTICS           
     70      _ALLOC2_SIGNAL_IN      ( in_INSERT_INSTRUCTION             ,"instruction"          ,uint32_t          ,32                                  ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     71#endif                       
     72      _ALLOC2_SIGNAL_IN      ( in_INSERT_TYPE                    ,"type"                 ,Ttype_t           ,_param->_size_type                  ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     73      _ALLOC2_SIGNAL_IN      ( in_INSERT_OPERATION               ,"operation"            ,Toperation_t      ,_param->_size_operation             ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     74      _ALLOC2_SIGNAL_IN      ( in_INSERT_NO_EXECUTE              ,"no_execute"           ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     75      _ALLOC2_SIGNAL_IN      ( in_INSERT_LAST_EVENT              ,"last_event"           ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     76      _ALLOC2_SIGNAL_IN      ( in_INSERT_IS_DELAY_SLOT           ,"is_delay_slot"        ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     77#ifdef DEBUG                 
     78      _ALLOC2_SIGNAL_IN      ( in_INSERT_ADDRESS                 ,"address"              ,Taddress_t        ,_param->_size_instruction_address   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     79#endif                       
     80      _ALLOC2_SIGNAL_IN      ( in_INSERT_ADDRESS_NEXT            ,"address_next"         ,Taddress_t        ,_param->_size_instruction_address   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     81      _ALLOC2_SIGNAL_IN      ( in_INSERT_EXCEPTION               ,"exception"            ,Texception_t      ,_param->_size_exception             ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     82      _ALLOC2_SIGNAL_IN      ( in_INSERT_EXCEPTION_USE           ,"exception_use"        ,Texception_t      ,_param->_size_exception_use         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     83      _ALLOC2_SIGNAL_IN      ( in_INSERT_STORE_QUEUE_PTR_WRITE   ,"store_queue_ptr_write",Tlsq_ptr_t        ,_param->_size_store_queue_ptr       ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     84      _ALLOC2_SIGNAL_IN      ( in_INSERT_LOAD_QUEUE_PTR_WRITE    ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,_param->_size_load_queue_ptr        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     85#ifdef DEBUG                 
     86      _ALLOC2_SIGNAL_IN      ( in_INSERT_READ_RA                 ,"read_ra"              ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     87      _ALLOC2_SIGNAL_IN      ( in_INSERT_NUM_REG_RA_LOG          ,"num_reg_ra_log"       ,Tgeneral_address_t,_param->_size_general_register_logic,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     88      _ALLOC2_SIGNAL_IN      ( in_INSERT_NUM_REG_RA_PHY          ,"num_reg_ra_phy"       ,Tgeneral_address_t,_param->_size_general_register      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     89#endif                       
     90      _ALLOC2_SIGNAL_IN      ( in_INSERT_READ_RB                 ,"read_rb"              ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     91#ifdef DEBUG                 
     92      _ALLOC2_SIGNAL_IN      ( in_INSERT_NUM_REG_RB_LOG          ,"num_reg_rb_log"       ,Tgeneral_address_t,_param->_size_general_register_logic,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     93      _ALLOC2_SIGNAL_IN      ( in_INSERT_NUM_REG_RB_PHY          ,"num_reg_rb_phy"       ,Tgeneral_address_t,_param->_size_general_register      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     94      _ALLOC2_SIGNAL_IN      ( in_INSERT_READ_RC                 ,"read_rc"              ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     95      _ALLOC2_SIGNAL_IN      ( in_INSERT_NUM_REG_RC_LOG          ,"num_reg_rc_log"       ,Tspecial_address_t,_param->_size_special_register_logic,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     96      _ALLOC2_SIGNAL_IN      ( in_INSERT_NUM_REG_RC_PHY          ,"num_reg_rc_phy"       ,Tspecial_address_t,_param->_size_special_register      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     97#endif                       
     98      _ALLOC2_SIGNAL_IN      ( in_INSERT_WRITE_RD                ,"write_rd"             ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     99      _ALLOC2_SIGNAL_IN      ( in_INSERT_NUM_REG_RD_LOG          ,"num_reg_rd_log"       ,Tgeneral_address_t,_param->_size_general_register_logic,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     100      _ALLOC2_SIGNAL_IN      ( in_INSERT_NUM_REG_RD_PHY_OLD      ,"num_reg_rd_phy_old"   ,Tgeneral_address_t,_param->_size_general_register      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     101      _ALLOC2_SIGNAL_IN      ( in_INSERT_NUM_REG_RD_PHY_NEW      ,"num_reg_rd_phy_new"   ,Tgeneral_address_t,_param->_size_general_register      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     102      _ALLOC2_SIGNAL_IN      ( in_INSERT_WRITE_RE                ,"write_re"             ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     103      _ALLOC2_SIGNAL_IN      ( in_INSERT_NUM_REG_RE_LOG          ,"num_reg_re_log"       ,Tspecial_address_t,_param->_size_special_register_logic,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     104      _ALLOC2_SIGNAL_IN      ( in_INSERT_NUM_REG_RE_PHY_OLD      ,"num_reg_re_phy_old"   ,Tspecial_address_t,_param->_size_special_register      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     105      _ALLOC2_SIGNAL_IN      ( in_INSERT_NUM_REG_RE_PHY_NEW      ,"num_reg_re_phy_new"   ,Tspecial_address_t,_param->_size_special_register      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    105106
    106107      ALLOC2_INTERFACE_END(_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     
    116117      _ALLOC2_SIGNAL_OUT(out_RETIRE_CONTEXT_ID              ,"context_id"           ,Tcontext_t        ,_param->_size_context_id            ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);   
    117118//    _ALLOC2_SIGNAL_OUT(out_RETIRE_RENAME_UNIT_ID          ,"rename_unit_id"       ,Tcontext_t        ,_param->_size_rename_unit_id        ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     119//    _ALLOC2_SIGNAL_OUT_COND(out_RETIRE_DEPTH              ,"depth"                ,Tdepth_t          ,_param->_size_depth                 ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],_param->_rat_scheme[it1] == RAT_DEPTH_SAVE);
    118120      _ALLOC2_SIGNAL_OUT(out_RETIRE_USE_STORE_QUEUE         ,"use_store_queue"      ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    119121      _ALLOC2_SIGNAL_OUT(out_RETIRE_USE_LOAD_QUEUE          ,"use_load_queue"       ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     
    150152//    _ALLOC2_SIGNAL_OUT     (out_RETIRE_EVENT_FLUSH ,"flush"      ,Tcontrol_t        ,1                        ,_param->_nb_front_end,_param->_nb_context[it1]);
    151153      _ALLOC2_SIGNAL_OUT     (out_RETIRE_EVENT_STOP  ,"stop"       ,Tcontrol_t        ,1                        ,_param->_nb_front_end,_param->_nb_context[it1]);
    152       _ALLOC2_SIGNAL_OUT_COND(out_RETIRE_EVENT_TYPE  ,"type"       ,Tevent_type_t     ,_param->_size_event_type ,_param->_nb_front_end,_param->_nb_context[it1],_param->_rat_scheme[it1] == RAT_DEPTH_SAVE);
    153       _ALLOC2_SIGNAL_OUT_COND(out_RETIRE_EVENT_DEPTH ,"depth"      ,Tdepth_t          ,_param->_size_depth      ,_param->_nb_front_end,_param->_nb_context[it1],_param->_rat_scheme[it1] == RAT_DEPTH_SAVE);
     154      _ALLOC2_SIGNAL_OUT_COND(out_RETIRE_EVENT_TYPE  ,"type"       ,Tevent_type_t     ,_param->_size_event_type ,_param->_nb_front_end,_param->_nb_context[it1],_param->_front_end_rat_scheme[it1] == RAT_DEPTH_SAVE);
     155      _ALLOC2_SIGNAL_OUT_COND(out_RETIRE_EVENT_DEPTH ,"depth"      ,Tdepth_t          ,_param->_size_depth      ,_param->_nb_front_end,_param->_nb_context[it1],_param->_front_end_rat_scheme[it1] == RAT_DEPTH_SAVE);
    154156
    155157      ALLOC2_INTERFACE_END(_param->_nb_front_end,_param->_nb_context[it1]);
     
    255257    }
    256258
    257     // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    258     {
    259       ALLOC2_INTERFACE_BEGIN("depth",IN,WEST,_("Interface with Prediction unit."),_param->_nb_front_end, _param->_nb_context[it1]);
    260 
    261       _ALLOC2_SIGNAL_IN ( in_DEPTH_MIN                     ,"min"      ,Tdepth_t           ,_param->_size_depth,_param->_nb_front_end, _param->_nb_context[it1]);
    262       _ALLOC2_SIGNAL_IN ( in_DEPTH_MAX                     ,"max"      ,Tdepth_t           ,_param->_size_depth,_param->_nb_front_end, _param->_nb_context[it1]);
    263       _ALLOC2_SIGNAL_IN ( in_DEPTH_FULL                    ,"full"     ,Tcontrol_t         ,1                  ,_param->_nb_front_end, _param->_nb_context[it1]);
    264 
    265       ALLOC2_INTERFACE_END(_param->_nb_front_end, _param->_nb_context[it1]);
    266     }
     259//  // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     260//  {
     261//    ALLOC2_INTERFACE_BEGIN("depth",IN,WEST,_("Interface with Prediction unit."),_param->_nb_front_end, _param->_nb_context[it1]);
     262//
     263//    _ALLOC2_SIGNAL_IN ( in_DEPTH_MIN                     ,"min"      ,Tdepth_t           ,_param->_size_depth,_param->_nb_front_end, _param->_nb_context[it1]);
     264//    _ALLOC2_SIGNAL_IN ( in_DEPTH_MAX                     ,"max"      ,Tdepth_t           ,_param->_size_depth,_param->_nb_front_end, _param->_nb_context[it1]);
     265//    _ALLOC2_SIGNAL_IN ( in_DEPTH_FULL                    ,"full"     ,Tcontrol_t         ,1                  ,_param->_nb_front_end, _param->_nb_context[it1]);
     266//
     267//    ALLOC2_INTERFACE_END(_param->_nb_front_end, _param->_nb_context[it1]);
     268//  }
    267269
    268270
     
    332334
    333335    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    334     ALLOC2(_nb_cycle_idle           ,double               ,_param->_nb_front_end,_param->_nb_context [it1]);
    335     ALLOC1(_rob                     ,std::list<entry_t*>  ,_param->_nb_bank);
     336    ALLOC2     (_nb_cycle_idle           ,double               ,_param->_nb_front_end,_param->_nb_context [it1]);
     337    ALLOC1     (_rob                     ,std::list<entry_t*>  ,_param->_nb_bank);
     338               
     339    ALLOC1     (reg_BANK_PTR             ,uint32_t             ,_param->_nb_bank);
     340                                                         
     341    ALLOC2     (reg_NB_INST_COMMIT_ALL   ,Tcounter_t           ,_param->_nb_front_end,_param->_nb_context [it1]);
     342    ALLOC2     (reg_NB_INST_COMMIT_MEM   ,Tcounter_t           ,_param->_nb_front_end,_param->_nb_context [it1]);
     343    ALLOC3_COND(reg_NB_INST_DEPTH        ,Tcounter_t           ,_param->_nb_front_end,_param->_nb_context [it1],_param->_nb_branch_speculated[it1][it2],_param->_front_end_rat_scheme[it1] == RAT_DEPTH_SAVE);
     344    ALLOC2     (reg_EVENT_STATE          ,Tcommit_event_state_t,_param->_nb_front_end,_param->_nb_context [it1]);
     345    ALLOC2     (reg_EVENT_TYPE           ,Tevent_type_t        ,_param->_nb_front_end,_param->_nb_context [it1]);
     346//  ALLOC2     (reg_EVENT_FLUSH          ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
     347//  ALLOC2     (reg_EVENT_STOP           ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
     348//  ALLOC2     (reg_EVENT_NUM_BANK       ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
     349//  ALLOC2     (reg_EVENT_NUM_PTR        ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
     350//  ALLOC2     (reg_EVENT_CAN_RESTART    ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
     351    ALLOC2     (reg_EVENT_PACKET         ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
     352    ALLOC2     (reg_EVENT_DEPTH          ,Tdepth_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
     353    ALLOC2     (reg_EVENT_NB_INST        ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
     354    ALLOC2     (reg_EVENT_LAST           ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
     355    ALLOC2     (reg_EVENT_LAST_NUM_BANK  ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
     356    ALLOC2     (reg_EVENT_LAST_NUM_PTR   ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
     357               
     358    ALLOC2     (reg_EVENT_NEXT_STOP      ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
     359    ALLOC2     (reg_EVENT_NEXT_PACKET    ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
     360                                                               
     361//  ALLOC2     (reg_PC_PREVIOUS          ,Taddress_t           ,_param->_nb_front_end,_param->_nb_context [it1]);
     362    ALLOC2     (reg_PC_CURRENT           ,Taddress_t           ,_param->_nb_front_end,_param->_nb_context [it1]);
     363    ALLOC2     (reg_PC_CURRENT_IS_DS     ,Taddress_t           ,_param->_nb_front_end,_param->_nb_context [it1]);
     364    ALLOC2     (reg_PC_CURRENT_IS_DS_TAKE,Taddress_t           ,_param->_nb_front_end,_param->_nb_context [it1]);
     365    ALLOC2     (reg_PC_NEXT              ,Taddress_t           ,_param->_nb_front_end,_param->_nb_context [it1]);
     366               
     367    ALLOC3     (rat_gpr_update_table     ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1],_param->_nb_general_register_logic);
     368    ALLOC3     (rat_spr_update_table     ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1],_param->_nb_special_register_logic);
     369
    336370   
    337     ALLOC1(reg_BANK_PTR             ,uint32_t             ,_param->_nb_bank);
    338                                                          
    339     ALLOC2(reg_NB_INST_COMMIT_ALL   ,Tcounter_t           ,_param->_nb_front_end,_param->_nb_context [it1]);
    340     ALLOC2(reg_NB_INST_COMMIT_MEM   ,Tcounter_t           ,_param->_nb_front_end,_param->_nb_context [it1]);
    341    
    342     ALLOC2(reg_EVENT_STATE          ,Tcommit_event_state_t,_param->_nb_front_end,_param->_nb_context [it1]);
    343     ALLOC2(reg_EVENT_TYPE           ,Tevent_type_t        ,_param->_nb_front_end,_param->_nb_context [it1]);
    344 //  ALLOC2(reg_EVENT_FLUSH          ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
    345 //  ALLOC2(reg_EVENT_STOP           ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
    346 //  ALLOC2(reg_EVENT_NUM_BANK       ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
    347 //  ALLOC2(reg_EVENT_NUM_PTR        ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
    348 //  ALLOC2(reg_EVENT_CAN_RESTART    ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
    349     ALLOC2(reg_EVENT_PACKET         ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
    350     ALLOC2(reg_EVENT_DEPTH          ,Tdepth_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
    351     ALLOC2(reg_EVENT_NB_INST        ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
    352     ALLOC2(reg_EVENT_LAST           ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
    353     ALLOC2(reg_EVENT_LAST_NUM_BANK  ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
    354     ALLOC2(reg_EVENT_LAST_NUM_PTR   ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
    355 
    356     ALLOC2(reg_EVENT_NEXT_STOP      ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
    357     ALLOC2(reg_EVENT_NEXT_PACKET    ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
    358                                                          
    359 //  ALLOC2(reg_PC_PREVIOUS          ,Taddress_t           ,_param->_nb_front_end,_param->_nb_context [it1]);
    360     ALLOC2(reg_PC_CURRENT           ,Taddress_t           ,_param->_nb_front_end,_param->_nb_context [it1]);
    361     ALLOC2(reg_PC_CURRENT_IS_DS     ,Taddress_t           ,_param->_nb_front_end,_param->_nb_context [it1]);
    362     ALLOC2(reg_PC_CURRENT_IS_DS_TAKE,Taddress_t           ,_param->_nb_front_end,_param->_nb_context [it1]);
    363     ALLOC2(reg_PC_NEXT              ,Taddress_t           ,_param->_nb_front_end,_param->_nb_context [it1]);
    364 
    365     ALLOC3(rat_gpr_update_table     ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1],_param->_nb_general_register_logic);
    366     ALLOC3(rat_spr_update_table     ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1],_param->_nb_special_register_logic);
    367371      }
    368372
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp

    r139 r145  
    2828        delete    in_NRESET;
    2929
    30         DELETE2_SIGNAL( in_INSERT_VAL                     ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
    31         DELETE2_SIGNAL(out_INSERT_ACK                     ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
    32         DELETE2_SIGNAL( in_INSERT_FRONT_END_ID            ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_front_end_id          );
    33         DELETE2_SIGNAL( in_INSERT_CONTEXT_ID              ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_context_id            );
    34         DELETE2_SIGNAL(out_INSERT_PACKET_ID               ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_rob_ptr               );
    35 //      DELETE2_SIGNAL( in_INSERT_RENAME_UNIT_ID          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_rename_unit_id        );
    36         DELETE2_SIGNAL( in_INSERT_DEPTH                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_depth                 );
    37 #ifdef STATISTICS
    38         DELETE2_SIGNAL( in_INSERT_INSTRUCTION             ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],32);
    39 #endif
    40         DELETE2_SIGNAL( in_INSERT_TYPE                    ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_type                  );
    41         DELETE2_SIGNAL( in_INSERT_OPERATION               ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_operation             );
    42         DELETE2_SIGNAL( in_INSERT_NO_EXECUTE              ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
    43         DELETE2_SIGNAL( in_INSERT_LAST_EVENT              ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
    44         DELETE2_SIGNAL( in_INSERT_IS_DELAY_SLOT           ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
    45 #ifdef DEBUG
    46         DELETE2_SIGNAL( in_INSERT_ADDRESS                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_instruction_address               );
    47 #endif
    48         DELETE2_SIGNAL( in_INSERT_ADDRESS_NEXT            ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_instruction_address               );
    49         DELETE2_SIGNAL( in_INSERT_EXCEPTION               ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_exception             );
    50         DELETE2_SIGNAL( in_INSERT_EXCEPTION_USE           ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_exception             );
    51         DELETE2_SIGNAL( in_INSERT_STORE_QUEUE_PTR_WRITE   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_store_queue_ptr       );
    52         DELETE2_SIGNAL( in_INSERT_LOAD_QUEUE_PTR_WRITE    ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_load_queue_ptr        );
    53 #ifdef DEBUG
    54         DELETE2_SIGNAL( in_INSERT_READ_RA                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
    55         DELETE2_SIGNAL( in_INSERT_NUM_REG_RA_LOG          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_general_register_logic);
    56         DELETE2_SIGNAL( in_INSERT_NUM_REG_RA_PHY          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_general_register      );
    57 #endif
    58         DELETE2_SIGNAL( in_INSERT_READ_RB                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
    59 #ifdef DEBUG
    60         DELETE2_SIGNAL( in_INSERT_NUM_REG_RB_LOG          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_general_register_logic);
    61         DELETE2_SIGNAL( in_INSERT_NUM_REG_RB_PHY          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_general_register      );
    62         DELETE2_SIGNAL( in_INSERT_READ_RC                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
    63         DELETE2_SIGNAL( in_INSERT_NUM_REG_RC_LOG          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_special_register_logic);
    64         DELETE2_SIGNAL( in_INSERT_NUM_REG_RC_PHY          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_special_register      );
    65 #endif
    66         DELETE2_SIGNAL( in_INSERT_WRITE_RD                ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
    67         DELETE2_SIGNAL( in_INSERT_NUM_REG_RD_LOG          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_general_register_logic);
    68         DELETE2_SIGNAL( in_INSERT_NUM_REG_RD_PHY_OLD      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_general_register      );
    69         DELETE2_SIGNAL( in_INSERT_NUM_REG_RD_PHY_NEW      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_general_register      );
    70         DELETE2_SIGNAL( in_INSERT_WRITE_RE                ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
    71         DELETE2_SIGNAL( in_INSERT_NUM_REG_RE_LOG          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_special_register_logic);
    72         DELETE2_SIGNAL( in_INSERT_NUM_REG_RE_PHY_OLD      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_special_register      );
    73         DELETE2_SIGNAL( in_INSERT_NUM_REG_RE_PHY_NEW      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_special_register      );
     30        DELETE2_SIGNAL     ( in_INSERT_VAL                     ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
     31        DELETE2_SIGNAL     (out_INSERT_ACK                     ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
     32        DELETE2_SIGNAL     ( in_INSERT_FRONT_END_ID            ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_front_end_id          );
     33        DELETE2_SIGNAL     ( in_INSERT_CONTEXT_ID              ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_context_id            );
     34        DELETE2_SIGNAL     (out_INSERT_PACKET_ID               ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_rob_ptr               );
     35//      DELETE2_SIGNAL     ( in_INSERT_RENAME_UNIT_ID          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_rename_unit_id        );
     36        DELETE2_SIGNAL     ( in_INSERT_DEPTH                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_depth                 );
     37        DELETE2_SIGNAL_COND( in_INSERT_SAVE_RAT                ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   ,_param->_rat_scheme[it1] == RAT_DEPTH_SAVE);
     38#ifdef STATISTICS         
     39        DELETE2_SIGNAL     ( in_INSERT_INSTRUCTION             ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],32);
     40#endif                     
     41        DELETE2_SIGNAL     ( in_INSERT_TYPE                    ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_type                  );
     42        DELETE2_SIGNAL     ( in_INSERT_OPERATION               ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_operation             );
     43        DELETE2_SIGNAL     ( in_INSERT_NO_EXECUTE              ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
     44        DELETE2_SIGNAL     ( in_INSERT_LAST_EVENT              ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
     45        DELETE2_SIGNAL     ( in_INSERT_IS_DELAY_SLOT           ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
     46#ifdef DEBUG               
     47        DELETE2_SIGNAL     ( in_INSERT_ADDRESS                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_instruction_address   );
     48#endif                     
     49        DELETE2_SIGNAL     ( in_INSERT_ADDRESS_NEXT            ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_instruction_address   );
     50        DELETE2_SIGNAL     ( in_INSERT_EXCEPTION               ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_exception             );
     51        DELETE2_SIGNAL     ( in_INSERT_EXCEPTION_USE           ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_exception             );
     52        DELETE2_SIGNAL     ( in_INSERT_STORE_QUEUE_PTR_WRITE   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_store_queue_ptr       );
     53        DELETE2_SIGNAL     ( in_INSERT_LOAD_QUEUE_PTR_WRITE    ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_load_queue_ptr        );
     54#ifdef DEBUG               
     55        DELETE2_SIGNAL     ( in_INSERT_READ_RA                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
     56        DELETE2_SIGNAL     ( in_INSERT_NUM_REG_RA_LOG          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_general_register_logic);
     57        DELETE2_SIGNAL     ( in_INSERT_NUM_REG_RA_PHY          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_general_register      );
     58#endif                     
     59        DELETE2_SIGNAL     ( in_INSERT_READ_RB                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
     60#ifdef DEBUG               
     61        DELETE2_SIGNAL     ( in_INSERT_NUM_REG_RB_LOG          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_general_register_logic);
     62        DELETE2_SIGNAL     ( in_INSERT_NUM_REG_RB_PHY          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_general_register      );
     63        DELETE2_SIGNAL     ( in_INSERT_READ_RC                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
     64        DELETE2_SIGNAL     ( in_INSERT_NUM_REG_RC_LOG          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_special_register_logic);
     65        DELETE2_SIGNAL     ( in_INSERT_NUM_REG_RC_PHY          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_special_register      );
     66#endif                     
     67        DELETE2_SIGNAL     ( in_INSERT_WRITE_RD                ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
     68        DELETE2_SIGNAL     ( in_INSERT_NUM_REG_RD_LOG          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_general_register_logic);
     69        DELETE2_SIGNAL     ( in_INSERT_NUM_REG_RD_PHY_OLD      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_general_register      );
     70        DELETE2_SIGNAL     ( in_INSERT_NUM_REG_RD_PHY_NEW      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_general_register      );
     71        DELETE2_SIGNAL     ( in_INSERT_WRITE_RE                ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
     72        DELETE2_SIGNAL     ( in_INSERT_NUM_REG_RE_LOG          ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_special_register_logic);
     73        DELETE2_SIGNAL     ( in_INSERT_NUM_REG_RE_PHY_OLD      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_special_register      );
     74        DELETE2_SIGNAL     ( in_INSERT_NUM_REG_RE_PHY_NEW      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_special_register      );
    7475
    7576        DELETE2_SIGNAL(out_RETIRE_VAL                     ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],1                                   );
     
    7879        DELETE2_SIGNAL(out_RETIRE_CONTEXT_ID              ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],_param->_size_context_id            );   
    7980//      DELETE2_SIGNAL(out_RETIRE_RENAME_UNIT_ID          ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],_param->_size_rename_unit_id        );
     81//      DELETE2_SIGNAL_COND(out_RETIRE_DEPTH              ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],_param->_size_depth                 ,_param->_rat_scheme[it1] == RAT_DEPTH_SAVE);
    8082        DELETE2_SIGNAL(out_RETIRE_USE_STORE_QUEUE         ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],1                                   );
    8183        DELETE2_SIGNAL(out_RETIRE_USE_LOAD_QUEUE          ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],1                                   );
    8284        DELETE2_SIGNAL(out_RETIRE_STORE_QUEUE_PTR_WRITE   ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],_param->_size_store_queue_ptr       );
    8385        DELETE2_SIGNAL(out_RETIRE_LOAD_QUEUE_PTR_WRITE    ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],_param->_size_load_queue_ptr        );
    84 //         DELETE2_SIGNAL(out_RETIRE_READ_RA                 ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],1                                   );
    85 //         DELETE2_SIGNAL(out_RETIRE_NUM_REG_RA_PHY          ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],_param->_size_general_register      );
    86 //         DELETE2_SIGNAL(out_RETIRE_READ_RB                 ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],1                                   );
    87 //         DELETE2_SIGNAL(out_RETIRE_NUM_REG_RB_PHY          ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],_param->_size_general_register      );
    88 //         DELETE2_SIGNAL(out_RETIRE_READ_RC                 ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],1                                   );
    89 //         DELETE2_SIGNAL(out_RETIRE_NUM_REG_RC_PHY          ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],_param->_size_special_register      );
     86//      DELETE2_SIGNAL(out_RETIRE_READ_RA                 ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],1                                   );
     87//      DELETE2_SIGNAL(out_RETIRE_NUM_REG_RA_PHY          ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],_param->_size_general_register      );
     88//      DELETE2_SIGNAL(out_RETIRE_READ_RB                 ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],1                                   );
     89//      DELETE2_SIGNAL(out_RETIRE_NUM_REG_RB_PHY          ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],_param->_size_general_register      );
     90//      DELETE2_SIGNAL(out_RETIRE_READ_RC                 ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],1                                   );
     91//      DELETE2_SIGNAL(out_RETIRE_NUM_REG_RC_PHY          ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],_param->_size_special_register      );
    9092        DELETE2_SIGNAL(out_RETIRE_WRITE_RD                ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],1                                   );
    9193        DELETE2_SIGNAL(out_RETIRE_NUM_REG_RD_LOG          ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],_param->_size_general_register_logic);
     
    105107//      DELETE2_SIGNAL     (out_RETIRE_EVENT_FLUSH             ,_param->_nb_front_end,_param->_nb_context[it1],1);
    106108        DELETE2_SIGNAL     (out_RETIRE_EVENT_STOP              ,_param->_nb_front_end,_param->_nb_context[it1],1);
    107         DELETE2_SIGNAL_COND(out_RETIRE_EVENT_TYPE              ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_event_type,_param->_rat_scheme[it1] == RAT_DEPTH_SAVE);
    108         DELETE2_SIGNAL_COND(out_RETIRE_EVENT_DEPTH             ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_depth     ,_param->_rat_scheme[it1] == RAT_DEPTH_SAVE);
     109        DELETE2_SIGNAL_COND(out_RETIRE_EVENT_TYPE              ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_event_type,_param->_front_end_rat_scheme[it1] == RAT_DEPTH_SAVE);
     110        DELETE2_SIGNAL_COND(out_RETIRE_EVENT_DEPTH             ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_depth     ,_param->_front_end_rat_scheme[it1] == RAT_DEPTH_SAVE);
    109111
    110112        DELETE1_SIGNAL( in_COMMIT_VAL               ,_param->_nb_inst_commit,1                             );
     
    164166        DELETE2_SIGNAL( in_NB_INST_DECOD_ALL              ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_nb_inst_decod);
    165167
    166         DELETE2_SIGNAL( in_DEPTH_MIN                      ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_depth);
    167         DELETE2_SIGNAL( in_DEPTH_MAX                      ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_depth);
    168         DELETE2_SIGNAL( in_DEPTH_FULL                     ,_param->_nb_front_end, _param->_nb_context[it1],1);
     168//      DELETE2_SIGNAL( in_DEPTH_MIN                      ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_depth);
     169//      DELETE2_SIGNAL( in_DEPTH_MAX                      ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_depth);
     170//      DELETE2_SIGNAL( in_DEPTH_FULL                     ,_param->_nb_front_end, _param->_nb_context[it1],1);
    169171
    170172        DELETE2_SIGNAL( in_SPR_READ_SR_OVE                ,_param->_nb_front_end, _param->_nb_context[it1],1);
     
    221223            }
    222224
    223         DELETE2(_nb_cycle_idle           ,_param->_nb_front_end,_param->_nb_context [it1]);
    224         DELETE1(_rob                     ,_param->_nb_bank);
    225         DELETE1(reg_BANK_PTR             ,_param->_nb_bank);
    226         DELETE2(reg_NB_INST_COMMIT_ALL   ,_param->_nb_front_end,_param->_nb_context [it1]);
    227         DELETE2(reg_NB_INST_COMMIT_MEM   ,_param->_nb_front_end,_param->_nb_context [it1]);
    228 
    229         DELETE2(reg_EVENT_STATE          ,_param->_nb_front_end,_param->_nb_context [it1]);
    230         DELETE2(reg_EVENT_TYPE           ,_param->_nb_front_end,_param->_nb_context [it1]);
    231 //      DELETE2(reg_EVENT_FLUSH          ,_param->_nb_front_end,_param->_nb_context [it1]);
    232 //      DELETE2(reg_EVENT_STOP           ,_param->_nb_front_end,_param->_nb_context [it1]);
    233 //      DELETE2(reg_EVENT_NUM_BANK       ,_param->_nb_front_end,_param->_nb_context [it1]);
    234 //      DELETE2(reg_EVENT_NUM_PTR        ,_param->_nb_front_end,_param->_nb_context [it1]);
    235 //      DELETE2(reg_EVENT_CAN_RESTART    ,_param->_nb_front_end,_param->_nb_context [it1]);
    236         DELETE2(reg_EVENT_PACKET         ,_param->_nb_front_end,_param->_nb_context [it1]);
    237         DELETE2(reg_EVENT_DEPTH          ,_param->_nb_front_end,_param->_nb_context [it1]);
    238         DELETE2(reg_EVENT_NB_INST        ,_param->_nb_front_end,_param->_nb_context [it1]);
    239         DELETE2(reg_EVENT_LAST           ,_param->_nb_front_end,_param->_nb_context [it1]);
    240         DELETE2(reg_EVENT_LAST_NUM_BANK  ,_param->_nb_front_end,_param->_nb_context [it1]);
    241         DELETE2(reg_EVENT_LAST_NUM_PTR   ,_param->_nb_front_end,_param->_nb_context [it1]);
    242 
    243         DELETE2(reg_EVENT_NEXT_STOP      ,_param->_nb_front_end,_param->_nb_context [it1]);
    244         DELETE2(reg_EVENT_NEXT_PACKET    ,_param->_nb_front_end,_param->_nb_context [it1]);
    245 
    246 //      DELETE2(reg_PC_PREVIOUS          ,_param->_nb_front_end,_param->_nb_context [it1]);
    247         DELETE2(reg_PC_CURRENT           ,_param->_nb_front_end,_param->_nb_context [it1]);
    248         DELETE2(reg_PC_CURRENT_IS_DS     ,_param->_nb_front_end,_param->_nb_context [it1]);
    249         DELETE2(reg_PC_CURRENT_IS_DS_TAKE,_param->_nb_front_end,_param->_nb_context [it1]);
    250         DELETE2(reg_PC_NEXT              ,_param->_nb_front_end,_param->_nb_context [it1]);
    251 
    252         DELETE3(rat_gpr_update_table     ,_param->_nb_front_end,_param->_nb_context [it1],_param->_nb_general_register_logic);
    253         DELETE3(rat_spr_update_table     ,_param->_nb_front_end,_param->_nb_context [it1],_param->_nb_special_register_logic);
     225        DELETE2     (_nb_cycle_idle           ,_param->_nb_front_end,_param->_nb_context [it1]);
     226        DELETE1     (_rob                     ,_param->_nb_bank);
     227        DELETE1     (reg_BANK_PTR             ,_param->_nb_bank);
     228        DELETE2     (reg_NB_INST_COMMIT_ALL   ,_param->_nb_front_end,_param->_nb_context [it1]);
     229        DELETE2     (reg_NB_INST_COMMIT_MEM   ,_param->_nb_front_end,_param->_nb_context [it1]);
     230        DELETE3_COND(reg_NB_INST_DEPTH        ,_param->_nb_front_end,_param->_nb_context [it1],_param->_nb_branch_speculated[it1][it2],_param->_front_end_rat_scheme[it1] == RAT_DEPTH_SAVE);
     231
     232        DELETE2     (reg_EVENT_STATE          ,_param->_nb_front_end,_param->_nb_context [it1]);
     233        DELETE2     (reg_EVENT_TYPE           ,_param->_nb_front_end,_param->_nb_context [it1]);
     234//      DELETE2     (reg_EVENT_FLUSH          ,_param->_nb_front_end,_param->_nb_context [it1]);
     235//      DELETE2     (reg_EVENT_STOP           ,_param->_nb_front_end,_param->_nb_context [it1]);
     236//      DELETE2     (reg_EVENT_NUM_BANK       ,_param->_nb_front_end,_param->_nb_context [it1]);
     237//      DELETE2     (reg_EVENT_NUM_PTR        ,_param->_nb_front_end,_param->_nb_context [it1]);
     238//      DELETE2     (reg_EVENT_CAN_RESTART    ,_param->_nb_front_end,_param->_nb_context [it1]);
     239        DELETE2     (reg_EVENT_PACKET         ,_param->_nb_front_end,_param->_nb_context [it1]);
     240        DELETE2     (reg_EVENT_DEPTH          ,_param->_nb_front_end,_param->_nb_context [it1]);
     241        DELETE2     (reg_EVENT_NB_INST        ,_param->_nb_front_end,_param->_nb_context [it1]);
     242        DELETE2     (reg_EVENT_LAST           ,_param->_nb_front_end,_param->_nb_context [it1]);
     243        DELETE2     (reg_EVENT_LAST_NUM_BANK  ,_param->_nb_front_end,_param->_nb_context [it1]);
     244        DELETE2     (reg_EVENT_LAST_NUM_PTR   ,_param->_nb_front_end,_param->_nb_context [it1]);
     245                   
     246        DELETE2     (reg_EVENT_NEXT_STOP      ,_param->_nb_front_end,_param->_nb_context [it1]);
     247        DELETE2     (reg_EVENT_NEXT_PACKET    ,_param->_nb_front_end,_param->_nb_context [it1]);
     248                   
     249//      DELETE2     (reg_PC_PREVIOUS          ,_param->_nb_front_end,_param->_nb_context [it1]);
     250        DELETE2     (reg_PC_CURRENT           ,_param->_nb_front_end,_param->_nb_context [it1]);
     251        DELETE2     (reg_PC_CURRENT_IS_DS     ,_param->_nb_front_end,_param->_nb_context [it1]);
     252        DELETE2     (reg_PC_CURRENT_IS_DS_TAKE,_param->_nb_front_end,_param->_nb_context [it1]);
     253        DELETE2     (reg_PC_NEXT              ,_param->_nb_front_end,_param->_nb_context [it1]);
     254                   
     255        DELETE3     (rat_gpr_update_table     ,_param->_nb_front_end,_param->_nb_context [it1],_param->_nb_general_register_logic);
     256        DELETE3     (rat_spr_update_table     ,_param->_nb_front_end,_param->_nb_context [it1],_param->_nb_special_register_logic);
    254257      }
    255258
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMealy_insert.cpp

    r124 r145  
    101101                    if (not bank_full [num_bank])
    102102                      {
    103                         // find !!!
    104                         insert_ack       [num_rename_unit][num_inst_insert] = true;
     103                        bool cond = true;
     104
     105                        if (_param->_rat_scheme[num_rename_unit] == RAT_DEPTH_SAVE)
     106                          {
     107                            Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_INSERT_FRONT_END_ID [num_rename_unit][num_inst_insert]):0;
     108                            Tcontext_t context_id   = (_param->_have_port_context_id  )?PORT_READ(in_INSERT_CONTEXT_ID   [num_rename_unit][num_inst_insert]):0;
     109                            Tdepth_t   depth        = (_param->_have_port_depth       )?PORT_READ(in_INSERT_DEPTH        [num_rename_unit][num_inst_insert]):0;
     110                            Tcontrol_t save_rat     =                                   PORT_READ(in_INSERT_SAVE_RAT     [num_rename_unit][num_inst_insert]);
     111
     112                            cond = not (save_rat and (reg_NB_INST_DEPTH[front_end_id][context_id][depth]>0));
     113
     114                            log_printf(TRACE,Commit_unit,FUNCTION,"        * front_end_id : %d",front_end_id);
     115                            log_printf(TRACE,Commit_unit,FUNCTION,"        * context_id   : %d",context_id  );
     116                            log_printf(TRACE,Commit_unit,FUNCTION,"        * depth        : %d",depth       );
     117                            log_printf(TRACE,Commit_unit,FUNCTION,"        * save_rat     : %d",save_rat    );
     118                            log_printf(TRACE,Commit_unit,FUNCTION,"        * cond         : %d",cond        );
     119                           
     120                          }
    105121                       
    106                         Tpacket_t packet_id = ((reg_BANK_PTR [num_bank] << _param->_shift_num_slot) | num_bank);
    107                        
     122                        if (cond)
     123                          {
     124                            // find !!!
     125                            insert_ack       [num_rename_unit][num_inst_insert] = true;
     126                           
     127                            Tpacket_t packet_id = ((reg_BANK_PTR [num_bank] << _param->_shift_num_slot) | num_bank);
     128                           
    108129#ifdef SYSTEMC_VHDL_COMPATIBILITY
    109                         insert_packet_id [num_rename_unit][num_inst_insert] = packet_id;
     130                            insert_packet_id [num_rename_unit][num_inst_insert] = packet_id;
    110131#else
    111                         if (_param->_have_port_rob_ptr  )
    112                         PORT_WRITE(out_INSERT_PACKET_ID [num_rename_unit][num_inst_insert],packet_id);
     132                            if (_param->_have_port_rob_ptr  )
     133                              PORT_WRITE(out_INSERT_PACKET_ID [num_rename_unit][num_inst_insert],packet_id);
    113134#endif
    114                         internal_BANK_INSERT_VAL             [num_bank] = true;
    115                         internal_BANK_INSERT_NUM_RENAME_UNIT [num_bank] = num_rename_unit;
    116                         internal_BANK_INSERT_NUM_INST        [num_bank] = num_inst_insert;
    117                        
    118                         break;
     135                            internal_BANK_INSERT_VAL             [num_bank] = true;
     136                            internal_BANK_INSERT_NUM_RENAME_UNIT [num_bank] = num_rename_unit;
     137                            internal_BANK_INSERT_NUM_INST        [num_bank] = num_inst_insert;
     138                           
     139                            break;
     140                          }
    119141                      }
    120142                  }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMealy_retire.cpp

    r139 r145  
    225225                        PORT_WRITE(out_RETIRE_CONTEXT_ID            [x][y], context_id                  );
    226226//                      PORT_WRITE(out_RETIRE_RENAME_UNIT_ID        [x][y], entry->rename_unit_id       );
     227//                      if (_param->_have_port_depth and (_param->_rat_scheme[x] == RAT_DEPTH_SAVE))
     228//                      PORT_WRITE(out_RETIRE_DEPTH                 [x][y], entry->depth                );
    227229                        PORT_WRITE(out_RETIRE_USE_STORE_QUEUE       [x][y], entry->use_store_queue      );
    228230                        PORT_WRITE(out_RETIRE_USE_LOAD_QUEUE        [x][y], entry->use_load_queue       );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMoore.cpp

    r139 r145  
    331331          PORT_WRITE(out_RETIRE_EVENT_STOP  [i][j], ((reg_EVENT_STATE [i][j] == COMMIT_EVENT_STATE_NOT_YET_EVENT) or
    332332                                                     reg_EVENT_NEXT_STOP [i][j]));
    333           if (_param->_rat_scheme[i] == RAT_DEPTH_SAVE)
     333          if (_param->_front_end_rat_scheme[i] == RAT_DEPTH_SAVE)
    334334            {
    335335          PORT_WRITE(out_RETIRE_EVENT_TYPE  [i][j], reg_EVENT_TYPE  [i][j]);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_deallocation.cpp

    r142 r145  
    4848    uint32_t mask_operation = gen_mask<uint32_t>(SIZE_OPERATION  );
    4949
     50    msgInformation("Number of iteration couple of instructions.\n");
     51
    5052    for (uint32_t i=0; i<_param->_nb_thread; ++i)
    5153      for(stat_inst_fusion_t::iterator it = _stat_inst_fusion [i].begin();
     
    6466              uint32_t operation_1 =                      inst                               &mask_operation ;
    6567
    66               // log_printf(STAT,Commit_unit,FUNCTION,
    6768              msgInformation(
    6869                           //"  * %s - %s : %d\n"
    6970                           //,toString_instruction((inst>>SIZE_INSTRUCTION)&mask_inst).c_str()
    7071                           //,toString_instruction( inst                   &mask_inst).c_str(),value
    71                              "  * %s.%s - %s.%s : %d\n"
     72                             "  * (%d) \t%s.%s - %s.%s\n"
     73                             ,value
    7274                             ,toString          (type_0            ).c_str()
    7375                             ,toString_operation(type_0,operation_0).c_str()
    7476                             ,toString          (type_1            ).c_str()
    7577                             ,toString_operation(type_1,operation_1).c_str()
    76                              ,value
    7778                             );
    7879            }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp

    r144 r145  
    4848              _nb_cycle_idle            [i][j] = 0;
    4949
    50               reg_NB_INST_COMMIT_ALL    [i][j] = 0;
    51               reg_NB_INST_COMMIT_MEM    [i][j] = 0;
    52                                        
    5350              reg_EVENT_STATE           [i][j] = COMMIT_EVENT_STATE_NO_EVENT;
    5451//            reg_EVENT_FLUSH           [i][j] = false;
     
    7269              reg_PC_CURRENT_IS_DS_TAKE [i][j] = 0;
    7370              reg_PC_NEXT               [i][j] = (0x100+4)>>2;
     71
     72              reg_NB_INST_COMMIT_ALL    [i][j] = 0;
     73              reg_NB_INST_COMMIT_MEM    [i][j] = 0;
     74                         
     75              if (_param->_front_end_rat_scheme[i] == RAT_DEPTH_SAVE)
     76                for (uint32_t k=0; k<_param->_nb_branch_speculated[i][j]; ++k)
     77                  reg_NB_INST_DEPTH [i][j][k] = 0;
    7478            }
    7579
     
    281285                      uint32_t  ptr   = reg_BANK_PTR [num_bank];
    282286
     287                      // entry->restore                 = false;
    283288                      entry->ptr                     = ptr;
    284289                      entry->front_end_id            = front_end_id;
     
    353358                              {
    354359                              case TYPE_BRANCH : {entry->state=(no_execute==1)?ROB_BRANCH_COMPLETE:ROB_BRANCH_WAIT_END  ; break;}
    355                               case TYPE_MEMORY : {entry->state=(no_execute==1)?ROB_END_OK_SPECULATIVE:(entry->state=(is_store  ==1)?ROB_STORE_WAIT_END_OK:ROB_OTHER_WAIT_END); break;}
     360                              case TYPE_MEMORY : {entry->state=(no_execute==1)?ROB_END_OK_SPECULATIVE:(entry->state=(is_store==1)?ROB_STORE_WAIT_END_OK:ROB_OTHER_WAIT_END); break;}
    356361                              default          : {entry->state=(no_execute==1)?ROB_END_OK_SPECULATIVE:ROB_OTHER_WAIT_END; break;}
    357362                              }
     
    378383                      if (type == TYPE_MEMORY)
    379384                        reg_NB_INST_COMMIT_MEM [front_end_id][context_id] ++;
    380                      
     385
     386                      if (_param->_front_end_rat_scheme[front_end_id] == RAT_DEPTH_SAVE)
     387                      reg_NB_INST_DEPTH [front_end_id][context_id][entry->depth] ++;
    381388
    382389                      // flush = present event or future event.
     
    856863                    if (type == TYPE_MEMORY)
    857864                    reg_NB_INST_COMMIT_MEM [front_end_id][context_id] --;
    858                    
     865                    if (_param->_front_end_rat_scheme[front_end_id] == RAT_DEPTH_SAVE)
     866                    reg_NB_INST_DEPTH      [front_end_id][context_id][entry->depth] --;
    859867                    // Update pointer
    860868                    reg_NUM_BANK_HEAD = (num_bank+1)%_param->_nb_bank;
     
    11911199                          switch (state)
    11921200                            {
    1193                             case ROB_BRANCH_WAIT_END             : {state = ROB_EVENT_WAIT_END; break;}
    1194                             case ROB_BRANCH_COMPLETE             : {state = ROB_END_MISS      ; break;}
     1201                            case ROB_BRANCH_WAIT_END             : {state = ROB_EVENT_WAIT_END   ; break;}
     1202                            case ROB_BRANCH_COMPLETE             : {state = ROB_END_MISS         ; break;}
    11951203                            case ROB_END_BRANCH_MISS             :
    1196                             case ROB_END_BRANCH_MISS_SPECULATIVE : {state = ROB_END_MISS      ; break;}
     1204                            case ROB_END_BRANCH_MISS_SPECULATIVE : {state = ROB_END_MISS         ; break;}
    11971205                            case ROB_END_LOAD_MISS               :
    11981206                            case ROB_END_LOAD_MISS_UPDATE        :
    1199                             case ROB_END_LOAD_MISS_SPECULATIVE   : {state = ROB_END_MISS      ; break;}
    1200                             case ROB_STORE_OK                    : {state = ROB_STORE_KO      ; break;}
     1207                            case ROB_END_LOAD_MISS_SPECULATIVE   : {state = ROB_END_MISS         ; break;}
     1208                            case ROB_STORE_OK                    : {state = ROB_STORE_KO         ; break;}
    12011209                            case ROB_STORE_WAIT_END_OK           : {state = ROB_STORE_WAIT_END_KO; break;}
    12021210                            case ROB_STORE_OK_WAIT_END           : {state = ROB_STORE_KO_WAIT_END; break;}
    1203                             case ROB_OTHER_WAIT_END              : {state = ROB_EVENT_WAIT_END; break;}
     1211                            case ROB_OTHER_WAIT_END              : {state = ROB_EVENT_WAIT_END   ; break;}
    12041212                            case ROB_END_OK                      :
    1205                             case ROB_END_OK_SPECULATIVE          : {state = ROB_END_MISS      ; break;}
     1213                            case ROB_END_OK_SPECULATIVE          : {state = ROB_END_MISS         ; break;}
    12061214                            case ROB_END_KO                      :
    1207                             case ROB_END_KO_SPECULATIVE          : {state = ROB_END_MISS      ; break;}
     1215                            case ROB_END_KO_SPECULATIVE          : {state = ROB_END_MISS         ; break;}
    12081216                            case ROB_END_EXCEPTION_UPDATE        :
    12091217                            case ROB_END_EXCEPTION               :
    1210                             case ROB_END_EXCEPTION_WAIT_HEAD     : {state = ROB_END_MISS      ; break;}
     1218                            case ROB_END_EXCEPTION_WAIT_HEAD     : {state = ROB_END_MISS         ; break;}
    12111219                             
    12121220                              // don't change state -> wait
     
    13481356//          log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT             : %d (bank %d, ptr %d)",((reg_EVENT_NUM_PTR [i][j] << _param->_shift_num_slot) | reg_EVENT_NUM_BANK [i][j]), reg_EVENT_NUM_BANK [i][j],reg_EVENT_NUM_PTR [i][j]);
    13491357//          log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_CAN_RESTART : %d",reg_EVENT_CAN_RESTART [i][j]);
    1350             log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_DEPTH       : %d - type %s",reg_EVENT_DEPTH [i][j],toString(reg_EVENT_TYPE [i][j]).c_str());
     1358            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_DEPTH       : %d",reg_EVENT_DEPTH [i][j]);
     1359            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_TYPE        : %s",toString(reg_EVENT_TYPE [i][j]).c_str());
    13511360            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_LAST        : %d - packet %d - ptr %d (bank %d, ptr %d)",reg_EVENT_LAST [i][j],reg_EVENT_PACKET[i][j],((reg_EVENT_LAST_NUM_PTR [i][j] << _param->_shift_num_slot) | reg_EVENT_LAST_NUM_BANK [i][j]), reg_EVENT_LAST_NUM_BANK [i][j],reg_EVENT_LAST_NUM_PTR [i][j]);
    13521361            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_NEXT        : stop : %d - packet : %d",reg_EVENT_NEXT_STOP  [i][j],reg_EVENT_NEXT_PACKET[i][j]);
     
    14361445        }
    14371446
    1438       log_printf(TRACE,Commit_unit,FUNCTION,"  * Dump RAT Update Table");
     1447      log_printf(TRACE,Commit_unit,FUNCTION,"  * Dump RAT_Update Table");
    14391448      for (uint32_t i=0; i<_param->_nb_front_end; ++i)
    14401449        for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Parameters.cpp

    r139 r145  
    2121#undef  FUNCTION
    2222#define FUNCTION "Commit_unit::Parameters"
    23   Parameters::Parameters (uint32_t             nb_front_end                       ,
    24                           uint32_t           * nb_context                         ,//[nb_front_end]           
    25                           uint32_t             nb_rename_unit                     ,                           
    26                           uint32_t             size_queue                         ,                           
    27                           uint32_t             nb_bank                            ,                           
    28                           Tretire_ooo_scheme_t retire_ooo_scheme                  ,                           
    29                           uint32_t           * nb_inst_insert                     ,//[nb_rename_unit]         
    30                           uint32_t           * nb_inst_retire                     ,//[nb_rename_unit]
    31                           uint32_t             nb_inst_commit                     ,                           
    32                           uint32_t             nb_inst_reexecute                  ,                           
    33                           uint32_t             nb_inst_branch_complete            ,                           
    34                           uint32_t          ** nb_branch_speculated               ,//[nb_front_end][nb_context]
    35                           uint32_t             size_nb_inst_decod                 ,
    36                           uint32_t             size_general_data                  ,
    37                           uint32_t             size_store_queue_ptr               ,
    38                           uint32_t             size_load_queue_ptr                ,
    39                           uint32_t             size_general_register              ,
    40                           uint32_t             size_special_register              ,
    41                           Trat_scheme_t      * rat_scheme                         ,//[nb_front_end]
    42                           Tpriority_t          priority                           ,
    43                           Tload_balancing_t    load_balancing                     ,
    44                           uint32_t             nb_rename_unit_select              ,
    45                           uint32_t             nb_thread                          ,
    46                           uint32_t          ** translate_num_context_to_num_thread,//[nb_front_end][nb_context]
    47                           bool                 is_toplevel):
     23  Parameters::Parameters (uint32_t               nb_front_end                       ,
     24                          uint32_t             * nb_context                         ,//[nb_front_end]           
     25                          uint32_t               nb_rename_unit                     ,                           
     26                          uint32_t               size_queue                         ,                           
     27                          uint32_t               nb_bank                            ,                           
     28                          Tretire_ooo_scheme_t   retire_ooo_scheme                  ,                           
     29                          uint32_t             * nb_inst_insert                     ,//[nb_rename_unit]         
     30                          uint32_t             * nb_inst_retire                     ,//[nb_rename_unit]
     31                          uint32_t               nb_inst_commit                     ,                           
     32                          uint32_t               nb_inst_reexecute                  ,                           
     33                          uint32_t               nb_inst_branch_complete            ,                           
     34                          uint32_t            ** nb_branch_speculated               ,//[nb_front_end][nb_context]
     35                          uint32_t               size_nb_inst_decod                 ,
     36                          uint32_t               size_general_data                  ,
     37                          uint32_t               size_store_queue_ptr               ,
     38                          uint32_t               size_load_queue_ptr                ,
     39                          uint32_t               size_general_register              ,
     40                          uint32_t               size_special_register              ,
     41                          Trat_scheme_t        * rat_scheme                         ,//[nb_rename_unit]
     42                          std::vector<uint32_t>* link_front_end_with_rename_unit    ,//[nb_rename_unit]
     43                          Tpriority_t            priority                           ,
     44                          Tload_balancing_t      load_balancing                     ,
     45                          uint32_t               nb_rename_unit_select              ,
     46                          uint32_t               nb_thread                          ,
     47                          uint32_t            ** translate_num_context_to_num_thread,//[nb_front_end][nb_context]
     48                          bool                   is_toplevel):
    4849    _nb_bank_access_commit (1              )
    4950  {
     
    6364    _nb_branch_speculated                = nb_branch_speculated               ;
    6465    _rat_scheme                          = rat_scheme                         ;
     66    _link_front_end_with_rename_unit     = link_front_end_with_rename_unit    ;
    6567    _priority                            = priority                           ;
    6668    _load_balancing                      = load_balancing                     ;
     
    8183
    8284    _have_port_rename_unit_id = _size_rename_unit_id > 0;
     85
     86    ALLOC1(_front_end_rat_scheme, Trat_scheme_t,_nb_front_end);
     87    // one rename unit per front_end
     88    for (uint32_t i=0; i<_nb_rename_unit; ++i)
     89      for (std::vector<uint32_t>::iterator it=_link_front_end_with_rename_unit[i].begin();
     90           it != _link_front_end_with_rename_unit[i].end();
     91           ++it)
     92        _front_end_rat_scheme[*it] = _rat_scheme[i];
    8393
    8494    ALLOC2(_array_size_depth,uint32_t,_nb_front_end,_nb_context [it1]);
     
    138148    log_begin(Commit_unit,FUNCTION);
    139149
    140     DELETE1(_have_thread     ,_nb_thread);
    141     DELETE2(_array_size_depth,_nb_front_end,_nb_context [it1]);
     150    DELETE1(_have_thread         ,_nb_thread);
     151    DELETE2(_array_size_depth    ,_nb_front_end,_nb_context [it1]);
     152    DELETE1(_front_end_rat_scheme,_nb_front_end);
    142153
    143154    log_end(Commit_unit,FUNCTION);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/include/Load_Store_pointer_unit.h

    r138 r145  
    112112  private   : uint32_t                       * internal_RETIRE_LSQ          ; // [nb_inst_retire]
    113113  private   : Tlsq_ptr_t                     * internal_RETIRE_PTR          ; // [nb_inst_retire]
    114   private   : Tcontrol_t                    ** internal_RETIRE_EVENT_ACK    ;//[nb_front_end][nb_context]
     114  private   : Tcontrol_t                    ** internal_RETIRE_EVENT_ACK    ; //[nb_front_end][nb_context]
    115115
    116116#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Load_Store_pointer_unit_genMealy_insert.cpp

    r138 r145  
    2727    if (PORT_READ(in_NRESET))
    2828      {
    29     // TODO : limité à nb_inst_memory le nombre d'accès par lsq !!!
    30 
    31     uint32_t   nb_use_lsq            [_param->_nb_load_store_queue];
     29    // Limit at nb_inst_memory access per load_store_queue
     30    // uint32_t   nb_use_lsq            [_param->_nb_load_store_queue];
    3231    Tlsq_ptr_t STORE_QUEUE_PTR_WRITE [_param->_nb_load_store_queue];
    3332    bool       STORE_QUEUE_USE       [_param->_nb_load_store_queue][_param->_max_size_store_queue];
     
    3837    for (uint32_t i=0; i<_param->_nb_load_store_queue; i++)
    3938      {
    40         nb_use_lsq            [i] = _param->_nb_inst_memory[i];
     39        // nb_use_lsq            [i] = _param->_nb_inst_memory[i];
    4140
    4241        STORE_QUEUE_PTR_WRITE [i] = reg_STORE_QUEUE_PTR_WRITE [i];
     
    8281                // Test if a previous instruction use the same lsq
    8382                // Authorize once memory access by load store unit
    84                 if (nb_use_lsq [lsq] > 0)
     83                // if (nb_use_lsq [lsq] > 0)
    8584                  {
    86                     nb_use_lsq [lsq] --;
     85                    // nb_use_lsq [lsq] --;
    8786                   
    8887                    uint32_t   ptr;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/include/Parameters.h

    r139 r145  
    3636   
    3737  public : uint32_t         _max_nb_context        ;
     38  public : uint32_t         _max_nb_branch_speculated;
    3839//public : uint32_t         _size_front_end_id     ;
    3940//public : uint32_t         _size_context_id       ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/include/Register_Address_Translation_unit.h

    r139 r145  
    107107
    108108    // ~~~~~[ Interface "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    109   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_EVENT_VAL            ;//[nb_front_end][nb_context]
    110   public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_EVENT_ACK            ;//[nb_front_end][nb_context]
    111   public    : SC_IN (Tevent_state_t    )  ***  in_RETIRE_EVENT_STATE          ;//[nb_front_end][nb_context]
    112   public    : SC_IN (Tevent_type_t     )  ***  in_RETIRE_EVENT_TYPE           ;//[nb_front_end][nb_context]
    113   public    : SC_IN (Tdepth_t          )  ***  in_RETIRE_EVENT_DEPTH          ;//[nb_front_end][nb_context]
     109  public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_EVENT_VAL         ;//[nb_front_end][nb_context]
     110  public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_EVENT_ACK         ;//[nb_front_end][nb_context]
     111  public    : SC_IN (Tevent_state_t    )  ***  in_RETIRE_EVENT_STATE       ;//[nb_front_end][nb_context]
     112  public    : SC_IN (Tevent_type_t     )  ***  in_RETIRE_EVENT_TYPE        ;//[nb_front_end][nb_context]
     113  public    : SC_IN (Tdepth_t          )  ***  in_RETIRE_EVENT_DEPTH       ;//[nb_front_end][nb_context]
     114
     115    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     116  public    : SC_IN (Tdepth_t          )  ***  in_DEPTH_MIN                   ;//[nb_front_end][nb_context]
     117  public    : SC_IN (Tdepth_t          )  ***  in_DEPTH_MAX                   ;//[nb_front_end][nb_context]
     118  public    : SC_IN (Tcontrol_t        )  ***  in_DEPTH_FULL                  ;//[nb_front_end][nb_context]
    114119
    115120    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    116121
    117122    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    118   private   : Tgeneral_address_t          *** rat_gpr_not_speculative;      //[nb_front_end][nb_context]                      [nb_general_register_logic]
    119   private   : Tgeneral_address_t          *** rat_gpr_speculative;          //[nb_front_end][nb_context]                      [nb_general_register_logic]
    120   private   : bool                        *** rat_gpr_speculative_valid;    //[nb_front_end][nb_context]                      [nb_general_register_logic]
    121   private   : Tgeneral_address_t         **** rat_gpr_save;                 //[nb_front_end][nb_context][nb_branch_speculated][nb_general_register_logic]
    122 
    123   private   : Tspecial_address_t          *** rat_spr_not_speculative;      //[nb_front_end][nb_context]                      [nb_special_register_logic]
    124   private   : Tspecial_address_t          *** rat_spr_speculative;          //[nb_front_end][nb_context]                      [nb_special_register_logic]
    125   private   : bool                        *** rat_spr_speculative_valid;    //[nb_front_end][nb_context]                      [nb_special_register_logic]
    126   private   : Tspecial_address_t         **** rat_spr_save;                 //[nb_front_end][nb_context][nb_branch_speculated][nb_special_register_logic]
    127 
    128   private   : Tdepth_t                     ** rat_depth;                    //[nb_front_end][nb_context]
     123                                                                            //                                                                            NO ONE DEPTH
     124  private   : Tgeneral_address_t          *** RAT_GPR_NOT_SPECULATIVE;      //[nb_front_end][nb_context]                      [nb_general_register_logic] X  X   X
     125  private   : Tgeneral_address_t         **** RAT_GPR_SPECULATIVE;          //[nb_front_end][nb_context][nb_branch_speculated][nb_general_register_logic]    X   X
     126  private   : bool                       **** RAT_GPR_SPECULATIVE_VALID;    //[nb_front_end][nb_context][nb_branch_speculated][nb_general_register_logic]    X   X
     127
     128  private   : Tspecial_address_t          *** RAT_SPR_NOT_SPECULATIVE;      //[nb_front_end][nb_context]                      [nb_special_register_logic] X  X   X
     129  private   : Tspecial_address_t         **** RAT_SPR_SPECULATIVE;          //[nb_front_end][nb_context][nb_branch_speculated][nb_special_register_logic]    X   X
     130  private   : bool                       **** RAT_SPR_SPECULATIVE_VALID;    //[nb_front_end][nb_context][nb_branch_speculated][nb_special_register_logic]    X   X
     131
     132  private   : bool                        *** reg_RAT_USE;                  //[nb_front_end][nb_context][nb_branch_speculated]                                   X
     133  private   : bool                         ** reg_SAVE_RAT;                 //[nb_front_end][nb_context]                                                         X
    129134
    130135    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    131136  private   : Tcontrol_t                    * internal_RENAME_ACK;          //[nb_inst_insert]
    132   private   : Tcontrol_t                    * internal_RENAME_SAVE;         //[nb_inst_insert]
    133137  private   : Tcontrol_t                    * internal_INSERT_ACK;          //[nb_inst_insert]
    134138  private   : Tcontrol_t                    * internal_RETIRE_ACK;          //[nb_inst_retire]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Parameters.cpp

    r144 r145  
    4141    _nb_branch_speculated   = nb_branch_speculated;
    4242
    43     _max_nb_context         = max<uint32_t>(_nb_context, _nb_front_end);
     43    _max_nb_context          = max<uint32_t>(_nb_context, _nb_front_end);
     44    _max_nb_branch_speculated= max<uint32_t>(_nb_branch_speculated, _nb_front_end, _nb_context);
    4445
    4546    test();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit.cpp

    r139 r145  
    160160        for (uint32_t i=0; i<_param->_nb_front_end; ++i)
    161161          for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
    162             sensitive << (*(in_RETIRE_EVENT_VAL   [i][j]))
    163                       << (*(in_RETIRE_EVENT_STATE [i][j]));
     162            {
     163              sensitive << (*(in_RETIRE_EVENT_VAL   [i][j]))
     164                        << (*(in_RETIRE_EVENT_STATE [i][j]))
     165                        << (*(in_DEPTH_FULL         [i][j]));
     166              if (_param->_have_port_depth)
     167              sensitive << (*(in_DEPTH_MIN          [i][j]))
     168                        << (*(in_DEPTH_MAX          [i][j]));
     169            }
    164170
    165171# ifdef SYSTEMCASS_SPECIFIC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_allocation.cpp

    r139 r145  
    131131    }
    132132
     133    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     134    {
     135      ALLOC2_INTERFACE_BEGIN("depth",IN,WEST,_("Interface with Prediction unit."),_param->_nb_front_end, _param->_nb_context[it1]);
     136
     137      _ALLOC2_SIGNAL_IN ( in_DEPTH_MIN                    ,"MIN"               ,Tdepth_t         ,_param->_size_depth       ,_param->_nb_front_end,_param->_nb_context[it1]);
     138      _ALLOC2_SIGNAL_IN ( in_DEPTH_MAX                    ,"MAX"               ,Tdepth_t         ,_param->_size_depth       ,_param->_nb_front_end,_param->_nb_context[it1]);
     139      _ALLOC2_SIGNAL_IN ( in_DEPTH_FULL                   ,"FULL"              ,Tcontrol_t       ,1                         ,_param->_nb_front_end,_param->_nb_context[it1]);
     140
     141      ALLOC2_INTERFACE_END(_param->_nb_front_end,_param->_nb_context[it1]);
     142    }
     143
    133144    if (usage_is_set(_usage,USE_SYSTEMC))
    134145      {
    135146    ALLOC1(internal_RENAME_ACK       ,Tcontrol_t,_param->_nb_inst_insert);
    136     ALLOC1(internal_RENAME_SAVE      ,Tcontrol_t,_param->_nb_inst_insert);
    137147    ALLOC1(internal_INSERT_ACK       ,Tcontrol_t,_param->_nb_inst_insert);
    138148    ALLOC1(internal_RETIRE_ACK       ,Tcontrol_t,_param->_nb_inst_retire);
    139149    ALLOC2(internal_RETIRE_EVENT_ACK ,Tcontrol_t,_param->_nb_front_end,_param->_nb_context[it1]);
    140150
    141     ALLOC3(rat_gpr_speculative      ,Tgeneral_address_t,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
    142     ALLOC3(rat_spr_speculative      ,Tspecial_address_t,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
     151    ALLOC3(RAT_GPR_NOT_SPECULATIVE  ,Tgeneral_address_t,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
     152    ALLOC3(RAT_SPR_NOT_SPECULATIVE  ,Tspecial_address_t,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
    143153
    144154    switch(_param->_rat_scheme)
     
    150160      case RAT_ONE_SAVE   :
    151161        {
    152           ALLOC3(rat_gpr_not_speculative  ,Tgeneral_address_t,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
    153           ALLOC3(rat_gpr_speculative_valid,bool              ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
    154 
    155           ALLOC3(rat_spr_not_speculative  ,Tspecial_address_t,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
    156           ALLOC3(rat_spr_speculative_valid,bool              ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
     162          ALLOC4(RAT_GPR_SPECULATIVE      ,Tgeneral_address_t,_param->_nb_front_end,_param->_nb_context[it1],1,_param->_nb_general_register_logic);
     163          ALLOC4(RAT_SPR_SPECULATIVE      ,Tspecial_address_t,_param->_nb_front_end,_param->_nb_context[it1],1,_param->_nb_special_register_logic);
     164
     165          ALLOC4(RAT_GPR_SPECULATIVE_VALID,bool              ,_param->_nb_front_end,_param->_nb_context[it1],1,_param->_nb_general_register_logic);
     166          ALLOC4(RAT_SPR_SPECULATIVE_VALID,bool              ,_param->_nb_front_end,_param->_nb_context[it1],1,_param->_nb_special_register_logic);
    157167         
    158168          break;
     
    160170      case RAT_DEPTH_SAVE :
    161171        {
    162           ALLOC4(rat_gpr_save             ,Tgeneral_address_t,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_branch_speculated[it1][it2],_param->_nb_general_register_logic);
    163           ALLOC4(rat_spr_save             ,Tspecial_address_t,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_branch_speculated[it1][it2],_param->_nb_special_register_logic);
    164           ALLOC2(rat_depth                ,Tdepth_t          ,_param->_nb_front_end,_param->_nb_context[it1]);
    165    
     172          ALLOC4(RAT_GPR_SPECULATIVE      ,Tgeneral_address_t,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_branch_speculated[it1][it2],_param->_nb_general_register_logic);
     173          ALLOC4(RAT_SPR_SPECULATIVE      ,Tspecial_address_t,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_branch_speculated[it1][it2],_param->_nb_special_register_logic);
     174
     175          ALLOC4(RAT_GPR_SPECULATIVE_VALID,bool              ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_branch_speculated[it1][it2],_param->_nb_general_register_logic);
     176          ALLOC4(RAT_SPR_SPECULATIVE_VALID,bool              ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_branch_speculated[it1][it2],_param->_nb_special_register_logic);
     177   
     178          ALLOC3(reg_RAT_USE              ,bool              ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_branch_speculated[it1][it2]);
     179          ALLOC2(reg_SAVE_RAT             ,bool              ,_param->_nb_front_end,_param->_nb_context[it1]);
     180
    166181          break;
    167182        }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_deallocation.cpp

    r139 r145  
    7676        DELETE2_SIGNAL_COND( in_RETIRE_EVENT_DEPTH          ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_depth     ,_param->_rat_scheme == RAT_DEPTH_SAVE);
    7777
     78        DELETE2_SIGNAL     ( in_DEPTH_MIN                   ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_depth);
     79        DELETE2_SIGNAL     ( in_DEPTH_MAX                   ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_depth);
     80        DELETE2_SIGNAL     ( in_DEPTH_FULL                  ,_param->_nb_front_end,_param->_nb_context[it1],1                  );
     81
    7882        DELETE1(internal_RENAME_ACK                    ,_param->_nb_inst_insert);
    79         DELETE1(internal_RENAME_SAVE                   ,_param->_nb_inst_insert);
    80         DELETE1(internal_INSERT_ACK                    ,_param->_nb_inst_insert);
    8183        DELETE1(internal_RETIRE_ACK                    ,_param->_nb_inst_retire);
    8284        DELETE2(internal_RETIRE_EVENT_ACK              ,_param->_nb_front_end,_param->_nb_context[it1]);
    8385
    84         DELETE3(rat_gpr_speculative          ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
    85         DELETE3(rat_spr_speculative          ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
    86 
     86        DELETE3(RAT_GPR_NOT_SPECULATIVE      ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
     87        DELETE3(RAT_SPR_NOT_SPECULATIVE      ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
     88       
    8789        switch(_param->_rat_scheme)
    8890          {
     
    9395          case RAT_ONE_SAVE   :
    9496            {
    95               DELETE3(rat_gpr_not_speculative      ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
    96               DELETE3(rat_gpr_speculative_valid    ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
    97              
    98               DELETE3(rat_spr_not_speculative      ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
    99               DELETE3(rat_spr_speculative_valid    ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
     97              DELETE4(RAT_GPR_SPECULATIVE          ,_param->_nb_front_end,_param->_nb_context[it1],1,_param->_nb_general_register_logic);
     98              DELETE4(RAT_SPR_SPECULATIVE          ,_param->_nb_front_end,_param->_nb_context[it1],1,_param->_nb_special_register_logic);
     99
     100              DELETE4(RAT_GPR_SPECULATIVE_VALID    ,_param->_nb_front_end,_param->_nb_context[it1],1,_param->_nb_general_register_logic);
     101              DELETE4(RAT_SPR_SPECULATIVE_VALID    ,_param->_nb_front_end,_param->_nb_context[it1],1,_param->_nb_special_register_logic);
    100102             
    101103              break;
     
    103105          case RAT_DEPTH_SAVE :
    104106            {
    105               DELETE4(rat_gpr_save                 ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_branch_speculated[it1][it2],_param->_nb_general_register_logic);
    106               DELETE4(rat_spr_save                 ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_branch_speculated[it1][it2],_param->_nb_special_register_logic);
    107               DELETE2(rat_depth                    ,_param->_nb_front_end,_param->_nb_context[it1]);
     107              DELETE4(RAT_GPR_SPECULATIVE          ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_branch_speculated[it1][it2],_param->_nb_general_register_logic);
     108              DELETE4(RAT_SPR_SPECULATIVE          ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_branch_speculated[it1][it2],_param->_nb_special_register_logic);
     109
     110              DELETE4(RAT_GPR_SPECULATIVE_VALID    ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_branch_speculated[it1][it2],_param->_nb_general_register_logic);
     111              DELETE4(RAT_SPR_SPECULATIVE_VALID    ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_branch_speculated[it1][it2],_param->_nb_special_register_logic);
     112
     113              DELETE3(reg_RAT_USE                  ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_branch_speculated[it1][it2]);
     114              DELETE2(reg_SAVE_RAT                 ,_param->_nb_front_end,_param->_nb_context[it1]);
    108115
    109116              break;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_function_depth_save_constant.cpp

    r139 r145  
    3030      {
    3131        internal_INSERT_ACK [i] = 1;
     32        internal_RENAME_ACK [i] = 1;
    3233       
    3334        PORT_WRITE(out_INSERT_ACK[i],internal_INSERT_ACK [i]);
     35        PORT_WRITE(out_RENAME_ACK[i],internal_RENAME_ACK [i]);
    3436      }
    3537   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_function_depth_save_genMealy_rename.cpp

    r139 r145  
    2828    if (PORT_READ(in_NRESET) != 0)
    2929      {
    30         bool     have_branch_previous = false;
    31         bool     can_continue [_param->_nb_front_end][_param->_max_nb_context];
     30        bool rat_gpr_speculative_valid [_param->_nb_front_end][_param->_max_nb_context][_param->_max_nb_branch_speculated][_param->_nb_general_register_logic];
     31        bool rat_spr_speculative_valid [_param->_nb_front_end][_param->_max_nb_context][_param->_max_nb_branch_speculated][_param->_nb_special_register_logic];
     32        // bool reg_save_rat              [_param->_nb_front_end][_param->_max_nb_context];
    3233
    3334        for (uint32_t i=0; i<_param->_nb_front_end; ++i)
    3435          for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
    35             can_continue [i][j] = true;
     36            {
     37              // reg_save_rat [i][j] = reg_SAVE_RAT [i][j];
     38              for (uint32_t k=0; k<_param->_nb_branch_speculated[i][j]; ++k)
     39                {
     40                  for (uint32_t l=0; l<_param->_nb_general_register_logic; ++l)
     41                    rat_gpr_speculative_valid [i][j][k][l] = RAT_GPR_SPECULATIVE_VALID [i][j][k][l];
     42                  for (uint32_t l=0; l<_param->_nb_special_register_logic; ++l)
     43                    rat_spr_speculative_valid [i][j][k][l] = RAT_SPR_SPECULATIVE_VALID [i][j][k][l];
     44                }
     45            }
    3646
    3747        for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
    38           if (PORT_READ(in_RENAME_VAL [i])) // not in sensitive list : it's to have valide value to array access
    39             {
    40               log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"  * RENAME [%d]",i);
    41              
    42               Tcontext_t front_end_id        = (_param->_have_port_front_end_id)?PORT_READ(in_RENAME_FRONT_END_ID [i]):0;
    43               Tcontext_t context_id          = (_param->_have_port_context_id  )?PORT_READ(in_RENAME_CONTEXT_ID  [i]):0;
    44               // bool       have_event          = (PORT_READ(in_RETIRE_EVENT_VAL [front_end_id][context_id]) and // always ack
    45               //                                   (PORT_READ(in_RETIRE_EVENT_STATE [front_end_id][context_id]) == EVENT_STATE_EVENT));
    46              
    47               bool       have_branch_current = PORT_READ(in_RENAME_SAVE_RAT [i]);
     48          {
     49            if (PORT_READ(in_RENAME_VAL [i])) // not in sensitive list : it's to have valide value to array access
     50              {
     51                log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"  * RENAME [%d]",i);
     52               
     53                Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_RENAME_FRONT_END_ID [i]):0;
     54                Tcontext_t context_id   = (_param->_have_port_context_id  )?PORT_READ(in_RENAME_CONTEXT_ID   [i]):0;
     55               
     56                log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * front_end_id       : %d",front_end_id);
     57                log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * context_id         : %d",context_id);
    4858
    49               // one branch per cycle
    50               can_continue[front_end_id][context_id] &= not (have_branch_current and have_branch_previous);
     59                Tdepth_t   depth_min    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN[front_end_id][context_id]):0;
     60                Tdepth_t   depth_max    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX[front_end_id][context_id]):0;
     61                Tcontrol_t depth_full   = PORT_READ(in_DEPTH_FULL [front_end_id][context_id]);
    5162
    52               log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * front_end_id         : %d",front_end_id);
    53               log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * context_id           : %d",context_id);
    54            // log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * have_event           : %d",have_event);
    55               log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * have_branch_previous : %d",have_branch_previous);
    56               log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * have_branch_current  : %d",have_branch_current );
    57               log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * can_continue         : %d",can_continue[front_end_id][context_id]);
    58              
    59               Tgeneral_address_t num_reg_ra_log    = PORT_READ(in_RENAME_NUM_REG_RA_LOG [i]); //%_param->_nb_general_register;
    60               Tgeneral_address_t num_reg_rb_log    = PORT_READ(in_RENAME_NUM_REG_RB_LOG [i]); //%_param->_nb_general_register;
    61               Tspecial_address_t num_reg_rc_log    = PORT_READ(in_RENAME_NUM_REG_RC_LOG [i]); //%_param->_nb_special_register;
    62               Tgeneral_address_t num_reg_rd_log    = PORT_READ(in_RENAME_NUM_REG_RD_LOG [i]); //%_param->_nb_general_register;
    63               Tspecial_address_t num_reg_re_log    = PORT_READ(in_RENAME_NUM_REG_RE_LOG [i]); //%_param->_nb_special_register;
    64              
    65               Tgeneral_address_t num_reg_ra_phy    = rat_gpr_speculative[front_end_id][context_id][num_reg_ra_log];
    66               Tgeneral_address_t num_reg_rb_phy    = rat_gpr_speculative[front_end_id][context_id][num_reg_rb_log];
    67               Tspecial_address_t num_reg_rc_phy    = rat_spr_speculative[front_end_id][context_id][num_reg_rc_log];
    68               Tgeneral_address_t num_reg_rd_phy_old= rat_gpr_speculative[front_end_id][context_id][num_reg_rd_log];
    69               Tspecial_address_t num_reg_re_phy_old= rat_spr_speculative[front_end_id][context_id][num_reg_re_log];
    70              
    71               log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_ra           : %d -> %d",num_reg_ra_log,num_reg_ra_phy    );
    72               log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_rb           : %d -> %d",num_reg_rb_log,num_reg_rb_phy    );
    73               log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_rc           : %d -> %d",num_reg_rc_log,num_reg_rc_phy    );
    74               log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_rd           : %d -> %d",num_reg_rd_log,num_reg_rd_phy_old);
    75               log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_re           : %d -> %d",num_reg_re_log,num_reg_re_phy_old);
    76              
    77               internal_RENAME_ACK [i] = can_continue[front_end_id][context_id];
    78               PORT_WRITE(out_RENAME_ACK                [i],internal_RENAME_ACK [i]);
    79               PORT_WRITE(out_RENAME_NUM_REG_RA_PHY     [i], num_reg_ra_phy    );
    80               PORT_WRITE(out_RENAME_NUM_REG_RB_PHY     [i], num_reg_rb_phy    );
    81               PORT_WRITE(out_RENAME_NUM_REG_RC_PHY     [i], num_reg_rc_phy    );
    82               PORT_WRITE(out_RENAME_NUM_REG_RD_PHY_OLD [i], num_reg_rd_phy_old);
    83               PORT_WRITE(out_RENAME_NUM_REG_RE_PHY_OLD [i], num_reg_re_phy_old);
     63                Tdepth_t   depth        = (_param->_have_port_depth       )?PORT_READ(in_RENAME_DEPTH        [i]):0;
     64                // Tcontrol_t save_rat     = PORT_READ(in_RENAME_SAVE_RAT [i]);
     65                log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * depth/min/max/full : %d - [%d:%d] - %d",depth,depth_min,depth_max,depth_full);
     66                // log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * save_rat (new)     : %d",save_rat);
     67                // log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * save_rat (old)     : %d",reg_save_rat [front_end_id][context_id]);
     68               
     69                // if (reg_save_rat [front_end_id][context_id])
     70                //   {
     71                //     for (uint32_t num_reg_log=0; num_reg_log<_param->_nb_general_register_logic; num_reg_log++)
     72                //       rat_gpr_speculative_valid [front_end_id][context_id][depth][num_reg_log] = false;
     73                //     for (uint32_t num_reg_log=0; num_reg_log<_param->_nb_special_register_logic; num_reg_log++)
     74                //       rat_spr_speculative_valid [front_end_id][context_id][depth][num_reg_log] = false;
     75                //   }
     76               
     77                // reg_save_rat[front_end_id][context_id] = save_rat;
     78               
     79                Tgeneral_address_t num_reg_ra_log    = PORT_READ(in_RENAME_NUM_REG_RA_LOG [i]); //%_param->_nb_general_register;
     80                Tgeneral_address_t num_reg_rb_log    = PORT_READ(in_RENAME_NUM_REG_RB_LOG [i]); //%_param->_nb_general_register;
     81                Tspecial_address_t num_reg_rc_log    = PORT_READ(in_RENAME_NUM_REG_RC_LOG [i]); //%_param->_nb_special_register;
     82                Tgeneral_address_t num_reg_rd_log    = PORT_READ(in_RENAME_NUM_REG_RD_LOG [i]); //%_param->_nb_general_register;
     83                Tspecial_address_t num_reg_re_log    = PORT_READ(in_RENAME_NUM_REG_RE_LOG [i]); //%_param->_nb_special_register;
     84               
     85                Tgeneral_address_t num_reg_ra_phy    ;
     86                Tgeneral_address_t num_reg_rb_phy    ;
     87                Tspecial_address_t num_reg_rc_phy    ;
     88                Tgeneral_address_t num_reg_rd_phy_old;
     89                Tspecial_address_t num_reg_re_phy_old;
     90                       
     91                bool find_ra = false;
     92                bool find_rb = false;
     93                bool find_rc = false;
     94                bool find_rd = false;
     95                bool find_re = false;
     96               
     97                for (uint32_t num_branch=0; num_branch<_param->_nb_branch_speculated[front_end_id][context_id]; ++num_branch)
     98                  {
     99                    uint32_t index = (depth-num_branch)%_param->_nb_branch_speculated[front_end_id][context_id];
    84100
    85               internal_RENAME_SAVE [i] = have_branch_current;
     101                    if (not find_ra and rat_gpr_speculative_valid [front_end_id][context_id][index][num_reg_ra_log])
     102                      {
     103                        find_ra            = true;
     104                        num_reg_ra_phy     = RAT_GPR_SPECULATIVE[front_end_id][context_id][index][num_reg_ra_log];
     105                      }
     106                   
     107                    if (not find_rb and rat_gpr_speculative_valid [front_end_id][context_id][index][num_reg_rb_log])
     108                      {
     109                        find_rb            = true;
     110                        num_reg_rb_phy     = RAT_GPR_SPECULATIVE[front_end_id][context_id][index][num_reg_rb_log];
     111                      }
     112                   
     113                    if (not find_rc and rat_spr_speculative_valid [front_end_id][context_id][index][num_reg_rc_log])
     114                      {
     115                        find_rc            = true;
     116                        num_reg_rc_phy     = RAT_SPR_SPECULATIVE[front_end_id][context_id][index][num_reg_rc_log];
     117                      }
     118                   
     119                    if (not find_rd and rat_gpr_speculative_valid [front_end_id][context_id][index][num_reg_rd_log])
     120                      {
     121                        find_rd            = true;
     122                        num_reg_rd_phy_old = RAT_GPR_SPECULATIVE[front_end_id][context_id][index][num_reg_rd_log];
     123                      }
     124                   
     125                    if (not find_re and rat_spr_speculative_valid [front_end_id][context_id][index][num_reg_re_log])
     126                      {
     127                        find_re            = true;
     128                        num_reg_re_phy_old = RAT_SPR_SPECULATIVE[front_end_id][context_id][index][num_reg_re_log];
     129                      }
    86130
    87               // save info to the next instruction
    88               have_branch_previous |= have_branch_current;
    89             }
     131                    // if index == depth_min, stop because depth_min is the not speculative.
     132                    // if (index == depth_min)
     133                    //   break;
     134                  }
     135               
     136                if (not find_ra)
     137                  num_reg_ra_phy     = RAT_GPR_NOT_SPECULATIVE[front_end_id][context_id][num_reg_ra_log];
     138                if (not find_rb)
     139                  num_reg_rb_phy     = RAT_GPR_NOT_SPECULATIVE[front_end_id][context_id][num_reg_rb_log];
     140                if (not find_rc)
     141                  num_reg_rc_phy     = RAT_GPR_NOT_SPECULATIVE[front_end_id][context_id][num_reg_rc_log];
     142                if (not find_rd)
     143                  num_reg_rd_phy_old = RAT_GPR_NOT_SPECULATIVE[front_end_id][context_id][num_reg_rd_log];
     144                if (not find_re)
     145                  num_reg_re_phy_old = RAT_SPR_NOT_SPECULATIVE[front_end_id][context_id][num_reg_re_log];
     146               
     147                // if rat_SPECULATIVE is valid,
     148                // then read rat_SPECULATIVE have the most valid alias register
     149                // else, they have an previous event, the rat_NOT_SPECULATIVE have the valid register
     150               
     151                log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_ra         : %d -> %d",num_reg_ra_log,num_reg_ra_phy    );
     152                log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_rb         : %d -> %d",num_reg_rb_log,num_reg_rb_phy    );
     153                log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_rc         : %d -> %d",num_reg_rc_log,num_reg_rc_phy    );
     154                log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_rd         : %d -> %d",num_reg_rd_log,num_reg_rd_phy_old);
     155                log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_re         : %d -> %d",num_reg_re_log,num_reg_re_phy_old);
     156               
     157                PORT_WRITE(out_RENAME_NUM_REG_RA_PHY     [i], num_reg_ra_phy    );
     158                PORT_WRITE(out_RENAME_NUM_REG_RB_PHY     [i], num_reg_rb_phy    );
     159                PORT_WRITE(out_RENAME_NUM_REG_RC_PHY     [i], num_reg_rc_phy    );
     160                PORT_WRITE(out_RENAME_NUM_REG_RD_PHY_OLD [i], num_reg_rd_phy_old);
     161                PORT_WRITE(out_RENAME_NUM_REG_RE_PHY_OLD [i], num_reg_re_phy_old);
     162              }
     163          }
    90164      }
    91    
     165
    92166    log_end(Register_Address_Translation_unit,FUNCTION);
    93167  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_function_depth_save_transition.cpp

    r144 r145  
    3434          for (uint32_t j=0; j<_param->_nb_context[i]; j++)
    3535            {
    36               rat_depth                 [i][j]    = 0;
    37               rat_gpr_speculative       [i][j][0] = 0;
     36              RAT_GPR_NOT_SPECULATIVE   [i][j][0]    = 0;
     37              RAT_GPR_SPECULATIVE_VALID [i][j][0][0] = false;
     38              RAT_GPR_SPECULATIVE       [i][j][0][0] = 0    ; // not necessary
    3839
    3940              for (uint32_t k=1; k<_param->_nb_general_register_logic; k++)
    40                 rat_gpr_speculative        [i][j][k] = gpr++;
     41                {
     42                  RAT_GPR_NOT_SPECULATIVE    [i][j][k]    = gpr++;
     43                  for (uint32_t l=0; l<_param->_nb_branch_speculated[i][j]; ++l)
     44                    {
     45                      RAT_GPR_SPECULATIVE_VALID  [i][j][l][k] = false;
     46                      RAT_GPR_SPECULATIVE        [i][j][l][k] = 0    ; // not necessary
     47                    }
     48                }
    4149              for (uint32_t k=0; k<_param->_nb_special_register_logic; k++)
    42                 rat_spr_speculative        [i][j][k] = spr++; // not necessary
     50                {
     51                  RAT_SPR_NOT_SPECULATIVE    [i][j][k]    = spr++;
     52                  for (uint32_t l=0; l<_param->_nb_branch_speculated[i][j]; ++l)
     53                    {
     54                      RAT_SPR_SPECULATIVE_VALID  [i][j][l][k] = false;
     55                      RAT_SPR_SPECULATIVE        [i][j][l][k] = 0    ; // not necessary
     56                    }
     57                }
     58
     59              for (uint32_t k=0; k<_param->_nb_branch_speculated[i][j]; ++k)
     60                reg_RAT_USE [i][j][k] = false;
     61              reg_SAVE_RAT [i][j] = false;
    4362            }
    4463      }
     
    4665      {
    4766        // Note : GPR[0] is never write (in decod's stage : write_rd = 0 when num_reg_rd_log == 0)
     67        bool free_rat [_param->_nb_front_end][_param->_max_nb_context][_param->_max_nb_branch_speculated];
     68        for (uint32_t i=0; i<_param->_nb_front_end; i++)
     69          for (uint32_t j=0; j<_param->_nb_context[i]; j++)
     70            for (uint32_t k=0; k<_param->_nb_branch_speculated[i][j]; ++k)
     71              free_rat [i][j][k] = false;
    4872
    4973        // =====================================================
     
    5579              {
    5680                log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"  * RETIRE_EVENT [%d][%d]",i,j);
     81
     82                // Test if event have just occure
     83                //   * if exception -> reset valid table (rat_NOT_SPECULATIVE have the good value)
    5784               
    58                 // Test if event have just occure
    5985                if (PORT_READ(in_RETIRE_EVENT_STATE [i][j]) == EVENT_STATE_EVENT)
    60                   {
    61                     switch (PORT_READ(in_RETIRE_EVENT_TYPE [i][j]))
     86                  switch (PORT_READ(in_RETIRE_EVENT_TYPE [i][j]))
     87                    {
     88                    case EVENT_TYPE_BRANCH_MISS_SPECULATION :
    6289                      {
    63                       case EVENT_TYPE_BRANCH_MISS_SPECULATION :
    64                       case EVENT_TYPE_LOAD_MISS_SPECULATION   :
    65                         {
    66                           // Miss speculation (branch or load)
    67                           // Restore contexte and update depth
    68 
    69                           log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * MISS_SPECULATION : Restore RAT");
    70 
    71                           Tdepth_t depth = (_param->_have_port_depth)?PORT_READ(in_RETIRE_EVENT_DEPTH [i][j]):0;
    72 
    73                           log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * depth : %d",depth);
    74                          
    75                           // restore GPR
    76                           for (uint32_t num_gpr=0; num_gpr<_param->_nb_general_register_logic; num_gpr++)
    77                             rat_gpr_speculative [i][j][num_gpr] = rat_gpr_save [i][j][depth][num_gpr];
    78                          
    79                           // restore SPR
    80                           for (uint32_t num_spr=0; num_spr<_param->_nb_special_register_logic; num_spr++)
    81                             rat_spr_speculative [i][j][num_spr] = rat_spr_save [i][j][depth][num_spr];
    82                          
    83                           // update rat_depth
    84                           rat_depth[i][j] = depth;
    85                          
    86                           break;
    87                         }
    88                         // case EVENT_TYPE_EXCEPTION               :
    89                         // case EVENT_TYPE_SPR_ACCESS              :
    90                         // case EVENT_TYPE_MSYNC                   :
    91                         // case EVENT_TYPE_PSYNC                   :
    92                         // case EVENT_TYPE_CSYNC                   :
    93                       default :
    94                         {
    95                           // nothing
    96                           break;
    97                         }
     90                        log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * BRANCH_MISS_SPECULATION - Reset Update Table");
     91
     92                        reg_SAVE_RAT [i][j] = true;
     93                       
     94                        Tdepth_t   depth      = (_param->_have_port_depth)?PORT_READ(in_RETIRE_EVENT_DEPTH[i][j]):0;
     95                        Tdepth_t   depth_min  = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN[i][j]):0;
     96                        Tdepth_t   depth_max  = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX[i][j]):0;
     97                        Tcontrol_t depth_full = PORT_READ(in_DEPTH_FULL [i][j]);
     98                       
     99                        log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * depth      : %d",depth);
     100                        log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * depth_min  : %d",depth_min);
     101                        log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * depth_max  : %d",depth_max);
     102                        log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * depth_full : %d",depth_full);
     103
     104                        Tdepth_t   it        = depth_min;
     105                       
     106                        for (uint32_t k=0; k<_param->_nb_branch_speculated[i][j]; ++k)
     107                          {
     108                            it = (it-1)%_param->_nb_branch_speculated[i][j];
     109
     110                            if (it == depth)
     111                              break;
     112                           
     113                            log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"        * flush    : %d",it);
     114                           
     115                            free_rat[i][j][it] = true;
     116                          }
     117                       
     118                        break;
    98119                      }
    99                  
    100                   }
     120                    case EVENT_TYPE_EXCEPTION :
     121                      {
     122                        log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * EXCEPTION - Reset Update Table");
     123                       
     124                        reg_SAVE_RAT [i][j] = true;
     125
     126                        // Reset validity table
     127                        for (uint32_t k=0; k<_param->_nb_branch_speculated[i][j]; ++k)
     128                          free_rat [i][j][k] = true;
     129                       
     130                        break;
     131                      }
     132                    default :
     133                      {
     134                        break;
     135                      }
     136                    }
    101137              }
    102138
     
    114150              Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_RENAME_FRONT_END_ID [i]):0;
    115151              Tcontext_t context_id   = (_param->_have_port_context_id  )?PORT_READ(in_RENAME_CONTEXT_ID   [i]):0;
    116               Tcontrol_t save         = internal_RENAME_SAVE [i];
     152              Tcontrol_t write_rd     = PORT_READ(in_INSERT_WRITE_RD [i]);
     153              Tcontrol_t write_re     = PORT_READ(in_INSERT_WRITE_RE [i]);
     154              Tdepth_t   depth        = (_param->_have_port_depth       )?PORT_READ(in_RENAME_DEPTH        [i]):0;
     155              Tcontrol_t save_rat     = reg_SAVE_RAT[front_end_id][context_id];
     156              // TODO SAVE_RAT
    117157
    118158              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * front_end          : %d",front_end_id);
    119159              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * context            : %d",context_id);
    120               log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * save               : %d",save);
    121 
    122               // Test if write and modifie RAT (RD and RE)
    123 
    124               Tcontrol_t write_rd     = PORT_READ(in_INSERT_WRITE_RD [i]);
    125               Tcontrol_t write_re     = PORT_READ(in_INSERT_WRITE_RE [i]);
    126 
     160              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * depth              : %d",depth);
     161              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * save_rat (old)     : %d",save_rat);
     162
     163              if (save_rat)
     164                {
     165// #ifdef DEBUG_TEST
     166//                   if (reg_RAT_USE[front_end_id][context_id][depth])
     167//                     throw ERRORMORPHEO(FUNCTION,toString(_("Invalid RAT and need save_rat (%d).\n"),depth));
     168// #endif
     169                  reg_RAT_USE[front_end_id][context_id][depth] = true;
     170                 
     171                  // new branch, new RAT
     172                  for (uint32_t num_reg_log=0; num_reg_log<_param->_nb_general_register_logic; num_reg_log++)
     173                    RAT_GPR_SPECULATIVE_VALID [front_end_id][context_id][depth][num_reg_log] = false;
     174                  for (uint32_t num_reg_log=0; num_reg_log<_param->_nb_special_register_logic; num_reg_log++)
     175                    RAT_SPR_SPECULATIVE_VALID [front_end_id][context_id][depth][num_reg_log] = false;
     176                }
     177
     178              save_rat = PORT_READ(in_RENAME_SAVE_RAT [i]);
     179              reg_SAVE_RAT[front_end_id][context_id] = save_rat;
     180
     181              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * save_rat (new)     : %d",save_rat);
     182             
     183              // Test if write and modifie RAT
    127184              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * write_rd           : %d",write_rd);
    128185              if (write_rd == 1)
     
    134191                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_rd_phy     : %d",num_reg_rd_phy);
    135192
    136                   rat_gpr_speculative [front_end_id][context_id][num_reg_rd_log] = num_reg_rd_phy;
     193                  RAT_GPR_SPECULATIVE       [front_end_id][context_id][depth][num_reg_rd_log] = num_reg_rd_phy;
     194                  RAT_GPR_SPECULATIVE_VALID [front_end_id][context_id][depth][num_reg_rd_log] = true;
    137195                }
    138196
     
    146204                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_re_phy     : %d",num_reg_re_phy);
    147205
    148                   rat_spr_speculative [front_end_id][context_id][num_reg_re_log] = num_reg_re_phy;
    149                 }
    150 
    151               if (save)
    152                 {
    153                   // Need save RAT
    154 
    155                   Tdepth_t depth = (_param->_have_port_depth       )?PORT_READ(in_RENAME_DEPTH        [i]):0;
    156 
    157                   log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * depth old - new  : %d",depth);
    158 
    159 // #ifdef DEBUG_TEST
    160 //                   if (depth != ((depth_old+1)%_param->_nb_branch_speculated[front_end_id][context_id]))
    161 //                     throw ERRORMORPHEO(FUNCTION,toString(_("Rename : Invalid depth (old : %d, new : %d).\n"),depth_old,depth));
    162 // #endif
    163 
    164                   // save GPR
    165                   for (uint32_t num_gpr=0; num_gpr<_param->_nb_general_register_logic; num_gpr++)
    166                     rat_gpr_save [front_end_id][context_id][depth][num_gpr] = rat_gpr_speculative [front_end_id][context_id][num_gpr];
    167 
    168                   // save SPR
    169                   for (uint32_t num_spr=0; num_spr<_param->_nb_special_register_logic; num_spr++)
    170                     rat_spr_save [front_end_id][context_id][depth][num_spr] = rat_spr_speculative [front_end_id][context_id][num_spr];
    171 
    172                   // update rat_depth with new depth
    173                   rat_depth[front_end_id][context_id] = depth;
     206                  RAT_SPR_SPECULATIVE       [front_end_id][context_id][depth][num_reg_re_log] = num_reg_re_phy;
     207                  RAT_SPR_SPECULATIVE_VALID [front_end_id][context_id][depth][num_reg_re_log] = true;
    174208                }
    175209            }
     
    179213        // =====================================================
    180214        // Second : interface retire
    181         //  (because if an event on the same thread : the instruction is already renamed)
    182         for (uint32_t i=0; i<_param->_nb_inst_retire; i++)
    183           if (PORT_READ(in_RETIRE_VAL [i]) and internal_RETIRE_ACK [i])
    184             {
     215        // if event AND event is exception, restore rat_NOT_SPECULATIVE
     216
     217        for (uint32_t i=0; i<_param->_nb_inst_retire; i++)
     218          if (PORT_READ(in_RETIRE_VAL [i]) and internal_RETIRE_ACK [i])
     219            {
    185220              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"  * RETIRE [%d]",i);
    186221
    187               // if no event : no effect, because the RAT content the most recently register
    188               // but if they have a event (exception or miss speculation), the rat must restore the oldest value
    189               // To restore the oldest valid value, we use the rat_update_table. if the bit is unset, also they have none update on this register
    190               // the retire interface became of the Re Order Buffer, also is in program sequence !
    191 
    192 #ifdef DEBUG
    193222              Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_RETIRE_FRONT_END_ID [i]):0;
    194223              Tcontext_t context_id   = (_param->_have_port_context_id  )?PORT_READ(in_RETIRE_CONTEXT_ID   [i]):0;
    195 #endif
    196224              Tcontrol_t write_rd     = PORT_READ(in_RETIRE_WRITE_RD [i]);
    197225              Tcontrol_t write_re     = PORT_READ(in_RETIRE_WRITE_RE [i]);
     
    206234              if (write_rd == 1)
    207235                {
    208 #ifdef DEBUG
    209236                  Tgeneral_address_t num_reg_rd_log     = PORT_READ(in_RETIRE_NUM_REG_RD_LOG     [i]);
    210 #endif
    211237
    212238                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_rd_log     : %d",num_reg_rd_log    );
     
    214240                  if (not restore)
    215241                    {
    216 #ifdef DEBUG
    217242                  Tgeneral_address_t num_reg_rd_phy_new = PORT_READ(in_RETIRE_NUM_REG_RD_PHY_NEW [i]);
    218 #endif
     243
    219244                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_rd_phy_new : %d",num_reg_rd_phy_new);
    220245
    221                   // rat_gpr_speculative [front_end_id][context_id][num_reg_rd_log] = num_reg_rd_phy_new;
     246                  RAT_GPR_NOT_SPECULATIVE [front_end_id][context_id][num_reg_rd_log] = num_reg_rd_phy_new;
    222247                    }
    223248                }
     
    226251              if (write_re == 1)
    227252                {
    228 #ifdef DEBUG
    229253                  Tspecial_address_t num_reg_re_log     = PORT_READ(in_RETIRE_NUM_REG_RE_LOG     [i]);
     254
     255                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_re_log     : %d",num_reg_re_log    );
     256
     257                  if (not restore)
     258                    {
     259                  Tspecial_address_t num_reg_re_phy_new = PORT_READ(in_RETIRE_NUM_REG_RE_PHY_NEW [i]);
     260
     261                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_re_phy_new : %d",num_reg_re_phy_new);
     262
     263                  RAT_SPR_NOT_SPECULATIVE [front_end_id][context_id][num_reg_re_log] = num_reg_re_phy_new;
     264                    }
     265                }
     266            }
     267
     268        // =====================================================
     269        // ====[ DEPTH ]========================================
     270        // =====================================================
     271#if 1
     272        for (uint32_t i=0; i<_param->_nb_front_end; ++i)
     273          for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
     274            {
     275              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"  * DEPTH[%d][%d]",i,j);
     276
     277              Tdepth_t   depth_min  = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN[i][j]):0;
     278              Tdepth_t   depth_max  = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX[i][j]):0;
     279              Tcontrol_t depth_full = PORT_READ(in_DEPTH_FULL [i][j]);
     280
     281              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * depth_min  : %d",depth_min);
     282              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * depth_max  : %d",depth_max);
     283              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * depth_full : %d",depth_full);
     284             
     285              if (not depth_full)
     286                {
     287                  Tdepth_t depth     = depth_max;
     288
     289                  for (uint32_t k=0; k<_param->_nb_branch_speculated[i][j]; ++k)
     290                    {
     291                      if (depth == depth_min)
     292                        break;
     293
     294                      if (reg_RAT_USE[i][j][depth])
     295                        {
     296                          log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * flush    : %d",depth);
     297                 
     298                          free_rat [i][j][depth] = true;
     299                          // reg_RAT_USE[i][j][depth] = false;
     300
     301                          // for (uint32_t l=0; l<_param->_nb_general_register_logic; l++)
     302                          //   RAT_GPR_SPECULATIVE_VALID  [i][j][depth][l] = false;
     303                          // for (uint32_t l=0; l<_param->_nb_special_register_logic; l++)
     304                          //   RAT_SPR_SPECULATIVE_VALID  [i][j][depth][l] = false;
     305                        }
     306
     307                      depth = (depth+1)%_param->_nb_branch_speculated[i][j];
     308                    }
     309                }
     310            }
    230311#endif
    231 
    232                   log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_re_log     : %d",num_reg_re_log    );
    233 
    234                   if (not restore)
    235                     {
    236 #ifdef DEBUG
    237                   Tspecial_address_t num_reg_re_phy_new = PORT_READ(in_RETIRE_NUM_REG_RE_PHY_NEW [i]);
    238 #endif
    239 
    240                   log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_re_phy_new : %d",num_reg_re_phy_new);
    241 
    242                   // rat_spr_speculative [front_end_id][context_id][num_reg_re_log] = num_reg_re_phy_new;
    243                     }
    244                 }
    245 
    246             }
     312        // =====================================================
     313        // ====[ FREE RAT ]=====================================
     314        // =====================================================
     315        for (uint32_t i=0; i<_param->_nb_front_end; ++i)
     316          for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
     317            for (uint32_t k=0; k<_param->_nb_branch_speculated[i][j]; ++k)
     318              if (free_rat[i][j][k])
     319                {
     320                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"  * Free RAT : [%d][%d][%d]",i,j,k);
     321                 
     322                  reg_RAT_USE[i][j][k] = false;
     323                 
     324                  for (uint32_t l=0; l<_param->_nb_general_register_logic; l++)
     325                    RAT_GPR_SPECULATIVE_VALID  [i][j][k][l] = false;
     326                  for (uint32_t l=0; l<_param->_nb_special_register_logic; l++)
     327                    RAT_SPR_SPECULATIVE_VALID  [i][j][k][l] = false;
     328                }
     329
    247330      }
    248331
     
    255338        for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
    256339          {
    257             log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * front_end[%d].context[%d] - rat_depth : %d",i,j,rat_depth[i][j]);
    258          
    259             for (uint32_t k=0; k<_param->_nb_general_register_logic; k+=limit)
     340            log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * front_end[%d].context[%d] - SAVE_RAT : %d",i,j,reg_SAVE_RAT[i][j]);
     341             
     342            for (uint32_t l=0; l<_param->_nb_general_register_logic; l+=limit)
    260343              {
    261344                std::string str = "";
    262345                for (uint32_t x=0; x<limit; x++)
    263346                  {
    264                     uint32_t index = k+x;
     347                    uint32_t index = l+x;
    265348                    if (index >= _param->_nb_general_register_logic)
    266349                      break;
    267350                    else
    268                       str+=toString("GPR[%.4d] - %.5d | ",index,rat_gpr_speculative [i][j][index]);
     351                      str+=toString("GPR[%.4d]       -   %.5d | ",index,RAT_GPR_NOT_SPECULATIVE [i][j][index]);
    269352                  }
    270353                log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * %s",str.c_str());
    271354              }
    272355
    273             for (uint32_t l=0; l<_param->_nb_branch_speculated[i][j]; ++l)
    274               for (uint32_t k=0; k<_param->_nb_general_register_logic; k+=limit)
    275                 {
    276                   std::string str = "";
    277                   for (uint32_t x=0; x<limit; x++)
    278                     {
    279                       uint32_t index = k+x;
    280                       if (index >= _param->_nb_general_register_logic)
    281                         break;
    282                       else
    283                         str+=toString("GPR_%d[%.4d] - %.5d | ",l,index,rat_gpr_save [i][j][l][index]);
    284                     }
    285                   log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * %s",str.c_str());
    286                 }
    287            
    288             for (uint32_t k=0; k<_param->_nb_special_register_logic; k+=limit)
     356            for (uint32_t k=0; k<_param->_nb_branch_speculated[i][j]; ++k)
     357              {
     358                log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * GPR      [%.4d] - USE : %d",k,reg_RAT_USE [i][j][k]);
     359
     360                for (uint32_t l=0; l<_param->_nb_general_register_logic; l+=limit)
     361                  {
     362                    std::string str = "";
     363                    for (uint32_t x=0; x<limit; x++)
     364                      {
     365                        uint32_t index = l+x;
     366                        if (index >= _param->_nb_general_register_logic)
     367                          break;
     368                        else
     369                          str+=toString("GPR[%.4d][%.4d] - %.1d %.5d | ",index,k,RAT_GPR_SPECULATIVE_VALID [i][j][k][index],RAT_GPR_SPECULATIVE [i][j][k][index]);
     370                      }
     371                    log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * %s",str.c_str());
     372                  }
     373              }
     374
     375            for (uint32_t l=0; l<_param->_nb_special_register_logic; l+=limit)
    289376              {
    290377                std::string str = "";
     
    292379                for (uint32_t x=0; x<limit; x++)
    293380                  {
    294                     uint32_t index = k+x;
     381                    uint32_t index = l+x;
    295382                    if (index >= _param->_nb_special_register_logic)
    296383                      break;
    297384                    else
    298                       str+=toString("SPR[%.4d] - %.5d | ",index,rat_spr_speculative [i][j][index]);
     385                      str+=toString("SPR[%.4d]       -   %.5d | ",index,RAT_SPR_NOT_SPECULATIVE [i][j][index]);
    299386                  }
    300387                log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * %s",str.c_str());
    301388              }
    302389
    303             for (uint32_t l=0; l<_param->_nb_branch_speculated[i][j]; ++l)
    304               for (uint32_t k=0; k<_param->_nb_special_register_logic; k+=limit)
    305                 {
    306                   std::string str = "";
    307                   for (uint32_t x=0; x<limit; x++)
    308                     {
    309                       uint32_t index = k+x;
    310                       if (index >= _param->_nb_special_register_logic)
    311                         break;
    312                       else
    313                         str+=toString("SPR_%d[%.4d] - %.5d | ",l,index,rat_spr_save [i][j][l][index]);
    314                     }
    315                   log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * %s",str.c_str());
    316                 }
    317 
     390     
     391            for (uint32_t k=0; k<_param->_nb_branch_speculated[i][j]; ++k)
     392              {
     393                log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * SPR      [%.4d] - USE : %d",k,reg_RAT_USE [i][j][k]);
     394               
     395                for (uint32_t l=0; l<_param->_nb_special_register_logic; l+=limit)
     396                  {
     397                    std::string str = "";
     398                   
     399                    for (uint32_t x=0; x<limit; x++)
     400                      {
     401                        uint32_t index = l+x;
     402                        if (index >= _param->_nb_special_register_logic)
     403                          break;
     404                        else
     405                          str+=toString("SPR[%.4d][%.4d] - %.1d %.5d | ",index,k,RAT_SPR_SPECULATIVE_VALID [i][j][k][index],RAT_SPR_SPECULATIVE [i][j][k][index]);
     406                      }
     407                    log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * %s",str.c_str());
     408                  }
     409              }
    318410          }
    319411    }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_function_one_save_genMealy_rename.cpp

    r139 r145  
    5252        // else, they have an previous event, the rat_not_speculative have the valid register
    5353
    54         Tgeneral_address_t num_reg_ra_phy    = (rat_gpr_speculative_valid[front_end_id][context_id][num_reg_ra_log] and not have_event)?rat_gpr_speculative[front_end_id][context_id][num_reg_ra_log]:rat_gpr_not_speculative[front_end_id][context_id][num_reg_ra_log];
    55         Tgeneral_address_t num_reg_rb_phy    = (rat_gpr_speculative_valid[front_end_id][context_id][num_reg_rb_log] and not have_event)?rat_gpr_speculative[front_end_id][context_id][num_reg_rb_log]:rat_gpr_not_speculative[front_end_id][context_id][num_reg_rb_log];
    56         Tspecial_address_t num_reg_rc_phy    = (rat_spr_speculative_valid[front_end_id][context_id][num_reg_rc_log] and not have_event)?rat_spr_speculative[front_end_id][context_id][num_reg_rc_log]:rat_spr_not_speculative[front_end_id][context_id][num_reg_rc_log];
    57         Tgeneral_address_t num_reg_rd_phy_old= (rat_gpr_speculative_valid[front_end_id][context_id][num_reg_rd_log] and not have_event)?rat_gpr_speculative[front_end_id][context_id][num_reg_rd_log]:rat_gpr_not_speculative[front_end_id][context_id][num_reg_rd_log];
    58         Tspecial_address_t num_reg_re_phy_old= (rat_spr_speculative_valid[front_end_id][context_id][num_reg_re_log] and not have_event)?rat_spr_speculative[front_end_id][context_id][num_reg_re_log]:rat_spr_not_speculative[front_end_id][context_id][num_reg_re_log];
     54        Tgeneral_address_t num_reg_ra_phy    = (RAT_GPR_SPECULATIVE_VALID[front_end_id][context_id][0][num_reg_ra_log] and not have_event)?RAT_GPR_SPECULATIVE[front_end_id][context_id][0][num_reg_ra_log]:RAT_GPR_NOT_SPECULATIVE[front_end_id][context_id][num_reg_ra_log];
     55        Tgeneral_address_t num_reg_rb_phy    = (RAT_GPR_SPECULATIVE_VALID[front_end_id][context_id][0][num_reg_rb_log] and not have_event)?RAT_GPR_SPECULATIVE[front_end_id][context_id][0][num_reg_rb_log]:RAT_GPR_NOT_SPECULATIVE[front_end_id][context_id][num_reg_rb_log];
     56        Tspecial_address_t num_reg_rc_phy    = (RAT_SPR_SPECULATIVE_VALID[front_end_id][context_id][0][num_reg_rc_log] and not have_event)?RAT_SPR_SPECULATIVE[front_end_id][context_id][0][num_reg_rc_log]:RAT_SPR_NOT_SPECULATIVE[front_end_id][context_id][num_reg_rc_log];
     57        Tgeneral_address_t num_reg_rd_phy_old= (RAT_GPR_SPECULATIVE_VALID[front_end_id][context_id][0][num_reg_rd_log] and not have_event)?RAT_GPR_SPECULATIVE[front_end_id][context_id][0][num_reg_rd_log]:RAT_GPR_NOT_SPECULATIVE[front_end_id][context_id][num_reg_rd_log];
     58        Tspecial_address_t num_reg_re_phy_old= (RAT_SPR_SPECULATIVE_VALID[front_end_id][context_id][0][num_reg_re_log] and not have_event)?RAT_SPR_SPECULATIVE[front_end_id][context_id][0][num_reg_re_log]:RAT_SPR_NOT_SPECULATIVE[front_end_id][context_id][num_reg_re_log];
    5959
    6060        log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_ra         : %d -> %d",num_reg_ra_log,num_reg_ra_phy    );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_function_one_save_transition.cpp

    r139 r145  
    3434          for (uint32_t j=0; j<_param->_nb_context[i]; j++)
    3535            {
    36               rat_gpr_not_speculative   [i][j][0] = 0;
    37               rat_gpr_speculative_valid [i][j][0] = false;
    38               rat_gpr_speculative       [i][j][0] = 0    ; // not necessary
     36              RAT_GPR_NOT_SPECULATIVE   [i][j][0]    = 0;
     37              RAT_GPR_SPECULATIVE_VALID [i][j][0][0] = false;
     38              RAT_GPR_SPECULATIVE       [i][j][0][0] = 0    ; // not necessary
    3939
    4040              for (uint32_t k=1; k<_param->_nb_general_register_logic; k++)
    4141                {
    42                   rat_gpr_not_speculative    [i][j][k] = gpr++;
    43                   rat_gpr_speculative_valid  [i][j][k] = false;
    44                   rat_gpr_speculative        [i][j][k] = 0    ; // not necessary
     42                  RAT_GPR_NOT_SPECULATIVE    [i][j][k]    = gpr++;
     43                  RAT_GPR_SPECULATIVE_VALID  [i][j][0][k] = false;
     44                  RAT_GPR_SPECULATIVE        [i][j][0][k] = 0    ; // not necessary
    4545                }
    4646              for (uint32_t k=0; k<_param->_nb_special_register_logic; k++)
    4747                {
    48                   rat_spr_not_speculative    [i][j][k] = spr++;
    49                   rat_spr_speculative_valid  [i][j][k] = false;
    50                   rat_spr_speculative        [i][j][k] = 0    ; // not necessary
     48                  RAT_SPR_NOT_SPECULATIVE    [i][j][k]    = spr++;
     49                  RAT_SPR_SPECULATIVE_VALID  [i][j][0][k] = false;
     50                  RAT_SPR_SPECULATIVE        [i][j][0][k] = 0    ; // not necessary
    5151                }
    5252            }
     
    6969                  // Reset validity table
    7070                  for (uint32_t k=0; k<_param->_nb_general_register_logic; k++)
    71                     rat_gpr_speculative_valid [i][j][k] = false;
     71                    RAT_GPR_SPECULATIVE_VALID [i][j][0][k] = false;
    7272                  for (uint32_t k=0; k<_param->_nb_special_register_logic; k++)
    73                     rat_spr_speculative_valid [i][j][k] = false;
     73                    RAT_SPR_SPECULATIVE_VALID [i][j][0][k] = false;
    7474                }
    7575
     
    103103                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_rd_phy     : %d",num_reg_rd_phy);
    104104
    105                   rat_gpr_speculative       [front_end_id][context_id][num_reg_rd_log] = num_reg_rd_phy;
    106                   rat_gpr_speculative_valid [front_end_id][context_id][num_reg_rd_log] = true;
     105                  RAT_GPR_SPECULATIVE       [front_end_id][context_id][0][num_reg_rd_log] = num_reg_rd_phy;
     106                  RAT_GPR_SPECULATIVE_VALID [front_end_id][context_id][0][num_reg_rd_log] = true;
    107107                }
    108108
     
    116116                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_re_phy     : %d",num_reg_re_phy);
    117117
    118                   rat_spr_speculative       [front_end_id][context_id][num_reg_re_log] = num_reg_re_phy;
    119                   rat_spr_speculative_valid [front_end_id][context_id][num_reg_re_log] = true;
     118                  RAT_SPR_SPECULATIVE       [front_end_id][context_id][0][num_reg_re_log] = num_reg_re_phy;
     119                  RAT_SPR_SPECULATIVE_VALID [front_end_id][context_id][0][num_reg_re_log] = true;
    120120                }
    121121            }
     
    160160                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_rd_phy_new : %d",num_reg_rd_phy_new);
    161161
    162                   rat_gpr_not_speculative [front_end_id][context_id][num_reg_rd_log] = num_reg_rd_phy_new;
     162                  RAT_GPR_NOT_SPECULATIVE [front_end_id][context_id][num_reg_rd_log] = num_reg_rd_phy_new;
    163163                    }
    164164                }
     
    177177                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_re_phy_new : %d",num_reg_re_phy_new);
    178178
    179                   rat_spr_not_speculative [front_end_id][context_id][num_reg_re_log] = num_reg_re_phy_new;
     179                  RAT_SPR_NOT_SPECULATIVE [front_end_id][context_id][num_reg_re_log] = num_reg_re_phy_new;
    180180                    }
    181181                }
     
    203203                      break;
    204204                    else
    205                       str+=toString("GPR[%.4d] - %.1d %.5d (%.5d) | ",index,rat_gpr_speculative_valid [i][j][index],rat_gpr_speculative [i][j][index],rat_gpr_not_speculative [i][j][index]);
     205                      str+=toString("GPR[%.4d] - %.1d %.5d (%.5d) | ",index,RAT_GPR_SPECULATIVE_VALID [i][j][0][index],RAT_GPR_SPECULATIVE [i][j][0][index],RAT_GPR_NOT_SPECULATIVE [i][j][index]);
    206206                  }
    207207                log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * %s",str.c_str());
     
    218218                      break;
    219219                    else
    220                       str+=toString("SPR[%.4d] - %.1d %.5d (%.5d) | ",index,rat_spr_speculative_valid [i][j][index],rat_spr_speculative [i][j][index],rat_spr_not_speculative [i][j][index]);
     220                      str+=toString("SPR[%.4d] - %.1d %.5d (%.5d) | ",index,RAT_SPR_SPECULATIVE_VALID [i][j][0][index],RAT_SPR_SPECULATIVE [i][j][0][index],RAT_SPR_NOT_SPECULATIVE [i][j][index]);
    221221                  }
    222222                log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * %s",str.c_str());
     
    235235              for (uint32_t y=x+1; y<_param->_nb_general_register_logic; ++y)
    236236                {
    237                   if (rat_gpr_speculative_valid [i][j][x] and
    238                       rat_gpr_speculative_valid [i][j][y] and
    239                       (rat_gpr_speculative[i][j][x] == rat_gpr_speculative[i][j][y]))
    240                     throw ERRORMORPHEO (FUNCTION,toString(_("In RAT, rat_gpr_speculative[%d][%d][%d] == rat_gpr_speculative[%d][%d][%d] == %d"),i,j,x,i,j,y,rat_gpr_speculative[i][j][x]));
    241                   if (rat_gpr_not_speculative[i][j][x] == rat_gpr_not_speculative[i][j][y])
    242                     throw ERRORMORPHEO (FUNCTION,toString(_("In RAT, rat_gpr_not_speculative[%d][%d][%d] == rat_gpr_not_speculative[%d][%d][%d] == %d"),i,j,x,i,j,y,rat_gpr_not_speculative[i][j][x]));
     237                  if (RAT_GPR_SPECULATIVE_VALID [i][j][0][x] and
     238                      RAT_GPR_SPECULATIVE_VALID [i][j][0][y] and
     239                      (RAT_GPR_SPECULATIVE[i][j][0][x] == RAT_GPR_SPECULATIVE[i][j][0][y]))
     240                    throw ERRORMORPHEO (FUNCTION,toString(_("In RAT, RAT_GPR_SPECULATIVE[%d][%d][0][%d] == RAT_GPR_SPECULATIVE[%d][%d][0][%d] == %d"),i,j,x,i,j,y,RAT_GPR_SPECULATIVE[i][j][0][x]));
     241                  if (RAT_GPR_NOT_SPECULATIVE[i][j][x] == RAT_GPR_NOT_SPECULATIVE[i][j][y])
     242                    throw ERRORMORPHEO (FUNCTION,toString(_("In RAT, RAT_GPR_NOT_SPECULATIVE[%d][%d][%d] == RAT_GPR_NOT_SPECULATIVE[%d][%d][%d] == %d"),i,j,x,i,j,y,RAT_GPR_NOT_SPECULATIVE[i][j][x]));
    243243                 
    244244                }
     
    246246              for (uint32_t y=x+1; y<_param->_nb_special_register_logic; ++y)
    247247                {
    248                   if(rat_spr_speculative_valid [i][j][x] and
    249                      rat_spr_speculative_valid [i][j][y] and
    250                      (rat_spr_speculative[i][j][x] == rat_spr_speculative[i][j][y]))
    251                     throw ERRORMORPHEO (FUNCTION,toString(_("In RAT, rat_spr_speculative[%d][%d][%d] == rat_spr_speculative[%d][%d][%d] == %d"),i,j,x,i,j,y,rat_spr_speculative[i][j][x]));
    252                   if (rat_spr_not_speculative[i][j][x] == rat_spr_not_speculative[i][j][y])
    253                     throw ERRORMORPHEO (FUNCTION,toString(_("In RAT, rat_spr_not_speculative[%d][%d][%d] == rat_spr_not_speculative[%d][%d][%d] == %d"),i,j,x,i,j,y,rat_spr_not_speculative[i][j][x]));
     248                  if(RAT_SPR_SPECULATIVE_VALID [i][j][0][x] and
     249                     RAT_SPR_SPECULATIVE_VALID [i][j][0][y] and
     250                     (RAT_SPR_SPECULATIVE[i][j][0][x] == RAT_SPR_SPECULATIVE[i][j][0][y]))
     251                    throw ERRORMORPHEO (FUNCTION,toString(_("In RAT, RAT_SPR_SPECULATIVE[%d][%d][0][%d] == RAT_SPR_SPECULATIVE[%d][%d][0][%d] == %d"),i,j,x,i,j,y,RAT_SPR_SPECULATIVE[i][j][0][x]));
     252                  if (RAT_SPR_NOT_SPECULATIVE[i][j][x] == RAT_SPR_NOT_SPECULATIVE[i][j][y])
     253                    throw ERRORMORPHEO (FUNCTION,toString(_("In RAT, RAT_SPR_NOT_SPECULATIVE[%d][%d][%d] == RAT_SPR_NOT_SPECULATIVE[%d][%d][%d] == %d"),i,j,x,i,j,y,RAT_SPR_NOT_SPECULATIVE[i][j][x]));
    254254                 
    255255                }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Stat_List_unit_transition.cpp

    r139 r145  
    1717namespace register_translation_unit {
    1818namespace stat_list_unit {
     19
     20 
     21#if (DEBUG >= DEBUG_TRACE)
     22# define dump_stat_list                                                 \
     23  do                                                                    \
     24    {                                                                   \
     25      log_printf(TRACE,Stat_List_unit,FUNCTION,"  * Dump Stat List");   \
     26      log_printf(TRACE,Stat_List_unit,FUNCTION,"    * reg_GPR_PTR_FREE : %d",reg_GPR_PTR_FREE); \
     27      log_printf(TRACE,Stat_List_unit,FUNCTION,"    * reg_SPR_PTR_FREE : %d",reg_SPR_PTR_FREE); \
     28                                                                        \
     29      for (uint32_t i=0; i<_param->_nb_bank; i++)                       \
     30        for (uint32_t j=0; j<_param->_nb_general_register_by_bank; j++) \
     31          log_printf(TRACE,Stat_List_unit,FUNCTION,"    * GPR[%.4d][%.5d] (%.5d) - free %.1d, link %.1d, use %.1d", \
     32                     i,                                                 \
     33                     j,                                                 \
     34                     (i<<_param->_shift_gpr)|j,                         \
     35                     gpr_stat_list[i][j]._is_free,                      \
     36                     gpr_stat_list[i][j]._is_link,                      \
     37                     gpr_stat_list[i][j]._is_use                        \
     38                     );                                                 \
     39      for (uint32_t i=0; i<_param->_nb_bank; i++)                       \
     40        for (uint32_t j=0; j<_param->_nb_special_register_by_bank; j++) \
     41          log_printf(TRACE,Stat_List_unit,FUNCTION,"    * SPR[%.4d][%.5d] (%.5d) - free %.1d, link %.1d, use %.1d", \
     42                     i,                                                 \
     43                     j,                                                 \
     44                     (i<<_param->_shift_spr)|j,                         \
     45                     spr_stat_list[i][j]._is_free,                      \
     46                     spr_stat_list[i][j]._is_link,                      \
     47                     spr_stat_list[i][j]._is_use                        \
     48                     );                                                 \
     49    }                                                                   \
     50  while (0)
     51#else
     52# define dump_stat_list
     53#endif
    1954
    2055
     
    107142            for (uint32_t i=0; i<_param->_nb_bank; i++)
    108143              for (uint32_t j=0; j<_param->_nb_general_register_by_bank; j++)
    109                 if (not gpr_stat_list [i][j]._is_free)
     144                if (not (gpr_stat_list [i][j]._is_free or gpr_stat_list [i][j].can_free()))
    110145                  list_gpr_not_free+=toString((i<<_param->_shift_gpr)|j)+" ";   
    111146
     
    114149            for (uint32_t i=0; i<_param->_nb_bank; i++)
    115150              for (uint32_t j=0; j<_param->_nb_special_register_by_bank; j++)
    116                 if (not spr_stat_list [i][j]._is_free)
     151                if (not (spr_stat_list [i][j]._is_free or spr_stat_list [i][j].can_free()))
    117152                  list_spr_not_free+=toString((i<<_param->_shift_spr)|j)+" ";   
     153
     154          if (error_nb_gpr_free     or
     155              error_nb_spr_free     or
     156              error_rob_nb_gpr_free or
     157              error_rob_nb_spr_free)
     158            dump_stat_list;
    118159
    119160          if (error_nb_gpr_free)
     
    334375
    335376
    336 #if (DEBUG >= DEBUG_TRACE)
    337     {
    338       log_printf(TRACE,Stat_List_unit,FUNCTION,"  * Dump Stat List");
    339       log_printf(TRACE,Stat_List_unit,FUNCTION,"    * reg_GPR_PTR_FREE : %d",reg_GPR_PTR_FREE);
    340       log_printf(TRACE,Stat_List_unit,FUNCTION,"    * reg_SPR_PTR_FREE : %d",reg_SPR_PTR_FREE);
    341      
    342       for (uint32_t i=0; i<_param->_nb_bank; i++)
    343         for (uint32_t j=0; j<_param->_nb_general_register_by_bank; j++)
    344           log_printf(TRACE,Stat_List_unit,FUNCTION,"    * GPR[%.4d][%.5d] (%.5d) - free %.1d, link %.1d, use %.1d",
    345                      i,
    346                      j,
    347                      (i<<_param->_shift_gpr)|j,
    348                      gpr_stat_list[i][j]._is_free,
    349                      gpr_stat_list[i][j]._is_link,
    350                      gpr_stat_list[i][j]._is_use// ,
    351 //                      gpr_stat_list[i][j]._is_valid,
    352 //                      gpr_stat_list[i][j]._counter
    353                      );
    354       for (uint32_t i=0; i<_param->_nb_bank; i++)
    355         for (uint32_t j=0; j<_param->_nb_special_register_by_bank; j++)
    356           log_printf(TRACE,Stat_List_unit,FUNCTION,"    * SPR[%.4d][%.5d] (%.5d) - free %.1d, link %.1d, use %.1d",
    357                      i,
    358                      j,
    359                      (i<<_param->_shift_spr)|j,
    360                      spr_stat_list[i][j]._is_free,
    361                      spr_stat_list[i][j]._is_link,
    362                      spr_stat_list[i][j]._is_use// ,
    363 //                      spr_stat_list[i][j]._is_valid,
    364 //                      spr_stat_list[i][j]._counter
    365                      );
    366     }
    367 #endif
     377    dump_stat_list;
     378
    368379
    369380#ifdef DEBUG_TEST
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/include/Register_translation_unit.h

    r139 r145  
    144144  public    : SC_IN (Tdepth_t          )  ***  in_RETIRE_EVENT_DEPTH       ;//[nb_front_end][nb_context]
    145145
     146    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     147  public    : SC_IN (Tdepth_t          )  ***  in_DEPTH_MIN                ;//[nb_front_end][nb_context]
     148  public    : SC_IN (Tdepth_t          )  ***  in_DEPTH_MAX                ;//[nb_front_end][nb_context]
     149  public    : SC_IN (Tcontrol_t        )  ***  in_DEPTH_FULL               ;//[nb_front_end][nb_context]
     150
    146151    // ~~~~~[ interface : "info" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    147152#ifdef DEBUG_TEST
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Register_translation_unit_allocation.cpp

    r139 r145  
    123123      ALLOC1_SIGNAL_IN ( in_RETIRE_FRONT_END_ID      ,"front_end_id"      ,Tcontext_t        ,_param->_size_front_end_id          );
    124124      ALLOC1_SIGNAL_IN ( in_RETIRE_CONTEXT_ID        ,"context_id"        ,Tcontext_t        ,_param->_size_context_id            );
    125 //       ALLOC1_SIGNAL_IN ( in_RETIRE_READ_RA           ,"read_ra"           ,Tcontrol_t        ,1                                   );
    126 //       ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RA_PHY    ,"num_reg_ra_phy"    ,Tgeneral_address_t,_param->_size_general_register      );
    127 //       ALLOC1_SIGNAL_IN ( in_RETIRE_READ_RB           ,"read_rb"           ,Tcontrol_t        ,1                                   );
    128 //       ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RB_PHY    ,"num_reg_rb_phy"    ,Tgeneral_address_t,_param->_size_general_register      );
    129 //       ALLOC1_SIGNAL_IN ( in_RETIRE_READ_RC           ,"read_rc"           ,Tcontrol_t        ,1                                   );
    130 //       ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RC_PHY    ,"num_reg_rc_phy"    ,Tspecial_address_t,_param->_size_special_register      );
     125//    ALLOC1_SIGNAL_IN ( in_RETIRE_READ_RA           ,"read_ra"           ,Tcontrol_t        ,1                                   );
     126//    ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RA_PHY    ,"num_reg_ra_phy"    ,Tgeneral_address_t,_param->_size_general_register      );
     127//    ALLOC1_SIGNAL_IN ( in_RETIRE_READ_RB           ,"read_rb"           ,Tcontrol_t        ,1                                   );
     128//    ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RB_PHY    ,"num_reg_rb_phy"    ,Tgeneral_address_t,_param->_size_general_register      );
     129//    ALLOC1_SIGNAL_IN ( in_RETIRE_READ_RC           ,"read_rc"           ,Tcontrol_t        ,1                                   );
     130//    ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RC_PHY    ,"num_reg_rc_phy"    ,Tspecial_address_t,_param->_size_special_register      );
    131131      ALLOC1_SIGNAL_IN ( in_RETIRE_WRITE_RD          ,"write_rd"          ,Tcontrol_t        ,1                                   );
    132132      ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RD_LOG    ,"num_reg_rd_log"    ,Tgeneral_address_t,_param->_size_general_register_logic);
     
    155155
    156156      ALLOC2_INTERFACE_END(_param->_nb_front_end, _param->_nb_context[it1]);
     157    }
     158
     159    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     160    {
     161      ALLOC2_INTERFACE_BEGIN("depth",IN,WEST,_("Interface with Prediction unit."),_param->_nb_front_end, _param->_nb_context[it1]);
     162
     163      _ALLOC2_SIGNAL_IN ( in_DEPTH_MIN                        ,"MIN"                        ,Tdepth_t         ,_param->_size_depth                  ,_param->_nb_front_end, _param->_nb_context[it1]);
     164      _ALLOC2_SIGNAL_IN ( in_DEPTH_MAX                        ,"MAX"                        ,Tdepth_t         ,_param->_size_depth                  ,_param->_nb_front_end, _param->_nb_context[it1]);
     165      _ALLOC2_SIGNAL_IN ( in_DEPTH_FULL                       ,"FULL"                       ,Tcontrol_t       ,1                                    ,_param->_nb_front_end, _param->_nb_context[it1]);
     166
     167      ALLOC2_INTERFACE_END(_param->_nb_front_end,_param->_nb_context[it1]);
    157168    }
    158169
     
    429440                                dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_DEPTH");
    430441              }
     442          }
     443
     444      for (uint32_t i=0; i<_param->_nb_front_end; i++)
     445        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
     446          {
     447            dest = _name;
     448           
     449#ifdef POSITION
     450            _component->interface_map (src ,"depth_"+toString(i)+"_"+toString(j),
     451                                       dest,"depth_"+toString(i)+"_"+toString(j));
     452#endif     
     453            if (_param->_have_port_depth)
     454              {
     455            PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MIN" ,
     456                                dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MIN" );
     457            PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MAX" ,
     458                                dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MAX" );
     459              }
     460            PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_FULL",
     461                                dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_FULL");
    431462          }
    432463    }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Register_translation_unit_deallocation.cpp

    r139 r145  
    102102        DELETE2_SIGNAL_COND( in_RETIRE_EVENT_DEPTH          ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_depth     ,_param->_rat_scheme == RAT_DEPTH_SAVE);
    103103
     104        DELETE2_SIGNAL     ( in_DEPTH_MIN                   ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_depth);
     105        DELETE2_SIGNAL     ( in_DEPTH_MAX                   ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_depth);
     106        DELETE2_SIGNAL     ( in_DEPTH_FULL                  ,_param->_nb_front_end,_param->_nb_context[it1],1                  );
     107
    104108#ifdef DEBUG_TEST
    105109        DELETE0_SIGNAL     ( in_INFO_ROB_EMPTY  ,1);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/include/Rename_unit_Glue.h

    r139 r145  
    6969  public    : SC_OUT(Tcontext_t        )   ** out_INSERT_CONTEXT_ID                             ;//[nb_inst_insert]
    7070  public    : SC_OUT(Tdepth_t          )   ** out_INSERT_DEPTH                                  ;//[nb_inst_insert]
     71  public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_SAVE_RAT                               ;//[nb_inst_insert]
    7172  public    : SC_OUT(Ttype_t           )   ** out_INSERT_TYPE                                   ;//[nb_inst_insert]
    7273  public    : SC_OUT(Toperation_t      )   ** out_INSERT_OPERATION                              ;//[nb_inst_insert]
     
    8283  public    : SC_IN (Tcontext_t        )   **  in_INSERT_RENAME_SELECT_CONTEXT_ID               ;//[nb_inst_insert]
    8384  public    : SC_IN (Tdepth_t          )   **  in_INSERT_RENAME_SELECT_DEPTH                    ;//[nb_inst_insert]
     85  public    : SC_IN (Tcontrol_t        )   **  in_INSERT_RENAME_SELECT_SAVE_RAT                 ;//[nb_inst_insert]
    8486  public    : SC_IN (Ttype_t           )   **  in_INSERT_RENAME_SELECT_TYPE                     ;//[nb_inst_insert]
    8587  public    : SC_IN (Toperation_t      )   **  in_INSERT_RENAME_SELECT_OPERATION                ;//[nb_inst_insert]
     
    9496  public    : SC_OUT(Tcontext_t        )   ** out_INSERT_REGISTER_TRANSLATION_CONTEXT_ID        ;//[nb_inst_insert]
    9597  public    : SC_OUT(Tdepth_t          )   ** out_INSERT_REGISTER_TRANSLATION_DEPTH             ;//[nb_inst_insert]
     98  public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_REGISTER_TRANSLATION_SAVE_RAT          ;//[nb_inst_insert]
    9699  public    : SC_IN (Tspecial_address_t)   **  in_INSERT_REGISTER_TRANSLATION_NUM_REG_RE_PHY_NEW;//[nb_inst_insert]
    97100
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/src/Rename_unit_Glue.cpp

    r139 r145  
    163163            if (_param->_have_port_context_id)
    164164            sensitive << (*(in_INSERT_RENAME_SELECT_CONTEXT_ID                [i]));
    165             if (_param->_have_port_depth and (_param->_rat_scheme == RAT_DEPTH_SAVE))
     165            if (_param->_rat_scheme == RAT_DEPTH_SAVE)
     166              {
     167            if (_param->_have_port_depth)
    166168            sensitive << (*(in_INSERT_RENAME_SELECT_DEPTH                     [i]));
     169            sensitive << (*(in_INSERT_RENAME_SELECT_SAVE_RAT                  [i]));
     170              }
    167171            sensitive << (*(in_INSERT_RENAME_SELECT_TYPE                      [i]))
    168172                      << (*(in_INSERT_RENAME_SELECT_OPERATION                 [i]))
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/src/Rename_unit_Glue_allocation.cpp

    r139 r145  
    6666      ALLOC1_SIGNAL_OUT     (out_INSERT_CONTEXT_ID                             ,"CONTEXT_ID"                             ,Tcontext_t        ,_param->_size_context_id);
    6767      ALLOC1_SIGNAL_OUT_COND(out_INSERT_DEPTH                                  ,"DEPTH"                                  ,Tdepth_t          ,_param->_size_depth,_param->_rat_scheme == RAT_DEPTH_SAVE);
     68      ALLOC1_SIGNAL_OUT_COND(out_INSERT_SAVE_RAT                               ,"SAVE_RAT"                               ,Tcontrol_t        ,1,_param->_rat_scheme == RAT_DEPTH_SAVE);
    6869      ALLOC1_SIGNAL_OUT     (out_INSERT_TYPE                                   ,"TYPE"                                   ,Ttype_t           ,_param->_size_type);
    6970      ALLOC1_SIGNAL_OUT     (out_INSERT_OPERATION                              ,"OPERATION"                              ,Toperation_t      ,_param->_size_operation);
     
    7980      ALLOC1_SIGNAL_IN      ( in_INSERT_RENAME_SELECT_CONTEXT_ID               ,"RENAME_SELECT_CONTEXT_ID"               ,Tcontext_t        ,_param->_size_context_id);
    8081      ALLOC1_SIGNAL_IN_COND ( in_INSERT_RENAME_SELECT_DEPTH                    ,"RENAME_SELECT_DEPTH"                    ,Tdepth_t          ,_param->_size_depth,_param->_rat_scheme == RAT_DEPTH_SAVE);
     82      ALLOC1_SIGNAL_IN_COND ( in_INSERT_RENAME_SELECT_SAVE_RAT                 ,"RENAME_SELECT_SAVE_RAT"                 ,Tcontrol_t        ,1,_param->_rat_scheme == RAT_DEPTH_SAVE);
    8183      ALLOC1_SIGNAL_IN      ( in_INSERT_RENAME_SELECT_TYPE                     ,"RENAME_SELECT_TYPE"                     ,Ttype_t           ,_param->_size_type);
    8284      ALLOC1_SIGNAL_IN      ( in_INSERT_RENAME_SELECT_OPERATION                ,"RENAME_SELECT_OPERATION"                ,Toperation_t      ,_param->_size_operation);
     
    9193      ALLOC1_SIGNAL_OUT     (out_INSERT_REGISTER_TRANSLATION_CONTEXT_ID        ,"REGISTER_TRANSLATION_CONTEXT_ID"        ,Tcontext_t        ,_param->_size_context_id);
    9294      ALLOC1_SIGNAL_OUT_COND(out_INSERT_REGISTER_TRANSLATION_DEPTH             ,"REGISTER_TRANSLATION_DEPTH"             ,Tdepth_t          ,_param->_size_depth,_param->_rat_scheme == RAT_DEPTH_SAVE);
     95      ALLOC1_SIGNAL_OUT_COND(out_INSERT_REGISTER_TRANSLATION_SAVE_RAT          ,"REGISTER_TRANSLATION_SAVE_RAT"          ,Tcontrol_t        ,1,_param->_rat_scheme == RAT_DEPTH_SAVE);
    9396      ALLOC1_SIGNAL_IN      ( in_INSERT_REGISTER_TRANSLATION_NUM_REG_RE_PHY_NEW,"REGISTER_TRANSLATION_NUM_REG_RE_PHY_NEW",Tspecial_address_t,_param->_size_special_register);
    9497      ALLOC1_SIGNAL_OUT     (out_INSERT_LOAD_STORE_QUEUE_POINTER_VAL           ,"LOAD_STORE_QUEUE_POINTER_VAL"           ,Tcontrol_t        ,1);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/src/Rename_unit_Glue_genMealy_insert.cpp

    r139 r145  
    3232        Tcontext_t         FRONT_END_ID       = (_param->_have_port_front_end_id)?PORT_READ(in_INSERT_RENAME_SELECT_FRONT_END_ID [i]):0;
    3333        Tcontext_t         CONTEXT_ID         = (_param->_have_port_context_id  )?PORT_READ(in_INSERT_RENAME_SELECT_CONTEXT_ID   [i]):0;
    34         Tdepth_t           DEPTH              = ((_param->_rat_scheme == RAT_DEPTH_SAVE) and _param->_have_port_depth)?PORT_READ(in_INSERT_RENAME_SELECT_DEPTH [i]):0;
     34        Tdepth_t           DEPTH              = ((_param->_rat_scheme == RAT_DEPTH_SAVE) and _param->_have_port_depth)?PORT_READ(in_INSERT_RENAME_SELECT_DEPTH    [i]):0;
     35        Tcontrol_t         SAVE_RAT           = ( _param->_rat_scheme == RAT_DEPTH_SAVE                              )?PORT_READ(in_INSERT_RENAME_SELECT_SAVE_RAT [i]):0;
    3536        Ttype_t            TYPE               = PORT_READ(in_INSERT_RENAME_SELECT_TYPE                      [i]);
    3637        Toperation_t       OPERATION          = PORT_READ(in_INSERT_RENAME_SELECT_OPERATION                 [i]);
     
    9798        PORT_WRITE(out_INSERT_REGISTER_TRANSLATION_CONTEXT_ID       [i],CONTEXT_ID        );
    9899        PORT_WRITE(out_INSERT_LOAD_STORE_QUEUE_POINTER_CONTEXT_ID   [i],CONTEXT_ID        );
    99           }
    100         if (_param->_have_port_depth and (_param->_rat_scheme == RAT_DEPTH_SAVE))
    101           {
     100          }     
     101        if (_param->_rat_scheme == RAT_DEPTH_SAVE)
     102          {
     103        if (_param->_have_port_depth)
     104          {
    102105        PORT_WRITE(out_INSERT_DEPTH                                 [i],DEPTH             );
    103106        PORT_WRITE(out_INSERT_REGISTER_TRANSLATION_DEPTH            [i],DEPTH             );
     107          }
     108        PORT_WRITE(out_INSERT_SAVE_RAT                              [i],SAVE_RAT          );
     109        PORT_WRITE(out_INSERT_REGISTER_TRANSLATION_SAVE_RAT         [i],SAVE_RAT          );
    104110          }
    105111        PORT_WRITE(out_INSERT_TYPE                                  [i],TYPE              );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/include/Rename_unit.h

    r139 r145  
    117117  public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_LAST_EVENT           ;//[nb_inst_insert]
    118118  public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_IS_DELAY_SLOT        ;//[nb_inst_insert]
     119  public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_SAVE_RAT             ;//[nb_inst_insert]
    119120#ifdef DEBUG
    120121  public    : SC_OUT(Taddress_t        )   ** out_INSERT_ADDRESS              ;//[nb_inst_insert]
     
    194195  public    : SC_IN (Tspr_t            )  ***  in_SPR_READ_SR                 ;//[nb_front_end][nb_context]
    195196
     197    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     198  public    : SC_IN (Tdepth_t          )  ***  in_DEPTH_MIN                   ;//[nb_front_end][nb_context]
     199  public    : SC_IN (Tdepth_t          )  ***  in_DEPTH_MAX                   ;//[nb_front_end][nb_context]
     200  public    : SC_IN (Tcontrol_t        )  ***  in_DEPTH_FULL                  ;//[nb_front_end][nb_context]
     201
    196202    // ~~~~~[ interface : "info" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    197203#ifdef DEBUG_TEST
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/src/Rename_unit_allocation.cpp

    r139 r145  
    1515namespace ooo_engine {
    1616namespace rename_unit {
    17 
    18 
    1917
    2018#undef  FUNCTION
     
    10199      ALLOC1_INTERFACE_BEGIN("insert",OUT,WEST , _("Instruction with physical register"), _param->_nb_inst_insert);
    102100     
    103       ALLOC1_VALACK_OUT(out_INSERT_VAL                  ,VAL);
    104       ALLOC1_VALACK_IN ( in_INSERT_ACK                  ,ACK);
    105       ALLOC1_SIGNAL_OUT(out_INSERT_FRONT_END_ID         ,"front_end_id"         ,Tcontext_t        ,_param->_size_front_end_id          );
    106       ALLOC1_SIGNAL_OUT(out_INSERT_CONTEXT_ID           ,"context_id"           ,Tcontext_t        ,_param->_size_context_id            );
    107       ALLOC1_SIGNAL_OUT(out_INSERT_DEPTH                ,"depth"                ,Tdepth_t          ,_param->_size_depth                 );
    108 #ifdef STATISTICS
    109       ALLOC1_SIGNAL_OUT(out_INSERT_INSTRUCTION          ,"instruction"          ,uint32_t          ,32);
    110 #endif
    111       ALLOC1_SIGNAL_OUT(out_INSERT_TYPE                 ,"type"                 ,Ttype_t           ,_param->_size_type                  );
    112       ALLOC1_SIGNAL_OUT(out_INSERT_OPERATION            ,"operation"            ,Toperation_t      ,_param->_size_operation             );
    113       ALLOC1_SIGNAL_OUT(out_INSERT_NO_EXECUTE           ,"no_execute"           ,Tcontrol_t        ,1                                   );
    114       ALLOC1_SIGNAL_OUT(out_INSERT_LAST_EVENT           ,"last_event"           ,Tcontrol_t        ,1                                   );
    115       ALLOC1_SIGNAL_OUT(out_INSERT_IS_DELAY_SLOT        ,"is_delay_slot"        ,Tcontrol_t        ,1                                   );
     101      ALLOC1_VALACK_OUT     (out_INSERT_VAL                  ,VAL);
     102      ALLOC1_VALACK_IN      ( in_INSERT_ACK                  ,ACK);
     103      ALLOC1_SIGNAL_OUT     (out_INSERT_FRONT_END_ID         ,"front_end_id"         ,Tcontext_t        ,_param->_size_front_end_id          );
     104      ALLOC1_SIGNAL_OUT     (out_INSERT_CONTEXT_ID           ,"context_id"           ,Tcontext_t        ,_param->_size_context_id            );
     105      ALLOC1_SIGNAL_OUT     (out_INSERT_DEPTH                ,"depth"                ,Tdepth_t          ,_param->_size_depth                 );
     106#ifdef STATISTICS           
     107      ALLOC1_SIGNAL_OUT     (out_INSERT_INSTRUCTION          ,"instruction"          ,uint32_t          ,32);
     108#endif                     
     109      ALLOC1_SIGNAL_OUT     (out_INSERT_TYPE                 ,"type"                 ,Ttype_t           ,_param->_size_type                  );
     110      ALLOC1_SIGNAL_OUT     (out_INSERT_OPERATION            ,"operation"            ,Toperation_t      ,_param->_size_operation             );
     111      ALLOC1_SIGNAL_OUT     (out_INSERT_NO_EXECUTE           ,"no_execute"           ,Tcontrol_t        ,1                                   );
     112      ALLOC1_SIGNAL_OUT     (out_INSERT_LAST_EVENT           ,"last_event"           ,Tcontrol_t        ,1                                   );
     113      ALLOC1_SIGNAL_OUT     (out_INSERT_IS_DELAY_SLOT        ,"is_delay_slot"        ,Tcontrol_t        ,1                                   );
     114      ALLOC1_SIGNAL_OUT_COND(out_INSERT_SAVE_RAT             ,"save_rat"             ,Tcontrol_t        ,1                                   ,_param->_rat_scheme == RAT_DEPTH_SAVE);
    116115#ifdef DEBUG
    117       ALLOC1_SIGNAL_OUT(out_INSERT_ADDRESS              ,"address"              ,Taddress_t        ,_param->_size_instruction_address   );
    118 #endif
    119       ALLOC1_SIGNAL_OUT(out_INSERT_ADDRESS_NEXT         ,"address_next"         ,Taddress_t        ,_param->_size_instruction_address   );
    120       ALLOC1_SIGNAL_OUT(out_INSERT_HAS_IMMEDIAT         ,"has_immediat"         ,Tcontrol_t        ,1                                   );
    121       ALLOC1_SIGNAL_OUT(out_INSERT_IMMEDIAT             ,"immediat"             ,Tgeneral_data_t   ,_param->_size_general_data          );
    122       ALLOC1_SIGNAL_OUT(out_INSERT_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t        ,_param->_size_store_queue_ptr       );
    123       ALLOC1_SIGNAL_OUT(out_INSERT_STORE_QUEUE_PTR_READ ,"store_queue_ptr_read" ,Tlsq_ptr_t        ,_param->_size_store_queue_ptr       );
    124       ALLOC1_SIGNAL_OUT(out_INSERT_STORE_QUEUE_EMPTY    ,"store_queue_empty"    ,Tcontrol_t        ,1                                   );
    125       ALLOC1_SIGNAL_OUT(out_INSERT_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,_param->_size_load_queue_ptr        );
    126       ALLOC1_SIGNAL_OUT(out_INSERT_EXCEPTION_USE        ,"exception_use"        ,Texception_t      ,_param->_size_exception_use         );
    127       ALLOC1_SIGNAL_OUT(out_INSERT_EXCEPTION            ,"exception"            ,Texception_t      ,_param->_size_exception             );
    128       ALLOC1_SIGNAL_OUT(out_INSERT_READ_RA              ,"read_ra"              ,Tcontrol_t        ,1                                   );
    129 #ifdef DEBUG
    130       ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RA_LOG       ,"num_reg_ra_log"       ,Tgeneral_address_t,_param->_size_general_register_logic);
    131 #endif
    132       ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RA_PHY       ,"num_reg_ra_phy"       ,Tgeneral_address_t,_param->_size_general_register      );
    133       ALLOC1_SIGNAL_OUT(out_INSERT_READ_RB              ,"read_rb"              ,Tcontrol_t        ,1                                   );
    134 #ifdef DEBUG
    135       ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RB_LOG       ,"num_reg_rb_log"       ,Tgeneral_address_t,_param->_size_general_register_logic);
    136 #endif
    137       ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RB_PHY       ,"num_reg_rb_phy"       ,Tgeneral_address_t,_param->_size_general_register      );
    138       ALLOC1_SIGNAL_OUT(out_INSERT_READ_RC              ,"read_rc"              ,Tcontrol_t        ,1                                   );
    139 #ifdef DEBUG
    140       ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RC_LOG       ,"num_reg_rc_log"       ,Tspecial_address_t,_param->_size_special_register_logic);
    141 #endif
    142       ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RC_PHY       ,"num_reg_rc_phy"       ,Tspecial_address_t,_param->_size_special_register      );
    143       ALLOC1_SIGNAL_OUT(out_INSERT_WRITE_RD             ,"write_rd"             ,Tcontrol_t        ,1                                   );
    144       ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RD_LOG       ,"num_reg_rd_log"       ,Tgeneral_address_t,_param->_size_general_register_logic);
    145       ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RD_PHY_OLD   ,"num_reg_rd_phy_old"   ,Tgeneral_address_t,_param->_size_general_register      );
    146       ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RD_PHY_NEW   ,"num_reg_rd_phy_new"   ,Tgeneral_address_t,_param->_size_general_register      );
    147       ALLOC1_SIGNAL_OUT(out_INSERT_WRITE_RE             ,"write_re"             ,Tcontrol_t        ,1                                   );
    148       ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RE_LOG       ,"num_reg_re_log"       ,Tspecial_address_t,_param->_size_special_register_logic);
    149       ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RE_PHY_OLD   ,"num_reg_re_phy_old"   ,Tspecial_address_t,_param->_size_special_register      );
    150       ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RE_PHY_NEW   ,"num_reg_re_phy_new"   ,Tspecial_address_t,_param->_size_special_register      );
     116      ALLOC1_SIGNAL_OUT     (out_INSERT_ADDRESS              ,"address"              ,Taddress_t        ,_param->_size_instruction_address   );
     117#endif                     
     118      ALLOC1_SIGNAL_OUT     (out_INSERT_ADDRESS_NEXT         ,"address_next"         ,Taddress_t        ,_param->_size_instruction_address   );
     119      ALLOC1_SIGNAL_OUT     (out_INSERT_HAS_IMMEDIAT         ,"has_immediat"         ,Tcontrol_t        ,1                                   );
     120      ALLOC1_SIGNAL_OUT     (out_INSERT_IMMEDIAT             ,"immediat"             ,Tgeneral_data_t   ,_param->_size_general_data          );
     121      ALLOC1_SIGNAL_OUT     (out_INSERT_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t        ,_param->_size_store_queue_ptr       );
     122      ALLOC1_SIGNAL_OUT     (out_INSERT_STORE_QUEUE_PTR_READ ,"store_queue_ptr_read" ,Tlsq_ptr_t        ,_param->_size_store_queue_ptr       );
     123      ALLOC1_SIGNAL_OUT     (out_INSERT_STORE_QUEUE_EMPTY    ,"store_queue_empty"    ,Tcontrol_t        ,1                                   );
     124      ALLOC1_SIGNAL_OUT     (out_INSERT_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,_param->_size_load_queue_ptr        );
     125      ALLOC1_SIGNAL_OUT     (out_INSERT_EXCEPTION_USE        ,"exception_use"        ,Texception_t      ,_param->_size_exception_use         );
     126      ALLOC1_SIGNAL_OUT     (out_INSERT_EXCEPTION            ,"exception"            ,Texception_t      ,_param->_size_exception             );
     127      ALLOC1_SIGNAL_OUT     (out_INSERT_READ_RA              ,"read_ra"              ,Tcontrol_t        ,1                                   );
     128#ifdef DEBUG               
     129      ALLOC1_SIGNAL_OUT     (out_INSERT_NUM_REG_RA_LOG       ,"num_reg_ra_log"       ,Tgeneral_address_t,_param->_size_general_register_logic);
     130#endif                     
     131      ALLOC1_SIGNAL_OUT     (out_INSERT_NUM_REG_RA_PHY       ,"num_reg_ra_phy"       ,Tgeneral_address_t,_param->_size_general_register      );
     132      ALLOC1_SIGNAL_OUT     (out_INSERT_READ_RB              ,"read_rb"              ,Tcontrol_t        ,1                                   );
     133#ifdef DEBUG               
     134      ALLOC1_SIGNAL_OUT     (out_INSERT_NUM_REG_RB_LOG       ,"num_reg_rb_log"       ,Tgeneral_address_t,_param->_size_general_register_logic);
     135#endif                     
     136      ALLOC1_SIGNAL_OUT     (out_INSERT_NUM_REG_RB_PHY       ,"num_reg_rb_phy"       ,Tgeneral_address_t,_param->_size_general_register      );
     137      ALLOC1_SIGNAL_OUT     (out_INSERT_READ_RC              ,"read_rc"              ,Tcontrol_t        ,1                                   );
     138#ifdef DEBUG               
     139      ALLOC1_SIGNAL_OUT     (out_INSERT_NUM_REG_RC_LOG       ,"num_reg_rc_log"       ,Tspecial_address_t,_param->_size_special_register_logic);
     140#endif                     
     141      ALLOC1_SIGNAL_OUT     (out_INSERT_NUM_REG_RC_PHY       ,"num_reg_rc_phy"       ,Tspecial_address_t,_param->_size_special_register      );
     142      ALLOC1_SIGNAL_OUT     (out_INSERT_WRITE_RD             ,"write_rd"             ,Tcontrol_t        ,1                                   );
     143      ALLOC1_SIGNAL_OUT     (out_INSERT_NUM_REG_RD_LOG       ,"num_reg_rd_log"       ,Tgeneral_address_t,_param->_size_general_register_logic);
     144      ALLOC1_SIGNAL_OUT     (out_INSERT_NUM_REG_RD_PHY_OLD   ,"num_reg_rd_phy_old"   ,Tgeneral_address_t,_param->_size_general_register      );
     145      ALLOC1_SIGNAL_OUT     (out_INSERT_NUM_REG_RD_PHY_NEW   ,"num_reg_rd_phy_new"   ,Tgeneral_address_t,_param->_size_general_register      );
     146      ALLOC1_SIGNAL_OUT     (out_INSERT_WRITE_RE             ,"write_re"             ,Tcontrol_t        ,1                                   );
     147      ALLOC1_SIGNAL_OUT     (out_INSERT_NUM_REG_RE_LOG       ,"num_reg_re_log"       ,Tspecial_address_t,_param->_size_special_register_logic);
     148      ALLOC1_SIGNAL_OUT     (out_INSERT_NUM_REG_RE_PHY_OLD   ,"num_reg_re_phy_old"   ,Tspecial_address_t,_param->_size_special_register      );
     149      ALLOC1_SIGNAL_OUT     (out_INSERT_NUM_REG_RE_PHY_NEW   ,"num_reg_re_phy_new"   ,Tspecial_address_t,_param->_size_special_register      );
    151150
    152151      ALLOC1_INTERFACE_END(_param->_nb_inst_insert);
     
    210209
    211210      ALLOC2_INTERFACE_END(_param->_nb_front_end, _param->_nb_context[it1]);
     211    }
     212
     213    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     214    {
     215      ALLOC2_INTERFACE_BEGIN("depth",IN,WEST,_("Interface with Prediction unit."),_param->_nb_front_end, _param->_nb_context[it1]);
     216
     217      _ALLOC2_SIGNAL_IN ( in_DEPTH_MIN                        ,"MIN"                        ,Tdepth_t         ,_param->_size_depth                  ,_param->_nb_front_end, _param->_nb_context[it1]);
     218      _ALLOC2_SIGNAL_IN ( in_DEPTH_MAX                        ,"MAX"                        ,Tdepth_t         ,_param->_size_depth                  ,_param->_nb_front_end, _param->_nb_context[it1]);
     219      _ALLOC2_SIGNAL_IN ( in_DEPTH_FULL                       ,"FULL"                       ,Tcontrol_t       ,1                                    ,_param->_nb_front_end, _param->_nb_context[it1]);
     220
     221      ALLOC2_INTERFACE_END(_param->_nb_front_end,_param->_nb_context[it1]);
    212222    }
    213223
     
    440450#endif
    441451
     452          if (_param->_rat_scheme != RAT_DEPTH_SAVE)
    442453          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_SAVE_RAT"  ,
    443454                                   dest, "in_RENAME_"    +toString(i)+"_SAVE_RAT"  );
     
    483494          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+              "_DEPTH"        ,
    484495                                   dest, "in_INSERT_"    +toString(i)+"_RENAME_SELECT_DEPTH"        );
     496          if (_param->_rat_scheme == RAT_DEPTH_SAVE)
     497          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+              "_SAVE_RAT"     ,
     498                                   dest, "in_INSERT_"    +toString(i)+"_RENAME_SELECT_SAVE_RAT"     );
    485499          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+              "_TYPE"         ,
    486500                                   dest, "in_INSERT_"    +toString(i)+"_RENAME_SELECT_TYPE"         );
     
    559573          COMPONENT_MAP(_component,src , "in_RENAME_"+toString(i)+                     "_DEPTH"        ,
    560574                                   dest,"out_INSERT_"+toString(i)+"_REGISTER_TRANSLATION_DEPTH"        );
     575          if (_param->_rat_scheme == RAT_DEPTH_SAVE)
     576          COMPONENT_MAP(_component,src , "in_RENAME_"+toString(i)+                     "_SAVE_RAT"     ,
     577                                   dest,"out_INSERT_"+toString(i)+"_REGISTER_TRANSLATION_SAVE_RAT"     );
    561578
    562579          //  in_RENAME_SAVE_RAS          - rename_select
     
    733750          }
    734751
     752      for (uint32_t i=0; i<_param->_nb_front_end; i++)
     753        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
     754          {
     755            dest = _name;
     756           
     757#ifdef POSITION
     758            _component->interface_map (src ,"depth_"+toString(i)+"_"+toString(j),
     759                                       dest,"depth_"+toString(i)+"_"+toString(j));
     760#endif     
     761            if (_param->_have_port_depth)
     762              {
     763            PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MIN" ,
     764                                dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MIN" );
     765            PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MAX" ,
     766                                dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MAX" );
     767              }
     768            PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_FULL",
     769                                dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_FULL");
     770          }
    735771
    736772#ifdef DEBUG_TEST
     
    909945          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_DEPTH"        ,
    910946                              dest,"out_INSERT_"+toString(i)+"_DEPTH"        );
     947          if (_param->_rat_scheme == RAT_DEPTH_SAVE)
     948          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_SAVE_RAT"     ,
     949                              dest,"out_INSERT_"+toString(i)+"_SAVE_RAT"     );
    911950          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_TYPE"         ,
    912951                              dest,"out_INSERT_"+toString(i)+"_TYPE"         );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/src/Rename_unit_deallocation.cpp

    r139 r145  
    7575        DELETE1_SIGNAL     (out_INSERT_LAST_EVENT           ,_param->_nb_inst_insert,1                                   );
    7676        DELETE1_SIGNAL     (out_INSERT_IS_DELAY_SLOT        ,_param->_nb_inst_insert,1                                   );
     77        DELETE1_SIGNAL_COND(out_INSERT_SAVE_RAT             ,_param->_nb_inst_insert,1                                   ,_param->_rat_scheme == RAT_DEPTH_SAVE);
    7778#ifdef DEBUG               
    7879        DELETE1_SIGNAL     (out_INSERT_ADDRESS              ,_param->_nb_inst_insert,_param->_size_instruction_address   );
     
    147148        DELETE2_SIGNAL_COND( in_RETIRE_EVENT_DEPTH          ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_depth     ,_param->_rat_scheme == RAT_DEPTH_SAVE);
    148149       
    149         DELETE2_SIGNAL     (in_SPR_READ_SR                  ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_spr);
     150        DELETE2_SIGNAL     ( in_SPR_READ_SR                 ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_spr);
     151
     152        DELETE2_SIGNAL     ( in_DEPTH_MIN                   ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_depth);
     153        DELETE2_SIGNAL     ( in_DEPTH_MAX                   ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_depth);
     154        DELETE2_SIGNAL     ( in_DEPTH_FULL                  ,_param->_nb_front_end,_param->_nb_context[it1],1                  );
    150155
    151156#ifdef DEBUG_TEST
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/include/OOO_Engine.h

    r139 r145  
    208208  public    : SC_OUT(Tcounter_t        )  *** out_NB_INST_COMMIT_MEM               ;//[nb_front_end][nb_context]
    209209  public    : SC_IN (Tcounter_t        )  ***  in_NB_INST_DECOD_ALL                ;//[nb_front_end][nb_context]
    210                                                                                    
     210
    211211    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
    212212  public    : SC_IN (Tdepth_t          )  ***  in_DEPTH_MIN                        ;//[nb_front_end][nb_context]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/include/Parameters.h

    r139 r145  
    9898  public : uint32_t            * _rename_unit_size_front_end_id                ;//[nb_rename_unit]
    9999  public : uint32_t            * _rename_unit_size_context_id                  ;//[nb_rename_unit]
    100   public : Trat_scheme_t       * _commit_unit_rat_scheme                       ;//[nb_front_end]
    101100  public : uint32_t              _max_nb_context                               ;
    102101  public : uint32_t              _max_branch_speculated                        ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_allocation.cpp

    r139 r145  
    534534            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)                +"_IS_DELAY_SLOT" ,
    535535                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_IS_DELAY_SLOT" );
     536            if (_param->_rat_scheme[i] == RAT_DEPTH_SAVE)
     537            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)                +"_SAVE_RAT"      ,
     538                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_SAVE_RAT"      );
    536539//          COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)                +"_HAVE_EVENT"    ,
    537540//                                   dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_HAVE_EVENT"    );
     
    633636#endif
    634637
    635 
    636 
    637638            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_VAL"               ,
    638639                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_VAL"               );
     
    670671            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_LOAD_QUEUE_PTR_WRITE" ,
    671672                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_LOAD_QUEUE_PTR_WRITE" );
    672 //             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_READ_RA"              ,
    673 //                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_READ_RA"              );
    674 //             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RA_PHY"       ,
    675 //                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RA_PHY"       );
    676 //             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_READ_RB"              ,
    677 //                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_READ_RB"              );
    678 //             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RB_PHY"       ,
    679 //                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RB_PHY"       );
    680 //             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_READ_RC"              ,
    681 //                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_READ_RC"              );
    682 //             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RC_PHY"       ,
    683 //                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RC_PHY"       );
     673//          COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_READ_RA"              ,
     674//                                   dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_READ_RA"              );
     675//          COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RA_PHY"       ,
     676//                                   dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RA_PHY"       );
     677//          COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_READ_RB"              ,
     678//                                   dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_READ_RB"              );
     679//          COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RB_PHY"       ,
     680//                                   dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RB_PHY"       );
     681//          COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_READ_RC"              ,
     682//                                   dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_READ_RC"              );
     683//          COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RC_PHY"       ,
     684//                                   dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RC_PHY"       );
    684685            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RD_LOG"       ,
    685686                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RD_LOG"       );
     
    755756              }
    756757        }
     758
     759        // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     760        {
     761          std::vector<uint32_t>::iterator it = _param->_link_front_end_with_rename_unit[i].begin();
     762          uint32_t x = 0;
     763          for (uint32_t j=0; j<_param->_nb_front_end; j++)
     764            if (j == *it)
     765              {
     766                for (uint32_t k=0; k<_param->_nb_context[j]; k++)
     767                  {
     768                    dest = _name;
     769                   
     770#ifdef POSITION
     771                    _component->interface_map (src ,"spr_read_"+toString(x)+"_"+toString(k),
     772                                               dest,"spr_"     +toString(j)+"_"+toString(k));
     773#endif
     774
     775                    if (_param->_have_port_depth)
     776                      {
     777                    PORT_MAP(_component,src , "in_DEPTH_"+toString(x)+"_"+toString(k)+"_MIN" ,
     778                                        dest, "in_DEPTH_"+toString(j)+"_"+toString(k)+"_MIN" );
     779                    PORT_MAP(_component,src , "in_DEPTH_"+toString(x)+"_"+toString(k)+"_MAX" ,
     780                                        dest, "in_DEPTH_"+toString(j)+"_"+toString(k)+"_MAX" );
     781                      }
     782                    PORT_MAP(_component,src , "in_DEPTH_"+toString(x)+"_"+toString(k)+"_FULL",
     783                                        dest, "in_DEPTH_"+toString(j)+"_"+toString(k)+"_FULL");
     784                  }
     785                x++;
     786                ++it;
     787              }
     788        }
     789
    757790
    758791        // ~~~~~[ Interface : "info" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    919952            //  out_RETIRE_CONTEXT_ID                - component_rename_unit
    920953            ////out_RETIRE_RENAME_UNIT_ID            - component_rename_unit
     954            //  out_RETIRE_DEPTH                     - component_rename_unit
    921955            //  out_RETIRE_USE_STORE_QUEUE           - component_rename_unit
    922956            //  out_RETIRE_USE_LOAD_QUEUE            - component_rename_unit
     
    9811015          COMPONENT_MAP(_component,src ,"out_COMMIT_"+toString(i)+"_NUM_REG_RD" ,
    9821016                                   dest, "in_COMMIT_"+toString(i)+"_NUM_REG_RD" );
    983           //@@@@@@@@@@
    9841017        }
    9851018     
     
    11111144          }
    11121145
    1113       // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       
    1114       for (uint32_t i=0; i<_param->_nb_front_end; i++)
    1115         for (uint32_t j=0; j<_param->_nb_context[i]; j++)
    1116           {
    1117             dest = _name;
    1118 #ifdef POSITION
    1119             _component->interface_map (src ,"depth_"+toString(i)+"_"+toString(j),
    1120                                        dest,"depth_"+toString(i)+"_"+toString(j));
    1121 #endif
    1122 
    1123             if (_param->_have_port_depth)
    1124               {
    1125             PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MIN",
    1126                                 dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MIN");
    1127             PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MAX",
    1128                                 dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MAX");
    1129               }
    1130             PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_FULL",
    1131                                 dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_FULL");
    1132           }
     1146//      // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
     1147//      for (uint32_t i=0; i<_param->_nb_front_end; i++)
     1148//        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
     1149//          {
     1150//            dest = _name;
     1151//#ifdef POSITION
     1152//            _component->interface_map (src ,"depth_"+toString(i)+"_"+toString(j),
     1153//                                       dest,"depth_"+toString(i)+"_"+toString(j));
     1154//#endif
     1155//
     1156//            if (_param->_have_port_depth)
     1157//              {
     1158//            PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MIN",
     1159//                                dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MIN");
     1160//            PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MAX",
     1161//                                dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MAX");
     1162//              }
     1163//            PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_FULL",
     1164//                                dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_FULL");
     1165//          }
    11331166
    11341167      // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/Parameters.cpp

    r139 r145  
    8282    log_begin(OOO_Engine,FUNCTION);
    8383
    84     _nb_front_end                      = nb_front_end                     ;
    85     _nb_context                        = nb_context                       ;
    86     _nb_rename_unit                    = nb_rename_unit                   ;
    87     _nb_execute_loop                   = nb_execute_loop                  ;
    88     _nb_inst_decod                     = nb_inst_decod                    ;
    89     _nb_inst_insert                    = nb_inst_insert                   ;
    90     _nb_inst_retire                    = nb_inst_retire                   ;
    91 //  _nb_inst_issue                     = nb_inst_issue                    ;
    92     _nb_inst_execute                   = nb_inst_execute                  ;
    93     _nb_inst_reexecute                 = nb_inst_reexecute                ;
    94     _nb_inst_commit                    = nb_inst_commit                   ;
    95     _nb_inst_branch_complete           = nb_inst_branch_complete          ;
    96     _nb_branch_speculated              = nb_branch_speculated             ;
    97     _nb_rename_unit_select             = nb_rename_unit_select            ;
    98     _nb_execute_loop_select            = nb_execute_loop_select           ;
    99 //  _size_general_data                 = size_general_data                ;
    100 //  _size_special_data                 = size_special_data                ;
    101     _link_rename_unit_with_front_end   = link_rename_unit_with_front_end  ;
    102     _size_re_order_buffer              = size_re_order_buffer             ;
    103     _nb_re_order_buffer_bank           = nb_re_order_buffer_bank          ;
    104     _retire_ooo_scheme                 = retire_ooo_scheme                ;
    105     _commit_priority                   = commit_priority                  ;
    106     _commit_load_balancing             = commit_load_balancing            ;
    107     _size_issue_queue                  = size_issue_queue                 ;
    108     _issue_queue_scheme                = issue_queue_scheme               ;
    109     _nb_issue_queue_bank               = nb_issue_queue_bank              ;
    110     _issue_priority                    = issue_priority                   ;
    111     _issue_load_balancing              = issue_load_balancing             ;
    112 //  _table_routing                     = table_routing                    ;
    113 //  _table_issue_type                  = table_issue_type                 ;
    114     _size_reexecute_queue              = size_reexecute_queue             ;
    115     _rename_select_priority            = rename_select_priority           ;
    116     _rename_select_load_balancing      = rename_select_load_balancing     ;
    117     _rename_select_nb_front_end_select = rename_select_nb_front_end_select;
    118     _nb_general_register               = nb_general_register              ;
    119     _nb_special_register               = nb_special_register              ;
    120     _rat_scheme                        = rat_scheme                       ;
    121     _nb_reg_free                       = nb_reg_free                      ;
    122     _nb_rename_unit_bank               = nb_rename_unit_bank              ;
    123 //  _size_read_counter                 = size_read_counter                ;
    124     _nb_load_store_queue               = nb_load_store_queue              ;
    125     _size_store_queue                  = size_store_queue                 ;
    126     _size_load_queue                   = size_load_queue                  ;
    127     _nb_inst_memory                    = nb_inst_memory                   ;
    128     _link_load_store_unit_with_thread  = link_load_store_unit_with_thread ;
    129     _implement_group                   = implement_group                  ;
    130 
     84    _nb_front_end                        = nb_front_end                     ;
     85    _nb_context                          = nb_context                       ;
     86    _nb_rename_unit                      = nb_rename_unit                   ;
     87    _nb_execute_loop                     = nb_execute_loop                  ;
     88    _nb_inst_decod                       = nb_inst_decod                    ;
     89    _nb_inst_insert                      = nb_inst_insert                   ;
     90    _nb_inst_retire                      = nb_inst_retire                   ;
     91//  _nb_inst_issue                       = nb_inst_issue                    ;
     92    _nb_inst_execute                     = nb_inst_execute                  ;
     93    _nb_inst_reexecute                   = nb_inst_reexecute                ;
     94    _nb_inst_commit                      = nb_inst_commit                   ;
     95    _nb_inst_branch_complete             = nb_inst_branch_complete          ;
     96    _nb_branch_speculated                = nb_branch_speculated             ;
     97    _nb_rename_unit_select               = nb_rename_unit_select            ;
     98    _nb_execute_loop_select              = nb_execute_loop_select           ;
     99//  _size_general_data                   = size_general_data                ;
     100//  _size_special_data                   = size_special_data                ;
     101    _link_rename_unit_with_front_end     = link_rename_unit_with_front_end  ;
     102    _size_re_order_buffer                = size_re_order_buffer             ;
     103    _nb_re_order_buffer_bank             = nb_re_order_buffer_bank          ;
     104    _retire_ooo_scheme                   = retire_ooo_scheme                ;
     105    _commit_priority                     = commit_priority                  ;
     106    _commit_load_balancing               = commit_load_balancing            ;
     107    _size_issue_queue                    = size_issue_queue                 ;
     108    _issue_queue_scheme                  = issue_queue_scheme               ;
     109    _nb_issue_queue_bank                 = nb_issue_queue_bank              ;
     110    _issue_priority                      = issue_priority                   ;
     111    _issue_load_balancing                = issue_load_balancing             ;
     112//  _table_routing                       = table_routing                    ;
     113//  _table_issue_type                    = table_issue_type                 ;
     114    _size_reexecute_queue                = size_reexecute_queue             ;
     115    _rename_select_priority              = rename_select_priority           ;
     116    _rename_select_load_balancing        = rename_select_load_balancing     ;
     117    _rename_select_nb_front_end_select   = rename_select_nb_front_end_select;
     118    _nb_general_register                 = nb_general_register              ;
     119    _nb_special_register                 = nb_special_register              ;
     120    _rat_scheme                          = rat_scheme                       ;
     121    _nb_reg_free                         = nb_reg_free                      ;
     122    _nb_rename_unit_bank                 = nb_rename_unit_bank              ;
     123//  _size_read_counter                   = size_read_counter                ;
     124    _nb_load_store_queue                 = nb_load_store_queue              ;
     125    _size_store_queue                    = size_store_queue                 ;
     126    _size_load_queue                     = size_load_queue                  ;
     127    _nb_inst_memory                      = nb_inst_memory                   ;
     128    _link_load_store_unit_with_thread    = link_load_store_unit_with_thread ;
     129    _implement_group                     = implement_group                  ;
    131130    _nb_thread                           = nb_thread                          ;
    132131    _translate_num_context_to_num_thread = translate_num_context_to_num_thread;
     
    144143        _link_front_end_with_rename_unit[num_rename_unit].push_back(i);
    145144      }
     145
    146146    _rename_unit_size_front_end_id                = new uint32_t    [_nb_rename_unit];
    147147    _rename_unit_size_context_id                  = new uint32_t    [_nb_rename_unit];
     
    197197          }
    198198      }
    199 
    200     ALLOC1(_commit_unit_rat_scheme,Trat_scheme_t,_nb_front_end);
    201 
    202     for (uint32_t num_front_end=0; num_front_end<_nb_front_end; ++num_front_end)
    203       _commit_unit_rat_scheme [num_front_end] = rat_scheme [_link_rename_unit_with_front_end [num_front_end]];
    204199
    205200    _max_nb_context                = max<uint32_t>(_nb_context,_nb_front_end);
     
    265260    _param_commit_unit           = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::Parameters 
    266261      (
    267        _nb_front_end            ,
    268        _nb_context              ,
    269        _nb_rename_unit          ,
    270        _size_re_order_buffer    ,
    271        _nb_re_order_buffer_bank ,
    272        _retire_ooo_scheme       ,
    273        _nb_inst_insert          ,
    274        _nb_inst_retire          ,
    275        _nb_inst_commit          ,
    276        _nb_inst_reexecute       ,
    277        _nb_inst_branch_complete ,
    278        _nb_branch_speculated    ,
    279         size_nb_inst_decod      ,
    280         size_general_data       ,
    281         size_store_queue_ptr    ,
    282         size_load_queue_ptr     ,
    283         size_general_register   ,
    284         size_special_register   ,
    285        _commit_unit_rat_scheme  ,
    286        _issue_priority          ,
    287        _issue_load_balancing    ,
    288        _nb_rename_unit_select   ,
    289        _nb_thread               ,
     262       _nb_front_end                   ,
     263       _nb_context                     ,
     264       _nb_rename_unit                 ,
     265       _size_re_order_buffer           ,
     266       _nb_re_order_buffer_bank        ,
     267       _retire_ooo_scheme              ,
     268       _nb_inst_insert                 ,
     269       _nb_inst_retire                 ,
     270       _nb_inst_commit                 ,
     271       _nb_inst_reexecute              ,
     272       _nb_inst_branch_complete        ,
     273       _nb_branch_speculated           ,
     274        size_nb_inst_decod             ,
     275        size_general_data              ,
     276        size_store_queue_ptr           ,
     277        size_load_queue_ptr            ,
     278        size_general_register          ,
     279        size_special_register          ,
     280       _rat_scheme                     ,
     281       _link_front_end_with_rename_unit,
     282       _issue_priority                 ,
     283       _issue_load_balancing           ,
     284       _nb_rename_unit_select          ,
     285       _nb_thread                      ,
    290286       _translate_num_context_to_num_thread
    291287       );
     
    430426    delete [] _link_front_end_with_rename_unit             ;
    431427
    432     DELETE1(_commit_unit_rat_scheme,_nb_front_end);
    433 
    434428    for (uint32_t i=0; i<_nb_rename_unit; i++)
    435429    delete    _param_rename_unit [i]      ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/Parameters_msg_error.cpp

    r88 r145  
    3636          test.error(toString(_("Front_end [%d] is linked with invalid rename_unit.\n"),i));
    3737        else
    38           _is_link [x] = true;
     38          {
     39            if (_is_link [x])
     40              test.error(toString(_("Front_end [%d] can't be connected with multiple rename_unit.\n"),i));
     41            else
     42              _is_link [x] = true;
     43          }
    3944      }
    4045
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/SelfTest/src/main.cpp

    r115 r145  
    768768
    769769         _dispatch_priority                             ,
    770          _dispatch_load_balancing                       
     770         _dispatch_load_balancing                       ,
     771         true // is_toplevel
    771772         );
    772773     
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/include/Core.h

    r88 r145  
    3131#endif
    3232#include "Behavioural/include/Usage.h"
     33// #include "Behavioural/include/Function_pointer.h"
    3334
    3435#include "Common/include/ToString.h"
     
    131132#endif
    132133   Parameters                                  * param,
    133    morpheo::behavioural::Tusage_t                usage
     134   morpheo::behavioural::Tusage_t                usage// ,
     135   // morpheo::behavioural::Function_pointer      * function_pointer
    134136   );
    135137  public  :          ~Core             (void);
     
    140142                                                   morpheo::behavioural::Parameters_Statistics * param_statistics
    141143#else
    142                                                    void
     144                                                   void
    143145#endif
     146
     147// #ifdef STATISTICS
     148//                                                 morpheo::behavioural::Parameters_Statistics * param_statistics,
     149// #endif
     150//                                                    morpheo::behavioural::Function_pointer      * function_pointer
    144151                                                   );
    145152  private : void        deallocation              (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/include/Parameters.h

    r139 r145  
    538538
    539539  Tpriority_t             dispatch_priority                             ,
    540   Tload_balancing_t       dispatch_load_balancing                       
     540  Tload_balancing_t       dispatch_load_balancing                       ,
     541  bool                    is_toplevel=false
    541542                        );
    542543//   public : Parameters  (Parameters & param) ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Core.cpp

    r123 r145  
    2525   morpheo::behavioural::Parameters_Statistics * param_statistics,
    2626#endif
    27    morpheo::behavioural::core::Parameters * param,
    28    morpheo::behavioural::Tusage_t usage
     27   Parameters * param,
     28   morpheo::behavioural::Tusage_t           usage// ,
     29   // morpheo::behavioural::Function_pointer * function_pointer
    2930   ):
    3031    _name              (name)
     
    4849                param_statistics
    4950#endif
     51                // function_pointer
    5052                );
    5153
     
    7274    if (usage_is_set(_usage,USE_SYSTEMC))
    7375      {
     76
     77        // if (function_pointer==NULL)
     78        //   {
    7479        log_printf(INFO,Core,FUNCTION,_("<%s> Method - transition"),_name.c_str());
    7580
     
    7782        dont_initialize ();
    7883        sensitive << (*(in_CLOCK)).pos();
    79        
     84
    8085# ifdef SYSTEMCASS_SPECIFIC
    8186        // List dependency information
    8287# endif   
     88        //   }
     89        // else
     90        //   {
     91        //     function_pointer->transition_add(static_cast<f_t>(&morpheo::behavioural::core::Core::transition));
     92        //   }
     93
    8394      }
    8495#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Core_allocation.cpp

    r139 r145  
    2424   void
    2525#endif
     26
     27// #ifdef STATISTICS
     28//    morpheo::behavioural::Parameters_Statistics * param_statistics,
     29// #endif
     30//    morpheo::behavioural::Function_pointer      * function_pointer
     31
    2632   )
    2733  {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Core_transition.cpp

    r88 r145  
    1010#include "Behavioural/Core/include/Core.h"
    1111
    12 namespace morpheo                    {
     12namespace morpheo {
    1313namespace behavioural {
    1414namespace core {
    15 
    1615
    1716#undef  FUNCTION
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Parameters.cpp

    r139 r145  
    248248
    249249  Tpriority_t             dispatch_priority                             ,
    250   Tload_balancing_t       dispatch_load_balancing                       
     250  Tload_balancing_t       dispatch_load_balancing                       ,
     251  bool                    is_toplevel
    251252                        )
    252253  {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/Makefile

    r88 r145  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
    77#
    88
    9 #-----[ Directory ]----------------------------------------
    10 DIR_MORPHEO                     = ../../../../..
     9#-----[ Directory ]----------------------------------------
     10DIR_COMPONENT                   = ../
     11include                         $(DIR_COMPONENT)/Makefile.defs
    1112
    1213LIBRARY                         = $(RegisterFile_Monolithic_LIBRARY)
     
    1415DIR_LIBRARY                     = $(RegisterFile_Monolithic_DIR_LIBRARY)
    1516
    16 #-----[ include ]------------------------------------------
     17#-----[ include ]------------------------------------------
    1718
    18 all                             : library
     19all                             :
    1920                                @$(MAKE) all_selftest
    2021
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/mkf.info

    r139 r145  
    11
    2 # RegisterFile_Monolithic_0
    3 target_dep      all     RegisterFile_Monolithic_0.ngc
    4 target_dep      RegisterFile_Monolithic_0.ngc   RegisterFile_Monolithic_0.prj
    5 target_dep      RegisterFile_Monolithic_0.prj   RegisterFile_Monolithic_0_Pack.vhdl RegisterFile_Monolithic_0.vhdl
     2# debug_0
     3target_dep      all     debug_0.ngc
     4target_dep      debug_0.ngc     debug_0.prj
     5target_dep      debug_0.prj     debug_0_Pack.vhdl debug_0.vhdl
    66
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h

    r138 r145  
    2222#include "Behavioural/include/Stat.h"
    2323#endif
    24 #include "Behavioural/include/Component.h"
     24// #include "Behavioural/include/Component.h"
    2525#ifdef VHDL
    2626#include "Behavioural/include/Vhdl.h"
     
    2828#include "Behavioural/include/Usage.h"
    2929
     30
     31
    3032namespace morpheo                    {
    3133namespace behavioural                {
     34
     35  class Component;
     36  class Interfaces;
     37
    3238namespace generic                    {
    3339namespace registerfile               {
    3440namespace registerfile_monolithic    {
     41
     42// #define VHDL_GAISLER
    3543
    3644  typedef enum {RW_READ, RW_WRITE} rw_t;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Types.h

    r128 r145  
    1717namespace registerfile_monolithic    {
    1818
    19 //   typedef uint32_t Taddress_t;
     19//typedef uint32_t Taddress_t;
     20//typedef uint64_t Tdata_t;
    2021  typedef Tgeneral_data_t Tdata_t;
    2122 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_allocation.cpp

    r112 r145  
    88#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h"
    99#include "Behavioural/include/Allocation.h"
     10#include "Behavioural/include/Component.h"
    1011
    1112namespace morpheo                    {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_deallocation.cpp

    r112 r145  
    88#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h"
    99#include "Behavioural/include/Allocation.h"
     10#include "Behavioural/include/Component.h"
    1011
    1112namespace morpheo                    {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl.cpp

    r81 r145  
    1010#include "Behavioural/include/Vhdl.h"
    1111#include "Common/include/ToString.h"
     12#include "Behavioural/include/Component.h"
     13
    1214namespace morpheo                    {
    1315namespace behavioural                {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_body.cpp

    r101 r145  
    1717  void RegisterFile_Monolithic::vhdl_body (Vhdl * & vhdl)
    1818  {
     19#ifndef VHDL_GAISLER
     20
    1921    vhdl->set_body   (0,"");
    2022    vhdl->set_comment(0,"---------------------------------------------------------------------------");
     
    107109    if (_param->_have_init_value)
    108110      vhdl->set_body   (1,"end if;");
    109 
    110111    vhdl->set_body   (0,"end process RegisterFile_write;");
     112
     113#else
     114    // vhdl->set_body   (0,"");
     115    // vhdl->set_comment(0,"---------------------------------------------------------------------------");
     116    // vhdl->set_comment(0," Ackitement");
     117    // vhdl->set_comment(0,"---------------------------------------------------------------------------");
     118    // vhdl->set_body   (0,"");
     119
     120    // for (uint32_t i = 0; i < _param->_nb_port_read; i++)
     121    //   vhdl->set_body   (0,"out_READ_"+toString(i)+"_ACK  <= '1';");
     122    // for (uint32_t i = 0; i < _param->_nb_port_write; i++)
     123    //   vhdl->set_body   (0,"out_WRITE_"+toString(i)+"_ACK <= '1';");
     124    // for (uint32_t i = 0; i < _param->_nb_port_read_write; i++)
     125    //   vhdl->set_body   (0,"out_READ_WRITE_"+toString(i)+"_ACK  <= '1';");
     126
     127    // vhdl->set_body   (0,"");
     128    // vhdl->set_comment(0,"---------------------------------------------------------------------------");
     129    // vhdl->set_comment(0," Read RegisterFile");
     130    // vhdl->set_comment(0,"---------------------------------------------------------------------------");
     131    // vhdl->set_body   (0,"");
     132
     133    // for (uint32_t num_read=0; num_read<_param->_nb_port_read; ++num_read)
     134    //   {
     135    //     vhdl->set_body   (0,"with in_READ_"+toString(num_read)+"_ADDRESS select");
     136    //       vhdl->set_body   (1,"out_READ_"+toString(num_read)+"_DATA <=");
     137    //       for (uint32_t num_word=0; num_word<_param->_nb_word-1; ++num_word)
     138    //         vhdl->set_body   (1,"reg_DATA_"+toString(num_word)+" when "+std_logic_cst(_param->_size_address,num_word)+",");
     139    //       vhdl->set_body   (1,"reg_DATA_"+toString(_param->_nb_word-1)+" when others;");
     140    //   }
     141
     142    // vhdl->set_body   (0,"");
     143    // vhdl->set_comment(0,"---------------------------------------------------------------------------");
     144    // vhdl->set_comment(0," Write RegisterFile");
     145    // vhdl->set_comment(0,"---------------------------------------------------------------------------");
     146    // vhdl->set_body   (0,"");
     147
     148    // vhdl->set_body   (0,"RegisterFile_write: process (in_CLOCK)");
     149    // vhdl->set_body   (0,"begin  -- process RegisterFile_write");
     150    // vhdl->set_body   (1,"if in_CLOCK'event and in_CLOCK = '1' then");
     151
     152    // for (uint32_t num_write = 0; num_write < _param->_nb_port_write; num_write++)
     153    //   {
     154    //     vhdl->set_body   (2,"if (in_WRITE_"+toString(num_write)+"_VAL = '1') then");
     155    //     for (uint32_t num_word=0; num_word<_param->_nb_word; ++num_word)
     156    //       {
     157    //         vhdl->set_body   (3,"if (in_WRITE_"+toString(num_write)+"_ADDRESS = "+std_logic_cst(_param->_size_address,num_word)+") then");
     158    //         vhdl->set_body   (4,"reg_DATA_"+toString(num_word)+" <= in_WRITE_"+toString(num_write)+"_DATA;");
     159    //         vhdl->set_body   (3,"end if;");
     160    //       }
     161    //     vhdl->set_body   (2,"end if;");
     162    //   }
     163   
     164    // vhdl->set_body   (1,"end if;");
     165    // vhdl->set_body   (0,"end process RegisterFile_write;");
     166
     167    vhdl->set_body   (0,"combinatory : process (");
     168    for (uint32_t num_read=0; num_read<_param->_nb_port_read; ++num_read)
     169      {
     170        vhdl->set_body   (1,"in_READ_"+toString(num_read)+"_VAL,");
     171        if (_param->_have_port_address)
     172        vhdl->set_body   (1,"in_READ_"+toString(num_read)+"_ADDRESS,");
     173      }
     174    for (uint32_t num_write=0; num_write<_param->_nb_port_write; ++num_write)
     175      {
     176        vhdl->set_body   (1,"in_WRITE_"+toString(num_write)+"_VAL,");
     177        if (_param->_have_port_address)
     178        vhdl->set_body   (1,"in_WRITE_"+toString(num_write)+"_ADDRESS,");
     179        vhdl->set_body   (1,"in_WRITE_"+toString(num_write)+"_DATA,");
     180      }
     181    for (uint32_t num_write = 0; num_write < _param->_nb_port_write; num_write++)
     182    vhdl->set_body   (1,"in_NRESET,");
     183    vhdl->set_body   (1,"reg_DATA)");
     184    vhdl->set_body   (1,"variable sig_DATA : Treg;");
     185    vhdl->set_body   (0,"begin");
     186    vhdl->set_body   (1,"");
     187    vhdl->set_body   (1,"sig_DATA := reg_DATA;");
     188
     189    vhdl->set_body   (1,"");
     190    vhdl->set_body   (1," -- ack");
     191    vhdl->set_body   (1,"");
     192   
     193    for (uint32_t i = 0; i < _param->_nb_port_read; i++)
     194      vhdl->set_body   (1,"out_READ_"+toString(i)+"_ACK  <= '1';");
     195    for (uint32_t i = 0; i < _param->_nb_port_write; i++)
     196      vhdl->set_body   (1,"out_WRITE_"+toString(i)+"_ACK <= '1';");
     197    for (uint32_t i = 0; i < _param->_nb_port_read_write; i++)
     198      vhdl->set_body   (1,"out_READ_WRITE_"+toString(i)+"_ACK  <= '1';");
     199    vhdl->set_body   (1,"");
     200    vhdl->set_body   (1," -- Read");
     201    vhdl->set_body   (1,"");
     202
     203    for (uint32_t i = 0; i < _param->_nb_port_read; i++)
     204      {
     205        std::string str_address;
     206        if (_param->_have_port_address)
     207          str_address = "conv_integer(in_READ_"+toString(i)+"_ADDRESS)";
     208        else
     209          str_address = "0";
     210
     211        vhdl->set_body   (1,"if (in_READ_"+toString(i)+"_VAL = '1') then"),
     212        vhdl->set_body   (2,"out_READ_"+toString(i)+"_DATA <= sig_DATA.reg ("+str_address+");");
     213        vhdl->set_body   (1,"else"),
     214        vhdl->set_body   (2,"out_READ_"+toString(i)+"_DATA <= "+std_logic_others(_param->_size_word,0)+";");
     215        vhdl->set_body   (1,"end if;");
     216      }
     217    vhdl->set_body   (1,"");
     218    vhdl->set_body   (1," -- write");
     219    vhdl->set_body   (1,"");
     220
     221    for (uint32_t i = 0; i < _param->_nb_port_write; i++)
     222      {
     223        std::string str_address;
     224        if (_param->_have_port_address)
     225          str_address = "conv_integer(in_WRITE_"+toString(i)+"_ADDRESS)";
     226        else
     227          str_address = "0";
     228
     229        vhdl->set_body   (1,"if (in_WRITE_"+toString(i)+"_VAL = '1') then");
     230        vhdl->set_body   (2,"sig_DATA.reg("+str_address+") := in_WRITE_"+toString(i)+"_DATA;");
     231        vhdl->set_body   (1,"end if;");
     232      }
     233
     234    vhdl->set_body   (1,"");
     235    vhdl->set_body   (1,"reg_DATA_next <= sig_DATA;");
     236    vhdl->set_body   (1,"");
     237    vhdl->set_body   (0,"end process combinatory;");
     238
     239
     240    vhdl->set_body   (0,"sequential: process (in_CLOCK)");
     241    vhdl->set_body   (0,"begin");
     242    vhdl->set_body   (1,"if rising_edge(in_CLOCK) then");
     243    vhdl->set_body   (2,"reg_DATA <= reg_DATA_NEXT;");
     244    vhdl->set_body   (1,"end if;");
     245    vhdl->set_body   (0,"end process sequential;");
     246
     247#endif
     248
    111249  };
    112250
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_declaration.cpp

    r97 r145  
    1818  void RegisterFile_Monolithic::vhdl_declaration (Vhdl * & vhdl)
    1919  {
     20#ifndef VHDL_GAISLER
    2021    vhdl->set_type ("Tregfile", "array " + _std_logic_range(_param->_nb_word) + " of " + std_logic(_param->_size_word));
    2122
    2223    vhdl->set_signal ("reg_DATA", "Tregfile");
     24#else
     25    // for (uint32_t i=0; i<_param->_nb_word; ++i)
     26    //   vhdl->set_signal ("reg_DATA_"+toString(i), _param->_size_word);
     27
     28    vhdl->set_type ("Tregfile", "array " + _std_logic_range(_param->_nb_word) + " of " + std_logic(_param->_size_word));
     29    vhdl->set_type ("Treg", "record reg : Tregfile; end record");
     30
     31    vhdl->set_signal ("reg_DATA"     , "Treg");
     32    vhdl->set_signal ("reg_DATA_next", "Treg");
     33#endif
    2334  };
    2435
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest/Makefile

    r88 r145  
    99#-----[ Directory ]----------------------------------------
    1010DIR_COMPONENT                   = ../
    11 include                         $(DIR_COMPONENT)/Makefile.defs
     11include                         $(DIR_COMPONENT)/Makefile.defs                                                                                                                                                   
    1212
    1313LIBRARY                         = $(RegisterFile_Multi_Banked_LIBRARY)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest/mkf.info

    r139 r145  
    11
    2 # RegisterFile_Multi_Banked_0
    3 target_dep      all     RegisterFile_Multi_Banked_0.ngc
    4 target_dep      RegisterFile_Multi_Banked_0.ngc RegisterFile_Multi_Banked_0.prj
    5 target_dep      RegisterFile_Multi_Banked_0.prj RegisterFile_Multi_Banked_0_bank_Pack.vhdl RegisterFile_Multi_Banked_0_bank.vhdl RegisterFile_Multi_Banked_0_Pack.vhdl RegisterFile_Multi_Banked_0_select_1_ports_Pack.vhdl RegisterFile_Multi_Banked_0_select_1_ports.vhdl RegisterFile_Multi_Banked_0_select_2_ports_Pack.vhdl RegisterFile_Multi_Banked_0_select_2_ports.vhdl RegisterFile_Multi_Banked_0.vhdl
     2# info_00
     3target_dep      all     info_00.ngc
     4target_dep      info_00.ngc     info_00.prj
     5target_dep      info_00.prj     info_00_bank_Pack.vhdl info_00_bank.vhdl info_00_Pack.vhdl info_00_select_4_ports_Pack.vhdl info_00_select_4_ports.vhdl info_00_select_8_ports_Pack.vhdl info_00_select_8_ports.vhdl info_00.vhdl
    66
    7 # RegisterFile_Multi_Banked_1
    8 target_dep      all     RegisterFile_Multi_Banked_1.ngc
    9 target_dep      RegisterFile_Multi_Banked_1.ngc RegisterFile_Multi_Banked_1.prj
    10 target_dep      RegisterFile_Multi_Banked_1.prj RegisterFile_Multi_Banked_1_bank_Pack.vhdl RegisterFile_Multi_Banked_1_bank.vhdl RegisterFile_Multi_Banked_1_Pack.vhdl RegisterFile_Multi_Banked_1_select_1_ports_Pack.vhdl RegisterFile_Multi_Banked_1_select_1_ports.vhdl RegisterFile_Multi_Banked_1_select_2_ports_Pack.vhdl RegisterFile_Multi_Banked_1_select_2_ports.vhdl RegisterFile_Multi_Banked_1.vhdl
     7# info_01
     8target_dep      all     info_01.ngc
     9target_dep      info_01.ngc     info_01.prj
     10target_dep      info_01.prj     info_01_bank_Pack.vhdl info_01_bank.vhdl info_01_Pack.vhdl info_01_select_4_ports_Pack.vhdl info_01_select_4_ports.vhdl info_01_select_8_ports_Pack.vhdl info_01_select_8_ports.vhdl info_01.vhdl
    1111
     12# info_02
     13target_dep      all     info_02.ngc
     14target_dep      info_02.ngc     info_02.prj
     15target_dep      info_02.prj     info_02_bank_Pack.vhdl info_02_bank.vhdl info_02_Pack.vhdl info_02_select_4_ports_Pack.vhdl info_02_select_4_ports.vhdl info_02_select_8_ports_Pack.vhdl info_02_select_8_ports.vhdl info_02.vhdl
     16
     17# info_03
     18target_dep      all     info_03.ngc
     19target_dep      info_03.ngc     info_03.prj
     20target_dep      info_03.prj     info_03_bank_Pack.vhdl info_03_bank.vhdl info_03_Pack.vhdl info_03_select_16_ports_Pack.vhdl info_03_select_16_ports.vhdl info_03_select_4_ports_Pack.vhdl info_03_select_4_ports.vhdl info_03.vhdl
     21
     22# info_04
     23target_dep      all     info_04.ngc
     24target_dep      info_04.ngc     info_04.prj
     25target_dep      info_04.prj     info_04_bank_Pack.vhdl info_04_bank.vhdl info_04_Pack.vhdl info_04_select_16_ports_Pack.vhdl info_04_select_16_ports.vhdl info_04_select_4_ports_Pack.vhdl info_04_select_4_ports.vhdl info_04.vhdl
     26
     27# info_05
     28target_dep      all     info_05.ngc
     29target_dep      info_05.ngc     info_05.prj
     30target_dep      info_05.prj     info_05_bank_Pack.vhdl info_05_bank.vhdl info_05_Pack.vhdl info_05_select_16_ports_Pack.vhdl info_05_select_16_ports.vhdl info_05_select_4_ports_Pack.vhdl info_05_select_4_ports.vhdl info_05.vhdl
     31
     32# result_06
     33target_dep      all     result_06.ngc
     34target_dep      result_06.ngc   result_06.prj
     35target_dep      result_06.prj   result_06_bank_Pack.vhdl result_06_bank.vhdl result_06_Pack.vhdl result_06_select_4_ports_Pack.vhdl result_06_select_4_ports.vhdl result_06_select_8_ports_Pack.vhdl result_06_select_8_ports.vhdl result_06.vhdl
     36
     37# result_07
     38target_dep      all     result_07.ngc
     39target_dep      result_07.ngc   result_07.prj
     40target_dep      result_07.prj   result_07_bank_Pack.vhdl result_07_bank.vhdl result_07_Pack.vhdl result_07_select_4_ports_Pack.vhdl result_07_select_4_ports.vhdl result_07_select_8_ports_Pack.vhdl result_07_select_8_ports.vhdl result_07.vhdl
     41
     42# result_08
     43target_dep      all     result_08.ngc
     44target_dep      result_08.ngc   result_08.prj
     45target_dep      result_08.prj   result_08_bank_Pack.vhdl result_08_bank.vhdl result_08_Pack.vhdl result_08_select_4_ports_Pack.vhdl result_08_select_4_ports.vhdl result_08_select_8_ports_Pack.vhdl result_08_select_8_ports.vhdl result_08.vhdl
     46
     47# result_09
     48target_dep      all     result_09.ngc
     49target_dep      result_09.ngc   result_09.prj
     50target_dep      result_09.prj   result_09_bank_Pack.vhdl result_09_bank.vhdl result_09_Pack.vhdl result_09_select_16_ports_Pack.vhdl result_09_select_16_ports.vhdl result_09_select_4_ports_Pack.vhdl result_09_select_4_ports.vhdl result_09.vhdl
     51
     52# result_10
     53target_dep      all     result_10.ngc
     54target_dep      result_10.ngc   result_10.prj
     55target_dep      result_10.prj   result_10_bank_Pack.vhdl result_10_bank.vhdl result_10_Pack.vhdl result_10_select_16_ports_Pack.vhdl result_10_select_16_ports.vhdl result_10_select_4_ports_Pack.vhdl result_10_select_4_ports.vhdl result_10.vhdl
     56
     57# result_11
     58target_dep      all     result_11.ngc
     59target_dep      result_11.ngc   result_11.prj
     60target_dep      result_11.prj   result_11_bank_Pack.vhdl result_11_bank.vhdl result_11_Pack.vhdl result_11_select_16_ports_Pack.vhdl result_11_select_16_ports.vhdl result_11_select_4_ports_Pack.vhdl result_11_select_4_ports.vhdl result_11.vhdl
     61
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest/src/main.cpp

    r81 r145  
    88#include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest/include/test.h"
    99
    10 #define NB_PARAMS 0
     10#define NB_PARAMS 8
    1111
    1212void usage (int argc, char * argv[])
     
    4040    usage (argc, argv);
    4141
    42   const string   name      = argv[1];
     42  const string      name                  = argv[1];
    4343  const uint32_t    nb_port_read          = atoi(argv[2]);
    4444  const uint32_t    nb_port_write         = atoi(argv[3]);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest/src/test.cpp

    r131 r145  
    4242     _param,
    4343     _usage);
    44  
    45 #ifdef SYSTEMC
     44
     45#if 0 
     46// #ifdef SYSTEMC
     47
    4648  /*********************************************************************
    4749   * Déclarations des signaux
     
    229231   ********************************************************/
    230232
    231   TEST_OK("End of Simulation");
    232233  delete _time;
    233234  cout << "<" << name << "> ............ Stop Simulation" << endl;
     
    236237  delete NRESET;
    237238#endif
     239  TEST_OK("End of Simulation");
    238240
    239241  delete _RegisterFile_Multi_Banked;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h

    r128 r145  
    1919
    2020//typedef uint32_t Taddress_t;
     21//typedef uint64_t Tdata_t;
    2122  typedef Tgeneral_data_t Tdata_t;
    2223
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Selftest

    r137 r145  
    88
    99#-----[ Directory ]----------------------------------------
    10 DIR_BIN                         = $(DIR_TMP)/bin
    11 DIR_CFG_GEN                     = $(DIR_TMP)/configuration_generated
     10DIR_BIN                         = $(DIR_TMP)/bin/$(ENTITY)
     11DIR_CFG_GEN                     = $(DIR_TMP)/configuration_generated/$(ENTITY)
    1212DIR_CFG_USER                    = configuration
    1313DIR_LOG                         = log
    1414
    1515#-----[ Variables ]----------------------------------------
    16 CFG_FILE_EXTENSION              = cfg
    17 CFG_FILE_DEBUG                  = debug.$(CFG_FILE_EXTENSION)
     16CFG_FILE_PATH                   = $(DIR_CFG_USER)
     17CFG_FILE_EXTENSION              = gen
     18CFG_FILE_DEBUG                  = $(CFG_FILE_PATH)/debug.$(CFG_FILE_EXTENSION)
    1819
    1920OBJECTS                         = $(OBJECTS_COMMON)
    2021
    2122LIBS                            = -lm $(SYSTEMC_LIBNAME_$(SIMULATOR_SYSTEMC))
    22 #                                 $(OR1K_LIBNAME) -lbfd 
    2323
    2424MODELTECH_LIBRARY               = $(addprefix -lib ,$(addsuffix .a, $(subst -l,$(DIR_LIB)/lib,$(LIBRARY))))
     
    2929EXEC_PARAMS                     = $(SYSTEMC_EXEC_PARAMS_$(SIMULATOR_SYSTEMC))
    3030EXEC_LOG                        = $(patsubst $(DIR_CFG_GEN)/%.cfg,$(DIR_LOG)/%.exec.log,$(wildcard $(DIR_CFG_GEN)/*.cfg))       \
    31                                   $(patsubst $(DIR_CFG_USER)/%.cfg,$(DIR_LOG)/%.exec.log,$(wildcard $(DIR_CFG_USER)/*.cfg))
     31                                  $(patsubst $(DIR_CFG_USER)/%.cfg,$(DIR_LOG)/%.exec.log,$(wildcard $(DIR_CFG_GEN)/*.cfg))
    3232BIN                             = Selftest.x
    3333EXEC                            = $(DIR_BIN)/$(BIN)
     
    3737#.NOTPARALLEL                   : clean clean_all help
    3838
    39 vpath   %.cfg   $(DIR_CFG_USER):$(DIR_CFG_GEN)
    4039vpath   %.x     $(DIR_BIN)
    4140
     
    4746execute_only                    :
    4847                                @\
    49                                 $(MAKE) $(EXEC_LOG);                                    \
     48                                $(MAKE) $(EXEC_LOG);\
    5049                                declare -i all_ok=1;                                    \
    5150                                for i in $(EXEC_LOG); do                                \
     
    8685                                        files=$(CFG_FILE_DEBUG);                                                                        \
    8786                                else                                                                                                    \
    88                                         files=$$($(LS) *.$(CFG_FILE_EXTENSION) );                                                       \
     87                                        files=$$($(LS) $(CFG_FILE_PATH)/*.$(CFG_FILE_EXTENSION) );                                                      \
    8988                                fi;                                                                                                     \
    9089                                                                                                                                        \
     
    172171                                done;
    173172
    174 $(DIR_LOG)/%.exec.log           : %.cfg  $(EXEC)
     173$(DIR_LOG)/%.exec.log           : $(DIR_CFG_GEN)/%.cfg  $(EXEC)
    175174                                @\
    176175                                $(ECHO) "Execute            : $*";\
     
    218217                                esac;
    219218
    220 $(DIR_BIN) $(DIR_LOG) $(DIR_CFG_GEN) :
     219$(DIR_BIN) $(DIR_LOG)           :
    221220                                @\
    222221                                $(ECHO) "Create directory   : $@";\
    223                                 $(MKDIR) $@;
     222                                $(MKDIR) $@;\
     223
     224$(DIR_CFG_GEN)                  :
     225                                @\
     226                                $(ECHO) "Create directory   : $@";\
     227                                $(MKDIR) $@;\
     228                                $(LS) $(DIR_CFG_USER)/*.cfg &> /dev/null; \
     229                                if $(TEST) $$? -eq 0; then \
     230                                        $(CP) $(DIR_CFG_USER)/*.cfg $@; \
     231                                fi;
    224232
    225233selftest_clean                  : local_clean config_clean
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.mkf

    r138 r145  
    33#
    44
    5 all: _Generic/Queue/SelfTest _Generic/RegisterFile/RegisterFile_Monolithic/SelfTest _Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest
     5all: _Generic/Queue/SelfTest _Generic/RegisterFile/RegisterFile_Internal_Banked/SelfTest _Generic/RegisterFile/RegisterFile_Monolithic/SelfTest _Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest
    66
    77_Generic/Queue/SelfTest:
    88        gmake all -C Generic/Queue/SelfTest
     9
     10_Generic/RegisterFile/RegisterFile_Internal_Banked/SelfTest:
     11        gmake all -C Generic/RegisterFile/RegisterFile_Internal_Banked/SelfTest
    912
    1013_Generic/RegisterFile/RegisterFile_Monolithic/SelfTest:
     
    1619clean:
    1720        gmake clean -C Generic/Queue/SelfTest
     21        gmake clean -C Generic/RegisterFile/RegisterFile_Internal_Banked/SelfTest
    1822        gmake clean -C Generic/RegisterFile/RegisterFile_Monolithic/SelfTest
    1923        gmake clean -C Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest
     
    2327install:
    2428        gmake install -C Generic/Queue/SelfTest
     29        gmake install -C Generic/RegisterFile/RegisterFile_Internal_Banked/SelfTest
    2530        gmake install -C Generic/RegisterFile/RegisterFile_Monolithic/SelfTest
    2631        gmake install -C Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/doc/sty/doc-style.sty

    r81 r145  
    33\usepackage{makeidx}
    44\usepackage{palatino}
    5 \usepackage{fancyheadings}
     5%\usepackage{fancyheadings}
    66\usepackage{float}
    77\usepackage{verbatim}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Allocation.h

    r139 r145  
    1414// =====[ ALLOCATION / DELETE of ARRAY ]=================================
    1515// ======================================================================
    16 #define ALLOC0(var,type)                        \
     16#define ALLOC0_COND(var,type,cond)              \
    1717  do                                            \
    1818    {                                           \
    19       var = new type;                           \
    20     } while (0)
    21 
    22 #define ALLOC1(var,type,s1)                     \
     19      if (cond)                                 \
     20        var = new type;                         \
     21    } while (0)
     22
     23
     24#define ALLOC1_COND(var,type,s1,cond)           \
    2325  do                                            \
    2426    {                                           \
    25       var = new type [s1];                      \
    26     } while (0)
    27 
    28 #define ALLOC2(var,type,s1,s2)                   \
     27      if (cond)                                 \
     28        var = new type [s1];                    \
     29    } while (0)
     30
     31
     32#define ALLOC2_COND(var,type,s1,s2,cond)         \
    2933  do                                             \
    3034    {                                            \
     
    3236      for (uint32_t it1=0; it1<s1; ++it1)        \
    3337        {                                        \
    34           var [it1] = new type [s2];             \
     38          if (cond)                              \
     39            var [it1] = new type [s2];           \
    3540        }                                        \
    3641    } while (0)
    3742
    38 #define ALLOC3(var,type,s1,s2,s3)                \
     43#define ALLOC3_COND(var,type,s1,s2,s3,cond)      \
    3944  do                                             \
    4045    {                                            \
     
    4550          for (uint32_t it2=0; it2<s2; ++it2)    \
    4651            {                                    \
    47               var [it1][it2] = new type [s3];    \
     52              if (cond)                          \
     53                var [it1][it2] = new type [s3];  \
    4854            }                                    \
    4955        }                                        \
    5056    } while (0)
    5157
    52 #define ALLOC4(var,type,s1,s2,s3,s4)                    \
    53   do                                                    \
    54     {                                                   \
    55       var = new type *** [s1];                          \
    56       for (uint32_t it1=0; it1<s1; ++it1)               \
    57         {                                               \
    58           var [it1] = new type ** [s2];                 \
    59           for (uint32_t it2=0; it2<s2; ++it2)           \
    60             {                                           \
    61               var [it1][it2] = new type * [s3];         \
    62               for (uint32_t it3=0; it3<s3; ++it3)       \
    63                 {                                       \
    64                   var [it1][it2][it3] = new type [s4];  \
    65                 }                                       \
    66             }                                           \
    67         }                                               \
    68     } while (0)
    69 
    70 #define DELETE0(var)                            \
     58#define ALLOC4_COND(var,type,s1,s2,s3,s4,cond)                  \
     59  do                                                            \
     60    {                                                           \
     61      var = new type *** [s1];                                  \
     62      for (uint32_t it1=0; it1<s1; ++it1)                       \
     63        {                                                       \
     64          var [it1] = new type ** [s2];                         \
     65          for (uint32_t it2=0; it2<s2; ++it2)                   \
     66            {                                                   \
     67              var [it1][it2] = new type * [s3];                 \
     68              for (uint32_t it3=0; it3<s3; ++it3)               \
     69                {                                               \
     70                  if (cond)                                     \
     71                    var [it1][it2][it3] = new type [s4];        \
     72                }                                               \
     73            }                                                   \
     74        }                                                       \
     75    } while (0)
     76
     77#define ALLOC0(var,type)             ALLOC0_COND(var,type,true)
     78#define ALLOC1(var,type,s1)          ALLOC1_COND(var,type,s1,true)
     79#define ALLOC2(var,type,s1,s2)       ALLOC2_COND(var,type,s1,s2,true)
     80#define ALLOC3(var,type,s1,s2,s3)    ALLOC3_COND(var,type,s1,s2,s3,true)
     81#define ALLOC4(var,type,s1,s2,s3,s4) ALLOC4_COND(var,type,s1,s2,s3,s4,true)
     82
     83
     84#define DELETE0_COND(var,cond)                  \
    7185  do                                            \
    7286    {                                           \
    73       delete var;                               \
    74     } while (0)
    75 
    76 #define DELETE1(var,s1)                         \
     87      if (cond)                                 \
     88        delete var;                             \
     89    } while (0)
     90
     91#define DELETE1_COND(var,s1,cond)               \
    7792  do                                            \
    7893    {                                           \
    79       delete [] var;                            \
    80     } while (0)
    81 
    82 #define DELETE2(var,s1,s2)                      \
     94      if (cond)                                 \
     95        delete [] var;                          \
     96    } while (0)
     97
     98#define DELETE2_COND(var,s1,s2,cond)            \
    8399  do                                            \
    84100    {                                            \
    85101      for (uint32_t it1=0; it1<s1; ++it1)        \
    86102        {                                        \
    87           delete [] var [it1];                   \
     103          if (cond)                              \
     104            delete [] var [it1];                 \
    88105        }                                        \
    89106      delete [] var;                             \
    90107    } while (0)
    91108
    92 #define DELETE3(var,s1,s2,s3)                    \
     109#define DELETE3_COND(var,s1,s2,s3,cond)          \
    93110  do                                             \
    94111    {                                            \
     
    97114          for (uint32_t it2=0; it2<s2; ++it2)    \
    98115            {                                    \
    99               delete [] var [it1][it2];          \
     116              if (cond)                          \
     117                delete [] var [it1][it2];        \
    100118            }                                    \
    101119          delete [] var [it1];                   \
     
    104122    } while (0)
    105123
    106 #define DELETE4(var,s1,s2,s3,s4)                        \
     124#define DELETE4_COND(var,s1,s2,s3,s4,cond)              \
    107125  do                                                    \
    108126    {                                                   \
     
    113131              for (uint32_t it3=0; it3<s3; ++it3)       \
    114132                {                                       \
    115                   delete [] var [it1][it2][it3];        \
     133                  if (cond)                             \
     134                    delete [] var [it1][it2][it3];      \
    116135                }                                       \
    117136              delete [] var [it1][it2];                 \
     
    121140      delete [] var;                                    \
    122141    } while (0)
     142
     143#define DELETE0(var)             DELETE1_COND(var,true)
     144#define DELETE1(var,s1)          DELETE1_COND(var,s1,true)
     145#define DELETE2(var,s1,s2)       DELETE2_COND(var,s1,s2,true)
     146#define DELETE3(var,s1,s2,s3)    DELETE3_COND(var,s1,s2,s3,true)
     147#define DELETE4(var,s1,s2,s3,s4) DELETE4_COND(var,s1,s2,s3,s4,true)
    123148
    124149// ======================================================================
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Debug_component.h

    r118 r145  
    1919#  define       DEBUG_Queue_Control                               true
    2020#  define       DEBUG_RegisterFile                                true
     21#  define         DEBUG_RegisterFile_Internal_Banked              true
    2122#  define         DEBUG_RegisterFile_Monolithic                   true
    2223#  define         DEBUG_RegisterFile_Multi_Banked                 true
     
    119120#  define NAME_Queue_Control                              "Queue_Control"
    120121#  define NAME_RegisterFile                               "RegisterFile"
     122#  define NAME_RegisterFile_Internal_Banked               "RegisterFile_Internal_Banked"
    121123#  define NAME_RegisterFile_Monolithic                    "RegisterFile_Monolithic"
    122124#  define NAME_RegisterFile_Multi_Banked                  "RegisterFile_Multi_Banked"
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h

    r142 r145  
    158158
    159159      if (test<T>(_size) == false)
    160         throw (ErrorMorpheo (toString(_("Signal \"%s\" : size is too small (%d bits) to the associate type (%d bits).\n"),_name.c_str(),_size,8*sizeof(T))));
     160        throw (ErrorMorpheo (toString(_("Signal \"%s\" : size is too small (%d bits) to the associate type (%d bits).\n"),_name.c_str(),_size,8*sizeof(T))));
    161161
    162162      _is_allocate    = true;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/mkf.info

    r137 r145  
    1616# build src directory content
    1717 target_dep             all             Generic/Queue/SelfTest
     18 target_dep             all             Generic/RegisterFile/RegisterFile_Internal_Banked/SelfTest
    1819 target_dep             all             Generic/RegisterFile/RegisterFile_Monolithic/SelfTest
    1920 target_dep             all             Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_dealloc.cpp

    r144 r145  
    1717    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    1818
     19#warning "FIXME : Signal::dealloc"
    1920
    20 #warning "FIXME : Signal::dealloc"
    2121
    2222    // switch (_direction)
  • trunk/IPs/systemC/processor/Morpheo/Common/src/Basename.cpp

    r144 r145  
    77
    88#include "../include/Basename.h"
    9 #include <libgen.h>
     9//#include <libgen.h>
    1010
    1111namespace morpheo {
  • trunk/IPs/systemC/processor/Morpheo/Files/Instance_x01_w04_02.cfg

    r139 r145  
    208208  <link name="link_dcache_port_with_load_store_unit"   src="0.0"   dest="0"   />
    209209
    210 
    211 
    212 
    213 
    214 
    215 
    216 
    217210  <link name="link_read_bloc_with_load_store_unit"     src="0"     dest="0"   />
    218211  <link name="link_read_bloc_and_functionnal_unit"     src="0.0"   dest="0"   />
  • trunk/IPs/systemC/processor/Morpheo/Files/Morpheo.gen

    r139 r145  
    101101  <parameter name="nb_rename_unit_select"                 min="1"   max="16"   step="* 2" default="1"   level="..." description="..." />
    102102  <parameter name="nb_execute_loop_select"                min="1"   max="8"    step="* 2" default="1"   level="..." description="..." />
    103   <parameter name="size_re_order_buffer"                  min="1"   max="256"  step="+ 1" default="1"   level="..." description="..." />
     103  <parameter name="size_re_order_buffer"                  min="1"   max="512"  step="+ 1" default="1"   level="..." description="..." />
    104104  <parameter name="nb_re_order_buffer_bank"               min="1"   max="256"  step="* 2" default="1"   level="..." description="..." />
    105105  <parameter name="size_issue_queue"                      min="1"   max="64"   step="* 2" default="2"   level="..." description="..." />
  • trunk/IPs/systemC/processor/Morpheo/Files/Morpheo.sim

    r139 r145  
    1717  <parameter  name="directory_log"                          value="."       />
    1818
    19   <parameter  name="statistics_cycle_start"                 value="5"       />
     19  <parameter  name="statistics_cycle_start"                 value="10000"   />
    2020  <parameter  name="statistics_period"                      value="0"       />
    2121                                                           
    2222  <parameter  name="simulation_nb_cycle"                    value="0"       />
    23   <parameter  name="simulation_nb_instruction"              value="0"      />
     23  <parameter  name="simulation_nb_instruction"              value="1000000" />
    2424  <parameter  name="simulation_stop_type"                   value="0"       />
    2525  <parameter  name="simulation_file_with_pid"               value="0"       />
  • trunk/IPs/systemC/processor/Morpheo/Files/debug.cfg

    r139 r145  
    55  <thread id="0">             
    66    <parameter name="size_ifetch_queue"                     value="16" />
    7     <parameter name="ifetch_queue_scheme"                   value="0" />
    8     <parameter name="nb_inst_fetch"                         value="2" />
    9     <parameter name="ras_size_queue"                        value="8" />
    10     <parameter name="upt_size_queue"                        value="4" />
    11     <parameter name="ufpt_size_queue"                       value="4" />
     7    <parameter name="ifetch_queue_scheme"                   value="1" />
     8    <parameter name="nb_inst_fetch"                         value="4" />
     9    <parameter name="ras_size_queue"                        value="16" />
     10    <parameter name="upt_size_queue"                        value="2" />
     11    <parameter name="ufpt_size_queue"                       value="2" />
    1212
    1313    <group id="0">
     
    1717                                                           
    1818  <decod_bloc id="0">                                       
    19     <parameter name="size_decod_queue"                      value="8" />
     19    <parameter name="size_decod_queue"                      value="16"/>
    2020    <parameter name="decod_queue_scheme"                    value="1" />
    21     <parameter name="nb_inst_decod"                         value="2" />
     21    <parameter name="nb_inst_decod"                         value="4" />
    2222    <parameter name="nb_context_select"                     value="1" />
    2323    <parameter name="context_select_priority"               value="1" />
     
    2626                                                           
    2727  <rename_bloc id="0">                                     
    28     <parameter name="nb_inst_insert"                        value="2" />
    29     <parameter name="nb_inst_retire"                        value="2" />
     28    <parameter name="nb_inst_insert"                        value="4" />
     29    <parameter name="nb_inst_retire"                        value="4" />
    3030    <parameter name="rename_select_priority"                value="1" />
    3131    <parameter name="rename_select_load_balancing"          value="1" />
    3232    <parameter name="rename_select_nb_front_end_select"     value="1" />
    33     <parameter name="nb_general_register"                   value="128"/>
    34     <parameter name="nb_special_register"                   value="64" />
    35     <parameter name="rat_scheme"                            value="2" />
    36     <parameter name="nb_reg_free"                           value="2" />
    37     <parameter name="nb_rename_unit_bank"                   value="4" />
     33    <parameter name="nb_general_register"                   value="256"/>
     34    <parameter name="nb_special_register"                   value="128"/>
     35    <parameter name="rat_scheme"                            value="1" />
     36    <parameter name="nb_reg_free"                           value="8" />
     37    <parameter name="nb_rename_unit_bank"                   value="8" />
    3838  </rename_bloc>                                           
    3939                                                           
    40   <read_bloc id="0,1,2,3">                                       
     40  <read_bloc id="0,1,2,3,4,5">
    4141    <parameter name="nb_inst_read"                          value="1" />
    4242    <parameter name="size_read_queue"                       value="4" />
     
    4444    <parameter name="nb_inst_retire_reservation_station"    value="4" />
    4545  </read_bloc>                                             
    46                                                            
    47   <write_bloc id="0,1,2,3">
     46
     47  <write_bloc id="0,1,2,3,4,5">
    4848    <parameter name="nb_inst_write"                         value="1" />
    4949    <parameter name="size_write_queue"                      value="4" />
     
    5252    <parameter name="write_queue_scheme"                    value="1" />
    5353  </write_bloc>                                             
    54                                                            
     54
    5555  <load_store_unit id="0">                                 
    56     <parameter name="size_store_queue"                      value="8" />
    57     <parameter name="size_load_queue"                       value="16" />
     56    <parameter name="size_store_queue"                      value="32" />
     57    <parameter name="size_load_queue"                       value="64" />
    5858    <parameter name="size_speculative_access_queue"         value="4" />
    5959    <parameter name="nb_store_queue_bank"                   value="1" />
     
    7474    <parameter name="nb_inst_functionnal_unit" value="1" />
    7575
     76    <timing type="8"  latence="1" delay="1" />
     77    <timing type="10" latence="1" delay="1" />
     78  </functionnal_unit>
     79
     80  <functionnal_unit id="1,2,3,4" >
     81    <parameter name="nb_inst_functionnal_unit" value="1" />
     82
    7683    <timing type="0"  latence="1" delay="1" />
    7784    <timing type="1"  latence="1" delay="1" />
     
    8188    <timing type="6"  latence="1" delay="1" />
    8289    <timing type="7"  latence="1" delay="1" />
    83     <timing type="8"  latence="1" delay="1" />
    84     <timing type="10" latence="1" delay="1" />
    85   </functionnal_unit>
    86 
    87   <functionnal_unit id="1,2">
    88     <parameter name="nb_inst_functionnal_unit" value="1" />
    89 
    90     <timing type="0"  latence="1" delay="1" />
    91     <timing type="1"  latence="1" delay="1" />
    92     <timing type="2"  latence="1" delay="1" />
    93     <timing type="3"  latence="1" delay="1" />
    94     <timing type="4"  latence="3" delay="1" />
    95     <timing type="6"  latence="1" delay="1" />
    96     <timing type="7"  latence="1" delay="1" />
    97 
    98     <timing type="10" latence="1" delay="1" />
    9990  </functionnal_unit>
    10091
     
    10596    <parameter name="nb_inst_branch_decod"                  value="1" />
    10697    <parameter name="nb_inst_branch_update"                 value="1" />
    107     <parameter name="btb_size_queue"                        value="512"/>
    108     <parameter name="btb_associativity"                     value="2" />
     98    <parameter name="btb_size_queue"                        value="1024" />
     99    <parameter name="btb_associativity"                     value="8" />
    109100    <parameter name="btb_size_counter"                      value="2" />
    110101    <parameter name="btb_victim_scheme"                     value="3" />
    111102    <parameter name="dir_predictor_scheme"                  value="4" />
    112 
     103                                 
    113104    <predictor id="0">                                     
     105      <parameter name="dir_have_bht"                        value="1"  />
     106      <parameter name="dir_bht_size_shifter"                value="10" />
     107      <parameter name="dir_bht_nb_shifter"                  value="1024" />
     108      <parameter name="dir_have_pht"                        value="1"  />
     109      <parameter name="dir_pht_size_counter"                value="2"  />
     110      <parameter name="dir_pht_nb_counter"                  value="1024" />
     111      <parameter name="dir_pht_size_address_share"          value="0"  />
     112    </predictor>                                           
     113    <predictor id="1">                                     
     114      <parameter name="dir_have_bht"                        value="1" />
     115      <parameter name="dir_bht_size_shifter"                value="10" />
     116      <parameter name="dir_bht_nb_shifter"                  value="1" />
     117      <parameter name="dir_have_pht"                        value="1" />
     118      <parameter name="dir_pht_size_counter"                value="2" />
     119      <parameter name="dir_pht_nb_counter"                  value="1024" />
     120      <parameter name="dir_pht_size_address_share"          value="0" />
     121    </predictor>                                           
     122    <predictor id="2">                                     
    114123      <parameter name="dir_have_bht"                        value="0" />
    115124      <parameter name="dir_have_pht"                        value="1" />
    116       <parameter name="dir_pht_size_counter"                value="2"  />
    117       <parameter name="dir_pht_nb_counter"                  value="512"/>
    118       <parameter name="dir_pht_size_address_share"          value="0"  />
     125      <parameter name="dir_pht_size_counter"                value="2" />
     126      <parameter name="dir_pht_nb_counter"                  value="1024" />
     127      <parameter name="dir_pht_size_address_share"          value="0" />
    119128    </predictor>                                           
    120                                                            
    121     <predictor id="1">                                     
    122       <parameter name="dir_have_bht"                        value="0" />
    123       <parameter name="dir_have_pht"                        value="0" />
    124     </predictor>                                           
    125                                                            
    126     <predictor id="2">                                     
    127       <parameter name="dir_have_bht"                        value="0" />
    128       <parameter name="dir_have_pht"                        value="0" />
    129     </predictor>
    130 
    131129  </front_end>
    132130
    133131  <ooo_engine id="0">
    134132    <parameter name="nb_rename_unit"                        value="1" />
    135     <parameter name="nb_inst_issue"                         value="2" />
     133    <parameter name="nb_inst_issue"                         value="4" />
    136134    <parameter name="nb_inst_reexecute"                     value="1" />
    137     <parameter name="nb_inst_commit"                        value="2" />
     135    <parameter name="nb_inst_commit"                        value="4" />
    138136    <parameter name="nb_inst_branch_complete"               value="2" />
    139137    <parameter name="nb_rename_unit_select"                 value="1" />
    140138    <parameter name="nb_execute_loop_select"                value="1" />
    141     <parameter name="size_re_order_buffer"                  value="64"/>
    142     <parameter name="nb_re_order_buffer_bank"               value="8"/>
     139    <parameter name="size_re_order_buffer"                  value="128"/>
     140    <parameter name="nb_re_order_buffer_bank"               value="16" />
    143141    <parameter name="retire_ooo_scheme"                     value="0" />
    144142    <parameter name="commit_priority"                       value="1" />
    145143    <parameter name="commit_load_balancing"                 value="1" />
    146     <parameter name="size_issue_queue"                      value="8" />
    147     <parameter name="nb_issue_queue_bank"                   value="2" />
     144    <parameter name="size_issue_queue"                      value="16" />
     145    <parameter name="nb_issue_queue_bank"                   value="4" />
    148146    <parameter name="issue_queue_scheme"                    value="0" />
    149147    <parameter name="issue_priority"                        value="1" />
    150148    <parameter name="issue_load_balancing"                  value="1" />
    151149    <parameter name="size_reexecute_queue"                  value="4" />
    152 
    153 
    154150  </ooo_engine>
    155151
    156152  <execute_loop id="0">
    157     <parameter name="nb_read_unit"                          value="4" />
    158     <parameter name="nb_write_unit"                         value="4" />
    159     <parameter name="nb_gpr_bank"                           value="4" />
    160     <parameter name="nb_gpr_port_read_by_bank"              value="2" />
    161     <parameter name="nb_gpr_port_write_by_bank"             value="2" />
    162     <parameter name="nb_spr_bank"                           value="4" />
    163     <parameter name="nb_spr_port_read_by_bank"              value="2" />
    164     <parameter name="nb_spr_port_write_by_bank"             value="2" />
     153    <parameter name="nb_read_unit"                          value="6" />
     154    <parameter name="nb_write_unit"                         value="6" />
     155    <parameter name="nb_execute_unit"                       value="6" />
     156    <parameter name="nb_gpr_bank"                           value="1" />
     157    <parameter name="nb_gpr_port_read_by_bank"              value="12" />
     158    <parameter name="nb_gpr_port_write_by_bank"             value="6" />
     159    <parameter name="nb_spr_bank"                           value="1" />
     160    <parameter name="nb_spr_port_read_by_bank"              value="5" />
     161    <parameter name="nb_spr_port_write_by_bank"             value="5" />
    165162    <parameter name="execution_unit_to_write_unit_priority" value="1" />
    166163    <parameter name="read_unit_to_execution_unit_priority"  value="1" />
    167 
    168     <execute_unit id="0">
    169       <link name="link_execute_unit_with_load_store_unit"   src="0"/>
    170     </execute_unit>
    171     <execute_unit id="1">
    172       <link name="link_execute_unit_with_functionnal_unit"  src="0"/>
    173     </execute_unit>
    174     <execute_unit id="2">
    175       <link name="link_execute_unit_with_functionnal_unit"  src="1"/>
    176     </execute_unit>
    177     <execute_unit id="3">
    178       <link name="link_execute_unit_with_functionnal_unit"  src="2"/>
    179     </execute_unit>
    180 
    181164  </execute_loop>
    182165
     
    202185  <link name="link_read_unit_with_read_bloc"           src="2"     dest="0.2" />
    203186  <link name="link_read_unit_with_read_bloc"           src="3"     dest="0.3" />
     187  <link name="link_read_unit_with_read_bloc"           src="4"     dest="0.4" />
     188  <link name="link_read_unit_with_read_bloc"           src="5"     dest="0.5" />
    204189
    205190  <link name="link_write_unit_with_write_bloc"         src="0"     dest="0.0" />
     
    207192  <link name="link_write_unit_with_write_bloc"         src="2"     dest="0.2" />
    208193  <link name="link_write_unit_with_write_bloc"         src="3"     dest="0.3" />
     194  <link name="link_write_unit_with_write_bloc"         src="4"     dest="0.4" />
     195  <link name="link_write_unit_with_write_bloc"         src="5"     dest="0.5" />
    209196
    210197  <link name="link_decod_bloc_with_thread"             src="0"     dest="0"   />
    211198  <link name="link_rename_bloc_with_front_end"         src="0"     dest="0"   />
    212   <link name="link_load_store_unit_with_thread"        src="0"     dest="0"   />
     199
     200  <link name="link_execute_unit_with_load_store_unit"  src="0"     dest="0.0"/>
     201  <link name="link_execute_unit_with_functionnal_unit" src="0"     dest="0.1"/>
     202  <link name="link_execute_unit_with_functionnal_unit" src="1"     dest="0.2"/>
     203  <link name="link_execute_unit_with_functionnal_unit" src="2"     dest="0.3"/>
     204  <link name="link_execute_unit_with_functionnal_unit" src="3"     dest="0.4"/>
     205  <link name="link_execute_unit_with_functionnal_unit" src="4"     dest="0.5"/>
    213206
    214207  <link name="link_icache_port_with_thread"            src="0"     dest="0"   />
     
    217210
    218211
     212
     213
     214
     215
     216
    219217  <link name="link_read_bloc_with_load_store_unit"     src="0"     dest="0"   />
    220218  <link name="link_read_bloc_and_functionnal_unit"     src="0.0"   dest="0"   />
     219  <link name="link_read_bloc_and_functionnal_unit"     src="1.0"   dest="1"   />
     220  <link name="link_read_bloc_and_functionnal_unit"     src="2.0"   dest="0"   />
     221  <link name="link_read_bloc_and_functionnal_unit"     src="3.0"   dest="0"   />
     222  <link name="link_read_bloc_and_functionnal_unit"     src="4.0"   dest="0"   />
     223  <link name="link_read_bloc_and_functionnal_unit"     src="5.0"   dest="0"   />
    221224  <link name="link_read_bloc_and_functionnal_unit"     src="0.1"   dest="0"   />
     225  <link name="link_read_bloc_and_functionnal_unit"     src="1.1"   dest="0"   />
     226  <link name="link_read_bloc_and_functionnal_unit"     src="2.1"   dest="1"   />
     227  <link name="link_read_bloc_and_functionnal_unit"     src="3.1"   dest="1"   />
     228  <link name="link_read_bloc_and_functionnal_unit"     src="4.1"   dest="1"   />
     229  <link name="link_read_bloc_and_functionnal_unit"     src="5.1"   dest="1"   />
    222230  <link name="link_read_bloc_and_functionnal_unit"     src="0.2"   dest="0"   />
    223   <link name="link_read_bloc_and_functionnal_unit"     src="1.0"   dest="1"   />
    224   <link name="link_read_bloc_and_functionnal_unit"     src="1.1"   dest="1"   />
    225   <link name="link_read_bloc_and_functionnal_unit"     src="1.2"   dest="1"   />
    226   <link name="link_read_bloc_and_functionnal_unit"     src="2.0"   dest="1"   />
    227   <link name="link_read_bloc_and_functionnal_unit"     src="2.1"   dest="1"   />
     231  <link name="link_read_bloc_and_functionnal_unit"     src="1.2"   dest="0"   />
    228232  <link name="link_read_bloc_and_functionnal_unit"     src="2.2"   dest="1"   />
    229   <link name="link_read_bloc_and_functionnal_unit"     src="3.0"   dest="1"   />
    230   <link name="link_read_bloc_and_functionnal_unit"     src="3.1"   dest="1"   />
    231233  <link name="link_read_bloc_and_functionnal_unit"     src="3.2"   dest="1"   />
     234  <link name="link_read_bloc_and_functionnal_unit"     src="4.2"   dest="1"   />
     235  <link name="link_read_bloc_and_functionnal_unit"     src="5.2"   dest="1"   />
     236  <link name="link_read_bloc_and_functionnal_unit"     src="0.3"   dest="0"   />
     237  <link name="link_read_bloc_and_functionnal_unit"     src="1.3"   dest="0"   />
     238  <link name="link_read_bloc_and_functionnal_unit"     src="2.3"   dest="1"   />
     239  <link name="link_read_bloc_and_functionnal_unit"     src="3.3"   dest="1"   />
     240  <link name="link_read_bloc_and_functionnal_unit"     src="4.3"   dest="1"   />
     241  <link name="link_read_bloc_and_functionnal_unit"     src="5.3"   dest="1"   />
     242  <link name="link_read_bloc_and_functionnal_unit"     src="0.4"   dest="0"   />
     243  <link name="link_read_bloc_and_functionnal_unit"     src="1.4"   dest="0"   />
     244  <link name="link_read_bloc_and_functionnal_unit"     src="2.4"   dest="1"   />
     245  <link name="link_read_bloc_and_functionnal_unit"     src="3.4"   dest="1"   />
     246  <link name="link_read_bloc_and_functionnal_unit"     src="4.4"   dest="1"   />
     247  <link name="link_read_bloc_and_functionnal_unit"     src="5.4"   dest="1"   />
    232248
    233249  <link name="link_write_bloc_with_load_store_unit"    src="0"     dest="0"   />
    234250
    235251  <link name="link_write_bloc_and_functionnal_unit"    src="0.0"   dest="0"   />
     252  <link name="link_write_bloc_and_functionnal_unit"    src="1.0"   dest="1"   />
     253  <link name="link_write_bloc_and_functionnal_unit"    src="2.0"   dest="0"   />
     254  <link name="link_write_bloc_and_functionnal_unit"    src="3.0"   dest="0"   />
     255  <link name="link_write_bloc_and_functionnal_unit"    src="4.0"   dest="0"   />
     256  <link name="link_write_bloc_and_functionnal_unit"    src="5.0"   dest="0"   />
     257
    236258  <link name="link_write_bloc_and_functionnal_unit"    src="0.1"   dest="0"   />
     259  <link name="link_write_bloc_and_functionnal_unit"    src="1.1"   dest="0"   />
     260  <link name="link_write_bloc_and_functionnal_unit"    src="2.1"   dest="1"   />
     261  <link name="link_write_bloc_and_functionnal_unit"    src="3.1"   dest="1"   />
     262  <link name="link_write_bloc_and_functionnal_unit"    src="4.1"   dest="1"   />
     263  <link name="link_write_bloc_and_functionnal_unit"    src="5.1"   dest="1"   />
     264
    237265  <link name="link_write_bloc_and_functionnal_unit"    src="0.2"   dest="0"   />
    238   <link name="link_write_bloc_and_functionnal_unit"    src="1.0"   dest="1"   />
    239   <link name="link_write_bloc_and_functionnal_unit"    src="1.1"   dest="1"   />
    240   <link name="link_write_bloc_and_functionnal_unit"    src="1.2"   dest="1"   />
    241   <link name="link_write_bloc_and_functionnal_unit"    src="2.0"   dest="1"   />
    242   <link name="link_write_bloc_and_functionnal_unit"    src="2.1"   dest="1"   />
     266  <link name="link_write_bloc_and_functionnal_unit"    src="1.2"   dest="0"   />
    243267  <link name="link_write_bloc_and_functionnal_unit"    src="2.2"   dest="1"   />
    244   <link name="link_write_bloc_and_functionnal_unit"    src="3.0"   dest="1"   />
    245   <link name="link_write_bloc_and_functionnal_unit"    src="3.1"   dest="1"   />
    246268  <link name="link_write_bloc_and_functionnal_unit"    src="3.2"   dest="1"   />
     269  <link name="link_write_bloc_and_functionnal_unit"    src="4.2"   dest="1"   />
     270  <link name="link_write_bloc_and_functionnal_unit"    src="5.2"   dest="1"   />
     271
     272  <link name="link_write_bloc_and_functionnal_unit"    src="0.3"   dest="0"   />
     273  <link name="link_write_bloc_and_functionnal_unit"    src="1.3"   dest="0"   />
     274  <link name="link_write_bloc_and_functionnal_unit"    src="2.3"   dest="1"   />
     275  <link name="link_write_bloc_and_functionnal_unit"    src="3.3"   dest="1"   />
     276  <link name="link_write_bloc_and_functionnal_unit"    src="4.3"   dest="1"   />
     277  <link name="link_write_bloc_and_functionnal_unit"    src="5.3"   dest="1"   />
     278
     279  <link name="link_write_bloc_and_functionnal_unit"    src="0.4"   dest="0"   />
     280  <link name="link_write_bloc_and_functionnal_unit"    src="1.4"   dest="0"   />
     281  <link name="link_write_bloc_and_functionnal_unit"    src="2.4"   dest="1"   />
     282  <link name="link_write_bloc_and_functionnal_unit"    src="3.4"   dest="1"   />
     283  <link name="link_write_bloc_and_functionnal_unit"    src="4.4"   dest="1"   />
     284  <link name="link_write_bloc_and_functionnal_unit"    src="5.4"   dest="1"   />
     285
     286  <link name="link_load_store_unit_with_thread"        src="0"     dest="0"   />
    247287
    248288  <link name="link_thread_and_functionnal_unit"        src="0.0"   dest="1"   />
    249289  <link name="link_thread_and_functionnal_unit"        src="0.1"   dest="1"   />
    250290  <link name="link_thread_and_functionnal_unit"        src="0.2"   dest="1"   />
     291  <link name="link_thread_and_functionnal_unit"        src="0.3"   dest="1"   />
     292  <link name="link_thread_and_functionnal_unit"        src="0.4"   dest="1"   />
    251293
    252294</core>
  • trunk/IPs/systemC/processor/Morpheo/Files/debug.sim

    r139 r145  
    2727                                                           
    2828  <parameter  name="debug_level"                            value="2"       />
    29   <parameter  name="debug_cycle_start"                      value="0"       />
    30   <parameter  name="debug_cycle_stop"                       value="0"       />
     29  <parameter  name="debug_cycle_start"                      value="200"     />
     30  <parameter  name="debug_cycle_stop"                       value="400"     />
    3131  <parameter  name="debug_nb_cycle"                         value="10000000"/>
    3232
     
    8282  <component  name="OOO_Engine"                             model="systemc" debug="0" />
    8383  <component  name="Context_State"                          model="systemc" debug="1" />
    84   <component  name="Decod"                                  model="systemc" debug="0" />
     84  <component  name="Decod"                                  model="systemc" debug="1" />
    8585  <component  name="Decod_queue"                            model="systemc" debug="1" />
    8686  <component  name="Decod_unit"                             model="systemc" debug="0" />
     
    100100  <component  name="Prediction_unit_Glue"                   model="systemc" debug="0" />
    101101  <component  name="Return_Address_Stack"                   model="systemc" debug="0" />
    102   <component  name="Update_Prediction_Table"                model="systemc" debug="0" />
     102  <component  name="Update_Prediction_Table"                model="systemc" debug="1" />
    103103  <component  name="Prediction_unit"                        model="systemc" debug="0" />
    104104  <component  name="Front_end"                              model="systemc" debug="0" />
  • trunk/IPs/systemC/processor/Morpheo/Script/distcc_env.sh

    r139 r145  
    3737    export DISTCC_HOSTS="${DISTCC_HOSTS} mi/8,lzo"       ; # serveur recherche               
    3838    export DISTCC_HOSTS="${DISTCC_HOSTS} fa/8,lzo"       ; # serveur recherche               
     39    export DISTCC_HOSTS="${DISTCC_HOSTS} fusion/8,lzo"   ; # serveur recherche               
     40    export DISTCC_HOSTS="${DISTCC_HOSTS} heavy/4,lzo"    ; # serveur recherche               
    3941   #export DISTCC_HOSTS="${DISTCC_HOSTS} berlioz/4,lzo"  ; # serveur enseignement - g++ 3.4.6
    4042    export DISTCC_HOSTS="${DISTCC_HOSTS} roll/4,lzo"     ; # serveur recherche               
     
    4446    export DISTCC_HOSTS="${DISTCC_HOSTS} eric/2,lzo"     ; # desktop
    4547    export DISTCC_HOSTS="${DISTCC_HOSTS} amouri/2,lzo"   ; # desktop
     48    export DISTCC_HOSTS="${DISTCC_HOSTS} nemu/2,lzo"     ; # desktop
    4649   #export DISTCC_HOSTS="${DISTCC_HOSTS} cherry/2,lzo"   ; # desktop
    4750    export DISTCC_HOSTS="${DISTCC_HOSTS} gamoudi/2,lzo"  ; # desktop
  • trunk/IPs/systemC/processor/Morpheo/Script/distexe_env.sh

    r139 r145  
    2727    export DISTEXE_HOSTS="${DISTEXE_HOSTS} bip/4"      ; # serveur recherche
    2828    export DISTEXE_HOSTS="${DISTEXE_HOSTS} bop/4"      ; # serveur recherche
    29     export DISTEXE_HOSTS="${DISTEXE_HOSTS} houla/8"    ; # serveur recherche
     29   #export DISTEXE_HOSTS="${DISTEXE_HOSTS} houla/8"    ; # serveur recherche
    3030    export DISTEXE_HOSTS="${DISTEXE_HOSTS} hop/8"      ; # serveur recherche
    3131    export DISTEXE_HOSTS="${DISTEXE_HOSTS} fox/2"      ; # serveur recherche
     
    3737    export DISTEXE_HOSTS="${DISTEXE_HOSTS} mi/2"       ; # serveur recherche               
    3838    export DISTEXE_HOSTS="${DISTEXE_HOSTS} fa/2"       ; # serveur recherche               
     39    export DISTEXE_HOSTS="${DISTEXE_HOSTS} fusion/2"   ; # serveur recherche               
     40    export DISTEXE_HOSTS="${DISTEXE_HOSTS} heavy/1"    ; # serveur recherche               
    3941   #export DISTEXE_HOSTS="${DISTEXE_HOSTS} berlioz/1"  ; # serveur enseignement - g++ 3.4.6
    4042    export DISTEXE_HOSTS="${DISTEXE_HOSTS} roll/1"     ; # serveur recherche               
    4143   #export DISTEXE_HOSTS="${DISTEXE_HOSTS} rock/1"     ; # serveur recherche    - g++ 3.4.6
    4244    export DISTEXE_HOSTS="${DISTEXE_HOSTS} waller/1"   ; # desktop
    43     export DISTEXE_HOSTS="${DISTEXE_HOSTS} lin/1"      ; # desktop
    44     export DISTEXE_HOSTS="${DISTEXE_HOSTS} eric/1"     ; # desktop
    45     export DISTEXE_HOSTS="${DISTEXE_HOSTS} amouri/1"   ; # desktop
    46    #export DISTEXE_HOSTS="${DISTEXE_HOSTS} cherry/1"   ; # desktop
    47     export DISTEXE_HOSTS="${DISTEXE_HOSTS} gamoudi/1"  ; # desktop
     45  # export DISTEXE_HOSTS="${DISTEXE_HOSTS} lin/1"      ; # desktop
     46  # export DISTEXE_HOSTS="${DISTEXE_HOSTS} eric/1"     ; # desktop
     47  # export DISTEXE_HOSTS="${DISTEXE_HOSTS} amouri/1"   ; # desktop
     48    export DISTEXE_HOSTS="${DISTEXE_HOSTS} nemu/1"     ; # desktop
     49  ##export DISTEXE_HOSTS="${DISTEXE_HOSTS} cherry/1"   ; # desktop
     50  # export DISTEXE_HOSTS="${DISTEXE_HOSTS} gamoudi/1"  ; # desktop
    4851   #export DISTEXE_HOSTS="${DISTEXE_HOSTS} grunge/1"   ; # desktop
    4952   #export DISTEXE_HOSTS="${DISTEXE_HOSTS} mitra/1"    ; # desktop
  • trunk/IPs/systemC/processor/Morpheo/Script/version.sh

    r138 r145  
    77function usage ()
    88{
    9     echo "Usage              : ${0} action";
    10     echo "Arguments          : ";
     9    echo "Usage                    : ${0} action";
     10    echo "Arguments                : ";
    1111    echo " * action";       
    12     echo "   * add           : add all file unpresent in project and set proprity";
    13     echo "   * commit        : update revision number and commit";
    14     echo "   * status        : print only locally modified items";
    15     echo "   * status_new    : print only locally new      items";
    16     echo "   * status_delete : print only locally new      items";
    17     echo "   * help          : print this message";
    18     echo "Note               :";
     12    echo "   * add                 : add all file unpresent in project and set proprity";
     13    echo "   * commit              : update revision number and commit";
     14    echo "   * status              : print only locally modified items";
     15    echo "   * status_new          : print only locally new      items";
     16    echo "   * status_delete       : print only locally new      items";
     17    echo "   * local_status_new    : print only locally new      items";
     18    echo "   * local_status_delete : print only locally new      items";
     19    echo "   * help                : print this message";
     20    echo "Note                     :";
    1921    echo " * Morpheo's environnement must be positionned.";
    2022    exit;
     
    9698            cd ${pwd};
    9799            ;;
     100
     101        "local_status_new")
     102            #cd ${MORPHEO_TOPLEVEL};
     103
     104            svn status | grep '?';
     105
     106            #cd ${pwd};
     107            ;;
     108
     109        "local_status_delete")
     110            #cd ${MORPHEO_TOPLEVEL};
     111
     112            svn status | grep '!';
     113
     114            #cd ${pwd};
     115            ;;
    98116           
    99117        "help")
  • trunk/IPs/systemC/processor/Morpheo/Script/xilinx_extract_info.sh

    r138 r145  
    3434    summary_line_end=$(grep -n "Partition Resource Summary:"   ${1} | cut -d : -f 1);
    3535
    36     head -n $(($summary_line_end-1)) ${1} | tail -n $(($summary_line_end-$summary_line_begin));
     36    if test "${summary_line_begin}" != "" -a "${summary_line_end}" != ""; then
     37        head -n $(($summary_line_end-1)) ${1} | tail -n $(($summary_line_end-$summary_line_begin));
     38    fi;
    3739}
    3840
     
    4345    timing_line_end=$(grep -n "Timing Detail:"                 ${1} | cut -d : -f 1);
    4446
    45     head -n $(($timing_line_end-1))  ${1} | tail -n $(($timing_line_end-$timing_line_begin));
     47    if test "${timing_line_begin}" != "" -a "${timing_line_end}" != ""; then
     48        head -n $(($timing_line_end-1))  ${1} | tail -n $(($timing_line_end-$timing_line_begin));
     49    fi;
    4650}
    4751
     
    6670    done
    6771
    68     echo $nb_params;
    6972    if test $nb_params -eq 0; then
    7073        files="*.fpga.log";
  • trunk/IPs/systemC/processor/Morpheo/TopLevel/include/Morpheo.h

    r110 r145  
    2828#endif
    2929#include "Behavioural/include/Usage.h"
     30// #include "Behavioural/include/Function_pointer.h"
    3031
    3132#include "Common/include/ToString.h"
     
    5657  private   : behavioural::Component                             * _component;
    5758  private   : behavioural::Interfaces                            * _interfaces;
     59  // private   : behavioural::Function_pointer                      * _function_pointer;
    5860
    5961    // -----[ interface parameters ]--------------------------------------
  • trunk/IPs/systemC/processor/Morpheo/TopLevel/src/Morpheo_allocation.cpp

    r112 r145  
    2424    log_begin(Morpheo,FUNCTION);
    2525
     26    // _function_pointer = new behavioural::Function_pointer();
     27
    2628    _component = new behavioural::Component (_usage);
    2729
     
    136138#endif
    137139         ,_param_core
    138          ,_usage);
     140         ,_usage
     141         // ,_function_pointer
     142         );
    139143     
    140144      _component->set_component (_component_core->_component
  • trunk/IPs/systemC/processor/Morpheo/TopLevel/src/Morpheo_deallocation.cpp

    r123 r145  
    5959    delete _component_core;
    6060    delete _component;
     61    // delete _function_pointer;
    6162
    6263    log_end(Morpheo,FUNCTION);
  • trunk/Platforms/Test/Makefile

    r142 r145  
    3434PRIORITY                        = 0
    3535endif
    36 
    3736ifeq ($(flavor CLEAN), undefined)
    3837CLEAN                           = 0
     
    185184                                for log in $(LOGS); do                                                  \
    186185                                        $(ECHO) -n ".";                                                 \
    187                                         $(ECHO) -n "source $(MORPHEO_TOPLEVEL)/environment.sh $(MORPHEO_LOCALIZATION); path=\"${PWD}\"; " >> $(SCRIPT);\
     186                                        $(ECHO) -n "source $(MORPHEO_TOPLEVEL)/environment.sh -l $(MORPHEO_LOCALIZATION) -t $(MORPHEO_TYPE); path=\"${PWD}\"; " >> $(SCRIPT);\
    188187                                        if $(TEST) $(CLEAN) -ne 0; then                                 \
    189188                                                $(ECHO) -n "$(RM) $${log}; " >> $(SCRIPT);              \
     
    300299                                $(ECHO) " * debug               : cf 'make run DATA=debug'";\
    301300                                $(ECHO) " * bench               : cf 'make run DATA=bench'";\
    302                                 $(ECHO) " * distexe             : Generate an command file to distexe. It's as run command, but just generate an script with all make";\
     301                                $(ECHO) " * distexe             : Generate an command file to distexe (\"$(SCRIPT)\").";\
     302                                $(ECHO) "                         This file can be use with distexe or just run in local machine.";\
    303303                                $(ECHO) " * cfg                 : For each configuration in \"${PATH_CFG}\", create basic test";\
    304304                                $(ECHO) " * lib                 : make library";\
  • trunk/Platforms/Test/data/debug/debug.cfg

    r142 r145  
    22${MORPHEO_TOPLEVEL}/IPs/systemC/processor/Morpheo/Files/Morpheo.gen
    33${MORPHEO_TOPLEVEL}/IPs/systemC/processor/Morpheo/Files/debug.cfg
    4 ${MORPHEO_TOPLEVEL}/Softwares/Test/Test_011/bin/soft_NEWLIB_MORPHEO.x
     4${MORPHEO_TOPLEVEL}/Softwares/Test/Test_074/bin/soft_NEWLIB_MORPHEO.x
    550
    660
  • trunk/Platforms/Test/script/copy_test.sh

    r139 r145  
    1010{
    1111    # Test usage
    12     if   test ${#} -eq 2; then
     12    if test ${#} -eq 2; then
    1313        name_src=${1};
    1414        name_dest=${2};
  • trunk/Platforms/Test/src/sc_main.cpp

    r142 r145  
    5555#endif
    5656
    57   msgInformation(" ");
     57  msgInformation("Command line : ");
    5858  for (int32_t i=0; i<argc; ++i)
    5959    msg("%s ",argv[i]);
  • trunk/Platforms/Test/src/test.cpp

    r138 r145  
    141141      if (cache_size<(cache_size_line*cache_size_word))
    142142        {
    143           msgError("cache is too small\n");
     143          msgError("Cache is too small\n");
    144144          exit(EXIT_FAILURE);
    145145        }
  • trunk/Softwares/SPECINT2000/Makefile.defs

    r138 r145  
    88
    99NB_THREAD_MAX           = 1
     10
     11#BENCHS                 = 164.gzip 175.vpr 176.gcc 181.mcf 255.vortex 256.bzip2 300.twolf
    1012
    1113BENCHS                  = 175.vpr
  • trunk/Softwares/SPECINT2000/src/include/workload.h

    r138 r145  
    1212void (*WorkLoad[])() =
    1313{
    14         (void *) run_175_vpr
     14        (void *) run_300_twolf
    1515};
    1616
  • trunk/Softwares/SPECINT2000/workload.txt

    r138 r145  
    1 soft_NEWLIB_MORPHEO_0.x :  175_vpr
     1soft_UNIX_EV67_0.x :  300_twolf
  • trunk/Softwares/Test/Test_074/src/c/main.c

    r139 r145  
    1111/* #define TEST_ERROR */
    1212
    13 #define NB_ITERATION 1000
     13#define NB_ITERATION 50
    1414
    1515//=====[ my_rand ]==============================================================
  • trunk/Version

    r144 r145  
    1 0 2 144 Castor 28 09 2010
     10 2 145 Castor 13 10 2010
Note: See TracChangeset for help on using the changeset viewer.