Ignore:
Timestamp:
Jul 30, 2010, 4:47:27 PM (14 years ago)
Author:
rosiere
Message:
  • Add test for all configuration
  • RAT : add rat scheme (depth_save)
File:
1 moved

Legend:

Unmodified
Added
Removed
  • 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

    r137 r139  
    2020
    2121#undef  FUNCTION
    22 #define FUNCTION "Register_Address_Translation_unit::transition"
    23   void Register_Address_Translation_unit::transition (void)
     22#define FUNCTION "Register_Address_Translation_unit::function_one_save_transition"
     23  void Register_Address_Translation_unit::function_one_save_transition (void)
    2424  {
    2525    log_begin(Register_Address_Translation_unit,FUNCTION);
     
    3737              rat_gpr_speculative_valid [i][j][0] = false;
    3838              rat_gpr_speculative       [i][j][0] = 0    ; // not necessary
    39               rat_gpr_update_table      [i][j][0] = false; // not necessary
    4039
    4140              for (uint32_t k=1; k<_param->_nb_general_register_logic; k++)
     
    4443                  rat_gpr_speculative_valid  [i][j][k] = false;
    4544                  rat_gpr_speculative        [i][j][k] = 0    ; // not necessary
    46                   rat_gpr_update_table       [i][j][k] = false; // not necessary
    4745                }
    4846              for (uint32_t k=0; k<_param->_nb_special_register_logic; k++)
     
    5149                  rat_spr_speculative_valid  [i][j][k] = false;
    5250                  rat_spr_speculative        [i][j][k] = 0    ; // not necessary
    53                   rat_spr_update_table       [i][j][k] = false; // not necessary
    5451                }
    5552            }
     
    7067                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * Reset Update Table");
    7168                 
    72                   // Reset update_table and validity table
     69                  // Reset validity table
    7370                  for (uint32_t k=0; k<_param->_nb_general_register_logic; k++)
    74                     {
    75                       rat_gpr_update_table      [i][j][k] = false;
    76                       rat_gpr_speculative_valid [i][j][k] = false;
    77                     }
     71                    rat_gpr_speculative_valid [i][j][k] = false;
    7872                  for (uint32_t k=0; k<_param->_nb_special_register_logic; k++)
    79                     {
    80                       rat_spr_update_table      [i][j][k] = false;
    81                       rat_spr_speculative_valid [i][j][k] = false;
    82                     }
     73                    rat_spr_speculative_valid [i][j][k] = false;
    8374                }
    8475
     
    149140              Tcontrol_t write_rd     = PORT_READ(in_RETIRE_WRITE_RD [i]);
    150141              Tcontrol_t write_re     = PORT_READ(in_RETIRE_WRITE_RE [i]);
    151               Tcontrol_t restore      = internal_RETIRE_RESTORE [i];
     142              Tcontrol_t restore      = PORT_READ(in_RETIRE_RESTORE  [i]);
    152143
    153144              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * front_end_id       : %d",front_end_id);
     
    157148              // Test if write and have not a previous update
    158149              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * write_rd           : %d",write_rd);
    159               if (PORT_READ(in_RETIRE_WRITE_RD [i]) == 1)
     150              if (write_rd == 1)
    160151                {
    161152                  Tgeneral_address_t num_reg_rd_log     = PORT_READ(in_RETIRE_NUM_REG_RD_LOG     [i]);
     
    171162                  rat_gpr_not_speculative [front_end_id][context_id][num_reg_rd_log] = num_reg_rd_phy_new;
    172163                    }
    173 
    174                   Tcontrol_t         restore_rd         = internal_RETIRE_RESTORE_RD_PHY_OLD [i];
    175                   log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * restore_rd         : %d",restore_rd        );
    176                      
    177                   if (restore_rd)
    178                   rat_gpr_update_table    [front_end_id][context_id][num_reg_rd_log] = true;
    179164                }
    180165
    181166              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * write_re           : %d",write_re);
    182               if (PORT_READ(in_RETIRE_WRITE_RE [i]) == 1)
     167              if (write_re == 1)
    183168                {
    184169                  Tspecial_address_t num_reg_re_log     = PORT_READ(in_RETIRE_NUM_REG_RE_LOG     [i]);
     
    194179                  rat_spr_not_speculative [front_end_id][context_id][num_reg_re_log] = num_reg_re_phy_new;
    195180                    }
    196 
    197                   Tcontrol_t         restore_re         = internal_RETIRE_RESTORE_RE_PHY_OLD [i];
    198                   log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * restore_re         : %d",restore_re        );
    199                      
    200                   if (restore_re)
    201                   rat_spr_update_table    [front_end_id][context_id][num_reg_re_log] = true;
    202181                }
    203182
     
    224203                      break;
    225204                    else
    226                       str+=toString("GPR[%.4d] - %.1d %.5d (%.5d) %.1d | ",index,rat_gpr_speculative_valid [i][j][index],rat_gpr_speculative [i][j][index],rat_gpr_not_speculative [i][j][index],rat_gpr_update_table[i][j][index]);
     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]);
    227206                  }
    228207                log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * %s",str.c_str());
     
    239218                      break;
    240219                    else
    241                       str+=toString("SPR[%.4d] - %.1d %.5d (%.5d) %.1d | ",index,rat_spr_speculative_valid [i][j][index],rat_spr_speculative [i][j][index],rat_spr_not_speculative [i][j][index],rat_spr_update_table[i][j][index]);
     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]);
    242221                  }
    243222                log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * %s",str.c_str());
     
    281260#endif
    282261
    283 #if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    284     end_cycle ();
    285 #endif
    286 
    287262    log_end(Register_Address_Translation_unit,FUNCTION);
    288263  };
Note: See TracChangeset for help on using the changeset viewer.