Changeset 108 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit
- Timestamp:
- Feb 12, 2009, 12:55:06 PM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/SelfTest/config_min.cfg
r88 r108 11 11 1 1 +1 # nb_inst_branch_complete 12 12 0 0 +1 # nb_branch_speculated [0][0] [nb_front_end][nb_context] 13 1 1 +1 # size_nb_inst_decod 13 14 32 32 +1 # size_general_data 14 15 1 1 +1 # size_store_queue_ptr -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/SelfTest/config_mono_rename_unit.cfg
r88 r108 11 11 1 1 +1 # nb_inst_branch_complete 12 12 0 0 +1 # nb_branch_speculated [0][0] [nb_front_end][nb_context] 13 1 1 +1 # size_nb_inst_decod 13 14 32 32 +1 # size_general_data 14 15 1 1 +1 # size_store_queue_ptr -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/SelfTest/src/main.cpp
r88 r108 8 8 #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/SelfTest/include/test.h" 9 9 10 #define NB_PARAMS 1 510 #define NB_PARAMS 16 11 11 12 12 void usage (int argc, char * argv[]) … … 25 25 err (_(" * nb_inst_branch_complete (uint32_t )\n")); 26 26 err (_(" * nb_branch_speculated [nb_front_end][nb_context] (uint32_t )\n")); 27 err (_(" * size_nb_inst_decod (uint32_t )\n")); 27 28 err (_(" * size_general_data (uint32_t )\n")); 28 29 err (_(" * size_store_queue_ptr (uint32_t )\n")); … … 88 89 } 89 90 91 uint32_t _size_nb_inst_decod = fromString<uint32_t >(argv[x++]); 90 92 uint32_t _size_general_data = fromString<uint32_t >(argv[x++]); 91 93 uint32_t _size_store_queue_ptr = fromString<uint32_t >(argv[x++]); … … 112 114 _nb_inst_branch_complete , 113 115 _nb_branch_speculated , 116 _size_nb_inst_decod , 114 117 _size_general_data , 115 118 _size_store_queue_ptr , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/SelfTest/src/test.cpp
r105 r108 68 68 ALLOC2_SC_SIGNAL( in_INSERT_NO_EXECUTE ," in_INSERT_NO_EXECUTE ",Tcontrol_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 69 69 ALLOC2_SC_SIGNAL( in_INSERT_IS_DELAY_SLOT ," in_INSERT_IS_DELAY_SLOT ",Tcontrol_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 70 #ifdef DEBUG 71 ALLOC2_SC_SIGNAL( in_INSERT_ADDRESS ," in_INSERT_ADDRESS ",Taddress_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 72 #endif 70 73 ALLOC2_SC_SIGNAL( in_INSERT_ADDRESS_NEXT ," in_INSERT_ADDRESS_NEXT ",Taddress_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 71 74 ALLOC2_SC_SIGNAL( in_INSERT_EXCEPTION ," in_INSERT_EXCEPTION ",Texception_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); … … 167 170 ALLOC2_SC_SIGNAL(out_NB_INST_COMMIT_ALL ,"out_NB_INST_COMMIT_ALL ",Tcounter_t ,_param->_nb_front_end,_param->_nb_context[it1]); 168 171 ALLOC2_SC_SIGNAL(out_NB_INST_COMMIT_MEM ,"out_NB_INST_COMMIT_MEM ",Tcounter_t ,_param->_nb_front_end,_param->_nb_context[it1]); 172 ALLOC2_SC_SIGNAL( in_NB_INST_DECOD_ALL ," in_NB_INST_DECOD_ALL ",Tcounter_t ,_param->_nb_front_end,_param->_nb_context[it1]); 169 173 ALLOC2_SC_SIGNAL( in_DEPTH_MIN ," in_DEPTH_MIN ",Tdepth_t ,_param->_nb_front_end,_param->_nb_context[it1]); 170 174 ALLOC2_SC_SIGNAL( in_DEPTH_MAX ," in_DEPTH_MAX ",Tdepth_t ,_param->_nb_front_end,_param->_nb_context[it1]); … … 206 210 INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_IS_DELAY_SLOT ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 207 211 INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_NO_EXECUTE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 212 #ifdef DEBUG 213 INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_ADDRESS ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 214 #endif 208 215 INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_ADDRESS_NEXT ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 209 216 INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_EXCEPTION ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); … … 317 324 INSTANCE2_SC_SIGNAL(_Commit_unit,out_NB_INST_COMMIT_ALL ,_param->_nb_front_end,_param->_nb_context[it1]); 318 325 INSTANCE2_SC_SIGNAL(_Commit_unit,out_NB_INST_COMMIT_MEM ,_param->_nb_front_end,_param->_nb_context[it1]); 326 INSTANCE2_SC_SIGNAL(_Commit_unit, in_NB_INST_DECOD_ALL ,_param->_nb_front_end,_param->_nb_context[it1]); 319 327 320 328 if (_param->_have_port_depth) … … 617 625 DELETE2_SC_SIGNAL( in_INSERT_NO_EXECUTE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 618 626 DELETE2_SC_SIGNAL( in_INSERT_IS_DELAY_SLOT ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 627 #ifdef DEBUG 628 DELETE2_SC_SIGNAL( in_INSERT_ADDRESS ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 629 #endif 619 630 DELETE2_SC_SIGNAL( in_INSERT_ADDRESS_NEXT ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 620 631 DELETE2_SC_SIGNAL( in_INSERT_EXCEPTION ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); … … 714 725 DELETE2_SC_SIGNAL(out_NB_INST_COMMIT_ALL ,_param->_nb_front_end,_param->_nb_context[it1]); 715 726 DELETE2_SC_SIGNAL(out_NB_INST_COMMIT_MEM ,_param->_nb_front_end,_param->_nb_context[it1]); 727 DELETE2_SC_SIGNAL( in_NB_INST_DECOD_ALL ,_param->_nb_front_end,_param->_nb_context[it1]); 716 728 DELETE2_SC_SIGNAL( in_DEPTH_MIN ,_param->_nb_front_end,_param->_nb_context[it1]); 717 729 DELETE2_SC_SIGNAL( in_DEPTH_MAX ,_param->_nb_front_end,_param->_nb_context[it1]); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h
r105 r108 83 83 public : SC_IN (Tcontrol_t ) *** in_INSERT_NO_EXECUTE ;//[nb_rename_unit][nb_inst_insert] 84 84 public : SC_IN (Tcontrol_t ) *** in_INSERT_IS_DELAY_SLOT ;//[nb_rename_unit][nb_inst_insert] 85 #ifdef DEBUG 86 public : SC_IN (Taddress_t ) *** in_INSERT_ADDRESS ;//[nb_rename_unit][nb_inst_insert] 87 #endif 85 88 public : SC_IN (Taddress_t ) *** in_INSERT_ADDRESS_NEXT ;//[nb_rename_unit][nb_inst_insert] 86 89 public : SC_IN (Texception_t ) *** in_INSERT_EXCEPTION ;//[nb_rename_unit][nb_inst_insert] … … 195 198 public : SC_OUT(Tcounter_t ) *** out_NB_INST_COMMIT_ALL ;//[nb_front_end][nb_context] 196 199 public : SC_OUT(Tcounter_t ) *** out_NB_INST_COMMIT_MEM ;//[nb_front_end][nb_context] 200 public : SC_IN (Tcounter_t ) *** in_NB_INST_DECOD_ALL ;//[nb_front_end][nb_context] 197 201 198 202 // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Parameters.h
r88 r108 81 81 uint32_t nb_inst_branch_complete , 82 82 uint32_t ** nb_branch_speculated , 83 uint32_t size_nb_inst_decod , 83 84 uint32_t size_general_data , 84 85 uint32_t size_store_queue_ptr , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Types.h
r105 r108 90 90 public : Tspecial_data_t flags ; 91 91 public : Tcontrol_t no_sequence ; 92 public : Tcontrol_t speculative ; 92 93 //public : Tgeneral_data_t data_commit ; // branch's destination 94 #ifdef DEBUG 95 public : Taddress_t address ; 96 #endif 93 97 public : Taddress_t address_next ; 94 98 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp
r105 r108 71 71 _ALLOC2_SIGNAL_IN ( in_INSERT_NO_EXECUTE ,"no_execute" ,Tcontrol_t ,1 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 72 72 _ALLOC2_SIGNAL_IN ( in_INSERT_IS_DELAY_SLOT ,"is_delay_slot" ,Tcontrol_t ,1 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 73 #ifdef DEBUG 74 _ALLOC2_SIGNAL_IN ( in_INSERT_ADDRESS ,"address" ,Taddress_t ,_param->_size_instruction_address ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 75 #endif 73 76 _ALLOC2_SIGNAL_IN ( in_INSERT_ADDRESS_NEXT ,"address_next" ,Taddress_t ,_param->_size_instruction_address ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 74 77 _ALLOC2_SIGNAL_IN ( in_INSERT_EXCEPTION ,"exception" ,Texception_t ,_param->_size_exception ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); … … 216 219 _ALLOC2_SIGNAL_OUT(out_NB_INST_COMMIT_ALL ,"commit_all",Tcounter_t ,_param->_size_nb_inst_commit,_param->_nb_front_end, _param->_nb_context[it1]); 217 220 _ALLOC2_SIGNAL_OUT(out_NB_INST_COMMIT_MEM ,"commit_mem",Tcounter_t ,_param->_size_nb_inst_commit,_param->_nb_front_end, _param->_nb_context[it1]); 221 _ALLOC2_SIGNAL_IN ( in_NB_INST_DECOD_ALL ,"decod_all" ,Tcounter_t ,_param->_size_nb_inst_decod ,_param->_nb_front_end, _param->_nb_context[it1]); 218 222 } 219 223 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp
r105 r108 39 39 DELETE2_SIGNAL( in_INSERT_NO_EXECUTE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1 ); 40 40 DELETE2_SIGNAL( in_INSERT_IS_DELAY_SLOT ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1 ); 41 #ifdef DEBUG 42 DELETE2_SIGNAL( in_INSERT_ADDRESS ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_instruction_address ); 43 #endif 41 44 DELETE2_SIGNAL( in_INSERT_ADDRESS_NEXT ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_instruction_address ); 42 45 DELETE2_SIGNAL( in_INSERT_EXCEPTION ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_exception ); … … 143 146 DELETE2_SIGNAL(out_NB_INST_COMMIT_ALL ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_nb_inst_commit); 144 147 DELETE2_SIGNAL(out_NB_INST_COMMIT_MEM ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_nb_inst_commit); 148 DELETE2_SIGNAL( in_NB_INST_DECOD_ALL ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_nb_inst_decod); 145 149 146 150 DELETE2_SIGNAL( in_DEPTH_MIN ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_depth); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp
r106 r108 77 77 case EVENT_STATE_WAITEND : 78 78 { 79 if (reg_NB_INST_COMMIT_ALL [i][j] == 0) 79 Tcounter_t nb_inst_all = PORT_READ(in_NB_INST_DECOD_ALL [i][j]) + reg_NB_INST_COMMIT_ALL [i][j]; 80 if (nb_inst_all == 0) 80 81 { 81 82 reg_EVENT_STATE [i][j] = EVENT_STATE_END; … … 163 164 entry->num_reg_re_phy_new = PORT_READ(in_INSERT_NUM_REG_RE_PHY_NEW [x][y]); 164 165 entry->no_sequence = type == TYPE_BRANCH; 166 entry->speculative = true; 167 #ifdef DEBUG 168 entry->address = PORT_READ(in_INSERT_ADDRESS [x][y]); 169 #endif 165 170 entry->address_next = PORT_READ(in_INSERT_ADDRESS_NEXT [x][y]); 166 171 … … 173 178 // other -> wait end of instruction 174 179 // * OTHER 175 if (exception == EXCEPTION_NONE) 176 { 177 Tcontrol_t no_execute = PORT_READ(in_INSERT_NO_EXECUTE [x][y]); 178 // no_execute : l.j, l.nop, l.rfe 179 180 log_printf(TRACE,Commit_unit,FUNCTION," * no_execute : %d",no_execute); 181 182 switch (type) 183 { 184 case TYPE_BRANCH : {entry->state=(no_execute==1)?ROB_BRANCH_COMPLETE:ROB_BRANCH_WAIT_END; break;} 185 case TYPE_MEMORY : {entry->state=(is_store ==1)?ROB_STORE_WAIT_HEAD_OK:ROB_OTHER_WAIT_END; break;} 186 default : {entry->state=(no_execute==1)?ROB_END_OK_SPECULATIVE:ROB_OTHER_WAIT_END; break;} 187 } 188 } 189 else 190 { 191 // Have an exception : wait head of ROB 192 193 // in_INSERT_NO_EXECUTE [x][y] : l.sys, l.trap 194 195 entry->state = ROB_END_EXCEPTION_WAIT_HEAD; 196 } 180 181 // bool flush = reg_EVENT_FLUSH [front_end_id][context_id]; 182 183 // log_printf(TRACE,Commit_unit,FUNCTION," * flush : %d",flush); 184 185 // if (flush) 186 // { 187 // entry->state = ROB_END_MISS; // All type (branch, memory and others), because, is not execute 188 // } 189 // else 190 { 191 if (exception == EXCEPTION_NONE) 192 { 193 Tcontrol_t no_execute = PORT_READ(in_INSERT_NO_EXECUTE [x][y]); 194 // no_execute : l.j, l.nop, l.rfe 195 196 log_printf(TRACE,Commit_unit,FUNCTION," * no_execute : %d",no_execute); 197 198 switch (type) 199 { 200 case TYPE_BRANCH : {entry->state=(no_execute==1)?ROB_BRANCH_COMPLETE:ROB_BRANCH_WAIT_END ; break;} 201 case TYPE_MEMORY : {entry->state=(is_store ==1)?ROB_STORE_WAIT_HEAD_OK:ROB_OTHER_WAIT_END; break;} 202 default : {entry->state=(no_execute==1)?ROB_END_OK_SPECULATIVE:ROB_OTHER_WAIT_END; break;} 203 } 204 } 205 else 206 { 207 // Have an exception : wait head of ROB 208 209 // in_INSERT_NO_EXECUTE [x][y] : l.sys, l.trap 210 211 entry->state = ROB_END_EXCEPTION_WAIT_HEAD; 212 } 213 } 197 214 198 215 // Push in rob … … 351 368 Ttype_t type = entry->type ; 352 369 353 if ((state == ROB_END_OK ) or // LOAD_MISS370 if ((state == ROB_END_OK ) or 354 371 // (state == ROB_END_KO ) or 355 (state == ROB_END_BRANCH_MISS) //or356 // (state == ROB_END_LOAD_MISS )or372 (state == ROB_END_BRANCH_MISS) or 373 (state == ROB_END_LOAD_MISS )// or 357 374 // (state == ROB_END_MISS ) or 358 375 // (state == ROB_END_EXCEPTION ) … … 468 485 // =====[ EVENT ]===================================================== 469 486 // =================================================================== 470 { 471 // Not yet implemented 472 } 487 // for (uint32_t i=0; i < _param->_nb_front_end; ++i) 488 // for (uint32_t j=0; j < _param->_nb_context[i]; ++j) 489 // if (PORT_READ(in_EVENT_VAL [i][j]) and internal_EVENT_ACK [i][j]) 490 // { 491 // log_printf(TRACE,Commit_unit,FUNCTION," * EVENT [%d][%d]",i,j); 492 493 // reg_PC_CURRENT [i][j] = PORT_READ(in_EVENT_ADDRESS [i][j]); 494 // reg_PC_CURRENT_IS_DS [i][j] = PORT_READ(in_EVENT_IS_DS_TAKE [i][j]); // ?? 495 // reg_PC_CURRENT_IS_DS_TAKE [i][j] = PORT_READ(in_EVENT_IS_DS_TAKE [i][j]); 496 // reg_PC_NEXT [i][j] = PORT_READ(in_EVENT_ADDRESS_NEXT [i][j]); 497 // // PORT_READ(in_EVENT_ADDRESS_NEXT_VAL [i][j]); 498 // } 473 499 474 500 // =================================================================== … … 505 531 506 532 bool flush = reg_EVENT_FLUSH [front_end_id][context_id]; 507 508 Tcontrol_t is_valid = (( (depth == depth_min)or509 depth_full or510 ((depth_min <= depth_max)?511 ((depth >= depth_min) and (depth <=depth_max)):512 ((depth >= depth_min) or (depth <=depth_max))))533 bool speculative = entry->speculative and not (depth == depth_min); 534 Tcontrol_t is_valid = ((not speculative or 535 (speculative and (depth_full or // all is valid 536 ((depth_min <= depth_max)? // test if depth is overflow 537 ((depth >= depth_min) and (depth <=depth_max)): 538 ((depth >= depth_min) or (depth <=depth_max)))))) 513 539 and not flush); 514 540 … … 532 558 case ROB_BRANCH_WAIT_END : {state = ROB_MISS_WAIT_END; break;} 533 559 case ROB_BRANCH_COMPLETE : {state = ROB_END_MISS ; break;} 560 case ROB_END_BRANCH_MISS : 534 561 case ROB_END_BRANCH_MISS_SPECULATIVE : {state = ROB_END_MISS ; break;} 562 case ROB_END_LOAD_MISS_UPDATE : 563 case ROB_END_LOAD_MISS : 535 564 case ROB_END_LOAD_MISS_SPECULATIVE : {state = ROB_END_MISS ; break;} 536 565 case ROB_STORE_WAIT_HEAD_OK : {state = ROB_STORE_HEAD_KO; break;} 537 566 //case ROB_STORE_WAIT_HEAD_KO : {state = ; break;} 538 567 case ROB_OTHER_WAIT_END : {state = ROB_MISS_WAIT_END; break;} 568 case ROB_END_OK : 539 569 case ROB_END_OK_SPECULATIVE : {state = ROB_END_MISS ; break;} 570 case ROB_END_KO : 540 571 case ROB_END_KO_SPECULATIVE : {state = ROB_END_MISS ; break;} 572 case ROB_END_EXCEPTION_UPDATE : 573 case ROB_END_EXCEPTION : 541 574 case ROB_END_EXCEPTION_WAIT_HEAD : {state = ROB_END_MISS ; break;} 542 575 … … 548 581 // can't have miss speculation 549 582 case ROB_STORE_HEAD_OK : 550 case ROB_END_OK :551 case ROB_END_KO :552 case ROB_END_BRANCH_MISS :553 case ROB_END_LOAD_MISS_UPDATE :554 case ROB_END_LOAD_MISS :555 case ROB_END_EXCEPTION_UPDATE :556 case ROB_END_EXCEPTION :557 583 default : 558 584 { 559 throw ERRORMORPHEO(FUNCTION, _("Miss Speculation : Invalide state.\n"));585 throw ERRORMORPHEO(FUNCTION,toString(_("Miss Speculation : Invalide state : %s.\n"),toString(state).c_str())); 560 586 break; 561 587 } … … 566 592 // test if instruction is not speculative 567 593 //------------------------------------------------------ 568 if (entry->depth == depth_min) 594 entry->speculative = speculative; 595 // if (entry->depth == depth_min) 596 if (not speculative) 569 597 { 570 598 switch (state) … … 574 602 case ROB_END_BRANCH_MISS_SPECULATIVE : {state = ROB_END_BRANCH_MISS ; break;} 575 603 case ROB_END_LOAD_MISS_SPECULATIVE : {state = ROB_END_LOAD_MISS_UPDATE ; break;} 576 default : {break;} 604 default : {break;} // else, no change 577 605 } 578 606 } … … 587 615 case ROB_STORE_WAIT_HEAD_OK : {state = ROB_STORE_HEAD_OK; break;} 588 616 case ROB_END_EXCEPTION_WAIT_HEAD : {state = ROB_END_EXCEPTION_UPDATE; break;} 589 default : {break;} 617 default : {break;} // else, no change 590 618 } 591 619 } … … 599 627 // =================================================================== 600 628 601 log_printf(TRACE,Commit_unit,FUNCTION," * Dump ROB (Re-Order-Buffer)"); 602 log_printf(TRACE,Commit_unit,FUNCTION," * num_bank_head : %d",reg_NUM_BANK_HEAD); 603 log_printf(TRACE,Commit_unit,FUNCTION," * num_bank_tail : %d",reg_NUM_BANK_TAIL); 604 605 for (uint32_t i=0; i<_param->_nb_front_end; i++) 606 for (uint32_t j=0; j<_param->_nb_context [i]; j++) 629 #ifdef STATISTICS 630 for (uint32_t i=0; i<_param->_nb_bank; i++) 631 if (usage_is_set(_usage,USE_STATISTICS)) 632 *(_stat_bank_nb_inst [i]) += _rob[i].size(); 633 #endif 634 635 #if (DEBUG >= DEBUG_TRACE) and (DEBUG_Commit_unit == true) 636 { 637 log_printf(TRACE,Commit_unit,FUNCTION," * Dump ROB (Re-Order-Buffer)"); 638 log_printf(TRACE,Commit_unit,FUNCTION," * num_bank_head : %d",reg_NUM_BANK_HEAD); 639 log_printf(TRACE,Commit_unit,FUNCTION," * num_bank_tail : %d",reg_NUM_BANK_TAIL); 640 641 for (uint32_t i=0; i<_param->_nb_front_end; i++) 642 for (uint32_t j=0; j<_param->_nb_context [i]; j++) 643 { 644 log_printf(TRACE,Commit_unit,FUNCTION," * [%d][%d]",i,j); 645 log_printf(TRACE,Commit_unit,FUNCTION," * EVENT_STATE : %s",toString(reg_EVENT_STATE [i][j]).c_str()); 646 log_printf(TRACE,Commit_unit,FUNCTION," * EVENT_FLUSH : %d",reg_EVENT_FLUSH [i][j]); 647 log_printf(TRACE,Commit_unit,FUNCTION," * NB_INST_ALL : %d",reg_NB_INST_COMMIT_ALL[i][j]); 648 log_printf(TRACE,Commit_unit,FUNCTION," * NB_INST_MEM : %d",reg_NB_INST_COMMIT_MEM[i][j]); 649 log_printf(TRACE,Commit_unit,FUNCTION," * PC_CURRENT : %.8x (%.8x) - %d %d",reg_PC_CURRENT [i][j],reg_PC_CURRENT [i][j]<<2, reg_PC_CURRENT_IS_DS [i][j], reg_PC_CURRENT_IS_DS_TAKE [i][j]); 650 log_printf(TRACE,Commit_unit,FUNCTION," * PC_NEXT : %.8x (%.8x)",reg_PC_NEXT [i][j],reg_PC_NEXT [i][j]<<2); 651 } 652 653 for (uint32_t i=0; i<_param->_nb_bank; i++) 607 654 { 608 log_printf(TRACE,Commit_unit,FUNCTION," * [%d][%d] state : %s",i,j,toString(reg_EVENT_STATE [i][j]).c_str()); 609 log_printf(TRACE,Commit_unit,FUNCTION," * num_inst_all : %d",reg_NB_INST_COMMIT_ALL[i][j]); 610 log_printf(TRACE,Commit_unit,FUNCTION," * num_inst_mem : %d",reg_NB_INST_COMMIT_MEM[i][j]); 611 log_printf(TRACE,Commit_unit,FUNCTION," * PC_CURRENT : %.8x (%.8x) - %d %d",reg_PC_CURRENT [i][j],reg_PC_CURRENT [i][j]<<2, reg_PC_CURRENT_IS_DS [i][j], reg_PC_CURRENT_IS_DS_TAKE [i][j]); 612 log_printf(TRACE,Commit_unit,FUNCTION," * PC_NEXT : %.8x (%.8x)",reg_PC_NEXT [i][j],reg_PC_NEXT [i][j]<<2); 655 uint32_t num_bank = (reg_NUM_BANK_HEAD+i)%_param->_nb_bank; 656 657 log_printf(TRACE,Commit_unit,FUNCTION," * Bank [%d] size : %d, ptr : %d",num_bank,(int)_rob[num_bank].size(), reg_BANK_PTR [i]); 658 659 uint32_t x=0; 660 for (std::list<entry_t*>::iterator it=_rob[num_bank].begin(); 661 it!=_rob[num_bank].end(); 662 it++) 663 { 664 log_printf(TRACE,Commit_unit,FUNCTION," [%.4d] %.4d %.4d %.4d %.4d, %.3d %.3d, %.1d, %.1d %.4d, %.1d %.4d, %s - %d", 665 x, 666 (*it)->front_end_id , 667 (*it)->context_id , 668 (*it)->rename_unit_id , 669 (*it)->depth , 670 (*it)->type , 671 (*it)->operation , 672 (*it)->is_delay_slot , 673 (*it)->use_store_queue , 674 (*it)->store_queue_ptr_write , 675 (*it)->use_load_queue , 676 (*it)->load_queue_ptr_write , 677 toString((*it)->state).c_str() , 678 (*it)->ptr ); 679 log_printf(TRACE,Commit_unit,FUNCTION," %.1d %.2d %.6d, %.1d %.2d %.6d, %.1d %.1d %.6d, %.1d %.2d %.6d %.6d, %.1d %.1d %.6d %.6d ", 680 (*it)->read_ra , 681 (*it)->num_reg_ra_log , 682 (*it)->num_reg_ra_phy , 683 (*it)->read_rb , 684 (*it)->num_reg_rb_log , 685 (*it)->num_reg_rb_phy , 686 (*it)->read_rc , 687 (*it)->num_reg_rc_log , 688 (*it)->num_reg_rc_phy , 689 (*it)->write_rd , 690 (*it)->num_reg_rd_log , 691 (*it)->num_reg_rd_phy_old , 692 (*it)->num_reg_rd_phy_new , 693 (*it)->write_re , 694 (*it)->num_reg_re_log , 695 (*it)->num_reg_re_phy_old , 696 (*it)->num_reg_re_phy_new ); 697 698 log_printf(TRACE,Commit_unit,FUNCTION," %.2d %.2d %.1d %.1d %.1d - %.8x (%.8x) %.8x (%.8x)", 699 (*it)->exception_use , 700 (*it)->exception , 701 (*it)->flags , 702 (*it)->no_sequence , 703 (*it)->speculative , 704 (*it)->address , 705 (*it)->address<<2 , 706 (*it)->address_next , 707 (*it)->address_next<<2 708 ); 709 710 x++; 711 } 613 712 } 614 615 for (uint32_t i=0; i<_param->_nb_bank; i++) 616 { 617 log_printf(TRACE,Commit_unit,FUNCTION," * Bank [%d] size : %d, ptr : %d",i,(int)_rob[i].size(), reg_BANK_PTR [i]); 618 619 #ifdef STATISTICS 620 if (usage_is_set(_usage,USE_STATISTICS)) 621 *(_stat_bank_nb_inst [i]) += _rob[i].size(); 622 #endif 623 624 uint32_t x=0; 625 for (std::list<entry_t*>::iterator it=_rob[i].begin(); 626 it!=_rob[i].end(); 627 it++) 628 { 629 log_printf(TRACE,Commit_unit,FUNCTION," [%.4d] %.4d %.4d %.4d %.4d, %.3d %.3d, %.1d, %.1d %.4d, %.1d %.4d, %s - %d", 630 x, 631 (*it)->front_end_id , 632 (*it)->context_id , 633 (*it)->rename_unit_id , 634 (*it)->depth , 635 (*it)->type , 636 (*it)->operation , 637 // (*it)->address , 638 // (*it)->address << 2 , 639 (*it)->is_delay_slot , 640 (*it)->use_store_queue , 641 (*it)->store_queue_ptr_write , 642 (*it)->use_load_queue , 643 (*it)->load_queue_ptr_write , 644 toString((*it)->state).c_str() , 645 (*it)->ptr ); 646 log_printf(TRACE,Commit_unit,FUNCTION," %.1d %.2d %.6d, %.1d %.2d %.6d, %.1d %.1d %.6d, %.1d %.2d %.6d %.6d, %.1d %.1d %.6d %.6d ", 647 (*it)->read_ra , 648 (*it)->num_reg_ra_log , 649 (*it)->num_reg_ra_phy , 650 (*it)->read_rb , 651 (*it)->num_reg_rb_log , 652 (*it)->num_reg_rb_phy , 653 (*it)->read_rc , 654 (*it)->num_reg_rc_log , 655 (*it)->num_reg_rc_phy , 656 (*it)->write_rd , 657 (*it)->num_reg_rd_log , 658 (*it)->num_reg_rd_phy_old , 659 (*it)->num_reg_rd_phy_new , 660 (*it)->write_re , 661 (*it)->num_reg_re_log , 662 (*it)->num_reg_re_phy_old , 663 (*it)->num_reg_re_phy_new ); 664 665 log_printf(TRACE,Commit_unit,FUNCTION," %.2d %.2d %.1d %.1d %.8x (%.8x)", 666 (*it)->exception_use , 667 (*it)->exception , 668 (*it)->flags , 669 (*it)->no_sequence , 670 (*it)->address_next , 671 (*it)->address_next<<2 672 ); 673 674 x++; 675 } 676 } 713 } 714 #endif 715 716 #ifdef DEBUG_TEST 717 { 718 uint32_t x=reg_NUM_BANK_HEAD; 719 if (not _rob[x].empty()) 720 { 721 entry_t * entry = _rob [x].front(); 722 723 if (false 724 // or (entry->state == ROB_EMPTY ) 725 // or (entry->state == ROB_BRANCH_WAIT_END ) 726 // or (entry->state == ROB_BRANCH_COMPLETE ) 727 // or (entry->state == ROB_STORE_WAIT_HEAD_OK ) 728 // //or (entry->state == ROB_STORE_WAIT_HEAD_KO ) 729 // or (entry->state == ROB_STORE_HEAD_OK ) 730 // or (entry->state == ROB_STORE_HEAD_KO ) 731 // or (entry->state == ROB_OTHER_WAIT_END ) 732 // or (entry->state == ROB_MISS_WAIT_END ) 733 // or (entry->state == ROB_END_OK_SPECULATIVE ) 734 or (entry->state == ROB_END_OK ) 735 // or (entry->state == ROB_END_KO_SPECULATIVE ) 736 // or (entry->state == ROB_END_KO ) 737 // or (entry->state == ROB_END_BRANCH_MISS_SPECULATIVE) 738 or (entry->state == ROB_END_BRANCH_MISS ) 739 // or (entry->state == ROB_END_LOAD_MISS_SPECULATIVE ) 740 // or (entry->state == ROB_END_LOAD_MISS_UPDATE ) 741 or (entry->state == ROB_END_LOAD_MISS ) 742 // or (entry->state == ROB_END_MISS ) 743 // or (entry->state == ROB_END_EXCEPTION_WAIT_HEAD ) 744 // or (entry->state == ROB_END_EXCEPTION_UPDATE ) 745 // or (entry->state == ROB_END_EXCEPTION ) 746 ) 747 if (entry->address != reg_PC_CURRENT[entry->front_end_id][entry->context_id]) 748 throw ERRORMORPHEO(FUNCTION,toString(_("Rob top address (%x) is different of reg_PC_CURRENT[%d][%d] (%x).\n"), 749 entry->address, 750 entry->front_end_id, 751 entry->context_id, 752 reg_PC_CURRENT[entry->front_end_id][entry->context_id])); 753 } 754 } 755 #endif 677 756 678 757 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Parameters.cpp
r88 r108 31 31 uint32_t nb_inst_branch_complete , 32 32 uint32_t ** nb_branch_speculated , 33 uint32_t size_nb_inst_decod , 33 34 uint32_t size_general_data , 34 35 uint32_t size_store_queue_ptr , … … 93 94 _size_depth = max<uint32_t>(_array_size_depth,_nb_front_end,_nb_context); 94 95 _size_nb_inst_commit = log2(_size_queue)+1; 96 _size_nb_inst_decod = size_nb_inst_decod; 95 97 96 98 _have_port_front_end_id = _size_front_end_id > 0;
Note: See TracChangeset
for help on using the changeset viewer.