Changeset 139 for 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
- Timestamp:
- Jul 30, 2010, 4:47:27 PM (14 years ago)
- 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 20 20 21 21 #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) 24 24 { 25 25 log_begin(Register_Address_Translation_unit,FUNCTION); … … 37 37 rat_gpr_speculative_valid [i][j][0] = false; 38 38 rat_gpr_speculative [i][j][0] = 0 ; // not necessary 39 rat_gpr_update_table [i][j][0] = false; // not necessary40 39 41 40 for (uint32_t k=1; k<_param->_nb_general_register_logic; k++) … … 44 43 rat_gpr_speculative_valid [i][j][k] = false; 45 44 rat_gpr_speculative [i][j][k] = 0 ; // not necessary 46 rat_gpr_update_table [i][j][k] = false; // not necessary47 45 } 48 46 for (uint32_t k=0; k<_param->_nb_special_register_logic; k++) … … 51 49 rat_spr_speculative_valid [i][j][k] = false; 52 50 rat_spr_speculative [i][j][k] = 0 ; // not necessary 53 rat_spr_update_table [i][j][k] = false; // not necessary54 51 } 55 52 } … … 70 67 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * Reset Update Table"); 71 68 72 // Reset update_table andvalidity table69 // Reset validity table 73 70 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; 78 72 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; 83 74 } 84 75 … … 149 140 Tcontrol_t write_rd = PORT_READ(in_RETIRE_WRITE_RD [i]); 150 141 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]); 152 143 153 144 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * front_end_id : %d",front_end_id); … … 157 148 // Test if write and have not a previous update 158 149 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) 160 151 { 161 152 Tgeneral_address_t num_reg_rd_log = PORT_READ(in_RETIRE_NUM_REG_RD_LOG [i]); … … 171 162 rat_gpr_not_speculative [front_end_id][context_id][num_reg_rd_log] = num_reg_rd_phy_new; 172 163 } 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;179 164 } 180 165 181 166 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) 183 168 { 184 169 Tspecial_address_t num_reg_re_log = PORT_READ(in_RETIRE_NUM_REG_RE_LOG [i]); … … 194 179 rat_spr_not_speculative [front_end_id][context_id][num_reg_re_log] = num_reg_re_phy_new; 195 180 } 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;202 181 } 203 182 … … 224 203 break; 225 204 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]); 227 206 } 228 207 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * %s",str.c_str()); … … 239 218 break; 240 219 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]); 242 221 } 243 222 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * %s",str.c_str()); … … 281 260 #endif 282 261 283 #if defined(STATISTICS) or defined(VHDL_TESTBENCH)284 end_cycle ();285 #endif286 287 262 log_end(Register_Address_Translation_unit,FUNCTION); 288 263 };
Note: See TracChangeset
for help on using the changeset viewer.