Changeset 108 for trunk/IPs/systemC/processor
- Timestamp:
- Feb 12, 2009, 12:55:06 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo
- Files:
-
- 1 added
- 87 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/SelfTest/src/test.cpp
r101 r108 59 59 cout << "------------------------------------------------------" << endl; 60 60 61 Instance * instance = new Instance ("../../../Files/Instance_ scalar_1.cfg",61 Instance * instance = new Instance ("../../../Files/Instance_debug.cfg", 62 62 generator1, 63 63 _get_custom_information … … 68 68 } 69 69 70 {71 cout << "------------------------------------------------------" << endl;72 73 Instance * instance = new Instance ("../../../Files/Instance_scalar_2.cfg",74 generator1,75 _get_custom_information76 );77 instance->toFile("data_out");78 79 delete instance;80 }81 82 {83 cout << "------------------------------------------------------" << endl;84 85 Instance * instance = new Instance ("../../../Files/Instance_scalar_3.cfg",86 generator1,87 _get_custom_information88 );89 instance->toFile("data_out");90 91 delete instance;92 }93 94 {95 cout << "------------------------------------------------------" << endl;96 97 Instance * instance = new Instance ("../../../Files/Instance_scalar_4.cfg",98 generator1,99 _get_custom_information100 );101 instance->toFile("data_out");102 103 delete instance;104 }105 70 106 71 delete configuration1; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/src/Simulator_fromFile.cpp
r88 r108 45 45 XML_t * xml = vect[i]; 46 46 47 // Test node 48 testNodeName (xml,"parameter"); 49 testSingleton (xml,true); 47 std::string child_name = xml->getName(); 50 48 51 // Take attributes of this tag 52 53 attributes_t attributes = xml->getAttributes(); 54 55 // std::cout << "Node [" << name << "]" << std::endl; 56 // std::cout << " * nb attributes : " << xml->getAttributes().size() << std::endl; 57 58 attribute_t value_name = getAttribute(xml,attributes,"name" ); 59 attribute_t value = getAttribute(xml,attributes,"value"); 60 61 testAttributesEmpty(xml,attributes); 62 63 // Insert in array 64 Parameter_affectation * param = new Parameter_affectation(value_name, 65 value ); 66 67 insert(param); 49 //-------------------------------------------- 50 // Child : Parameter 51 //-------------------------------------------- 52 if (child_name == "parameter") 53 { 54 // testNodeName (xml,"parameter"); 55 testSingleton (xml,true); 56 57 // Take attributes of this tag 58 59 attributes_t attributes = xml->getAttributes(); 60 61 // std::cout << "Node [" << name << "]" << std::endl; 62 // std::cout << " * nb attributes : " << xml->getAttributes().size() << std::endl; 63 64 attribute_t value_name = getAttribute(xml,attributes,"name" ); 65 attribute_t value = getAttribute(xml,attributes,"value"); 66 67 testAttributesEmpty(xml,attributes); 68 69 // Insert in array 70 Parameter_affectation * param = new Parameter_affectation(value_name, 71 value ); 72 73 insert(param); 74 } 75 //-------------------------------------------- 76 // Child : Simulation 77 //-------------------------------------------- 78 else 79 { 80 testNodeName (xml,"simulation"); 81 testSingleton (xml,true); 82 } 68 83 } 69 84 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Parameters_msg_error.cpp
r81 r108 28 28 29 29 if (_size_queue < _nb_inst_retire) 30 test.error( "The reservation_station can't have more retire port than entry in the queue.");30 test.error(toString(_("The reservation_station can't have more retire port (%d) than entry in the queue (%d).\n"),_nb_inst_retire,_size_queue)); 31 31 32 32 log_printf(FUNC,Reservation_station,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Types.h
r105 r108 33 33 CONTEXT_STATE_KO_MISS_LOAD_ADDR , // update address manager 34 34 CONTEXT_STATE_KO_MISS_LOAD_WAITEND , // wait end of event (miss load)) 35 CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR , // update address manager 36 CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND, // wait end of event (miss branch) 35 37 // CONTEXT_STATE_KO_MSYNC , // wait completion of all memory operation 36 38 // CONTEXT_STATE_KO_MSYNC_ISSUE , // issue msync operation … … 64 66 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_BRANCH_ADDR : return "context_state_ko_miss_branch_addr" ; break; 65 67 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_BRANCH_WAITEND : return "context_state_ko_miss_branch_waitend"; break; 68 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR : return "context_state_ko_miss_branch_and_load_addr" ; break; 69 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND : return "context_state_ko_miss_branch_and_load_waitend"; break; 66 70 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_LOAD_ADDR : return "context_state_ko_miss_load_addr" ; break; 67 71 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_LOAD_WAITEND : return "context_state_ko_miss_load_waitend" ; break; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_genMoore.cpp
r105 r108 33 33 Tcontrol_t val = ((state == CONTEXT_STATE_KO_EXCEP_ADDR ) or 34 34 (state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR) or 35 (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR) or 35 36 (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR ) or 36 37 (state == CONTEXT_STATE_KO_PSYNC_ADDR ) or … … 53 54 { 54 55 case CONTEXT_STATE_KO_EXCEP_ADDR : (type = EVENT_TYPE_EXCEPTION ); break; 56 case CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR: 55 57 case CONTEXT_STATE_KO_MISS_BRANCH_ADDR: (type = EVENT_TYPE_BRANCH_MISS_SPECULATION); break; 56 58 case CONTEXT_STATE_KO_MISS_LOAD_ADDR : (type = EVENT_TYPE_LOAD_MISS_SPECULATION ); break; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_transition.cpp
r106 r108 82 82 break; 83 83 } 84 case CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND : 85 { 86 // Wait end of all instruction 87 if (inst_all == 0) 88 89 // state = CONTEXT_STATE_OK; // @@@ TODO : make MISS fast (miss decod) 90 state = CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR; 91 break; 92 } 84 93 case CONTEXT_STATE_KO_EXCEP_SPR : 85 94 { … … 93 102 } 94 103 case CONTEXT_STATE_KO_MISS_LOAD_ADDR : 104 { 105 // nothing, wait the update of internal register (pc) 106 break; 107 } 108 case CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR : 95 109 { 96 110 // nothing, wait the update of internal register (pc) … … 209 223 210 224 // priority : miss > excep > spr/sync 211 uint8_t priority0 = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR ) or 212 (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR ) or 213 (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND) or 214 (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND ))?2:((state == EVENT_TYPE_EXCEPTION)?1:0); 225 uint8_t priority0 = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR ) or 226 (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR ) or 227 (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR ) or 228 (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND ) or 229 (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND ) or 230 (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND))?2:((state == EVENT_TYPE_EXCEPTION)?1:0); 215 231 uint8_t priority1 = 2; // miss 216 232 … … 272 288 273 289 // miss > excep > spr/sync 274 uint8_t priority0 = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR ) or 275 (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR ) or 276 (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND) or 277 (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND ))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0); 290 uint8_t priority0 = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR ) or 291 (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR ) or 292 (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR ) or 293 (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND ) or 294 (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND ) or 295 (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0); 278 296 uint8_t priority1 = (state == EVENT_TYPE_EXCEPTION)?1:0; 279 297 … … 405 423 406 424 // miss > excep > spr/sync 407 uint8_t priority0 = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR ) or 408 (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR ) or 409 (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND) or 410 (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND ))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0); 425 uint8_t priority0 = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR ) or 426 (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR ) or 427 (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR ) or 428 (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND ) or 429 (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND ) or 430 (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0); 411 431 uint8_t priority1 = (state == EVENT_TYPE_EXCEPTION)?1:2; // else load_miss_speculation (EVENT_TYPE_MISS_SPECULATION) 412 432 … … 437 457 { 438 458 case EVENT_TYPE_EXCEPTION : {state_next = CONTEXT_STATE_KO_EXCEP; break;} 439 case EVENT_TYPE_LOAD_MISS_SPECULATION : {state_next = CONTEXT_STATE_KO_MISS_LOAD_WAITEND; break;} 459 case EVENT_TYPE_LOAD_MISS_SPECULATION : 460 { 461 // Test if previous branch occure 462 if ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR ) or 463 (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND ) or 464 (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR ) or 465 (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND)) 466 state_next = CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND; 467 else 468 state_next = CONTEXT_STATE_KO_MISS_LOAD_WAITEND; 469 break; 470 } 440 471 case EVENT_TYPE_BRANCH_MISS_SPECULATION : 441 472 case EVENT_TYPE_SPR_ACCESS : … … 480 511 } 481 512 case CONTEXT_STATE_KO_MISS_BRANCH_ADDR: 513 482 514 // { 483 515 // reg_STATE [i] = CONTEXT_STATE_KO_MISS_WAITEND; //@@@ TODO : make MISS fast (miss decod) … … 489 521 { 490 522 reg_STATE [i] = CONTEXT_STATE_OK; 523 break; 524 } 525 case CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR: 526 { 527 reg_STATE [i] = CONTEXT_STATE_KO_MISS_LOAD_ADDR; 491 528 break; 492 529 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/src/test.cpp
r105 r108 71 71 ALLOC1_SC_SIGNAL(out_DECOD_NO_EXECUTE ,"out_DECOD_NO_EXECUTE ",Tcontrol_t ,_param->_nb_inst_decod); 72 72 ALLOC1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT ,"out_DECOD_IS_DELAY_SLOT ",Tcontrol_t ,_param->_nb_inst_decod); 73 #ifdef DEBUG 74 ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS ,"out_DECOD_ADDRESS ",Tgeneral_data_t ,_param->_nb_inst_decod); 75 #endif 73 76 ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT ,"out_DECOD_ADDRESS_NEXT ",Tgeneral_data_t ,_param->_nb_inst_decod); 74 77 ALLOC1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT ,"out_DECOD_HAS_IMMEDIAT ",Tcontrol_t ,_param->_nb_inst_decod); … … 148 151 INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_NO_EXECUTE ,_param->_nb_inst_decod); 149 152 INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_IS_DELAY_SLOT ,_param->_nb_inst_decod); 153 #ifdef DEBUG 154 INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_ADDRESS ,_param->_nb_inst_decod); 155 #endif 150 156 INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_ADDRESS_NEXT ,_param->_nb_inst_decod); 151 157 INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_HAS_IMMEDIAT ,_param->_nb_inst_decod); … … 450 456 delete [] out_DECOD_NO_EXECUTE ; 451 457 delete [] out_DECOD_IS_DELAY_SLOT ; 458 #ifdef DEBUG 459 delete [] out_DECOD_ADDRESS ; 460 #endif 452 461 delete [] out_DECOD_ADDRESS_NEXT ; 453 462 delete [] out_DECOD_HAS_IMMEDIAT ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Decod.h
r105 r108 88 88 public : SC_OUT(Tcontrol_t ) ** out_DECOD_NO_EXECUTE ;//[nb_inst_decod] 89 89 public : SC_OUT(Tcontrol_t ) ** out_DECOD_IS_DELAY_SLOT ;//[nb_inst_decod] 90 #ifdef DEBUG 91 public : SC_OUT(Tgeneral_data_t ) ** out_DECOD_ADDRESS ;//[nb_inst_decod] 92 #endif 90 93 public : SC_OUT(Tgeneral_data_t ) ** out_DECOD_ADDRESS_NEXT ;//[nb_inst_decod] 91 94 public : SC_OUT(Tcontrol_t ) ** out_DECOD_HAS_IMMEDIAT ;//[nb_inst_decod] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_allocation.cpp
r105 r108 89 89 ALLOC1_SIGNAL_OUT(out_DECOD_NO_EXECUTE ,"no_execute" ,Tcontrol_t ,1 ); 90 90 ALLOC1_SIGNAL_OUT(out_DECOD_IS_DELAY_SLOT,"is_delay_slot",Tcontrol_t ,1 ); 91 #ifdef DEBUG 92 ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS ,"address" ,Tgeneral_data_t ,_param->_size_instruction_address ); 93 #endif 91 94 ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS_NEXT ,"address_next" ,Tgeneral_data_t ,_param->_size_instruction_address ); 92 95 ALLOC1_SIGNAL_OUT(out_DECOD_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t ,1 ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_deallocation.cpp
r105 r108 49 49 DELETE1_SIGNAL(out_DECOD_NO_EXECUTE ,_param->_nb_inst_decod,1 ); 50 50 DELETE1_SIGNAL(out_DECOD_IS_DELAY_SLOT,_param->_nb_inst_decod,1 ); 51 #ifdef DEBUG 52 DELETE1_SIGNAL(out_DECOD_ADDRESS ,_param->_nb_inst_decod,_param->_size_instruction_address ); 53 #endif 51 54 DELETE1_SIGNAL(out_DECOD_ADDRESS_NEXT ,_param->_nb_inst_decod,_param->_size_instruction_address ); 52 55 DELETE1_SIGNAL(out_DECOD_HAS_IMMEDIAT ,_param->_nb_inst_decod,1 ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_genMealy.cpp
r107 r108 43 43 44 44 Tcontrol_t can_continue [_param->_nb_context]; 45 Tcontrol_t can_continue_next [_param->_nb_context]; 45 // Tcontrol_t can_continue_next [_param->_nb_context]; 46 // Tcontrol_t have_decod_branch [_param->_nb_context]; 46 47 47 48 for (uint32_t i=0; i<_param->_nb_context; i++) … … 52 53 53 54 can_continue [i] = PORT_READ(in_CONTEXT_DECOD_ENABLE [i]); 54 can_continue_next [i] = PORT_READ(in_CONTEXT_DECOD_ENABLE [i]); 55 // can_continue_next [i] = PORT_READ(in_CONTEXT_DECOD_ENABLE [i]); 56 // have_decod_branch [i] = false; 55 57 } 56 58 … … 79 81 log_printf(TRACE,Decod,FUNCTION," * decod_ack [%d] : %d",i,PORT_READ(in_DECOD_ACK [i])); 80 82 81 can_continue [x] = can_continue_next [x];83 // can_continue [x] = can_continue_next [x]; 82 84 83 85 decod_val [i] = true; // fetch_val and decod_enable … … 139 141 PORT_WRITE(out_DECOD_NO_EXECUTE [i], _decod_instruction->_no_execute ); 140 142 PORT_WRITE(out_DECOD_IS_DELAY_SLOT [i], _decod_instruction->_is_delay_slot ); 141 // PORT_WRITE(out_DECOD_ADDRESS [i], addr); 143 #ifdef DEBUG 144 PORT_WRITE(out_DECOD_ADDRESS [i], addr); 145 #endif 142 146 // if ((type == TYPE_BRANCH) and 143 147 // ((_decod_instruction->_branch_condition = BRANCH_CONDITION_FLAG_SET) or … … 193 197 194 198 //can_continue_next [x] = PORT_READ(in_PREDICT_CAN_CONTINUE [i]); // can continue is set if direction is "not take" (also, continue is sequential order) 195 can_continue_next [x] = false; // one branch per context, the DS don't execute 199 can_continue [x] = false; // one branch per context, the DS don't execute 200 // can_continue_next [x] = false; // one branch per context, the DS don't execute 201 // have_decod_branch [x] = true; 196 202 } 197 203 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/SelfTest/src/test.cpp
r105 r108 60 60 ALLOC1_SC_SIGNAL( in_DECOD_IN_NO_EXECUTE ," in_DECOD_IN_NO_EXECUTE ",Tcontrol_t ,_param->_nb_inst_decod); 61 61 ALLOC1_SC_SIGNAL( in_DECOD_IN_IS_DELAY_SLOT ," in_DECOD_IN_IS_DELAY_SLOT ",Tcontrol_t ,_param->_nb_inst_decod); 62 #ifdef DEBUG 63 ALLOC1_SC_SIGNAL( in_DECOD_IN_ADDRESS ," in_DECOD_IN_ADDRESS ",Tgeneral_data_t ,_param->_nb_inst_decod); 64 #endif 62 65 ALLOC1_SC_SIGNAL( in_DECOD_IN_ADDRESS_NEXT ," in_DECOD_IN_ADDRESS_NEXT ",Tgeneral_data_t ,_param->_nb_inst_decod); 63 66 ALLOC1_SC_SIGNAL( in_DECOD_IN_HAS_IMMEDIAT ," in_DECOD_IN_HAS_IMMEDIAT ",Tcontrol_t ,_param->_nb_inst_decod); … … 84 87 ALLOC1_SC_SIGNAL(out_DECOD_OUT_NO_EXECUTE ,"out_DECOD_OUT_NO_EXECUTE ",Tcontrol_t ,_param->_nb_inst_decod); 85 88 ALLOC1_SC_SIGNAL(out_DECOD_OUT_IS_DELAY_SLOT ,"out_DECOD_OUT_IS_DELAY_SLOT",Tcontrol_t ,_param->_nb_inst_decod); 89 #ifdef DEBUG 90 ALLOC1_SC_SIGNAL(out_DECOD_OUT_ADDRESS ,"out_DECOD_OUT_ADDRESS ",Tgeneral_data_t ,_param->_nb_inst_decod); 91 #endif 86 92 ALLOC1_SC_SIGNAL(out_DECOD_OUT_ADDRESS_NEXT ,"out_DECOD_OUT_ADDRESS_NEXT ",Tgeneral_data_t ,_param->_nb_inst_decod); 87 93 ALLOC1_SC_SIGNAL(out_DECOD_OUT_HAS_IMMEDIAT ,"out_DECOD_OUT_HAS_IMMEDIAT ",Tcontrol_t ,_param->_nb_inst_decod); … … 125 131 INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_NO_EXECUTE ,_param->_nb_inst_decod); 126 132 INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_IS_DELAY_SLOT ,_param->_nb_inst_decod); 133 #ifdef DEBUG 134 INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_ADDRESS ,_param->_nb_inst_decod); 135 #endif 127 136 INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_ADDRESS_NEXT ,_param->_nb_inst_decod); 128 137 INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_HAS_IMMEDIAT ,_param->_nb_inst_decod); … … 151 160 INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_NO_EXECUTE ,_param->_nb_inst_decod); 152 161 INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_IS_DELAY_SLOT ,_param->_nb_inst_decod); 162 #ifdef DEBUG 163 INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_ADDRESS ,_param->_nb_inst_decod); 164 #endif 153 165 INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_ADDRESS_NEXT ,_param->_nb_inst_decod); 154 166 INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_HAS_IMMEDIAT ,_param->_nb_inst_decod); … … 304 316 DELETE1_SC_SIGNAL( in_DECOD_IN_NO_EXECUTE ,_param->_nb_inst_decod); 305 317 DELETE1_SC_SIGNAL( in_DECOD_IN_IS_DELAY_SLOT ,_param->_nb_inst_decod); 318 #ifdef DEBUG 319 DELETE1_SC_SIGNAL( in_DECOD_IN_ADDRESS ,_param->_nb_inst_decod); 320 #endif 306 321 DELETE1_SC_SIGNAL( in_DECOD_IN_ADDRESS_NEXT ,_param->_nb_inst_decod); 307 322 DELETE1_SC_SIGNAL( in_DECOD_IN_HAS_IMMEDIAT ,_param->_nb_inst_decod); … … 328 343 DELETE1_SC_SIGNAL(out_DECOD_OUT_NO_EXECUTE ,_param->_nb_inst_decod); 329 344 DELETE1_SC_SIGNAL(out_DECOD_OUT_IS_DELAY_SLOT ,_param->_nb_inst_decod); 345 #ifdef DEBUG 346 DELETE1_SC_SIGNAL(out_DECOD_OUT_ADDRESS ,_param->_nb_inst_decod); 347 #endif 330 348 DELETE1_SC_SIGNAL(out_DECOD_OUT_ADDRESS_NEXT ,_param->_nb_inst_decod); 331 349 DELETE1_SC_SIGNAL(out_DECOD_OUT_HAS_IMMEDIAT ,_param->_nb_inst_decod); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Decod_queue.h
r105 r108 75 75 public : SC_IN (Tcontrol_t ) ** in_DECOD_IN_NO_EXECUTE ;//[nb_inst_decod] 76 76 public : SC_IN (Tcontrol_t ) ** in_DECOD_IN_IS_DELAY_SLOT ;//[nb_inst_decod] 77 #ifdef DEBUG 78 public : SC_IN (Tgeneral_data_t ) ** in_DECOD_IN_ADDRESS ;//[nb_inst_decod] 79 #endif 77 80 public : SC_IN (Tgeneral_data_t ) ** in_DECOD_IN_ADDRESS_NEXT ;//[nb_inst_decod] 78 81 public : SC_IN (Tcontrol_t ) ** in_DECOD_IN_HAS_IMMEDIAT ;//[nb_inst_decod] … … 100 103 public : SC_OUT(Tcontrol_t ) ** out_DECOD_OUT_NO_EXECUTE ;//[nb_inst_decod] 101 104 public : SC_OUT(Tcontrol_t ) ** out_DECOD_OUT_IS_DELAY_SLOT ;//[nb_inst_decod] 105 #ifdef DEBUG 106 public : SC_OUT(Tgeneral_data_t ) ** out_DECOD_OUT_ADDRESS ;//[nb_inst_decod] 107 #endif 102 108 public : SC_OUT(Tgeneral_data_t ) ** out_DECOD_OUT_ADDRESS_NEXT ;//[nb_inst_decod] 103 109 public : SC_OUT(Tcontrol_t ) ** out_DECOD_OUT_HAS_IMMEDIAT ;//[nb_inst_decod] … … 129 135 private : std::list<decod_queue_entry_t*>* reg_QUEUE ; 130 136 private : uint32_t * reg_NB_INST ;//[nb_context] 131 137 private : uint32_t reg_LAST_SLOT ; 138 132 139 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 133 140 private : Tcontrol_t * internal_DECOD_IN_ACK ;//[nb_inst_decod] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Types.h
r105 r108 30 30 public : Tcontrol_t * _no_execute ; 31 31 public : Tcontrol_t * _is_delay_slot ; 32 #ifdef DEBUG 33 public : Tgeneral_data_t * _address ; 34 #endif 32 35 public : Tgeneral_data_t * _address_next ; 33 36 public : Tcontrol_t * _has_immediat ; … … 56 59 _no_execute = new Tcontrol_t [_nb_inst]; 57 60 _is_delay_slot = new Tcontrol_t [_nb_inst]; 61 #ifdef DEBUG 62 _address = new Tgeneral_data_t [_nb_inst]; 63 #endif 58 64 _address_next = new Tgeneral_data_t [_nb_inst]; 59 65 _has_immediat = new Tcontrol_t [_nb_inst]; … … 85 91 delete [] _no_execute ; 86 92 delete [] _is_delay_slot ; 93 #ifdef DEBUG 94 delete [] _address ; 95 #endif 87 96 delete [] _address_next ; 88 97 delete [] _has_immediat ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_allocation.cpp
r105 r108 67 67 ALLOC1_SIGNAL_IN ( in_DECOD_IN_NO_EXECUTE ,"no_execute" ,Tcontrol_t ,1 ); 68 68 ALLOC1_SIGNAL_IN ( in_DECOD_IN_IS_DELAY_SLOT ,"is_delay_slot",Tcontrol_t ,1 ); 69 #ifdef DEBUG 70 ALLOC1_SIGNAL_IN ( in_DECOD_IN_ADDRESS ,"address" ,Tgeneral_data_t ,_param->_size_instruction_address ); 71 #endif 69 72 ALLOC1_SIGNAL_IN ( in_DECOD_IN_ADDRESS_NEXT ,"address_next" ,Tgeneral_data_t ,_param->_size_instruction_address ); 70 73 ALLOC1_SIGNAL_IN ( in_DECOD_IN_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t ,1 ); … … 96 99 ALLOC1_SIGNAL_OUT(out_DECOD_OUT_NO_EXECUTE ,"no_execute" ,Tcontrol_t ,1 ); 97 100 ALLOC1_SIGNAL_OUT(out_DECOD_OUT_IS_DELAY_SLOT ,"is_delay_slot",Tcontrol_t ,1 ); 101 #ifdef DEBUG 102 ALLOC1_SIGNAL_OUT(out_DECOD_OUT_ADDRESS ,"address" ,Tgeneral_data_t ,_param->_size_instruction_address ); 103 #endif 98 104 ALLOC1_SIGNAL_OUT(out_DECOD_OUT_ADDRESS_NEXT ,"address_next" ,Tgeneral_data_t ,_param->_size_instruction_address ); 99 105 ALLOC1_SIGNAL_OUT(out_DECOD_OUT_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t ,1 ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_deallocation.cpp
r105 r108 37 37 DELETE1_SIGNAL( in_DECOD_IN_NO_EXECUTE ,_param->_nb_inst_decod,1 ); 38 38 DELETE1_SIGNAL( in_DECOD_IN_IS_DELAY_SLOT ,_param->_nb_inst_decod,1 ); 39 #ifdef DEBUG 40 DELETE1_SIGNAL( in_DECOD_IN_ADDRESS ,_param->_nb_inst_decod,_param->_size_instruction_address ); 41 #endif 39 42 DELETE1_SIGNAL( in_DECOD_IN_ADDRESS_NEXT ,_param->_nb_inst_decod,_param->_size_instruction_address ); 40 43 DELETE1_SIGNAL( in_DECOD_IN_HAS_IMMEDIAT ,_param->_nb_inst_decod,1 ); … … 61 64 DELETE1_SIGNAL(out_DECOD_OUT_NO_EXECUTE ,_param->_nb_inst_decod,1 ); 62 65 DELETE1_SIGNAL(out_DECOD_OUT_IS_DELAY_SLOT ,_param->_nb_inst_decod,1 ); 66 #ifdef DEBUG 67 DELETE1_SIGNAL(out_DECOD_OUT_ADDRESS ,_param->_nb_inst_decod,_param->_size_instruction_address ); 68 #endif 63 69 DELETE1_SIGNAL(out_DECOD_OUT_ADDRESS_NEXT ,_param->_nb_inst_decod,_param->_size_instruction_address ); 64 70 DELETE1_SIGNAL(out_DECOD_OUT_HAS_IMMEDIAT ,_param->_nb_inst_decod,1 ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMealy_decod_out.cpp
r106 r108 35 35 if (not reg_QUEUE->empty()) 36 36 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 37 if (reg_QUEUE->front()->_val [i]) 38 { 39 log_printf(TRACE,Decod_queue,FUNCTION,_(" * Queue is not empty, slot [%d] is valid."),i); 37 { 38 uint32_t index = reg_LAST_SLOT + i; 40 39 41 Tcontext_t context = reg_QUEUE->front()->_context_id [i]; 42 Tdepth_t depth = reg_QUEUE->front()->_depth [i]; 43 Tdepth_t depth_min = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [context]):0; 44 Tdepth_t depth_max = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX [context]):0; 45 Tcontrol_t depth_full = PORT_READ(in_DEPTH_FULL[context]); 40 // Stop 41 if (index >= _param->_nb_inst_decod) 42 break; 46 43 47 // is a valid instruction ? 48 // If DEPTH_CURRENT : 49 // equal at DEPTH_MIN -> not speculative 50 // not include ]DEPTH_MIN:DEPTH_MAX] -> previous branch miss 51 // include ]DEPTH_MIN:DEPTH_MAX] -> speculative 44 if (reg_QUEUE->front()->_val [index]) 45 { 46 log_printf(TRACE,Decod_queue,FUNCTION,_(" * Queue is not empty, slot [%d] is valid."),i); 47 48 Tcontext_t context = reg_QUEUE->front()->_context_id [index]; 49 Tdepth_t depth = reg_QUEUE->front()->_depth [index]; 50 Tdepth_t depth_min = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [context]):0; 51 Tdepth_t depth_max = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX [context]):0; 52 Tcontrol_t depth_full = PORT_READ(in_DEPTH_FULL[context]); 52 53 53 // All case 54 // ....... min ...X... max ....... OK 55 // ....... min ....... max ...X... KO 56 // ...X... min ....... max ....... KO 57 // ....... max ....... min ...X... OK 58 // ...X... max ....... min ....... OK 59 // ....... max ...X... min ....... KO 54 // is a valid instruction ? 55 // If DEPTH_CURRENT : 56 // equal at DEPTH_MIN -> not speculative 57 // not include ]DEPTH_MIN:DEPTH_MAX] -> previous branch miss 58 // include ]DEPTH_MIN:DEPTH_MAX] -> speculative 59 60 // All case 61 // ....... min ...X... max ....... OK 62 // ....... min ....... max ...X... KO 63 // ...X... min ....... max ....... KO 64 // ....... max ....... min ...X... OK 65 // ...X... max ....... min ....... OK 66 // ....... max ...X... min ....... KO 67 68 Tcontrol_t is_valid = ((depth == depth_min) or 69 depth_full or 70 ((depth_min <= depth_max)? 71 ((depth >= depth_min) and (depth <=depth_max)): 72 ((depth >= depth_min) or (depth <=depth_max)))); 73 //Tcontrol_t is_valid = ((depth == depth_min) or 74 // ((depth_min < depth_max)? 75 // (depth<=depth_max): 76 // ((depth > depth_min) or (depth <= depth_max)))); 77 //Tcontrol_t is_valid = depth <= depth_max; 60 78 61 Tcontrol_t is_valid = ((depth == depth_min) or 62 depth_full or 63 ((depth_min <= depth_max)? 64 ((depth >= depth_min) and (depth <=depth_max)): 65 ((depth >= depth_min) or (depth <=depth_max)))); 66 // Tcontrol_t is_valid = ((depth == depth_min) or 67 // ((depth_min < depth_max)? 68 // (depth<=depth_max): 69 // ((depth > depth_min) or (depth <= depth_max)))); 70 // Tcontrol_t is_valid = depth <= depth_max; 71 72 log_printf(TRACE,Decod_queue,FUNCTION," * is_valid : %d",is_valid); 73 log_printf(TRACE,Decod_queue,FUNCTION," * context : %d",context); 74 log_printf(TRACE,Decod_queue,FUNCTION," * depth : %d",depth); 75 log_printf(TRACE,Decod_queue,FUNCTION," * depth_min : %d",depth_min); 76 log_printf(TRACE,Decod_queue,FUNCTION," * depth_max : %d",depth_max); 77 log_printf(TRACE,Decod_queue,FUNCTION," * depth_full : %d",depth_full); 78 log_printf(TRACE,Decod_queue,FUNCTION," * address_next : 0x%x (0x%x)",reg_QUEUE->front()->_address_next[i],reg_QUEUE->front()->_address_next[i]<<2); 79 internal_DECOD_OUT_VAL [i] = 1; // in all case, val is set (entry is not empty, and instruction is valid) 80 if (is_valid) 81 { 82 val [i] = 1; 83 internal_DECOD_OUT_ACK [i] = PORT_READ(in_DECOD_OUT_ACK [i]); 84 } 85 else 86 { 87 // Consume the instruction (to erase) 88 internal_DECOD_OUT_ACK [i] = 1; 89 } 90 } 79 log_printf(TRACE,Decod_queue,FUNCTION," * is_valid : %d",is_valid); 80 log_printf(TRACE,Decod_queue,FUNCTION," * context : %d",context); 81 log_printf(TRACE,Decod_queue,FUNCTION," * depth : %d",depth); 82 log_printf(TRACE,Decod_queue,FUNCTION," * depth_min : %d",depth_min); 83 log_printf(TRACE,Decod_queue,FUNCTION," * depth_max : %d",depth_max); 84 log_printf(TRACE,Decod_queue,FUNCTION," * depth_full : %d",depth_full); 85 #ifdef DEBUG 86 log_printf(TRACE,Decod_queue,FUNCTION," * address : 0x%x (0x%x)",reg_QUEUE->front()->_address [index],reg_QUEUE->front()->_address [index]<<2); 87 #endif 88 log_printf(TRACE,Decod_queue,FUNCTION," * address_next : 0x%x (0x%x)",reg_QUEUE->front()->_address_next[index],reg_QUEUE->front()->_address_next[index]<<2); 89 internal_DECOD_OUT_VAL [index] = 1; // in all case, val is set (entry is not empty, and instruction is valid) 90 if (is_valid) 91 { 92 val [i] = 1; 93 internal_DECOD_OUT_ACK [index] = PORT_READ(in_DECOD_OUT_ACK [i]); 94 } 95 else 96 { 97 // Consume the instruction (to erase) 98 internal_DECOD_OUT_ACK [index] = 1; 99 } 100 } 101 } 91 102 92 103 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 93 104 { 94 105 log_printf(TRACE,Decod_queue,FUNCTION," * DECOD_OUT_VAL : %d",val [i]); 95 96 106 107 PORT_WRITE(out_DECOD_OUT_VAL [i],val [i]); 97 108 } 98 109 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMoore.cpp
r105 r108 44 44 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 45 45 { 46 uint32_t index = reg_LAST_SLOT + i; 47 48 // Stop 49 if (index >= _param->_nb_inst_decod) 50 break; 51 46 52 if (_param->_have_port_context_id) 47 PORT_WRITE(out_DECOD_OUT_CONTEXT_ID [i],reg_QUEUE->front()->_context_id [i ]);53 PORT_WRITE(out_DECOD_OUT_CONTEXT_ID [i],reg_QUEUE->front()->_context_id [index]); 48 54 if (_param->_have_port_depth) 49 PORT_WRITE(out_DECOD_OUT_DEPTH [i],reg_QUEUE->front()->_depth [i]); 50 PORT_WRITE(out_DECOD_OUT_TYPE [i],reg_QUEUE->front()->_type [i]); 51 PORT_WRITE(out_DECOD_OUT_OPERATION [i],reg_QUEUE->front()->_operation [i]); 52 PORT_WRITE(out_DECOD_OUT_NO_EXECUTE [i],reg_QUEUE->front()->_no_execute [i]); 53 PORT_WRITE(out_DECOD_OUT_IS_DELAY_SLOT [i],reg_QUEUE->front()->_is_delay_slot [i]); 54 PORT_WRITE(out_DECOD_OUT_ADDRESS_NEXT [i],reg_QUEUE->front()->_address_next [i]); 55 PORT_WRITE(out_DECOD_OUT_HAS_IMMEDIAT [i],reg_QUEUE->front()->_has_immediat [i]); 56 PORT_WRITE(out_DECOD_OUT_IMMEDIAT [i],reg_QUEUE->front()->_immediat [i]); 57 PORT_WRITE(out_DECOD_OUT_READ_RA [i],reg_QUEUE->front()->_read_ra [i]); 58 PORT_WRITE(out_DECOD_OUT_NUM_REG_RA [i],reg_QUEUE->front()->_num_reg_ra [i]); 59 PORT_WRITE(out_DECOD_OUT_READ_RB [i],reg_QUEUE->front()->_read_rb [i]); 60 PORT_WRITE(out_DECOD_OUT_NUM_REG_RB [i],reg_QUEUE->front()->_num_reg_rb [i]); 61 PORT_WRITE(out_DECOD_OUT_READ_RC [i],reg_QUEUE->front()->_read_rc [i]); 62 PORT_WRITE(out_DECOD_OUT_NUM_REG_RC [i],reg_QUEUE->front()->_num_reg_rc [i]); 63 PORT_WRITE(out_DECOD_OUT_WRITE_RD [i],reg_QUEUE->front()->_write_rd [i]); 64 PORT_WRITE(out_DECOD_OUT_NUM_REG_RD [i],reg_QUEUE->front()->_num_reg_rd [i]); 65 PORT_WRITE(out_DECOD_OUT_WRITE_RE [i],reg_QUEUE->front()->_write_re [i]); 66 PORT_WRITE(out_DECOD_OUT_NUM_REG_RE [i],reg_QUEUE->front()->_num_reg_re [i]); 67 PORT_WRITE(out_DECOD_OUT_EXCEPTION_USE [i],reg_QUEUE->front()->_exception_use [i]); 68 PORT_WRITE(out_DECOD_OUT_EXCEPTION [i],reg_QUEUE->front()->_exception [i]); 55 PORT_WRITE(out_DECOD_OUT_DEPTH [i],reg_QUEUE->front()->_depth [index]); 56 PORT_WRITE(out_DECOD_OUT_TYPE [i],reg_QUEUE->front()->_type [index]); 57 PORT_WRITE(out_DECOD_OUT_OPERATION [i],reg_QUEUE->front()->_operation [index]); 58 PORT_WRITE(out_DECOD_OUT_NO_EXECUTE [i],reg_QUEUE->front()->_no_execute [index]); 59 PORT_WRITE(out_DECOD_OUT_IS_DELAY_SLOT [i],reg_QUEUE->front()->_is_delay_slot [index]); 60 #ifdef DEBUG 61 PORT_WRITE(out_DECOD_OUT_ADDRESS [i],reg_QUEUE->front()->_address [index]); 62 #endif 63 PORT_WRITE(out_DECOD_OUT_ADDRESS_NEXT [i],reg_QUEUE->front()->_address_next [index]); 64 PORT_WRITE(out_DECOD_OUT_HAS_IMMEDIAT [i],reg_QUEUE->front()->_has_immediat [index]); 65 PORT_WRITE(out_DECOD_OUT_IMMEDIAT [i],reg_QUEUE->front()->_immediat [index]); 66 PORT_WRITE(out_DECOD_OUT_READ_RA [i],reg_QUEUE->front()->_read_ra [index]); 67 PORT_WRITE(out_DECOD_OUT_NUM_REG_RA [i],reg_QUEUE->front()->_num_reg_ra [index]); 68 PORT_WRITE(out_DECOD_OUT_READ_RB [i],reg_QUEUE->front()->_read_rb [index]); 69 PORT_WRITE(out_DECOD_OUT_NUM_REG_RB [i],reg_QUEUE->front()->_num_reg_rb [index]); 70 PORT_WRITE(out_DECOD_OUT_READ_RC [i],reg_QUEUE->front()->_read_rc [index]); 71 PORT_WRITE(out_DECOD_OUT_NUM_REG_RC [i],reg_QUEUE->front()->_num_reg_rc [index]); 72 PORT_WRITE(out_DECOD_OUT_WRITE_RD [i],reg_QUEUE->front()->_write_rd [index]); 73 PORT_WRITE(out_DECOD_OUT_NUM_REG_RD [i],reg_QUEUE->front()->_num_reg_rd [index]); 74 PORT_WRITE(out_DECOD_OUT_WRITE_RE [i],reg_QUEUE->front()->_write_re [index]); 75 PORT_WRITE(out_DECOD_OUT_NUM_REG_RE [i],reg_QUEUE->front()->_num_reg_re [index]); 76 PORT_WRITE(out_DECOD_OUT_EXCEPTION_USE [i],reg_QUEUE->front()->_exception_use [index]); 77 PORT_WRITE(out_DECOD_OUT_EXCEPTION [i],reg_QUEUE->front()->_exception [index]); 69 78 } 70 79 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_transition.cpp
r105 r108 31 31 for (uint32_t i=0; i<_param->_nb_context; i++) 32 32 reg_NB_INST [i]=0; 33 34 reg_LAST_SLOT = 0; 33 35 } 34 36 else … … 62 64 entry->_no_execute [i] = PORT_READ(in_DECOD_IN_NO_EXECUTE [i]); 63 65 entry->_is_delay_slot [i] = PORT_READ(in_DECOD_IN_IS_DELAY_SLOT [i]); 66 #ifdef DEBUG 67 entry->_address [i] = PORT_READ(in_DECOD_IN_ADDRESS [i]); 68 #endif 64 69 entry->_address_next [i] = PORT_READ(in_DECOD_IN_ADDRESS_NEXT [i]); 65 70 entry->_has_immediat [i] = PORT_READ(in_DECOD_IN_HAS_IMMEDIAT [i]); … … 90 95 if (not reg_QUEUE->empty()) 91 96 { 92 bool find = false;97 bool find = false; 93 98 94 99 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 95 100 { 96 101 // Test transaction : if ok then invalid slot 102 // In order by rename logic 97 103 if (internal_DECOD_OUT_VAL [i] and internal_DECOD_OUT_ACK[i]) 98 104 { 99 105 log_printf(TRACE,Decod_queue,FUNCTION,_(" * DECOD_OUT [%d]"),i); 100 106 107 #ifdef DEBUG_TEST 108 if (reg_LAST_SLOT != i) 109 throw ERRORMORPHEO(FUNCTION,toString(_("reg_LAST_SLOT (%d) is different at decod_out port (%d)."),reg_LAST_SLOT,i)); 110 #endif 111 reg_LAST_SLOT ++; 112 101 113 reg_QUEUE->front()->_val [i] = 0; 102 114 … … 108 120 } 109 121 // Test if slot is (again) valid, if yes, then have less one instruction in the entry 110 find |= reg_QUEUE->front()->_val [i];122 find |= reg_QUEUE->front()->_val [i]; 111 123 } 112 124 113 // test if can free the entry 114 125 // test if can free the entry : test if have consume all entry 126 if (not find) // no valid instruction in current slot 115 127 { 116 128 log_printf(TRACE,Decod_queue,FUNCTION,_(" * POP queue")); … … 119 131 delete reg_QUEUE->front(); 120 132 reg_QUEUE->pop_front(); 133 134 reg_LAST_SLOT = 0; 121 135 } 122 136 } … … 125 139 #if defined(DEBUG) and defined(DEBUG_Decod_queue) and (DEBUG >= DEBUG_TRACE) 126 140 log_printf(TRACE,Decod_queue,FUNCTION," * Dump decod_queue"); 141 log_printf(TRACE,Decod_queue,FUNCTION," * reg_LAST_SLOT : %d",reg_LAST_SLOT); 127 142 uint32_t x=0; 128 143 for (std::list<decod_queue_entry_t*>::iterator it=reg_QUEUE->begin(); … … 144 159 ,(*it)->_no_execute [i] 145 160 ,(*it)->_is_delay_slot [i] 146 ,(*it)->_address _next[i]147 ,(*it)->_address _next[i]<<2161 ,(*it)->_address [i] 162 ,(*it)->_address [i]<<2 148 163 ,(*it)->_has_immediat [i] 149 164 ,(*it)->_immediat [i] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/SelfTest/src/test.cpp
r105 r108 73 73 ALLOC1_SC_SIGNAL(out_DECOD_NO_EXECUTE ,"out_DECOD_NO_EXECUTE ",Tcontrol_t ,_param->_nb_inst_decod); 74 74 ALLOC1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT ,"out_DECOD_IS_DELAY_SLOT ",Tcontrol_t ,_param->_nb_inst_decod); 75 #ifdef DEBUG 76 ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS ,"out_DECOD_ADDRESS ",Tgeneral_data_t ,_param->_nb_inst_decod); 77 #endif 75 78 ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT ,"out_DECOD_ADDRESS_NEXT ",Tgeneral_data_t ,_param->_nb_inst_decod); 76 79 ALLOC1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT ,"out_DECOD_HAS_IMMEDIAT ",Tcontrol_t ,_param->_nb_inst_decod); … … 159 162 INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_NO_EXECUTE ,_param->_nb_inst_decod); 160 163 INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_IS_DELAY_SLOT ,_param->_nb_inst_decod); 164 #ifdef DEBUG 165 INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_ADDRESS ,_param->_nb_inst_decod); 166 #endif 161 167 INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_ADDRESS_NEXT ,_param->_nb_inst_decod); 162 168 INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_HAS_IMMEDIAT ,_param->_nb_inst_decod); … … 490 496 DELETE1_SC_SIGNAL(out_DECOD_NO_EXECUTE ,_param->_nb_inst_decod); 491 497 DELETE1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT ,_param->_nb_inst_decod); 498 #ifdef DEBUG 499 DELETE1_SC_SIGNAL(out_DECOD_ADDRESS ,_param->_nb_inst_decod); 500 #endif 492 501 DELETE1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT ,_param->_nb_inst_decod); 493 502 DELETE1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT ,_param->_nb_inst_decod); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/include/Decod_unit.h
r105 r108 87 87 public : SC_OUT(Tcontrol_t ) ** out_DECOD_NO_EXECUTE ;//[nb_inst_decod] 88 88 public : SC_OUT(Tcontrol_t ) ** out_DECOD_IS_DELAY_SLOT ;//[nb_inst_decod] 89 #ifdef DEBUG 90 public : SC_OUT(Tgeneral_data_t ) ** out_DECOD_ADDRESS ;//[nb_inst_decod] 91 #endif 89 92 public : SC_OUT(Tgeneral_data_t ) ** out_DECOD_ADDRESS_NEXT ;//[nb_inst_decod] 90 93 public : SC_OUT(Tcontrol_t ) ** out_DECOD_HAS_IMMEDIAT ;//[nb_inst_decod] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_allocation.cpp
r105 r108 89 89 ALLOC1_SIGNAL_OUT(out_DECOD_NO_EXECUTE ,"no_execute" ,Tcontrol_t ,1 ); 90 90 ALLOC1_SIGNAL_OUT(out_DECOD_IS_DELAY_SLOT,"is_delay_slot",Tcontrol_t ,1 ); 91 #ifdef DEBUG 92 ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS ,"address" ,Tgeneral_data_t ,_param->_size_instruction_address ); 93 #endif 91 94 ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS_NEXT ,"address_next" ,Tgeneral_data_t ,_param->_size_instruction_address ); 92 95 ALLOC1_SIGNAL_OUT(out_DECOD_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t ,1 ); … … 293 296 COMPONENT_MAP(_component,src ,"out_DECOD_" +toString(i)+"_IS_DELAY_SLOT", 294 297 dest, "in_DECOD_IN_"+toString(i)+"_IS_DELAY_SLOT"); 298 #ifdef DEBUG 299 COMPONENT_MAP(_component,src ,"out_DECOD_" +toString(i)+"_ADDRESS" , 300 dest, "in_DECOD_IN_"+toString(i)+"_ADDRESS" ); 301 #endif 295 302 COMPONENT_MAP(_component,src ,"out_DECOD_" +toString(i)+"_ADDRESS_NEXT" , 296 303 dest, "in_DECOD_IN_"+toString(i)+"_ADDRESS_NEXT" ); … … 435 442 // in_DECOD_IN_NO_EXECUTE - component decod 436 443 // in_DECOD_IN_IS_DELAY_SLOT - component decod 444 // in_DECOD_IN_ADDRESS - component decod 437 445 // in_DECOD_IN_ADDRESS_NEXT - component decod 438 446 // in_DECOD_IN_HAS_IMMEDIAT - component decod … … 478 486 PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_IS_DELAY_SLOT", 479 487 dest,"out_DECOD_" +toString(i)+"_IS_DELAY_SLOT"); 488 #ifdef DEBUG 489 PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_ADDRESS" , 490 dest,"out_DECOD_" +toString(i)+"_ADDRESS" ); 491 #endif 480 492 PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_ADDRESS_NEXT" , 481 493 dest,"out_DECOD_" +toString(i)+"_ADDRESS_NEXT" ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_deallocation.cpp
r105 r108 48 48 DELETE1_SIGNAL(out_DECOD_NO_EXECUTE ,_param->_nb_inst_decod,1 ); 49 49 DELETE1_SIGNAL(out_DECOD_IS_DELAY_SLOT ,_param->_nb_inst_decod,1 ); 50 #ifdef DEBUG 51 DELETE1_SIGNAL(out_DECOD_ADDRESS ,_param->_nb_inst_decod,_param->_size_instruction_address ); 52 #endif 50 53 DELETE1_SIGNAL(out_DECOD_ADDRESS_NEXT ,_param->_nb_inst_decod,_param->_size_instruction_address ); 51 54 DELETE1_SIGNAL(out_DECOD_HAS_IMMEDIAT ,_param->_nb_inst_decod,1 ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/SelfTest/config-context_1-decod_unit_1.cfg
r88 r108 8 8 2 2 +1 # size_depth [0] [nb_context] 9 9 4 4 +1 # nb_branch_speculated [0] [nb_context] 10 4 4 +1 # size_nb_inst_decod -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/SelfTest/config-context_4-decod_unit_1.cfg
r88 r108 17 17 2 2 +1 # nb_branch_speculated [2] [nb_context] 18 18 8 8 +1 # nb_branch_speculated [3] [nb_context] 19 4 4 +1 # size_nb_inst_decod -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/SelfTest/config-context_4-decod_unit_2-a.cfg
r88 r108 18 18 2 2 +1 # nb_branch_speculated [2] [nb_context] 19 19 8 8 +1 # nb_branch_speculated [3] [nb_context] 20 4 4 +1 # size_nb_inst_decod -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/SelfTest/config-context_4-decod_unit_2-b.cfg
r88 r108 18 18 2 2 +1 # nb_branch_speculated [2] [nb_context] 19 19 8 8 +1 # nb_branch_speculated [3] [nb_context] 20 4 4 +1 # size_nb_inst_decod -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/SelfTest/config-context_4-decod_unit_4.cfg
r88 r108 20 20 2 2 +1 # nb_branch_speculated [2] [nb_context] 21 21 8 8 +1 # nb_branch_speculated [3] [nb_context] 22 4 4 +1 # size_nb_inst_decod -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/SelfTest/config-min.cfg
r88 r108 8 8 0 0 +1 # size_depth [0] [nb_context] 9 9 1 1 +1 # nb_branch_speculated [0] [nb_context] 10 1 1 +1 # size_nb_inst_decod -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/SelfTest/src/main.cpp
r88 r108 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/SelfTest/include/test.h" 9 9 10 #define NB_PARAMS 410 #define NB_PARAMS 5 11 11 12 12 void usage (int argc, char * argv[]) … … 22 22 err (_(" * size_depth [nb_context] (uint32_t)\n")); 23 23 err (_(" * nb_branch_speculated [nb_context] (uint32_t)\n")); 24 err (_(" * size_nb_inst_decod (uint32_t)\n")); 24 25 25 26 exit (1); … … 69 70 _nb_branch_speculated [i] = fromString<uint32_t>(argv[x++]); 70 71 72 uint32_t _size_nb_inst_decod = fromString<uint32_t>(argv[x++]); 73 71 74 std::vector<uint32_t> * _translate_context_id_from_decod_unit = new std::vector<uint32_t> [_nb_decod_unit]; 72 75 … … 87 90 _size_depth , 88 91 _nb_branch_speculated , 92 _size_nb_inst_decod , 89 93 true // is_toplevel 90 94 ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/SelfTest/src/test.cpp
r101 r108 104 104 ALLOC2_SC_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH_VAL ,"out_CONTEXT_DECOD_UNIT_DEPTH_VAL ",Tcontrol_t,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 105 105 ALLOC2_SC_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH ,"out_CONTEXT_DECOD_UNIT_DEPTH ",Tdepth_t ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 106 107 ALLOC1_SC_SIGNAL(out_NB_INST_DECOD_ALL ,"out_NB_INST_DECOD_ALL ",Tcounter_t,_param->_nb_context); 108 ALLOC1_SC_SIGNAL( in_NB_INST_DECOD_UNIT_DECOD_ALL ," in_NB_INST_DECOD_UNIT_DECOD_ALL ",Tcounter_t,_param->_nb_context); 109 ALLOC1_SC_SIGNAL(out_NB_INST_CONTEXT_STATE_DECOD_ALL ,"out_NB_INST_CONTEXT_STATE_DECOD_ALL ",Tcounter_t,_param->_nb_context); 106 110 107 111 /******************************************************** … … 182 186 } 183 187 188 INSTANCE1_SC_SIGNAL(_Front_end_Glue,out_NB_INST_DECOD_ALL ,_param->_nb_context); 189 INSTANCE1_SC_SIGNAL(_Front_end_Glue, in_NB_INST_DECOD_UNIT_DECOD_ALL ,_param->_nb_context); 190 INSTANCE1_SC_SIGNAL(_Front_end_Glue,out_NB_INST_CONTEXT_STATE_DECOD_ALL ,_param->_nb_context); 191 184 192 msg(_("<%s> : Start Simulation ............\n"),name.c_str()); 185 193 … … 282 290 DELETE2_SC_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH_VAL ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 283 291 DELETE2_SC_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 292 293 DELETE1_SC_SIGNAL(out_NB_INST_DECOD_ALL ,_param->_nb_context); 294 DELETE1_SC_SIGNAL( in_NB_INST_DECOD_UNIT_DECOD_ALL ,_param->_nb_context); 295 DELETE1_SC_SIGNAL(out_NB_INST_CONTEXT_STATE_DECOD_ALL ,_param->_nb_context); 284 296 } 285 297 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/include/Front_end_Glue.h
r101 r108 133 133 public : SC_OUT(Tcontrol_t ) *** out_CONTEXT_DECOD_UNIT_DEPTH_VAL ;//[nb_decod_unit][nb_decod_unit_context] 134 134 public : SC_OUT(Tdepth_t ) *** out_CONTEXT_DECOD_UNIT_DEPTH ;//[nb_decod_unit][nb_decod_unit_context] 135 136 // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 137 public : SC_OUT(Tcounter_t ) ** out_NB_INST_DECOD_ALL ;//[nb_context] 138 139 public : SC_IN (Tcounter_t ) ** in_NB_INST_DECOD_UNIT_DECOD_ALL ;//[nb_context] 140 141 public : SC_OUT(Tcounter_t ) ** out_NB_INST_CONTEXT_STATE_DECOD_ALL ;//[nb_context] 142 135 143 136 144 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 177 185 public : void genMealy_event (void); 178 186 public : void genMealy_depth (void); 187 public : void genMealy_nb_inst (void); 179 188 #endif 180 189 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/include/Parameters.h
r88 r108 54 54 uint32_t * size_depth , 55 55 uint32_t * nb_branch_speculated , 56 uint32_t size_nb_inst_decod , 56 57 uint32_t is_toplevel=false); 57 58 // public : Parameters (Parameters & param) ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue.cpp
r101 r108 176 176 # endif 177 177 178 log_printf(INFO,Front_end_Glue,FUNCTION,_("<%s> : Method - genMealy_nb_inst"),_name.c_str()); 179 180 SC_METHOD (genMealy_nb_inst); 181 dont_initialize (); 182 // sensitive << (*(in_CLOCK)).neg(); // don't need internal register 183 for (uint32_t i=0; i<_param->_nb_context; ++i) 184 sensitive << (*( in_NB_INST_DECOD_UNIT_DECOD_ALL [i])); 185 186 # ifdef SYSTEMCASS_SPECIFIC 187 // List dependency information 188 # endif 178 189 179 190 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_allocation.cpp
r101 r108 155 155 _ALLOC2_SIGNAL_OUT(out_CONTEXT_DECOD_UNIT_DEPTH ,"DECOD_UNIT_DEPTH" ,Tdepth_t ,_param->_size_depth ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 156 156 } 157 157 158 // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 159 { 160 ALLOC1_INTERFACE("nb_inst",OUT,EAST,_("nb inst"),_param->_nb_context); 161 162 ALLOC1_SIGNAL_OUT(out_NB_INST_DECOD_ALL ,"DECOD_ALL" ,Tcounter_t ,_param->_size_nb_inst_decod); 163 ALLOC1_SIGNAL_IN ( in_NB_INST_DECOD_UNIT_DECOD_ALL ,"DECOD_UNIT_DECOD_ALL" ,Tcounter_t ,_param->_size_nb_inst_decod); 164 ALLOC1_SIGNAL_OUT(out_NB_INST_CONTEXT_STATE_DECOD_ALL ,"CONTEXT_STATE_DECOD_ALL" ,Tcounter_t ,_param->_size_nb_inst_decod); 165 } 166 158 167 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 159 168 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_deallocation.cpp
r101 r108 87 87 DELETE2_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH_VAL ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1],1); 88 88 DELETE2_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1],_param->_size_depth); 89 90 DELETE1_SIGNAL(out_NB_INST_DECOD_ALL ,_param->_nb_context,_param->_size_nb_inst_decod); 91 DELETE1_SIGNAL( in_NB_INST_DECOD_UNIT_DECOD_ALL ,_param->_nb_context,_param->_size_nb_inst_decod); 92 DELETE1_SIGNAL(out_NB_INST_CONTEXT_STATE_DECOD_ALL ,_param->_nb_context,_param->_size_nb_inst_decod); 89 93 } 90 94 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Parameters.cpp
r88 r108 28 28 uint32_t * size_depth , 29 29 uint32_t * nb_branch_speculated , 30 uint32_t size_nb_inst_decod , 30 31 uint32_t is_toplevel): 31 32 morpheo::behavioural::Parameters() … … 55 56 _size_instruction_address = size_address; 56 57 _size_depth = max<uint32_t>(size_depth,_nb_context); 57 58 _size_nb_inst_decod = size_nb_inst_decod; 59 58 60 _have_port_context_id = _size_context_id > 0; 59 61 _have_port_depth = _size_depth > 0; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_predict.cpp
r98 r108 28 28 { 29 29 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * PREDICT [%d]",i); 30 31 Tcontrol_t val = PORT_READ(in_PREDICT_VAL [i]); 32 Tcontrol_t register_ack = PORT_READ(in_PREDICT_REGISTER_ACK [i]); 33 Tcontrol_t sort_val = (_param->_have_port_victim)?PORT_READ(in_PREDICT_SORT_VAL [i]):true; 34 Tcontrol_t victim_ack = (_param->_have_port_victim)?PORT_READ(in_PREDICT_VICTIM_ACK [i]):true; 35 36 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * val : %d",val ); 37 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * register_ack : %d",register_ack); 38 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * sort_val : %d",sort_val ); 39 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * victim_ack : %d",victim_ack ); 40 30 41 Tptr_t index = (_param->_have_port_victim)?PORT_READ(in_PREDICT_SORT_INDEX [i]):0; 31 Tcontrol_t hit = PORT_READ(in_PREDICT_REGISTER_HIT [i][index]); 42 Tcontrol_t hit = // (_param->_have_port_victim)?sort_val: 43 PORT_READ(in_PREDICT_REGISTER_HIT [i][index]); 32 44 Tgeneral_data_t address_src = PORT_READ(in_PREDICT_REGISTER_ADDRESS_SRC [i][index]); 33 45 … … 44 56 PORT_WRITE(out_PREDICT_IS_ACCURATE [i],PORT_READ(in_PREDICT_REGISTER_IS_ACCURATE [i][index])); 45 57 46 Tcontrol_t val = PORT_READ(in_PREDICT_VAL [i]);47 Tcontrol_t register_ack = PORT_READ(in_PREDICT_REGISTER_ACK [i]);48 Tcontrol_t sort_val = (_param->_have_port_victim)?PORT_READ(in_PREDICT_SORT_VAL [i]):true;49 Tcontrol_t victim_ack = (_param->_have_port_victim)?PORT_READ(in_PREDICT_VICTIM_ACK [i]):true;50 51 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * val : %d",val );52 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * register_ack : %d",register_ack);53 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * sort_val : %d",sort_val );54 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * victim_ack : %d",victim_ack );55 56 58 PORT_WRITE(out_PREDICT_ACK [i], ( 57 59 // val and 58 60 register_ack and 59 61 // sort_val and 60 62 victim_ack 61 63 )); … … 63 65 val and 64 66 // register_ack and 65 67 // sort_val and 66 68 victim_ack 67 69 )); … … 71 73 PORT_WRITE(out_PREDICT_VICTIM_VAL [i], ( 72 74 val and 73 register_ack and74 sort_val //and75 register_ack // and 76 // sort_val and 75 77 // victim_ack 76 78 )); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_predict.cpp
r88 r108 54 54 // * context is the same 55 55 // * address_src must be higher that the address, because the address lower is previous the current pc. 56 // * prediction is no accurate is address_dest is not valid. 56 57 PORT_WRITE(out_PREDICT_HIT [i][j],hit); 57 58 PORT_WRITE(out_PREDICT_ADDRESS_SRC [i][j],reg_BTB[num_bank][j]._address_src ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_allocation.cpp
r88 r108 224 224 dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_ADDRESS_SRC"); 225 225 226 // out_OUTPUT_VAL -> glue227 // out_OUTPUT_INDEX -> glue228 // out_OUTPUT_ADDRESS -> no exist229 226 } 230 } 227 228 // 1 output 229 // out_OUTPUT_VAL -> glue 230 // out_OUTPUT_INDEX -> glue 231 // out_OUTPUT_ADDRESS -> no exist 232 } 231 233 232 234 //================================================================ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp
r107 r108 126 126 if (reg_UPT_BOTTOM [i] != reg_UPT_TOP [i]) 127 127 reg_UPT_EMPTY [i] = false; 128 129 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UPT_TOP : %d",reg_UPT_TOP [i]); 130 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UPT_TOP_EVENT : %d",reg_UPT_TOP_EVENT [i]); 131 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UPT_UPDATE : %d",reg_UPT_UPDATE [i]); 132 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UPT_EMPTY : %d",reg_UPT_EMPTY [i]); 128 133 } 129 134 … … 210 215 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * miss_decod : %d",miss_decod); 211 216 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * upt_ptr_write : %d",upt_ptr_write); 212 217 213 218 if (miss_ifetch or miss_decod) 214 219 { … … 218 223 throw ERRORMORPHEO(FUNCTION,_("Decod : invalid event state.")); 219 224 #endif 220 221 225 if (reg_UFPT_NB_NEED_UPDATE [context] == 0) 222 226 { … … 312 316 reg_UPT_EMPTY [context] = false; 313 317 // reg_UPT_UPDATE [context] = reg_UPT_TOP [context]; 318 319 // if (miss_ifetch or miss_decod) 320 // reg_UPT_TOP_EVENT [context] = reg_UPT_TOP [context]; 314 321 } 315 316 // ===================================================================317 // =====[ BRANCH_COMPLETE ]===========================================318 // ===================================================================319 320 // The branch is complete321 // * Hit prediction :322 // * update status323 // * Miss prediction :324 for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++)325 if (PORT_READ(in_BRANCH_COMPLETE_VAL[i]) and internal_BRANCH_COMPLETE_ACK [i])326 {327 Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_BRANCH_COMPLETE_CONTEXT_ID [i]):0;328 Tdepth_t depth = (_param->_have_port_depth )?PORT_READ(in_BRANCH_COMPLETE_DEPTH [i]):0;329 Tcontrol_t miss = internal_BRANCH_COMPLETE_MISS_PREDICTION [i];330 Tcontrol_t good_take = internal_BRANCH_COMPLETE_TAKE [i];331 Taddress_t good_addr = internal_BRANCH_COMPLETE_ADDRESS_DEST [i];332 333 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * BRANCH_COMPLETE[%d] - Accepted",i);334 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * context : %d",context);335 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * depth : %d",depth);336 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * miss : %d",miss);337 338 if (miss)339 {340 // Have a miss !!!341 // Flush UPFT342 flush_UFPT [context] = true;343 344 // Flush UPT345 uint32_t top = reg_UPT_TOP [context];346 uint32_t new_update = ((top==0)?_param->_size_upt_queue[context]:top)-1;347 348 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * top : %d",top);349 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * new_update : %d",new_update);350 351 for (uint32_t j=(depth+1)%_param->_size_upt_queue[context];352 j!=top;353 j=(j+1)%_param->_size_upt_queue[context])354 reg_UPDATE_PREDICTION_TABLE [context][j]._state = UPDATE_PREDICTION_STATE_EVENT;355 356 357 // reg_UPT_BOTTOM [context];358 reg_UPT_TOP [context] = depth;359 reg_UPT_TOP_EVENT [context] = top;360 361 if (reg_UPT_BOTTOM [context] == reg_UPT_TOP [context])362 reg_UPT_EMPTY [context] = true;363 364 #ifdef DEBUG_TEST365 if (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_WAIT_END)366 throw ERRORMORPHEO(FUNCTION,_("Branch complete : invalid upt state."));367 #endif368 369 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * UPT [%d][%d].state <- UPDATE_PREDICTION_STATE_KO (branch_complete, ifetch hit)",context,depth);370 reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_KO;371 372 Taddress_t address_src = reg_UPDATE_PREDICTION_TABLE [context][depth]._address_src;373 event_state_t event_state = reg_EVENT_STATE [context];374 bool previous_update_ras = ((event_state == EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT ) or375 (event_state == EVENT_STATE_MISS_FLUSH_UPT ) or376 (event_state == EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT) or377 (event_state == EVENT_STATE_EVENT_FLUSH_UPT));378 // bool update_ras = (new_update != depth);379 380 // log_printf(TRACE,Update_Prediction_Table,FUNCTION," * update_ras : %d",update_ras);381 382 if (reg_UFPT_NB_NEED_UPDATE [context] > 0)383 {384 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * EVENT [%d] <- EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT (branch_complete - miss)",context);385 reg_EVENT_STATE [context] = EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT;386 }387 else388 {389 // if (not previous_update_ras)390 {391 // have ras prediction ?392 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * EVENT [%d] <- EVENT_STATE_MISS_FLUSH_UPT (branch_complete - miss)",context);393 394 reg_EVENT_STATE [context] = EVENT_STATE_MISS_FLUSH_UPT;395 396 }397 }398 399 if (not previous_update_ras)400 {401 reg_UPT_UPDATE [context] = new_update;402 }403 // else no update404 405 reg_EVENT_DEPTH [context] = depth;406 reg_EVENT_ADDRESS_SRC [context] = address_src; // delay_slot is compute in Context_State407 reg_EVENT_ADDRESS_DEST_VAL[context] = good_take;408 reg_EVENT_ADDRESS_DEST [context] = good_addr;409 }410 else411 {412 // Hit case413 414 #ifdef DEBUG_TEST415 if (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_WAIT_END)416 throw ERRORMORPHEO(FUNCTION,_("Branch complete : invalid upt state."));417 #endif418 419 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * UPT [%d][%d].state <- UPDATE_PREDICTION_STATE_OK (branch_complete, ifetch hit)",context,depth);420 reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_OK;421 }422 423 // In all case : update good_take424 reg_UPDATE_PREDICTION_TABLE [context][depth]._good_take = good_take;425 426 // Write address_dest if need read register427 Tbranch_condition_t condition = reg_UPDATE_PREDICTION_TABLE [context][depth]._condition;428 429 if ((condition == BRANCH_CONDITION_READ_REGISTER_WITHOUT_WRITE_STACK) or430 (condition == BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK ) or431 (condition == BRANCH_CONDITION_READ_STACK ) )432 reg_UPDATE_PREDICTION_TABLE [context][depth]._address_dest = good_addr;433 }434 322 435 323 // =================================================================== … … 599 487 } 600 488 489 490 // =================================================================== 491 // =====[ BRANCH_COMPLETE ]=========================================== 492 // =================================================================== 493 494 // The branch is complete 495 // * Hit prediction : 496 // * update status 497 // * Miss prediction : 498 for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++) 499 if (PORT_READ(in_BRANCH_COMPLETE_VAL[i]) and internal_BRANCH_COMPLETE_ACK [i]) 500 { 501 Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_BRANCH_COMPLETE_CONTEXT_ID [i]):0; 502 Tdepth_t depth = (_param->_have_port_depth )?PORT_READ(in_BRANCH_COMPLETE_DEPTH [i]):0; 503 Tcontrol_t miss = internal_BRANCH_COMPLETE_MISS_PREDICTION [i]; 504 Tcontrol_t good_take = internal_BRANCH_COMPLETE_TAKE [i]; 505 Taddress_t good_addr = internal_BRANCH_COMPLETE_ADDRESS_DEST [i]; 506 507 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * BRANCH_COMPLETE[%d] - Accepted",i); 508 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * context : %d",context); 509 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * depth : %d",depth); 510 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * miss : %d",miss); 511 512 if (miss) 513 { 514 // Have a miss !!! 515 // Flush UPFT 516 flush_UFPT [context] = true; 517 518 // Flush UPT 519 uint32_t top = reg_UPT_TOP [context]; 520 uint32_t new_update = ((top==0)?_param->_size_upt_queue[context]:top)-1; 521 522 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * top : %d",top); 523 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * new_update : %d",new_update); 524 525 for (uint32_t j=(depth+1)%_param->_size_upt_queue[context]; 526 j!=top; 527 j=(j+1)%_param->_size_upt_queue[context]) 528 reg_UPDATE_PREDICTION_TABLE [context][j]._state = UPDATE_PREDICTION_STATE_EVENT; 529 530 531 // reg_UPT_BOTTOM [context]; 532 reg_UPT_TOP [context] = depth; 533 reg_UPT_TOP_EVENT [context] = top; 534 535 if (reg_UPT_BOTTOM [context] == reg_UPT_TOP [context]) 536 reg_UPT_EMPTY [context] = true; 537 538 #ifdef DEBUG_TEST 539 if (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_WAIT_END) 540 throw ERRORMORPHEO(FUNCTION,_("Branch complete : invalid upt state.")); 541 #endif 542 543 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * UPT [%d][%d].state <- UPDATE_PREDICTION_STATE_KO (branch_complete, ifetch hit)",context,depth); 544 reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_KO; 545 546 Taddress_t address_src = reg_UPDATE_PREDICTION_TABLE [context][depth]._address_src; 547 event_state_t event_state = reg_EVENT_STATE [context]; 548 bool previous_update_ras = ((event_state == EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT ) or 549 (event_state == EVENT_STATE_MISS_FLUSH_UPT ) or 550 (event_state == EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT) or 551 (event_state == EVENT_STATE_EVENT_FLUSH_UPT)); 552 // bool update_ras = (new_update != depth); 553 554 // log_printf(TRACE,Update_Prediction_Table,FUNCTION," * update_ras : %d",update_ras); 555 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * previous_update_ras : %d",previous_update_ras); 556 557 if (reg_UFPT_NB_NEED_UPDATE [context] > 0) 558 { 559 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * EVENT [%d] <- EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT (branch_complete - miss)",context); 560 reg_EVENT_STATE [context] = EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT; 561 } 562 else 563 { 564 // if (not previous_update_ras) 565 { 566 // have ras prediction ? 567 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * EVENT [%d] <- EVENT_STATE_MISS_FLUSH_UPT (branch_complete - miss)",context); 568 569 reg_EVENT_STATE [context] = EVENT_STATE_MISS_FLUSH_UPT; 570 571 } 572 } 573 574 if (not previous_update_ras) 575 { 576 reg_UPT_UPDATE [context] = new_update; 577 } 578 // else no update 579 580 reg_EVENT_DEPTH [context] = depth; 581 reg_EVENT_ADDRESS_SRC [context] = address_src; // delay_slot is compute in Context_State 582 reg_EVENT_ADDRESS_DEST_VAL[context] = good_take; 583 reg_EVENT_ADDRESS_DEST [context] = good_addr; 584 } 585 else 586 { 587 // Hit case 588 589 // #ifdef DEBUG_TEST 590 // if (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_WAIT_END) 591 // throw ERRORMORPHEO(FUNCTION,_("Branch complete : invalid upt state.")); 592 // #endif 593 594 if (reg_UPDATE_PREDICTION_TABLE [context][depth]._state == UPDATE_PREDICTION_STATE_WAIT_END) 595 { 596 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * UPT [%d][%d].state <- UPDATE_PREDICTION_STATE_OK (branch_complete, ifetch hit)",context,depth); 597 reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_OK; 598 } 599 } 600 601 // In all case : update good_take 602 reg_UPDATE_PREDICTION_TABLE [context][depth]._good_take = good_take; 603 604 // Write address_dest if need read register 605 Tbranch_condition_t condition = reg_UPDATE_PREDICTION_TABLE [context][depth]._condition; 606 607 if ((condition == BRANCH_CONDITION_READ_REGISTER_WITHOUT_WRITE_STACK) or 608 (condition == BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK ) or 609 (condition == BRANCH_CONDITION_READ_STACK ) ) 610 reg_UPDATE_PREDICTION_TABLE [context][depth]._address_dest = good_addr; 611 } 612 601 613 // =================================================================== 602 614 // =====[ BRANCH_EVENT ]============================================== … … 695 707 uint32_t bottom = reg_UPT_BOTTOM [i]; 696 708 uint32_t new_update = ((top==0)?_param->_size_upt_queue[i]:top)-1; 697 uint32_t full = ((depth == top) and (top == bottom) and not reg_UPT_EMPTY [i]); 709 bool full = ((depth == top) and (top == bottom) and not reg_UPT_EMPTY [i]); 710 // bool empty = reg_UPT_EMPTY [i]; 711 698 712 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * top : %d",top); 699 713 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * depth : %d",depth); 700 714 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * new_update : %d",new_update); 701 715 702 // Test empty 703 if (not reg_UPT_EMPTY [i]) 716 event_state_t event_state = reg_EVENT_STATE [i]; 717 bool previous_update_ras = ((event_state == EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT ) or 718 (event_state == EVENT_STATE_MISS_FLUSH_UPT ) or 719 (event_state == EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT) or 720 (event_state == EVENT_STATE_EVENT_FLUSH_UPT)); 721 722 bool find = false; // have slot to update ??? 723 724 // flush all slot after the event 725 for (uint32_t j=(depth+1)%_param->_size_upt_queue[i]; 726 j!=top; 727 j=(j+1)%_param->_size_upt_queue[i]) 728 if ((reg_UPDATE_PREDICTION_TABLE [i][j]._state != UPDATE_PREDICTION_STATE_END) and 729 (reg_UPDATE_PREDICTION_TABLE [i][j]._state != UPDATE_PREDICTION_STATE_EMPTY)) 730 { 731 find = true; 732 reg_UPDATE_PREDICTION_TABLE [i][j]._state = UPDATE_PREDICTION_STATE_EVENT; 733 } 734 735 if ((reg_UPDATE_PREDICTION_TABLE [i][depth]._state != UPDATE_PREDICTION_STATE_END) and 736 (reg_UPDATE_PREDICTION_TABLE [i][depth]._state != UPDATE_PREDICTION_STATE_EMPTY)) 704 737 { 705 #ifdef DEBUG_TEST 706 if (reg_UPDATE_PREDICTION_TABLE [i][depth]._state != UPDATE_PREDICTION_STATE_WAIT_END) 707 throw ERRORMORPHEO(FUNCTION,_("Branch complete : invalid upt state.")); 708 #endif 738 find = true; 709 739 reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_EVENT; 710 740 } 741 742 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * find : %d",find); 743 744 // Test if have update slot 745 if (find) 746 { 711 747 // flush all slot after the event 712 748 for (uint32_t j=(depth+1)%_param->_size_upt_queue[i]; … … 714 750 j=(j+1)%_param->_size_upt_queue[i]) 715 751 reg_UPDATE_PREDICTION_TABLE [i][j]._state = UPDATE_PREDICTION_STATE_EVENT; 752 753 reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_EVENT; 754 755 // reg_UPT_BOTTOM [i]; 756 // TODO : special case : event is an exception on branch, also depth is not valid 757 reg_UPT_TOP [i] = depth; // depth is again valid 758 reg_UPT_TOP_EVENT [i] = top; 759 760 if (bottom == reg_UPT_TOP [i]) 761 reg_UPT_EMPTY [i] = true; 716 762 } 763 764 bool update_ras = find and ((top != depth) or full); 765 766 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * update_ras : %d",update_ras); 767 768 if (not previous_update_ras and update_ras) 769 reg_UPT_UPDATE [i] = new_update; 717 770 718 // reg_UPT_BOTTOM [i];719 // TODO : special case : event is an exception on branch, also depth is not valid720 reg_UPT_TOP [i] = depth; // depth is again valid721 reg_UPT_TOP_EVENT [i] = top;722 723 if (bottom == reg_UPT_TOP [i])724 reg_UPT_EMPTY [i] = true;725 726 reg_EVENT_VAL [i] = true;727 reg_EVENT_UPT_PTR [i] = depth;728 event_state_t event_state = reg_EVENT_STATE [i];729 bool previous_update_ras = ((event_state == EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT ) or730 (event_state == EVENT_STATE_MISS_FLUSH_UPT ) or731 (event_state == EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT) or732 (event_state == EVENT_STATE_EVENT_FLUSH_UPT));733 bool update_ras = (top != depth) or full;734 735 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * update_ras : %d",update_ras);736 737 771 // new state : 738 772 // * test if ufpt is empty … … 741 775 // * ok : nothing 742 776 // * ko : flush upt 777 reg_EVENT_VAL [i] = true; 778 reg_EVENT_UPT_PTR [i] = depth; 779 743 780 if (reg_UFPT_NB_NEED_UPDATE [i] > 0) 744 781 { … … 766 803 else 767 804 { 805 // special case : nothing 806 reg_EVENT_VAL [i] = false; 807 768 808 reg_EVENT_STATE [i] = EVENT_STATE_OK; 769 809 } 770 810 } 771 772 if (not previous_update_ras and update_ras) 773 { 774 reg_UPT_UPDATE [i] = new_update; 775 } 811 776 812 // else no update 777 813 … … 817 853 { 818 854 for (uint32_t j=0; j<_param->_size_ufpt_queue[i]; ++j) 819 { 820 reg_UFPT_NB_UPDATE [i] ++; 821 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state = UPDATE_FETCH_PREDICTION_STATE_EVENT; 822 } 855 // EMPTY : no event 856 // END : already update 857 // EVENT : previous event 858 if (reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state == UPDATE_FETCH_PREDICTION_STATE_WAIT_DECOD) 859 { 860 reg_UFPT_NB_UPDATE [i] ++; 861 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state = UPDATE_FETCH_PREDICTION_STATE_EVENT; 862 } 823 863 824 864 // TOP is next write slot : last slot is TOP-1 … … 862 902 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_EVENT_STATE : %s" ,toString(reg_EVENT_STATE [i]).c_str()); 863 903 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_EVENT_DEPTH : %d" ,reg_EVENT_DEPTH [i]); 864 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_EVENT_ADDRESS_SRC : %.8x ",reg_EVENT_ADDRESS_SRC [i]);904 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_EVENT_ADDRESS_SRC : %.8x (%.8x)",reg_EVENT_ADDRESS_SRC [i],reg_EVENT_ADDRESS_SRC [i]<<2); 865 905 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_EVENT_ADDRESS_DEST_VAL: %d" ,reg_EVENT_ADDRESS_DEST_VAL[i]); 866 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_EVENT_ADDRESS_DEST : %.8x ",reg_EVENT_ADDRESS_DEST [i]);906 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_EVENT_ADDRESS_DEST : %.8x (%.8x)",reg_EVENT_ADDRESS_DEST [i],reg_EVENT_ADDRESS_DEST [i]<<2); 867 907 868 908 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * Update_Fetch_Prediction_Table [%d]",i); … … 914 954 } 915 955 #endif 956 957 #ifdef DEBUG_TEST 958 for (uint32_t i=0; i<_param->_nb_context; i++) 959 { 960 if (reg_UFPT_NB_NEED_UPDATE [i] > _param->_size_ufpt_queue[i]) 961 throw ERRORMORPHEO(FUNCTION,toString(_("reg_UFPT_NB_NEED_UPDATE [%d] (%d) is > at size_ufpt_queue (%d).\n"),i,reg_UFPT_NB_NEED_UPDATE [i],_param->_size_ufpt_queue[i])); 962 if (reg_UFPT_NB_UPDATE [i] > _param->_size_ufpt_queue[i]) 963 throw ERRORMORPHEO(FUNCTION,toString(_("reg_UFPT_NB_UPDATE [%d] (%d) is > at size_ufpt_queue (%d).\n"),i,reg_UFPT_NB_UPDATE [i],_param->_size_ufpt_queue[i])); 964 } 965 #endif 966 916 967 } 917 968 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/SelfTest/src/test.cpp
r105 r108 68 68 ALLOC1_SC_SIGNAL(out_DECOD_NO_EXECUTE ,"out_DECOD_NO_EXECUTE ",Tcontrol_t ,_param->_sum_inst_decod); 69 69 ALLOC1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT ,"out_DECOD_IS_DELAY_SLOT ",Tcontrol_t ,_param->_sum_inst_decod); 70 #ifdef DEBUG 71 ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS ,"out_DECOD_ADDRESS ",Tgeneral_data_t ,_param->_sum_inst_decod); 72 #endif 70 73 ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT ,"out_DECOD_ADDRESS_NEXT ",Tgeneral_data_t ,_param->_sum_inst_decod); 71 74 ALLOC1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT ,"out_DECOD_HAS_IMMEDIAT ",Tcontrol_t ,_param->_sum_inst_decod); … … 116 119 ALLOC1_SC_SIGNAL( in_NB_INST_COMMIT_ALL ," in_NB_INST_COMMIT_ALL ",Tcounter_t ,_param->_nb_context); 117 120 ALLOC1_SC_SIGNAL( in_NB_INST_COMMIT_MEM ," in_NB_INST_COMMIT_MEM ",Tcounter_t ,_param->_nb_context); 121 ALLOC1_SC_SIGNAL(out_NB_INST_DECOD_ALL ,"out_NB_INST_DECOD_ALL ",Tcounter_t ,_param->_nb_context); 118 122 ALLOC1_SC_SIGNAL(out_DEPTH_MIN ,"out_DEPTH_MIN ",Tdepth_t ,_param->_nb_context); 119 123 ALLOC1_SC_SIGNAL(out_DEPTH_MAX ,"out_DEPTH_MAX ",Tdepth_t ,_param->_nb_context); … … 156 160 INSTANCE1_SC_SIGNAL(_Front_end,out_DECOD_NO_EXECUTE ,_param->_sum_inst_decod); 157 161 INSTANCE1_SC_SIGNAL(_Front_end,out_DECOD_IS_DELAY_SLOT ,_param->_sum_inst_decod); 162 #ifdef DEBUG 163 INSTANCE1_SC_SIGNAL(_Front_end,out_DECOD_ADDRESS ,_param->_sum_inst_decod); 164 #endif 158 165 INSTANCE1_SC_SIGNAL(_Front_end,out_DECOD_ADDRESS_NEXT ,_param->_sum_inst_decod); 159 166 INSTANCE1_SC_SIGNAL(_Front_end,out_DECOD_HAS_IMMEDIAT ,_param->_sum_inst_decod); … … 208 215 INSTANCE1_SC_SIGNAL(_Front_end, in_NB_INST_COMMIT_ALL ,_param->_nb_context); 209 216 INSTANCE1_SC_SIGNAL(_Front_end, in_NB_INST_COMMIT_MEM ,_param->_nb_context); 217 INSTANCE1_SC_SIGNAL(_Front_end,out_NB_INST_DECOD_ALL ,_param->_nb_context); 210 218 if (_param->_have_port_depth) 211 219 { … … 317 325 DELETE1_SC_SIGNAL(out_DECOD_NO_EXECUTE ,_param->_sum_inst_decod); 318 326 DELETE1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT ,_param->_sum_inst_decod); 327 #ifdef DEBUG 328 DELETE1_SC_SIGNAL(out_DECOD_ADDRESS ,_param->_sum_inst_decod); 329 #endif 319 330 DELETE1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT ,_param->_sum_inst_decod); 320 331 DELETE1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT ,_param->_sum_inst_decod); … … 365 376 DELETE1_SC_SIGNAL( in_NB_INST_COMMIT_ALL ,_param->_nb_context); 366 377 DELETE1_SC_SIGNAL( in_NB_INST_COMMIT_MEM ,_param->_nb_context); 378 DELETE1_SC_SIGNAL(out_NB_INST_DECOD_ALL ,_param->_nb_context); 367 379 DELETE1_SC_SIGNAL(out_DEPTH_MIN ,_param->_nb_context); 368 380 DELETE1_SC_SIGNAL(out_DEPTH_MAX ,_param->_nb_context); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/include/Front_end.h
r105 r108 94 94 public : SC_OUT(Tcontrol_t ) ** out_DECOD_NO_EXECUTE ;//[sum_inst_decod] 95 95 public : SC_OUT(Tcontrol_t ) ** out_DECOD_IS_DELAY_SLOT ;//[sum_inst_decod] 96 #ifdef DEBUG 97 public : SC_OUT(Tgeneral_data_t ) ** out_DECOD_ADDRESS ;//[sum_inst_decod] 98 #endif 96 99 public : SC_OUT(Tgeneral_data_t ) ** out_DECOD_ADDRESS_NEXT ;//[sum_inst_decod] 97 100 public : SC_OUT(Tcontrol_t ) ** out_DECOD_HAS_IMMEDIAT ;//[sum_inst_decod] … … 152 155 public : SC_IN (Tcounter_t ) ** in_NB_INST_COMMIT_ALL ;//[nb_context] 153 156 public : SC_IN (Tcounter_t ) ** in_NB_INST_COMMIT_MEM ;//[nb_context] 157 public : SC_OUT(Tcounter_t ) ** out_NB_INST_DECOD_ALL ;//[nb_context] 154 158 155 159 // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_allocation.cpp
r105 r108 97 97 ALLOC1_SIGNAL_OUT (out_DECOD_NO_EXECUTE ,"NO_EXECUTE" ,Tcontrol_t ,1 ); 98 98 ALLOC1_SIGNAL_OUT (out_DECOD_IS_DELAY_SLOT ,"IS_DELAY_SLOT" ,Tcontrol_t ,1 ); 99 #ifdef DEBUG 100 ALLOC1_SIGNAL_OUT (out_DECOD_ADDRESS ,"ADDRESS" ,Tgeneral_data_t ,_param->_size_instruction_address ); 101 #endif 99 102 ALLOC1_SIGNAL_OUT (out_DECOD_ADDRESS_NEXT ,"ADDRESS_NEXT" ,Tgeneral_data_t ,_param->_size_instruction_address ); 100 103 ALLOC1_SIGNAL_OUT (out_DECOD_HAS_IMMEDIAT ,"HAS_IMMEDIAT" ,Tcontrol_t ,1 ); … … 175 178 ALLOC1_SIGNAL_IN ( in_NB_INST_COMMIT_ALL ,"COMMIT_ALL" ,Tcounter_t ,_param->_size_nb_inst_commit); 176 179 ALLOC1_SIGNAL_IN ( in_NB_INST_COMMIT_MEM ,"COMMIT_MEM" ,Tcounter_t ,_param->_size_nb_inst_commit); 180 ALLOC1_SIGNAL_OUT (out_NB_INST_DECOD_ALL ,"DECOD_ALL" ,Tcounter_t ,_param->_size_nb_inst_decod ); 177 181 } 178 182 … … 699 703 PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_IS_DELAY_SLOT", 700 704 dest,"out_DECOD_"+toString(x)+"_IS_DELAY_SLOT"); 705 #ifdef DEBUG 706 PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_ADDRESS" , 707 dest,"out_DECOD_"+toString(x)+"_ADDRESS" ); 708 #endif 701 709 PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_ADDRESS_NEXT" , 702 710 dest,"out_DECOD_"+toString(x)+"_ADDRESS_NEXT" ); … … 809 817 uint32_t y=(_param->_translate_context_id_from_decod_unit[i])[j]; 810 818 811 dest = _name+"_ context_state";819 dest = _name+"_glue"; 812 820 #ifdef POSITION 813 821 _component->interface_map (src ,"nb_inst_"+toString(j), … … 815 823 #endif 816 824 817 COMPONENT_MAP(_component,src ,"out_NB_INST_"+toString(j)+ "_DECOD_ALL",818 dest, "in_NB_INST_"+toString(y)+"_DECOD_ ALL");825 COMPONENT_MAP(_component,src ,"out_NB_INST_"+toString(j)+ "_DECOD_ALL", 826 dest, "in_NB_INST_"+toString(y)+"_DECOD_UNIT_DECOD_ALL"); 819 827 } 820 828 … … 965 973 966 974 // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 967 // in_NB_INST_DECOD_ALL - component_decod_unit968 969 975 for (uint32_t i=0; i<_param->_nb_context; ++i) 970 976 { 971 977 dest = _name; 972 978 #ifdef POSITION 973 _component->interface_map (src ,"nb_inst ",974 dest,"nb_inst ");979 _component->interface_map (src ,"nb_inst_"+toString(i), 980 dest,"nb_inst_"+toString(i)); 975 981 #endif 976 982 … … 979 985 PORT_MAP(_component,src , "in_NB_INST_"+toString(i)+"_COMMIT_MEM", 980 986 dest, "in_NB_INST_"+toString(i)+"_COMMIT_MEM"); 987 988 dest = _name+"_glue"; 989 #ifdef POSITION 990 _component->interface_map (src ,"nb_inst_"+toString(i), 991 dest,"nb_inst_"+toString(i)); 992 #endif 993 994 COMPONENT_MAP(_component,src , "in_NB_INST_"+toString(i)+ "_DECOD_ALL", 995 dest,"out_NB_INST_"+toString(i)+"_CONTEXT_STATE_DECOD_ALL"); 981 996 } 982 997 … … 1218 1233 // out_CONTEXT_DECOD_UNIT_DEPTH_VAL - component_decod_unit 1219 1234 // out_CONTEXT_DECOD_UNIT_DEPTH - component_decod_unit 1235 1236 // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1237 for (uint32_t i=0; i<_param->_nb_context; ++i) 1238 { 1239 dest = _name; 1240 #ifdef POSITION 1241 _component->interface_map (src ,"nb_inst_"+toString(i), 1242 dest,"nb_inst_"+toString(i)); 1243 #endif 1244 1245 PORT_MAP(_component,src ,"out_NB_INST_"+toString(i)+"_DECOD_ALL", 1246 dest,"out_NB_INST_"+toString(i)+"_DECOD_ALL"); 1247 1248 // in_NB_INST_DECOD_UNIT_DECOD_ALL - component_decod_unit 1249 // out_NB_INST_CONTEXT_STATE_DECOD_ALL - component_context_state 1250 } 1220 1251 } 1221 1252 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_deallocation.cpp
r105 r108 49 49 DELETE1_SIGNAL(out_DECOD_NO_EXECUTE ,_param->_sum_inst_decod,1 ); 50 50 DELETE1_SIGNAL(out_DECOD_IS_DELAY_SLOT ,_param->_sum_inst_decod,1 ); 51 #ifdef DEBUG 52 DELETE1_SIGNAL(out_DECOD_ADDRESS ,_param->_sum_inst_decod,_param->_size_instruction_address ); 53 #endif 51 54 DELETE1_SIGNAL(out_DECOD_ADDRESS_NEXT ,_param->_sum_inst_decod,_param->_size_instruction_address ); 52 55 DELETE1_SIGNAL(out_DECOD_HAS_IMMEDIAT ,_param->_sum_inst_decod,1 ); … … 102 105 DELETE1_SIGNAL( in_NB_INST_COMMIT_ALL ,_param->_nb_context,_param->_size_nb_inst_commit); 103 106 DELETE1_SIGNAL( in_NB_INST_COMMIT_MEM ,_param->_nb_context,_param->_size_nb_inst_commit); 107 DELETE1_SIGNAL(out_NB_INST_DECOD_ALL ,_param->_nb_context,_param->_size_nb_inst_decod); 104 108 105 109 DELETE1_SIGNAL(out_DEPTH_MIN ,_param->_nb_context,_param->_size_depth ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Parameters.cpp
r106 r108 109 109 _array_size_nb_inst_decod [i] = log2(_size_decod_queue[i]+1); 110 110 111 uint32_t size_nb_inst_decod = max<uint32_t>(_array_size_nb_inst_decod,_nb_decod_unit); 112 111 113 _param_ifetch_unit = new behavioural::core::multi_front_end::front_end::ifetch_unit::Parameters * [_nb_context]; 112 114 for (uint32_t i=0; i<_nb_context; ++i) … … 236 238 size_instruction_address , 237 239 _array_size_depth , 238 _upt_size_queue //_nb_branch_speculated 240 _upt_size_queue ,//_nb_branch_speculated 241 size_nb_inst_decod 239 242 ); 240 243 … … 244 247 _size_instruction_address = size_instruction_address; 245 248 _size_general_data = size_general_data; 246 _size_nb_inst_decod = max<uint32_t>(_array_size_nb_inst_decod,_nb_decod_unit);249 _size_nb_inst_decod = size_nb_inst_decod; 247 250 _size_nb_inst_commit = size_nb_inst_commit; 248 251 _size_depth = max<uint32_t>(_array_size_depth,_nb_context); -
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; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Parameters_msg_error.cpp
r97 r108 27 27 28 28 if (not is_multiple(_size_queue, _nb_bank)) 29 test.error(toString(_("nb_bank must be a multiple of size_queue.\n")));29 test.error(toString(_("nb_bank (%d) must be a multiple of size_queue (%d).\n"),_nb_bank,_size_queue)); 30 30 31 31 if (not is_multiple(_nb_bank, _nb_inst_issue)) 32 test.error(toString(_("nb_inst_issue must be a multiple of nb_bank.\n")));32 test.error(toString(_("nb_inst_issue (%d) must be a multiple of nb_bank (%d) .\n"),_nb_inst_issue,_nb_bank)); 33 33 34 34 if (_nb_rename_unit_select > _nb_rename_unit) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/include/Free_List_unit.h
r82 r108 89 89 90 90 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 91 private : uint32_t internal_BANK_PRIORITY;91 private : uint32_t reg_BANK_PRIORITY; 92 92 93 93 private : Tcontrol_t * internal_POP_ACK ; //[nb_pop] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_genMealy_pop.cpp
r88 r108 28 28 for (uint32_t i=0; i<_param->_nb_pop; i++) 29 29 { 30 uint32_t offset = i*_param->_nb_bank_by_pop; 30 log_printf(TRACE,Free_List_unit,FUNCTION," * POP [%d]",i); 31 32 uint32_t offset = i*_param->_nb_bank_by_pop; 31 33 32 34 // GPR 33 35 bool gpr_ack = not PORT_READ(in_POP_GPR_VAL[i]); 34 36 37 log_printf(TRACE,Free_List_unit,FUNCTION," * GPR_VAL : %d",PORT_READ(in_POP_GPR_VAL[i])); 38 35 39 if (not gpr_ack) 36 40 for (uint32_t j=0; j<_param->_nb_bank_by_pop; j++) 37 41 { 38 uint32_t bank = offset+((j+internal_BANK_PRIORITY)%_param->_nb_bank_by_pop); 42 uint32_t bank = offset+((j+reg_BANK_PRIORITY)%_param->_nb_bank_by_pop 43 ); 44 45 log_printf(TRACE,Free_List_unit,FUNCTION," * bank : %d",bank); 39 46 40 47 if (not _gpr_list[bank].empty()) 41 48 { 42 49 // find 50 log_printf(TRACE,Free_List_unit,FUNCTION," * find : %d",_gpr_list[bank].front()); 51 43 52 gpr_ack = true; 44 53 internal_POP_GPR_BANK [i] = bank; 45 54 PORT_WRITE(out_POP_GPR_NUM_REG [i], 46 //(bank << _param->_shift) | 55 //(bank << _param->_shift) | // only in VHDL 47 56 _gpr_list[bank].front()); 48 57 … … 54 63 bool spr_ack = not PORT_READ(in_POP_SPR_VAL[i]); 55 64 65 log_printf(TRACE,Free_List_unit,FUNCTION," * SPR_VAL : %d",PORT_READ(in_POP_SPR_VAL[i])); 66 56 67 if (not spr_ack) 57 68 for (uint32_t j=0; j<_param->_nb_bank_by_pop; j++) 58 69 { 59 uint32_t bank = offset+((j+internal_BANK_PRIORITY)%_param->_nb_bank_by_pop); 70 uint32_t bank = offset+((j+reg_BANK_PRIORITY)%_param->_nb_bank_by_pop 71 ); 72 73 log_printf(TRACE,Free_List_unit,FUNCTION," * bank : %d",bank); 60 74 61 75 if (not _spr_list[bank].empty()) 62 76 { 63 77 // find 78 log_printf(TRACE,Free_List_unit,FUNCTION," * find : %d",_spr_list[bank].front()); 79 64 80 spr_ack = true; 65 81 internal_POP_SPR_BANK [i] = bank; 66 82 PORT_WRITE(out_POP_SPR_NUM_REG [i], 67 //(bank << _param->_shift) | 83 //(bank << _param->_shift) | // only in VHDL 68 84 _spr_list[bank].front()); 69 85 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_genMealy_push_gpr.cpp
r88 r108 26 26 log_function(Free_List_unit,FUNCTION,_name.c_str()); 27 27 28 // bank conflit 28 29 bool bank_use [_param->_nb_bank]; 29 30 for (uint32_t i=0; i<_param->_nb_bank; i++) … … 32 33 for (uint32_t i=0; i<_param->_nb_push; i++) 33 34 { 35 log_printf(TRACE,Free_List_unit,FUNCTION," * PUSH [%d]",i); 36 34 37 bool gpr_ack = not PORT_READ(in_PUSH_GPR_VAL[i]); 38 39 log_printf(TRACE,Free_List_unit,FUNCTION," * GPR_VAL : %d",PORT_READ(in_PUSH_GPR_VAL[i])); 35 40 36 41 if (not gpr_ack) 37 42 { 38 // num_bank : MSB 39 uint32_t bank = PORT_READ(in_PUSH_GPR_NUM_REG[i]) >> _param->_bank_gpr_size_slot; 43 // // num_bank : MSB 44 // uint32_t bank = PORT_READ(in_PUSH_GPR_NUM_REG[i]) >> _param->_bank_gpr_size_slot; 45 // num_bank : LSB 46 uint32_t bank = PORT_READ(in_PUSH_GPR_NUM_REG[i]) & _param->_mask_gpr; 40 47 41 48 if (not bank_use [bank]) 42 49 { 50 log_printf(TRACE,Free_List_unit,FUNCTION," * find "); 51 log_printf(TRACE,Free_List_unit,FUNCTION," * bank : %d",bank); 52 43 53 // find 44 54 gpr_ack = true; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_genMealy_push_spr.cpp
r88 r108 36 36 if (not spr_ack) 37 37 { 38 // num_bank : MSB 39 uint32_t bank = PORT_READ(in_PUSH_SPR_NUM_REG[i]) >> _param->_bank_spr_size_slot; 38 // // num_bank : MSB 39 // uint32_t bank = PORT_READ(in_PUSH_SPR_NUM_REG[i]) >> _param->_bank_spr_size_slot; 40 // num_bank : LSB 41 uint32_t bank = PORT_READ(in_PUSH_SPR_NUM_REG[i]) & _param->_mask_spr; 40 42 41 43 if (not bank_use [bank]) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_transition.cpp
r106 r108 28 28 if (PORT_READ(in_NRESET) == 0) 29 29 { 30 internal_BANK_PRIORITY = 0;30 reg_BANK_PRIORITY = 0; 31 31 for (uint32_t i=0; i<_param->_nb_bank; i++) 32 32 { … … 59 59 { 60 60 log_printf(TRACE,Free_List_unit,FUNCTION," * PUSH_GPR[%d]",i); 61 log_printf(TRACE,Free_List_unit,FUNCTION," * bank : %d",internal_PUSH_GPR_BANK[i]); 62 log_printf(TRACE,Free_List_unit,FUNCTION," * num_reg : %d",PORT_READ(in_PUSH_GPR_NUM_REG [i])); 61 63 62 _gpr_list [internal_PUSH_GPR_BANK[i]].push_back(//_param->_mask_gpr & 63 PORT_READ(in_PUSH_GPR_NUM_REG [i])); 64 _gpr_list [internal_PUSH_GPR_BANK[i]].push_back(PORT_READ(in_PUSH_GPR_NUM_REG [i])); 64 65 } 65 66 // ================================================== … … 70 71 { 71 72 log_printf(TRACE,Free_List_unit,FUNCTION," * PUSH_SPR[%d]",i); 73 log_printf(TRACE,Free_List_unit,FUNCTION," * bank : %d",internal_PUSH_SPR_BANK[i]); 74 log_printf(TRACE,Free_List_unit,FUNCTION," * num_reg : %d",PORT_READ(in_PUSH_SPR_NUM_REG [i])); 72 75 73 _spr_list [internal_PUSH_SPR_BANK[i]].push_back(//_param->_mask_spr & 74 PORT_READ(in_PUSH_SPR_NUM_REG [i])); 76 _spr_list [internal_PUSH_SPR_BANK[i]].push_back(PORT_READ(in_PUSH_SPR_NUM_REG [i])); 75 77 } 76 78 77 if (_param->_priority == PRIORITY_ROUND_ROBIN)78 internal_BANK_PRIORITY = (internal_BANK_PRIORITY+1)%_param->_nb_bank_by_pop;79 if (_param->_priority == PRIORITY_ROUND_ROBIN) 80 reg_BANK_PRIORITY = (reg_BANK_PRIORITY+1)%_param->_nb_bank_by_pop; 79 81 80 82 #if (DEBUG >= DEBUG_TRACE) and (DEBUG_Free_List_unit == true) … … 83 85 84 86 log_printf(TRACE,Free_List_unit,FUNCTION," * Dump Free List"); 85 86 87 for (uint32_t i=0; i<_param->_nb_bank; ++i) 87 88 { 89 log_printf(TRACE,Free_List_unit,FUNCTION," * GPR [%d] - NB_ELT : %d",i,_gpr_list[i].size()); 90 88 91 uint32_t j=0; 89 for (std::list<Tgeneral_address_t>::iterator it=_gpr_list ->begin();90 it!=_gpr_list ->end();92 for (std::list<Tgeneral_address_t>::iterator it=_gpr_list[i].begin(); 93 it!=_gpr_list[i].end(); 91 94 ) 92 95 { … … 95 98 for (uint32_t x=0; x<limit; x++) 96 99 { 97 if (it==_gpr_list ->end())100 if (it==_gpr_list[i].end()) 98 101 break; 99 102 else … … 108 111 for (uint32_t i=0; i<_param->_nb_bank; ++i) 109 112 { 113 log_printf(TRACE,Free_List_unit,FUNCTION," * SPR [%d] - NB_ELT : %d",i,_spr_list[i].size()); 114 110 115 uint32_t j=0; 111 for (std::list<Tspecial_address_t>::iterator it=_spr_list ->begin();112 it!=_spr_list ->end();116 for (std::list<Tspecial_address_t>::iterator it=_spr_list[i].begin(); 117 it!=_spr_list[i].end(); 113 118 ) 114 119 { … … 117 122 for (uint32_t x=0; x<limit; x++) 118 123 { 119 if (it==_spr_list ->end())124 if (it==_spr_list[i].end()) 120 125 break; 121 126 else … … 132 137 #ifdef DEBUG_TEST 133 138 if (1) 139 for (uint32_t i=0; i<_param->_nb_bank; ++i) 134 140 { 135 for (std::list<Tgeneral_address_t>::iterator it1=_gpr_list ->begin();136 it1!=_gpr_list ->end();141 for (std::list<Tgeneral_address_t>::iterator it1=_gpr_list[i].begin(); 142 it1!=_gpr_list[i].end(); 137 143 ++it1 138 144 ) … … 141 147 142 148 it2 ++; 143 while (it2 != _gpr_list ->end())149 while (it2 != _gpr_list[i].end()) 144 150 { 145 151 if (*it1 == *it2) … … 149 155 } 150 156 151 for (std::list<Tspecial_address_t>::iterator it1=_spr_list ->begin();152 it1!=_spr_list ->end();157 for (std::list<Tspecial_address_t>::iterator it1=_spr_list[i].begin(); 158 it1!=_spr_list[i].end(); 153 159 ++it1 154 160 ) … … 157 163 158 164 it2 ++; 159 while (it2 != _spr_list ->end())165 while (it2 != _spr_list[i].end()) 160 166 { 161 167 if (*it1 == *it2) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Parameters.cpp
r88 r108 52 52 _bank_gpr_size_slot = size_general_register-log2(nb_bank); 53 53 54 _mask_gpr = gen_mask<Tgeneral_address_t> ( _bank_gpr_size_slot);54 _mask_gpr = gen_mask<Tgeneral_address_t> (log2(nb_bank)); 55 55 56 56 uint32_t spr_nb_slot = nb_special_register - nb_thread*_nb_special_register_logic; … … 59 59 _bank_spr_size_slot = size_special_register-log2(nb_bank); 60 60 61 _mask_spr = gen_mask<Tspecial_address_t> ( _bank_spr_size_slot);61 _mask_spr = gen_mask<Tspecial_address_t> (log2(nb_bank)); 62 62 63 63 if (is_toplevel) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/SelfTest/src/test.cpp
r105 r108 59 59 ALLOC2_SC_SIGNAL( in_RENAME_IN_NO_EXECUTE ," in_RENAME_IN_NO_EXECUTE ",Tcontrol_t ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 60 60 ALLOC2_SC_SIGNAL( in_RENAME_IN_IS_DELAY_SLOT ," in_RENAME_IN_IS_DELAY_SLOT ",Tcontrol_t ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 61 #ifdef DEBUG 62 ALLOC2_SC_SIGNAL( in_RENAME_IN_ADDRESS ," in_RENAME_IN_ADDRESS ",Taddress_t ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 63 #endif 61 64 ALLOC2_SC_SIGNAL( in_RENAME_IN_ADDRESS_NEXT ," in_RENAME_IN_ADDRESS_NEXT ",Taddress_t ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 62 65 ALLOC2_SC_SIGNAL( in_RENAME_IN_HAS_IMMEDIAT ," in_RENAME_IN_HAS_IMMEDIAT ",Tcontrol_t ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); … … 84 87 ALLOC1_SC_SIGNAL(out_RENAME_OUT_NO_EXECUTE ,"out_RENAME_OUT_NO_EXECUTE ",Tcontrol_t ,_param->_nb_inst_rename); 85 88 ALLOC1_SC_SIGNAL(out_RENAME_OUT_IS_DELAY_SLOT,"out_RENAME_OUT_IS_DELAY_SLOT",Tcontrol_t ,_param->_nb_inst_rename); 89 #ifdef DEBUG 90 ALLOC1_SC_SIGNAL(out_RENAME_OUT_ADDRESS ,"out_RENAME_OUT_ADDRESS ",Taddress_t ,_param->_nb_inst_rename); 91 #endif 86 92 ALLOC1_SC_SIGNAL(out_RENAME_OUT_ADDRESS_NEXT ,"out_RENAME_OUT_ADDRESS_NEXT ",Taddress_t ,_param->_nb_inst_rename); 87 93 ALLOC1_SC_SIGNAL(out_RENAME_OUT_HAS_IMMEDIAT ,"out_RENAME_OUT_HAS_IMMEDIAT ",Tcontrol_t ,_param->_nb_inst_rename); … … 99 105 ALLOC1_SC_SIGNAL(out_RENAME_OUT_EXCEPTION_USE,"out_RENAME_OUT_EXCEPTION_USE",Texception_t ,_param->_nb_inst_rename); 100 106 ALLOC1_SC_SIGNAL(out_RENAME_OUT_EXCEPTION ,"out_RENAME_OUT_EXCEPTION ",Texception_t ,_param->_nb_inst_rename); 107 108 ALLOC2_SC_SIGNAL( in_RETIRE_EVENT_STATE ," in_RETIRE_EVENT_STATE ",Tevent_state_t ,_param->_nb_front_end,_param->_nb_context[it1]); 101 109 102 110 /******************************************************** … … 121 129 INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_NO_EXECUTE ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 122 130 INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_IS_DELAY_SLOT ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 131 #ifdef DEBUG 132 INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_ADDRESS ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 133 #endif 123 134 INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_ADDRESS_NEXT ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 124 135 INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_HAS_IMMEDIAT ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); … … 149 160 INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_NO_EXECUTE ,_param->_nb_inst_rename); 150 161 INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_IS_DELAY_SLOT,_param->_nb_inst_rename); 162 #ifdef DEBUG 163 INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_ADDRESS ,_param->_nb_inst_rename); 164 #endif 151 165 INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_ADDRESS_NEXT ,_param->_nb_inst_rename); 152 166 INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_HAS_IMMEDIAT ,_param->_nb_inst_rename); … … 165 179 INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_EXCEPTION ,_param->_nb_inst_rename); 166 180 181 INSTANCE2_SC_SIGNAL(_Rename_select, in_RETIRE_EVENT_STATE ,_param->_nb_front_end, _param->_nb_context[it1]); 182 167 183 msg(_("<%s> : Start Simulation ............\n"),name.c_str()); 168 184 … … 194 210 SC_START(5); 195 211 in_NRESET->write(1); 212 213 for (uint32_t i=0; i<_param->_nb_front_end; i++) 214 for (uint32_t j=0; j<_param->_nb_context[i]; j++) 215 in_RETIRE_EVENT_STATE [i][j]->write(EVENT_STATE_NO_EVENT); 196 216 197 217 LABEL("Loop of Test"); … … 329 349 delete [] in_RENAME_IN_NO_EXECUTE ; 330 350 delete [] in_RENAME_IN_IS_DELAY_SLOT ; 351 #ifdef DEBUG 352 delete [] in_RENAME_IN_ADDRESS ; 353 #endif 331 354 delete [] in_RENAME_IN_ADDRESS_NEXT ; 332 355 delete [] in_RENAME_IN_HAS_IMMEDIAT ; … … 354 377 delete [] out_RENAME_OUT_NO_EXECUTE ; 355 378 delete [] out_RENAME_OUT_IS_DELAY_SLOT; 379 #ifdef DEBUG 380 delete [] out_RENAME_OUT_ADDRESS ; 381 #endif 356 382 delete [] out_RENAME_OUT_ADDRESS_NEXT ; 357 383 delete [] out_RENAME_OUT_HAS_IMMEDIAT ; … … 369 395 delete [] out_RENAME_OUT_EXCEPTION_USE; 370 396 delete [] out_RENAME_OUT_EXCEPTION ; 397 398 DELETE2_SC_SIGNAL( in_RETIRE_EVENT_STATE ,_param->_nb_front_end, _param->_nb_context[it1]); 371 399 #endif 372 400 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/include/Rename_select.h
r105 r108 76 76 public : SC_IN (Tcontrol_t ) *** in_RENAME_IN_NO_EXECUTE ;//[nb_front_end][nb_inst_decod] 77 77 public : SC_IN (Tcontrol_t ) *** in_RENAME_IN_IS_DELAY_SLOT ;//[nb_front_end][nb_inst_decod] 78 #ifdef DEBUG 79 public : SC_IN (Taddress_t ) *** in_RENAME_IN_ADDRESS ;//[nb_front_end][nb_inst_decod] 80 #endif 78 81 public : SC_IN (Taddress_t ) *** in_RENAME_IN_ADDRESS_NEXT ;//[nb_front_end][nb_inst_decod] 79 82 public : SC_IN (Tcontrol_t ) *** in_RENAME_IN_HAS_IMMEDIAT ;//[nb_front_end][nb_inst_decod] … … 102 105 public : SC_OUT(Tcontrol_t ) ** out_RENAME_OUT_NO_EXECUTE ;//[nb_inst_rename] 103 106 public : SC_OUT(Tcontrol_t ) ** out_RENAME_OUT_IS_DELAY_SLOT;//[nb_inst_rename] 107 #ifdef DEBUG 108 public : SC_OUT(Taddress_t ) ** out_RENAME_OUT_ADDRESS ;//[nb_inst_rename] 109 #endif 104 110 public : SC_OUT(Taddress_t ) ** out_RENAME_OUT_ADDRESS_NEXT ;//[nb_inst_rename] 105 111 public : SC_OUT(Tcontrol_t ) ** out_RENAME_OUT_HAS_IMMEDIAT ;//[nb_inst_rename] … … 117 123 public : SC_OUT(Texception_t ) ** out_RENAME_OUT_EXCEPTION_USE;//[nb_inst_rename] 118 124 public : SC_OUT(Texception_t ) ** out_RENAME_OUT_EXCEPTION ;//[nb_inst_rename] 125 126 // ~~~~~[ Interface "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 127 public : SC_IN (Tevent_state_t ) *** in_RETIRE_EVENT_STATE ;//[nb_front_end][nb_context] 119 128 120 129 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select.cpp
r105 r108 97 97 << (*(in_RENAME_IN_NO_EXECUTE [i][j])) 98 98 << (*(in_RENAME_IN_IS_DELAY_SLOT [i][j])) 99 #ifdef DEBUG 100 << (*(in_RENAME_IN_ADDRESS [i][j])) 101 #endif 99 102 << (*(in_RENAME_IN_ADDRESS_NEXT [i][j])) 100 103 << (*(in_RENAME_IN_HAS_IMMEDIAT [i][j])) … … 119 122 sensitive << (*(in_RENAME_IN_DEPTH [i][j])); 120 123 } 124 125 // for (uint32_t i=0; i<_param->_nb_front_end; i++) 126 // for (uint32_t j=0; j<_param->_nb_context [i]; j++) 127 // sensitive << (*(in_RETIRE_EVENT_STATE [i][j])); 128 121 129 for (uint32_t i=0; i<_param->_nb_inst_rename; i++) 122 130 sensitive << (*(in_RENAME_OUT_ACK [i])); … … 163 171 (*(out_RENAME_OUT_IS_DELAY_SLOT [x])) (*(in_RENAME_IN_VAL [i][j])); 164 172 (*(out_RENAME_OUT_IS_DELAY_SLOT [x])) (*(in_RENAME_IN_IS_DELAY_SLOT [i][j])); 173 #ifdef DEBUG 174 (*(out_RENAME_OUT_ADDRESS [x])) (*(in_RENAME_IN_VAL [i][j])); 175 (*(out_RENAME_OUT_ADDRESS [x])) (*(in_RENAME_IN_ADDRESS [i][j])); 176 #endif 165 177 (*(out_RENAME_OUT_ADDRESS_NEXT [x])) (*(in_RENAME_IN_VAL [i][j])); 166 178 (*(out_RENAME_OUT_ADDRESS_NEXT [x])) (*(in_RENAME_IN_ADDRESS_NEXT [i][j])); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_allocation.cpp
r105 r108 69 69 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NO_EXECUTE ,"no_execute" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 70 70 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_IS_DELAY_SLOT ,"is_delay_slot",Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 71 #ifdef DEBUG 72 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS ,"address" ,Taddress_t ,_param->_size_instruction_address , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 73 #endif 71 74 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS_NEXT ,"address_next" ,Taddress_t ,_param->_size_instruction_address , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 72 75 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); … … 99 102 ALLOC1_SIGNAL_OUT(out_RENAME_OUT_NO_EXECUTE ,"no_execute" ,Tcontrol_t ,1 ); 100 103 ALLOC1_SIGNAL_OUT(out_RENAME_OUT_IS_DELAY_SLOT ,"is_delay_slot",Tcontrol_t ,1 ); 104 #ifdef DEBUG 105 ALLOC1_SIGNAL_OUT(out_RENAME_OUT_ADDRESS ,"address" ,Taddress_t ,_param->_size_instruction_address ); 106 #endif 101 107 ALLOC1_SIGNAL_OUT(out_RENAME_OUT_ADDRESS_NEXT ,"address_next" ,Taddress_t ,_param->_size_instruction_address ); 102 108 ALLOC1_SIGNAL_OUT(out_RENAME_OUT_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t ,1 ); … … 114 120 ALLOC1_SIGNAL_OUT(out_RENAME_OUT_EXCEPTION_USE ,"exception_use",Texception_t ,_param->_size_exception_use ); 115 121 ALLOC1_SIGNAL_OUT(out_RENAME_OUT_EXCEPTION ,"exception" ,Texception_t ,_param->_size_exception ); 122 } 123 124 // ~~~~~[ Interface : "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 125 { 126 ALLOC2_INTERFACE("retire_event", IN,NORTH, _("Retire event"), _param->_nb_front_end, _param->_nb_context[it1]); 127 128 _ALLOC2_SIGNAL_IN ( in_RETIRE_EVENT_STATE ,"state" ,Tevent_state_t ,_param->_size_event_state, _param->_nb_front_end, _param->_nb_context[it1]); 116 129 } 117 130 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_deallocation.cpp
r105 r108 7 7 8 8 #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/include/Rename_select.h" 9 #include "Behavioural/include/Allocation.h" 9 10 10 11 namespace morpheo { … … 40 41 delete [] in_RENAME_IN_NO_EXECUTE ; 41 42 delete [] in_RENAME_IN_IS_DELAY_SLOT ; 43 #ifdef DEBUG 44 delete [] in_RENAME_IN_ADDRESS ; 45 #endif 42 46 delete [] in_RENAME_IN_ADDRESS_NEXT ; 43 47 delete [] in_RENAME_IN_HAS_IMMEDIAT ; … … 66 70 delete [] out_RENAME_OUT_TYPE ; 67 71 delete [] out_RENAME_OUT_OPERATION ; 72 #ifdef DEBUG 73 delete [] out_RENAME_OUT_ADDRESS ; 74 #endif 68 75 delete [] out_RENAME_OUT_ADDRESS_NEXT ; 69 76 delete [] out_RENAME_OUT_HAS_IMMEDIAT ; … … 80 87 delete [] out_RENAME_OUT_NUM_REG_RE ; 81 88 delete [] out_RENAME_OUT_EXCEPTION_USE; 89 90 DELETE2_SIGNAL( in_RETIRE_EVENT_STATE ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_event_state); 82 91 } 83 92 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_genMealy.cpp
r105 r108 65 65 log_printf(TRACE,Rename_select,FUNCTION," * rename_out_ack : %d",PORT_READ(in_RENAME_OUT_ACK[i])); 66 66 67 Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_RENAME_IN_FRONT_END_ID [x][y]):0; 68 Tcontext_t context_id = (_param->_have_port_context_id )?PORT_READ(in_RENAME_IN_CONTEXT_ID [x][y]):0; 69 70 Tcontrol_t no_execute = (PORT_READ(in_RENAME_IN_NO_EXECUTE [x][y])); 71 72 Tcontrol_t read_ra = (PORT_READ(in_RENAME_IN_READ_RA [x][y])); 73 Tcontrol_t read_rb = (PORT_READ(in_RENAME_IN_READ_RB [x][y])); 74 Tcontrol_t read_rc = (PORT_READ(in_RENAME_IN_READ_RC [x][y])); 75 Tcontrol_t write_rd = (PORT_READ(in_RENAME_IN_WRITE_RD [x][y])); 76 Tcontrol_t write_re = (PORT_READ(in_RENAME_IN_WRITE_RE [x][y])); 77 78 // Attention, j'ai enlevé event_state de la liste de sensibilité 79 // Tevent_state_t event_state = PORT_READ(in_RETIRE_EVENT_STATE [front_end_id][context_id]); 80 81 // Tcontrol_t no_execute = (PORT_READ(in_RENAME_IN_NO_EXECUTE [x][y]) or 82 // // ROB Flush 83 // ((event_state == EVENT_STATE_EVENT ) or 84 // (event_state == EVENT_STATE_WAITEND))); 85 86 // Tcontrol_t read_ra = (PORT_READ(in_RENAME_IN_READ_RA [x][y]) and not no_execute); 87 // Tcontrol_t read_rb = (PORT_READ(in_RENAME_IN_READ_RB [x][y]) and not no_execute); 88 // Tcontrol_t read_rc = (PORT_READ(in_RENAME_IN_READ_RC [x][y]) and not no_execute); 89 // Tcontrol_t write_rd = (PORT_READ(in_RENAME_IN_WRITE_RD [x][y]) and not no_execute); 90 // Tcontrol_t write_re = (PORT_READ(in_RENAME_IN_WRITE_RE [x][y]) and not no_execute); 91 67 92 if (_param->_have_port_front_end_id) 68 PORT_WRITE(out_RENAME_OUT_FRONT_END_ID [i], PORT_READ(in_RENAME_IN_FRONT_END_ID [x][y]));93 PORT_WRITE(out_RENAME_OUT_FRONT_END_ID [i],front_end_id); 69 94 if (_param->_have_port_context_id) 70 PORT_WRITE(out_RENAME_OUT_CONTEXT_ID [i],PORT_READ(in_RENAME_IN_CONTEXT_ID [x][y]));95 PORT_WRITE(out_RENAME_OUT_CONTEXT_ID [i],context_id); 71 96 if (_param->_have_port_depth) 72 97 PORT_WRITE(out_RENAME_OUT_DEPTH [i],PORT_READ(in_RENAME_IN_DEPTH [x][y])); 73 98 PORT_WRITE(out_RENAME_OUT_TYPE [i],PORT_READ(in_RENAME_IN_TYPE [x][y])); 74 99 PORT_WRITE(out_RENAME_OUT_OPERATION [i],PORT_READ(in_RENAME_IN_OPERATION [x][y])); 75 PORT_WRITE(out_RENAME_OUT_NO_EXECUTE [i], PORT_READ(in_RENAME_IN_NO_EXECUTE [x][y]));100 PORT_WRITE(out_RENAME_OUT_NO_EXECUTE [i],no_execute); 76 101 PORT_WRITE(out_RENAME_OUT_IS_DELAY_SLOT[i],PORT_READ(in_RENAME_IN_IS_DELAY_SLOT [x][y])); 102 #ifdef DEBUG 103 PORT_WRITE(out_RENAME_OUT_ADDRESS [i],PORT_READ(in_RENAME_IN_ADDRESS [x][y])); 104 #endif 77 105 PORT_WRITE(out_RENAME_OUT_ADDRESS_NEXT [i],PORT_READ(in_RENAME_IN_ADDRESS_NEXT [x][y])); 78 106 PORT_WRITE(out_RENAME_OUT_HAS_IMMEDIAT [i],PORT_READ(in_RENAME_IN_HAS_IMMEDIAT [x][y])); 79 107 PORT_WRITE(out_RENAME_OUT_IMMEDIAT [i],PORT_READ(in_RENAME_IN_IMMEDIAT [x][y])); 80 PORT_WRITE(out_RENAME_OUT_READ_RA [i], PORT_READ(in_RENAME_IN_READ_RA [x][y]));108 PORT_WRITE(out_RENAME_OUT_READ_RA [i],read_ra); 81 109 PORT_WRITE(out_RENAME_OUT_NUM_REG_RA [i],PORT_READ(in_RENAME_IN_NUM_REG_RA [x][y])); 82 PORT_WRITE(out_RENAME_OUT_READ_RB [i], PORT_READ(in_RENAME_IN_READ_RB [x][y]));110 PORT_WRITE(out_RENAME_OUT_READ_RB [i],read_rb); 83 111 PORT_WRITE(out_RENAME_OUT_NUM_REG_RB [i],PORT_READ(in_RENAME_IN_NUM_REG_RB [x][y])); 84 PORT_WRITE(out_RENAME_OUT_READ_RC [i], PORT_READ(in_RENAME_IN_READ_RC [x][y]));112 PORT_WRITE(out_RENAME_OUT_READ_RC [i],read_rc); 85 113 PORT_WRITE(out_RENAME_OUT_NUM_REG_RC [i],PORT_READ(in_RENAME_IN_NUM_REG_RC [x][y])); 86 PORT_WRITE(out_RENAME_OUT_WRITE_RD [i], PORT_READ(in_RENAME_IN_WRITE_RD [x][y]));114 PORT_WRITE(out_RENAME_OUT_WRITE_RD [i],write_rd); 87 115 PORT_WRITE(out_RENAME_OUT_NUM_REG_RD [i],PORT_READ(in_RENAME_IN_NUM_REG_RD [x][y])); 88 PORT_WRITE(out_RENAME_OUT_WRITE_RE [i], PORT_READ(in_RENAME_IN_WRITE_RE [x][y]));116 PORT_WRITE(out_RENAME_OUT_WRITE_RE [i],write_re); 89 117 PORT_WRITE(out_RENAME_OUT_NUM_REG_RE [i],PORT_READ(in_RENAME_IN_NUM_REG_RE [x][y])); 90 118 PORT_WRITE(out_RENAME_OUT_EXCEPTION_USE[i],PORT_READ(in_RENAME_IN_EXCEPTION_USE [x][y])); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/SelfTest/src/test.cpp
r105 r108 57 57 ALLOC2_SC_SIGNAL( in_RENAME_IN_NO_EXECUTE ," in_RENAME_IN_NO_EXECUTE ",Tcontrol_t ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 58 58 ALLOC2_SC_SIGNAL( in_RENAME_IN_IS_DELAY_SLOT ," in_RENAME_IN_IS_DELAY_SLOT ",Tcontrol_t ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 59 #ifdef DEBUG 60 ALLOC2_SC_SIGNAL( in_RENAME_IN_ADDRESS ," in_RENAME_IN_ADDRESS ",Tgeneral_data_t ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 61 #endif 59 62 ALLOC2_SC_SIGNAL( in_RENAME_IN_ADDRESS_NEXT ," in_RENAME_IN_ADDRESS_NEXT ",Tgeneral_data_t ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 60 63 ALLOC2_SC_SIGNAL( in_RENAME_IN_HAS_IMMEDIAT ," in_RENAME_IN_HAS_IMMEDIAT ",Tcontrol_t ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); … … 81 84 ALLOC1_SC_SIGNAL(out_INSERT_NO_EXECUTE ,"out_INSERT_NO_EXECUTE ",Tcontrol_t ,_param->_nb_inst_insert); 82 85 ALLOC1_SC_SIGNAL(out_INSERT_IS_DELAY_SLOT ,"out_INSERT_IS_DELAY_SLOT ",Tcontrol_t ,_param->_nb_inst_insert); 86 #ifdef DEBUG 87 ALLOC1_SC_SIGNAL(out_INSERT_ADDRESS ,"out_INSERT_ADDRESS ",Tgeneral_data_t ,_param->_nb_inst_insert); 88 #endif 83 89 ALLOC1_SC_SIGNAL(out_INSERT_ADDRESS_NEXT ,"out_INSERT_ADDRESS_NEXT ",Tgeneral_data_t ,_param->_nb_inst_insert); 84 90 ALLOC1_SC_SIGNAL(out_INSERT_HAS_IMMEDIAT ,"out_INSERT_HAS_IMMEDIAT ",Tcontrol_t ,_param->_nb_inst_insert); … … 155 161 INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_NO_EXECUTE ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 156 162 INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_IS_DELAY_SLOT ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 163 #ifdef DEBUG 164 INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_ADDRESS ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 165 #endif 157 166 INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_ADDRESS_NEXT ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 158 167 INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_HAS_IMMEDIAT ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); … … 183 192 INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_NO_EXECUTE ,_param->_nb_inst_insert); 184 193 INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_IS_DELAY_SLOT ,_param->_nb_inst_insert); 194 #ifdef DEBUG 195 INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_ADDRESS ,_param->_nb_inst_insert); 196 #endif 185 197 INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_ADDRESS_NEXT ,_param->_nb_inst_insert); 186 198 INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_HAS_IMMEDIAT ,_param->_nb_inst_insert); … … 297 309 DELETE2_SC_SIGNAL( in_RENAME_IN_NO_EXECUTE ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 298 310 DELETE2_SC_SIGNAL( in_RENAME_IN_IS_DELAY_SLOT ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 311 #ifdef DEBUG 312 DELETE2_SC_SIGNAL( in_RENAME_IN_ADDRESS ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 313 #endif 299 314 DELETE2_SC_SIGNAL( in_RENAME_IN_ADDRESS_NEXT ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 300 315 DELETE2_SC_SIGNAL( in_RENAME_IN_HAS_IMMEDIAT ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); … … 322 337 DELETE1_SC_SIGNAL(out_INSERT_NO_EXECUTE ,_param->_nb_inst_insert); 323 338 DELETE1_SC_SIGNAL(out_INSERT_IS_DELAY_SLOT ,_param->_nb_inst_insert); 339 #ifdef DEBUG 340 DELETE1_SC_SIGNAL(out_INSERT_ADDRESS ,_param->_nb_inst_insert); 341 #endif 324 342 DELETE1_SC_SIGNAL(out_INSERT_ADDRESS_NEXT ,_param->_nb_inst_insert); 325 343 DELETE1_SC_SIGNAL(out_INSERT_HAS_IMMEDIAT ,_param->_nb_inst_insert); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/include/Rename_unit.h
r105 r108 78 78 public : SC_IN (Tcontrol_t ) *** in_RENAME_IN_NO_EXECUTE ;//[nb_front_end][nb_inst_decod] 79 79 public : SC_IN (Tcontrol_t ) *** in_RENAME_IN_IS_DELAY_SLOT ;//[nb_front_end][nb_inst_decod] 80 #ifdef DEBUG 81 public : SC_IN (Taddress_t ) *** in_RENAME_IN_ADDRESS ;//[nb_front_end][nb_inst_decod] 82 #endif 80 83 public : SC_IN (Taddress_t ) *** in_RENAME_IN_ADDRESS_NEXT ;//[nb_front_end][nb_inst_decod] 81 84 public : SC_IN (Tcontrol_t ) *** in_RENAME_IN_HAS_IMMEDIAT ;//[nb_front_end][nb_inst_decod] … … 104 107 public : SC_OUT(Tcontrol_t ) ** out_INSERT_NO_EXECUTE ;//[nb_inst_insert] 105 108 public : SC_OUT(Tcontrol_t ) ** out_INSERT_IS_DELAY_SLOT ;//[nb_inst_insert] 109 #ifdef DEBUG 110 public : SC_OUT(Taddress_t ) ** out_INSERT_ADDRESS ;//[nb_inst_insert] 111 #endif 106 112 public : SC_OUT(Taddress_t ) ** out_INSERT_ADDRESS_NEXT ;//[nb_inst_insert] 107 113 public : SC_OUT(Tcontrol_t ) ** out_INSERT_HAS_IMMEDIAT ;//[nb_inst_insert] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/src/Rename_unit_allocation.cpp
r105 r108 69 69 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NO_EXECUTE ,"no_execute" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 70 70 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_IS_DELAY_SLOT ,"is_delay_slot",Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 71 #ifdef DEBUG 72 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS ,"address" ,Taddress_t ,_param->_size_instruction_address , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 73 #endif 71 74 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS_NEXT ,"address_next" ,Taddress_t ,_param->_size_instruction_address , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 72 75 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); … … 99 102 ALLOC1_SIGNAL_OUT(out_INSERT_NO_EXECUTE ,"no_execute" ,Tcontrol_t ,1 ); 100 103 ALLOC1_SIGNAL_OUT(out_INSERT_IS_DELAY_SLOT ,"is_delay_slot" ,Tcontrol_t ,1 ); 104 #ifdef DEBUG 105 ALLOC1_SIGNAL_OUT(out_INSERT_ADDRESS ,"address" ,Taddress_t ,_param->_size_instruction_address ); 106 #endif 101 107 ALLOC1_SIGNAL_OUT(out_INSERT_ADDRESS_NEXT ,"address_next" ,Taddress_t ,_param->_size_instruction_address ); 102 108 ALLOC1_SIGNAL_OUT(out_INSERT_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t ,1 ); … … 301 307 PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_IS_DELAY_SLOT", 302 308 dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_IS_DELAY_SLOT"); 309 #ifdef DEBUG 310 PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS" , 311 dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS" ); 312 #endif 303 313 PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS_NEXT" , 304 314 dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS_NEXT" ); … … 349 359 PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_DEPTH" , 350 360 dest,"out_INSERT_" +toString(i)+"_DEPTH" ); 361 #ifdef DEBUG 362 PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_ADDRESS" , 363 dest,"out_INSERT_" +toString(i)+"_ADDRESS" ); 364 #endif 351 365 PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_ADDRESS_NEXT", 352 366 dest,"out_INSERT_" +toString(i)+"_ADDRESS_NEXT"); … … 412 426 dest, "in_INSERT_" +toString(i)+"_RENAME_SELECT_EXCEPTION" ); 413 427 } 428 429 for (uint32_t i=0; i<_param->_nb_front_end; i++) 430 for (uint32_t j=0; j<_param->_nb_context[i]; j++) 431 { 432 dest = _name; 433 434 #ifdef POSITION 435 _component->interface_map (src ,"retire_event_"+toString(i)+"_"+toString(j), 436 dest,"retire_event_"+toString(i)+"_"+toString(j)); 437 #endif 438 PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE", 439 dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE"); 440 } 414 441 } 415 442 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/src/Rename_unit_deallocation.cpp
r105 r108 37 37 DELETE2_SIGNAL( in_RENAME_IN_NO_EXECUTE ,_param->_nb_front_end, _param->_nb_inst_decod[it1],1 ); 38 38 DELETE2_SIGNAL( in_RENAME_IN_IS_DELAY_SLOT ,_param->_nb_front_end, _param->_nb_inst_decod[it1],1 ); 39 #ifdef DEBUG 40 DELETE2_SIGNAL( in_RENAME_IN_ADDRESS ,_param->_nb_front_end, _param->_nb_inst_decod[it1],_param->_size_instruction_address ); 41 #endif 39 42 DELETE2_SIGNAL( in_RENAME_IN_ADDRESS_NEXT ,_param->_nb_front_end, _param->_nb_inst_decod[it1],_param->_size_instruction_address ); 40 43 DELETE2_SIGNAL( in_RENAME_IN_HAS_IMMEDIAT ,_param->_nb_front_end, _param->_nb_inst_decod[it1],1 ); … … 62 65 DELETE1_SIGNAL(out_INSERT_NO_EXECUTE ,_param->_nb_inst_insert,1 ); 63 66 DELETE1_SIGNAL(out_INSERT_IS_DELAY_SLOT ,_param->_nb_inst_insert,1 ); 67 #ifdef DEBUG 68 DELETE1_SIGNAL(out_INSERT_ADDRESS ,_param->_nb_inst_insert,_param->_size_instruction_address ); 69 #endif 64 70 DELETE1_SIGNAL(out_INSERT_ADDRESS_NEXT ,_param->_nb_inst_insert,_param->_size_instruction_address ); 65 71 DELETE1_SIGNAL(out_INSERT_HAS_IMMEDIAT ,_param->_nb_inst_insert,1 ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/SelfTest/configuration.cfg
r88 r108 13 13 1 1 +1 # nb_inst_branch_complete 14 14 1 1 +1 # nb_branch_speculated [0][0] [nb_front_end][nb_context] 15 1 1 +1 # size_nb_inst_decod 15 16 1 1 +1 # nb_rename_unit_select 16 17 1 1 +1 # nb_execute_loop_select -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/SelfTest/src/main.cpp
r88 r108 8 8 #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/SelfTest/include/test.h" 9 9 10 #define NB_PARAMS 2 210 #define NB_PARAMS 23 11 11 12 12 void usage (int argc, char * argv[]) … … 27 27 err (_(" * nb_inst_branch_complete (uint32_t )\n")); 28 28 err (_(" * nb_branch_speculated [nb_front_end][nb_context] (uint32_t )\n")); 29 err (_(" * size_nb_inst_decod (uint32_t )\n")); 29 30 err (_(" * nb_rename_unit_select (uint32_t )\n")); 30 31 err (_(" * nb_execute_loop_select (uint32_t )\n")); … … 130 131 _nb_branch_speculated [i][j] = fromString<uint32_t>(argv[x++]); 131 132 } 133 uint32_t _size_nb_inst_decod = fromString<uint32_t >(argv[x++]); 132 134 uint32_t _nb_rename_unit_select = fromString<uint32_t >(argv[x++]); 133 135 uint32_t _nb_execute_loop_select = fromString<uint32_t >(argv[x++]); … … 275 277 _nb_inst_branch_complete , 276 278 _nb_branch_speculated , 279 _size_nb_inst_decod , 277 280 _nb_rename_unit_select , 278 281 _nb_execute_loop_select , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/SelfTest/src/test.cpp
r105 r108 57 57 ALLOC2_SC_SIGNAL( in_RENAME_NO_EXECUTE ," in_RENAME_NO_EXECUTE ",Tcontrol_t ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 58 58 ALLOC2_SC_SIGNAL( in_RENAME_IS_DELAY_SLOT ," in_RENAME_IS_DELAY_SLOT ",Tcontrol_t ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 59 #ifdef DEBUG 60 ALLOC2_SC_SIGNAL( in_RENAME_ADDRESS ," in_RENAME_ADDRESS ",Taddress_t ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 61 #endif 59 62 ALLOC2_SC_SIGNAL( in_RENAME_ADDRESS_NEXT ," in_RENAME_ADDRESS_NEXT ",Taddress_t ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 60 63 ALLOC2_SC_SIGNAL( in_RENAME_HAS_IMMEDIAT ," in_RENAME_HAS_IMMEDIAT ",Tcontrol_t ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); … … 165 168 ALLOC2_SC_SIGNAL(out_NB_INST_COMMIT_ALL ,"out_NB_INST_COMMIT_ALL ",Tcounter_t ,_param->_nb_front_end,_param->_nb_context[it1]); 166 169 ALLOC2_SC_SIGNAL(out_NB_INST_COMMIT_MEM ,"out_NB_INST_COMMIT_MEM ",Tcounter_t ,_param->_nb_front_end,_param->_nb_context[it1]); 170 ALLOC2_SC_SIGNAL( in_NB_INST_DECOD_ALL ," in_NB_INST_DECOD_ALL ",Tcounter_t ,_param->_nb_front_end,_param->_nb_context[it1]); 167 171 168 172 ALLOC2_SC_SIGNAL( in_DEPTH_MIN ," in_DEPTH_MIN ",Tdepth_t ,_param->_nb_front_end,_param->_nb_context[it1]); … … 194 198 INSTANCE2_SC_SIGNAL(_OOO_Engine, in_RENAME_NO_EXECUTE ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 195 199 INSTANCE2_SC_SIGNAL(_OOO_Engine, in_RENAME_IS_DELAY_SLOT ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 200 #ifdef DEBUG 201 INSTANCE2_SC_SIGNAL(_OOO_Engine, in_RENAME_ADDRESS ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 202 #endif 196 203 INSTANCE2_SC_SIGNAL(_OOO_Engine, in_RENAME_ADDRESS_NEXT ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 197 204 INSTANCE2_SC_SIGNAL(_OOO_Engine, in_RENAME_HAS_IMMEDIAT ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); … … 315 322 INSTANCE2_SC_SIGNAL(_OOO_Engine,out_NB_INST_COMMIT_ALL ,_param->_nb_front_end,_param->_nb_context[it1]); 316 323 INSTANCE2_SC_SIGNAL(_OOO_Engine,out_NB_INST_COMMIT_MEM ,_param->_nb_front_end,_param->_nb_context[it1]); 324 INSTANCE2_SC_SIGNAL(_OOO_Engine, in_NB_INST_DECOD_ALL ,_param->_nb_front_end,_param->_nb_context[it1]); 317 325 318 326 if (_param->_have_port_depth) … … 378 386 DELETE2_SC_SIGNAL( in_RENAME_NO_EXECUTE ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 379 387 DELETE2_SC_SIGNAL( in_RENAME_IS_DELAY_SLOT ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 388 #ifdef DEBUG 389 DELETE2_SC_SIGNAL( in_RENAME_ADDRESS ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 390 #endif 380 391 DELETE2_SC_SIGNAL( in_RENAME_ADDRESS_NEXT ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 381 392 DELETE2_SC_SIGNAL( in_RENAME_HAS_IMMEDIAT ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); … … 484 495 DELETE2_SC_SIGNAL(out_NB_INST_COMMIT_ALL ,_param->_nb_front_end,_param->_nb_context[it1]); 485 496 DELETE2_SC_SIGNAL(out_NB_INST_COMMIT_MEM ,_param->_nb_front_end,_param->_nb_context[it1]); 497 DELETE2_SC_SIGNAL( in_NB_INST_DECOD_ALL ,_param->_nb_front_end,_param->_nb_context[it1]); 486 498 DELETE2_SC_SIGNAL( in_DEPTH_MIN ,_param->_nb_front_end,_param->_nb_context[it1]); 487 499 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/include/OOO_Engine.h
r105 r108 77 77 public : SC_IN (Tcontrol_t ) *** in_RENAME_NO_EXECUTE ;//[nb_front_end][nb_inst_decod] 78 78 public : SC_IN (Tcontrol_t ) *** in_RENAME_IS_DELAY_SLOT ;//[nb_front_end][nb_inst_decod] 79 #ifdef DEBUG 80 public : SC_IN (Taddress_t ) *** in_RENAME_ADDRESS ;//[nb_front_end][nb_inst_decod] 81 #endif 79 82 public : SC_IN (Taddress_t ) *** in_RENAME_ADDRESS_NEXT ;//[nb_front_end][nb_inst_decod] 80 83 public : SC_IN (Tcontrol_t ) *** in_RENAME_HAS_IMMEDIAT ;//[nb_front_end][nb_inst_decod] … … 194 197 public : SC_OUT(Tcounter_t ) *** out_NB_INST_COMMIT_ALL ;//[nb_front_end][nb_context] 195 198 public : SC_OUT(Tcounter_t ) *** out_NB_INST_COMMIT_MEM ;//[nb_front_end][nb_context] 199 public : SC_IN (Tcounter_t ) *** in_NB_INST_DECOD_ALL ;//[nb_front_end][nb_context] 196 200 197 201 // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/include/Parameters.h
r104 r108 134 134 uint32_t nb_inst_branch_complete , 135 135 uint32_t ** nb_branch_speculated ,//[nb_front_end][nb_context] 136 uint32_t size_nb_inst_decod , 136 137 uint32_t nb_rename_unit_select , 137 138 uint32_t nb_execute_loop_select , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_allocation.cpp
r105 r108 66 66 _ALLOC2_SIGNAL_IN ( in_RENAME_NO_EXECUTE ,"NO_EXECUTE" ,Tcontrol_t ,1 ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 67 67 _ALLOC2_SIGNAL_IN ( in_RENAME_IS_DELAY_SLOT ,"IS_DELAY_SLOT" ,Tcontrol_t ,1 ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 68 #ifdef DEBUG 69 _ALLOC2_SIGNAL_IN ( in_RENAME_ADDRESS ,"ADDRESS" ,Taddress_t ,_param->_size_instruction_address ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 70 #endif 68 71 _ALLOC2_SIGNAL_IN ( in_RENAME_ADDRESS_NEXT ,"ADDRESS_NEXT" ,Taddress_t ,_param->_size_instruction_address ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 69 72 _ALLOC2_SIGNAL_IN ( in_RENAME_HAS_IMMEDIAT ,"HAS_IMMEDIAT" ,Tcontrol_t ,1 ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); … … 158 161 // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 159 162 { 160 ALLOC1_INTERFACE("branch_complete",OUT,WEST,_("Instruction to execute_loop"),_param->_nb_inst_ issue);163 ALLOC1_INTERFACE("branch_complete",OUT,WEST,_("Instruction to execute_loop"),_param->_nb_inst_branch_complete); 161 164 162 165 ALLOC1_VALACK_OUT (out_BRANCH_COMPLETE_VAL , VAL); … … 219 222 _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]); 220 223 _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]); 224 _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]); 221 225 } 222 226 … … 413 417 PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_IS_DELAY_SLOT", 414 418 dest, "in_RENAME_" +toString(j)+"_"+toString(k)+"_IS_DELAY_SLOT"); 419 #ifdef DEBUG 420 PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_ADDRESS" , 421 dest, "in_RENAME_" +toString(j)+"_"+toString(k)+"_ADDRESS" ); 422 #endif 415 423 PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_ADDRESS_NEXT" , 416 424 dest, "in_RENAME_" +toString(j)+"_"+toString(k)+"_ADDRESS_NEXT" ); … … 477 485 COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j) +"_IS_DELAY_SLOT" , 478 486 dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_IS_DELAY_SLOT" ); 487 #ifdef DEBUG 488 COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j) +"_ADDRESS" , 489 dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_ADDRESS" ); 490 #endif 479 491 COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j) +"_ADDRESS_NEXT" , 480 492 dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_ADDRESS_NEXT" ); … … 755 767 756 768 // in_INSERT_DEPTH - component_rename_unit 769 // in_INSERT_ADDRESS - component_rename_unit 757 770 // in_INSERT_ADDRESS_NEXT - component_rename_unit 758 771 // in_INSERT_EXCEPTION_USE - component_rename_unit … … 991 1004 PORT_MAP(_component,src ,"out_NB_INST_"+toString(i)+"_"+toString(j)+"_COMMIT_MEM", 992 1005 dest,"out_NB_INST_"+toString(i)+"_"+toString(j)+"_COMMIT_MEM"); 1006 PORT_MAP(_component,src , "in_NB_INST_"+toString(i)+"_"+toString(j)+"_DECOD_ALL" , 1007 dest, "in_NB_INST_"+toString(i)+"_"+toString(j)+"_DECOD_ALL" ); 993 1008 } 994 1009 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_deallocation.cpp
r105 r108 36 36 DELETE2_SIGNAL( in_RENAME_NO_EXECUTE ,_param->_nb_front_end,_param->_nb_inst_decod[it1],1 ); 37 37 DELETE2_SIGNAL( in_RENAME_IS_DELAY_SLOT ,_param->_nb_front_end,_param->_nb_inst_decod[it1],1 ); 38 #ifdef DEBUG 39 DELETE2_SIGNAL( in_RENAME_ADDRESS ,_param->_nb_front_end,_param->_nb_inst_decod[it1],_param->_size_instruction_address ); 40 #endif 38 41 DELETE2_SIGNAL( in_RENAME_ADDRESS_NEXT ,_param->_nb_front_end,_param->_nb_inst_decod[it1],_param->_size_instruction_address ); 39 42 DELETE2_SIGNAL( in_RENAME_HAS_IMMEDIAT ,_param->_nb_front_end,_param->_nb_inst_decod[it1],1 ); … … 142 145 DELETE2_SIGNAL(out_NB_INST_COMMIT_ALL ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_nb_inst_commit ); 143 146 DELETE2_SIGNAL(out_NB_INST_COMMIT_MEM ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_nb_inst_commit ); 147 DELETE2_SIGNAL( in_NB_INST_DECOD_ALL ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_nb_inst_decod ); 144 148 DELETE2_SIGNAL( in_DEPTH_MIN ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_depth ); 145 149 DELETE2_SIGNAL( in_DEPTH_MAX ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_depth ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/Parameters.cpp
r88 r108 31 31 uint32_t nb_inst_branch_complete , 32 32 uint32_t ** nb_branch_speculated ,//[nb_front_end][nb_context] 33 uint32_t size_nb_inst_decod , 33 34 uint32_t nb_rename_unit_select , 34 35 uint32_t nb_execute_loop_select , … … 242 243 _nb_inst_branch_complete , 243 244 _nb_branch_speculated , 245 size_nb_inst_decod , 244 246 size_general_data , 245 247 size_store_queue_ptr , … … 336 338 _size_rob_ptr = size_packet_id; 337 339 _size_nb_inst_commit = log2(size_re_order_buffer)+1; 340 _size_nb_inst_decod = size_nb_inst_decod; 338 341 339 342 _have_port_front_end_id = _size_front_end_id > 0; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Core_allocation.cpp
r105 r108 286 286 // out_DECOD_NO_EXECUTE - ooo_engine. in_RENAME_NO_EXECUTE 287 287 // out_DECOD_IS_DELAY_SLOT - ooo_engine. in_RENAME_IS_DELAY_SLOT 288 // out_DECOD_ADDRESS - ooo_engine. in_RENAME_ADDRESS 288 289 // out_DECOD_ADDRESS_NEXT - ooo_engine. in_RENAME_ADDRESS_NEXT 289 290 // out_DECOD_HAS_IMMEDIAT - ooo_engine. in_RENAME_HAS_IMMEDIAT … … 457 458 COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_IS_DELAY_SLOT", 458 459 dest,"out_DECOD_" +toString(k)+"_IS_DELAY_SLOT"); 460 #ifdef DEBUG 461 COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_ADDRESS" , 462 dest,"out_DECOD_" +toString(k)+"_ADDRESS" ); 463 #endif 459 464 COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_ADDRESS_NEXT" , 460 465 dest,"out_DECOD_" +toString(k)+"_ADDRESS_NEXT" ); … … 635 640 COMPONENT_MAP(_component,src ,"out_NB_INST_"+toString(j)+"_"+toString(k)+"_COMMIT_MEM", 636 641 dest, "in_NB_INST_" +toString(k)+"_COMMIT_MEM"); 642 COMPONENT_MAP(_component,src , "in_NB_INST_"+toString(j)+"_"+toString(k)+"_DECOD_ALL" , 643 dest,"out_NB_INST_" +toString(k)+"_DECOD_ALL" ); 637 644 } 638 645 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Parameters.cpp
r101 r108 848 848 for (uint32_t j=0; j<_nb_inst_issue[i]; ++j) 849 849 for (uint32_t k=0; k<_nb_read_bloc; ++k) 850 // have route between this slot's ooo_engine and an read_bloc 851 if (_table_dispatch [i][j][k]) 852 { 853 uint32_t num_execute_loop = _link_read_unit_with_read_bloc [k].first; 854 855 list_execute_loop[i].push_back(num_execute_loop); 856 } 857 858 sort (list_execute_loop[i].begin(), 859 list_execute_loop[i].end()); 860 unique(list_execute_loop[i].begin(), 861 list_execute_loop[i].end()); 850 { 851 // have route between this slot's ooo_engine and an read_bloc 852 if (_table_dispatch [i][j][k]) 853 { 854 uint32_t num_execute_loop = _link_read_unit_with_read_bloc [k].first; 855 856 list_execute_loop[i].push_back(num_execute_loop); 857 } 858 } 859 860 { 861 sort (list_execute_loop[i].begin(), 862 list_execute_loop[i].end()); 863 std::vector<uint32_t>::iterator it=std::unique(list_execute_loop[i].begin(), 864 list_execute_loop[i].end()); 865 list_execute_loop[i].erase(it,list_execute_loop[i].end()); 866 } 862 867 863 868 _ooo_engine_nb_execute_loop [i] = list_execute_loop[i].size(); … … 895 900 896 901 ALLOC2(_ooo_engine_nb_inst_execute ,uint32_t ,_nb_ooo_engine,_ooo_engine_nb_execute_loop[it1]); 897 902 898 903 for (uint32_t i=0; i<_nb_ooo_engine; ++i) 899 904 for (uint32_t j=0; j<_ooo_engine_nb_execute_loop[i]; ++j) 900 905 { 901 906 uint32_t num_execute_loop = _translate_ooo_engine_num_execute_loop [i][j]; 902 907 903 908 // each write_unit manage one instruction per cycle. 904 909 _ooo_engine_nb_inst_execute [i][j] = _nb_write_unit [num_execute_loop]; … … 1052 1057 } 1053 1058 // sort and erase duplicate value 1054 1055 sort (list_thread_with_inst_issue [j].begin(), 1056 list_thread_with_inst_issue [j].end()); 1057 unique(list_thread_with_inst_issue [j].begin(), 1058 list_thread_with_inst_issue [j].end()); 1059 { 1060 sort (list_thread_with_inst_issue [j].begin(), 1061 list_thread_with_inst_issue [j].end()); 1062 std::vector<uint32_t>::iterator it=unique(list_thread_with_inst_issue [j].begin(), 1063 list_thread_with_inst_issue [j].end()); 1064 list_thread_with_inst_issue [j].erase(it,list_thread_with_inst_issue [j].end()); 1065 } 1059 1066 } 1060 1067 … … 1063 1070 { 1064 1071 // sort and erase duplicate value 1065 sort (_list_load_store_unit_with_rename_unit [i][j].begin(), 1066 _list_load_store_unit_with_rename_unit [i][j].end()); 1067 unique(_list_load_store_unit_with_rename_unit [i][j].begin(), 1068 _list_load_store_unit_with_rename_unit [i][j].end()); 1069 sort (_list_functionnal_unit_with_rename_unit [i][j].begin(), 1070 _list_functionnal_unit_with_rename_unit [i][j].end()); 1071 unique(_list_functionnal_unit_with_rename_unit [i][j].begin(), 1072 _list_functionnal_unit_with_rename_unit [i][j].end()); 1072 { 1073 sort (_list_load_store_unit_with_rename_unit [i][j].begin(), 1074 _list_load_store_unit_with_rename_unit [i][j].end()); 1075 std::vector<uint32_t>::iterator it=unique(_list_load_store_unit_with_rename_unit [i][j].begin(), 1076 _list_load_store_unit_with_rename_unit [i][j].end()); 1077 _list_load_store_unit_with_rename_unit [i][j].erase(it,_list_load_store_unit_with_rename_unit [i][j].end()); 1078 } 1079 { 1080 sort (_list_functionnal_unit_with_rename_unit [i][j].begin(), 1081 _list_functionnal_unit_with_rename_unit [i][j].end()); 1082 std::vector<uint32_t>::iterator it=unique(_list_functionnal_unit_with_rename_unit [i][j].begin(), 1083 _list_functionnal_unit_with_rename_unit [i][j].end()); 1084 _list_functionnal_unit_with_rename_unit [i][j].erase(it,_list_functionnal_unit_with_rename_unit [i][j].end()); 1085 } 1073 1086 1074 1087 uint32_t num_rename_bloc = _link_rename_bloc_with_rename_unit[i][j]; … … 1227 1240 for (uint32_t i=0; i<_nb_execute_loop; ++i) 1228 1241 { 1229 sort (_list_ooo_engine_with_execute_loop[i].begin(), 1230 _list_ooo_engine_with_execute_loop[i].end()); 1231 unique(_list_ooo_engine_with_execute_loop[i].begin(), 1232 _list_ooo_engine_with_execute_loop[i].end()); 1233 1234 sort (_list_front_end_with_execute_loop [i].begin(), 1235 _list_front_end_with_execute_loop [i].end()); 1236 unique(_list_front_end_with_execute_loop [i].begin(), 1237 _list_front_end_with_execute_loop [i].end()); 1242 { 1243 sort (_list_ooo_engine_with_execute_loop[i].begin(), 1244 _list_ooo_engine_with_execute_loop[i].end()); 1245 std::vector<uint32_t>::iterator it=unique(_list_ooo_engine_with_execute_loop[i].begin(), 1246 _list_ooo_engine_with_execute_loop[i].end()); 1247 _list_ooo_engine_with_execute_loop[i].erase(it,_list_ooo_engine_with_execute_loop[i].end()); 1248 } 1249 { 1250 sort (_list_front_end_with_execute_loop[i].begin(), 1251 _list_front_end_with_execute_loop[i].end()); 1252 std::vector<uint32_t>::iterator it=unique(_list_front_end_with_execute_loop[i].begin(), 1253 _list_front_end_with_execute_loop[i].end()); 1254 _list_front_end_with_execute_loop[i].erase(it,_list_front_end_with_execute_loop[i].end()); 1255 } 1238 1256 } 1239 1257 … … 1313 1331 ALLOC2(_execute_loop_nb_inst_retire ,uint32_t,_nb_execute_loop,_nb_read_unit[it1]); 1314 1332 1333 log_printf(TRACE,Core,FUNCTION,_(" * execute_loop - Read_unit")); 1315 1334 for (uint32_t i=0; i<_nb_execute_loop; ++i) 1316 for (uint32_t j=0; j<_nb_read_unit[i]; ++j) 1317 { 1318 uint32_t num_read_bloc = _link_read_bloc_with_read_unit [i][j]; 1319 1320 _execute_loop_size_read_queue [i][j] = _size_read_queue [num_read_bloc]; 1321 _execute_loop_size_reservation_station [i][j] = _size_reservation_station [num_read_bloc]; 1322 _execute_loop_nb_inst_retire [i][j] = _nb_inst_retire [num_read_bloc]; 1323 } 1324 1335 { 1336 log_printf(TRACE,Core,FUNCTION,_(" * [%d] nb_read_unit : %d"),i,_nb_read_unit[i]); 1337 1338 for (uint32_t j=0; j<_nb_read_unit[i]; ++j) 1339 { 1340 uint32_t num_read_bloc = _link_read_bloc_with_read_unit [i][j]; 1341 1342 log_printf(TRACE,Core,FUNCTION,_(" * num_read_bloc : %d"),num_read_bloc); 1343 1344 _execute_loop_size_read_queue [i][j] = _size_read_queue [num_read_bloc]; 1345 _execute_loop_size_reservation_station [i][j] = _size_reservation_station [num_read_bloc]; 1346 _execute_loop_nb_inst_retire [i][j] = _nb_inst_retire_reservation_station [num_read_bloc]; 1347 } 1348 } 1349 1325 1350 ALLOC2(_execute_loop_nb_inst_functionnal_unit ,uint32_t,_nb_execute_loop,_execute_loop_nb_functionnal_unit[it1]); 1326 1351 ALLOC4(_execute_loop_timing ,multi_execute_loop::execute_loop::execute_timing_t … … 1802 1827 _nb_inst_branch_complete [i], 1803 1828 _ooo_engine_nb_branch_speculated [i], 1829 _size_nb_inst_decod , 1804 1830 _nb_rename_unit_select [i], 1805 1831 _nb_execute_loop_select [i], -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h
r107 r108 10 10 #define MORPHEO_MAJOR_VERSION 0 11 11 #define MORPHEO_MINOR_VERSION 2 12 #define MORPHEO_REVISION "10 7"12 #define MORPHEO_REVISION "108" 13 13 #define MORPHEO_CODENAME "Castor" 14 14 15 #define MORPHEO_DATE_DAY "1 1"15 #define MORPHEO_DATE_DAY "12" 16 16 #define MORPHEO_DATE_MONTH "02" 17 17 #define MORPHEO_DATE_YEAR "2009" -
trunk/IPs/systemC/processor/Morpheo/Files/Instance_debug.cfg
r107 r108 5 5 <thread id="0"> 6 6 <parameter name="size_ifetch_queue" value="4" /> 7 <parameter name="nb_inst_fetch" value=" 2" />8 <parameter name="ras_size_queue" value=" 4" />7 <parameter name="nb_inst_fetch" value="4" /> 8 <parameter name="ras_size_queue" value="8" /> 9 9 <parameter name="upt_size_queue" value="4" /> 10 10 <parameter name="ufpt_size_queue" value="4" /> … … 16 16 17 17 <decod_bloc id="0"> 18 <parameter name="size_decod_queue" value=" 4" />19 <parameter name="nb_inst_decod" value=" 1" />18 <parameter name="size_decod_queue" value="8" /> 19 <parameter name="nb_inst_decod" value="4" /> 20 20 <parameter name="nb_context_select" value="1" /> 21 21 <parameter name="context_select_priority" value="1" /> … … 24 24 25 25 <rename_bloc id="0"> 26 <parameter name="nb_inst_insert" value=" 1" />26 <parameter name="nb_inst_insert" value="2" /> 27 27 <parameter name="nb_inst_retire" value="1" /> 28 28 <parameter name="rename_select_priority" value="1" /> … … 30 30 <parameter name="rename_select_nb_front_end_select" value="1" /> 31 31 <parameter name="nb_general_register" value="64"/> 32 <parameter name="nb_special_register" value=" 4" />33 <parameter name="nb_reg_free" value=" 1" />34 <parameter name="nb_rename_unit_bank" value=" 1" />32 <parameter name="nb_special_register" value="16" /> 33 <parameter name="nb_reg_free" value="4" /> 34 <parameter name="nb_rename_unit_bank" value="4" /> 35 35 <parameter name="size_read_counter" value="4" /> 36 36 </rename_bloc> … … 41 41 <parameter name="nb_inst_retire_reservation_station" value="1" /> 42 42 </read_bloc> 43 44 <read_bloc id="1"> 45 <parameter name="size_read_queue" value="4" /> 46 <parameter name="size_reservation_station" value="4" /> 47 <parameter name="nb_inst_retire_reservation_station" value="1" /> 48 </read_bloc> 43 49 44 50 <write_bloc id="0"> … … 54 60 </write_bloc> 55 61 62 <write_bloc id="2"> 63 <parameter name="size_write_queue" value="4" /> 64 <parameter name="size_execute_queue" value="4" /> 65 <parameter name="nb_bypass_write" value="0" /> 66 </write_bloc> 67 68 <write_bloc id="3"> 69 <parameter name="size_write_queue" value="4" /> 70 <parameter name="size_execute_queue" value="4" /> 71 <parameter name="nb_bypass_write" value="0" /> 72 </write_bloc> 73 56 74 <load_store_unit id="0"> 57 <parameter name="size_store_queue" value=" 4" />58 <parameter name="size_load_queue" value=" 4" />59 <parameter name="size_speculative_access_queue" value=" 2" />60 <parameter name="nb_port_check" value=" 1" />75 <parameter name="size_store_queue" value="8" /> 76 <parameter name="size_load_queue" value="8" /> 77 <parameter name="size_speculative_access_queue" value="4" /> 78 <parameter name="nb_port_check" value="4" /> 61 79 <parameter name="speculative_load" value="2" /> 62 80 <parameter name="nb_bypass_memory" value="0" /> … … 76 94 <parameter name="nb_inst_branch_decod" value="1" /> 77 95 <parameter name="nb_inst_branch_update" value="1" /> 78 <parameter name="btb_size_queue" value=" 4" />79 <parameter name="btb_associativity" value=" 1" />96 <parameter name="btb_size_queue" value="64" /> 97 <parameter name="btb_associativity" value="4" /> 80 98 <parameter name="btb_size_counter" value="2" /> 81 99 <parameter name="btb_victim_scheme" value="3" /> 82 <parameter name="dir_predictor_scheme" value=" 3" />100 <parameter name="dir_predictor_scheme" value="2" /> 83 101 84 102 <predictor id="0"> … … 115 133 <ooo_engine id="0"> 116 134 <parameter name="nb_rename_unit" value="1" /> 117 <parameter name="nb_inst_issue" value=" 1" />135 <parameter name="nb_inst_issue" value="2" /> 118 136 <parameter name="nb_inst_reexecute" value="1" /> 119 137 <parameter name="nb_inst_commit" value="1" /> … … 121 139 <parameter name="nb_rename_unit_select" value="1" /> 122 140 <parameter name="nb_execute_loop_select" value="1" /> 123 <parameter name="size_re_order_buffer" value=" 16" />124 <parameter name="nb_re_order_buffer_bank" value=" 1" />141 <parameter name="size_re_order_buffer" value="32" /> 142 <parameter name="nb_re_order_buffer_bank" value="4" /> 125 143 <parameter name="commit_priority" value="1" /> 126 144 <parameter name="commit_load_balancing" value="1" /> 127 <parameter name="size_issue_queue" value=" 4" />128 <parameter name="nb_issue_queue_bank" value=" 1" />145 <parameter name="size_issue_queue" value="8" /> 146 <parameter name="nb_issue_queue_bank" value="4" /> 129 147 <parameter name="issue_priority" value="1" /> 130 148 <parameter name="issue_load_balancing" value="1" /> … … 135 153 136 154 <execute_loop id="0"> 137 <parameter name="nb_read_unit" value=" 1" />138 <parameter name="nb_write_unit" value=" 2" />155 <parameter name="nb_read_unit" value="2" /> 156 <parameter name="nb_write_unit" value="4" /> 139 157 <parameter name="nb_gpr_bank" value="1" /> 140 <parameter name="nb_gpr_port_read_by_bank" value=" 2" />141 <parameter name="nb_gpr_port_write_by_bank" value=" 1" />158 <parameter name="nb_gpr_port_read_by_bank" value="4" /> 159 <parameter name="nb_gpr_port_write_by_bank" value="2" /> 142 160 <parameter name="nb_spr_bank" value="1" /> 143 <parameter name="nb_spr_port_read_by_bank" value=" 1" />144 <parameter name="nb_spr_port_write_by_bank" value=" 1" />161 <parameter name="nb_spr_port_read_by_bank" value="2" /> 162 <parameter name="nb_spr_port_write_by_bank" value="2" /> 145 163 <parameter name="execution_unit_to_write_unit_priority" value="1" /> 146 164 <parameter name="read_unit_to_execution_unit_priority" value="1" /> … … 171 189 <link name="link_rename_unit_with_rename_bloc" src="0" dest="0.0" /> 172 190 <link name="link_read_unit_with_read_bloc" src="0" dest="0.0" /> 191 <link name="link_read_unit_with_read_bloc" src="1" dest="0.1" /> 173 192 <link name="link_write_unit_with_write_bloc" src="0" dest="0.0" /> 174 193 <link name="link_write_unit_with_write_bloc" src="1" dest="0.1" /> 194 <link name="link_write_unit_with_write_bloc" src="2" dest="0.2" /> 195 <link name="link_write_unit_with_write_bloc" src="3" dest="0.3" /> 175 196 <link name="link_decod_bloc_with_thread" src="0" dest="0" /> 176 197 <link name="link_rename_bloc_with_front_end" src="0" dest="0" /> … … 181 202 182 203 <link name="table_dispatch" src="0.0.0" dest="1" /> 204 <link name="table_dispatch" src="0.1.0" dest="1" /> 205 <link name="table_dispatch" src="0.0.1" dest="1" /> 206 <link name="table_dispatch" src="0.1.1" dest="1" /> 183 207 <link name="link_read_bloc_and_load_store_unit" src="0.0" dest="1" /> 208 <link name="link_read_bloc_and_load_store_unit" src="1.0" dest="1" /> 184 209 <link name="link_read_bloc_and_functionnal_unit" src="0.0" dest="1" /> 210 <link name="link_read_bloc_and_functionnal_unit" src="1.0" dest="1" /> 185 211 <link name="link_write_bloc_and_load_store_unit" src="0.0" dest="1" /> 186 212 <link name="link_write_bloc_and_load_store_unit" src="1.0" dest="1" /> 213 <link name="link_write_bloc_and_load_store_unit" src="2.0" dest="1" /> 214 <link name="link_write_bloc_and_load_store_unit" src="3.0" dest="1" /> 187 215 <link name="link_write_bloc_and_functionnal_unit" src="0.0" dest="1" /> 188 216 <link name="link_write_bloc_and_functionnal_unit" src="1.0" dest="1" /> 217 <link name="link_write_bloc_and_functionnal_unit" src="2.0" dest="1" /> 218 <link name="link_write_bloc_and_functionnal_unit" src="3.0" dest="1" /> 189 219 <link name="link_thread_and_functionnal_unit" src="0.0" dest="1" /> 190 220 -
trunk/IPs/systemC/processor/Morpheo/Files/Morpheo.sim
r107 r108 3 3 <parameters > 4 4 5 <parameter name="use_systemc" value="1" /> 6 <parameter name="use_vhdl" value="0" /> 7 <parameter name="use_vhdl_testbench" value="0" /> 8 <parameter name="use_vhdl_testbench_assert" value="0" /> 9 <parameter name="use_position" value="0" /> 10 <parameter name="use_statistics" value="1" /> 11 <parameter name="use_information" value="0" /> 12 <parameter name="use_header" value="0" /> 13 14 <parameter name="statistics_cycle_start" value="0" /> 15 <parameter name="statistics_period" value="0" /> 16 17 <parameter name="simulation_nb_cycle" value="50000" /> 18 <parameter name="simulation_nb_instruction" value="0" /> 5 <parameter name="use_systemc" value="1" /> 6 <parameter name="use_vhdl" value="0" /> 7 <parameter name="use_vhdl_testbench" value="0" /> 8 <parameter name="use_vhdl_testbench_assert" value="0" /> 9 <parameter name="use_position" value="0" /> 10 <parameter name="use_statistics" value="1" /> 11 <parameter name="use_information" value="0" /> 12 <parameter name="use_header" value="0" /> 13 14 <parameter name="statistics_cycle_start" value="0" /> 15 <parameter name="statistics_period" value="0" /> 16 17 <parameter name="simulation_nb_cycle" value="60000" /> 18 <parameter name="simulation_nb_instruction" value="0" /> 19 20 <parameter name="directory_statistics" value="." /> 21 <parameter name="directory_vhdl" value="." /> 22 <parameter name="directory_position" value="." /> 23 <parameter name="directory_log" value="." /> 24 25 <parameter name="debug_level" value="0"/> 26 <parameter name="debug_cycle_start" value="0" /> 27 <parameter name="debug_cycle_stop" value="400" /> 28 <parameter name="debug_have_log_file" value="0" /> 19 29 20 <parameter name="directory_statistics" value="." /> 21 <parameter name="directory_vhdl" value="." /> 22 <parameter name="directory_position" value="." /> 23 <parameter name="directory_log" value="." /> 24 25 <parameter name="debug_level" value="0" /> 26 <parameter name="debug_cycle_start" value="310" /> 27 <parameter name="debug_cycle_stop" value="350" /> 28 <parameter name="debug_have_log_file" value="0" /> 30 <simulation component="Counter" value="systemc" /> 31 <simulation component="Priority" value="systemc" /> 32 <simulation component="Queue_Control" value="systemc" /> 33 <simulation component="Queue" value="systemc" /> 34 <simulation component="RegisterFile_Monolithic" value="systemc" /> 35 <simulation component="RegisterFile_Multi_Banked" value="systemc" /> 36 <simulation component="RegisterFile" value="systemc" /> 37 <simulation component="Select_Priority_Fixed" value="systemc" /> 38 <simulation component="Select" value="systemc" /> 39 <simulation component="Shifter" value="systemc" /> 40 <simulation component="Sort" value="systemc" /> 41 <simulation component="Victim_Pseudo_LRU" value="systemc" /> 42 <simulation component="Victim" value="systemc" /> 43 <simulation component="Execute_loop_Glue" value="systemc" /> 44 <simulation component="Functionnal_unit" value="systemc" /> 45 <simulation component="Load_store_unit" value="systemc" /> 46 <simulation component="Read_queue" value="systemc" /> 47 <simulation component="Reservation_station" value="systemc" /> 48 <simulation component="Read_unit" value="systemc" /> 49 <simulation component="Execute_queue" value="systemc" /> 50 <simulation component="Write_queue" value="systemc" /> 51 <simulation component="Write_unit" value="systemc" /> 52 <simulation component="Execution_unit_to_Write_unit" value="systemc" /> 53 <simulation component="Read_unit_to_Execution_unit" value="systemc" /> 54 <simulation component="Register_unit_Glue" value="systemc" /> 55 <simulation component="Register_unit" value="systemc" /> 56 <simulation component="Execute_loop" value="systemc" /> 57 <simulation component="Commit_unit" value="systemc" /> 58 <simulation component="Issue_queue" value="systemc" /> 59 <simulation component="OOO_Engine_Glue" value="systemc" /> 60 <simulation component="Reexecute_unit" value="systemc" /> 61 <simulation component="Load_Store_pointer_unit" value="systemc" /> 62 <simulation component="Dependency_checking_unit" value="systemc" /> 63 <simulation component="Free_List_unit" value="systemc" /> 64 <simulation component="Register_Address_Translation_unit" value="systemc" /> 65 <simulation component="Register_translation_unit_Glue" value="systemc" /> 66 <simulation component="Stat_List_unit" value="systemc" /> 67 <simulation component="Register_translation_unit" value="systemc" /> 68 <simulation component="Rename_unit_Glue" value="systemc" /> 69 <simulation component="Rename_select" value="systemc" /> 70 <simulation component="Rename_unit" value="systemc" /> 71 <simulation component="Special_Register_unit" value="systemc" /> 72 <simulation component="OOO_Engine" value="systemc" /> 73 <simulation component="Context_State" value="systemc" /> 74 <simulation component="Decod" value="systemc" /> 75 <simulation component="Decod_queue" value="systemc" /> 76 <simulation component="Decod_unit" value="systemc" /> 77 <simulation component="Front_end_Glue" value="systemc" /> 78 <simulation component="Address_management" value="systemc" /> 79 <simulation component="Ifetch_queue" value="systemc" /> 80 <simulation component="Ifetch_unit_Glue" value="systemc" /> 81 <simulation component="Ifetch_unit" value="systemc" /> 82 <simulation component="Branch_Target_Buffer_Glue" value="systemc" /> 83 <simulation component="Branch_Target_Buffer_Register" value="systemc" /> 84 <simulation component="Branch_Target_Buffer" value="systemc" /> 85 <simulation component="Direction_Glue" value="systemc" /> 86 <simulation component="Direction" value="systemc" /> 87 <simulation component="Prediction_unit_Glue" value="systemc" /> 88 <simulation component="Return_Address_Stack" value="systemc" /> 89 <simulation component="Update_Prediction_Table" value="systemc" /> 90 <simulation component="Prediction_unit" value="systemc" /> 91 <simulation component="Front_end" value="systemc" /> 92 <simulation component="Icache_Access" value="systemc" /> 93 <simulation component="Dcache_Access" value="systemc" /> 94 <simulation component="Core_Glue" value="systemc" /> 95 <simulation component="Core" value="systemc" /> 96 <simulation component="TopLevel" value="systemc" /> 29 97 30 98 </parameters>
Note: See TracChangeset
for help on using the changeset viewer.