- Timestamp:
- Jul 15, 2009, 10:41:01 AM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Instruction/include/Types.h
r88 r134 55 55 Texception_t _exception ; 56 56 Tbranch_condition_t _branch_condition ; 57 // 57 // Tcontrol_t _branch_stack_write; 58 58 Tcontrol_t _branch_direction ; 59 59 Tevent_type_t _event_type ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_genMealy.cpp
r124 r134 101 101 Tgeneral_data_t addr = PORT_READ(in_IFETCH_ADDRESS [x])+y; 102 102 103 _decod_instruction->_instruction = PORT_READ(in_IFETCH_INSTRUCTION [x][y]); 104 _decod_instruction->_context_id = x; 105 _decod_instruction->_address_previous = internal_CONTEXT_ADDRESS_PREVIOUS [x]; 106 _decod_instruction->_address = addr; //Compute the current address 107 _decod_instruction->_address_next = addr+1; 108 _decod_instruction->_is_delay_slot = internal_CONTEXT_IS_DELAY_SLOT [x]; 103 _decod_instruction->_instruction = PORT_READ(in_IFETCH_INSTRUCTION [x][y]); 104 _decod_instruction->_context_id = x; 105 _decod_instruction->_address_previous = internal_CONTEXT_ADDRESS_PREVIOUS [x]; 106 _decod_instruction->_address = addr; //Compute the current address 107 _decod_instruction->_address_next = addr+1; 108 _decod_instruction->_is_delay_slot = internal_CONTEXT_IS_DELAY_SLOT [x]; 109 _decod_instruction->_type = 0; // not necessary 110 _decod_instruction->_operation = 0; // not necessary 111 _decod_instruction->_no_execute = 0; // not necessary 112 _decod_instruction->_has_immediat = 0; // not necessary 113 _decod_instruction->_immediat = 0; // not necessary 114 _decod_instruction->_read_ra = 0; // not necessary 115 _decod_instruction->_num_reg_ra = 0; // not necessary 116 _decod_instruction->_read_rb = 0; // not necessary 117 _decod_instruction->_num_reg_rb = 0; // not necessary 118 _decod_instruction->_read_rc = 0; // not necessary 119 _decod_instruction->_num_reg_rc = 0; // not necessary 120 _decod_instruction->_write_rd = 0; // not necessary 121 _decod_instruction->_num_reg_rd = 0; // not necessary 122 _decod_instruction->_write_re = 0; // not necessary 123 _decod_instruction->_num_reg_re = 0; // not necessary 124 _decod_instruction->_exception_use = EXCEPTION_USE_NONE; // not necessary 125 _decod_instruction->_exception = EXCEPTION_DECOD_NONE; // not necessary 126 _decod_instruction->_branch_condition = 0; // not necessary 127 // _decod_instruction->_branch_stack_write = 0; // not necessary 128 _decod_instruction->_branch_direction = 0; // not necessary 129 _decod_instruction->_event_type = EVENT_TYPE_NONE; // not necessary 130 131 109 132 110 133 // Test IFetch exception … … 181 204 // Branch predictor can accept : the depth is valid 182 205 log_printf(TRACE,Decod,FUNCTION," * context_depth_val : %d",PORT_READ(in_CONTEXT_DEPTH_VAL [x])); 206 183 207 decod_val [i] &= PORT_READ(in_CONTEXT_DEPTH_VAL [x]); 184 208 ifetch_ack [x][y] &= PORT_READ(in_CONTEXT_DEPTH_VAL [x]); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp
r124 r134 248 248 249 249 #if defined(DEBUG) and defined(DEBUG_Update_Prediction_Table) and (DEBUG_Update_Prediction_Table == true) 250 directory_init (); 251 252 branchement_log_file = new std::ofstream [_param->_nb_thread]; 253 for (uint32_t i=0; i<_param->_nb_thread; ++i) 254 if (_param->_have_thread [i]) 255 { 256 std::string filename = morpheo::filename(MORPHEO_LOG, 257 "Branchement_prediction-thread_"+toString(i), 258 "", 259 "log", 260 _simulation_file_with_date, 261 _simulation_file_with_pid, 262 true); 263 264 branchement_log_file [i] .open(filename.c_str() ,std::ios::out | std::ios::trunc); 265 } 250 if (log_file_generate) 251 { 252 directory_init (); 253 254 branchement_log_file = new std::ofstream [_param->_nb_thread]; 255 for (uint32_t i=0; i<_param->_nb_thread; ++i) 256 if (_param->_have_thread [i]) 257 { 258 std::string filename = morpheo::filename(MORPHEO_LOG, 259 "Branchement_prediction-thread_"+toString(i), 260 "", 261 "log", 262 _simulation_file_with_date, 263 _simulation_file_with_pid, 264 true); 265 266 branchement_log_file [i] .open(filename.c_str() ,std::ios::out | std::ios::trunc); 267 } 268 } 266 269 #endif 267 270 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_deallocation.cpp
r128 r134 172 172 173 173 #if defined(DEBUG) and defined(DEBUG_Update_Prediction_Table) and (DEBUG_Update_Prediction_Table == true) 174 { 175 for (uint32_t i=0; i<_param->_nb_thread; ++i) 176 if (_param->_have_thread [i]) 177 { 178 branchement_log_file [i].close(); 179 } 180 delete [] branchement_log_file; 181 } 174 if (log_file_generate) 175 { 176 for (uint32_t i=0; i<_param->_nb_thread; ++i) 177 if (_param->_have_thread [i]) 178 { 179 branchement_log_file [i].close(); 180 } 181 delete [] branchement_log_file; 182 } 182 183 #endif 183 184 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp
r128 r134 149 149 { 150 150 #if defined(DEBUG) and defined(DEBUG_Update_Prediction_Table) and (DEBUG_Update_Prediction_Table == true) 151 if (reg_UPDATE_PREDICTION_TABLE [i][bottom]._retire_ok) 152 { 153 uint32_t num_thread = _param->_translate_num_context_to_num_thread [i]; 154 branchement_log_file [num_thread] 155 << std::hex 156 << "0x" << std::setfill('0') << std::setw(_param->_size_general_data/4) << reg_UPDATE_PREDICTION_TABLE [i][bottom]._address_src << " " 157 << "0x" << std::setfill('0') << std::setw(_param->_size_general_data/4) << reg_UPDATE_PREDICTION_TABLE [i][bottom]._address_dest << " " 158 << std::dec 159 << reg_UPDATE_PREDICTION_TABLE [i][bottom]._good_take << " - " 160 << "[" << simulation_cycle() << "] " << " " 161 << reg_UPDATE_PREDICTION_TABLE [i][bottom]._miss_prediction << " " 162 << reg_UPDATE_PREDICTION_TABLE [i][bottom]._ifetch_prediction << " " 163 << "(" << toString(reg_UPDATE_PREDICTION_TABLE [i][bottom]._condition) << ")" 164 << std::endl; 165 } 151 if (log_file_generate) 152 if (reg_UPDATE_PREDICTION_TABLE [i][bottom]._retire_ok) 153 { 154 uint32_t num_thread = _param->_translate_num_context_to_num_thread [i]; 155 branchement_log_file [num_thread] 156 << std::hex 157 << "0x" << std::setfill('0') << std::setw(_param->_size_general_data/4) << reg_UPDATE_PREDICTION_TABLE [i][bottom]._address_src << " " 158 << "0x" << std::setfill('0') << std::setw(_param->_size_general_data/4) << reg_UPDATE_PREDICTION_TABLE [i][bottom]._address_dest << " " 159 << std::dec 160 << reg_UPDATE_PREDICTION_TABLE [i][bottom]._good_take << " - " 161 << "[" << simulation_cycle() << "] " << " " 162 << reg_UPDATE_PREDICTION_TABLE [i][bottom]._miss_prediction << " " 163 << reg_UPDATE_PREDICTION_TABLE [i][bottom]._ifetch_prediction << " " 164 << "(" << toString(reg_UPDATE_PREDICTION_TABLE [i][bottom]._condition) << ")" 165 << std::endl; 166 } 166 167 #endif 167 168
Note: See TracChangeset
for help on using the changeset viewer.