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/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit
Files:
4 added
24 edited
23 moved

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.