Changeset 104 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_transition.cpp
- Timestamp:
- Jan 21, 2009, 10:53:13 PM (15 years ago)
- File:
-
- 1 edited
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_transition.cpp
r100 r104 60 60 if (PORT_READ(in_INSERT_VAL [i]) and internal_INSERT_ACK [i]) 61 61 { 62 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * INSERT [%d]",i); 63 62 64 Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_RENAME_FRONT_END_ID [i]):0; 63 65 Tcontext_t context_id = (_param->_have_port_context_id )?PORT_READ(in_RENAME_CONTEXT_ID [i]):0; … … 71 73 72 74 // ===================================================== 75 // ====[ RETIRE_EVENT ]================================= 76 // ===================================================== 77 for (uint32_t i=0; i<_param->_nb_front_end; ++i) 78 for (uint32_t j=0; j<_param->_nb_context[i]; ++j) 79 if (PORT_READ(in_RETIRE_EVENT_VAL [i][j]) and internal_RETIRE_EVENT_ACK [i][j]) 80 // Test if event have just occure 81 if (PORT_READ(in_RETIRE_EVENT_STATE [i][j]) == EVENT_STATE_EVENT) 82 { 83 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * Reset Update Table"); 84 85 // Reset update_table 86 for (uint32_t k=0; k<_param->_nb_general_register_logic; k++) 87 rat_gpr_update_table [i][j][k] = 0; 88 for (uint32_t k=0; k<_param->_nb_special_register_logic; k++) 89 rat_spr_update_table [i][j][k] = 0; 90 } 91 92 // ===================================================== 73 93 // ====[ RETIRE ]======================================= 74 94 // ===================================================== … … 78 98 if (PORT_READ(in_RETIRE_VAL [i]) and internal_RETIRE_ACK [i]) 79 99 { 100 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * RETIRE [%d]",i); 101 80 102 // if no event : no effect, because the RAT content the most recently register 81 103 // but if they have a event (exception or miss speculation), the rat must restore the oldest value 82 104 // 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 83 105 // the retire interface became of the Re Order Buffer, also is in program sequence ! 84 if (PORT_READ(in_RETIRE_EVENT_STATE [i]) != EVENT_STATE_NO_EVENT) 106 107 Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_RETIRE_FRONT_END_ID [i]):0; 108 Tcontext_t context_id = (_param->_have_port_context_id )?PORT_READ(in_RETIRE_CONTEXT_ID [i]):0; 109 Tevent_state_t event_state = PORT_READ(in_RETIRE_EVENT_STATE [front_end_id][context_id]); 110 111 if (event_state != EVENT_STATE_NO_EVENT) 85 112 { 86 Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_RETIRE_FRONT_END_ID [i]):0; 87 Tcontext_t context_id = (_param->_have_port_context_id )?PORT_READ(in_RETIRE_CONTEXT_ID [i]):0; 88 89 // Test if event have just occure 90 if (PORT_READ(in_RETIRE_EVENT_STATE [i]) == EVENT_STATE_EVENT) 91 { 92 // Reset update_table 93 for (uint32_t j=0; j<_param->_nb_general_register_logic; j++) 94 rat_gpr_update_table[front_end_id][context_id][j] = 0; 95 for (uint32_t j=0; j<_param->_nb_special_register_logic; j++) 96 rat_spr_update_table[front_end_id][context_id][j] = 0; 97 } 113 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * front_end_id : %d",front_end_id); 114 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * context_id : %d",context_id); 115 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * event_state : %d",event_state); 98 116 99 117 // Test if write and have not a previous update … … 102 120 Tgeneral_address_t rd_log = PORT_READ(in_RETIRE_NUM_REG_RD_LOG [i]); 103 121 104 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * retire[%d]",i); 105 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * front_end_id : %d",front_end_id); 106 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * context_id : %d",context_id ); 107 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * rd_log : %d",rd_log ); 122 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * retire RD"); 123 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * rd_log : %d",rd_log); 108 124 109 125 // if (RETIRE_RESTORE_RD_PHY_OLD [i]) 110 if (rat_gpr_update_table [front_end_id][context_id][rd_log] == 0)111 { 112 rat_gpr [front_end_id][context_id][rd_log] = PORT_READ(in_RETIRE_NUM_REG_RD_PHY_OLD [i]);113 rat_gpr_update_table [front_end_id][context_id][rd_log] = 1;126 if (rat_gpr_update_table [front_end_id][context_id][rd_log] == 0) 127 { 128 rat_gpr [front_end_id][context_id][rd_log] = PORT_READ(in_RETIRE_NUM_REG_RD_PHY_OLD [i]); 129 rat_gpr_update_table [front_end_id][context_id][rd_log] = 1; 114 130 } 115 131 } … … 119 135 Tspecial_address_t re_log = PORT_READ(in_RETIRE_NUM_REG_RE_LOG [i]); 120 136 137 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * retire RE"); 138 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * re_log : %d",re_log); 139 121 140 // if (RETIRE_RESTORE_RE_PHY_OLD [i]) 122 if (rat_spr_update_table [front_end_id][context_id][re_log] == 0)123 { 124 rat_spr [front_end_id][context_id][re_log] = PORT_READ(in_RETIRE_NUM_REG_RE_PHY_OLD [i]);125 rat_spr_update_table [front_end_id][context_id][re_log] = 1;141 if (rat_spr_update_table [front_end_id][context_id][re_log] == 0) 142 { 143 rat_spr [front_end_id][context_id][re_log] = PORT_READ(in_RETIRE_NUM_REG_RE_PHY_OLD [i]); 144 rat_spr_update_table [front_end_id][context_id][re_log] = 1; 126 145 } 127 146 }
Note: See TracChangeset
for help on using the changeset viewer.