- Timestamp:
- Jun 17, 2009, 2:11:25 PM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_transition.cpp
r123 r124 20 20 #define MANAGE_EVENT MANAGE_EVENT_NO_WAIT 21 21 22 #define PRIORITY_MISS_LOAD 3 23 #define PRIORITY_MISS_BRANCH 2 24 #define PRIORITY_EXCEPTION 1 25 #define PRIORITY_NONE 0 26 22 27 #define get_priority(x) \ 23 28 (((state == CONTEXT_STATE_KO_MISS_LOAD_ADDR ) or \ … … 25 30 (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR ) or \ 26 31 (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAITEND ) or \ 27 (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE))? 3: \32 (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE))?PRIORITY_MISS_LOAD: \ 28 33 (((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR ) or \ 29 34 (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND ) or \ 30 (state == CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE ))? 2: \31 ((state == EVENT_TYPE_EXCEPTION)? 1: \35 (state == CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE ))?PRIORITY_MISS_BRANCH: \ 36 ((state == EVENT_TYPE_EXCEPTION)?PRIORITY_EXCEPTION: \ 32 37 0))) 33 38 … … 299 304 // priority : miss_load > miss_branch > excep > spr/sync 300 305 uint8_t priority0 = get_priority(state); 301 uint8_t priority1 = 2; // miss306 uint8_t priority1 = PRIORITY_MISS_BRANCH; // miss 302 307 303 308 // is_valid = can modify local information … … 306 311 bool is_valid = ((state == CONTEXT_STATE_OK) or 307 312 (state == CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE) or 308 313 // (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE) or 309 314 (depth1< depth0) or 310 315 ((depth1==depth0) and (priority1>=priority0))); // >= because another branch can be a miss prediction with same depth 316 317 bool is_invalid = priority0 == PRIORITY_MISS_LOAD; 311 318 312 319 #ifdef DEBUG_TEST … … 327 334 log_printf(TRACE,Context_State,FUNCTION," * is_valid : %d",is_valid ); 328 335 329 if (is_valid )336 if (is_valid and not is_invalid) 330 337 { 331 338 // reg_STATE [i] = CONTEXT_STATE_KO_MISS_BRANCH_ADDR; … … 333 340 if (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE) 334 341 { 342 // #if (MANAGE_EVENT == MANAGE_EVENT_NO_WAIT) 343 // reg_STATE [i] = CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR; 344 // #else 335 345 reg_STATE [i] = CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAITEND; 346 // #endif 336 347 } 337 348 else … … 346 357 reg_STATE [i] = CONTEXT_STATE_KO_MISS_BRANCH_ADDR; 347 358 else 348 reg_STATE [i] = CONTEXT_STATE_KO_MISS_BRANCH_WAITEND; 359 { 360 // #if (MANAGE_EVENT == MANAGE_EVENT_NO_WAIT) 361 // reg_STATE [i] = CONTEXT_STATE_KO_MISS_BRANCH_ADDR; 362 // #else 363 reg_STATE [i] = CONTEXT_STATE_KO_MISS_BRANCH_WAITEND; 364 // #endif 365 } 349 366 350 367 reg_EVENT_ADDRESS [i] = PORT_READ(in_BRANCH_EVENT_ADDRESS_SRC [i])+1; // address delay slot … … 386 403 // priority : miss_load > miss_branch > excep > spr/sync 387 404 uint8_t priority0 = get_priority(state); 388 uint8_t priority1 = 2; // miss405 uint8_t priority1 = PRIORITY_MISS_BRANCH; // miss 389 406 390 407 // is_valid = can modify local information … … 440 457 // miss_load > miss_branch > excep > spr/sync 441 458 uint8_t priority0 = get_priority(state); 442 uint8_t priority1 = (state == EVENT_TYPE_EXCEPTION)? 1:0;459 uint8_t priority1 = (state == EVENT_TYPE_EXCEPTION)?PRIORITY_EXCEPTION:PRIORITY_NONE; 443 460 444 461 // is_valid = can modify local information … … 623 640 case CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAITEND : 624 641 { 642 // #if (MANAGE_EVENT == MANAGE_EVENT_NO_WAIT) 643 // state_next = CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR; 644 // #else 625 645 state_next = CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAITEND; 646 // #endif 626 647 break; 627 648 } 628 649 default : 629 650 { 651 // #if (MANAGE_EVENT == MANAGE_EVENT_NO_WAIT) 652 // state_next = CONTEXT_STATE_KO_MISS_LOAD_ADDR; 653 // #else 630 654 state_next = CONTEXT_STATE_KO_MISS_LOAD_WAITEND; 655 // #endif 631 656 break; 632 657 } … … 688 713 throw ERRORMORPHEO(FUNCTION,toString(_("Context[%d], Have an interruption, Not yet supported (Comming Soon).\n"),i)); 689 714 } 715 716 717 #if (MANAGE_EVENT == MANAGE_EVENT_NO_WAIT) 718 for (uint32_t i=0; i<_param->_nb_context; i++) 719 switch (reg_STATE [i]) 720 { 721 case CONTEXT_STATE_KO_MISS_BRANCH_WAITEND : reg_STATE [i] = CONTEXT_STATE_KO_MISS_BRANCH_ADDR ; break; 722 case CONTEXT_STATE_KO_MISS_LOAD_WAITEND : reg_STATE [i] = CONTEXT_STATE_KO_MISS_LOAD_ADDR ; break; 723 case CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAITEND : reg_STATE [i] = CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR; break; 724 default : break; 725 } 726 #endif 690 727 } 691 728 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_genMealy.cpp
r123 r124 47 47 Tcontrol_t have_decod_branch [_param->_nb_context]; 48 48 49 Tcontext_t CONTEXT_EVENT_CONTEXT_ID = 0; 50 Tdepth_t CONTEXT_EVENT_DEPTH = 0; 51 Tevent_type_t CONTEXT_EVENT_TYPE = 0; 52 Tcontrol_t CONTEXT_EVENT_IS_DELAY_SLOT = 0; 53 Tgeneral_data_t CONTEXT_EVENT_ADDRESS = 0; 54 Tgeneral_data_t CONTEXT_EVENT_ADDRESS_EPCR = 0; 55 49 56 for (uint32_t i=0; i<_param->_nb_context; i++) 50 57 { … … 67 74 log_printf(TRACE,Decod,FUNCTION," * DECOD [%d]",i); 68 75 76 bool ifetch_val = false; 69 77 while ((it != select->end()) and // have a no scanned "slot_in" ? 70 (decod_val [i] == false) and // have not a previous selected entry? 78 // (decod_val [i] == false) and // have not a previous selected entry? 79 (ifetch_val == false) and // not find ifetch instruction valid 71 80 (context_event_val == false)) // Have not a context_event (spr_access, exception, ...) 72 81 { … … 86 95 log_printf(TRACE,Decod,FUNCTION," * decod_ack : %d",PORT_READ(in_DECOD_ACK [i])); 87 96 97 ifetch_val = true; 88 98 decod_val [i] = true; // fetch_val and decod_enable 89 99 ifetch_ack [x][y] = PORT_READ(in_DECOD_ACK [i]); // fetch_val and decod_enable and decod_ack … … 189 199 ifetch_ack [x][y] &= not have_decod_branch [x] and PORT_READ(in_PREDICT_ACK [i]);// predict_ack and fetch_val and decod_enable and decod_ack 190 200 191 if (_param->_have_port_context_id)192 PORT_WRITE(out_PREDICT_CONTEXT_ID [i],x);193 PORT_WRITE(out_PREDICT_MATCH_INST_IFETCH_PTR [i],y == ((_param->_have_port_inst_ifetch_ptr)?PORT_READ(in_IFETCH_INST_IFETCH_PTR [x]):0));194 PORT_WRITE(out_PREDICT_BRANCH_STATE [i],PORT_READ(in_IFETCH_BRANCH_STATE [x]));195 if (_param->_have_port_depth)196 PORT_WRITE(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [i],PORT_READ(in_IFETCH_BRANCH_UPDATE_PREDICTION_ID [x]));197 PORT_WRITE(out_PREDICT_BRANCH_CONDITION [i],_decod_instruction->_branch_condition );198 // PORT_WRITE(out_PREDICT_BRANCH_STACK_WRITE [i],_decod_instruction->_branch_stack_write);199 PORT_WRITE(out_PREDICT_BRANCH_DIRECTION [i],_decod_instruction->_branch_direction );200 PORT_WRITE(out_PREDICT_ADDRESS_SRC [i],_decod_instruction->_address );201 PORT_WRITE(out_PREDICT_ADDRESS_DEST [i],_decod_instruction->_address_next );202 203 201 // can continue is set if direction is "not take" (also, continue is sequential order) 204 202 … … 209 207 log_printf(TRACE,Decod,FUNCTION," * predict_can_continue : %d",PORT_READ(in_PREDICT_CAN_CONTINUE [i])); 210 208 } 209 210 if (_param->_have_port_context_id) 211 PORT_WRITE(out_PREDICT_CONTEXT_ID [i],x); 212 PORT_WRITE(out_PREDICT_MATCH_INST_IFETCH_PTR [i],y == ((_param->_have_port_inst_ifetch_ptr)?PORT_READ(in_IFETCH_INST_IFETCH_PTR [x]):0)); 213 PORT_WRITE(out_PREDICT_BRANCH_STATE [i],PORT_READ(in_IFETCH_BRANCH_STATE [x])); 214 if (_param->_have_port_depth) 215 PORT_WRITE(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [i],PORT_READ(in_IFETCH_BRANCH_UPDATE_PREDICTION_ID [x])); 216 PORT_WRITE(out_PREDICT_BRANCH_CONDITION [i],_decod_instruction->_branch_condition ); 217 // PORT_WRITE(out_PREDICT_BRANCH_STACK_WRITE [i],_decod_instruction->_branch_stack_write); 218 PORT_WRITE(out_PREDICT_BRANCH_DIRECTION [i],_decod_instruction->_branch_direction ); 219 PORT_WRITE(out_PREDICT_ADDRESS_SRC [i],_decod_instruction->_address ); 220 PORT_WRITE(out_PREDICT_ADDRESS_DEST [i],_decod_instruction->_address_next ); 211 221 212 222 Tevent_type_t event_type = _decod_instruction->_event_type; … … 223 233 ifetch_ack [x][y] &= PORT_READ(in_CONTEXT_EVENT_ACK);// context_event_ack and fetch_val and decod_enable and decod_ack 224 234 225 if (_param->_have_port_context_id) 226 PORT_WRITE(out_CONTEXT_EVENT_CONTEXT_ID , x); 227 if (_param->_have_port_depth) 228 PORT_WRITE(out_CONTEXT_EVENT_DEPTH , depth); 229 PORT_WRITE(out_CONTEXT_EVENT_TYPE , _decod_instruction->_event_type ); 230 PORT_WRITE(out_CONTEXT_EVENT_IS_DELAY_SLOT, _decod_instruction->_is_delay_slot ); 231 PORT_WRITE(out_CONTEXT_EVENT_ADDRESS , _decod_instruction->_address ); 232 PORT_WRITE(out_CONTEXT_EVENT_ADDRESS_EPCR , _decod_instruction->_address_next ); 235 CONTEXT_EVENT_CONTEXT_ID = x; 236 CONTEXT_EVENT_DEPTH = depth; 237 CONTEXT_EVENT_TYPE = _decod_instruction->_event_type; 238 CONTEXT_EVENT_IS_DELAY_SLOT = _decod_instruction->_is_delay_slot; 239 CONTEXT_EVENT_ADDRESS = _decod_instruction->_address; 240 CONTEXT_EVENT_ADDRESS_EPCR = _decod_instruction->_address_next ; 241 233 242 } 234 243 … … 263 272 } 264 273 } 274 265 275 //----------------------------------- 266 276 // Write output … … 272 282 273 283 PORT_WRITE(out_CONTEXT_EVENT_VAL, context_event_val); 284 if (_param->_have_port_context_id) 285 PORT_WRITE(out_CONTEXT_EVENT_CONTEXT_ID , CONTEXT_EVENT_CONTEXT_ID ); 286 if (_param->_have_port_depth) 287 PORT_WRITE(out_CONTEXT_EVENT_DEPTH , CONTEXT_EVENT_DEPTH ); 288 PORT_WRITE(out_CONTEXT_EVENT_TYPE , CONTEXT_EVENT_TYPE ); 289 PORT_WRITE(out_CONTEXT_EVENT_IS_DELAY_SLOT, CONTEXT_EVENT_IS_DELAY_SLOT); 290 PORT_WRITE(out_CONTEXT_EVENT_ADDRESS , CONTEXT_EVENT_ADDRESS ); 291 PORT_WRITE(out_CONTEXT_EVENT_ADDRESS_EPCR , CONTEXT_EVENT_ADDRESS_EPCR ); 274 292 275 293 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_multi_fifo_genMealy_decod_out.cpp
r123 r124 53 53 log_printf(TRACE,Decod_queue,FUNCTION,_(" * Queue is not empty, slot [%d] is valid."),i); 54 54 55 Tcontext_t context = reg_QUEUE[num_bank].front()->_context_id[0];55 Tcontext_t context = reg_QUEUE[num_bank].front()->_context_id [0]; 56 56 57 57 log_printf(TRACE,Decod_queue,FUNCTION," * context : %d",context); … … 100 100 101 101 internal_DECOD_OUT_VAL [i] = 1; // in all case, val is set (entry is not empty, and instruction is valid) 102 102 103 103 if (is_valid) 104 104 { 105 105 val [i] = 1; 106 106 internal_DECOD_OUT_ACK [i] = PORT_READ(in_DECOD_OUT_ACK [i]); 107 108 107 } 109 108 else … … 124 123 } 125 124 } 125 126 log_printf(TRACE,Decod_queue,FUNCTION," * decod_out_ack: %d (%d)",internal_DECOD_OUT_ACK [i],PORT_READ(in_DECOD_OUT_ACK [i])); 126 127 } 127 128 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_multi_fifo_transition.cpp
r123 r124 117 117 //-------------------------------------------------------------------- 118 118 { 119 bool can_continue = true; // in_order 120 119 121 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 120 if ( internal_DECOD_OUT_VAL [i] and internal_DECOD_OUT_ACK[i])122 if (can_continue and (internal_DECOD_OUT_VAL [i] and internal_DECOD_OUT_ACK[i])) 121 123 { 122 124 log_printf(TRACE,Decod_queue,FUNCTION,_(" * DECOD_OUT [%d]"),i); … … 139 141 reg_NB_INST_EVENT [context] --; 140 142 } 143 else 144 can_continue = false; 141 145 } 142 146 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Parameters.cpp
r115 r124 72 72 73 73 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _size_history : %d",_size_history ); 74 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _bht_history_mask : 0x% x",_bht_history_mask );75 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _bht_history_shift : % d",_bht_history_shift );76 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_history_mask : 0x% x",_pht_history_mask );77 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_history_shift : % d",_pht_history_shift );74 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _bht_history_mask : 0x%llx",_bht_history_mask ); 75 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _bht_history_shift : %lld",_bht_history_shift ); 76 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_history_mask : 0x%llx",_pht_history_mask ); 77 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_history_shift : %lld",_pht_history_shift ); 78 78 79 79 _bht_init_take = static_cast<Thistory_t>(-1)&_bht_history_mask; … … 82 82 _pht_init_ntake = _pht_init_take-1; // size = 4 : 0111/2 83 83 84 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _bht_init_take : 0x% x",_bht_init_take );85 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _bht_init_ntake : 0x% x",_bht_init_ntake);86 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_init_take : 0x% x",_pht_init_take );87 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_init_ntake : 0x% x",_pht_init_ntake);84 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _bht_init_take : 0x%llx",_bht_init_take ); 85 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _bht_init_ntake : 0x%llx",_bht_init_ntake); 86 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_init_take : 0x%llx",_pht_init_take ); 87 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_init_ntake : 0x%llx",_pht_init_ntake); 88 88 89 89 if (_have_bht) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_genMealy_predict.cpp
r123 r124 42 42 Taddress_t address = PORT_READ(in_PREDICT_ADDRESS [i]); 43 43 Thistory_t history = 0; 44 Tcontrol_t direction ;44 Tcontrol_t direction = 0; 45 45 46 46 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * address : 0x%.8x",address); … … 58 58 pht_bht_history = bht_history; 59 59 60 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history : 0x% x",bht_history);61 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_num_reg : % d",bht_num_reg);60 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history : 0x%llx",bht_history); 61 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_num_reg : %lld",bht_num_reg); 62 62 63 63 history = (bht_history << _param->_bht_history_shift )&_param->_bht_history_mask ; … … 73 73 Thistory_t pht_num_reg = (pht_bht_history xor ((address&_param->_pht_address_share_mask)<<_param->_pht_address_share_shift)); 74 74 75 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history : 0x% x",pht_bht_history);76 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_reg : % d",pht_num_reg);77 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_bank : % d",pht_num_bank);75 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history : 0x%llx",pht_bht_history); 76 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_reg : %lld",pht_num_reg); 77 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_bank : %lld",pht_num_bank); 78 78 79 79 Thistory_t pht_history = reg_PHT [pht_num_bank][pht_num_reg]; 80 80 81 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history : 0x% x",pht_history);81 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history : 0x%llx",pht_history); 82 82 83 83 history |= (pht_history << _param->_pht_history_shift )&_param->_pht_history_mask; … … 92 92 93 93 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * direction : %d",direction); 94 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * history : 0x% x",history);94 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * history : 0x%llx",history); 95 95 96 96 PORT_WRITE(out_PREDICT_DIRECTION [i],direction); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_transition.cpp
r119 r124 52 52 { 53 53 Thistory_t bht_num_reg = internal_PREDICT_BHT_NUM_REG [i]; 54 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_num_reg : % d",bht_num_reg);54 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_num_reg : %lld",bht_num_reg); 55 55 56 56 // #ifdef DEBUG_TEST … … 59 59 60 60 Thistory_t bht_history = reg_BHT[bht_num_reg]; 61 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (old): % x",bht_history);61 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (old): %llx",bht_history); 62 62 63 63 64 64 bht_history = ((bht_history<<1) | direction)&_param->_bht_history_mask ; 65 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (new): % x",bht_history);65 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (new): %llx",bht_history); 66 66 reg_BHT [bht_num_reg] = bht_history; 67 67 } … … 71 71 Thistory_t pht_num_reg = internal_PREDICT_PHT_NUM_REG [i]; 72 72 Thistory_t pht_num_bank= internal_PREDICT_PHT_NUM_BANK [i]; 73 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_reg : % d",pht_num_reg);74 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_bank : % d",pht_num_bank);73 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_reg : %lld",pht_num_reg); 74 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_bank : %lld",pht_num_bank); 75 75 76 76 Thistory_t pht_history = reg_PHT [pht_num_bank][pht_num_reg]; 77 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (old): % x",pht_history);77 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (old): %llx",pht_history); 78 78 79 79 // PHT : saturation counter 80 80 pht_history = (direction==1)?((pht_history<_param->_pht_counter_max)?(pht_history+1):(pht_history)):((pht_history>0)?(pht_history-1):(pht_history)); 81 81 82 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (new): % x",pht_history);82 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (new): %llx",pht_history); 83 83 84 84 reg_PHT [pht_num_bank][pht_num_reg] = pht_history; … … 95 95 { 96 96 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * UPDATE [%d]",i); 97 if (_param->_update_on_prediction) 97 98 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * miss : %d",PORT_READ(in_UPDATE_MISS [i])); 98 99 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * update_on_predict: %d",_param->_update_on_prediction); … … 125 126 Thistory_t bht_num_reg = address & _param->_bht_address_mask; 126 127 127 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (old): % x",bht_history);128 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_num_reg : % x",bht_num_reg);128 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (old): %llx",bht_history); 129 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_num_reg : %llx",bht_num_reg); 129 130 130 131 // BHT : shift register … … 139 140 140 141 pht_bht_history = bht_history; 141 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (new): % x",bht_history);142 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (new): %llx",bht_history); 142 143 143 144 // #ifdef DEBUG_TEST … … 156 157 Thistory_t pht_num_reg = pht_bht_history xor ((address&_param->_pht_address_share_mask)<<_param->_pht_address_share_shift); 157 158 158 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (old): % x",pht_bht_history);159 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (old): % x",pht_history);160 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_reg : % x",pht_num_reg);161 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_bank : % x",pht_num_bank);159 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (old): %llx",pht_bht_history); 160 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (old): %llx",pht_history); 161 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_reg : %llx",pht_num_reg); 162 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_bank : %llx",pht_num_bank); 162 163 163 164 // PHT : saturation counter … … 171 172 } 172 173 173 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (new): % x",pht_history);174 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (new): %llx",pht_history); 174 175 175 176 reg_PHT [pht_num_bank][pht_num_reg] = pht_history; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table.cpp
r123 r124 141 141 } 142 142 143 # ifdef SYSTEMCASS_SPECIFIC144 // List dependency information145 for (uint32_t i=0; i<_param->_nb_inst_decod; i++)146 {147 if (_param->_have_port_context_id)148 (*(out_DECOD_ACK [i])) (*(in_DECOD_CONTEXT_ID [i]));149 }150 # endif143 // # ifdef SYSTEMCASS_SPECIFIC 144 // // List dependency information 145 // for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 146 // { 147 // if (_param->_have_port_context_id) 148 // (*(out_DECOD_ACK [i])) (*(in_DECOD_CONTEXT_ID [i])); 149 // } 150 // # endif 151 151 152 152 log_printf(INFO,Update_Prediction_Table,FUNCTION,"Method - genMealy_branch_complete"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp
r122 r124 258 258 "", 259 259 "log", 260 false,261 log_with_pid,260 _simulation_file_with_date, 261 _simulation_file_with_pid, 262 262 true); 263 263 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp
r123 r124 120 120 branchement_log_file [num_thread] 121 121 << std::hex 122 << "0x" << reg_UPDATE_PREDICTION_TABLE [i][bottom]._address_src<< " "123 << "0x" << reg_UPDATE_PREDICTION_TABLE [i][bottom]._address_dest<< " "122 << "0x" << std::setfill('0') << std::setw(_param->_size_general_data/4) << reg_UPDATE_PREDICTION_TABLE [i][bottom]._address_src << " " 123 << "0x" << std::setfill('0') << std::setw(_param->_size_general_data/4) << reg_UPDATE_PREDICTION_TABLE [i][bottom]._address_dest << " " 124 124 << std::dec 125 125 << reg_UPDATE_PREDICTION_TABLE [i][bottom]._good_take << " - " … … 127 127 << reg_UPDATE_PREDICTION_TABLE [i][bottom]._miss_prediction << " " 128 128 << reg_UPDATE_PREDICTION_TABLE [i][bottom]._ifetch_prediction << " " 129 << "(" << (uint32_t)reg_UPDATE_PREDICTION_TABLE [i][bottom]._condition<< ")"129 << "(" << toString(reg_UPDATE_PREDICTION_TABLE [i][bottom]._condition) << ")" 130 130 << std::endl; 131 131 } … … 671 671 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * top_state : %s",toString(top_state).c_str()); 672 672 673 bool previous_ufpt_event = (reg_UFPT_EVENT_STATE [ i] == UFPT_EVENT_STATE_KO_FLUSH);673 bool previous_ufpt_event = (reg_UFPT_EVENT_STATE [context] == UFPT_EVENT_STATE_KO_FLUSH); 674 674 675 675 … … 1166 1166 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UFPT_NB_UPDATE : %d",reg_UFPT_NB_UPDATE [i]); 1167 1167 for (uint32_t j=0; j<_param->_size_ufpt_queue[i]; j++) 1168 log_printf(TRACE,Update_Prediction_Table,FUNCTION," [%d] %.4d, %.8x (%.8x) %.8x (%.8x), %.1d %.1d, %.8d %.8x (%.8x) %.4d - %s", 1168 { 1169 log_printf(TRACE,Update_Prediction_Table,FUNCTION," [%d] %.4d, %.8x (%.8x) %.8x (%.8x), %.1d %.1d, %.8lld %.8x (%.8x) %.4d - %s", 1169 1170 j, 1170 1171 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._condition, … … 1181 1182 toString(reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state).c_str() 1182 1183 ); 1184 } 1183 1185 1184 1186 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * Dump UPT [%d] (Update_Prediction_Table)",i); … … 1189 1191 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UPT_EMPTY : %d",reg_UPT_EMPTY [i]); 1190 1192 for (uint32_t j=0; j<_param->_size_upt_queue[i]; j++) 1191 log_printf(TRACE,Update_Prediction_Table,FUNCTION," [%d] %.4d, %.8x (%.8x) %.8x (%.8x), %.1d %.1d %.1d, %.8 d %.8x (%.8x) %.4d - %s",1193 log_printf(TRACE,Update_Prediction_Table,FUNCTION," [%d] %.4d, %.8x (%.8x) %.8x (%.8x), %.1d %.1d %.1d, %.8lld %.8x (%.8x) %.4d - %s", 1192 1194 j, 1193 1195 reg_UPDATE_PREDICTION_TABLE [i][j]._condition,
Note: See TracChangeset
for help on using the changeset viewer.