Changeset 98 for trunk/IPs/systemC/processor/Morpheo
- Timestamp:
- Dec 31, 2008, 11:18:08 AM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo
- Files:
-
- 99 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/src/Configuration_header.cpp
r97 r98 39 39 \ \_\ 40 40 \/_/ 41 42 */ 41 */ 43 42 44 43 str += toString(MSG_INFORMATION)+" __ \n"; … … 57 56 str += toString(MSG_INFORMATION)+_(" * E-mail support : mathieu.rosiere@lip6.fr\n" ); 58 57 str += toString(MSG_INFORMATION)+_(" * Original author(s) : Mathieu Rosière\n" ); 59 str += toString(MSG_INFORMATION)+_(" * Contributor(s) : Stéphane Dubuisson - XMLLight\n"); 58 str += toString(MSG_INFORMATION)+_(" * Contributor(s) : Clément Berleux - VHDL\n" ); 59 str += toString(MSG_INFORMATION)+_(" Kamel Chekkal - VHDL\n" ); 60 str += toString(MSG_INFORMATION)+_(" Stéphane Dubuisson - XMLLight\n"); 60 61 str += toString(MSG_INFORMATION)+_(" Vincent Moulu - VHDL\n" ); 61 62 str += toString(MSG_INFORMATION)+"\n"; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/SelfTest/src/test.cpp
r97 r98 55 55 ALLOC2_SC_SIGNAL(out_BRANCH_COMPLETE_FRONT_END_DEPTH ,"out_BRANCH_COMPLETE_FRONT_END_DEPTH ",Tdepth_t ,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1]); 56 56 ALLOC2_SC_SIGNAL(out_BRANCH_COMPLETE_FRONT_END_ADDRESS ,"out_BRANCH_COMPLETE_FRONT_END_ADDRESS ",Taddress_t ,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1]); 57 ALLOC2_SC_SIGNAL(out_BRANCH_COMPLETE_FRONT_END_ FLAG ,"out_BRANCH_COMPLETE_FRONT_END_FLAG",Tcontrol_t ,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1]);57 ALLOC2_SC_SIGNAL(out_BRANCH_COMPLETE_FRONT_END_NO_SEQUENCE ,"out_BRANCH_COMPLETE_FRONT_END_NO_SEQUENCE ",Tcontrol_t ,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1]); 58 58 ALLOC2_SC_SIGNAL( in_BRANCH_COMPLETE_FRONT_END_MISS_PREDICTION ," in_BRANCH_COMPLETE_FRONT_END_MISS_PREDICTION ",Tcontrol_t ,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1]); 59 59 ALLOC2_SC_SIGNAL( in_BRANCH_COMPLETE_OOO_ENGINE_VAL ," in_BRANCH_COMPLETE_OOO_ENGINE_VAL ",Tcontrol_t ,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1]); … … 63 63 ALLOC2_SC_SIGNAL( in_BRANCH_COMPLETE_OOO_ENGINE_DEPTH ," in_BRANCH_COMPLETE_OOO_ENGINE_DEPTH ",Tdepth_t ,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1]); 64 64 ALLOC2_SC_SIGNAL( in_BRANCH_COMPLETE_OOO_ENGINE_ADDRESS ," in_BRANCH_COMPLETE_OOO_ENGINE_ADDRESS ",Taddress_t ,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1]); 65 ALLOC2_SC_SIGNAL( in_BRANCH_COMPLETE_OOO_ENGINE_ FLAG ," in_BRANCH_COMPLETE_OOO_ENGINE_FLAG",Tcontrol_t ,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1]);65 ALLOC2_SC_SIGNAL( in_BRANCH_COMPLETE_OOO_ENGINE_NO_SEQUENCE ," in_BRANCH_COMPLETE_OOO_ENGINE_NO_SEQUENCE ",Tcontrol_t ,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1]); 66 66 ALLOC2_SC_SIGNAL(out_BRANCH_COMPLETE_OOO_ENGINE_MISS_PREDICTION,"out_BRANCH_COMPLETE_OOO_ENGINE_MISS_PREDICTION",Tcontrol_t ,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1]); 67 67 ALLOC1_SC_SIGNAL(out_COMMIT_EVENT_FRONT_END_VAL ,"out_COMMIT_EVENT_FRONT_END_VAL ",Tcontrol_t ,_param->_nb_front_end); … … 186 186 INSTANCE2_SC_SIGNAL(_Core_Glue,out_BRANCH_COMPLETE_FRONT_END_DEPTH ,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1]); 187 187 INSTANCE2_SC_SIGNAL(_Core_Glue,out_BRANCH_COMPLETE_FRONT_END_ADDRESS ,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1]); 188 INSTANCE2_SC_SIGNAL(_Core_Glue,out_BRANCH_COMPLETE_FRONT_END_ FLAG,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1]);188 INSTANCE2_SC_SIGNAL(_Core_Glue,out_BRANCH_COMPLETE_FRONT_END_NO_SEQUENCE ,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1]); 189 189 INSTANCE2_SC_SIGNAL(_Core_Glue, in_BRANCH_COMPLETE_FRONT_END_MISS_PREDICTION ,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1]); 190 190 INSTANCE2_SC_SIGNAL(_Core_Glue, in_BRANCH_COMPLETE_OOO_ENGINE_VAL ,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1]); … … 197 197 INSTANCE2_SC_SIGNAL(_Core_Glue, in_BRANCH_COMPLETE_OOO_ENGINE_DEPTH ,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1]); 198 198 INSTANCE2_SC_SIGNAL(_Core_Glue, in_BRANCH_COMPLETE_OOO_ENGINE_ADDRESS ,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1]); 199 INSTANCE2_SC_SIGNAL(_Core_Glue, in_BRANCH_COMPLETE_OOO_ENGINE_ FLAG,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1]);199 INSTANCE2_SC_SIGNAL(_Core_Glue, in_BRANCH_COMPLETE_OOO_ENGINE_NO_SEQUENCE ,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1]); 200 200 INSTANCE2_SC_SIGNAL(_Core_Glue,out_BRANCH_COMPLETE_OOO_ENGINE_MISS_PREDICTION,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1]); 201 201 INSTANCE1_SC_SIGNAL(_Core_Glue,out_COMMIT_EVENT_FRONT_END_VAL ,_param->_nb_front_end); … … 393 393 in_BRANCH_COMPLETE_OOO_ENGINE_DEPTH [i][j]->write(range<Tdepth_t >(rand(),_param->_size_depth )); 394 394 in_BRANCH_COMPLETE_OOO_ENGINE_ADDRESS [i][j]->write(range<Taddress_t>(rand(),_param->_size_instruction_address)); 395 in_BRANCH_COMPLETE_OOO_ENGINE_ FLAG[i][j]->write(rand()%2);395 in_BRANCH_COMPLETE_OOO_ENGINE_NO_SEQUENCE [i][j]->write(rand()%2); 396 396 } 397 397 … … 520 520 TEST(Taddress_t,out_BRANCH_COMPLETE_FRONT_END_ADDRESS [x][j]->read(), 521 521 in_BRANCH_COMPLETE_OOO_ENGINE_ADDRESS [i][j]->read()); 522 TEST(Tcontrol_t,out_BRANCH_COMPLETE_FRONT_END_ FLAG[x][j]->read(),523 in_BRANCH_COMPLETE_OOO_ENGINE_ FLAG[i][j]->read());522 TEST(Tcontrol_t,out_BRANCH_COMPLETE_FRONT_END_NO_SEQUENCE [x][j]->read(), 523 in_BRANCH_COMPLETE_OOO_ENGINE_NO_SEQUENCE [i][j]->read()); 524 524 TEST(Tcontrol_t,out_BRANCH_COMPLETE_OOO_ENGINE_ACK [i][j]->read(), 525 525 in_BRANCH_COMPLETE_FRONT_END_ACK [x][j]->read()); … … 674 674 DELETE2_SC_SIGNAL(out_BRANCH_COMPLETE_FRONT_END_DEPTH ,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1]); 675 675 DELETE2_SC_SIGNAL(out_BRANCH_COMPLETE_FRONT_END_ADDRESS ,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1]); 676 DELETE2_SC_SIGNAL(out_BRANCH_COMPLETE_FRONT_END_ FLAG,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1]);676 DELETE2_SC_SIGNAL(out_BRANCH_COMPLETE_FRONT_END_NO_SEQUENCE ,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1]); 677 677 DELETE2_SC_SIGNAL( in_BRANCH_COMPLETE_FRONT_END_MISS_PREDICTION ,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1]); 678 678 DELETE2_SC_SIGNAL( in_BRANCH_COMPLETE_OOO_ENGINE_VAL ,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1]); … … 682 682 DELETE2_SC_SIGNAL( in_BRANCH_COMPLETE_OOO_ENGINE_DEPTH ,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1]); 683 683 DELETE2_SC_SIGNAL( in_BRANCH_COMPLETE_OOO_ENGINE_ADDRESS ,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1]); 684 DELETE2_SC_SIGNAL( in_BRANCH_COMPLETE_OOO_ENGINE_ FLAG,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1]);684 DELETE2_SC_SIGNAL( in_BRANCH_COMPLETE_OOO_ENGINE_NO_SEQUENCE ,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1]); 685 685 DELETE2_SC_SIGNAL(out_BRANCH_COMPLETE_OOO_ENGINE_MISS_PREDICTION,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1]); 686 686 DELETE1_SC_SIGNAL(out_COMMIT_EVENT_FRONT_END_VAL ,_param->_nb_front_end); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/include/Core_Glue.h
r97 r98 73 73 public : SC_OUT(Tdepth_t ) *** out_BRANCH_COMPLETE_FRONT_END_DEPTH ;//[nb_front_end][nb_inst_branch_complete] 74 74 public : SC_OUT(Taddress_t ) *** out_BRANCH_COMPLETE_FRONT_END_ADDRESS ;//[nb_front_end][nb_inst_branch_complete] 75 public : SC_OUT(Tcontrol_t ) *** out_BRANCH_COMPLETE_FRONT_END_ FLAG;//[nb_front_end][nb_inst_branch_complete]75 public : SC_OUT(Tcontrol_t ) *** out_BRANCH_COMPLETE_FRONT_END_NO_SEQUENCE ;//[nb_front_end][nb_inst_branch_complete] 76 76 public : SC_IN (Tcontrol_t ) *** in_BRANCH_COMPLETE_FRONT_END_MISS_PREDICTION ;//[nb_front_end][nb_inst_branch_complete] 77 77 … … 82 82 public : SC_IN (Tdepth_t ) *** in_BRANCH_COMPLETE_OOO_ENGINE_DEPTH ;//[nb_ooo_engine][nb_inst_branch_complete] 83 83 public : SC_IN (Taddress_t ) *** in_BRANCH_COMPLETE_OOO_ENGINE_ADDRESS ;//[nb_ooo_engine][nb_inst_branch_complete] 84 public : SC_IN (Tcontrol_t ) *** in_BRANCH_COMPLETE_OOO_ENGINE_ FLAG;//[nb_ooo_engine][nb_inst_branch_complete]84 public : SC_IN (Tcontrol_t ) *** in_BRANCH_COMPLETE_OOO_ENGINE_NO_SEQUENCE ;//[nb_ooo_engine][nb_inst_branch_complete] 85 85 public : SC_OUT(Tcontrol_t ) *** out_BRANCH_COMPLETE_OOO_ENGINE_MISS_PREDICTION;//[nb_ooo_engine][nb_inst_branch_complete] 86 86 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Core_Glue.cpp
r88 r98 112 112 sensitive << (*(in_BRANCH_COMPLETE_OOO_ENGINE_VAL [i][j])) 113 113 << (*(in_BRANCH_COMPLETE_OOO_ENGINE_ADDRESS [i][j])) 114 << (*(in_BRANCH_COMPLETE_OOO_ENGINE_ FLAG[i][j]));114 << (*(in_BRANCH_COMPLETE_OOO_ENGINE_NO_SEQUENCE [i][j])); 115 115 if (_param->_have_port_front_end_id) 116 116 sensitive << (*(in_BRANCH_COMPLETE_OOO_ENGINE_FRONT_END_ID [i][j])); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Core_Glue_allocation.cpp
r97 r98 70 70 _ALLOC2_SIGNAL_OUT(out_BRANCH_COMPLETE_FRONT_END_DEPTH ,"DEPTH" ,Tdepth_t ,_param->_size_depth ,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1]); 71 71 _ALLOC2_SIGNAL_OUT(out_BRANCH_COMPLETE_FRONT_END_ADDRESS ,"ADDRESS" ,Taddress_t ,_param->_size_instruction_address,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1]); 72 _ALLOC2_SIGNAL_OUT(out_BRANCH_COMPLETE_FRONT_END_ FLAG ,"FLAG",Tcontrol_t ,1 ,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1]);72 _ALLOC2_SIGNAL_OUT(out_BRANCH_COMPLETE_FRONT_END_NO_SEQUENCE ,"NO_SEQUENCE" ,Tcontrol_t ,1 ,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1]); 73 73 _ALLOC2_SIGNAL_IN ( in_BRANCH_COMPLETE_FRONT_END_MISS_PREDICTION ,"MISS_PREDICTION" ,Tcontrol_t ,1 ,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1]); 74 74 } … … 82 82 _ALLOC2_SIGNAL_IN ( in_BRANCH_COMPLETE_OOO_ENGINE_DEPTH ,"DEPTH" ,Tdepth_t ,_param->_size_depth ,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1]); 83 83 _ALLOC2_SIGNAL_IN ( in_BRANCH_COMPLETE_OOO_ENGINE_ADDRESS ,"ADDRESS" ,Taddress_t ,_param->_size_instruction_address,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1]); 84 _ALLOC2_SIGNAL_IN ( in_BRANCH_COMPLETE_OOO_ENGINE_ FLAG ,"FLAG",Tcontrol_t ,1 ,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1]);84 _ALLOC2_SIGNAL_IN ( in_BRANCH_COMPLETE_OOO_ENGINE_NO_SEQUENCE ,"NO_SEQUENCE" ,Tcontrol_t ,1 ,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1]); 85 85 _ALLOC2_SIGNAL_OUT(out_BRANCH_COMPLETE_OOO_ENGINE_MISS_PREDICTION,"MISS_PREDICTION" ,Tcontrol_t ,1 ,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1]); 86 86 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Core_Glue_deallocation.cpp
r88 r98 33 33 DELETE2_SIGNAL(out_BRANCH_COMPLETE_FRONT_END_DEPTH ,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1],_param->_size_depth); 34 34 DELETE2_SIGNAL(out_BRANCH_COMPLETE_FRONT_END_ADDRESS ,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1],_param->_size_instruction_address); 35 DELETE2_SIGNAL(out_BRANCH_COMPLETE_FRONT_END_ FLAG,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1],1);35 DELETE2_SIGNAL(out_BRANCH_COMPLETE_FRONT_END_NO_SEQUENCE ,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1],1); 36 36 DELETE2_SIGNAL( in_BRANCH_COMPLETE_FRONT_END_MISS_PREDICTION ,_param->_nb_front_end,_param->_front_end_nb_inst_branch_complete[it1],1); 37 37 … … 42 42 DELETE2_SIGNAL( in_BRANCH_COMPLETE_OOO_ENGINE_DEPTH ,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1],_param->_size_depth); 43 43 DELETE2_SIGNAL( in_BRANCH_COMPLETE_OOO_ENGINE_ADDRESS ,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1],_param->_size_instruction_address); 44 DELETE2_SIGNAL( in_BRANCH_COMPLETE_OOO_ENGINE_ FLAG,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1],1);44 DELETE2_SIGNAL( in_BRANCH_COMPLETE_OOO_ENGINE_NO_SEQUENCE ,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1],1); 45 45 DELETE2_SIGNAL(out_BRANCH_COMPLETE_OOO_ENGINE_MISS_PREDICTION,_param->_nb_ooo_engine,_param->_ooo_engine_nb_inst_branch_complete[it1],1); 46 46 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Core_Glue_genMealy_branch_complete.cpp
r88 r98 51 51 PORT_WRITE(out_BRANCH_COMPLETE_FRONT_END_DEPTH [num_front_end][j],PORT_READ(in_BRANCH_COMPLETE_OOO_ENGINE_DEPTH [i][j])); 52 52 PORT_WRITE(out_BRANCH_COMPLETE_FRONT_END_ADDRESS [num_front_end][j],PORT_READ(in_BRANCH_COMPLETE_OOO_ENGINE_ADDRESS [i][j])); 53 PORT_WRITE(out_BRANCH_COMPLETE_FRONT_END_ FLAG [num_front_end][j],PORT_READ(in_BRANCH_COMPLETE_OOO_ENGINE_FLAG[i][j]));53 PORT_WRITE(out_BRANCH_COMPLETE_FRONT_END_NO_SEQUENCE[num_front_end][j],PORT_READ(in_BRANCH_COMPLETE_OOO_ENGINE_NO_SEQUENCE[i][j])); 54 54 PORT_WRITE(out_BRANCH_COMPLETE_OOO_ENGINE_MISS_PREDICTION [i][j], PORT_READ(in_BRANCH_COMPLETE_FRONT_END_MISS_PREDICTION [num_front_end][j])); 55 55 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/src/Operation.cpp
r88 r98 226 226 Tgeneral_data_t imm = unsigned(param->_size_data,op->_immediat); 227 227 228 log_printf(TRACE,Functionnal_unit,FUNCTION," * data_rc : %d",op->_data_rc); 229 log_printf(TRACE,Functionnal_unit,FUNCTION," * f_in : %d",f_in); 230 228 231 // Result 229 232 op->_timing = param->_timing[op->_type][op->_operation]; … … 233 236 op->_no_sequence = f_in == 0; 234 237 op->_address = imm; 238 239 log_printf(TRACE,Functionnal_unit,FUNCTION," * no_sequence : %d",op->_no_sequence); 235 240 }; 236 241 … … 664 669 665 670 spr_address_t spr_addr = reg->_spr_access_mode->translate_address(addr); 666 671 667 672 // Test if this group is implemented in this functionnal_unit 668 673 if (reg->_spr_access_mode->valid(spr_addr)) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_transition.cpp
r97 r98 87 87 _execute_operation_in->_write_rd = PORT_READ(in_EXECUTE_IN_WRITE_RD ); 88 88 _execute_operation_in->_num_reg_rd = PORT_READ(in_EXECUTE_IN_NUM_REG_RD ); 89 _execute_operation_in->_data_rd = 0; // no necessaray 89 90 _execute_operation_in->_write_re = PORT_READ(in_EXECUTE_IN_WRITE_RE ); 90 91 _execute_operation_in->_num_reg_re = PORT_READ(in_EXECUTE_IN_NUM_REG_RE ); 92 _execute_operation_in->_data_re = 0; // no necessaray 91 93 92 94 log_printf(TRACE,Functionnal_unit,FUNCTION," * context_id : %d",_execute_operation_in->_context_id ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/src/test.cpp
r88 r98 370 370 for (uint32_t j=0; j<_param->_nb_ooo_engine; j++) 371 371 { 372 for (uint32_t i=0; i<_param->_nb_general_register; i++) 372 _gpr_val [0][j] = 0; 373 _gpr [0][j] = 0; 374 _spr_val [0][j] = 0; 375 _spr [0][j] = 0; 376 377 for (uint32_t i=1; i<_param->_nb_general_register; i++) 373 378 { 374 379 _gpr_val [i][j] = ((rand()%100) < percent_registerfile_valid); 375 380 _gpr [i][j] = rand()%(1<<_param->_size_general_data); 376 381 } 377 for (uint32_t i= 0; i<_param->_nb_special_register; i++)382 for (uint32_t i=1; i<_param->_nb_special_register; i++) 378 383 { 379 384 _spr_val [i][j] = ((rand()%100) < percent_registerfile_valid); … … 381 386 } 382 387 } 388 389 383 390 // End initialisation ....... 384 391 … … 466 473 Tcontext_t ooo_engine = rand()% _param->_nb_ooo_engine; 467 474 Tgeneral_address_t num_reg = rand()% _param->_nb_general_register; 468 Tgeneral_data_t data = rand()%(1<<_param->_size_general_data);475 Tgeneral_data_t data = (num_reg!=0)?(rand()%(1<<_param->_size_general_data)):0; 469 476 470 477 GPR_WRITE_VAL [i]->write(val); … … 534 541 // TEST(Tcontrol_t ,READ_QUEUE_OUT_READ_RA ->read(),_read_ra [rob_id]); 535 542 TEST(Tgeneral_address_t,READ_QUEUE_OUT_NUM_REG_RA ->read(),_num_reg_ra [rob_id]); 536 TEST(Tcontrol_t ,READ_QUEUE_OUT_DATA_RA_VAL->read(),not _read_ra [rob_id] or _gpr_val [_num_reg_ra[rob_id]][ctxt] );543 TEST(Tcontrol_t ,READ_QUEUE_OUT_DATA_RA_VAL->read(),not _read_ra [rob_id] or _gpr_val [_num_reg_ra[rob_id]][ctxt] or (_num_reg_ra[rob_id] == 0)); 537 544 if (_read_ra [rob_id] and 538 545 READ_QUEUE_OUT_DATA_RA_VAL->read()) … … 540 547 // TEST(Tcontrol_t ,READ_QUEUE_OUT_READ_RB ->read(),_read_rb [rob_id]); 541 548 TEST(Tgeneral_address_t,READ_QUEUE_OUT_NUM_REG_RB ->read(),_num_reg_rb [rob_id]); 542 TEST(Tcontrol_t ,READ_QUEUE_OUT_DATA_RB_VAL->read(),not _read_rb [rob_id] or _gpr_val [_num_reg_rb[rob_id]][ctxt] );549 TEST(Tcontrol_t ,READ_QUEUE_OUT_DATA_RB_VAL->read(),not _read_rb [rob_id] or _gpr_val [_num_reg_rb[rob_id]][ctxt] or (_num_reg_rb[rob_id] == 0)); 543 550 if (_read_rb [rob_id] and 544 551 READ_QUEUE_OUT_DATA_RB_VAL->read()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Types.h
r82 r98 110 110 log_printf(FUNC,Read_queue,FUNCTION,"Begin"); 111 111 112 _context_id = x._context_id ;113 _front_end_id = x._front_end_id ;114 _ooo_engine_id = x._ooo_engine_id;115 _rob_id = x._rob_id ;116 _operation = x._operation ;117 _type = x._type ;112 _context_id = x._context_id ; 113 _front_end_id = x._front_end_id ; 114 _ooo_engine_id = x._ooo_engine_id; 115 _rob_id = x._rob_id ; 116 _operation = x._operation ; 117 _type = x._type ; 118 118 _store_queue_ptr_write = x._store_queue_ptr_write; 119 119 _load_queue_ptr_write = x._load_queue_ptr_write ; 120 _has_immediat = x._has_immediat ;121 _immediat = x._immediat ;122 _read_ra = x._read_ra ;123 _read_ra_val = x._read_ra == 1 ; //if not must read, the registerFile is already access124 _num_reg_ra = x._num_reg_ra ;125 _data_ra_val = x._read_ra == 0; //if not must read, the data is already valid126 _data_ra = 0 ;127 _read_rb = x._read_rb ;128 _read_rb_val = x._read_rb == 1 ;129 _num_reg_rb = x._num_reg_rb ;130 _data_rb_val = x._read_rb == 0;131 _data_rb = 0 ;132 _read_rc = x._read_rc ;133 _read_rc_val = x._read_rc == 1 ;134 _num_reg_rc = x._num_reg_rc ;135 _data_rc_val = x._read_rc == 0 ;136 _data_rc = 0 ;137 _write_rd = x._write_rd ;138 _num_reg_rd = x._num_reg_rd ;139 _write_re = x._write_re ;140 _num_reg_re = x._num_reg_re ;120 _has_immediat = x._has_immediat ; 121 _immediat = x._immediat ; 122 _read_ra = x._read_ra ; 123 _read_ra_val = x._read_ra == 1 ; //if not must read, the registerFile is already access 124 _num_reg_ra = x._num_reg_ra ; 125 _data_ra_val = ((x._read_ra == 0) or (x._num_reg_ra == 0)); //if not must read, the data is already valid 126 _data_ra = 0 ; 127 _read_rb = x._read_rb ; 128 _read_rb_val = x._read_rb == 1 ; 129 _num_reg_rb = x._num_reg_rb ; 130 _data_rb_val = ((x._read_rb == 0) or (x._num_reg_rb == 0)); 131 _data_rb = 0 ; 132 _read_rc = x._read_rc ; 133 _read_rc_val = x._read_rc == 1 ; 134 _num_reg_rc = x._num_reg_rc ; 135 _data_rc_val = x._read_rc == 0 ; 136 _data_rc = 0 ; 137 _write_rd = x._write_rd ; 138 _num_reg_rd = x._num_reg_rd ; 139 _write_re = x._write_re ; 140 _num_reg_re = x._num_reg_re ; 141 141 142 142 log_printf(FUNC,Read_queue,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_transition.cpp
r97 r98 146 146 if (_queue->size()>0) 147 147 { 148 // protected : Tread_queue_head_entry_t * _queue_head;149 // protected : std::queue<Tread_queue_entry_t *> * _queue;150 151 148 log_printf(TRACE,Read_queue,FUNCTION," * [%.4d] %.2d %.2d %.2d %.4d, %.2d %.3d, %.2d %.2d, %.1d %.8x, %.1d %.1d %.4d %.1d %.8x, %.1d %.1d %.4d %.1d %.8x, %.1d %.1d %.4d %.1d %.2x, %.1d %.4d, %.1d %.4d (%s)", 152 149 0, … … 246 243 } 247 244 #endif 248 249 250 245 } 251 246 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_vhdl.cpp
r81 r98 26 26 27 27 //----- Queue ----- 28 28 29 29 morpheo::behavioural::generic::queue::Parameters * param_queue; 30 30 morpheo::behavioural::generic::queue::Queue * queue; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_vhdl_body.cpp
r97 r98 176 176 vhdl->set_body(0,"out_READ_QUEUE_OUT_HAS_IMMEDIAT <= internal_HAS_IMMEDIAT ;"); 177 177 vhdl->set_body(0,"out_READ_QUEUE_OUT_IMMEDIAT <= internal_IMMEDIAT ;"); 178 // 178 // vhdl->set_body(0,"out_READ_QUEUE_OUT_READ_RA <= internal_READ_RA ;"); 179 179 vhdl->set_body(0,"out_READ_QUEUE_OUT_NUM_REG_RA <= internal_NUM_REG_RA ;"); 180 180 vhdl->set_body(0,"out_READ_QUEUE_OUT_DATA_RA_VAL <= internal_NEXT_DATA_RA_VAL;"); 181 181 vhdl->set_body(0,"out_READ_QUEUE_OUT_DATA_RA <= internal_NEXT_DATA_RA ;"); 182 // 182 // vhdl->set_body(0,"out_READ_QUEUE_OUT_READ_RB <= internal_READ_RB ;"); 183 183 vhdl->set_body(0,"out_READ_QUEUE_OUT_NUM_REG_RB <= internal_NUM_REG_RB ;"); 184 184 vhdl->set_body(0,"out_READ_QUEUE_OUT_DATA_RB_VAL <= internal_NEXT_DATA_RB_VAL;"); 185 185 vhdl->set_body(0,"out_READ_QUEUE_OUT_DATA_RB <= internal_NEXT_DATA_RB ;"); 186 // 186 // vhdl->set_body(0,"out_READ_QUEUE_OUT_READ_RC <= internal_READ_RC ;"); 187 187 vhdl->set_body(0,"out_READ_QUEUE_OUT_NUM_REG_RC <= internal_NUM_REG_RC ;"); 188 188 vhdl->set_body(0,"out_READ_QUEUE_OUT_DATA_RC_VAL <= internal_NEXT_DATA_RC_VAL;"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_transition.cpp
r97 r98 25 25 log_printf(TRACE,Reservation_station,FUNCTION," * Dump Reservation Station"); \ 26 26 for (uint32_t it_dump=0;it_dump<_param->_size_queue; it_dump++) \ 27 log_printf(TRACE,Reservation_station,FUNCTION," * [%.4d] %.2d %.2d %.2d %.4d, %.2d %.3d, %.2d %.2d, %.1d %.8x, %.4d %.1d %.8x, %.4d %.1d %.8x, %.4d %.1d %.2x, %.1d %.4d, %.1d %.4d (%s)", \ 28 it_dump, \ 29 _queue[it_dump]._context_id , \ 30 _queue[it_dump]._front_end_id , \ 31 _queue[it_dump]._ooo_engine_id , \ 32 _queue[it_dump]._rob_id , \ 33 _queue[it_dump]._type , \ 34 _queue[it_dump]._operation , \ 35 _queue[it_dump]._store_queue_ptr_write, \ 36 _queue[it_dump]._load_queue_ptr_write , \ 37 _queue[it_dump]._has_immediat , \ 38 _queue[it_dump]._immediat , \ 39 _queue[it_dump]._num_reg_ra , \ 40 _queue[it_dump]._data_ra_val , \ 41 _queue[it_dump]._data_ra , \ 42 _queue[it_dump]._num_reg_rb , \ 43 _queue[it_dump]._data_rb_val , \ 44 _queue[it_dump]._data_rb , \ 45 _queue[it_dump]._num_reg_rc , \ 46 _queue[it_dump]._data_rc_val , \ 47 _queue[it_dump]._data_rc , \ 48 _queue[it_dump]._write_rd , \ 49 _queue[it_dump]._num_reg_rd , \ 50 _queue[it_dump]._write_re , \ 51 _queue[it_dump]._num_reg_re , \ 52 toString(_queue[it_dump]._type).c_str()); \ 27 if (_queue_valid [it_dump]) \ 28 log_printf(TRACE,Reservation_station,FUNCTION," * [%.4d] %.2d %.2d %.2d %.4d, %.2d %.3d, %.2d %.2d, %.1d %.8x, %.4d %.1d %.8x, %.4d %.1d %.8x, %.4d %.1d %.2x, %.1d %.4d, %.1d %.4d (%s)", \ 29 it_dump, \ 30 _queue[it_dump]._context_id , \ 31 _queue[it_dump]._front_end_id , \ 32 _queue[it_dump]._ooo_engine_id , \ 33 _queue[it_dump]._rob_id , \ 34 _queue[it_dump]._type , \ 35 _queue[it_dump]._operation , \ 36 _queue[it_dump]._store_queue_ptr_write, \ 37 _queue[it_dump]._load_queue_ptr_write , \ 38 _queue[it_dump]._has_immediat , \ 39 _queue[it_dump]._immediat , \ 40 _queue[it_dump]._num_reg_ra , \ 41 _queue[it_dump]._data_ra_val , \ 42 _queue[it_dump]._data_ra , \ 43 _queue[it_dump]._num_reg_rb , \ 44 _queue[it_dump]._data_rb_val , \ 45 _queue[it_dump]._data_rb , \ 46 _queue[it_dump]._num_reg_rc , \ 47 _queue[it_dump]._data_rc_val , \ 48 _queue[it_dump]._data_rc , \ 49 _queue[it_dump]._write_rd , \ 50 _queue[it_dump]._num_reg_rd , \ 51 _queue[it_dump]._write_re , \ 52 _queue[it_dump]._num_reg_re , \ 53 toString(_queue[it_dump]._type).c_str()); \ 53 54 } while (0) 54 55 #else -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/Makefile.deps
r81 r98 13 13 include $(DIR_MORPHEO)/Behavioural/Makefile.deps 14 14 endif 15 ifndef Queue 16 include $(DIR_MORPHEO)/Behavioural/Generic/Queue/Makefile.deps 17 endif 15 18 16 19 #-----[ Directory ]---------------------------------------- … … 20 23 #-----[ Library ]------------------------------------------ 21 24 Execute_queue_LIBRARY = -lExecute_queue \ 25 $(Queue_LIBRARY) \ 22 26 $(Behavioural_LIBRARY) 23 27 24 28 Execute_queue_DIR_LIBRARY = -L$(Execute_queue_DIR)/lib \ 29 $(Queue_DIR_LIBRARY) \ 25 30 $(Behavioural_DIR_LIBRARY) 26 31 … … 30 35 @\ 31 36 $(MAKE) Behavioural_library; \ 37 $(MAKE) Queue_library; \ 32 38 $(MAKE) --directory=$(Execute_queue_DIR) --makefile=Makefile; 33 39 … … 35 41 @\ 36 42 $(MAKE) Behavioural_library_clean; \ 43 $(MAKE) Queue_library_clean; \ 37 44 $(MAKE) --directory=$(Execute_queue_DIR) --makefile=Makefile clean; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/test.cpp
r97 r98 7 7 */ 8 8 9 #define NB_ITERATION 1 9 #define NB_ITERATION 16 10 10 #define CYCLE_MAX (128*NB_ITERATION) 11 11 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Parameters.h
r88 r98 38 38 //public : uint32_t _size_ooo_engine_id ; 39 39 //public : uint32_t _size_packet_id ; 40 public : uint32_t _size_internal_queue ; 40 41 41 42 //public : bool _have_port_context_id ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl.cpp
r81 r98 9 9 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Execute_queue.h" 10 10 #include "Behavioural/include/Vhdl.h" 11 #include "Behavioural/Generic/Queue/include/Queue.h" 11 12 12 13 namespace morpheo { … … 25 26 { 26 27 log_printf(FUNC,Execute_queue,FUNCTION,"Begin"); 28 29 //----- Queue ----- 30 31 morpheo::behavioural::generic::queue::Parameters * param_queue; 32 morpheo::behavioural::generic::queue::Queue * queue; 33 34 param_queue = new morpheo::behavioural::generic::queue::Parameters 35 (_param->_size_queue, 36 _param->_size_internal_queue 37 ); 38 39 std::string queue_name = _name + "_queue"; 40 queue = new morpheo::behavioural::generic::queue::Queue 41 (queue_name.c_str() 42 #ifdef STATISTICS 43 ,NULL 44 #endif 45 ,param_queue 46 ,USE_VHDL); 47 48 _component->set_component(queue->_component 49 #ifdef POSITION 50 , 0, 0, 0, 0 51 #endif 52 , INSTANCE_LIBRARY 53 ); 27 54 28 55 Vhdl * vhdl = new Vhdl (_name); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl_body.cpp
r96 r98 24 24 { 25 25 log_printf(FUNC,Execute_queue,FUNCTION,"Begin"); 26 vhdl->set_body (0,""); 27 vhdl->set_body (0,"process (in_CLOCK)"); 28 vhdl->set_body (0,"begin"); 29 vhdl->set_body (1,"if in_CLOCK'event and in_CLOCK = '1' then"); 30 // vhdl->set_body (2,"if in_NRESET = '0' then"); 31 // vhdl->set_body (3,"reg_CURRENT_STATE <= STATE_0;"); 32 // vhdl->set_body (2,"else"); 33 vhdl->set_body (3,"reg_CURRENT_STATE <= sig_NEXT_STATE;"); 26 27 vhdl->set_comment(0,""); 28 vhdl->set_comment(0,"-----------------------------------"); 29 vhdl->set_comment(0,"-- Instance queue "); 30 vhdl->set_comment(0,"-----------------------------------"); 31 vhdl->set_comment(0,""); 32 33 vhdl->set_body (0,"instance_"+_name+"_queue : "+_name+"_queue"); 34 vhdl->set_body (0,"port map ("); 35 vhdl->set_body (1," in_CLOCK \t=>\t in_CLOCK "); 36 vhdl->set_body (1,", in_NRESET \t=>\t in_NRESET"); 37 vhdl->set_body (1,", in_INSERT_VAL \t=>\tinternal_QUEUE_INSERT_VAL"); 38 vhdl->set_body (1,",out_INSERT_ACK \t=>\tinternal_QUEUE_INSERT_ACK"); 39 vhdl->set_body (1,", in_INSERT_DATA \t=>\tinternal_QUEUE_INSERT_DATA"); 40 vhdl->set_body (1,",out_RETIRE_VAL \t=>\tinternal_QUEUE_RETIRE_VAL"); 41 vhdl->set_body (1,", in_RETIRE_ACK \t=>\tinternal_QUEUE_RETIRE_ACK"); 42 vhdl->set_body (1,",out_RETIRE_DATA \t=>\tinternal_QUEUE_RETIRE_DATA"); 43 vhdl->set_body (0,");"); 44 45 vhdl->set_comment(0,""); 46 vhdl->set_comment(0,"-----------------------------------"); 47 vhdl->set_comment(0,"-- Input Buffer "); 48 vhdl->set_comment(0,"-----------------------------------"); 49 vhdl->set_comment(0,""); 50 51 { 52 uint32_t min = 0; 53 uint32_t max, size; 54 55 if(_param->_have_port_context_id ) 56 { 57 size = _param->_size_context_id; 58 max = min-1+size; 59 vhdl->set_body (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_CONTEXT_ID;"); 60 min = max+1; 61 } 62 if(_param->_have_port_front_end_id ) 63 { 64 size = _param->_size_front_end_id; 65 max = min-1+size; 66 vhdl->set_body (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_FRONT_END_ID;"); 67 min = max+1; 68 } 69 if(_param->_have_port_ooo_engine_id ) 70 { 71 size = _param->_size_ooo_engine_id; 72 max = min-1+size; 73 vhdl->set_body (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID;"); 74 min = max+1; 75 } 76 if(_param->_have_port_rob_ptr) 77 { 78 size = _param->_size_rob_ptr; 79 max = min-1+size; 80 vhdl->set_body (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_PACKET_ID;"); 81 min = max+1; 82 } 83 84 // size = _param->_size_operation; 85 // max = min-1+size; 86 // vhdl->set_body (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_OPERATION;"); 87 // min = max+1; 88 // 89 // size = _param->_size_type; 90 // max = min-1+size; 91 // vhdl->set_body (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_TYPE;"); 92 // min = max+1; 93 94 size = _param->_size_special_data; 95 max = min-1+size; 96 vhdl->set_body (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_FLAGS;"); 97 min = max+1; 98 99 size = _param->_size_exception; 100 max = min-1+size; 101 vhdl->set_body (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_EXCEPTION;"); 102 min = max+1; 103 104 size = 1; 105 max = min-1+size; 106 vhdl->set_body (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE;"); 107 min = max+1; 108 109 size = _param->_size_instruction_address; 110 max = min-1+size; 111 vhdl->set_body (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_ADDRESS;"); 112 min = max+1; 113 114 size = _param->_size_general_data; 115 max = min-1+size; 116 vhdl->set_body (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_DATA;"); 117 min = max+1; 118 } 119 120 vhdl->set_comment(0,""); 121 vhdl->set_comment(0,"-----------------------------------"); 122 vhdl->set_comment(0,"-- Output Buffer "); 123 vhdl->set_comment(0,"-----------------------------------"); 124 vhdl->set_comment(0,""); 125 126 if(_param->_have_port_context_id) 127 vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_CONTEXT_ID <= internal_EXECUTE_QUEUE_OUT_CONTEXT_ID ;"); 128 if(_param->_have_port_front_end_id) 129 vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_FRONT_END_ID <= internal_EXECUTE_QUEUE_OUT_FRONT_END_ID ;"); 130 if(_param->_have_port_ooo_engine_id) 131 vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID <= internal_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID;"); 132 if(_param->_have_port_rob_ptr) 133 vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_PACKET_ID <= internal_EXECUTE_QUEUE_OUT_PACKET_ID ;"); 134 // vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_OPERATION <= internal_EXECUTE_QUEUE_OUT_OPERATION ;"); 135 // vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_TYPE <= internal_EXECUTE_QUEUE_OUT_TYPE ;"); 136 vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_FLAGS <= internal_EXECUTE_QUEUE_OUT_FLAGS ;"); 137 vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_EXCEPTION <= internal_EXECUTE_QUEUE_OUT_EXCEPTION ;"); 138 vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_NO_SEQUENCE <= internal_EXECUTE_QUEUE_OUT_NO_SEQUENCE ;"); 139 vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_ADDRESS <= internal_EXECUTE_QUEUE_OUT_ADDRESS ;"); 140 vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_DATA <= internal_EXECUTE_QUEUE_OUT_DATA ;"); 141 142 143 // vhdl->set_body (0,""); 144 // vhdl->set_body (0,"process (in_CLOCK)"); 145 // vhdl->set_body (0,"begin"); 146 // vhdl->set_body (1,"if in_CLOCK'event and in_CLOCK = '1' then"); 147 // // vhdl->set_body (2,"if in_NRESET = '0' then"); 148 // // vhdl->set_body (3,"reg_CURRENT_STATE <= STATE_0;"); 149 // // vhdl->set_body (2,"else"); 150 // vhdl->set_body (3,"reg_CURRENT_STATE <= sig_NEXT_STATE;"); 151 // // vhdl->set_body (2,"end if;"); 152 153 // for (uint32_t i = 0; i <_param->_size_queue - 1; i++) 154 // { 155 // vhdl->set_body (2,"if sig_WEN_"+toString(i)+" = '1' then"); 156 // vhdl->set_body (3,"if sig_SEL_"+toString(i)+" = '0' then"); 157 // if (_param->_have_port_context_id) 158 // vhdl->set_body (4,"reg_CONTEXT_ID_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_CONTEXT_ID;"); 159 // if (_param->_have_port_front_end_id) 160 // vhdl->set_body (4,"reg_FRONT_END_ID_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_FRONT_END_ID;"); 161 // if (_param->_have_port_ooo_engine_id) 162 // vhdl->set_body (4,"reg_OOO_ENGINE_ID_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID;"); 163 // if (_param->_have_port_rob_ptr) 164 // vhdl->set_body (4,"reg_PACKET_ID_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_PACKET_ID;"); 165 // vhdl->set_body (4, "reg_FLAGS_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_FLAGS;"); 166 // vhdl->set_body (4, "reg_EXCEPTION_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_EXCEPTION;"); 167 // vhdl->set_body (4, "reg_NO_SEQUENCE_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE;"); 168 // vhdl->set_body (4, "reg_ADDRESS_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_ADDRESS;"); 169 // vhdl->set_body (4, "reg_DATA_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_DATA;"); 170 171 // vhdl->set_body (3, "else"); 172 // if (_param->_have_port_context_id) 173 // vhdl->set_body (4,"reg_CONTEXT_ID_"+toString(i)+" <= reg_CONTEXT_ID_"+toString(i+1)+";"); 174 // if (_param->_have_port_front_end_id) 175 // vhdl->set_body (4,"reg_FRONT_END_ID_"+toString(i)+" <= reg_FRONT_END_ID_"+toString(i+1)+";"); 176 // if (_param->_have_port_ooo_engine_id) 177 // vhdl->set_body (4,"reg_OOO_ENGINE_ID_"+toString(i)+" <= reg_OOO_ENGINE_ID_"+toString(i+1)+";"); 178 // if (_param->_have_port_rob_ptr) 179 // vhdl->set_body (4,"reg_PACKET_ID_"+toString(i)+" <= reg_PACKET_ID_"+toString(i+1)+";"); 180 // vhdl->set_body (4, "reg_FLAGS_"+toString(i)+" <= reg_FLAGS_"+toString(i+1)+";"); 181 // vhdl->set_body (4, "reg_EXCEPTION_"+toString(i)+" <= reg_EXCEPTION_"+toString(i+1)+";"); 182 // vhdl->set_body (4, "reg_NO_SEQUENCE_"+toString(i)+" <= reg_NO_SEQUENCE_"+toString(i+1)+";"); 183 // vhdl->set_body (4, "reg_ADDRESS_"+toString(i)+" <= reg_ADDRESS_"+toString(i+1)+";"); 184 // vhdl->set_body (4, "reg_DATA_"+toString(i)+" <= reg_DATA_"+toString(i+1)+";"); 185 186 // vhdl->set_body (3,"end if;"); 187 188 // vhdl->set_body (2,"end if;"); 189 // } 190 191 // vhdl->set_body (2,"if sig_WEN_"+toString(_param->_size_queue-1)+" = '1' then"); 192 // if (_param->_have_port_context_id) 193 // vhdl->set_body (3,"reg_CONTEXT_ID_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_CONTEXT_ID;"); 194 // if (_param->_have_port_front_end_id) 195 // vhdl->set_body (3,"reg_FRONT_END_ID_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_FRONT_END_ID;"); 196 // if (_param->_have_port_ooo_engine_id) 197 // vhdl->set_body (3,"reg_OOO_ENGINE_ID_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID;"); 198 // if (_param->_have_port_rob_ptr) 199 // vhdl->set_body (3,"reg_PACKET_ID_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_PACKET_ID;"); 200 // vhdl->set_body (3, "reg_FLAGS_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_FLAGS;"); 201 // vhdl->set_body (3, "reg_EXCEPTION_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_EXCEPTION;"); 202 // vhdl->set_body (3, "reg_NO_SEQUENCE_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE;"); 203 // vhdl->set_body (3, "reg_ADDRESS_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_ADDRESS;"); 204 // vhdl->set_body (3, "reg_DATA_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_DATA;"); 34 205 // vhdl->set_body (2,"end if;"); 35 206 36 for (uint32_t i = 0; i <_param->_size_queue - 1; i++) 37 { 38 vhdl->set_body (2,"if sig_WEN_"+toString(i)+" = '1' then"); 39 vhdl->set_body (3,"if sig_SEL_"+toString(i)+" = '0' then"); 40 if (_param->_have_port_context_id) 41 vhdl->set_body (4,"reg_CONTEXT_ID_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_CONTEXT_ID;"); 42 if (_param->_have_port_front_end_id) 43 vhdl->set_body (4,"reg_FRONT_END_ID_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_FRONT_END_ID;"); 44 if (_param->_have_port_ooo_engine_id) 45 vhdl->set_body (4,"reg_OOO_ENGINE_ID_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID;"); 46 if (_param->_have_port_rob_ptr) 47 vhdl->set_body (4,"reg_PACKET_ID_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_PACKET_ID;"); 48 vhdl->set_body (4, "reg_FLAGS_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_FLAGS;"); 49 vhdl->set_body (4, "reg_EXCEPTION_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_EXCEPTION;"); 50 vhdl->set_body (4, "reg_NO_SEQUENCE_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE;"); 51 vhdl->set_body (4, "reg_ADDRESS_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_ADDRESS;"); 52 vhdl->set_body (4, "reg_DATA_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_DATA;"); 53 54 vhdl->set_body (3, "else"); 55 if (_param->_have_port_context_id) 56 vhdl->set_body (4,"reg_CONTEXT_ID_"+toString(i)+" <= reg_CONTEXT_ID_"+toString(i+1)+";"); 57 if (_param->_have_port_front_end_id) 58 vhdl->set_body (4,"reg_FRONT_END_ID_"+toString(i)+" <= reg_FRONT_END_ID_"+toString(i+1)+";"); 59 if (_param->_have_port_ooo_engine_id) 60 vhdl->set_body (4,"reg_OOO_ENGINE_ID_"+toString(i)+" <= reg_OOO_ENGINE_ID_"+toString(i+1)+";"); 61 if (_param->_have_port_rob_ptr) 62 vhdl->set_body (4,"reg_PACKET_ID_"+toString(i)+" <= reg_PACKET_ID_"+toString(i+1)+";"); 63 vhdl->set_body (4, "reg_FLAGS_"+toString(i)+" <= reg_FLAGS_"+toString(i+1)+";"); 64 vhdl->set_body (4, "reg_EXCEPTION_"+toString(i)+" <= reg_EXCEPTION_"+toString(i+1)+";"); 65 vhdl->set_body (4, "reg_NO_SEQUENCE_"+toString(i)+" <= reg_NO_SEQUENCE_"+toString(i+1)+";"); 66 vhdl->set_body (4, "reg_ADDRESS_"+toString(i)+" <= reg_ADDRESS_"+toString(i+1)+";"); 67 vhdl->set_body (4, "reg_DATA_"+toString(i)+" <= reg_DATA_"+toString(i+1)+";"); 68 69 vhdl->set_body (3,"end if;"); 70 71 vhdl->set_body (2,"end if;"); 72 } 73 74 vhdl->set_body (2,"if sig_WEN_"+toString(_param->_size_queue-1)+" = '1' then"); 75 if (_param->_have_port_context_id) 76 vhdl->set_body (3,"reg_CONTEXT_ID_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_CONTEXT_ID;"); 77 if (_param->_have_port_front_end_id) 78 vhdl->set_body (3,"reg_FRONT_END_ID_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_FRONT_END_ID;"); 79 if (_param->_have_port_ooo_engine_id) 80 vhdl->set_body (3,"reg_OOO_ENGINE_ID_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID;"); 81 if (_param->_have_port_rob_ptr) 82 vhdl->set_body (3,"reg_PACKET_ID_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_PACKET_ID;"); 83 vhdl->set_body (3, "reg_FLAGS_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_FLAGS;"); 84 vhdl->set_body (3, "reg_EXCEPTION_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_EXCEPTION;"); 85 vhdl->set_body (3, "reg_NO_SEQUENCE_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE;"); 86 vhdl->set_body (3, "reg_ADDRESS_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_ADDRESS;"); 87 vhdl->set_body (3, "reg_DATA_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_DATA;"); 88 vhdl->set_body (2,"end if;"); 89 90 91 vhdl->set_body (1,"end if;"); 92 vhdl->set_body (0,"end process;"); 93 94 95 vhdl->set_body (0,""); 96 vhdl->set_body (0,""); 97 vhdl->set_body (0,""); 98 99 vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_VAL <= sig_OUT_VAL;"); 100 vhdl->set_body (0,"out_EXECUTE_QUEUE_IN_ACK <= sig_IN_ACK;"); 101 if (_param->_have_port_context_id) 102 vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_CONTEXT_ID <= reg_CONTEXT_ID_0;"); 103 if (_param->_have_port_front_end_id) 104 vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_FRONT_END_ID <= reg_FRONT_END_ID_0;"); 105 if (_param->_have_port_ooo_engine_id) 106 vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID <= reg_OOO_ENGINE_ID_0;"); 107 if (_param->_have_port_rob_ptr) 108 vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_PACKET_ID <= reg_PACKET_ID_0;"); 109 vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_FLAGS <= reg_FLAGS_0;"); 110 vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_EXCEPTION <= reg_EXCEPTION_0;"); 111 vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_NO_SEQUENCE <= reg_NO_SEQUENCE_0;"); 112 vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_ADDRESS <= reg_ADDRESS_0;"); 113 vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_DATA <= reg_DATA_0;"); 114 115 116 vhdl->set_body (0,""); 117 118 vhdl->set_body (0,"process (reg_CURRENT_STATE, in_EXECUTE_QUEUE_OUT_ACK, in_EXECUTE_QUEUE_IN_VAL, in_NRESET)"); 119 vhdl->set_body (0,"begin"); 120 vhdl->set_body (1,"if in_NRESET = '0' then"); 121 vhdl->set_body (2,"sig_NEXT_STATE <= STATE_0;"); 122 vhdl->set_body (1,"else"); 123 vhdl->set_body (2,"case reg_CURRENT_STATE is"); 124 for (uint32_t i = 0; i <_param->_size_queue + 1; i++) 125 { 126 vhdl->set_body (3,"when STATE_"+toString(i)+" =>"); 127 if (i == 0) 128 { 129 vhdl->set_body (4,"if in_EXECUTE_QUEUE_IN_VAL = '1' then"); 130 vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE ("+toString(_param->_size_queue-1)+" downto 0) & '0';"); 131 vhdl->set_body (4,"else"); 132 vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;"); 133 vhdl->set_body (4,"end if;"); 134 continue; 135 } 136 if (i == (_param->_size_queue)) 137 { 138 vhdl->set_body (4,"if in_EXECUTE_QUEUE_OUT_ACK = '1' then"); 139 vhdl->set_body (5,"sig_NEXT_STATE <= '0' & reg_CURRENT_STATE ("+toString(_param->_size_queue)+" downto 1);"); 140 vhdl->set_body (4,"else"); 141 vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;"); 142 vhdl->set_body (4,"end if;"); 143 continue; 144 } 145 vhdl->set_body (4,"if in_EXECUTE_QUEUE_IN_VAL = '1' and in_EXECUTE_QUEUE_OUT_ACK = '0' then"); 146 vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE ("+toString(_param->_size_queue-1)+" downto 0) & '0';"); 147 vhdl->set_body (4,"elsif in_EXECUTE_QUEUE_IN_VAL = '0' and in_EXECUTE_QUEUE_OUT_ACK = '1' then"); 148 vhdl->set_body (5,"sig_NEXT_STATE <= '0' & reg_CURRENT_STATE ("+toString(_param->_size_queue)+" downto 1);"); 149 vhdl->set_body (4,"else"); 150 vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;"); 151 vhdl->set_body (4,"end if;"); 152 } 153 vhdl->set_body (3,"when others => assert false report \"wrong state\" severity failure;"); 154 vhdl->set_body (2,"end case;"); 155 vhdl->set_body (1,"end if;"); 156 157 vhdl->set_body (2,"case reg_CURRENT_STATE is"); 158 for (uint32_t i = 0; i <_param->_size_queue + 1; i++) 159 { 160 vhdl->set_body (3,"when STATE_"+toString(i)+" =>"); 161 if (i == 0) 162 { 163 vhdl->set_body (4,"sig_OUT_VAL <= '0';"); 164 vhdl->set_body (4,"sig_IN_ACK <= '1';"); 165 for (uint32_t j = 0; j <_param->_size_queue; j++) 166 { 167 if (i == j) 168 { 169 vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';"); 170 vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_IN_VAL;"); 171 } 172 else 173 { 174 if (j < (_param->_size_queue - 1)) 175 vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';"); 176 vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';"); 177 } 178 } 179 continue; 180 } 181 if (i == (_param->_size_queue)) 182 { 183 vhdl->set_body (4,"sig_OUT_VAL <= '1';"); 184 vhdl->set_body (4,"sig_IN_ACK <= '0';"); 185 for (uint32_t j = 0; j <_param->_size_queue; j++) 186 { 187 if (j == (i - 1)) 188 { 189 vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';"); 190 } 191 else 192 { 193 vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;"); 194 vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;"); 195 } 196 } 197 continue; 198 } 199 vhdl->set_body (4,"sig_OUT_VAL <= '1';"); 200 vhdl->set_body (4,"sig_IN_ACK <= '1';"); 201 for (uint32_t j = 0; j <_param->_size_queue; j++) 202 { 203 if (j < (i - 1)) 204 { 205 vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;"); 206 vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;"); 207 } 208 if (j == (i - 1)) 209 { 210 vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';"); 211 vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK and in_EXECUTE_QUEUE_IN_VAL;"); 212 } 213 if (j == i) 214 { 215 if (j < (_param->_size_queue - 1)) 216 vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';"); 217 vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_IN_VAL and not in_EXECUTE_QUEUE_OUT_ACK;"); 218 } 219 if (j > i) 220 { 221 if (j < (_param->_size_queue - 1)) 222 vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';"); 223 vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';"); 224 } 225 } 226 } 227 vhdl->set_body (3,"when others =>"); 228 vhdl->set_body (2,"end case;"); 229 230 vhdl->set_body (0,"end process;"); 231 232 233 207 208 // vhdl->set_body (1,"end if;"); 209 // vhdl->set_body (0,"end process;"); 210 211 212 // vhdl->set_body (0,""); 213 // vhdl->set_body (0,""); 214 // vhdl->set_body (0,""); 215 216 // vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_VAL <= sig_OUT_VAL;"); 217 // vhdl->set_body (0,"out_EXECUTE_QUEUE_IN_ACK <= sig_IN_ACK;"); 218 // if (_param->_have_port_context_id) 219 // vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_CONTEXT_ID <= reg_CONTEXT_ID_0;"); 220 // if (_param->_have_port_front_end_id) 221 // vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_FRONT_END_ID <= reg_FRONT_END_ID_0;"); 222 // if (_param->_have_port_ooo_engine_id) 223 // vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID <= reg_OOO_ENGINE_ID_0;"); 224 // if (_param->_have_port_rob_ptr) 225 // vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_PACKET_ID <= reg_PACKET_ID_0;"); 226 // vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_FLAGS <= reg_FLAGS_0;"); 227 // vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_EXCEPTION <= reg_EXCEPTION_0;"); 228 // vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_NO_SEQUENCE <= reg_NO_SEQUENCE_0;"); 229 // vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_ADDRESS <= reg_ADDRESS_0;"); 230 // vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_DATA <= reg_DATA_0;"); 231 232 233 // vhdl->set_body (0,""); 234 235 // vhdl->set_body (0,"process (reg_CURRENT_STATE, in_EXECUTE_QUEUE_OUT_ACK, in_EXECUTE_QUEUE_IN_VAL, in_NRESET)"); 236 // vhdl->set_body (0,"begin"); 237 // vhdl->set_body (1,"if in_NRESET = '0' then"); 238 // vhdl->set_body (2,"sig_NEXT_STATE <= STATE_0;"); 239 // vhdl->set_body (1,"else"); 240 // vhdl->set_body (2,"case reg_CURRENT_STATE is"); 241 // for (uint32_t i = 0; i <_param->_size_queue + 1; i++) 242 // { 243 // vhdl->set_body (3,"when STATE_"+toString(i)+" =>"); 244 // if (i == 0) 245 // { 246 // vhdl->set_body (4,"if in_EXECUTE_QUEUE_IN_VAL = '1' then"); 247 // vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE ("+toString(_param->_size_queue-1)+" downto 0) & '0';"); 248 // vhdl->set_body (4,"else"); 249 // vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;"); 250 // vhdl->set_body (4,"end if;"); 251 // continue; 252 // } 253 // if (i == (_param->_size_queue)) 254 // { 255 // vhdl->set_body (4,"if in_EXECUTE_QUEUE_OUT_ACK = '1' then"); 256 // vhdl->set_body (5,"sig_NEXT_STATE <= '0' & reg_CURRENT_STATE ("+toString(_param->_size_queue)+" downto 1);"); 257 // vhdl->set_body (4,"else"); 258 // vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;"); 259 // vhdl->set_body (4,"end if;"); 260 // continue; 261 // } 262 // vhdl->set_body (4,"if in_EXECUTE_QUEUE_IN_VAL = '1' and in_EXECUTE_QUEUE_OUT_ACK = '0' then"); 263 // vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE ("+toString(_param->_size_queue-1)+" downto 0) & '0';"); 264 // vhdl->set_body (4,"elsif in_EXECUTE_QUEUE_IN_VAL = '0' and in_EXECUTE_QUEUE_OUT_ACK = '1' then"); 265 // vhdl->set_body (5,"sig_NEXT_STATE <= '0' & reg_CURRENT_STATE ("+toString(_param->_size_queue)+" downto 1);"); 266 // vhdl->set_body (4,"else"); 267 // vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;"); 268 // vhdl->set_body (4,"end if;"); 269 // } 270 // vhdl->set_body (3,"when others => assert false report \"wrong state\" severity failure;"); 234 271 // vhdl->set_body (2,"end case;"); 235 // for (uint32_t i = 0; i <_param->_size_queue; i++) 272 // vhdl->set_body (1,"end if;"); 273 274 // vhdl->set_body (2,"case reg_CURRENT_STATE is"); 275 // for (uint32_t i = 0; i <_param->_size_queue + 1; i++) 236 276 // { 237 // if (i == 0) 238 // vhdl->set_body (4,"sig_WEN_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_VAL;"); 239 // else 240 // vhdl->set_body (4,"sig_WEN_"+toString(i)+" <= '0';"); 241 // if (i < _param->_size_queue - 1) 242 // vhdl->set_body (4,"sig_SEL_"+toString(i)+" <= '0';"); 277 // vhdl->set_body (3,"when STATE_"+toString(i)+" =>"); 278 // if (i == 0) 279 // { 280 // vhdl->set_body (4,"sig_OUT_VAL <= '0';"); 281 // vhdl->set_body (4,"sig_IN_ACK <= '1';"); 282 // for (uint32_t j = 0; j <_param->_size_queue; j++) 283 // { 284 // if (i == j) 285 // { 286 // vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';"); 287 // vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_IN_VAL;"); 288 // } 289 // else 290 // { 291 // if (j < (_param->_size_queue - 1)) 292 // vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';"); 293 // vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';"); 294 // } 295 // } 296 // continue; 297 // } 298 // if (i == (_param->_size_queue)) 299 // { 300 // vhdl->set_body (4,"sig_OUT_VAL <= '1';"); 301 // vhdl->set_body (4,"sig_IN_ACK <= '0';"); 302 // for (uint32_t j = 0; j <_param->_size_queue; j++) 303 // { 304 // if (j == (i - 1)) 305 // { 306 // vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';"); 307 // } 308 // else 309 // { 310 // vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;"); 311 // vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;"); 312 // } 313 // } 314 // continue; 315 // } 316 // vhdl->set_body (4,"sig_OUT_VAL <= '1';"); 317 // vhdl->set_body (4,"sig_IN_ACK <= '1';"); 318 // for (uint32_t j = 0; j <_param->_size_queue; j++) 319 // { 320 // if (j < (i - 1)) 321 // { 322 // vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;"); 323 // vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;"); 324 // } 325 // if (j == (i - 1)) 326 // { 327 // vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';"); 328 // vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK and in_EXECUTE_QUEUE_IN_VAL;"); 329 // } 330 // if (j == i) 331 // { 332 // if (j < (_param->_size_queue - 1)) 333 // vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';"); 334 // vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_IN_VAL and not in_EXECUTE_QUEUE_OUT_ACK;"); 335 // } 336 // if (j > i) 337 // { 338 // if (j < (_param->_size_queue - 1)) 339 // vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';"); 340 // vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';"); 341 // } 342 // } 243 343 // } 244 // vhdl->set_body (2,"end process;"); 245 246 // vhdl->set_body (0,"sig_TRANS_OUT <="); 247 // vhdl->set_body (1,"'0' when reg_CURRENT_STATE = STATE_0 else"); 248 // vhdl->set_body (1,"'1';"); 249 250 // vhdl->set_body (0,"sig_TRANS_IN <="); 251 // vhdl->set_body (1,"'0' when reg_CURRENT_STATE = STATE_"+toString(_param->_size_queue)+" else"); 252 // vhdl->set_body (1,"'1';"); 253 254 255 256 // vhdl->set_body (0,"sig_NEXT_STATE <="); 257 // vhdl->set_body (1,"reg_CURRENT_STATE("+toString(_param->_size_queue-1)+" downto 0) & '0' when in_EXECUTE_QUEUE_IN_VAL = '1' and ((reg_CURRENT_STATE = STATE_0) xor (in_EXECUTE_QUEUE_OUT_ACK = '0')) and sig_TRANS_IN = '1' else"); 258 // vhdl->set_body (1,"'0' & reg_CURRENT_STATE("+toString(_param->_size_queue)+" downto 1) when in_EXECUTE_QUEUE_OUT_ACK = '1' and ((in_EXECUTE_QUEUE_IN_VAL = '0') xor (reg_CURRENT_STATE = STATE_"+toString(_param->_size_queue)+")) and sig_TRANS_OUT = '1' else"); 259 // vhdl->set_body (1,"reg_CURRENT_STATE;"); 260 261 // vhdl->set_body (0,"sig_WEN_0 <="); 262 // vhdl->set_body (1,"in_EXECUTE_QUEUE_IN_VAL when reg_CURRENT_STATE = STATE_0 else"); 263 // vhdl->set_body (1,"in_EXECUTE_QUEUE_OUT_ACK and in_EXECUTE_QUEUE_IN_VAL when reg_CURRENT_STATE = STATE_1 else"); 264 // vhdl->set_body (1,"in_EXECUTE_QUEUE_OUT_ACK;"); 265 // for (uint32_t i = 1; i <_param->_size_queue-1; i++) 266 // { 267 // vhdl->set_body (0,"sig_WEN_"+toString(i)+" <="); 268 // vhdl->set_body (1,"in_EXECUTE_QUEUE_IN_VAL and not in_EXECUTE_QUEUE_OUT_ACK when reg_CURRENT_STATE = STATE_"+toString(i)+" else"); 269 // vhdl->set_body (1,"in_EXECUTE_QUEUE_IN_VAL and in_EXECUTE_QUEUE_OUT_ACK when reg_CURRENT_STATE = STATE_"+toString(i+1)+" else"); 270 // vhdl->set_body (1,"in_EXECUTE_QUEUE_OUT_ACK;"); 271 // } 272 // vhdl->set_body (0,"sig_WEN_"+toString(_param->_size_queue-1)+" <="); 273 // vhdl->set_body (1,"in_EXECUTE_QUEUE_IN_VAL and not in_EXECUTE_QUEUE_OUT_ACK when reg_CURRENT_STATE = STATE_"+toString(_param->_size_queue-1)+" else"); 274 // vhdl->set_body (1,"in_EXECUTE_QUEUE_OUT_ACK;"); 275 276 // vhdl->set_body (0,""); 277 // for (uint32_t i = 0; i <_param->_size_queue-1; i++) 278 // { 279 // vhdl->set_body (0,"sig_SEL_"+toString(i)+" <="); 280 // vhdl->set_body (1,"'0' when reg_CURRENT_STATE = STATE_"+toString(i+1)+" or reg_CURRENT_STATE = STATE_"+toString(i)+" else"); 281 // vhdl->set_body (1,"in_EXECUTE_QUEUE_OUT_ACK;"); 282 // } 283 284 // process (reg_CURRENT_STATE, in_PUSH_0_VAL, in_POP_0_ACK) 285 // begin 286 // case reg_CURRENT_STATE is 287 288 // with reg_CURRENT_STATE select 289 // sig_WEN0 <= 290 // 0 when 1, 291 // 4 when 6; 292 // when "00001" => out_POP_0_VAL <= '0'; 293 // out_PUSH_0_ACK <= '1'; 294 // sig_SEL0 <= '0'; 295 // sig_WEN0 <= in_PUSH_0_VAL; 296 // sig_SEL1 <= '0'; 297 // sig_WEN1 <= '0'; 298 // sig_SEL2 <= '0'; 299 // sig_WEN2 <= '0'; 300 // sig_WEN3 <= '0'; 301 // if in_PUSH_0_VAL = '1' then 302 // sig_NEXT_STATE <= reg_CURRENT_STATE(3 downto 0) & '0'; 303 // else 304 // sig_NEXT_STATE <= reg_CURRENT_STATE; 305 // end if; 306 307 // when "00010" => out_POP_0_VAL <= '1'; 308 // out_PUSH_0_ACK <= '1'; 309 // sig_SEL0 <= '0'; 310 // sig_WEN0 <= in_POP_0_ACK and in_PUSH_0_VAL; 311 // sig_SEL1 <= '0'; 312 // sig_WEN1 <= in_PUSH_0_VAL and not in_POP_0_ACK; 313 // sig_SEL2 <= '0'; 314 // sig_WEN2 <= '0'; 315 // sig_WEN3 <= '0'; 316 // if (in_PUSH_0_VAL = '1') and (in_POP_0_ACK = '0') then 317 // sig_NEXT_STATE <= reg_CURRENT_STATE(3 downto 0) & '0'; 318 // elsif (in_PUSH_0_VAL = '0') and (in_POP_0_ACK = '1') then 319 // sig_NEXT_STATE <= '0' & reg_CURRENT_STATE(4 downto 1); 320 // else 321 // sig_NEXT_STATE <= reg_CURRENT_STATE; 322 // end if; 323 324 // when "00100" => out_POP_0_VAL <= '1'; 325 // out_PUSH_0_ACK <= '1'; 326 // sig_SEL0 <= in_POP_0_ACK; 327 // sig_WEN0 <= in_POP_0_ACK; 328 // sig_SEL1 <= '0'; 329 // sig_WEN1 <= in_POP_0_ACK and in_PUSH_0_VAL; 330 // sig_SEL2 <= '0'; 331 // sig_WEN2 <= in_PUSH_0_VAL and not in_POP_0_ACK; 332 // sig_WEN3 <= '0'; 333 // if (in_PUSH_0_VAL = '1') and (in_POP_0_ACK = '0') then 334 // sig_NEXT_STATE <= reg_CURRENT_STATE(3 downto 0) & '0'; 335 // elsif (in_PUSH_0_VAL = '0') and (in_POP_0_ACK = '1') then 336 // sig_NEXT_STATE <= '0' & reg_CURRENT_STATE(4 downto 1); 337 // else 338 // sig_NEXT_STATE <= reg_CURRENT_STATE; 339 // end if; 340 341 // when "01000" => out_POP_0_VAL <= '1'; 342 // out_PUSH_0_ACK <= '1'; 343 // sig_SEL0 <= in_POP_0_ACK; 344 // sig_WEN0 <= in_POP_0_ACK; 345 // sig_SEL1 <= in_POP_0_ACK; 346 // sig_WEN1 <= in_POP_0_ACK; 347 // sig_SEL2 <= '0'; 348 // sig_WEN2 <= in_POP_0_ACK and in_PUSH_0_VAL; 349 // sig_WEN3 <= in_PUSH_0_VAL and not in_POP_0_ACK; 350 // if (in_PUSH_0_VAL = '1') and (in_POP_0_ACK = '0') then 351 // sig_NEXT_STATE <= reg_CURRENT_STATE(3 downto 0) & '0'; 352 // elsif (in_PUSH_0_VAL = '0') and (in_POP_0_ACK = '1') then 353 // sig_NEXT_STATE <= '0' & reg_CURRENT_STATE(4 downto 1); 354 // else 355 // sig_NEXT_STATE <= reg_CURRENT_STATE; 356 // end if; 357 358 // when "10000" => out_POP_0_VAL <= '1'; 359 // out_PUSH_0_ACK <= '0'; 360 // sig_SEL0 <= in_POP_0_ACK; 361 // sig_WEN0 <= in_POP_0_ACK; 362 // sig_SEL1 <= in_POP_0_ACK; 363 // sig_WEN1 <= in_POP_0_ACK; 364 // sig_SEL2 <= in_POP_0_ACK; 365 // sig_WEN2 <= in_POP_0_ACK; 366 // sig_WEN3 <= '0'; 367 // if (in_PUSH_0_VAL = '0') and (in_POP_0_ACK = '1') then 368 // sig_NEXT_STATE <= '0' & reg_CURRENT_STATE(4 downto 1); 369 // else 370 // sig_NEXT_STATE <= reg_CURRENT_STATE; 371 // end if; 372 373 // when others => 374 // sig_next_state <= "00001"; 375 376 // end case; 377 // end process; 344 // vhdl->set_body (3,"when others =>"); 345 // vhdl->set_body (2,"end case;"); 346 // vhdl->set_body (0,"end process;"); 378 347 379 348 log_printf(FUNC,Execute_queue,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl_declaration.cpp
r96 r98 25 25 log_printf(FUNC,Execute_queue,FUNCTION,"Begin"); 26 26 27 for (uint32_t i=0; i<_param->_size_queue; ++i) 27 vhdl->set_alias ("internal_QUEUE_INSERT_VAL ",1," in_EXECUTE_QUEUE_IN_VAL",std_logic_range(1)); 28 vhdl->set_alias ("internal_QUEUE_INSERT_ACK ",1,"out_EXECUTE_QUEUE_IN_ACK",std_logic_range(1)); 29 vhdl->set_signal ("internal_QUEUE_INSERT_DATA ",_param->_size_internal_queue); 30 vhdl->set_signal ("internal_QUEUE_RETIRE_DATA ",_param->_size_internal_queue); 31 vhdl->set_alias ("internal_QUEUE_RETIRE_VAL ",1,"out_EXECUTE_QUEUE_OUT_VAL",std_logic_range(1)); 32 vhdl->set_alias ("internal_QUEUE_RETIRE_ACK ",1," in_EXECUTE_QUEUE_OUT_ACK",std_logic_range(1)); 33 34 uint32_t min = 0; 35 uint32_t max, size; 36 37 if(_param->_have_port_context_id ) 28 38 { 29 if (_param->_have_port_context_id) 30 vhdl->set_signal("reg_CONTEXT_ID_"+toString(i),_param->_size_context_id); 31 if (_param->_have_port_front_end_id) 32 vhdl->set_signal("reg_FRONT_END_ID_"+toString(i),_param->_size_front_end_id); 33 if (_param->_have_port_ooo_engine_id) 34 vhdl->set_signal("reg_OOO_ENGINE_ID_"+toString(i),_param->_size_ooo_engine_id); 35 if (_param->_have_port_rob_ptr) 36 vhdl->set_signal("reg_PACKET_ID_"+toString(i),_param->_size_rob_ptr); 37 vhdl->set_signal("reg_FLAGS_"+toString(i),_param->_size_special_data); 38 vhdl->set_signal("reg_EXCEPTION_"+toString(i),_param->_size_exception); 39 vhdl->set_signal("reg_NO_SEQUENCE_"+toString(i),1); 40 vhdl->set_signal("reg_ADDRESS_"+toString(i),_param->_size_instruction_address); 41 vhdl->set_signal("reg_DATA_"+toString(i),_param->_size_general_data); 39 size = _param->_size_context_id; 40 max = min-1+size; 41 vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_CONTEXT_ID ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min)); 42 min = max+1; 43 } 44 if(_param->_have_port_front_end_id ) 45 { 46 size = _param->_size_front_end_id; 47 max = min-1+size; 48 vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_FRONT_END_ID ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min)); 49 min = max+1; 50 } 51 if(_param->_have_port_ooo_engine_id ) 52 { 53 size = _param->_size_ooo_engine_id; 54 max = min-1+size; 55 vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min)); 56 min = max+1; 57 } 58 if(_param->_have_port_rob_ptr) 59 { 60 size = _param->_size_rob_ptr; 61 max = min-1+size; 62 vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_PACKET_ID ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min)); 63 min = max+1; 42 64 } 43 65 44 vhdl->set_signal("reg_CURRENT_STATE",_param->_size_queue+1); 66 // size = _param->_size_operation; 67 // max = min-1+size; 68 // vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_OPERATION ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min)); 69 // min = max+1; 70 // 71 // size = _param->_size_type; 72 // max = min-1+size; 73 // vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_TYPE ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min)); 74 // min = max+1; 45 75 46 vhdl->set_signal("sig_NEXT_STATE",_param->_size_queue+1); 76 size = _param->_size_special_data; 77 max = min-1+size; 78 vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_FLAGS ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min)); 79 min = max+1; 47 80 48 for (uint32_t i=0; i<_param->_size_queue-1; ++i) 49 { 50 vhdl->set_signal("sig_WEN_"+toString(i),1); 51 vhdl->set_signal("sig_SEL_"+toString(i),1); 52 } 53 vhdl->set_signal("sig_WEN_"+toString(_param->_size_queue - 1),1); 81 size = _param->_size_exception; 82 max = min-1+size; 83 vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_EXCEPTION ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min)); 84 min = max+1; 54 85 55 vhdl->set_signal("sig_IN_ACK",1); 56 vhdl->set_signal("sig_OUT_VAL",1); 86 size = 1; 87 max = min-1+size; 88 vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_NO_SEQUENCE ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min)); 89 min = max+1; 57 90 58 for (uint32_t i=0; i<_param->_size_queue+1; ++i) 59 vhdl->set_constant("STATE_"+toString(i),_param->_size_queue+1,1<<i); 91 size = _param->_size_instruction_address; 92 max = min-1+size; 93 vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_ADDRESS ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min)); 94 min = max+1; 95 96 size = _param->_size_general_data; 97 max = min-1+size; 98 vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_DATA ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min)); 99 min = max+1; 100 101 102 // for (uint32_t i=0; i<_param->_size_queue; ++i) 103 // { 104 // if (_param->_have_port_context_id) 105 // vhdl->set_signal("reg_CONTEXT_ID_"+toString(i),_param->_size_context_id); 106 // if (_param->_have_port_front_end_id) 107 // vhdl->set_signal("reg_FRONT_END_ID_"+toString(i),_param->_size_front_end_id); 108 // if (_param->_have_port_ooo_engine_id) 109 // vhdl->set_signal("reg_OOO_ENGINE_ID_"+toString(i),_param->_size_ooo_engine_id); 110 // if (_param->_have_port_rob_ptr) 111 // vhdl->set_signal("reg_PACKET_ID_"+toString(i),_param->_size_rob_ptr); 112 // vhdl->set_signal("reg_FLAGS_"+toString(i),_param->_size_special_data); 113 // vhdl->set_signal("reg_EXCEPTION_"+toString(i),_param->_size_exception); 114 // vhdl->set_signal("reg_NO_SEQUENCE_"+toString(i),1); 115 // vhdl->set_signal("reg_ADDRESS_"+toString(i),_param->_size_instruction_address); 116 // vhdl->set_signal("reg_DATA_"+toString(i),_param->_size_general_data); 117 // } 118 119 // vhdl->set_signal("reg_CURRENT_STATE",_param->_size_queue+1); 120 121 // vhdl->set_signal("sig_NEXT_STATE",_param->_size_queue+1); 122 123 // for (uint32_t i=0; i<_param->_size_queue-1; ++i) 124 // { 125 // vhdl->set_signal("sig_WEN_"+toString(i),1); 126 // vhdl->set_signal("sig_SEL_"+toString(i),1); 127 // } 128 // vhdl->set_signal("sig_WEN_"+toString(_param->_size_queue - 1),1); 129 130 // vhdl->set_signal("sig_IN_ACK",1); 131 // vhdl->set_signal("sig_OUT_VAL",1); 132 133 // for (uint32_t i=0; i<_param->_size_queue+1; ++i) 134 // vhdl->set_constant("STATE_"+toString(i),_param->_size_queue+1,1<<i); 60 135 61 136 log_printf(FUNC,Execute_queue,FUNCTION,"End"); … … 72 147 }; // end namespace morpheo 73 148 #endif 74 // signal reg_0 : std_logic_vector (15 downto 0);75 // signal reg_1 : std_logic_vector (15 downto 0);76 // signal reg_2 : std_logic_vector (15 downto 0);77 // signal reg_3 : std_logic_vector (15 downto 0);78 // signal reg_CURRENT_STATE : std_logic_vector (4 downto 0);79 80 // signal sig_NEXT_STATE : std_logic_vector (4 downto 0);81 // signal sig_WEN0 : std_logic;82 // signal sig_SEL0 : std_logic;83 // signal sig_WEN1 : std_logic;84 // signal sig_SEL1 : std_logic;85 // signal sig_WEN2 : std_logic;86 // signal sig_SEL2 : std_logic;87 // signal sig_WEN3 : std_logic; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Parameters.cpp
r97 r98 38 38 39 39 test(); 40 41 _size_internal_queue = 42 (log2( nb_context ) + 43 log2( nb_front_end ) + 44 log2( nb_ooo_engine) + 45 log2( nb_packet ) + 46 // size_operation + 47 // size_type + 48 size_special_data + 49 _size_exception + 50 1 + 51 size_general_data + 52 size_general_data 53 ); 40 54 41 55 if (is_toplevel) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/SelfTest/config_min.cfg
r88 r98 4 4 1 1 +1 # nb_inst_branch_complete 5 5 0 0 +1 # size_depth [0] [nb_context] 6 3 0 30 +1 # size_address6 32 32 +1 # size_general_data 7 7 1 1 +1 # size_inst_decod [0] [nb_decod_unit] 8 8 1 1 +1 # size_inst_commit -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/SelfTest/config_mono_context.cfg
r88 r98 4 4 1 4 *4 # nb_inst_branch_complete 5 5 0 2 +1 # size_depth [0] [nb_context] 6 3 0 30 +1 # size_address6 32 32 +1 # size_general_data 7 7 1 4 *4 # size_inst_decod [0] [nb_decod_unit] 8 8 1 4 *4 # size_inst_commit -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/SelfTest/config_multi_context.cfg
r88 r98 11 11 1 1 +1 # size_depth [6] [nb_context] 12 12 0 0 +1 # size_depth [7] [nb_context] 13 3 0 30 +1 # size_address13 32 32 +1 # size_general_data 14 14 4 4 *4 # size_inst_decod [0] [nb_decod_unit] 15 15 1 1 *4 # size_inst_decod [1] [nb_decod_unit] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/SelfTest/src/main.cpp
r88 r98 18 18 err (_(" * nb_inst_branch_complete (uint32_t)\n")); 19 19 err (_(" * size_depth [nb_context] (uint32_t)\n")); 20 err (_(" * size_ address(uint32_t)\n"));20 err (_(" * size_general_data (uint32_t)\n")); 21 21 err (_(" * size_inst_decod [nb_decod_unit] (uint32_t)\n")); 22 22 err (_(" * size_inst_commit (uint32_t)\n")); … … 52 52 _size_depth [i] = fromString<uint32_t>(argv[x++]); 53 53 54 uint32_t _size_ address= fromString<uint32_t>(argv[x++]);54 uint32_t _size_general_data = fromString<uint32_t>(argv[x++]); 55 55 56 56 uint32_t * _size_inst_decod = new uint32_t [_nb_decod_unit]; … … 70 70 _nb_inst_branch_complete , 71 71 _size_depth , 72 _size_ address,72 _size_general_data , 73 73 _size_inst_decod , 74 74 _size_inst_commit , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/SelfTest/src/test.cpp
r97 r98 51 51 ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ACK ,"out_BRANCH_EVENT_ACK ",Tcontrol_t ,_param->_nb_context); 52 52 //ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_CONTEXT_ID ," in_BRANCH_EVENT_CONTEXT_ID ",Tcontext_t ,_param->_nb_context); 53 //ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_DEPTH ," in_BRANCH_EVENT_DEPTH ",Tdepth_t ,_param->_nb_context);53 ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_DEPTH ," in_BRANCH_EVENT_DEPTH ",Tdepth_t ,_param->_nb_context); 54 54 //ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_MISS_PREDICTION ," in_BRANCH_EVENT_MISS_PREDICTION ",Tcontrol_t ,_param->_nb_context); 55 55 ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_ADDRESS_SRC ," in_BRANCH_EVENT_ADDRESS_SRC ",Taddress_t ,_param->_nb_context); … … 129 129 INSTANCE1_SC_SIGNAL(_Context_State,out_BRANCH_EVENT_ACK ,_param->_nb_context); 130 130 //INSTANCE1_SC_SIGNAL(_Context_State, in_BRANCH_EVENT_CONTEXT_ID ,_param->_nb_context); 131 //INSTANCE1_SC_SIGNAL(_Context_State, in_BRANCH_EVENT_DEPTH ,_param->_nb_context); 131 if (_param->_have_port_depth) 132 INSTANCE1_SC_SIGNAL(_Context_State, in_BRANCH_EVENT_DEPTH ,_param->_nb_context); 132 133 //INSTANCE1_SC_SIGNAL(_Context_State, in_BRANCH_EVENT_MISS_PREDICTION ,_param->_nb_context); 133 134 INSTANCE1_SC_SIGNAL(_Context_State, in_BRANCH_EVENT_ADDRESS_SRC ,_param->_nb_context); … … 217 218 srand(seed); 218 219 220 const int32_t percent_transaction_branch_event = 75; 219 221 const int32_t percent_transaction_decod_event = 75; 220 222 const int32_t percent_transaction_commit_event = 75; 221 223 //const int32_t percent_transaction_branch_complete = 75; 222 224 const int32_t percent_transaction_event = 75; 223 225 const int32_t percent_transaction_spr = 75; … … 239 241 in_DECOD_EVENT_VAL [i]->write(0); 240 242 in_COMMIT_EVENT_VAL ->write(0); 241 for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++) 242 in_BRANCH_COMPLETE_VAL [i]->write(0); 243 // for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++) 244 // in_BRANCH_COMPLETE_VAL [i]->write(0); 245 for (uint32_t i=0; i<_param->_nb_context; i++) 246 in_BRANCH_EVENT_VAL [i]->write(0); 243 247 244 248 for (uint32_t i=0; i<_param->_nb_context; i++) … … 525 529 in_NB_INST_COMMIT_MEM [context]->write(1); 526 530 527 uint32_t port = rand()%_param->_nb_inst_branch_complete; 528 529 in_BRANCH_COMPLETE_CONTEXT_ID [port]->write(context); 531 // uint32_t port = rand()%_param->_nb_inst_branch_complete; 532 533 // in_BRANCH_COMPLETE_CONTEXT_ID [port]->write(context); 534 // if (_param->_have_port_depth) 535 // in_BRANCH_COMPLETE_DEPTH [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context])); 536 // in_BRANCH_COMPLETE_ADDRESS_SRC [port]->write(0x400); 537 // in_BRANCH_COMPLETE_ADDRESS_DEST [port]->write(0x500); 538 // in_BRANCH_COMPLETE_MISS_PREDICTION [port]->write(1); 539 // in_BRANCH_COMPLETE_TAKE [port]->write(0); 540 541 // TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 542 543 // do 544 // { 545 // in_BRANCH_COMPLETE_VAL [port]->write(rand()%percent_transaction_branch_complete); 546 547 // SC_START(1); 548 // } 549 // while (not ( in_BRANCH_COMPLETE_VAL [port]->read() and 550 // out_BRANCH_COMPLETE_ACK [port]->read())); 551 // in_BRANCH_COMPLETE_VAL [port]->write(0); 552 553 uint32_t port = context; 554 530 555 if (_param->_have_port_depth) 531 in_BRANCH_COMPLETE_DEPTH [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context])); 532 in_BRANCH_COMPLETE_ADDRESS_SRC [port]->write(0x400); 533 in_BRANCH_COMPLETE_ADDRESS_DEST [port]->write(0x500); 534 in_BRANCH_COMPLETE_MISS_PREDICTION [port]->write(1); 535 in_BRANCH_COMPLETE_TAKE [port]->write(0); 536 537 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 538 539 do 540 { 541 in_BRANCH_COMPLETE_VAL [port]->write(rand()%percent_transaction_branch_complete); 542 543 SC_START(1); 544 } 545 while (not ( in_BRANCH_COMPLETE_VAL [port]->read() and 546 out_BRANCH_COMPLETE_ACK [port]->read())); 547 in_BRANCH_COMPLETE_VAL [port]->write(0); 556 in_BRANCH_EVENT_DEPTH [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context])); 557 in_BRANCH_EVENT_ADDRESS_SRC [port]->write(0x400); 558 in_BRANCH_EVENT_ADDRESS_DEST [port]->write(0x500); 559 in_BRANCH_EVENT_ADDRESS_DEST_VAL [port]->write(0); 560 561 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 562 563 do 564 { 565 in_BRANCH_EVENT_VAL [port]->write(rand()%percent_transaction_branch_event); 566 567 SC_START(1); 568 } 569 while (not ( in_BRANCH_EVENT_VAL [port]->read() and 570 out_BRANCH_EVENT_ACK [port]->read())); 571 in_BRANCH_EVENT_VAL [port]->write(0); 548 572 549 573 LABEL("miss (wait end)"); … … 595 619 in_NB_INST_COMMIT_MEM [context]->write(1); 596 620 597 uint32_t port = rand()%_param->_nb_inst_branch_complete; 598 599 in_BRANCH_COMPLETE_CONTEXT_ID [port]->write(context); 600 if (_param->_have_port_depth) 601 in_BRANCH_COMPLETE_DEPTH [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context])); 602 in_BRANCH_COMPLETE_ADDRESS_SRC [port]->write(0x600); 603 in_BRANCH_COMPLETE_ADDRESS_DEST [port]->write(0x700); 604 in_BRANCH_COMPLETE_MISS_PREDICTION [port]->write(1); 605 in_BRANCH_COMPLETE_TAKE [port]->write(1); 606 607 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 608 609 do 610 { 611 in_BRANCH_COMPLETE_VAL [port]->write(rand()%percent_transaction_branch_complete); 612 613 SC_START(1); 614 } 615 while (not ( in_BRANCH_COMPLETE_VAL [port]->read() and 616 out_BRANCH_COMPLETE_ACK [port]->read())); 617 in_BRANCH_COMPLETE_VAL [port]->write(0); 621 // uint32_t port = rand()%_param->_nb_inst_branch_complete; 622 623 // in_BRANCH_COMPLETE_CONTEXT_ID [port]->write(context); 624 // if (_param->_have_port_depth) 625 // in_BRANCH_COMPLETE_DEPTH [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context])); 626 // in_BRANCH_COMPLETE_ADDRESS_SRC [port]->write(0x600); 627 // in_BRANCH_COMPLETE_ADDRESS_DEST [port]->write(0x700); 628 // in_BRANCH_COMPLETE_MISS_PREDICTION [port]->write(1); 629 // in_BRANCH_COMPLETE_TAKE [port]->write(1); 630 631 // TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 632 633 // do 634 // { 635 // in_BRANCH_COMPLETE_VAL [port]->write(rand()%percent_transaction_branch_complete); 636 637 // SC_START(1); 638 // } 639 // while (not ( in_BRANCH_COMPLETE_VAL [port]->read() and 640 // out_BRANCH_COMPLETE_ACK [port]->read())); 641 // in_BRANCH_COMPLETE_VAL [port]->write(0); 642 643 uint32_t port = context; 644 645 in_BRANCH_EVENT_DEPTH [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context])); 646 in_BRANCH_EVENT_ADDRESS_SRC [port]->write(0x600); 647 in_BRANCH_EVENT_ADDRESS_DEST [port]->write(0x700); 648 in_BRANCH_EVENT_ADDRESS_DEST_VAL [port]->write(1); 649 650 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 651 652 do 653 { 654 in_BRANCH_EVENT_VAL [port]->write(rand()%percent_transaction_branch_event); 655 656 SC_START(1); 657 } 658 while (not ( in_BRANCH_EVENT_VAL [port]->read() and 659 out_BRANCH_EVENT_ACK [port]->read())); 660 in_BRANCH_EVENT_VAL [port]->write(0); 618 661 619 662 LABEL("miss (wait end)"); … … 1238 1281 DELETE1_SC_SIGNAL(out_BRANCH_EVENT_ACK ,_param->_nb_context); 1239 1282 //DELETE1_SC_SIGNAL( in_BRANCH_EVENT_CONTEXT_ID ,_param->_nb_context); 1240 //DELETE1_SC_SIGNAL( in_BRANCH_EVENT_DEPTH ,_param->_nb_context);1283 DELETE1_SC_SIGNAL( in_BRANCH_EVENT_DEPTH ,_param->_nb_context); 1241 1284 //DELETE1_SC_SIGNAL( in_BRANCH_EVENT_MISS_PREDICTION ,_param->_nb_context); 1242 1285 DELETE1_SC_SIGNAL( in_BRANCH_EVENT_ADDRESS_SRC ,_param->_nb_context); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Context_State.h
r97 r98 67 67 public : SC_OUT(Tcontrol_t ) ** out_BRANCH_EVENT_ACK ;//[nb_context] 68 68 //public : SC_IN (Tcontext_t ) ** in_BRANCH_EVENT_CONTEXT_ID ;//[nb_context] 69 //public : SC_IN (Tdepth_t ) ** in_BRANCH_EVENT_DEPTH ;//[nb_context]70 //public : SC_IN (Tcontrol_t ) ** in_BRANCH_EVENT_MISS_PREDICTION ;//[nb_context] 69 public : SC_IN (Tdepth_t ) ** in_BRANCH_EVENT_DEPTH ;//[nb_context] 70 //public : SC_IN (Tcontrol_t ) ** in_BRANCH_EVENT_MISS_PREDICTION ;//[nb_context]// always 71 71 public : SC_IN (Taddress_t ) ** in_BRANCH_EVENT_ADDRESS_SRC ;//[nb_context] 72 public : SC_IN (Tcontrol_t ) ** in_BRANCH_EVENT_ADDRESS_DEST_VAL ;//[nb_context] 72 public : SC_IN (Tcontrol_t ) ** in_BRANCH_EVENT_ADDRESS_DEST_VAL ;//[nb_context]// take or not 73 73 public : SC_IN (Taddress_t ) ** in_BRANCH_EVENT_ADDRESS_DEST ;//[nb_context] 74 74 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Parameters.h
r88 r98 29 29 public : uint32_t * _array_size_depth ; //[nb_context] 30 30 //public : uint32_t * _size_depth ; //[nb_context] 31 //public : uint32_t _size_ address;31 //public : uint32_t _size_general_data ; 32 32 //public : uint32_t * _size_nb_inst_decod ; //[nb_decod_unit] 33 33 //public : uint32_t _size_nb_inst_commit ; … … 39 39 uint32_t nb_inst_branch_complete, 40 40 uint32_t * size_depth, 41 uint32_t size_ address,41 uint32_t size_general_data, 42 42 uint32_t * size_nb_inst_decod, 43 43 uint32_t size_nb_inst_commit, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_allocation.cpp
r97 r98 63 63 ALLOC1_VALACK_OUT(out_BRANCH_EVENT_ACK ,ACK); 64 64 // ALLOC1_SIGNAL_IN ( in_BRANCH_EVENT_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id); 65 //ALLOC1_SIGNAL_IN ( in_BRANCH_EVENT_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth);65 ALLOC1_SIGNAL_IN ( in_BRANCH_EVENT_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth); 66 66 // ALLOC1_SIGNAL_IN ( in_BRANCH_EVENT_MISS_PREDICTION ,"miss_prediction" ,Tcontrol_t ,1); 67 67 ALLOC1_SIGNAL_IN ( in_BRANCH_EVENT_ADDRESS_SRC ,"address_src" ,Taddress_t ,_param->_size_instruction_address); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_deallocation.cpp
r97 r98 31 31 DELETE1_SIGNAL(out_BRANCH_EVENT_ACK ,_param->_nb_context,1); 32 32 // DELETE1_SIGNAL( in_BRANCH_EVENT_CONTEXT_ID ,_param->_nb_context,_param->_size_context_id); 33 //DELETE1_SIGNAL( in_BRANCH_EVENT_DEPTH ,_param->_nb_context,_param->_size_depth);33 DELETE1_SIGNAL( in_BRANCH_EVENT_DEPTH ,_param->_nb_context,_param->_size_depth); 34 34 // DELETE1_SIGNAL( in_BRANCH_EVENT_MISS_PREDICTION ,_param->_nb_context,1); 35 35 DELETE1_SIGNAL( in_BRANCH_EVENT_ADDRESS_SRC ,_param->_nb_context,_param->_size_instruction_address); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_transition.cpp
r95 r98 40 40 if (PORT_READ(in_BRANCH_EVENT_VAL [i]) and internal_BRANCH_EVENT_ACK [i]) 41 41 { 42 log_printf(TRACE,Context_State,FUNCTION," * BRANCH_EVENT [%d]",i); 43 42 44 // throw ERRORMORPHEO(FUNCTION,_("Not yet implemented (Comming Soon).\n")); 43 45 44 46 context_state_t state = reg_STATE [i]; 45 47 46 Tdepth_t depth = // (_param->_have_port_depth)?PORT_READ(in_BRANCH_EVENT_DEPTH [i]): 47 0; 48 Tdepth_t depth = (_param->_have_port_depth)?PORT_READ(in_BRANCH_EVENT_DEPTH [i]):0; 48 49 Tdepth_t depth_cur = reg_EVENT_DEPTH [i]; 49 50 Tdepth_t depth_min = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [i]):0; … … 61 62 // is_valid = can modify local information 62 63 // if context_state_ok : yes 63 // if context_state_ko : test the depth, and the priority of e nvent64 // if context_state_ko : test the depth, and the priority of event 64 65 65 66 bool is_valid = ((state == CONTEXT_STATE_OK) or 66 67 (depth1< depth0) or 67 ((depth1==depth0) and (priority1> priority0)));68 ((depth1==depth0) and (priority1>=priority0))); // >= because another branch can be a miss prediction with same depth 68 69 69 70 if (is_valid) … … 76 77 //reg_EVENT_ADDRESS_EEAR [i] = 0; 77 78 reg_EVENT_ADDRESS_EEAR_VAL [i] = 0; 78 reg_EVENT_IS_DELAY_SLOT [i] = dest_val;79 reg_EVENT_IS_DELAY_SLOT [i] = 1; 79 80 reg_EVENT_IS_DS_TAKE [i] = dest_val; 80 81 reg_EVENT_DEPTH [i] = depth; … … 89 90 if (PORT_READ(in_DECOD_EVENT_VAL [i]) and internal_DECOD_EVENT_ACK [i]) 90 91 { 92 log_printf(TRACE,Context_State,FUNCTION," * DECOD_EVENT [%d]",i); 93 91 94 Tcontext_t context = (_param->_have_port_context_id )?PORT_READ(in_DECOD_EVENT_CONTEXT_ID [i]):0; 92 95 Tdepth_t depth = (_param->_have_port_depth )?PORT_READ(in_DECOD_EVENT_DEPTH [i]):0; … … 190 193 if (PORT_READ(in_COMMIT_EVENT_VAL ) and internal_COMMIT_EVENT_ACK ) 191 194 { 195 log_printf(TRACE,Context_State,FUNCTION," * COMMIT_EVENT"); 196 192 197 Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_COMMIT_EVENT_CONTEXT_ID ):0; 193 198 Tdepth_t depth = (_param->_have_port_depth )?PORT_READ(in_COMMIT_EVENT_DEPTH ):0; … … 252 257 // ------------------------------------------------------------------- 253 258 254 for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++) 255 if (PORT_READ(in_BRANCH_COMPLETE_VAL [i]) and internal_BRANCH_COMPLETE_ACK [i]) 256 { 257 if (PORT_READ(in_BRANCH_COMPLETE_MISS_PREDICTION [i])) 258 { 259 Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_BRANCH_COMPLETE_CONTEXT_ID [i]):0; 260 Tdepth_t depth = (_param->_have_port_depth )?PORT_READ(in_BRANCH_COMPLETE_DEPTH [i]):0; 261 Tdepth_t depth_cur = reg_EVENT_DEPTH [context]; 262 Tdepth_t depth_min = (_param->_have_port_depth )?PORT_READ(in_DEPTH_MIN [context]):0; 263 Tdepth_t depth_max = _param->_array_size_depth [context]; 259 // for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++) 260 // if (PORT_READ(in_BRANCH_COMPLETE_VAL [i]) and internal_BRANCH_COMPLETE_ACK [i]) 261 // { 262 // log_printf(TRACE,Context_State,FUNCTION," * BRANCH_COMPLETE [%d]",i); 263 // if (PORT_READ(in_BRANCH_COMPLETE_MISS_PREDICTION [i])) 264 // { 265 // Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_BRANCH_COMPLETE_CONTEXT_ID [i]):0; 266 // Tdepth_t depth = (_param->_have_port_depth )?PORT_READ(in_BRANCH_COMPLETE_DEPTH [i]):0; 267 // Tdepth_t depth_cur = reg_EVENT_DEPTH [context]; 268 // Tdepth_t depth_min = (_param->_have_port_depth )?PORT_READ(in_DEPTH_MIN [context]):0; 269 // Tdepth_t depth_max = _param->_array_size_depth [context]; 264 270 265 // Tdepth_t depth0 = (depth_cur>=depth_min)?(depth_cur-depth_min):((depth_cur+depth_max-depth_min));266 // Tdepth_t depth1 = (depth >=depth_min)?(depth -depth_min):((depth +depth_max-depth_min));267 Tdepth_t depth0 = (depth_cur>=depth_min)?(depth_cur):((depth_cur+depth_max));268 Tdepth_t depth1 = (depth >=depth_min)?(depth ):((depth +depth_max));271 // // Tdepth_t depth0 = (depth_cur>=depth_min)?(depth_cur-depth_min):((depth_cur+depth_max-depth_min)); 272 // // Tdepth_t depth1 = (depth >=depth_min)?(depth -depth_min):((depth +depth_max-depth_min)); 273 // Tdepth_t depth0 = (depth_cur>=depth_min)?(depth_cur):((depth_cur+depth_max)); 274 // Tdepth_t depth1 = (depth >=depth_min)?(depth ):((depth +depth_max)); 269 275 270 context_state_t state = reg_STATE [context];276 // context_state_t state = reg_STATE [context]; 271 277 272 // miss > excep > spr/sync273 uint8_t priority0 = (state == CONTEXT_STATE_KO_MISS)?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);274 uint8_t priority1 = 2; // miss278 // // miss > excep > spr/sync 279 // uint8_t priority0 = (state == CONTEXT_STATE_KO_MISS)?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0); 280 // uint8_t priority1 = 2; // miss 275 281 276 // is_valid = can modify local information277 // if context_state_ok : yes278 // if context_state_ko : test the depth, and the priority of envent282 // // is_valid = can modify local information 283 // // if context_state_ok : yes 284 // // if context_state_ko : test the depth, and the priority of envent 279 285 280 bool is_valid = ((state == CONTEXT_STATE_OK) or281 (depth1< depth0) or282 ((depth1==depth0) and (priority1>priority0)));286 // bool is_valid = ((state == CONTEXT_STATE_OK) or 287 // (depth1< depth0) or 288 // ((depth1==depth0) and (priority1>priority0))); 283 289 284 if (is_valid)285 {286 // commit287 Tcontrol_t take = PORT_READ(in_BRANCH_COMPLETE_TAKE [i]);288 reg_STATE [context] = CONTEXT_STATE_KO_MISS;289 reg_EVENT_ADDRESS [context] = PORT_READ(in_BRANCH_COMPLETE_ADDRESS_SRC [i])+1; //DELAY_SLOT290 reg_EVENT_ADDRESS_EPCR [context] = PORT_READ(in_BRANCH_COMPLETE_ADDRESS_DEST [i]);291 reg_EVENT_ADDRESS_EPCR_VAL [context] = take; // if not take : in sequence292 //reg_EVENT_ADDRESS_EEAR [context];293 reg_EVENT_ADDRESS_EEAR_VAL [context] = 0;294 reg_EVENT_IS_DELAY_SLOT [context] = take;295 reg_EVENT_IS_DS_TAKE [context] = take;296 reg_EVENT_DEPTH [context] = depth;297 }298 }299 }290 // if (is_valid) 291 // { 292 // // commit 293 // Tcontrol_t take = PORT_READ(in_BRANCH_COMPLETE_TAKE [i]); 294 // reg_STATE [context] = CONTEXT_STATE_KO_MISS; 295 // reg_EVENT_ADDRESS [context] = PORT_READ(in_BRANCH_COMPLETE_ADDRESS_SRC [i])+1; //DELAY_SLOT 296 // reg_EVENT_ADDRESS_EPCR [context] = PORT_READ(in_BRANCH_COMPLETE_ADDRESS_DEST [i]); 297 // reg_EVENT_ADDRESS_EPCR_VAL [context] = take; // if not take : in sequence 298 // //reg_EVENT_ADDRESS_EEAR [context]; 299 // reg_EVENT_ADDRESS_EEAR_VAL [context] = 0; 300 // reg_EVENT_IS_DELAY_SLOT [context] = take; 301 // reg_EVENT_IS_DS_TAKE [context] = take; 302 // reg_EVENT_DEPTH [context] = depth; 303 // } 304 // } 305 // } 300 306 301 307 // ------------------------------------------------------------------- … … 305 311 if (internal_EVENT_VAL [i] and PORT_READ(in_EVENT_ACK [i])) 306 312 { 313 log_printf(TRACE,Context_State,FUNCTION," * EVENT [%d]",i); 307 314 // Write pc 308 315 context_state_t state = reg_STATE [i]; … … 338 345 if (internal_SPR_EVENT_VAL [i] and PORT_READ(in_SPR_EVENT_ACK [i])) 339 346 { 347 log_printf(TRACE,Context_State,FUNCTION," * SPR_EVENT [%d]",i); 348 340 349 // Write spr 341 350 #ifdef DEBUG_TEST -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Parameters.cpp
r88 r98 23 23 uint32_t nb_inst_branch_complete, 24 24 uint32_t * size_depth, 25 uint32_t size_ address,25 uint32_t size_general_data, 26 26 uint32_t * size_nb_inst_decod, 27 27 uint32_t size_nb_inst_commit, … … 35 35 _nb_inst_branch_complete = nb_inst_branch_complete ; 36 36 _array_size_depth = size_depth ; 37 // _size_ address = size_address;37 // _size_general_data = size_general_data ; 38 38 // _size_nb_inst_decod = size_nb_inst_decod ; 39 39 // _size_nb_inst_commit = size_nb_inst_commit ; … … 46 46 _size_context_id = log2(_nb_context); 47 47 _size_depth = log2(max<uint32_t>(size_depth,_nb_context)); 48 _size_instruction_address = size_address; 48 _size_general_data = size_general_data; 49 _size_instruction_address = size_general_data-2; 49 50 _size_nb_inst_decod = max<uint32_t>(size_nb_inst_decod,_nb_decod_unit); 50 51 _size_nb_inst_commit = size_nb_inst_commit; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_transition.cpp
r88 r98 145 145 // Because, is not ds take, can continue in sequence 146 146 147 #ifdef DEBUG_TEST148 if (PORT_READ(in_EVENT_ADDRESS_NEXT_VAL) and not PORT_READ(in_EVENT_IS_DS_TAKE))149 throw ERRORMORPHEO(FUNCTION,_("Event : address_next_next_val but next is not a ds take"));150 #endif147 // #ifdef DEBUG_TEST 148 // if (PORT_READ(in_EVENT_ADDRESS_NEXT_VAL) and not PORT_READ(in_EVENT_IS_DS_TAKE)) 149 // throw ERRORMORPHEO(FUNCTION,_("Event : address_next_next_val but next is not a ds take")); 150 // #endif 151 151 152 152 #ifdef STATISTICS -
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_decod.cpp
r81 r98 22 22 void Branch_Target_Buffer_Glue::genMealy_decod (void) 23 23 { 24 log_printf(FUNC,Branch_Target_Buffer_Glue,FUNCTION,"Begin"); 24 log_begin(Branch_Target_Buffer_Glue,FUNCTION); 25 log_function(Branch_Target_Buffer_Glue,FUNCTION,_name.c_str()); 25 26 26 27 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 27 28 { 29 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * DECOD [%d]",i); 28 30 Tcontrol_t val = PORT_READ(in_DECOD_VAL [i]); 29 31 Tcontrol_t register_ack = PORT_READ(in_DECOD_REGISTER_ACK [i]); 30 32 Tcontrol_t victim_ack = (_param->_have_port_victim)?PORT_READ(in_DECOD_VICTIM_ACK [i]):true; 31 33 32 PORT_WRITE(out_DECOD_ACK [i], register_ack and victim_ack); 33 PORT_WRITE(out_DECOD_REGISTER_VAL [i], val and victim_ack); 34 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * val : %d", val ); 35 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * register_ack : %d", register_ack); 36 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * victim_ack : %d", victim_ack ); 34 37 38 PORT_WRITE(out_DECOD_ACK [i], ( 39 // val and 40 register_ack and 41 victim_ack 42 )); 43 PORT_WRITE(out_DECOD_REGISTER_VAL [i], ( 44 val and 45 // register_ack and 46 victim_ack 47 )); 35 48 if (_param->_have_port_victim) 36 49 { 37 PORT_WRITE(out_DECOD_VICTIM_VAL [i], val and register_ack ); 50 PORT_WRITE(out_DECOD_VICTIM_VAL [i], ( 51 val and 52 register_ack // and 53 // victim_ack 54 )); 38 55 if (not _param->_is_full_associative) 39 PORT_WRITE(out_DECOD_VICTIM_ADDRESS [i], (PORT_READ(in_DECOD_ADDRESS_SRC [i]) >> _param->_shift_bank)&_param->_mask_bank); 56 { 57 Tgeneral_data_t address_src = PORT_READ(in_DECOD_ADDRESS_SRC [i]); 58 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * address_src : %.8x", address_src); 59 60 PORT_WRITE(out_DECOD_VICTIM_ADDRESS [i], (address_src >> _param->_shift_bank)&_param->_mask_bank); 61 } 40 62 } 41 63 } 42 64 43 log_ printf(FUNC,Branch_Target_Buffer_Glue,FUNCTION,"End");65 log_end(Branch_Target_Buffer_Glue,FUNCTION); 44 66 }; 45 67 -
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
r81 r98 22 22 void Branch_Target_Buffer_Glue::genMealy_predict (void) 23 23 { 24 log_printf(FUNC,Branch_Target_Buffer_Glue,FUNCTION,"Begin"); 24 log_begin(Branch_Target_Buffer_Glue,FUNCTION); 25 log_function(Branch_Target_Buffer_Glue,FUNCTION,_name.c_str()); 25 26 26 27 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 27 28 { 28 Tptr_t index = (_param->_have_port_victim)?PORT_READ(in_PREDICT_SORT_INDEX [i]):0; 29 Tcontrol_t hit = PORT_READ(in_PREDICT_REGISTER_HIT [i][index]); 30 Tgeneral_data_t addr = PORT_READ(in_PREDICT_REGISTER_ADDRESS_SRC [i][index]); 29 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * PREDICT [%d]",i); 30 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]); 32 Tgeneral_data_t address_src = PORT_READ(in_PREDICT_REGISTER_ADDRESS_SRC [i][index]); 33 34 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * index : %d" ,index ); 35 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * hit : %d" ,hit ); 36 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * address_src : %.8x",address_src); 31 37 32 38 // Multiplexor 33 39 PORT_WRITE(out_PREDICT_HIT [i],hit); 34 PORT_WRITE(out_PREDICT_ADDRESS_SRC [i],addr );40 PORT_WRITE(out_PREDICT_ADDRESS_SRC [i],address_src); 35 41 PORT_WRITE(out_PREDICT_ADDRESS_DEST [i],PORT_READ(in_PREDICT_REGISTER_ADDRESS_DEST [i][index])); 36 42 PORT_WRITE(out_PREDICT_CONDITION [i],PORT_READ(in_PREDICT_REGISTER_CONDITION [i][index])); … … 42 48 Tcontrol_t sort_val = (_param->_have_port_victim)?PORT_READ(in_PREDICT_SORT_VAL [i]):true; 43 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 ); 44 55 45 PORT_WRITE(out_PREDICT_ACK [i], register_ack and sort_val and victim_ack); 46 PORT_WRITE(out_PREDICT_REGISTER_VAL [i], val and sort_val and victim_ack); 56 PORT_WRITE(out_PREDICT_ACK [i], ( 57 // val and 58 register_ack and 59 sort_val and 60 victim_ack 61 )); 62 PORT_WRITE(out_PREDICT_REGISTER_VAL [i], ( 63 val and 64 // register_ack and 65 sort_val and 66 victim_ack 67 )); 47 68 48 69 if (_param->_have_port_victim) 49 70 { 50 PORT_WRITE(out_PREDICT_VICTIM_VAL [i], val and register_ack and sort_val ); 71 PORT_WRITE(out_PREDICT_VICTIM_VAL [i], ( 72 val and 73 register_ack and 74 sort_val // and 75 // victim_ack 76 )); 51 77 PORT_WRITE(out_PREDICT_VICTIM_HIT [i], hit); 52 78 if (not _param->_is_full_associative) 53 PORT_WRITE(out_PREDICT_VICTIM_ADDRESS [i], (addr >> _param->_shift_bank)&_param->_mask_bank);79 PORT_WRITE(out_PREDICT_VICTIM_ADDRESS [i], (address_src >> _param->_shift_bank)&_param->_mask_bank); 54 80 PORT_WRITE(out_PREDICT_VICTIM_INDEX [i], index); 55 81 } 56 82 } 57 83 58 log_ printf(FUNC,Branch_Target_Buffer_Glue,FUNCTION,"End");84 log_end(Branch_Target_Buffer_Glue,FUNCTION); 59 85 }; 60 86 -
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_update.cpp
r81 r98 22 22 void Branch_Target_Buffer_Glue::genMealy_update (void) 23 23 { 24 log_printf(FUNC,Branch_Target_Buffer_Glue,FUNCTION,"Begin"); 24 log_begin(Branch_Target_Buffer_Glue,FUNCTION); 25 log_function(Branch_Target_Buffer_Glue,FUNCTION,_name.c_str()); 25 26 26 27 for (uint32_t i=0; i<_param->_nb_inst_update; i++) 27 28 { 28 Tcontrol_t val = PORT_READ(in_UPDATE_VAL [i]); 29 Tcontrol_t register_ack = PORT_READ(in_UPDATE_REGISTER_ACK [i]); 30 Tcontrol_t victim_ack = (_param->_have_port_victim)?PORT_READ(in_UPDATE_VICTIM_ACK [i]):true; 29 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * UPDATE [%d]",i); 30 31 Tcontrol_t val = PORT_READ(in_UPDATE_VAL [i]); 32 Tcontrol_t register_ack = PORT_READ(in_UPDATE_REGISTER_ACK [i]); 33 Tcontrol_t victim_ack = (_param->_have_port_victim)?PORT_READ(in_UPDATE_VICTIM_ACK [i]):true; 34 35 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * val : %d",val ); 36 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * register_ack : %d",register_ack); 37 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * victim_ack : %d",victim_ack ); 31 38 32 39 PORT_WRITE(out_UPDATE_ACK [i], register_ack and victim_ack); … … 37 44 PORT_WRITE(out_UPDATE_VICTIM_VAL [i], val and register_ack ); 38 45 if (not _param->_is_full_associative) 39 PORT_WRITE(out_UPDATE_VICTIM_ADDRESS [i], (PORT_READ(in_UPDATE_ADDRESS_SRC [i]) >> _param->_shift_bank)&_param->_mask_bank); 46 { 47 Tgeneral_data_t address_src = PORT_READ(in_UPDATE_ADDRESS_SRC [i]); 48 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * address_src : %.8x",address_src); 49 50 PORT_WRITE(out_UPDATE_VICTIM_ADDRESS [i], (address_src >> _param->_shift_bank)&_param->_mask_bank); 51 } 40 52 } 41 53 } 42 54 43 log_ printf(FUNC,Branch_Target_Buffer_Glue,FUNCTION,"End");55 log_end(Branch_Target_Buffer_Glue,FUNCTION); 44 56 }; 45 57 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Parameters.cpp
r88 r98 48 48 49 49 _mask_bank = gen_mask<Tgeneral_data_t> (_size_victim_address); 50 _shift_bank = log2(max_nb_instruction) +2;50 _shift_bank = log2(max_nb_instruction); 51 51 52 52 test(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Parameters.cpp
r88 r98 60 60 _mask_offset = gen_mask<Tgeneral_data_t> (size_offset); 61 61 _mask_bank = gen_mask<Tgeneral_data_t> (size_bank ); 62 _shift_offset = 2;62 _shift_offset = 0; 63 63 _shift_bank = _shift_offset+size_offset; 64 64 _shift_tag = _shift_bank +size_bank ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_allocation.cpp
r88 r98 270 270 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 271 271 272 #ifndef REGISTER_INIT273 if (usage_is_set(_usage,USE_SYSTEMC))274 {275 reg_PREDICT_PRIORITY = 0;276 reg_DECOD_PRIORITY = 0;277 }278 #endif279 280 272 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 281 273 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_decod.cpp
r88 r98 25 25 log_function(Prediction_unit_Glue,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET)) 28 { 27 29 // Init 28 30 uint32_t decod_unit = reg_DECOD_PRIORITY; … … 262 264 else 263 265 PORT_WRITE(out_DECOD_ACK [i][j], ack[j]); 264 266 } 265 267 log_end(Prediction_unit_Glue,FUNCTION); 266 268 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_predict.cpp
r88 r98 24 24 log_begin(Prediction_unit_Glue,FUNCTION); 25 25 log_function(Prediction_unit_Glue,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET)) 28 { 29 30 // Init 27 31 Tcontrol_t ack [_param->_nb_context]; 28 32 for (uint32_t i=0; i<_param->_nb_context; i++) 29 { 30 ack [i] = 0; 31 32 // if (_param->_have_port_depth) 33 // { 34 // PORT_WRITE(out_DEPTH_TAIL [i],PORT_READ(in_DEPTH_UPT_TAIL [i])); 35 // } 36 // PORT_WRITE(out_DEPTH_NB_BRANCH [i],PORT_READ(in_DEPTH_UPT_NB_BRANCH [i])); 37 } 33 ack [i] = 0; 38 34 39 35 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) … … 41 37 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * PREDICT [%d]",i); 42 38 43 Tcontrol_t btb_val; 44 Tcontrol_t dir_val; 45 Tcontrol_t ras_val; 46 Tcontrol_t upt_val; 47 48 Tcontext_t context = (reg_PREDICT_PRIORITY+i)%_param->_nb_context; 39 Tcontrol_t btb_val = false; 40 Tcontrol_t dir_val = false; 41 Tcontrol_t ras_val = false; 42 Tcontrol_t upt_val = false; 43 44 Tcontrol_t btb_ack = PORT_READ(in_PREDICT_BTB_ACK [i]); 45 Tcontrol_t dir_ack = PORT_READ(in_PREDICT_DIR_ACK [i]); 46 Tcontrol_t ras_ack = PORT_READ(in_PREDICT_RAS_ACK [i]); 47 Tcontrol_t upt_ack = PORT_READ(in_PREDICT_UPT_ACK [i]); 48 49 Tcontext_t context = (reg_PREDICT_PRIORITY+i)%_param->_nb_context; // priority 49 50 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * context : %d",context); 50 51 51 52 ack [context] = 1; 52 53 53 54 if (PORT_READ(in_PREDICT_VAL[context]) == 0) 54 55 { 55 56 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * not valid ..."); 56 57 57 btb_val = false;58 dir_val = false;59 ras_val = false;60 upt_val = false;58 // btb_val = false; 59 // dir_val = false; 60 // ras_val = false; 61 // upt_val = false; 61 62 } 62 63 else … … 67 68 Taddress_t pc_current = PORT_READ(in_PREDICT_PC_CURRENT [context]); 68 69 Tcontrol_t pc_current_is_ds_take = PORT_READ(in_PREDICT_PC_CURRENT_IS_DS_TAKE [context]); 70 71 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * pc_previous : 0x%.8x",pc_previous ); 72 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * pc_current : 0x%.8x",pc_current ); 73 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * pc_current_is_ds_take : %d" ,pc_current_is_ds_take); 69 74 70 75 Taddress_t pc_next ; … … 75 80 76 81 // STEP (1) - Compute the address source 82 // if pc_current is a ds take, then pc_previous is a branchement 77 83 Taddress_t address = (pc_current_is_ds_take)?pc_previous:pc_current; 78 84 Taddress_t address_lsb = pc_current%_param->_nb_instruction [context]; //if pc_current_is_ds_take, then pc_current%_param->_nb_instruction [context] == 0 79 85 Taddress_t address_msb; 80 86 81 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * address : 0x%x",address); 87 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * address : 0x%.8x",address); 88 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * address_lsb : %d" ,address_lsb); 82 89 83 90 // STEP (2) - Test if branch (access at branch_target_buffer) 84 91 btb_val = true; 85 ack [context] &= PORT_READ(in_PREDICT_BTB_ACK [i]);86 92 87 93 if (_param->_have_port_context_id) 88 94 PORT_WRITE(out_PREDICT_BTB_CONTEXT_ID [i],context); 89 95 PORT_WRITE(out_PREDICT_BTB_ADDRESS [i],address); 96 97 ack [context] &= btb_ack; 98 99 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * btb_ack : %d" ,btb_ack); 100 101 // BTB_ack = 0 ? 102 if (not btb_ack) 103 continue; 90 104 91 105 // special case : … … 95 109 Tcontrol_t is_accurate = PORT_READ(in_PREDICT_BTB_IS_ACCURATE [i]) and not (pc_current_is_ds_take and not hit); 96 110 111 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * hit : %d" ,hit); 112 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * is_accurate : %d" ,is_accurate); 113 97 114 // STEP (3) : Test if have branch in the packet 98 115 if (hit == 1) 99 116 { 100 117 // STEP (3a) : branch - test condition 101 102 118 bool use_dir = false; 103 119 bool use_ras = false; 104 120 bool use_upt = false; 105 121 106 Tbranch_condition_t cond 122 Tbranch_condition_t condition = PORT_READ(in_PREDICT_BTB_CONDITION [i]); 107 123 Taddress_t address_src = PORT_READ(in_PREDICT_BTB_ADDRESS_SRC [i]); 108 124 Taddress_t address_dest = PORT_READ(in_PREDICT_BTB_ADDRESS_DEST [i]); 109 Tcontrol_t push ;125 Tcontrol_t push ; 110 126 Tcontrol_t direction; 111 127 112 switch (cond) 128 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * condition : %s" ,toString(condition).c_str()); 129 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * address_src : 0x%.8x",address_src); 130 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * address_dest : 0x%.8x",address_dest); 131 132 switch (condition) 113 133 { 114 134 case BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK : // l.j … … 188 208 if (use_dir) 189 209 { 190 ack[context] &= PORT_READ(in_PREDICT_DIR_ACK [i]);210 ack[context] &= dir_ack; 191 211 PORT_WRITE(out_PREDICT_DIR_ADDRESS_SRC [i], address_src); 192 212 PORT_WRITE(out_PREDICT_DIR_STATIC [i], address_dest<address_src); // if destination is previous : the static direction is take … … 196 216 if (use_ras) 197 217 { 198 ack[context] &= PORT_READ(in_PREDICT_RAS_ACK [i]);218 ack[context] &= ras_ack; 199 219 if (_param->_have_port_context_id) 200 220 PORT_WRITE(out_PREDICT_RAS_CONTEXT_ID [i], context); … … 207 227 if (use_upt) 208 228 { 209 ack[context] &= PORT_READ(in_PREDICT_UPT_ACK [i]);229 ack[context] &= upt_ack; 210 230 231 if (_param->_have_port_context_id) 211 232 PORT_WRITE(out_PREDICT_UPT_CONTEXT_ID [i],context); 212 233 PORT_WRITE(out_PREDICT_UPT_BTB_ADDRESS_SRC [i],address_src); 213 234 PORT_WRITE(out_PREDICT_UPT_BTB_ADDRESS_DEST [i],address_dest); 214 PORT_WRITE(out_PREDICT_UPT_BTB_CONDITION [i],cond );235 PORT_WRITE(out_PREDICT_UPT_BTB_CONDITION [i],condition); 215 236 PORT_WRITE(out_PREDICT_UPT_BTB_LAST_TAKE [i],direction); 216 237 PORT_WRITE(out_PREDICT_UPT_BTB_IS_ACCURATE [i],is_accurate); … … 225 246 // * use_ras and ras_ack 226 247 // * use_upt and upt_ack 227 // ack [context] = (PORT_READ(in_PREDICT_BTB_ACK [i]) and 228 // (use_dir and PORT_READ(in_PREDICT_DIR_ACK [i])) and 229 // (use_ras and PORT_READ(in_PREDICT_RAS_ACK [i])) and 230 // (use_upt and PORT_READ(in_PREDICT_UPT_ACK [i]))); 231 232 dir_val = (use_dir and 233 PORT_READ(in_PREDICT_BTB_ACK [i]) and 234 (not use_ras or (use_ras and PORT_READ(in_PREDICT_RAS_ACK [i]))) and 235 (not use_upt or (use_upt and PORT_READ(in_PREDICT_UPT_ACK [i])))); 236 237 ras_val = (use_ras and 238 PORT_READ(in_PREDICT_BTB_ACK [i]) and 239 (not use_dir or (use_dir and PORT_READ(in_PREDICT_DIR_ACK [i]))) and 240 (not use_upt or (use_upt and PORT_READ(in_PREDICT_UPT_ACK [i])))); 241 242 upt_val = (use_upt and 243 PORT_READ(in_PREDICT_BTB_ACK [i]) and 244 (not use_dir or (use_dir and PORT_READ(in_PREDICT_DIR_ACK [i]))) and 245 (not use_ras or (use_ras and PORT_READ(in_PREDICT_RAS_ACK [i])))); 248 // ack [context] = (btb_ack and 249 // (use_dir and dir_ack) and 250 // (use_ras and ras_ack) and 251 // (use_upt and upt_ack)); 252 253 dir_val = (btb_ack and 254 use_dir and 255 // use_ras and 256 // use_upt and 257 // (not use_dir or (use_dir and dir_ack)) and 258 (not use_ras or (use_ras and ras_ack)) and 259 (not use_upt or (use_upt and upt_ack))); 260 261 ras_val = (btb_ack and 262 // use_dir and 263 use_ras and 264 // use_upt and 265 (not use_dir or (use_dir and dir_ack)) and 266 // (not use_ras or (use_ras and ras_ack)) and 267 (not use_upt or (use_upt and upt_ack))); 268 269 upt_val = (btb_ack and 270 // use_dir and 271 // use_ras and 272 use_upt and 273 (not use_dir or (use_dir and dir_ack)) and 274 (not use_ras or (use_ras and ras_ack))// and 275 // (not use_upt or (use_upt and upt_ack)) 276 ); 246 277 247 278 // pc_next - is previously computed … … 252 283 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * address_src : 0x%x",address_src); 253 284 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * address_src_lsb : %d",address_src_lsb); 285 254 286 if (address_src_lsb == (_param->_nb_instruction [context]-1)) 255 287 { … … 288 320 PORT_WRITE(out_PREDICT_PC_NEXT_IS_DS_TAKE [context] , pc_next_is_ds_take ); 289 321 322 Taddress_t address_limit_min = address_lsb; 323 Taddress_t address_limit_max = ((pc_current_is_ds_take)?(address_lsb+1):address_msb); 324 290 325 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * instruction enable :"); 291 326 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * nb_inst : %d",_param->_nb_instruction [context]); 292 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * [0:%d[ = 0" ,address_lsb);293 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * [%d:%d[ = 1",address_l sb,((pc_current_is_ds_take)?1:address_msb));294 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * [%d:%d[ = 0", ((pc_current_is_ds_take)?1:address_msb),_param->_nb_instruction [context]);295 296 for (uint32_t j=0; j<address_l sb; j++)327 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * [0:%d[ = 0" ,address_limit_min); 328 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * [%d:%d[ = 1",address_limit_min,address_limit_max); 329 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * [%d:%d[ = 0",address_limit_max,_param->_nb_instruction [context]); 330 331 for (uint32_t j=0; j<address_limit_min; j++) 297 332 PORT_WRITE(out_PREDICT_INSTRUCTION_ENABLE [context][j], 0); // Before the address : not valid 298 for (uint32_t j=address_l sb; j<((pc_current_is_ds_take)?1:address_msb); j++)333 for (uint32_t j=address_limit_min; j<address_limit_max; j++) 299 334 PORT_WRITE(out_PREDICT_INSTRUCTION_ENABLE [context][j], 1); // Vald packet 300 for (uint32_t j= ((pc_current_is_ds_take)?1:address_msb); j<_param->_nb_instruction [context]; j++)335 for (uint32_t j=address_limit_max; j<_param->_nb_instruction [context]; j++) 301 336 PORT_WRITE(out_PREDICT_INSTRUCTION_ENABLE [context][j], 0); // After last address (branch) : not valid 302 337 if (_param->_have_port_inst_ifetch_ptr) … … 316 351 for (uint32_t i=0; i<_param->_nb_context; i++) 317 352 PORT_WRITE(out_PREDICT_ACK[i],ack[i]); 353 } 318 354 319 355 log_end(Prediction_unit_Glue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_update.cpp
r88 r98 23 23 { 24 24 log_begin(Prediction_unit_Glue,FUNCTION); 25 log_function(Prediction_unit_Glue,FUNCTION,_name.c_str()); 25 26 26 // for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++) 27 // { 28 // Tcontrol_t btb_ack = PORT_READ(in_UPDATE_BTB_ACK [i]); 29 // Tcontrol_t dir_ack = PORT_READ(in_UPDATE_DIR_ACK [i]); 30 // Tcontrol_t ras_ack = PORT_READ(in_UPDATE_RAS_ACK [i]); 31 // Tcontrol_t upt_val = PORT_READ(in_UPDATE_UPT_VAL [i]); 27 for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++) 28 { 29 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * UPDATE [%d]",i); 30 Tcontrol_t btb_ack = PORT_READ(in_UPDATE_BTB_ACK [i]); 31 Tcontrol_t dir_ack = PORT_READ(in_UPDATE_DIR_ACK [i]); 32 Tcontrol_t ras_ack = PORT_READ(in_UPDATE_RAS_ACK [i]); 33 Tcontrol_t upt_val = PORT_READ(in_UPDATE_UPT_VAL [i]); 32 34 33 // Tcontrol_t need_btb= PORT_READ(in_UPDATE_UPT_BTB_VAL [i]);34 // Tcontrol_t need_dir= PORT_READ(in_UPDATE_UPT_DIR_VAL [i]);35 // Tcontrol_t need_ras= PORT_READ(in_UPDATE_UPT_RAS_VAL [i]);35 Tcontrol_t upt_btb_val = PORT_READ(in_UPDATE_UPT_BTB_VAL [i]); 36 Tcontrol_t upt_dir_val = PORT_READ(in_UPDATE_UPT_DIR_VAL [i]); 37 Tcontrol_t upt_ras_val = PORT_READ(in_UPDATE_UPT_RAS_VAL [i]); 36 38 37 // PORT_WRITE(out_UPDATE_BTB_VAL [i], (upt_val and need_btb and 38 // (not need_dir or (need_dir and dir_ack)) and 39 // (not need_ras or (need_ras and ras_ack)))); 39 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * upt_val : %d",upt_val); 40 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * upt_btb_val - btb_ack : %d - %d",upt_btb_val, btb_ack); 41 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * upt_dir_val - dir_ack : %d - %d",upt_dir_val, dir_ack); 42 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * upt_ras_val - ras_ack : %d - %d",upt_ras_val, ras_ack); 40 43 41 // PORT_WRITE(out_UPDATE_DIR_VAL [i], (upt_val and need_dir and 42 // (not need_btb or (need_btb and btb_ack)) and 43 // (not need_ras or (need_ras and ras_ack)))); 44 Tcontrol_t btb_val = (upt_val and 45 upt_btb_val and 46 // upt_dir_val and 47 // upt_ras_val and 48 // (not upt_btb_val or (upt_btb_val and btb_ack)) and 49 (not upt_dir_val or (upt_dir_val and dir_ack)) and 50 (not upt_ras_val or (upt_ras_val and ras_ack)) 51 ); 44 52 45 // PORT_WRITE(out_UPDATE_RAS_VAL [i], (upt_val and need_ras and 46 // (not need_btb or (need_btb and btb_ack)) and 47 // (not need_dir or (need_dir and dir_ack)))); 53 Tcontrol_t dir_val = (upt_val and 54 // upt_btb_val and 55 upt_dir_val and 56 // upt_ras_val and 57 (not upt_btb_val or (upt_btb_val and btb_ack)) and 58 // (not upt_dir_val or (upt_dir_val and dir_ack)) and 59 (not upt_ras_val or (upt_ras_val and ras_ack)) 60 ); 48 61 49 // PORT_WRITE(out_UPDATE_UPT_ACK [i], ((not need_btb or (need_btb and btb_ack)) and 50 // (not need_dir or (need_dir and dir_ack)) and 51 // (not need_ras or (need_ras and ras_ack)))); 52 // } 62 Tcontrol_t ras_val = (upt_val and 63 // upt_btb_val and 64 // upt_dir_val and 65 upt_ras_val and 66 (not upt_btb_val or (upt_btb_val and btb_ack)) and 67 (not upt_dir_val or (upt_dir_val and dir_ack))// and 68 // (not upt_ras_val or (upt_ras_val and ras_ack)) 69 ); 70 71 Tcontrol_t upt_ack = ( 72 // upt_val and 73 // upt_btb_val and 74 // upt_dir_val and 75 // upt_ras_val and 76 (not upt_btb_val or (upt_btb_val and btb_ack)) and 77 (not upt_dir_val or (upt_dir_val and dir_ack)) and 78 (not upt_ras_val or (upt_ras_val and ras_ack)) 79 ); 80 81 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * btb_val : %d",btb_val); 82 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * dir_val : %d",dir_val); 83 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * ras_val : %d",ras_val); 84 85 PORT_WRITE(out_UPDATE_BTB_VAL [i], btb_val); 86 PORT_WRITE(out_UPDATE_DIR_VAL [i], dir_val); 87 PORT_WRITE(out_UPDATE_RAS_VAL [i], ras_val); 88 PORT_WRITE(out_UPDATE_UPT_ACK [i], upt_ack); 89 } 53 90 54 91 log_end(Prediction_unit_Glue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/test.cpp
r97 r98 79 79 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_DEPTH ," in_BRANCH_COMPLETE_DEPTH ",Tdepth_t ,_param->_nb_inst_branch_complete); 80 80 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_ADDRESS ," in_BRANCH_COMPLETE_ADDRESS ",Taddress_t ,_param->_nb_inst_branch_complete); 81 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_ FLAG ," in_BRANCH_COMPLETE_FLAG",Tcontrol_t ,_param->_nb_inst_branch_complete);81 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_NO_SEQUENCE ," in_BRANCH_COMPLETE_NO_SEQUENCE ",Tcontrol_t ,_param->_nb_inst_branch_complete); 82 82 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION ,"out_BRANCH_COMPLETE_MISS_PREDICTION ",Tcontrol_t ,_param->_nb_inst_branch_complete); 83 83 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE ,"out_BRANCH_COMPLETE_TAKE ",Tcontrol_t ,_param->_nb_inst_branch_complete); … … 88 88 ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_ACK ," in_BRANCH_EVENT_ACK ",Tcontrol_t ,_param->_nb_context); 89 89 //ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID ,"out_BRANCH_EVENT_CONTEXT_ID ",Tcontext_t ,_param->_nb_context); 90 //ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_DEPTH ,"out_BRANCH_EVENT_DEPTH ",Tdepth_t ,_param->_nb_context);90 ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_DEPTH ,"out_BRANCH_EVENT_DEPTH ",Tdepth_t ,_param->_nb_context); 91 91 //ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION ,"out_BRANCH_EVENT_MISS_PREDICTION ",Tcontrol_t ,_param->_nb_context); 92 92 ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC ,"out_BRANCH_EVENT_ADDRESS_SRC ",Taddress_t ,_param->_nb_context); … … 145 145 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete); 146 146 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_branch_complete); 147 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_ FLAG,_param->_nb_inst_branch_complete);147 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_NO_SEQUENCE ,_param->_nb_inst_branch_complete); 148 148 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_MISS_PREDICTION ,_param->_nb_inst_branch_complete); 149 149 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete); … … 155 155 //if (_param->_have_port_context_id) 156 156 //INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_CONTEXT_ID ,_param->_nb_context); 157 //INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_DEPTH ,_param->_nb_context); 157 if (_param->_have_port_depth) 158 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_DEPTH ,_param->_nb_context); 158 159 //INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_MISS_PREDICTION ,_param->_nb_context); 159 160 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_ADDRESS_SRC ,_param->_nb_context); … … 351 352 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete); 352 353 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_branch_complete); 353 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_ FLAG,_param->_nb_inst_branch_complete);354 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_NO_SEQUENCE ,_param->_nb_inst_branch_complete); 354 355 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete); 355 356 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete); … … 360 361 DELETE1_SC_SIGNAL( in_BRANCH_EVENT_ACK ,_param->_nb_context); 361 362 //DELETE1_SC_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID ,_param->_nb_context); 362 //DELETE1_SC_SIGNAL(out_BRANCH_EVENT_DEPTH ,_param->_nb_context);363 DELETE1_SC_SIGNAL(out_BRANCH_EVENT_DEPTH ,_param->_nb_context); 363 364 //DELETE1_SC_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION ,_param->_nb_context); 364 365 DELETE1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC ,_param->_nb_context); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/test.cpp
r97 r98 27 27 Tcontrol_t take_good ; 28 28 Tcontrol_t flag ; 29 Tcontrol_t no_sequence ; 29 30 Tcontrol_t is_accurate ; 30 31 Thistory_t history ; … … 104 105 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_DEPTH ," in_BRANCH_COMPLETE_DEPTH ",Tdepth_t ,_param->_nb_inst_branch_complete); 105 106 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_ADDRESS ," in_BRANCH_COMPLETE_ADDRESS ",Taddress_t ,_param->_nb_inst_branch_complete); 106 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_ FLAG ," in_BRANCH_COMPLETE_FLAG",Tcontrol_t ,_param->_nb_inst_branch_complete);107 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_NO_SEQUENCE ," in_BRANCH_COMPLETE_NO_SEQUENCE ",Tcontrol_t ,_param->_nb_inst_branch_complete); 107 108 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION,"out_BRANCH_COMPLETE_MISS_PREDICTION",Tcontrol_t ,_param->_nb_inst_branch_complete); 108 109 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE ,"out_BRANCH_COMPLETE_TAKE ",Tcontrol_t ,_param->_nb_inst_branch_complete); … … 112 113 ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_VAL ,"out_BRANCH_EVENT_VAL ",Tcontrol_t ,_param->_nb_context); 113 114 ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_ACK ," in_BRANCH_EVENT_ACK ",Tcontrol_t ,_param->_nb_context); 114 // ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_CONTEXT_ID ," in_BRANCH_EVENT_CONTEXT_ID ",Tcontext_t ,_param->_nb_context);115 // ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_DEPTH ," in_BRANCH_EVENT_DEPTH ",Tdepth_t ,_param->_nb_context);115 // ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID ,"out_BRANCH_EVENT_CONTEXT_ID ",Tcontext_t ,_param->_nb_context); 116 ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_DEPTH ,"out_BRANCH_EVENT_DEPTH ",Tdepth_t ,_param->_nb_context); 116 117 // ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION,"out_BRANCH_EVENT_MISS_PREDICTION",Tcontrol_t ,_param->_nb_context); 117 118 ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC ,"out_BRANCH_EVENT_ADDRESS_SRC ",Taddress_t ,_param->_nb_context); … … 194 195 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete); 195 196 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_branch_complete); 196 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_COMPLETE_ FLAG,_param->_nb_inst_branch_complete);197 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_COMPLETE_NO_SEQUENCE ,_param->_nb_inst_branch_complete); 197 198 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete); 198 199 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete); … … 202 203 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_VAL ,_param->_nb_context); 203 204 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_EVENT_ACK ,_param->_nb_context); 204 // if (_param->_have_port_context_id) 205 // INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_EVENT_CONTEXT_ID ,_param->_nb_context); 206 // if (_param->_have_port_depth) 207 // INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_EVENT_DEPTH ,_param->_nb_context); 208 // INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_EVENT_ADDRESS ,_param->_nb_context); 209 // INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_MISS_PREDICTION,_param->_nb_context); 205 //if (_param->_have_port_context_id) 206 //INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_CONTEXT_ID ,_param->_nb_context); 207 if (_param->_have_port_depth) 208 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_DEPTH ,_param->_nb_context); 209 //INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_MISS_PREDICTION,_param->_nb_context); 210 210 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_ADDRESS_SRC ,_param->_nb_context); 211 211 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_ADDRESS_DEST_VAL,_param->_nb_context); … … 347 347 request.take_good = 1; 348 348 request.flag = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.take_good:(not request.take_good); 349 request.no_sequence = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.flag:not request.flag; 349 350 request.is_accurate = true; 350 351 request.miss_ifetch = false; … … 486 487 in_BRANCH_COMPLETE_DEPTH [port]->write(it_upt->upt_ptr ); 487 488 in_BRANCH_COMPLETE_ADDRESS [port]->write(it_upt->address_good); 488 in_BRANCH_COMPLETE_ FLAG [port]->write(it_upt->flag);489 in_BRANCH_COMPLETE_NO_SEQUENCE[port]->write(it_upt->no_sequence ); 489 490 490 491 if (_param->_have_port_depth) … … 627 628 request.take_good = 1; 628 629 request.flag = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.take_good:(not request.take_good); 630 request.no_sequence = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.flag:not request.flag; 629 631 request.is_accurate = true; 630 632 request.miss_ifetch = false; … … 704 706 request.take_good = 0; 705 707 request.flag = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.take_good:(not request.take_good); 708 request.no_sequence = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.flag:not request.flag; 706 709 request.is_accurate = true; 707 710 request.miss_ifetch = false; … … 712 715 request.ras_index = (0x87654321)%_param->_size_ras_index[context]; 713 716 request.ufpt_ptr = ufpt_top [context]; 717 request.upt_ptr = upt_top [context]; 714 718 715 719 event = request; … … 786 790 in_BRANCH_COMPLETE_DEPTH [port]->write(it_upt->upt_ptr ); 787 791 in_BRANCH_COMPLETE_ADDRESS [port]->write(it_upt->address_good); 788 in_BRANCH_COMPLETE_ FLAG [port]->write(it_upt->flag);792 in_BRANCH_COMPLETE_NO_SEQUENCE[port]->write(it_upt->no_sequence ); 789 793 790 794 if (_param->_have_port_depth) … … 910 914 LABEL("BRANCH_EVENT [%d] - Transaction accepted",port); 911 915 have_transaction = true; 912 916 917 TEST(Tdepth_t ,out_BRANCH_EVENT_DEPTH [port]->read(),event.upt_ptr); 913 918 TEST(Taddress_t,out_BRANCH_EVENT_ADDRESS_SRC [port]->read(),event.address_src); 914 919 TEST(Tcontrol_t,out_BRANCH_EVENT_ADDRESS_DEST_VAL [port]->read(),event.take); … … 982 987 request.take_good = 1; 983 988 request.flag = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.take_good:(not request.take_good); 989 request.no_sequence = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.flag:not request.flag; 984 990 request.is_accurate = true; 985 991 request.miss_ifetch = false; … … 1059 1065 request.take_good = 0; 1060 1066 request.flag = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.take_good:(not request.take_good); 1067 request.no_sequence = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.flag:not request.flag; 1061 1068 request.is_accurate = true; 1062 1069 request.miss_ifetch = false; … … 1067 1074 request.ras_index = (0x87654321)%_param->_size_ras_index[context]; 1068 1075 request.ufpt_ptr = ufpt_top [context]; 1076 request.upt_ptr = upt_top [context]; 1069 1077 1070 1078 event = request; … … 1141 1149 in_BRANCH_COMPLETE_DEPTH [port]->write(it_upt->upt_ptr ); 1142 1150 in_BRANCH_COMPLETE_ADDRESS [port]->write(it_upt->address_good); 1143 in_BRANCH_COMPLETE_ FLAG [port]->write(it_upt->flag);1151 in_BRANCH_COMPLETE_NO_SEQUENCE[port]->write(it_upt->no_sequence ); 1144 1152 1145 1153 if (_param->_have_port_depth) … … 1345 1353 have_transaction = true; 1346 1354 1355 TEST(Tdepth_t ,out_BRANCH_EVENT_DEPTH [port]->read(),event.upt_ptr); 1347 1356 TEST(Taddress_t,out_BRANCH_EVENT_ADDRESS_SRC [port]->read(),event.address_src); 1348 1357 TEST(Tcontrol_t,out_BRANCH_EVENT_ADDRESS_DEST_VAL [port]->read(),event.take); … … 1415 1424 request.take_good = 1; 1416 1425 request.flag = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.take_good:(not request.take_good); 1426 request.no_sequence = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.flag:not request.flag; 1417 1427 request.is_accurate = true ; 1418 1428 request.miss_ifetch = false; … … 1557 1567 request.take_good = 1; 1558 1568 request.flag = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.take_good:(not request.take_good); 1569 request.no_sequence = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.flag:not request.flag; 1559 1570 request.is_accurate = true ; 1560 1571 request.miss_ifetch = false; … … 1644 1655 it_event->address_good = it_event->address_dest; 1645 1656 it_event->flag = not it_event->flag; 1657 it_event->no_sequence = not it_event->no_sequence; 1646 1658 it_event->take_good = not it_event->take_good; 1647 1659 } … … 1662 1674 in_BRANCH_COMPLETE_DEPTH [port]->write(it_event->upt_ptr ); 1663 1675 in_BRANCH_COMPLETE_ADDRESS [port]->write(it_event->address_good); 1664 in_BRANCH_COMPLETE_ FLAG [port]->write(it_event->flag);1676 in_BRANCH_COMPLETE_NO_SEQUENCE[port]->write(it_event->no_sequence ); 1665 1677 1666 1678 if (_param->_have_port_depth) … … 1675 1687 { 1676 1688 LABEL("BRANCH_COMPLETE [%d] - Transaction accepted",port); 1677 LABEL(" * CONTEXT_ID %d" ,it_event->context ); 1678 LABEL(" * DEPTH %d" ,it_event->upt_ptr ); 1679 LABEL(" * CONDITION %d" ,it_event->condition ); 1680 LABEL(" * ADDRESS %.8x",it_event->address_good); 1681 LABEL(" * FLAG %d" ,it_event->flag ); 1689 LABEL(" * CONTEXT_ID : %d" ,it_event->context ); 1690 LABEL(" * DEPTH : %d" ,it_event->upt_ptr ); 1691 LABEL(" * CONDITION : %d" ,it_event->condition ); 1692 LABEL(" * ADDRESS : %.8x",it_event->address_good); 1693 LABEL(" * FLAG : %d" ,it_event->flag ); 1694 LABEL(" * NO_SEQUENCE : %d" ,it_event->no_sequence ); 1682 1695 1683 1696 have_transaction = true; … … 1722 1735 in_BRANCH_COMPLETE_DEPTH [port]->write(it_upt->upt_ptr ); 1723 1736 in_BRANCH_COMPLETE_ADDRESS [port]->write(it_upt->address_dest); 1724 in_BRANCH_COMPLETE_ FLAG [port]->write(it_upt->flag);1737 in_BRANCH_COMPLETE_NO_SEQUENCE[port]->write(it_upt->no_sequence ); 1725 1738 1726 1739 if (_param->_have_port_depth) … … 1735 1748 { 1736 1749 LABEL("BRANCH_COMPLETE [%d] - Transaction accepted",port); 1737 LABEL(" * CONTEXT_ID %d" ,it_upt->context ); 1738 LABEL(" * DEPTH %d" ,it_upt->upt_ptr ); 1739 LABEL(" * CONDITION %d" ,it_upt->condition ); 1740 LABEL(" * ADDRESS %.8x",it_upt->address_dest); 1741 LABEL(" * FLAG %d" ,it_upt->flag ); 1750 LABEL(" * CONTEXT_ID : %d" ,it_upt->context ); 1751 LABEL(" * DEPTH : %d" ,it_upt->upt_ptr ); 1752 LABEL(" * CONDITION : %d" ,it_upt->condition ); 1753 LABEL(" * ADDRESS : %.8x",it_upt->address_dest); 1754 LABEL(" * FLAG : %d" ,it_upt->flag ); 1755 LABEL(" * NO_SEQUENCE : %d" ,it_event->no_sequence ); 1742 1756 1743 1757 have_transaction = true; … … 1953 1967 LABEL(" * event.take : %.8x,",event.take ); 1954 1968 1969 TEST(Tdepth_t ,out_BRANCH_EVENT_DEPTH [port]->read(),event.upt_ptr); 1955 1970 TEST(Taddress_t,out_BRANCH_EVENT_ADDRESS_SRC [port]->read(),event.address_src); 1956 1971 TEST(Tcontrol_t,out_BRANCH_EVENT_ADDRESS_DEST_VAL [port]->read(),event.take_good); … … 2120 2135 delete [] in_BRANCH_COMPLETE_DEPTH ; 2121 2136 delete [] in_BRANCH_COMPLETE_ADDRESS ; 2122 delete [] in_BRANCH_COMPLETE_ FLAG;2137 delete [] in_BRANCH_COMPLETE_NO_SEQUENCE ; 2123 2138 delete [] out_BRANCH_COMPLETE_MISS_PREDICTION; 2124 2139 delete [] out_BRANCH_COMPLETE_TAKE ; … … 2129 2144 delete [] out_BRANCH_EVENT_VAL ; 2130 2145 delete [] in_BRANCH_EVENT_ACK ; 2131 //delete [] in_BRANCH_EVENT_CONTEXT_ID ;2132 //delete [] in_BRANCH_EVENT_DEPTH ;2146 //delete [] out_BRANCH_EVENT_CONTEXT_ID ; 2147 delete [] out_BRANCH_EVENT_DEPTH ; 2133 2148 //delete [] out_BRANCH_EVENT_MISS_PREDICTION; 2134 2149 delete [] out_BRANCH_EVENT_ADDRESS_SRC ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h
r97 r98 106 106 public : SC_IN (Tdepth_t ) ** in_BRANCH_COMPLETE_DEPTH ; //[nb_inst_branch_complete] 107 107 public : SC_IN (Taddress_t ) ** in_BRANCH_COMPLETE_ADDRESS ; //[nb_inst_branch_complete] 108 public : SC_IN (Tcontrol_t ) ** in_BRANCH_COMPLETE_ FLAG; //[nb_inst_branch_complete]108 public : SC_IN (Tcontrol_t ) ** in_BRANCH_COMPLETE_NO_SEQUENCE ; //[nb_inst_branch_complete] 109 109 public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_MISS_PREDICTION; //[nb_inst_branch_complete] 110 110 public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_TAKE ; //[nb_inst_branch_complete] … … 116 116 public : SC_IN (Tcontrol_t ) ** in_BRANCH_EVENT_ACK ; //[nb_context] 117 117 //public : SC_OUT(Tcontext_t ) ** out_BRANCH_EVENT_CONTEXT_ID ; //[nb_context] 118 //public : SC_OUT(Tdepth_t ) ** out_BRANCH_EVENT_DEPTH ; //[nb_context]118 public : SC_OUT(Tdepth_t ) ** out_BRANCH_EVENT_DEPTH ; //[nb_context] 119 119 //public : SC_OUT(Tcontrol_t ) ** out_BRANCH_EVENT_MISS_PREDICTION ; //[nb_context] is always miss prediction 120 120 public : SC_OUT(Taddress_t ) ** out_BRANCH_EVENT_ADDRESS_SRC ; //[nb_context] … … 176 176 177 177 private : event_state_t * reg_EVENT_STATE ; //[nb_context] 178 private : Tdepth_t * reg_EVENT_DEPTH ; //[nb_context] 178 179 private : Taddress_t * reg_EVENT_ADDRESS_SRC ; //[nb_context] // Address branch 179 180 private : Tcontrol_t * reg_EVENT_ADDRESS_DEST_VAL ; //[nb_context] // if miss ifetch, decod issue branch, dest must be reload -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table.cpp
r97 r98 161 161 if (_param->_have_port_depth) 162 162 sensitive << (*(in_BRANCH_COMPLETE_DEPTH [i])); 163 sensitive << (*(in_BRANCH_COMPLETE_ FLAG[i]))163 sensitive << (*(in_BRANCH_COMPLETE_NO_SEQUENCE [i])) 164 164 << (*(in_BRANCH_COMPLETE_ADDRESS [i])); 165 165 } … … 173 173 if (_param->_have_port_depth) 174 174 (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_DEPTH [i])); 175 (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_ FLAG[i]));175 (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_NO_SEQUENCE[i])); 176 176 (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_ADDRESS [i])); 177 177 … … 180 180 if (_param->_have_port_depth) 181 181 (*(out_BRANCH_COMPLETE_TAKE [i])) (*(in_BRANCH_COMPLETE_DEPTH [i])); 182 (*(out_BRANCH_COMPLETE_TAKE [i])) (*(in_BRANCH_COMPLETE_ FLAG[i]));182 (*(out_BRANCH_COMPLETE_TAKE [i])) (*(in_BRANCH_COMPLETE_NO_SEQUENCE[i])); 183 183 184 184 if (_param->_have_port_context_id) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp
r97 r98 103 103 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth); 104 104 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS ,"address" ,Taddress_t,_param->_size_instruction_address); 105 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ FLAG ,"flag",Tcontrol_t,1);105 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_NO_SEQUENCE ,"no_sequence" ,Tcontrol_t,1); 106 106 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1); 107 107 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_TAKE ,"take" ,Tcontrol_t,1); … … 117 117 ALLOC1_VALACK_IN ( in_BRANCH_EVENT_ACK ,ACK); 118 118 // ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_CONTEXT_ID ,"context_id" ,Tcontext_t,_param->_size_context_id); 119 //ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth);119 ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth); 120 120 // ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_MISS_PREDICTION ,"miss_prediction" ,Tcontrol_t,1); 121 121 ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_ADDRESS_SRC ,"address_src" ,Taddress_t,_param->_size_instruction_address); … … 203 203 204 204 ALLOC1(reg_EVENT_STATE ,event_state_t,_param->_nb_context); 205 ALLOC1(reg_EVENT_DEPTH ,Tdepth_t ,_param->_nb_context); 205 206 ALLOC1(reg_EVENT_ADDRESS_SRC ,Taddress_t ,_param->_nb_context); 206 207 ALLOC1(reg_EVENT_ADDRESS_DEST_VAL ,Tcontrol_t ,_param->_nb_context); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_deallocation.cpp
r97 r98 73 73 delete [] in_BRANCH_COMPLETE_DEPTH ; 74 74 delete [] in_BRANCH_COMPLETE_ADDRESS ; 75 delete [] in_BRANCH_COMPLETE_ FLAG;75 delete [] in_BRANCH_COMPLETE_NO_SEQUENCE ; 76 76 delete [] out_BRANCH_COMPLETE_MISS_PREDICTION; 77 77 delete [] out_BRANCH_COMPLETE_TAKE ; … … 83 83 DELETE1_SIGNAL( in_BRANCH_EVENT_ACK ,_param->_nb_context,1); 84 84 // DELETE1_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID ,_param->_nb_context,_param->_size_context_id); 85 //DELETE1_SIGNAL(out_BRANCH_EVENT_DEPTH ,_param->_nb_context,_param->_size_depth);85 DELETE1_SIGNAL(out_BRANCH_EVENT_DEPTH ,_param->_nb_context,_param->_size_depth); 86 86 // DELETE1_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION ,_param->_nb_context,1); 87 87 DELETE1_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC ,_param->_nb_context,_param->_size_instruction_address); … … 156 156 157 157 DELETE1(reg_EVENT_STATE ,_param->_nb_context); 158 DELETE1(reg_EVENT_DEPTH ,_param->_nb_context); 158 159 DELETE1(reg_EVENT_ADDRESS_SRC ,_param->_nb_context); 159 160 DELETE1(reg_EVENT_ADDRESS_DEST_VAL ,_param->_nb_context); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_branch_complete.cpp
r97 r98 40 40 Tbranch_condition_t condition = reg_UPDATE_PREDICTION_TABLE [context][depth]._condition ; 41 41 42 Tcontrol_t flag = PORT_READ(in_BRANCH_COMPLETE_FLAG[i]);42 Tcontrol_t no_sequence = PORT_READ(in_BRANCH_COMPLETE_NO_SEQUENCE [i]); 43 43 Taddress_t addr_good = PORT_READ(in_BRANCH_COMPLETE_ADDRESS [i]); 44 44 … … 46 46 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * depth : %d",depth ); 47 47 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * condition : %s",toString(condition).c_str()); 48 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * flag : %d",flag);48 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * no_sequence : %d",no_sequence); 49 49 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * address_good : %.8x",addr_good); 50 50 … … 74 74 } 75 75 case BRANCH_CONDITION_FLAG_UNSET : // l.bnf 76 {77 //addr_dest : compute in decod stage78 //miss if the direction is bad79 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * BRANCH_CONDITION_FLAG_UNSET");80 81 Tcontrol_t take_good = not flag; // flag set = not take82 83 miss = (take != take_good);84 take = take_good;85 86 #ifdef DEBUG_TEST87 // if (addr_dest != addr_good)88 // throw ERRORMORPHEO(FUNCTION,toString("Branch_complete[%d] (condition %s) : bad destination address.",i,toString(condition).c_str()));89 #endif90 91 break;92 }93 76 case BRANCH_CONDITION_FLAG_SET : // l.bf 94 77 { 95 78 //addr_dest : compute in decod stage 96 79 //miss if the direction is bad 97 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * BRANCH_CONDITION_FLAG _SET");80 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * BRANCH_CONDITION_FLAG"); 98 81 99 Tcontrol_t take_good = flag; // flag set = take 82 // Tcontrol_t take_good = not flag; // flag set = not take 83 // Tcontrol_t take_good = flag; // flag set = take 84 Tcontrol_t take_good = no_sequence; 100 85 101 86 miss = (take != take_good); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp
r95 r98 253 253 254 254 PORT_WRITE(out_BRANCH_EVENT_VAL [i],val); 255 if (_param->_have_port_depth) 256 PORT_WRITE(out_BRANCH_EVENT_DEPTH [i],reg_EVENT_DEPTH [i]); 255 257 PORT_WRITE(out_BRANCH_EVENT_ADDRESS_SRC [i],reg_EVENT_ADDRESS_SRC [i]); 256 258 PORT_WRITE(out_BRANCH_EVENT_ADDRESS_DEST_VAL [i],reg_EVENT_ADDRESS_DEST_VAL [i]); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp
r97 r98 213 213 flush_UFPT [context] = true; 214 214 215 reg_EVENT_DEPTH [context] = upt_ptr_write; 215 216 reg_EVENT_ADDRESS_SRC [context] = address_src; // delay_slot is compute in Context_State 216 217 reg_EVENT_ADDRESS_DEST_VAL[context] = last_take; … … 303 304 if (PORT_READ(in_BRANCH_COMPLETE_VAL[i]) and internal_BRANCH_COMPLETE_ACK [i]) 304 305 { 305 Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_BRANCH_COMPLETE_CONTEXT_ID [i]):0;306 Tdepth_t depth = (_param->_have_port_depth )?PORT_READ(in_BRANCH_COMPLETE_DEPTH [i]):0;306 Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_BRANCH_COMPLETE_CONTEXT_ID [i]):0; 307 Tdepth_t depth = (_param->_have_port_depth )?PORT_READ(in_BRANCH_COMPLETE_DEPTH [i]):0; 307 308 Tcontrol_t miss = internal_BRANCH_COMPLETE_MISS_PREDICTION [i]; 308 309 Tcontrol_t good_take = internal_BRANCH_COMPLETE_TAKE [i]; … … 375 376 // else no update 376 377 378 reg_EVENT_DEPTH [context] = depth; 377 379 reg_EVENT_ADDRESS_SRC [context] = address_src; // delay_slot is compute in Context_State 378 380 reg_EVENT_ADDRESS_DEST_VAL[context] = good_take; … … 668 670 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_IS_ACCURATE : %d",reg_IS_ACCURATE [i]); 669 671 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_EVENT_STATE : %s" ,toString(reg_EVENT_STATE [i]).c_str()); 672 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_EVENT_DEPTH : %d" ,reg_EVENT_DEPTH [i]); 670 673 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_EVENT_ADDRESS_SRC : %.8x",reg_EVENT_ADDRESS_SRC [i]); 671 674 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_EVENT_ADDRESS_DEST_VAL: %d" ,reg_EVENT_ADDRESS_DEST_VAL[i]); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Prediction_unit.h
r97 r98 98 98 public : SC_IN (Tdepth_t ) ** in_BRANCH_COMPLETE_DEPTH ; //[nb_inst_branch_complete] 99 99 public : SC_IN (Taddress_t ) ** in_BRANCH_COMPLETE_ADDRESS ; //[nb_inst_branch_complete] 100 public : SC_IN (Tcontrol_t ) ** in_BRANCH_COMPLETE_ FLAG; //[nb_inst_branch_complete]100 public : SC_IN (Tcontrol_t ) ** in_BRANCH_COMPLETE_NO_SEQUENCE ; //[nb_inst_branch_complete] 101 101 public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_MISS_PREDICTION ; //[nb_inst_branch_complete] 102 102 public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_TAKE ; //[nb_inst_branch_complete] … … 108 108 public : SC_IN (Tcontrol_t ) ** in_BRANCH_EVENT_ACK ; //[nb_context] 109 109 //public : SC_OUT(Tcontext_t ) ** out_BRANCH_EVENT_CONTEXT_ID ; //[nb_context] 110 //public : SC_OUT(Tdepth_t ) ** out_BRANCH_EVENT_DEPTH ; //[nb_context]110 public : SC_OUT(Tdepth_t ) ** out_BRANCH_EVENT_DEPTH ; //[nb_context] 111 111 //public : SC_OUT(Tcontrol_t ) ** out_BRANCH_EVENT_MISS_PREDICTION ; //[nb_context] 112 112 public : SC_OUT(Taddress_t ) ** out_BRANCH_EVENT_ADDRESS_SRC ; //[nb_context] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_allocation.cpp
r97 r98 102 102 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth); 103 103 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS ,"address" ,Taddress_t,_param->_size_address); 104 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ FLAG ,"flag",Tcontrol_t,1);104 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_NO_SEQUENCE ,"no_sequence" ,Tcontrol_t,1); 105 105 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1); 106 106 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_TAKE ,"take" ,Tcontrol_t,1); … … 116 116 ALLOC1_VALACK_IN ( in_BRANCH_EVENT_ACK ,ACK); 117 117 // ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_CONTEXT_ID ,"context_id" ,Tcontext_t,_param->_size_context_id); 118 //ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth);118 ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth); 119 119 // ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_MISS_PREDICTION ,"miss_prediction" ,Tcontrol_t,1); 120 120 ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_ADDRESS_SRC ,"address_src" ,Taddress_t,_param->_size_address); … … 675 675 PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS" , 676 676 dest, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS" ); 677 PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_ FLAG",678 dest, "in_BRANCH_COMPLETE_"+toString(i)+"_ FLAG");677 PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_NO_SEQUENCE" , 678 dest, "in_BRANCH_COMPLETE_"+toString(i)+"_NO_SEQUENCE" ); 679 679 PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION", 680 680 dest,"out_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION"); … … 698 698 PORT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_VAL" ,dest,"out_BRANCH_EVENT_"+toString(i)+"_VAL" ); 699 699 PORT_MAP(_component,src , "in_BRANCH_EVENT_"+toString(i)+"_ACK" ,dest, "in_BRANCH_EVENT_"+toString(i)+"_ACK" ); 700 if (_param->_have_port_depth) 701 PORT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_DEPTH" ,dest,"out_BRANCH_EVENT_"+toString(i)+"_DEPTH" ); 700 702 PORT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_SRC" ,dest,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_SRC" ); 701 703 PORT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_DEST_VAL",dest,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_DEST_VAL"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_deallocation.cpp
r97 r98 56 56 DELETE1_SIGNAL( in_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete,_param->_size_depth); 57 57 DELETE1_SIGNAL( in_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_branch_complete,_param->_size_instruction_address); 58 DELETE1_SIGNAL( in_BRANCH_COMPLETE_ FLAG,_param->_nb_inst_branch_complete,1);58 DELETE1_SIGNAL( in_BRANCH_COMPLETE_NO_SEQUENCE ,_param->_nb_inst_branch_complete,1); 59 59 DELETE1_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete,1); 60 60 DELETE1_SIGNAL(out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete,1); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/SelfTest/src/test.cpp
r97 r98 88 88 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_DEPTH ," in_BRANCH_COMPLETE_DEPTH ",Tdepth_t ,_param->_nb_inst_branch_complete); 89 89 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_ADDRESS ," in_BRANCH_COMPLETE_ADDRESS ",Taddress_t ,_param->_nb_inst_branch_complete); 90 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_ FLAG ," in_BRANCH_COMPLETE_FLAG",Tcontrol_t ,_param->_nb_inst_branch_complete);90 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_NO_SEQUENCE ," in_BRANCH_COMPLETE_NO_SEQUENCE ",Tcontrol_t ,_param->_nb_inst_branch_complete); 91 91 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION,"out_BRANCH_COMPLETE_MISS_PREDICTION",Tcontrol_t ,_param->_nb_inst_branch_complete); 92 92 ALLOC0_SC_SIGNAL( in_COMMIT_EVENT_VAL ," in_COMMIT_EVENT_VAL ",Tcontrol_t ); … … 176 176 INSTANCE1_SC_SIGNAL(_Front_end, in_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete); 177 177 INSTANCE1_SC_SIGNAL(_Front_end, in_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_branch_complete); 178 INSTANCE1_SC_SIGNAL(_Front_end, in_BRANCH_COMPLETE_ FLAG,_param->_nb_inst_branch_complete);178 INSTANCE1_SC_SIGNAL(_Front_end, in_BRANCH_COMPLETE_NO_SEQUENCE ,_param->_nb_inst_branch_complete); 179 179 INSTANCE1_SC_SIGNAL(_Front_end,out_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete); 180 180 INSTANCE0_SC_SIGNAL(_Front_end, in_COMMIT_EVENT_VAL ); … … 330 330 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete); 331 331 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_branch_complete); 332 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_ FLAG,_param->_nb_inst_branch_complete);332 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_NO_SEQUENCE ,_param->_nb_inst_branch_complete); 333 333 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete); 334 334 DELETE0_SC_SIGNAL( in_COMMIT_EVENT_VAL ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/include/Front_end.h
r88 r98 116 116 public : SC_IN (Tdepth_t ) ** in_BRANCH_COMPLETE_DEPTH ;//[nb_inst_branch_complete] 117 117 public : SC_IN (Taddress_t ) ** in_BRANCH_COMPLETE_ADDRESS ;//[nb_inst_branch_complete] 118 public : SC_IN (Tcontrol_t ) ** in_BRANCH_COMPLETE_ FLAG;//[nb_inst_branch_complete]118 public : SC_IN (Tcontrol_t ) ** in_BRANCH_COMPLETE_NO_SEQUENCE ;//[nb_inst_branch_complete] 119 119 public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_MISS_PREDICTION ;//[nb_inst_branch_complete] 120 120 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_allocation.cpp
r97 r98 123 123 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_DEPTH ,"DEPTH" ,Tdepth_t ,_param->_size_depth ); 124 124 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS ,"ADDRESS" ,Taddress_t ,_param->_size_instruction_address); 125 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ FLAG ,"FLAG",Tcontrol_t ,1 );125 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_NO_SEQUENCE ,"NO_SEQUENCE" ,Tcontrol_t ,1 ); 126 126 ALLOC1_SIGNAL_OUT (out_BRANCH_COMPLETE_MISS_PREDICTION ,"MISS_PREDICTION" ,Tcontrol_t ,1 ); 127 127 } … … 538 538 PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS" , 539 539 dest, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS" ); 540 PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_ FLAG",541 dest, "in_BRANCH_COMPLETE_"+toString(i)+"_ FLAG");540 PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_NO_SEQUENCE", 541 dest, "in_BRANCH_COMPLETE_"+toString(i)+"_NO_SEQUENCE"); 542 542 543 543 dest = _name+"_context_state"; … … 570 570 // COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_CONTEXT_ID" , 571 571 // dest, "in_BRANCH_EVENT_"+toString(i)+"_CONTEXT_ID" ); 572 // COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_DEPTH" , 573 // dest, "in_BRANCH_EVENT_"+toString(i)+"_DEPTH" ); 572 if (_param->_have_port_depth) 573 COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_DEPTH" , 574 dest, "in_BRANCH_EVENT_"+toString(i)+"_DEPTH" ); 574 575 // COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_MISS_PREDICTION" , 575 576 // dest, "in_BRANCH_EVENT_"+toString(i)+"_MISS_PREDICTION" ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_deallocation.cpp
r88 r98 70 70 DELETE1_SIGNAL( in_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete,_param->_size_depth ); 71 71 DELETE1_SIGNAL( in_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_branch_complete,_param->_size_instruction_address ); 72 DELETE1_SIGNAL( in_BRANCH_COMPLETE_ FLAG,_param->_nb_inst_branch_complete,1 );72 DELETE1_SIGNAL( in_BRANCH_COMPLETE_NO_SEQUENCE ,_param->_nb_inst_branch_complete,1 ); 73 73 DELETE1_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION ,_param->_nb_inst_branch_complete,1 ); 74 74 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/SelfTest/src/test.cpp
r97 r98 35 35 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT); 36 36 // _usage = usage_unset(_usage,USE_POSITION ); 37 _usage = usage_unset(_usage,USE_STATISTICS );37 // _usage = usage_unset(_usage,USE_STATISTICS ); 38 38 // _usage = usage_unset(_usage,USE_INFORMATION ); 39 39 … … 139 139 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_DEPTH ,"out_BRANCH_COMPLETE_DEPTH ",Tdepth_t ,_param->_nb_inst_branch_complete); 140 140 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS ,"out_BRANCH_COMPLETE_ADDRESS ",Taddress_t ,_param->_nb_inst_branch_complete); 141 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ FLAG ,"out_BRANCH_COMPLETE_FLAG",Tcontrol_t ,_param->_nb_inst_branch_complete);141 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_NO_SEQUENCE ,"out_BRANCH_COMPLETE_NO_SEQUENCE ",Tcontrol_t ,_param->_nb_inst_branch_complete); 142 142 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_MISS_PREDICTION," in_BRANCH_COMPLETE_MISS_PREDICTION",Tcontrol_t ,_param->_nb_inst_branch_complete); 143 143 ALLOC_SC_SIGNAL (out_UPDATE_VAL ,"out_UPDATE_VAL ",Tcontrol_t ); … … 282 282 INSTANCE1_SC_SIGNAL(_Commit_unit,out_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete); 283 283 INSTANCE1_SC_SIGNAL(_Commit_unit,out_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_branch_complete); 284 INSTANCE1_SC_SIGNAL(_Commit_unit,out_BRANCH_COMPLETE_ FLAG,_param->_nb_inst_branch_complete);284 INSTANCE1_SC_SIGNAL(_Commit_unit,out_BRANCH_COMPLETE_NO_SEQUENCE ,_param->_nb_inst_branch_complete); 285 285 INSTANCE1_SC_SIGNAL(_Commit_unit, in_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete); 286 286 INSTANCE_SC_SIGNAL (_Commit_unit,out_UPDATE_VAL ); … … 678 678 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete); 679 679 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_branch_complete); 680 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ FLAG,_param->_nb_inst_branch_complete);680 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_NO_SEQUENCE ,_param->_nb_inst_branch_complete); 681 681 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete); 682 682 DELETE_SC_SIGNAL (out_UPDATE_VAL ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h
r97 r98 57 57 public : counter_t * _stat_nb_inst_commit; 58 58 public : counter_t * _stat_nb_inst_commit_conflit_access; 59 public : counter_t ** _stat_nb_inst_retire; 59 public : counter_t ** _stat_nb_inst_retire_ok; 60 public : counter_t ** _stat_nb_inst_retire_ko; 60 61 public : counter_t ** _stat_bank_nb_inst;// [nb_bank] 61 62 #endif … … 161 162 public : SC_OUT(Tdepth_t ) ** out_BRANCH_COMPLETE_DEPTH ;//[nb_inst_branch_complete] 162 163 public : SC_OUT(Taddress_t ) ** out_BRANCH_COMPLETE_ADDRESS ;//[nb_inst_branch_complete] 163 public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_FLAG ;//[nb_inst_branch_complete] 164 //public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_FLAG ;//[nb_inst_branch_complete] 165 public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_NO_SEQUENCE ;//[nb_inst_branch_complete] 164 166 public : SC_IN (Tcontrol_t ) ** in_BRANCH_COMPLETE_MISS_PREDICTION ;//[nb_inst_branch_complete] 165 167 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp
r97 r98 167 167 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth ); 168 168 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS ,"address" ,Taddress_t ,_param->_size_instruction_address); 169 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_FLAG ,"flag" ,Tcontrol_t ,1); 169 // ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_FLAG ,"flag" ,Tcontrol_t ,1); 170 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_NO_SEQUENCE ,"no_sequence" ,Tcontrol_t ,1); 170 171 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_MISS_PREDICTION,"miss_prediction",Tcontrol_t ,1); 171 172 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp
r88 r98 108 108 DELETE1_SIGNAL(out_REEXECUTE_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_reexecute,_param->_size_store_queue_ptr); 109 109 110 DELETE1_SIGNAL(out_BRANCH_COMPLETE_VAL ,_param->_nb_inst_branch_complete,1 111 DELETE1_SIGNAL( in_BRANCH_COMPLETE_ACK ,_param->_nb_inst_branch_complete,1 110 DELETE1_SIGNAL(out_BRANCH_COMPLETE_VAL ,_param->_nb_inst_branch_complete,1); 111 DELETE1_SIGNAL( in_BRANCH_COMPLETE_ACK ,_param->_nb_inst_branch_complete,1); 112 112 DELETE1_SIGNAL(out_BRANCH_COMPLETE_CONTEXT_ID ,_param->_nb_inst_branch_complete,_param->_size_context_id ); 113 113 DELETE1_SIGNAL(out_BRANCH_COMPLETE_FRONT_END_ID ,_param->_nb_inst_branch_complete,_param->_size_front_end_id); 114 114 DELETE1_SIGNAL(out_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete,_param->_size_depth ); 115 115 DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_branch_complete,_param->_size_instruction_address ); 116 DELETE1_SIGNAL(out_BRANCH_COMPLETE_FLAG ,_param->_nb_inst_branch_complete,1 ); 117 DELETE1_SIGNAL( in_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete,1 ); 116 // DELETE1_SIGNAL(out_BRANCH_COMPLETE_FLAG ,_param->_nb_inst_branch_complete,1); 117 DELETE1_SIGNAL(out_BRANCH_COMPLETE_NO_SEQUENCE ,_param->_nb_inst_branch_complete,1); 118 DELETE1_SIGNAL( in_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete,1); 118 119 119 120 DELETE_SIGNAL (out_UPDATE_VAL ,1 ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMoore.cpp
r88 r98 86 86 87 87 if (_param->_have_port_context_id) 88 PORT_WRITE(out_BRANCH_COMPLETE_CONTEXT_ID [i], entry->context_id 88 PORT_WRITE(out_BRANCH_COMPLETE_CONTEXT_ID [i], entry->context_id ); 89 89 if (_param->_have_port_front_end_id) 90 PORT_WRITE(out_BRANCH_COMPLETE_FRONT_END_ID [i], entry->front_end_id 90 PORT_WRITE(out_BRANCH_COMPLETE_FRONT_END_ID [i], entry->front_end_id ); 91 91 if (_param->_have_port_depth) 92 PORT_WRITE(out_BRANCH_COMPLETE_DEPTH [i], entry->depth ); 93 PORT_WRITE(out_BRANCH_COMPLETE_ADDRESS [i], entry->data_commit ); 94 PORT_WRITE(out_BRANCH_COMPLETE_FLAG [i], (entry->flags&FLAG_F)!=0 ); 92 PORT_WRITE(out_BRANCH_COMPLETE_DEPTH [i], entry->depth ); 93 PORT_WRITE(out_BRANCH_COMPLETE_ADDRESS [i], entry->data_commit ); 94 // PORT_WRITE(out_BRANCH_COMPLETE_FLAG [i],(entry->flags&FLAG_F)!=0); 95 PORT_WRITE(out_BRANCH_COMPLETE_NO_SEQUENCE [i], entry->no_sequence ); 95 96 96 97 break; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_allocation.cpp
r88 r98 28 28 29 29 _stat_nb_inst_insert = new counter_t * [_param->_nb_rename_unit]; 30 _stat_nb_inst_retire = new counter_t * [_param->_nb_rename_unit]; 30 _stat_nb_inst_retire_ok = new counter_t * [_param->_nb_rename_unit]; 31 _stat_nb_inst_retire_ko = new counter_t * [_param->_nb_rename_unit]; 31 32 _stat_bank_nb_inst = new counter_t * [_param->_nb_bank]; 32 33 33 34 { 34 std::string sum_nb_inst_insert = ""; 35 std::string sum_nb_inst_retire = ""; 35 std::string sum_nb_inst_insert = "0"; 36 std::string sum_nb_inst_retire_ok = "0"; 37 std::string sum_nb_inst_retire_ko = "0"; 36 38 37 39 for (uint32_t i=0; i<_param->_nb_rename_unit; i++) 38 40 { 39 _stat_nb_inst_insert [i] = _stat->create_variable("nb_inst_insert_"+toString(i)); 40 _stat_nb_inst_retire [i] = _stat->create_variable("nb_inst_retire_"+toString(i)); 41 _stat_nb_inst_insert [i] = _stat->create_variable("nb_inst_insert_" +toString(i)); 42 _stat_nb_inst_retire_ok [i] = _stat->create_variable("nb_inst_retire_ok_"+toString(i)); 43 _stat_nb_inst_retire_ko [i] = _stat->create_variable("nb_inst_retire_ko_"+toString(i)); 41 44 42 45 _stat->create_expr_average_by_cycle("average_use_interface_insert_"+toString(i), "nb_inst_insert_"+toString(i), "", toString(_("Average instruction by cycle on insert interface (rename_unit %d)"),i)); 43 _stat->create_expr_average_by_cycle("average_use_interface_retire_"+toString(i), " nb_inst_retire_"+toString(i), "", toString(_("Average instruction by cycle on retire interface (rename_unit %d)"),i));46 _stat->create_expr_average_by_cycle("average_use_interface_retire_"+toString(i), "+ nb_inst_retire_ok_"+toString(i)+" nb_inst_retire_ko_"+toString(i), "", toString(_("Average instruction by cycle on retire interface (rename_unit %d)"),i)); 44 47 _stat->create_expr_percent ("percent_use_interface_insert_"+toString(i) , "average_use_interface_insert_"+toString(i), toString(_param->_nb_inst_insert [i]), toString(_("Percent usage of insert interface (rename_unit %d)"),i)); 45 48 _stat->create_expr_percent ("percent_use_interface_retire_"+toString(i) , "average_use_interface_retire_"+toString(i), toString(_param->_nb_inst_retire [i]), toString(_("Percent usage of retire interface (rename_unit %d)"),i)); 46 49 47 if (i == 0) 48 { 49 sum_nb_inst_insert = "nb_inst_insert_"+toString(i); 50 sum_nb_inst_retire = "nb_inst_retire_"+toString(i); 51 } 52 else 53 { 54 sum_nb_inst_insert = "+ nb_inst_insert_"+toString(i) + " " +sum_nb_inst_insert; 55 sum_nb_inst_retire = "+ nb_inst_retire_"+toString(i) + " " +sum_nb_inst_retire; 56 } 50 sum_nb_inst_insert = "+ nb_inst_insert_"+ toString(i) + " " +sum_nb_inst_insert; 51 sum_nb_inst_retire_ok = "+ nb_inst_retire_ok_"+toString(i) + " " +sum_nb_inst_retire_ok; 52 sum_nb_inst_retire_ko = "+ nb_inst_retire_ko_"+toString(i) + " " +sum_nb_inst_retire_ko; 57 53 } 58 54 59 _stat->create_expr_average_by_cycle("average_inst_insert", sum_nb_inst_insert, "", _("Average instruction insert by cycle")); 60 _stat->create_expr_average_by_cycle("average_inst_retire", sum_nb_inst_retire, "", _("Average instruction retire by cycle")); 55 _stat->create_expr_average_by_cycle("average_inst_insert" , sum_nb_inst_insert , "", _("Average instruction insert by cycle")); 56 _stat->create_expr_average_by_cycle("average_inst_retire_ok", sum_nb_inst_retire_ok, "", _("Average instruction retire ok by cycle (IPC)")); 57 _stat->create_expr_average_by_cycle("average_inst_retire_ko", sum_nb_inst_retire_ko, "", _("Average instruction retire ko (event, miss) by cycle")); 58 _stat->create_expr_average_by_cycle("average_inst_retire" , "+ "+sum_nb_inst_retire_ok+" "+sum_nb_inst_retire_ko, "", _("Average instruction retire by cycle")); 61 59 } 62 60 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_deallocation.cpp
r88 r98 28 28 29 29 delete [] _stat_nb_inst_insert; 30 delete [] _stat_nb_inst_retire; 30 delete [] _stat_nb_inst_retire_ok; 31 delete [] _stat_nb_inst_retire_ko; 31 32 delete [] _stat_bank_nb_inst; 32 33 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp
r97 r98 281 281 log_printf(TRACE,Commit_unit,FUNCTION," * RETIRE [%d][%d]",x,y); 282 282 283 #ifdef STATISTICS284 if (usage_is_set(_usage,USE_STATISTICS))285 (*_stat_nb_inst_retire [x]) ++;286 #endif287 288 283 #ifdef DEBUG_TEST 289 284 if (not PORT_READ(in_RETIRE_ACK [x][y])) … … 291 286 #endif 292 287 293 294 288 entry_t * entry = _rob [i].front(); 295 289 #ifdef STATISTICS 290 if (usage_is_set(_usage,USE_STATISTICS)) 291 { 292 rob_state_t state = entry->state; 293 294 if (state == ROB_END_OK) 295 (*_stat_nb_inst_retire_ok [x]) ++; 296 else 297 (*_stat_nb_inst_retire_ko [x]) ++; 298 } 299 #endif 300 296 301 Tcontext_t front_end_id = entry->front_end_id; 297 302 Tcontext_t context_id = entry->context_id ; … … 478 483 it++) 479 484 { 480 log_printf(TRACE,Commit_unit,FUNCTION," [%.4d] %.4d %.4d %.4d %.4d, %.3d %.3d, %.8x %.1d, %.1d %.4d, %.1d %.4d, %s - %d",485 log_printf(TRACE,Commit_unit,FUNCTION," [%.4d] %.4d %.4d %.4d %.4d, %.3d %.3d, %.8x (%.8x) %.1d, %.1d %.4d, %.1d %.4d, %s - %d", 481 486 x, 482 487 (*it)->front_end_id , … … 487 492 (*it)->operation , 488 493 (*it)->address , 494 (*it)->address << 2 , 489 495 (*it)->is_delay_slot , 490 496 (*it)->use_store_queue , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/src/Reexecute_unit_genMealy_commit.cpp
r97 r98 21 21 { 22 22 log_begin(Reexecute_unit,FUNCTION); 23 log_function(Reexecute_unit,FUNCTION,_name.c_str()); 23 24 24 25 // Initialisation -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/src/Reexecute_unit_genMealy_reexecute.cpp
r88 r98 22 22 { 23 23 log_begin(Reexecute_unit,FUNCTION); 24 log_function(Reexecute_unit,FUNCTION,_name.c_str()); 24 25 25 26 // =================================================================== -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/src/Reexecute_unit_genMoore.cpp
r88 r98 22 22 { 23 23 log_begin(Reexecute_unit,FUNCTION); 24 log_function(Reexecute_unit,FUNCTION,_name.c_str()); 24 25 25 26 // =================================================================== -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/src/Reexecute_unit_transition.cpp
r88 r98 22 22 { 23 23 log_begin(Reexecute_unit,FUNCTION); 24 log_function(Reexecute_unit,FUNCTION,_name.c_str()); 24 25 25 26 if (PORT_READ(in_NRESET) == 0) … … 135 136 } 136 137 138 #if ((DEBUG >= DEBUG_TRACE) and DEBUG_Reexecute_unit) 139 log_printf(TRACE,Reexecute_unit,FUNCTION," * Dump Reexecute_queue"); 140 141 for (uint32_t i=0; i<_param->_nb_bank; ++i) 142 { 143 uint32_t j=0; 144 for (std::list<entry_t *>::iterator it=_reexecute_queue[i].begin(); 145 it!=_reexecute_queue[i].end(); 146 ++it) 147 { 148 log_printf(TRACE,Reexecute_unit,FUNCTION," [%.4d][%.4d] %.4d %.4d %.4d, %.1d %.1d, %.4d %.4d, %.8x (%.2d %.4d) %.8x, %.1d %.5d, %s", 149 i, 150 j, 151 (*it)->context_id , 152 (*it)->front_end_id , 153 (*it)->packet_id , 154 (*it)->spr_wen , 155 (*it)->reexecute , 156 (*it)->type , 157 (*it)->operation , 158 (*it)->address , 159 ((*it)->address >> _param->_shift_spr_num_group) & _param->_mask_spr_num_group, 160 ((*it)->address ) & _param->_mask_spr_num_reg , 161 (*it)->data , 162 (*it)->write_rd , 163 (*it)->num_reg_rd , 164 toString((*it)->state).c_str()); 165 166 ++j; 167 } 168 } 169 // // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 170 // private : std::list<entry_t *> * _reexecute_queue ;//[nb_bank] 171 typedef struct 172 { 173 } entry_t; 174 175 #endif 176 137 177 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 138 178 end_cycle (); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_transition.cpp
r88 r98 132 132 133 133 for (uint32_t k=0; k<_param->_nb_general_register_logic; ++k) 134 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * GPR[%. 2d] - %.5d %.1d",k,rat_gpr[i][j][k],rat_gpr_update_table[i][j][k]);134 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * GPR[%.4d] - %.5d %.1d",k,rat_gpr[i][j][k],rat_gpr_update_table[i][j][k]); 135 135 136 136 for (uint32_t k=0; k<_param->_nb_special_register_logic; ++k) 137 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * SPR[%. 2d] - %.5d %.1d",k,rat_spr[i][j][k],rat_spr_update_table[i][j][k]);137 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * SPR[%.4d] - %.5d %.1d",k,rat_spr[i][j][k],rat_spr_update_table[i][j][k]); 138 138 } 139 139 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/SelfTest/src/test.cpp
r88 r98 50 50 sc_signal<Tcontrol_t> * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET"); 51 51 52 ALLOC1_SC_SIGNAL( in_INSERT_RENAME_VAL ," in_INSERT_RENAME_VAL ",Tcontrol_t,_param->_nb_inst_insert); 53 ALLOC1_SC_SIGNAL(out_INSERT_RENAME_ACK ,"out_INSERT_RENAME_ACK ",Tcontrol_t,_param->_nb_inst_insert); 54 ALLOC1_SC_SIGNAL(out_INSERT_INSERT_VAL ,"out_INSERT_INSERT_VAL ",Tcontrol_t,_param->_nb_inst_insert); 55 ALLOC1_SC_SIGNAL( in_INSERT_INSERT_ACK ," in_INSERT_INSERT_ACK ",Tcontrol_t,_param->_nb_inst_insert); 56 ALLOC1_SC_SIGNAL(out_INSERT_RAT_INSERT_VAL,"out_INSERT_RAT_INSERT_VAL",Tcontrol_t,_param->_nb_inst_insert); 57 ALLOC1_SC_SIGNAL( in_INSERT_RAT_RENAME_ACK," in_INSERT_RAT_RENAME_ACK",Tcontrol_t,_param->_nb_inst_insert); 58 ALLOC1_SC_SIGNAL( in_INSERT_RAT_INSERT_ACK," in_INSERT_RAT_INSERT_ACK",Tcontrol_t,_param->_nb_inst_insert); 59 ALLOC1_SC_SIGNAL(out_INSERT_FREE_LIST_VAL ,"out_INSERT_FREE_LIST_VAL ",Tcontrol_t,_param->_nb_inst_insert); 60 ALLOC1_SC_SIGNAL( in_INSERT_FREE_LIST_ACK ," in_INSERT_FREE_LIST_ACK ",Tcontrol_t,_param->_nb_inst_insert); 61 ALLOC1_SC_SIGNAL(out_INSERT_STAT_LIST_VAL ,"out_INSERT_STAT_LIST_VAL ",Tcontrol_t,_param->_nb_inst_insert); 62 ALLOC1_SC_SIGNAL( in_INSERT_STAT_LIST_ACK ," in_INSERT_STAT_LIST_ACK ",Tcontrol_t,_param->_nb_inst_insert); 52 ALLOC1_SC_SIGNAL( in_INSERT_RENAME_VAL ," in_INSERT_RENAME_VAL ",Tcontrol_t,_param->_nb_inst_insert); 53 ALLOC1_SC_SIGNAL(out_INSERT_RENAME_ACK ,"out_INSERT_RENAME_ACK ",Tcontrol_t,_param->_nb_inst_insert); 54 ALLOC1_SC_SIGNAL(out_INSERT_INSERT_VAL ,"out_INSERT_INSERT_VAL ",Tcontrol_t,_param->_nb_inst_insert); 55 ALLOC1_SC_SIGNAL( in_INSERT_INSERT_ACK ," in_INSERT_INSERT_ACK ",Tcontrol_t,_param->_nb_inst_insert); 56 ALLOC1_SC_SIGNAL(out_INSERT_RAT_INSERT_VAL ,"out_INSERT_RAT_INSERT_VAL ",Tcontrol_t,_param->_nb_inst_insert); 57 ALLOC1_SC_SIGNAL( in_INSERT_RAT_RENAME_ACK ," in_INSERT_RAT_RENAME_ACK ",Tcontrol_t,_param->_nb_inst_insert); 58 ALLOC1_SC_SIGNAL( in_INSERT_RAT_INSERT_ACK ," in_INSERT_RAT_INSERT_ACK ",Tcontrol_t,_param->_nb_inst_insert); 59 ALLOC1_SC_SIGNAL(out_INSERT_FREE_LIST_VAL ,"out_INSERT_FREE_LIST_VAL ",Tcontrol_t,_param->_nb_inst_insert); 60 ALLOC1_SC_SIGNAL( in_INSERT_FREE_LIST_ACK ," in_INSERT_FREE_LIST_ACK ",Tcontrol_t,_param->_nb_inst_insert); 61 ALLOC1_SC_SIGNAL(out_INSERT_FREE_LIST_GPR_VAL ,"out_INSERT_FREE_LIST_GPR_VAL ",Tcontrol_t,_param->_nb_inst_insert); 62 ALLOC1_SC_SIGNAL(out_INSERT_FREE_LIST_SPR_VAL ,"out_INSERT_FREE_LIST_SPR_VAL ",Tcontrol_t,_param->_nb_inst_insert); 63 ALLOC1_SC_SIGNAL(out_INSERT_STAT_LIST_VAL ,"out_INSERT_STAT_LIST_VAL ",Tcontrol_t,_param->_nb_inst_insert); 64 ALLOC1_SC_SIGNAL( in_INSERT_STAT_LIST_ACK ," in_INSERT_STAT_LIST_ACK ",Tcontrol_t,_param->_nb_inst_insert); 63 65 64 66 ALLOC1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_READ_RA ," in_INSERT_DEPENDENCY_CHECKING_READ_RA ",Tcontrol_t ,_param->_nb_inst_insert); … … 126 128 (*(_Register_translation_unit_Glue->in_NRESET)) (*(in_NRESET)); 127 129 128 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_RENAME_VAL ,_param->_nb_inst_insert); 129 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_RENAME_ACK ,_param->_nb_inst_insert); 130 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_INSERT_VAL ,_param->_nb_inst_insert); 131 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_INSERT_ACK ,_param->_nb_inst_insert); 132 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_RAT_INSERT_VAL,_param->_nb_inst_insert); 133 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_RAT_RENAME_ACK,_param->_nb_inst_insert); 134 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_RAT_INSERT_ACK,_param->_nb_inst_insert); 135 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_FREE_LIST_VAL ,_param->_nb_inst_insert); 136 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_FREE_LIST_ACK ,_param->_nb_inst_insert); 137 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_STAT_LIST_VAL ,_param->_nb_inst_insert); 138 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_STAT_LIST_ACK ,_param->_nb_inst_insert); 130 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_RENAME_VAL ,_param->_nb_inst_insert); 131 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_RENAME_ACK ,_param->_nb_inst_insert); 132 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_INSERT_VAL ,_param->_nb_inst_insert); 133 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_INSERT_ACK ,_param->_nb_inst_insert); 134 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_RAT_INSERT_VAL ,_param->_nb_inst_insert); 135 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_RAT_RENAME_ACK ,_param->_nb_inst_insert); 136 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_RAT_INSERT_ACK ,_param->_nb_inst_insert); 137 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_FREE_LIST_VAL ,_param->_nb_inst_insert); 138 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_FREE_LIST_ACK ,_param->_nb_inst_insert); 139 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_FREE_LIST_GPR_VAL ,_param->_nb_inst_insert); 140 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_FREE_LIST_SPR_VAL ,_param->_nb_inst_insert); 141 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_STAT_LIST_VAL ,_param->_nb_inst_insert); 142 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_STAT_LIST_ACK ,_param->_nb_inst_insert); 139 143 140 144 INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_DEPENDENCY_CHECKING_READ_RA ,_param->_nb_inst_insert); … … 243 247 for (uint32_t i=0; i<_param->_nb_inst_insert;i++) 244 248 { 245 TEST(Tcontrol_t,out_INSERT_RENAME_ACK [i]->read(),(in_INSERT_INSERT_ACK [i]->read() and 246 in_INSERT_RAT_RENAME_ACK [i]->read() and 247 in_INSERT_RAT_INSERT_ACK [i]->read() and 248 in_INSERT_FREE_LIST_ACK [i]->read() and 249 in_INSERT_STAT_LIST_ACK [i]->read() )); 250 TEST(Tcontrol_t,out_INSERT_INSERT_VAL [i]->read(),(in_INSERT_RENAME_VAL [i]->read() and 251 in_INSERT_RAT_RENAME_ACK [i]->read() and 252 in_INSERT_RAT_INSERT_ACK [i]->read() and 253 in_INSERT_FREE_LIST_ACK [i]->read() and 254 in_INSERT_STAT_LIST_ACK [i]->read() )); 255 TEST(Tcontrol_t,out_INSERT_RAT_INSERT_VAL [i]->read(),(in_INSERT_RENAME_VAL [i]->read() and 256 in_INSERT_INSERT_ACK [i]->read() and 257 in_INSERT_RAT_RENAME_ACK [i]->read() and 258 in_INSERT_FREE_LIST_ACK [i]->read() and 259 in_INSERT_STAT_LIST_ACK [i]->read() )); 260 TEST(Tcontrol_t,out_INSERT_FREE_LIST_VAL [i]->read(),(in_INSERT_RENAME_VAL [i]->read() and 261 in_INSERT_INSERT_ACK [i]->read() and 262 in_INSERT_RAT_RENAME_ACK [i]->read() and 263 in_INSERT_RAT_INSERT_ACK [i]->read() and 264 in_INSERT_STAT_LIST_ACK [i]->read() )); 265 TEST(Tcontrol_t,out_INSERT_STAT_LIST_VAL [i]->read(),(in_INSERT_RENAME_VAL [i]->read() and 266 in_INSERT_INSERT_ACK [i]->read() and 267 in_INSERT_RAT_RENAME_ACK [i]->read() and 268 in_INSERT_RAT_INSERT_ACK [i]->read() and 269 in_INSERT_FREE_LIST_ACK [i]->read() )); 249 TEST(Tcontrol_t,out_INSERT_RENAME_ACK [i]->read(),(in_INSERT_INSERT_ACK [i]->read() and 250 in_INSERT_RAT_RENAME_ACK [i]->read() and 251 in_INSERT_RAT_INSERT_ACK [i]->read() and 252 in_INSERT_FREE_LIST_ACK [i]->read() and 253 in_INSERT_STAT_LIST_ACK [i]->read() )); 254 TEST(Tcontrol_t,out_INSERT_INSERT_VAL [i]->read(),(in_INSERT_RENAME_VAL [i]->read() and 255 in_INSERT_RAT_RENAME_ACK [i]->read() and 256 in_INSERT_RAT_INSERT_ACK [i]->read() and 257 in_INSERT_FREE_LIST_ACK [i]->read() and 258 in_INSERT_STAT_LIST_ACK [i]->read() )); 259 TEST(Tcontrol_t,out_INSERT_RAT_INSERT_VAL [i]->read(),(in_INSERT_RENAME_VAL [i]->read() and 260 in_INSERT_INSERT_ACK [i]->read() and 261 in_INSERT_RAT_RENAME_ACK [i]->read() and 262 in_INSERT_FREE_LIST_ACK [i]->read() and 263 in_INSERT_STAT_LIST_ACK [i]->read() )); 264 TEST(Tcontrol_t,out_INSERT_FREE_LIST_VAL [i]->read(),(in_INSERT_RENAME_VAL [i]->read() and 265 in_INSERT_INSERT_ACK [i]->read() and 266 in_INSERT_RAT_RENAME_ACK [i]->read() and 267 in_INSERT_RAT_INSERT_ACK [i]->read() and 268 in_INSERT_STAT_LIST_ACK [i]->read() )); 269 TEST(Tcontrol_t,out_INSERT_FREE_LIST_GPR_VAL [i]->read(),(in_INSERT_DEPENDENCY_CHECKING_WRITE_RD[i]->read() and 270 (in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_LOG[i]->read()!=0))); 271 TEST(Tcontrol_t,out_INSERT_FREE_LIST_SPR_VAL [i]->read(),(in_INSERT_DEPENDENCY_CHECKING_WRITE_RE[i]->read())); 272 TEST(Tcontrol_t,out_INSERT_STAT_LIST_VAL [i]->read(),(in_INSERT_RENAME_VAL [i]->read() and 273 in_INSERT_INSERT_ACK [i]->read() and 274 in_INSERT_RAT_RENAME_ACK [i]->read() and 275 in_INSERT_RAT_INSERT_ACK [i]->read() and 276 in_INSERT_FREE_LIST_ACK [i]->read() )); 270 277 } 271 278 … … 295 302 delete in_NRESET; 296 303 297 DELETE1_SC_SIGNAL( in_INSERT_RENAME_VAL ,_param->_nb_inst_insert); 298 DELETE1_SC_SIGNAL(out_INSERT_RENAME_ACK ,_param->_nb_inst_insert); 299 DELETE1_SC_SIGNAL(out_INSERT_INSERT_VAL ,_param->_nb_inst_insert); 300 DELETE1_SC_SIGNAL( in_INSERT_INSERT_ACK ,_param->_nb_inst_insert); 301 DELETE1_SC_SIGNAL(out_INSERT_RAT_INSERT_VAL,_param->_nb_inst_insert); 302 DELETE1_SC_SIGNAL( in_INSERT_RAT_RENAME_ACK,_param->_nb_inst_insert); 303 DELETE1_SC_SIGNAL( in_INSERT_RAT_INSERT_ACK,_param->_nb_inst_insert); 304 DELETE1_SC_SIGNAL(out_INSERT_FREE_LIST_VAL ,_param->_nb_inst_insert); 305 DELETE1_SC_SIGNAL( in_INSERT_FREE_LIST_ACK ,_param->_nb_inst_insert); 306 DELETE1_SC_SIGNAL(out_INSERT_STAT_LIST_VAL ,_param->_nb_inst_insert); 307 DELETE1_SC_SIGNAL( in_INSERT_STAT_LIST_ACK ,_param->_nb_inst_insert); 304 DELETE1_SC_SIGNAL( in_INSERT_RENAME_VAL ,_param->_nb_inst_insert); 305 DELETE1_SC_SIGNAL(out_INSERT_RENAME_ACK ,_param->_nb_inst_insert); 306 DELETE1_SC_SIGNAL(out_INSERT_INSERT_VAL ,_param->_nb_inst_insert); 307 DELETE1_SC_SIGNAL( in_INSERT_INSERT_ACK ,_param->_nb_inst_insert); 308 DELETE1_SC_SIGNAL(out_INSERT_RAT_INSERT_VAL ,_param->_nb_inst_insert); 309 DELETE1_SC_SIGNAL( in_INSERT_RAT_RENAME_ACK ,_param->_nb_inst_insert); 310 DELETE1_SC_SIGNAL( in_INSERT_RAT_INSERT_ACK ,_param->_nb_inst_insert); 311 DELETE1_SC_SIGNAL(out_INSERT_FREE_LIST_VAL ,_param->_nb_inst_insert); 312 DELETE1_SC_SIGNAL( in_INSERT_FREE_LIST_ACK ,_param->_nb_inst_insert); 313 DELETE1_SC_SIGNAL(out_INSERT_FREE_LIST_GPR_VAL ,_param->_nb_inst_insert); 314 DELETE1_SC_SIGNAL(out_INSERT_FREE_LIST_SPR_VAL ,_param->_nb_inst_insert); 315 DELETE1_SC_SIGNAL(out_INSERT_STAT_LIST_VAL ,_param->_nb_inst_insert); 316 DELETE1_SC_SIGNAL( in_INSERT_STAT_LIST_ACK ,_param->_nb_inst_insert); 308 317 309 318 DELETE1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_READ_RA ,_param->_nb_inst_insert); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/include/Register_translation_unit_Glue.h
r88 r98 73 73 public : SC_OUT(Tcontrol_t) ** out_INSERT_FREE_LIST_VAL ;//[nb_inst_insert] 74 74 public : SC_IN (Tcontrol_t) ** in_INSERT_FREE_LIST_ACK ;//[nb_inst_insert] 75 public : SC_OUT(Tcontrol_t) ** out_INSERT_FREE_LIST_GPR_VAL ;//[nb_inst_insert] 76 public : SC_OUT(Tcontrol_t) ** out_INSERT_FREE_LIST_SPR_VAL ;//[nb_inst_insert] 75 77 public : SC_OUT(Tcontrol_t) ** out_INSERT_STAT_LIST_VAL ;//[nb_inst_insert] 76 78 public : SC_IN (Tcontrol_t) ** in_INSERT_STAT_LIST_ACK ;//[nb_inst_insert] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/src/Register_translation_unit_Glue_allocation.cpp
r88 r98 61 61 ALLOC1_INTERFACE("insert",OUT, EAST, "insert's interface", _param->_nb_inst_insert); 62 62 63 ALLOC1_SIGNAL_IN ( in_INSERT_RENAME_VAL ,"rename_val" ,Tcontrol_t,1); 64 ALLOC1_SIGNAL_OUT(out_INSERT_RENAME_ACK ,"rename_ack" ,Tcontrol_t,1); 65 ALLOC1_SIGNAL_OUT(out_INSERT_INSERT_VAL ,"insert_val" ,Tcontrol_t,1); 66 ALLOC1_SIGNAL_IN ( in_INSERT_INSERT_ACK ,"insert_ack" ,Tcontrol_t,1); 67 ALLOC1_SIGNAL_OUT(out_INSERT_RAT_INSERT_VAL,"rat_insert_val",Tcontrol_t,1); 68 ALLOC1_SIGNAL_IN ( in_INSERT_RAT_RENAME_ACK,"rat_rename_ack",Tcontrol_t,1); 69 ALLOC1_SIGNAL_IN ( in_INSERT_RAT_INSERT_ACK,"rat_insert_ack",Tcontrol_t,1); 70 ALLOC1_SIGNAL_OUT(out_INSERT_FREE_LIST_VAL ,"free_list_val" ,Tcontrol_t,1); 71 ALLOC1_SIGNAL_IN ( in_INSERT_FREE_LIST_ACK ,"free_list_ack" ,Tcontrol_t,1); 72 ALLOC1_SIGNAL_OUT(out_INSERT_STAT_LIST_VAL ,"stat_list_val" ,Tcontrol_t,1); 73 ALLOC1_SIGNAL_IN ( in_INSERT_STAT_LIST_ACK ,"stat_list_ack" ,Tcontrol_t,1); 63 ALLOC1_SIGNAL_IN ( in_INSERT_RENAME_VAL ,"rename_val" ,Tcontrol_t,1); 64 ALLOC1_SIGNAL_OUT(out_INSERT_RENAME_ACK ,"rename_ack" ,Tcontrol_t,1); 65 ALLOC1_SIGNAL_OUT(out_INSERT_INSERT_VAL ,"insert_val" ,Tcontrol_t,1); 66 ALLOC1_SIGNAL_IN ( in_INSERT_INSERT_ACK ,"insert_ack" ,Tcontrol_t,1); 67 ALLOC1_SIGNAL_OUT(out_INSERT_RAT_INSERT_VAL ,"rat_insert_val" ,Tcontrol_t,1); 68 ALLOC1_SIGNAL_IN ( in_INSERT_RAT_RENAME_ACK ,"rat_rename_ack" ,Tcontrol_t,1); 69 ALLOC1_SIGNAL_IN ( in_INSERT_RAT_INSERT_ACK ,"rat_insert_ack" ,Tcontrol_t,1); 70 ALLOC1_SIGNAL_OUT(out_INSERT_FREE_LIST_VAL ,"free_list_val" ,Tcontrol_t,1); 71 ALLOC1_SIGNAL_IN ( in_INSERT_FREE_LIST_ACK ,"free_list_ack" ,Tcontrol_t,1); 72 ALLOC1_SIGNAL_OUT(out_INSERT_FREE_LIST_GPR_VAL ,"free_list_gpr_val" ,Tcontrol_t,1); 73 ALLOC1_SIGNAL_OUT(out_INSERT_FREE_LIST_SPR_VAL ,"free_list_spr_val" ,Tcontrol_t,1); 74 ALLOC1_SIGNAL_OUT(out_INSERT_STAT_LIST_VAL ,"stat_list_val" ,Tcontrol_t,1); 75 ALLOC1_SIGNAL_IN ( in_INSERT_STAT_LIST_ACK ,"stat_list_ack" ,Tcontrol_t,1); 74 76 75 77 ALLOC1_SIGNAL_IN ( in_INSERT_DEPENDENCY_CHECKING_READ_RA ,"DEPENDENCY_CHECKING_READ_RA" ,Tcontrol_t ,1); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/src/Register_translation_unit_Glue_deallocation.cpp
r88 r98 30 30 delete in_NRESET; 31 31 32 DELETE1_SIGNAL( in_INSERT_RENAME_VAL ,_param->_nb_inst_insert,1); 33 DELETE1_SIGNAL(out_INSERT_RENAME_ACK ,_param->_nb_inst_insert,1); 34 DELETE1_SIGNAL(out_INSERT_INSERT_VAL ,_param->_nb_inst_insert,1); 35 DELETE1_SIGNAL( in_INSERT_INSERT_ACK ,_param->_nb_inst_insert,1); 36 DELETE1_SIGNAL(out_INSERT_RAT_INSERT_VAL,_param->_nb_inst_insert,1); 37 DELETE1_SIGNAL( in_INSERT_RAT_RENAME_ACK,_param->_nb_inst_insert,1); 38 DELETE1_SIGNAL( in_INSERT_RAT_INSERT_ACK,_param->_nb_inst_insert,1); 39 DELETE1_SIGNAL(out_INSERT_FREE_LIST_VAL ,_param->_nb_inst_insert,1); 40 DELETE1_SIGNAL( in_INSERT_FREE_LIST_ACK ,_param->_nb_inst_insert,1); 41 DELETE1_SIGNAL(out_INSERT_STAT_LIST_VAL ,_param->_nb_inst_insert,1); 42 DELETE1_SIGNAL( in_INSERT_STAT_LIST_ACK ,_param->_nb_inst_insert,1); 32 DELETE1_SIGNAL( in_INSERT_RENAME_VAL ,_param->_nb_inst_insert,1); 33 DELETE1_SIGNAL(out_INSERT_RENAME_ACK ,_param->_nb_inst_insert,1); 34 DELETE1_SIGNAL(out_INSERT_INSERT_VAL ,_param->_nb_inst_insert,1); 35 DELETE1_SIGNAL( in_INSERT_INSERT_ACK ,_param->_nb_inst_insert,1); 36 DELETE1_SIGNAL(out_INSERT_RAT_INSERT_VAL ,_param->_nb_inst_insert,1); 37 DELETE1_SIGNAL( in_INSERT_RAT_RENAME_ACK ,_param->_nb_inst_insert,1); 38 DELETE1_SIGNAL( in_INSERT_RAT_INSERT_ACK ,_param->_nb_inst_insert,1); 39 DELETE1_SIGNAL(out_INSERT_FREE_LIST_VAL ,_param->_nb_inst_insert,1); 40 DELETE1_SIGNAL( in_INSERT_FREE_LIST_ACK ,_param->_nb_inst_insert,1); 41 DELETE1_SIGNAL(out_INSERT_FREE_LIST_GPR_VAL ,_param->_nb_inst_insert,1); 42 DELETE1_SIGNAL(out_INSERT_FREE_LIST_SPR_VAL ,_param->_nb_inst_insert,1); 43 DELETE1_SIGNAL(out_INSERT_STAT_LIST_VAL ,_param->_nb_inst_insert,1); 44 DELETE1_SIGNAL( in_INSERT_STAT_LIST_ACK ,_param->_nb_inst_insert,1); 43 45 44 46 DELETE1_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_READ_RA ,_param->_nb_inst_insert,1); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/src/Register_translation_unit_Glue_genMealy_insert.cpp
r88 r98 36 36 Tcontrol_t WRITE_RD = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_WRITE_RD [i]); 37 37 Tgeneral_address_t NUM_REG_RD_LOG = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_LOG [i]); 38 Tgeneral_address_t NUM_REG_RD_PHY_OLD = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_OLD [i]);39 Tgeneral_address_t NUM_REG_RD_PHY_NEW = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_NEW [i]);38 Tgeneral_address_t NUM_REG_RD_PHY_OLD = (NUM_REG_RD_LOG!=0)?PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_OLD [i]):0; 39 Tgeneral_address_t NUM_REG_RD_PHY_NEW = (NUM_REG_RD_LOG!=0)?PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_NEW [i]):0; 40 40 Tcontrol_t WRITE_RE = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_WRITE_RE [i]); 41 41 Tspecial_address_t NUM_REG_RE_LOG = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_LOG [i]); 42 42 Tspecial_address_t NUM_REG_RE_PHY_OLD = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_OLD [i]); 43 43 Tspecial_address_t NUM_REG_RE_PHY_NEW = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_NEW [i]); 44 45 PORT_WRITE(out_INSERT_FREE_LIST_GPR_VAL [i], WRITE_RD and (NUM_REG_RD_LOG!=0)); 46 PORT_WRITE(out_INSERT_FREE_LIST_SPR_VAL [i], WRITE_RE ); 44 47 45 48 PORT_WRITE(out_INSERT_STAT_LIST_READ_RA [i], READ_RA ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Register_translation_unit_allocation.cpp
r88 r98 384 384 #endif 385 385 386 PORT_MAP(_component,src , "in_POP_"+toString(i)+"_GPR_VAL" ,387 dest,"in_RENAME_"+toString(i)+"_WRITE_RD");388 PORT_MAP(_component,src , "in_POP_"+toString(i)+"_SPR_VAL" ,389 dest,"in_RENAME_"+toString(i)+"_WRITE_RE");390 391 386 dest = _name+"_register_translation_unit_glue"; 392 387 COMPONENT_MAP(_component,src , "in_POP_"+toString(i)+"_VAL" , … … 394 389 COMPONENT_MAP(_component,src ,"out_POP_"+toString(i)+"_ACK" , 395 390 dest, "in_INSERT_"+toString(i)+"_FREE_LIST_ACK" ); 391 COMPONENT_MAP(_component,src , "in_POP_"+toString(i)+"_GPR_VAL" , 392 dest,"out_INSERT_"+toString(i)+"_FREE_LIST_GPR_VAL"); 393 COMPONENT_MAP(_component,src , "in_POP_"+toString(i)+"_SPR_VAL" , 394 dest,"out_INSERT_"+toString(i)+"_FREE_LIST_SPR_VAL"); 396 395 397 396 dest = _name+"_dependency_checking_unit"; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/SelfTest/src/test.cpp
r97 r98 132 132 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_DEPTH ,"out_BRANCH_COMPLETE_DEPTH ",Tdepth_t ,_param->_nb_inst_branch_complete); 133 133 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS ,"out_BRANCH_COMPLETE_ADDRESS ",Taddress_t ,_param->_nb_inst_branch_complete); 134 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ FLAG ,"out_BRANCH_COMPLETE_FLAG",Tcontrol_t ,_param->_nb_inst_branch_complete);134 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_NO_SEQUENCE ,"out_BRANCH_COMPLETE_NO_SEQUENCE ",Tcontrol_t ,_param->_nb_inst_branch_complete); 135 135 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_MISS_PREDICTION ," in_BRANCH_COMPLETE_MISS_PREDICTION ",Tcontrol_t ,_param->_nb_inst_branch_complete); 136 136 … … 268 268 // INSTANCE1_SC_SIGNAL(_OOO_Engine,out_RETIRE_RE_NEW_NUM_REG ,_param->_sum_inst_retire); 269 269 270 INSTANCE1_SC_SIGNAL(_OOO_Engine,out_BRANCH_COMPLETE_VAL ,_param->_nb_inst_ issue);271 INSTANCE1_SC_SIGNAL(_OOO_Engine, in_BRANCH_COMPLETE_ACK ,_param->_nb_inst_ issue);270 INSTANCE1_SC_SIGNAL(_OOO_Engine,out_BRANCH_COMPLETE_VAL ,_param->_nb_inst_branch_complete); 271 INSTANCE1_SC_SIGNAL(_OOO_Engine, in_BRANCH_COMPLETE_ACK ,_param->_nb_inst_branch_complete); 272 272 if (_param->_have_port_front_end_id) 273 INSTANCE1_SC_SIGNAL(_OOO_Engine,out_BRANCH_COMPLETE_FRONT_END_ID ,_param->_nb_inst_ issue);273 INSTANCE1_SC_SIGNAL(_OOO_Engine,out_BRANCH_COMPLETE_FRONT_END_ID ,_param->_nb_inst_branch_complete); 274 274 if (_param->_have_port_context_id) 275 INSTANCE1_SC_SIGNAL(_OOO_Engine,out_BRANCH_COMPLETE_CONTEXT_ID ,_param->_nb_inst_ issue);275 INSTANCE1_SC_SIGNAL(_OOO_Engine,out_BRANCH_COMPLETE_CONTEXT_ID ,_param->_nb_inst_branch_complete); 276 276 if (_param->_have_port_depth) 277 INSTANCE1_SC_SIGNAL(_OOO_Engine,out_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_ issue);278 INSTANCE1_SC_SIGNAL(_OOO_Engine,out_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_ issue);279 INSTANCE1_SC_SIGNAL(_OOO_Engine,out_BRANCH_COMPLETE_ FLAG ,_param->_nb_inst_issue);280 INSTANCE1_SC_SIGNAL(_OOO_Engine, in_BRANCH_COMPLETE_MISS_PREDICTION ,_param->_nb_inst_ issue);277 INSTANCE1_SC_SIGNAL(_OOO_Engine,out_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete); 278 INSTANCE1_SC_SIGNAL(_OOO_Engine,out_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_branch_complete); 279 INSTANCE1_SC_SIGNAL(_OOO_Engine,out_BRANCH_COMPLETE_NO_SEQUENCE ,_param->_nb_inst_branch_complete); 280 INSTANCE1_SC_SIGNAL(_OOO_Engine, in_BRANCH_COMPLETE_MISS_PREDICTION ,_param->_nb_inst_branch_complete); 281 281 282 282 INSTANCE_SC_SIGNAL (_OOO_Engine,out_COMMIT_EVENT_VAL ); … … 433 433 DELETE1_SC_SIGNAL(out_INSERT_RE_NUM_REG ,_param->_sum_inst_insert); 434 434 435 // 436 // 437 // 438 // 439 // 440 // 441 // 442 // 443 // 444 // 445 446 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_VAL ,_param->_nb_inst_ issue);447 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_ACK ,_param->_nb_inst_ issue);448 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_FRONT_END_ID ,_param->_nb_inst_ issue);449 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_CONTEXT_ID ,_param->_nb_inst_ issue);450 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_ issue);451 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_ issue);452 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ FLAG ,_param->_nb_inst_issue);453 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_MISS_PREDICTION ,_param->_nb_inst_ issue);435 //DELETE1_SC_SIGNAL(out_RETIRE_VAL ,_param->_sum_inst_retire); 436 //DELETE1_SC_SIGNAL( in_RETIRE_ACK ,_param->_sum_inst_retire); 437 //DELETE1_SC_SIGNAL(out_RETIRE_RD_OLD_USE ,_param->_sum_inst_retire); 438 //DELETE1_SC_SIGNAL(out_RETIRE_RD_OLD_NUM_REG ,_param->_sum_inst_retire); 439 //DELETE1_SC_SIGNAL(out_RETIRE_RD_NEW_USE ,_param->_sum_inst_retire); 440 //DELETE1_SC_SIGNAL(out_RETIRE_RD_NEW_NUM_REG ,_param->_sum_inst_retire); 441 //DELETE1_SC_SIGNAL(out_RETIRE_RE_OLD_USE ,_param->_sum_inst_retire); 442 //DELETE1_SC_SIGNAL(out_RETIRE_RE_OLD_NUM_REG ,_param->_sum_inst_retire); 443 //DELETE1_SC_SIGNAL(out_RETIRE_RE_NEW_USE ,_param->_sum_inst_retire); 444 //DELETE1_SC_SIGNAL(out_RETIRE_RE_NEW_NUM_REG ,_param->_sum_inst_retire); 445 446 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_VAL ,_param->_nb_inst_branch_complete); 447 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_ACK ,_param->_nb_inst_branch_complete); 448 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_FRONT_END_ID ,_param->_nb_inst_branch_complete); 449 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_CONTEXT_ID ,_param->_nb_inst_branch_complete); 450 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete); 451 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_branch_complete); 452 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_NO_SEQUENCE ,_param->_nb_inst_branch_complete); 453 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_MISS_PREDICTION ,_param->_nb_inst_branch_complete); 454 454 455 455 DELETE_SC_SIGNAL (out_COMMIT_EVENT_VAL ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/include/SPR.h
r88 r98 34 34 public : Tspr_t read (void ) 35 35 { 36 return x =0;36 return x; 37 37 }; 38 38 public : void write (Tspr_t x) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/src/Special_Register_unit_allocation.cpp
r88 r98 148 148 { 149 149 _spr [i][j][k] = new SPR * [NB_REG_GROUP[k]]; 150 150 151 for (uint32_t l=0; l<NB_REG_GROUP[k]; l++) 152 _spr [i][j][k][l] = NULL; 153 151 154 switch (k) 152 155 { … … 218 221 default : 219 222 { 220 for (uint32_t l=0; l<NB_REG_GROUP[k]; l++)221 _spr [i][j][k][l] = NULL;222 223 } 223 224 } … … 232 233 for (uint32_t k=0; k<NB_GROUP; k++) 233 234 if (_param->_implement_group [i][j][k]) 234 for (uint32_t l=0; l<NB_REG_GROUP[k]; l++) 235 if (_spr [i][j][k][l] == NULL) 236 _spr_access_mode [i][j]->invalid_register (k,l); 235 { 236 for (uint32_t l=0; l<NB_REG_GROUP[k]; l++) 237 if (_spr [i][j][k][l] == NULL) 238 _spr_access_mode [i][j]->invalid_register (k,l); 239 } 240 else 241 { 242 for (uint32_t l=0; l<NB_REG_GROUP[k]; l++) 243 _spr_access_mode [i][j]->invalid_register (k,l); 244 } 237 245 238 246 #ifdef POSITION -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/src/Special_Register_unit_deallocation.cpp
r88 r98 77 77 for (uint32_t k=0; k<NB_GROUP; k++) 78 78 { 79 if (_param->_implement_group [i][j][k])79 if (_spr [i][j][k] != NULL) 80 80 { 81 81 for (uint32_t l=0; l<NB_REG_GROUP[k]; l++) 82 if (_spr [i][j][k] != NULL)82 if (_spr [i][j][k][l] != NULL) 83 83 delete _spr [i][j][k][l]; 84 84 delete [] _spr [i][j][k]; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/src/Special_Register_unit_genMealy_spr_access.cpp
r88 r98 22 22 { 23 23 log_begin(Special_Register_unit,FUNCTION); 24 24 log_function(Special_Register_unit,FUNCTION,_name.c_str()); 25 25 26 26 // =================================================================== … … 28 28 // =================================================================== 29 29 for (uint32_t i=0; i<_param->_nb_inst_reexecute; i++) 30 // if (PORT_READ(in_SPR_ACCESS_VAL [i]) and not PORT_READ(in_SPR_ACCESS_WEN [i])) 30 // not necessery if have not read enable 31 if (PORT_READ(in_SPR_ACCESS_VAL [i])) 31 32 { 33 log_printf(TRACE,Special_Register_unit,FUNCTION," * SPR_ACCESS [%d]",i); 34 32 35 Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_SPR_ACCESS_FRONT_END_ID [i]):0; 33 36 Tcontext_t context_id = (_param->_have_port_context_id )?PORT_READ(in_SPR_ACCESS_CONTEXT_ID [i]):0; … … 35 38 Tspr_address_t num_reg = PORT_READ(in_SPR_ACCESS_NUM_REG [i]); 36 39 40 log_printf(TRACE,Special_Register_unit,FUNCTION," * front_end_id : %d",front_end_id); 41 log_printf(TRACE,Special_Register_unit,FUNCTION," * context_id : %d",context_id ); 42 log_printf(TRACE,Special_Register_unit,FUNCTION," * num_group : %d",num_group ); 43 log_printf(TRACE,Special_Register_unit,FUNCTION," * num_reg : %d",num_reg ); 44 45 #ifdef DEBUG_TEST 46 if (not _spr_access_mode [front_end_id][context_id]->exist(num_group,num_reg)) 47 msgWarning("Access at an invalid special register (group %d, register %d)\n",num_group,num_reg); 48 #endif 49 37 50 SR * sr = static_cast<SR*>(_spr [front_end_id][context_id][GROUP_SYSTEM_AND_CONTROL][SPR_SR]); 38 51 … … 43 56 sm, 44 57 sumra); 45 46 PORT_WRITE(out_SPR_ACCESS_RDATA [i], (valid)?_spr[front_end_id][context_id][num_group][num_reg]->read():0); 47 PORT_WRITE(out_SPR_ACCESS_INVALID [i], not valid); 58 59 log_printf(TRACE,Special_Register_unit,FUNCTION," * SM : %d",sm); 60 log_printf(TRACE,Special_Register_unit,FUNCTION," * SUMRA : %d",sumra); 61 log_printf(TRACE,Special_Register_unit,FUNCTION," * valid : %d",valid); 62 63 // ISA OpenRISC : no action/exception if unauthorised spr access. Also, read 0. 64 // if (not PORT_READ(in_SPR_ACCESS_WEN [i])) 65 // { 66 Tspr_t rdata = (valid)?(_spr[front_end_id][context_id][num_group][num_reg]->read()):0; 67 68 log_printf(TRACE,Special_Register_unit,FUNCTION," * rdata : %.8x",rdata); 69 70 PORT_WRITE(out_SPR_ACCESS_RDATA [i], rdata); 71 // } 72 PORT_WRITE(out_SPR_ACCESS_INVALID [i], not valid); 48 73 } 49 74 50 #if defined(STATISTICS) or defined(VHDL_TESTBENCH)51 end_cycle ();52 #endif53 54 75 log_end(Special_Register_unit,FUNCTION); 55 76 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/src/Special_Register_unit_genMoore.cpp
r88 r98 22 22 { 23 23 log_begin(Special_Register_unit,FUNCTION); 24 log_function(Special_Register_unit,FUNCTION,_name.c_str()); 24 25 25 26 // =================================================================== -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/src/Special_Register_unit_transition.cpp
r97 r98 22 22 { 23 23 log_begin(Special_Register_unit,FUNCTION); 24 log_function(Special_Register_unit,FUNCTION,_name.c_str()); 24 25 25 26 if (PORT_READ(in_NRESET) == 0) … … 38 39 throw ERRORMORPHEO(FUNCTION,toString(_("Register [%d][%d] is not implemented.\n"),k,l)); 39 40 #endif 40 log_printf(TRACE,Special_Register_unit,FUNCTION," Reset SPR [%d][%d][%d][%d]",i,j,k,l);41 log_printf(TRACE,Special_Register_unit,FUNCTION," * Reset SPR [%d][%d][%d][%d]",i,j,k,l); 41 42 _spr [i][j][k][l]->reset(); 42 43 } … … 52 53 if (PORT_READ(in_SPR_ACCESS_WEN [i])) 53 54 { 55 log_printf(TRACE,Special_Register_unit,FUNCTION," * SPR_ACCESS [%d]",i); 56 54 57 Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_SPR_ACCESS_FRONT_END_ID [i]):0; 55 58 Tcontext_t context_id = (_param->_have_port_context_id )?PORT_READ(in_SPR_ACCESS_CONTEXT_ID [i]):0; … … 57 60 Tspr_address_t num_reg = PORT_READ(in_SPR_ACCESS_NUM_REG [i]); 58 61 62 log_printf(TRACE,Special_Register_unit,FUNCTION," * front_end_id : %d",front_end_id); 63 log_printf(TRACE,Special_Register_unit,FUNCTION," * context_id : %d",context_id ); 64 log_printf(TRACE,Special_Register_unit,FUNCTION," * num_group : %d",num_group ); 65 log_printf(TRACE,Special_Register_unit,FUNCTION," * num_reg : %d",num_reg ); 66 59 67 SR * sr = static_cast<SR*>(_spr [front_end_id][context_id][GROUP_SYSTEM_AND_CONTROL][SPR_SR]); 60 68 61 69 Tcontrol_t sm = sr->sm ; 62 70 Tcontrol_t sumra = sr->sumra; 71 Tcontrol_t valid = _spr_access_mode [front_end_id][context_id]->write(spr_address_t(num_group,num_reg), 72 sm, 73 sumra); 74 log_printf(TRACE,Special_Register_unit,FUNCTION," * SM : %d",sm); 75 log_printf(TRACE,Special_Register_unit,FUNCTION," * SUMRA : %d",sumra); 76 log_printf(TRACE,Special_Register_unit,FUNCTION," * valid : %d",valid); 63 77 64 if (_spr_access_mode [front_end_id][context_id]->write(spr_address_t(num_group,num_reg), 65 sm, 66 sumra)) 67 _spr[front_end_id][context_id][num_group][num_reg]->write(PORT_READ(in_SPR_ACCESS_WDATA [i])); 78 if (valid) 79 { 80 Tspr_t wdata = PORT_READ(in_SPR_ACCESS_WDATA [i]); 81 82 log_printf(TRACE,Special_Register_unit,FUNCTION," * wdata : %.8x",wdata); 83 84 _spr[front_end_id][context_id][num_group][num_reg]->write(wdata); 85 } 68 86 69 87 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/include/OOO_Engine.h
r97 r98 157 157 public : SC_OUT(Tdepth_t ) ** out_BRANCH_COMPLETE_DEPTH ;//[nb_inst_branch_complete] 158 158 public : SC_OUT(Taddress_t ) ** out_BRANCH_COMPLETE_ADDRESS ;//[nb_inst_branch_complete] 159 public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_ FLAG;//[nb_inst_branch_complete]159 public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_NO_SEQUENCE ;//[nb_inst_branch_complete] 160 160 public : SC_IN (Tcontrol_t ) ** in_BRANCH_COMPLETE_MISS_PREDICTION ;//[nb_inst_branch_complete] 161 161 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_allocation.cpp
r97 r98 166 166 ALLOC1_SIGNAL_OUT (out_BRANCH_COMPLETE_DEPTH ,"DEPTH" ,Tdepth_t ,_param->_size_depth ); 167 167 ALLOC1_SIGNAL_OUT (out_BRANCH_COMPLETE_ADDRESS ,"ADDRESS" ,Taddress_t ,_param->_size_instruction_address ); 168 ALLOC1_SIGNAL_OUT (out_BRANCH_COMPLETE_ FLAG ,"FLAG",Tcontrol_t ,1 );168 ALLOC1_SIGNAL_OUT (out_BRANCH_COMPLETE_NO_SEQUENCE ,"NO_SEQUENCE" ,Tcontrol_t ,1 ); 169 169 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_MISS_PREDICTION ,"MISS_PREDICTION" ,Tcontrol_t ,1 ); 170 170 } … … 909 909 PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS" , 910 910 dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS" ); 911 PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ FLAG",912 dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ FLAG");911 PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_NO_SEQUENCE" , 912 dest,"out_BRANCH_COMPLETE_"+toString(i)+"_NO_SEQUENCE" ); 913 913 PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION", 914 914 dest, "in_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_deallocation.cpp
r88 r98 105 105 // DELETE1_SIGNAL(out_RETIRE_RE_NEW_NUM_REG ,_param->_sum_inst_retire,_param->_size_special_register ); 106 106 107 DELETE1_SIGNAL(out_BRANCH_COMPLETE_VAL ,_param->_nb_inst_ issue,1);108 DELETE1_SIGNAL( in_BRANCH_COMPLETE_ACK ,_param->_nb_inst_ issue,1);109 DELETE1_SIGNAL(out_BRANCH_COMPLETE_FRONT_END_ID ,_param->_nb_inst_ issue,_param->_size_front_end_id);110 DELETE1_SIGNAL(out_BRANCH_COMPLETE_CONTEXT_ID ,_param->_nb_inst_ issue,_param->_size_context_id);111 DELETE1_SIGNAL(out_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_ issue,_param->_size_depth);112 DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_ issue,_param->_size_general_data);113 DELETE1_SIGNAL(out_BRANCH_COMPLETE_ FLAG ,_param->_nb_inst_issue,1);114 DELETE1_SIGNAL( in_BRANCH_COMPLETE_MISS_PREDICTION ,_param->_nb_inst_ issue,1);107 DELETE1_SIGNAL(out_BRANCH_COMPLETE_VAL ,_param->_nb_inst_branch_complete,1 ); 108 DELETE1_SIGNAL( in_BRANCH_COMPLETE_ACK ,_param->_nb_inst_branch_complete,1 ); 109 DELETE1_SIGNAL(out_BRANCH_COMPLETE_FRONT_END_ID ,_param->_nb_inst_branch_complete,_param->_size_front_end_id); 110 DELETE1_SIGNAL(out_BRANCH_COMPLETE_CONTEXT_ID ,_param->_nb_inst_branch_complete,_param->_size_context_id ); 111 DELETE1_SIGNAL(out_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete,_param->_size_depth ); 112 DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_branch_complete,_param->_size_general_data); 113 DELETE1_SIGNAL(out_BRANCH_COMPLETE_NO_SEQUENCE ,_param->_nb_inst_branch_complete,1 ); 114 DELETE1_SIGNAL( in_BRANCH_COMPLETE_MISS_PREDICTION ,_param->_nb_inst_branch_complete,1 ); 115 115 116 116 DELETE_SIGNAL (out_COMMIT_EVENT_VAL , 1); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Core_allocation.cpp
r88 r98 323 323 COMPONENT_MAP(_component,src , "in_BRANCH_COMPLETE_" +toString(j)+"_ADDRESS" , 324 324 dest,"out_BRANCH_COMPLETE_FRONT_END_"+toString(i)+"_"+toString(j)+"_ADDRESS" ); 325 COMPONENT_MAP(_component,src , "in_BRANCH_COMPLETE_" +toString(j)+"_ FLAG",326 dest,"out_BRANCH_COMPLETE_FRONT_END_"+toString(i)+"_"+toString(j)+"_ FLAG");325 COMPONENT_MAP(_component,src , "in_BRANCH_COMPLETE_" +toString(j)+"_NO_SEQUENCE" , 326 dest,"out_BRANCH_COMPLETE_FRONT_END_"+toString(i)+"_"+toString(j)+"_NO_SEQUENCE" ); 327 327 COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_" +toString(j)+"_MISS_PREDICTION", 328 328 dest, "in_BRANCH_COMPLETE_FRONT_END_"+toString(i)+"_"+toString(j)+"_MISS_PREDICTION"); … … 519 519 COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_" +toString(j)+"_ADDRESS" , 520 520 dest, "in_BRANCH_COMPLETE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_ADDRESS" ); 521 COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_" +toString(j)+"_ FLAG",522 dest, "in_BRANCH_COMPLETE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_ FLAG");521 COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_" +toString(j)+"_NO_SEQUENCE" , 522 dest, "in_BRANCH_COMPLETE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_NO_SEQUENCE" ); 523 523 COMPONENT_MAP(_component,src , "in_BRANCH_COMPLETE_" +toString(j)+"_MISS_PREDICTION", 524 524 dest,"out_BRANCH_COMPLETE_OOO_ENGINE_"+toString(i)+"_"+toString(j)+"_MISS_PREDICTION"); … … 1249 1249 // out_BRANCH_COMPLETE_FRONT_END_DEPTH - front_end. in_BRANCH_COMPLETE_DEPTH 1250 1250 // out_BRANCH_COMPLETE_FRONT_END_ADDRESS - front_end. in_BRANCH_COMPLETE_ADDRESS 1251 // out_BRANCH_COMPLETE_FRONT_END_FLAG - front_end. in_BRANCH_COMPLETE_ FLAG1251 // out_BRANCH_COMPLETE_FRONT_END_FLAG - front_end. in_BRANCH_COMPLETE_NO_SEQUENCE 1252 1252 // in_BRANCH_COMPLETE_FRONT_END_MISS_PREDICTION - front_end.out_BRANCH_COMPLETE_MISS_PREDICTION 1253 1253 … … 1258 1258 // in_BRANCH_COMPLETE_OOO_ENGINE_DEPTH - ooo_engine.out_BRANCH_COMPLETE_DEPTH 1259 1259 // in_BRANCH_COMPLETE_OOO_ENGINE_ADDRESS - ooo_engine.out_BRANCH_COMPLETE_ADDRESS 1260 // in_BRANCH_COMPLETE_OOO_ENGINE_FLAG - ooo_engine.out_BRANCH_COMPLETE_ FLAG1260 // in_BRANCH_COMPLETE_OOO_ENGINE_FLAG - ooo_engine.out_BRANCH_COMPLETE_NO_SEQUENCE 1261 1261 // out_BRANCH_COMPLETE_OOO_ENGINE_MISS_PREDICTION- ooo_engine. in_BRANCH_COMPLETE_MISS_PREDICTION 1262 1262 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic.cpp
r88 r98 49 49 #ifdef VHDL 50 50 // generate the vhdl 51 vhdl(); 51 if (usage_is_set(_usage,USE_VHDL)) 52 vhdl(); 52 53 #endif 53 54 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h
r97 r98 10 10 #define MORPHEO_MAJOR_VERSION 0 11 11 #define MORPHEO_MINOR_VERSION 2 12 #define MORPHEO_REVISION "9 7"12 #define MORPHEO_REVISION "98" 13 13 #define MORPHEO_CODENAME "Castor" 14 14 15 #define MORPHEO_DATE_DAY " 19"15 #define MORPHEO_DATE_DAY "31" 16 16 #define MORPHEO_DATE_MONTH "12" 17 17 #define MORPHEO_DATE_YEAR "2008" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Vhdl.h
r97 r98 23 23 namespace behavioural { 24 24 25 std::string std_logic (uint32_t size);26 std::string std_logic_conv (uint32_t size, std::string value);27 std::string std_logic_conv (uint32_t size, uint32_t value);28 std::string std_logic_cst (uint32_t size, uint32_t value);29 std::string std_logic_range (uint32_t size, uint32_t max , uint32_t min );30 std::string std_logic_range ( uint32_t max , uint32_t min );31 std::string std_logic_range (uint32_t size );32 std::string _std_logic_range (uint32_t size, uint32_t max , uint32_t min );33 std::string _std_logic_range ( uint32_t max , uint32_t min );34 std::string _std_logic_range (uint32_t size );35 std::string std_logic_others (uint32_t size, bool cst);25 std::string std_logic (uint32_t size); 26 std::string std_logic_conv (uint32_t size, std::string value); 27 std::string std_logic_conv (uint32_t size, uint32_t value); 28 std::string std_logic_cst (uint32_t size, uint32_t value); 29 std::string std_logic_range (uint32_t size, uint32_t max , uint32_t min ); 30 std::string std_logic_range ( uint32_t max , uint32_t min ); 31 std::string std_logic_range (uint32_t size ); 32 std::string _std_logic_range (uint32_t size, uint32_t max , uint32_t min ); 33 std::string _std_logic_range ( uint32_t max , uint32_t min ); 34 std::string _std_logic_range (uint32_t size ); 35 std::string std_logic_others (uint32_t size, bool cst); 36 36 37 37 class Vhdl -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/SPR_access_mode.cpp
r81 r98 21 21 { 22 22 for (uint32_t i=0; i<NB_GROUP; i++) 23 24 delete_spr_generic [i];23 if (_spr_generic [i] != NULL) 24 delete [] _spr_generic [i]; 25 25 26 26 delete [] _spr_generic; 27 27 28 delete_max_register_by_group;29 28 delete [] _max_register_by_group; 29 } 30 30 31 31 }; // end namespace behavioural -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_generate_file_model.cpp
r88 r98 26 26 msg_printf(INFORMATION,_("Generate file \"%s\"."),filename.c_str()); 27 27 28 log_printf(TRACE,Behavioural,"generate_file_model","declaration");29 28 std::ofstream file; 30 29 31 log_printf(TRACE,Behavioural,"generate_file_model","open file");32 30 file.open(filename.c_str(),std::ios::out | std::ios::trunc); 33 31 34 log_printf(TRACE,Behavioural,"generate_file_model","get model");35 32 file << get_model (0,filename,_name,"behavioural"); 36 33 file.close(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_header.cpp
r94 r98 29 29 30 30 text += "-------------------------------------------------------------------------------\n"; 31 text += "-- "+toString(_("File : "))+ filename +"\n";32 text += "-- "+toString(_("Date : "))+ ctime (¤t_time );33 text += "-- "+toString(_(" Morpheo version : ")) + MORPHEO_HEADER +"\n";34 text += "-- "+toString(_("Comment : ")) 31 text += "-- "+toString(_("File : ")) + filename +"\n"; 32 text += "-- "+toString(_("Date : ")) + ctime (¤t_time ); 33 text += "-- "+toString(_("Version : ")) + MORPHEO_HEADER +"\n"; 34 text += "-- "+toString(_("Comment : ")) + _("it's a autogenerated file, don't modify") +"\n"; 35 35 text += "-------------------------------------------------------------------------------\n"; 36 36 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_header.cpp
r88 r98 26 26 str += "\n"; 27 27 str += "<!--\n"; 28 str += "\t"+toString(_("File : "))+ _name + _filename_extension + "\n";29 str += "\t"+toString(_("Date : "))+ ctime (¤t_time );30 str += "\t"+toString(_(" Morpheo version : ")) + MORPHEO_HEADER +"\n";31 str += "\t"+toString(_("Comment : ")) 28 str += "\t"+toString(_("File : ")) + _name + _filename_extension + "\n"; 29 str += "\t"+toString(_("Date : ")) + ctime (¤t_time ); 30 str += "\t"+toString(_("Version : ")) + MORPHEO_HEADER +"\n"; 31 str += "\t"+toString(_("Comment : ")) + toString(_("it's a autogenerated file, don't modify")) +"\n"; 32 32 str += "-->\n"; 33 33 str += "\n"; -
trunk/IPs/systemC/processor/Morpheo/Documentation/doc/document-morpheo-vhdl_generation/document-morpheo-vhdl_generation-fr.tex
r93 r98 32 32 33 33 %Table des matières et des figures 34 %\tableofcontents35 %\newpage34 \tableofcontents 35 \newpage 36 36 %\listoffigures 37 37 -
trunk/IPs/systemC/processor/Morpheo/Documentation/doc/document-morpheo-vhdl_generation/tex/document-morpheo-vhdl_generation-fr.tex
r95 r98 62 62 63 63 Par exemple pour la 2 ème interface de lecture d'un banc de registre : 64 \begin{verbatim} 64 \lstparam{VHDL} 65 \begin{lstlisting} 65 66 in_READ_1_VAL : in std_logic; 66 67 out_READ_1_ACK : out std_logic; 67 68 in_READ_1_ADDRESS : in std_logic_vector(8 downto 0); 68 69 out_READ_1_DATA : out std_logic_vector(31 downto 0); 69 \end{ verbatim}70 \end{lstlisting} 70 71 71 72 Chaque composent (aussi bien combinatoire que séquentielle) possède un signal d'horloge et un signal de reset. (Ce dernier est actif à l'état bas). Ils ont tout les deux le même nom quelque soit le composant. 72 \begin{verbatim} 73 \lstparam{VHDL} 74 \begin{lstlisting} 73 75 in_CLOCK : in std_logic; 74 76 in_NRESET : in std_logic; 75 \end{ verbatim}77 \end{lstlisting} 76 78 77 79 \subSection{Types} … … 79 81 Le type de base utilisé est le {\it std\_logic\_vector} (ou std\_logic si le vecteur est sur un seul bit). Pour cela on utilise la fonction suivante : 80 82 81 \begin{verbatim} 83 \lstparam{C++} 84 \begin{lstlisting} 82 85 std::string std_logic (uint32_t size); 83 \end{ verbatim}86 \end{lstlisting} 84 87 85 88 Pour accéder à une partie du vecteur on utilise la fonction {\it std\_logic\_range}. Elle a les prototypes suivant : 86 \begin{verbatim} 87 std::string std_logic_range (uint32_t size, 88 uint32_t max , 89 uint32_t min , 90 bool force=false); 91 std::string std_logic_range (uint32_t max , 92 uint32_t min , 93 bool force=false); 94 std::string std_logic_range (uint32_t size, 95 bool force=false); 96 \end{verbatim} 89 \lstparam{C++} 90 \begin{lstlisting} 91 std::string std_logic_range (uint32_t size, 92 uint32_t max , 93 uint32_t min); 94 std::string std_logic_range (uint32_t max , 95 uint32_t min); 96 std::string std_logic_range (uint32_t size); 97 std::string _std_logic_range (uint32_t size, 98 uint32_t max , 99 uint32_t min); 100 std::string _std_logic_range (uint32_t max , 101 uint32_t min); 102 std::string _std_logic_range (uint32_t size); 103 \end{lstlisting} 97 104 98 105 La première fonction fais un test sur la taille que la seconde ne fait pas. 99 106 L'argument de la troisième définit la taille (ce qui implique que la borne minimum est 0 et la borne maximum est size-1). 100 Toute les surcharges ont le bolléen optionnel {\it force}. S'il est à faux, alors des tests seront effectués sur les bornes et la taille, sinon aucun test n'est effectué.107 Toute les fonctions avec préfixé par un underscore n'effectue pas de test sur les bornes. 101 108 102 109 Par exemple : 103 110 \begin{verbatim} 104 std_logic_range(4,false) renvoie "(3 downto 0)".105 std_logic_range(1,false) renvoie "(0)".106 std_logic_range(1,true) renvoie "(0 downto 0)".111 std_logic_range(4) renvoie "(3 downto 0)". 112 std_logic_range(1) renvoie "(0)". 113 _std_logic_range(1) renvoie "(0 downto 0)". 107 114 \end{verbatim} 108 115 109 116 Pour les types plus complexe, la classe {\it Vhdl} possède une méthode générique. Le premier argument est le nom du type le second est le type. 110 117 111 \begin{verbatim} 118 \lstparam{C++} 119 \begin{lstlisting} 112 120 void set_type (std::string name, 113 121 std::string type); 114 \end{ verbatim}122 \end{lstlisting} 115 123 116 124 L'exemple suivant définit un type représentat un tableau de {\it nb\_word} mots de {\it size\_word} bit chacun : 117 \begin{verbatim} 125 \lstparam{C++} 126 \begin{lstlisting} 118 127 vhdl->set_type ("Tregfile", 119 128 "array "+std_logic_range(nb_word)+" of "+std_logic(size_word)); 120 \end{ verbatim}129 \end{lstlisting} 121 130 122 131 \subSection{Constantes} … … 124 133 La déclaration de constante, ce fait avec la méthode {\it set\_constant} de la classe {\it Vhdl}. Les différentes surcharges de cette méthode est le type des arguments {\it type} et {\it init}. 125 134 126 \begin{verbatim} 135 \lstparam{C++} 136 \begin{lstlisting} 127 137 void set_constant (std::string name, 128 138 std::string type, … … 134 144 uint32_t size, 135 145 uint32_t init); 136 \end{ verbatim}146 \end{lstlisting} 137 147 138 148 Par exemple pour coder les états d'un automate à 5 états en One Hot : 139 \begin{verbatim} 149 \lstparam{C++} 150 \begin{lstlisting} 140 151 vhdl->set_constant ("State_idle",5,1); 141 \end{ verbatim}152 \end{lstlisting} 142 153 143 154 Dans le cas de signaux de type {\it std\_logic}, au lieu de déclarer des constantes, il existe deux fonctions permettant d'utiliser des constantes directement dans le corps du composant. 144 155 La première est {\it std\_logic\_others}. Elle permet de définir des constantes dont soit les bits sont à pleins un soit à plein zéro. 145 156 146 \begin{verbatim} 157 \lstparam{C++} 158 \begin{lstlisting} 147 159 std::string std_logic_others (uint32_t size, 148 160 bool cst ); 149 \end{ verbatim}161 \end{lstlisting} 150 162 151 163 Pour toute les autres constantes, la méthode {\it std\_logic\_conv} transforme un entier en {\it std\_logic\_vector}. 152 164 153 \begin{verbatim} 165 \lstparam{C++} 166 \begin{lstlisting} 154 167 std::string std_logic_conv (uint32_t size, 155 168 std::string value); 156 169 std::string std_logic_conv (uint32_t size, 157 170 uint32_t value); 158 \end{ verbatim}171 \end{lstlisting} 159 172 160 173 … … 162 175 163 176 Les signaux internes sont définit grâce au méthode {\it set\_signal}. Le premier argument est le nom du signal. Le second est soit un type soit une taille (dans le cas où le type est un {\it std\_logic\_vector}). 164 \begin{verbatim} 177 \lstparam{C++} 178 \begin{lstlisting} 165 179 void set_signal (std::string name, 166 180 std::string type); 167 181 void set_signal (std::string name, 168 182 uint32_t size); 169 \end{ verbatim}183 \end{lstlisting} 170 184 171 185 La méthode est également surchargé si le signal à besoin d'une initialisation. 172 186 173 \begin{verbatim} 187 \lstparam{C++} 188 \begin{lstlisting} 174 189 void set_signal (std::string name, 175 190 std::string type, … … 181 196 uint32_t size, 182 197 uint32_t init); 183 \end{ verbatim}198 \end{lstlisting} 184 199 185 200 En vhdl il est possible de renommer une champ d'un signal. Ceci ce fait à l'aide de la fonction {\it set\_alias}. Elle prend 4 arguments. Le premier étant le nom du signal après le renommage. le second est soit le type, soit la taille du {\it std\_logic\_vector} du signal rénommé. Les deux derniers conserné le signal à renommé : le nom de ce dernier ainsi que l'intervalle. Pour le dernier paramètre il est recommandé d'utilisé la fonction {\it std\_logic\_range}. 186 201 187 \begin{verbatim} 202 \lstparam{C++} 203 \begin{lstlisting} 188 204 void set_alias (std::string name1 , 189 205 std::string type1 , … … 194 210 std::string name2 , 195 211 std::string range2); 196 \end{verbatim} 197 212 \end{lstlisting} 198 213 199 214 \Section{VHDL : comportement}\label{vhdl_body} … … 203 218 Il n'y a pas de fonction aidant à l'écriture du Vhdl. 204 219 La méthode {\it set\_body} permet de définir une ligne de code VHDL. Un retour à la ligne est automatiquement inséré. Le premier argument est pour l'indentation. 205 \begin{verbatim} 220 \lstparam{C++} 221 \begin{lstlisting} 206 222 void set_body (uint32_t depth, 207 223 std::string text ); 208 224 void set_body (std::string text ); 209 \end{ verbatim}225 \end{lstlisting} 210 226 211 227 Pour les commentaires, il y a la fonction {\it set\_comment}. 212 \begin{verbatim} 228 \lstparam{C++} 229 \begin{lstlisting} 213 230 void set_comment (uint32_t depth, 214 231 std::string text ); 215 232 void set_comment (std::string text ); 216 \end{verbatim} 217 218 233 \end{lstlisting} 219 234 220 235 \Section{VHDL : structurelle}\label{vhdl_structural} 221 236 237 \subSection{Description du fichier {\it Component\_vhdl.cpp}} 238 Les modèles systemC structurelle sont des modèles qui instancie d'autre modèle. Il n'y a pas de description comportementale. Ces modèles sont générés automatiquement. 239 Par contre les modèles systemC comportementales peuvent être décrit par un modèle VHDL mixte (incluant une description comportementale et des instances d'autre composant). 240 241 Les modèles génériques sont dans le répertoire {\it IPs/systemC/processor/Morpheo/Behavioural/Generic}. 242 243 \lstparam{C++} 244 \begin{lstlisting}[caption={Component\_vhdl.cpp}, label=component_vhdl.cpp] 245 void component::vhdl (void) 246 { 247 Vhdl * vhdl = new Vhdl (_name); 248 249 _interfaces->set_port(vhdl); 250 _component->vhdl_instance(vhdl); 251 252 vhdl_declaration (vhdl); 253 vhdl_body (vhdl); 254 255 vhdl->generate_file(); 256 257 delete vhdl; 258 }; 259 \end{lstlisting} 260 261 262 La première étape est d'éditer le fichier {\it Component\_vhdl.cpp}. Le listing \ref{component_vhdl.cpp} représente le contenu de ce fichier. 263 \begin{itemize} 264 \item Ligne 3 : Déclaration et construction de la variable {\it vhdl} qui est du type {\it Vhdl}. 265 \item Ligne 5 : Ajout dans le modèle VHDL des interfaces présentes dans le modèle SystemC. (cf fichiers Component.h). 266 \item Ligne 6 : Ajout dans le modèle VHDL des composants internes dans le modèle SystemC. (cf fichiers Component.h et Component\_allocation.cpp). 267 \item Ligne 8 : Ajout dans le modèle VHDL des déclarations définit dans le fichiers Component\_vhdl\_declaration.cpp (cf section \ref{vhdl_declaration}). 268 \item Ligne 9 : Ajout dans le modèle VHDL de la description comportemental définit dans le fichiers Component\_vhdl\_body.cpp (cf section \ref{vhdl_body}). 269 \item Ligne 11 : Génération des fichiers VHDL. Le nom du fichier est construit à partir du nom fournit lors de la construction de la variable {\it vhdl}. 270 \item Ligne 13 : Destruction de l'objet. 271 \end{itemize} 272 273 Pour la suite, nous allons supposer l'instanciation d'une FIFO. 274 275 \subSection{Ajout d'une instance} 276 277 Dans le fichier Component\_vhdl.cpp : 278 \begin{enumerate} 279 \item Inclure la définition de la classe désirée. 280 \lstparam{C++} 281 \begin{lstlisting} 282 #include "Behavioural/Generic/Queue/include/Queue.h" 283 \end{lstlisting} 284 \item Creer les paramètres du modèles. 285 \lstparam{C++} 286 \begin{lstlisting} 287 morpheo::behavioural::generic::queue::Parameters * param_queue; 288 param_queue = new morpheo::behavioural::generic::queue::Parameters 289 (16, //size_queue 290 32);//size_data 291 \end{lstlisting} 292 \item Creer le modèle 293 \lstparam{C++} 294 \begin{lstlisting} 295 morpheo::behavioural::generic::queue::Queue * queue; 296 std::string queue_name = _name + "_queue"; 297 298 queue = new morpheo::behavioural::generic::queue::Queue 299 (queue_name.c_str() // nom du modèle 300 #ifdef STATISTICS 301 ,NULL // Pas paramètres pour les statistiques 302 #endif 303 ,param_queue // Paramètres de la file 304 ,USE_VHDL); // Utilisation du modèle VHDL 305 \end{lstlisting} 306 \item Inclure le modèle dans la liste des composants internes 307 \lstparam{C++} 308 \begin{lstlisting} 309 _component->set_component(queue->_component 310 #ifdef POSITION 311 , 20, 20, 20, 20 312 // Coordonée pour l'outil de visualisation 313 #endif 314 , INSTANCE_LIBRARY 315 // Instancier uniquement les libraries 316 ); 317 \end{lstlisting} 318 \item Indiquer dans le fichier Makefile.deps que le composant dépends de ce modèle. 319 \lstparam{make} 320 \begin{lstlisting} 321 # Inclure les dépendances 322 ifndef Queue 323 include $(DIR_MORPHEO)/Behavioural/Generic/Queue/Makefile.deps 324 endif 325 326 # Inclure les librairies 327 Component_LIBRARY = -lComponent \ 328 $(Queue_LIBRARY) 329 330 # Les chemins vers les libraries 331 Component_DIR_LIBRARY = -L$(Component_DIR)/lib \ 332 $(Queue_DIR_LIBRARY) 333 334 # Construction de la librarie ``Component'' 335 Component_library : 336 @\ 337 $(MAKE) Queue_library; \ 338 $(MAKE) --directory=$(Component_DIR) --makefile=Makefile; 339 340 # Effacement des fichiers générés 341 Component_library_clean : 342 @\ 343 $(MAKE) Queue_library_clean; \ 344 $(MAKE) --directory=$(Component_DIR) --makefile=Makefile clean; 345 \end{lstlisting} 346 \end{enumerate} 347 348 \subSection{Instanciation} 349 L'instanciation ce fait comme avec des composants VHDL classique : 350 \lstparam{C++} 351 \begin{lstlisting} 352 vhdl->set_comment(0,""); 353 vhdl->set_comment(0,"-----------------------------------"); 354 vhdl->set_comment(0,"-- Instance queue "); 355 vhdl->set_comment(0,"-----------------------------------"); 356 vhdl->set_comment(0,""); 357 358 vhdl->set_body (0,"instance_"+_name+"_queue : "+_name+"_queue"); 359 vhdl->set_body (0,"port map ("); 360 vhdl->set_body (1," in_CLOCK \t=>\t in_CLOCK "); 361 vhdl->set_body (1,", in_NRESET \t=>\t in_NRESET"); 362 vhdl->set_body (1,", in_INSERT_VAL \t=>\tinternal_QUEUE_INSERT_VAL"); 363 vhdl->set_body (1,",out_INSERT_ACK \t=>\tinternal_QUEUE_INSERT_ACK"); 364 vhdl->set_body (1,", in_INSERT_DATA \t=>\tinternal_QUEUE_INSERT_DATA"); 365 vhdl->set_body (1,",out_RETIRE_VAL \t=>\tinternal_QUEUE_RETIRE_VAL"); 366 vhdl->set_body (1,", in_RETIRE_ACK \t=>\tinternal_QUEUE_RETIRE_ACK"); 367 vhdl->set_body (1,",out_RETIRE_DATA \t=>\tinternal_QUEUE_RETIRE_DATA"); 368 vhdl->set_body (0,");"); 369 \end{lstlisting} 370 222 371 \Section{Exemples}\label{example} 223 372 224 373 \subSection{Banc de Registres Monolithique} 225 374 375 \subsubSection{Fichier RegisterFile\_Monolithic\_vhdl.cpp} 376 377 \lstparam{C++} 378 \begin{lstlisting}[caption={RegisterFile\_Monolithic\_vhdl.cpp}] 379 void RegisterFile_Monolithic::vhdl (void) 380 { 381 Vhdl * vhdl = new Vhdl (_name); 382 383 _interfaces->set_port (vhdl); 384 _component ->vhdl_instance(vhdl); 385 386 vhdl_declaration (vhdl); 387 vhdl_body (vhdl); 388 389 vhdl->generate_file(); 390 391 delete vhdl; 392 }; 393 \end{lstlisting} 394 395 226 396 \subsubSection{Fichier RegisterFile\_Monolithic\_vhdl\_declaration.cpp} 227 \begin{verbatim} 397 398 \lstparam{C++} 399 \begin{lstlisting}[caption={RegisterFile\_Monolithic\_vhdl\_declaration.cpp}] 228 400 void RegisterFile_Monolithic::vhdl_declaration (Vhdl * & vhdl) 229 401 { … … 234 406 vhdl->set_signal ("reg_DATA", "Tregfile"); 235 407 }; 236 \end{verbatim} 408 \end{lstlisting} 409 237 410 \subsubSection{Fichier RegisterFile\_Monolithic\_vhdl\_body.cpp} 238 \begin{verbatim} 411 412 \lstparam{C++} 413 \begin{lstlisting}[caption={RegisterFile\_Monolithic\_vhdl\_body.cpp}] 239 414 void RegisterFile_Monolithic::vhdl_body (Vhdl * & vhdl) 240 415 { 241 416 vhdl->set_body (0,""); 242 417 vhdl->set_comment(0,"---------------------------------------------------"); 243 vhdl->set_comment(0," Ack itement");418 vhdl->set_comment(0," Ack"); 244 419 vhdl->set_comment(0,"---------------------------------------------------"); 245 420 vhdl->set_body (0,""); … … 295 470 vhdl->set_body (0,"end process RegisterFile_write;"); 296 471 }; 297 \end{ verbatim}472 \end{lstlisting} 298 473 299 474 \subsubSection{Fichier RegisterFile\_Monolithic.vhdl} 300 \begin{verbatim} 301 library ieee; 475 476 \lstparam{VHDL} 477 \begin{lstlisting}[caption={RegisterFile\_Monolithic.cpp}] 478 library ieee; 302 479 use ieee.numeric_bit.all; 303 480 use ieee.numeric_std.all; … … 362 539 end process RegisterFile_write; 363 540 end behavioural; 364 365 \end{verbatim} 541 \end{lstlisting} 542 543 \subSection{Tampon entre la boucle d'exécutione et le buffer de réordonnancement} 544 545 \subsubSection{Fichier Execute\_queue\_vhdl.cpp} 546 547 \lstparam{C++} 548 \begin{lstlisting}[caption={Execute\_queue\_vhdl.cpp}] 549 void Execute_queue::vhdl (void) 550 { 551 morpheo::behavioural::generic::queue::Parameters * param_queue; 552 553 param_queue = new morpheo::behavioural::generic::queue::Parameters 554 (_param->_size_queue, 555 _param->_size_internal_queue 556 ); 557 558 morpheo::behavioural::generic::queue::Queue * queue; 559 560 std::string queue_name = _name + "_queue"; 561 queue = new morpheo::behavioural::generic::queue::Queue 562 (queue_name.c_str() 563 #ifdef STATISTICS 564 ,NULL 565 #endif 566 ,param_queue 567 ,USE_VHDL); 568 569 _component->set_component(queue->_component 570 #ifdef POSITION 571 , 50, 50, 50, 50 572 #endif 573 , INSTANCE_LIBRARY 574 ); 575 576 Vhdl * vhdl = new Vhdl (_name); 577 578 _interfaces->set_port(vhdl); 579 _component->vhdl_instance(vhdl); 580 581 vhdl_declaration (vhdl); 582 vhdl_body (vhdl); 583 584 vhdl->generate_file(); 585 586 delete vhdl; 587 }; 588 \end{lstlisting} 589 590 \subsubSection{Fichier Execute\_queue\_vhdl\_declaration.cpp} 591 592 \lstparam{C++} 593 \begin{lstlisting}[caption={Execute\_queue\_vhdl\_declaration.cpp}] 594 void Execute_queue::vhdl_declaration (Vhdl * & vhdl) 595 { 596 vhdl->set_alias ("internal_QUEUE_INSERT_VAL ", 597 1, 598 " in_EXECUTE_QUEUE_IN_VAL", 599 std_logic_range(1)); 600 vhdl->set_alias ("internal_QUEUE_INSERT_ACK ", 601 1, 602 "out_EXECUTE_QUEUE_IN_ACK", 603 std_logic_range(1)); 604 vhdl->set_signal ("internal_QUEUE_INSERT_DATA", 605 _param->_size_internal_queue); 606 vhdl->set_signal ("internal_QUEUE_RETIRE_DATA", 607 _param->_size_internal_queue); 608 vhdl->set_alias ("internal_QUEUE_RETIRE_VAL ", 609 1, 610 "out_EXECUTE_QUEUE_OUT_VAL", 611 std_logic_range(1)); 612 vhdl->set_alias ("internal_QUEUE_RETIRE_ACK ", 613 1, 614 " in_EXECUTE_QUEUE_OUT_ACK", 615 std_logic_range(1)); 616 617 uint32_t min = 0; 618 uint32_t max, size; 619 620 if(_param->_have_port_context_id ) 621 { 622 size = _param->_size_context_id; 623 max = min-1+size; 624 vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_CONTEXT_ID ", 625 std_logic(size), 626 "internal_QUEUE_RETIRE_DATA", 627 std_logic_range(_param->_size_internal_queue,max,min)); 628 min = max+1; 629 } 630 if(_param->_have_port_front_end_id ) 631 { 632 size = _param->_size_front_end_id; 633 max = min-1+size; 634 vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_FRONT_END_ID ", 635 std_logic(size), 636 "internal_QUEUE_RETIRE_DATA", 637 std_logic_range(_param->_size_internal_queue,max,min)); 638 min = max+1; 639 } 640 if(_param->_have_port_ooo_engine_id ) 641 { 642 size = _param->_size_ooo_engine_id; 643 max = min-1+size; 644 vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID ", 645 std_logic(size), 646 "internal_QUEUE_RETIRE_DATA", 647 std_logic_range(_param->_size_internal_queue,max,min)); 648 min = max+1; 649 } 650 if(_param->_have_port_rob_ptr) 651 { 652 size = _param->_size_rob_ptr; 653 max = min-1+size; 654 vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_PACKET_ID ", 655 std_logic(size), 656 "internal_QUEUE_RETIRE_DATA", 657 std_logic_range(_param->_size_internal_queue,max,min)); 658 min = max+1; 659 } 660 661 size = _param->_size_special_data; 662 max = min-1+size; 663 vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_FLAGS ", 664 std_logic(size), 665 "internal_QUEUE_RETIRE_DATA", 666 std_logic_range(_param->_size_internal_queue,max,min)); 667 min = max+1; 668 669 size = _param->_size_exception; 670 max = min-1+size; 671 vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_EXCEPTION ", 672 std_logic(size), 673 "internal_QUEUE_RETIRE_DATA", 674 std_logic_range(_param->_size_internal_queue,max,min)); 675 min = max+1; 676 677 size = 1; 678 max = min-1+size; 679 vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_NO_SEQUENCE ", 680 std_logic(size), 681 "internal_QUEUE_RETIRE_DATA", 682 std_logic_range(_param->_size_internal_queue,max,min)); 683 min = max+1; 684 685 size = _param->_size_instruction_address; 686 max = min-1+size; 687 vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_ADDRESS ", 688 std_logic(size), 689 "internal_QUEUE_RETIRE_DATA", 690 std_logic_range(_param->_size_internal_queue,max,min)); 691 min = max+1; 692 693 size = _param->_size_general_data; 694 max = min-1+size; 695 vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_DATA ", 696 std_logic(size), 697 "internal_QUEUE_RETIRE_DATA", 698 std_logic_range(_param->_size_internal_queue,max,min)); 699 min = max+1; 700 }; 701 \end{lstlisting} 702 703 \subsubSection{Fichier Execute\_queue\_vhdl\_body.cpp} 704 705 \lstparam{C++} 706 \begin{lstlisting}[caption={Execute\_queue\_vhdl\_body.cpp}] 707 void Execute_queue::vhdl_body (Vhdl * & vhdl) 708 { 709 vhdl->set_comment(0,""); 710 vhdl->set_comment(0,"-----------------------------------"); 711 vhdl->set_comment(0,"-- Instance queue "); 712 vhdl->set_comment(0,"-----------------------------------"); 713 vhdl->set_comment(0,""); 714 715 vhdl->set_body (0,"instance_"+_name+"_queue : "+_name+"_queue"); 716 vhdl->set_body (0,"port map ("); 717 vhdl->set_body (1," in_CLOCK \t=>\t in_CLOCK "); 718 vhdl->set_body (1,", in_NRESET \t=>\t in_NRESET"); 719 vhdl->set_body (1,", in_INSERT_VAL \t=>\tinternal_QUEUE_INSERT_VAL"); 720 vhdl->set_body (1,",out_INSERT_ACK \t=>\tinternal_QUEUE_INSERT_ACK"); 721 vhdl->set_body (1,", in_INSERT_DATA \t=>\tinternal_QUEUE_INSERT_DATA"); 722 vhdl->set_body (1,",out_RETIRE_VAL \t=>\tinternal_QUEUE_RETIRE_VAL"); 723 vhdl->set_body (1,", in_RETIRE_ACK \t=>\tinternal_QUEUE_RETIRE_ACK"); 724 vhdl->set_body (1,",out_RETIRE_DATA \t=>\tinternal_QUEUE_RETIRE_DATA"); 725 vhdl->set_body (0,");"); 726 727 vhdl->set_comment(0,""); 728 vhdl->set_comment(0,"-----------------------------------"); 729 vhdl->set_comment(0,"-- Input Buffer "); 730 vhdl->set_comment(0,"-----------------------------------"); 731 vhdl->set_comment(0,""); 732 733 { 734 uint32_t min = 0; 735 uint32_t max, size; 736 uint32_t size_queue = _param->_size_internal_queue; 737 738 if(_param->_have_port_context_id ) 739 { 740 size = _param->_size_context_id; 741 max = min-1+size; 742 vhdl->set_body (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(size_queue,max,min)+ 743 " <= in_EXECUTE_QUEUE_IN_CONTEXT_ID;"); 744 min = max+1; 745 } 746 if(_param->_have_port_front_end_id ) 747 { 748 size = _param->_size_front_end_id; 749 max = min-1+size; 750 vhdl->set_body (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(size_queue,max,min)+ 751 " <= in_EXECUTE_QUEUE_IN_FRONT_END_ID;"); 752 min = max+1; 753 } 754 if(_param->_have_port_ooo_engine_id ) 755 { 756 size = _param->_size_ooo_engine_id; 757 max = min-1+size; 758 vhdl->set_body (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(size_queue,max,min)+ 759 " <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID;"); 760 min = max+1; 761 } 762 if(_param->_have_port_rob_ptr) 763 { 764 size = _param->_size_rob_ptr; 765 max = min-1+size; 766 vhdl->set_body (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(size_queue,max,min)+ 767 " <= in_EXECUTE_QUEUE_IN_PACKET_ID;"); 768 min = max+1; 769 } 770 771 size = _param->_size_special_data; 772 max = min-1+size; 773 vhdl->set_body (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(size_queue,max,min)+ 774 " <= in_EXECUTE_QUEUE_IN_FLAGS;"); 775 min = max+1; 776 777 size = _param->_size_exception; 778 max = min-1+size; 779 vhdl->set_body (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(size_queue,max,min)+ 780 " <= in_EXECUTE_QUEUE_IN_EXCEPTION;"); 781 min = max+1; 782 783 size = 1; 784 max = min-1+size; 785 vhdl->set_body (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(size_queue,max,min)+ 786 " <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE;"); 787 min = max+1; 788 789 size = _param->_size_instruction_address; 790 max = min-1+size; 791 vhdl->set_body (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(size_queue,max,min)+ 792 " <= in_EXECUTE_QUEUE_IN_ADDRESS;"); 793 min = max+1; 794 795 size = _param->_size_general_data; 796 max = min-1+size; 797 vhdl->set_body (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(size_queue,max,min)+ 798 " <= in_EXECUTE_QUEUE_IN_DATA;"); 799 min = max+1; 800 } 801 802 vhdl->set_comment(0,""); 803 vhdl->set_comment(0,"-----------------------------------"); 804 vhdl->set_comment(0,"-- Output Buffer "); 805 vhdl->set_comment(0,"-----------------------------------"); 806 vhdl->set_comment(0,""); 807 808 if(_param->_have_port_context_id) 809 vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_CONTEXT_ID "+ 810 " <= internal_EXECUTE_QUEUE_OUT_CONTEXT_ID ;"); 811 if(_param->_have_port_front_end_id) 812 vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_FRONT_END_ID "+ 813 " <= internal_EXECUTE_QUEUE_OUT_FRONT_END_ID ;"); 814 if(_param->_have_port_ooo_engine_id) 815 vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID"+ 816 " <= internal_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID;"); 817 if(_param->_have_port_rob_ptr) 818 vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_PACKET_ID "+ 819 " <= internal_EXECUTE_QUEUE_OUT_PACKET_ID ;"); 820 vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_FLAGS "+ 821 " <= internal_EXECUTE_QUEUE_OUT_FLAGS ;"); 822 vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_EXCEPTION "+ 823 " <= internal_EXECUTE_QUEUE_OUT_EXCEPTION ;"); 824 vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_NO_SEQUENCE "+ 825 " <= internal_EXECUTE_QUEUE_OUT_NO_SEQUENCE ;"); 826 vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_ADDRESS "+ 827 " <= internal_EXECUTE_QUEUE_OUT_ADDRESS ;"); 828 vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_DATA "+ 829 " <= internal_EXECUTE_QUEUE_OUT_DATA ;"); 830 }; 831 \end{lstlisting} 832 833 \subsubSection{Fichier Execute\_queue.vhdl} 834 835 \lstparam{VHDL} 836 \begin{lstlisting}[caption={Execute\_queue.cpp}] 837 library ieee; 838 use ieee.numeric_bit.all; 839 use ieee.numeric_std.all; 840 use ieee.std_logic_1164.all; 841 use ieee.std_logic_arith.all; 842 use ieee.std_logic_misc.all; 843 --use ieee.std_logic_signed.all; 844 use ieee.std_logic_unsigned.all; 845 --use ieee.std_logic_textio.all; 846 847 library work; 848 use work.Execute_queue_0_Pack.all; 849 use work.Execute_queue_0_queue_Pack.all; 850 851 entity Execute_queue_0 is 852 port ( 853 in_CLOCK : in std_logic; 854 in_NRESET : in std_logic; 855 in_EXECUTE_QUEUE_IN_VAL : in std_logic; 856 out_EXECUTE_QUEUE_IN_ACK : out std_logic; 857 in_EXECUTE_QUEUE_IN_CONTEXT_ID : in std_logic; 858 in_EXECUTE_QUEUE_IN_FRONT_END_ID : in std_logic; 859 in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID : in std_logic; 860 in_EXECUTE_QUEUE_IN_PACKET_ID : in std_logic_vector(5 downto 0); 861 in_EXECUTE_QUEUE_IN_FLAGS : in std_logic_vector(1 downto 0); 862 in_EXECUTE_QUEUE_IN_EXCEPTION : in std_logic_vector(4 downto 0); 863 in_EXECUTE_QUEUE_IN_NO_SEQUENCE : in std_logic; 864 in_EXECUTE_QUEUE_IN_ADDRESS : in std_logic_vector(31 downto 0); 865 in_EXECUTE_QUEUE_IN_DATA : in std_logic_vector(31 downto 0); 866 out_EXECUTE_QUEUE_OUT_VAL : out std_logic; 867 in_EXECUTE_QUEUE_OUT_ACK : in std_logic; 868 out_EXECUTE_QUEUE_OUT_CONTEXT_ID : out std_logic; 869 out_EXECUTE_QUEUE_OUT_FRONT_END_ID : out std_logic; 870 out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID : out std_logic; 871 out_EXECUTE_QUEUE_OUT_PACKET_ID : out std_logic_vector(5 downto 0); 872 out_EXECUTE_QUEUE_OUT_FLAGS : out std_logic_vector(1 downto 0); 873 out_EXECUTE_QUEUE_OUT_EXCEPTION : out std_logic_vector(4 downto 0); 874 out_EXECUTE_QUEUE_OUT_NO_SEQUENCE : out std_logic; 875 out_EXECUTE_QUEUE_OUT_ADDRESS : out std_logic_vector(31 downto 0); 876 out_EXECUTE_QUEUE_OUT_DATA : out std_logic_vector(31 downto 0) 877 ); 878 end Execute_queue_0; 879 880 architecture behavioural of Execute_queue_0 is 881 882 signal internal_QUEUE_INSERT_DATA : std_logic_vector(80 downto 0); 883 signal internal_QUEUE_RETIRE_DATA : std_logic_vector(80 downto 0); 884 885 alias internal_QUEUE_INSERT_VAL : std_logic is 886 in_EXECUTE_QUEUE_IN_VAL; 887 alias internal_QUEUE_INSERT_ACK : std_logic is 888 out_EXECUTE_QUEUE_IN_ACK; 889 alias internal_QUEUE_RETIRE_VAL : std_logic is 890 out_EXECUTE_QUEUE_OUT_VAL; 891 alias internal_QUEUE_RETIRE_ACK : std_logic is 892 in_EXECUTE_QUEUE_OUT_ACK; 893 alias internal_EXECUTE_QUEUE_OUT_CONTEXT_ID : std_logic is 894 internal_QUEUE_RETIRE_DATA (0); 895 alias internal_EXECUTE_QUEUE_OUT_FRONT_END_ID : std_logic is 896 internal_QUEUE_RETIRE_DATA (1); 897 alias internal_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID : std_logic is 898 internal_QUEUE_RETIRE_DATA (2); 899 alias internal_EXECUTE_QUEUE_OUT_PACKET_ID : std_logic_vector(5 downto 0) is 900 internal_QUEUE_RETIRE_DATA (8 downto 3); 901 alias internal_EXECUTE_QUEUE_OUT_FLAGS : std_logic_vector(1 downto 0) is 902 internal_QUEUE_RETIRE_DATA (10 downto 9); 903 alias internal_EXECUTE_QUEUE_OUT_EXCEPTION : std_logic_vector(4 downto 0) is 904 internal_QUEUE_RETIRE_DATA (15 downto 11); 905 alias internal_EXECUTE_QUEUE_OUT_NO_SEQUENCE : std_logic is 906 internal_QUEUE_RETIRE_DATA (16); 907 alias internal_EXECUTE_QUEUE_OUT_ADDRESS : std_logic_vector(31 downto 0) is 908 internal_QUEUE_RETIRE_DATA (48 downto 17); 909 alias internal_EXECUTE_QUEUE_OUT_DATA : std_logic_vector(31 downto 0) is 910 internal_QUEUE_RETIRE_DATA (80 downto 49); 911 912 begin 913 -- 914 -- ----------------------------------- 915 -- -- Instance queue 916 -- ----------------------------------- 917 -- 918 instance_Execute_queue_0_queue : Execute_queue_0_queue 919 port map ( 920 in_CLOCK => in_CLOCK 921 , in_NRESET => in_NRESET 922 , in_INSERT_VAL => internal_QUEUE_INSERT_VAL 923 ,out_INSERT_ACK => internal_QUEUE_INSERT_ACK 924 , in_INSERT_DATA => internal_QUEUE_INSERT_DATA 925 ,out_RETIRE_VAL => internal_QUEUE_RETIRE_VAL 926 , in_RETIRE_ACK => internal_QUEUE_RETIRE_ACK 927 ,out_RETIRE_DATA => internal_QUEUE_RETIRE_DATA 928 ); 929 -- 930 -- ----------------------------------- 931 -- -- Input Buffer 932 -- ----------------------------------- 933 -- 934 internal_QUEUE_INSERT_DATA (0) <= in_EXECUTE_QUEUE_IN_CONTEXT_ID; 935 internal_QUEUE_INSERT_DATA (1) <= in_EXECUTE_QUEUE_IN_FRONT_END_ID; 936 internal_QUEUE_INSERT_DATA (2) <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID; 937 internal_QUEUE_INSERT_DATA (8 downto 3) <= in_EXECUTE_QUEUE_IN_PACKET_ID; 938 internal_QUEUE_INSERT_DATA (10 downto 9) <= in_EXECUTE_QUEUE_IN_FLAGS; 939 internal_QUEUE_INSERT_DATA (15 downto 11) <= in_EXECUTE_QUEUE_IN_EXCEPTION; 940 internal_QUEUE_INSERT_DATA (16) <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE; 941 internal_QUEUE_INSERT_DATA (48 downto 17) <= in_EXECUTE_QUEUE_IN_ADDRESS; 942 internal_QUEUE_INSERT_DATA (80 downto 49) <= in_EXECUTE_QUEUE_IN_DATA; 943 -- 944 -- ----------------------------------- 945 -- -- Output Buffer 946 -- ----------------------------------- 947 -- 948 out_EXECUTE_QUEUE_OUT_CONTEXT_ID <= internal_EXECUTE_QUEUE_OUT_CONTEXT_ID; 949 out_EXECUTE_QUEUE_OUT_FRONT_END_ID <= internal_EXECUTE_QUEUE_OUT_FRONT_END_ID; 950 out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID <= internal_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID; 951 out_EXECUTE_QUEUE_OUT_PACKET_ID <= internal_EXECUTE_QUEUE_OUT_PACKET_ID; 952 out_EXECUTE_QUEUE_OUT_FLAGS <= internal_EXECUTE_QUEUE_OUT_FLAGS; 953 out_EXECUTE_QUEUE_OUT_EXCEPTION <= internal_EXECUTE_QUEUE_OUT_EXCEPTION; 954 out_EXECUTE_QUEUE_OUT_NO_SEQUENCE <= internal_EXECUTE_QUEUE_OUT_NO_SEQUENCE; 955 out_EXECUTE_QUEUE_OUT_ADDRESS <= internal_EXECUTE_QUEUE_OUT_ADDRESS; 956 out_EXECUTE_QUEUE_OUT_DATA <= internal_EXECUTE_QUEUE_OUT_DATA; 957 958 end behavioural; 959 \end{lstlisting} 960 366 961 367 962 \Section {Test du VHDL}\label{testbench} … … 388 983 \item Nous ne vérifions pas la compatibilité au bit près des données présente sur une interface qui ne fait pas de transaction lors d'un cycle. 389 984 \end{itemize} 985 986 \lstparam{VHDL} 987 \begin{lstlisting}[caption={Execute\_queue\_Testbench.vhdl}] 988 library ieee; 989 use ieee.numeric_bit.all; 990 use ieee.numeric_std.all; 991 use ieee.std_logic_1164.all; 992 use ieee.std_logic_arith.all; 993 use ieee.std_logic_misc.all; 994 --use ieee.std_logic_signed.all; 995 use ieee.std_logic_unsigned.all; 996 --use ieee.std_logic_textio.all; 997 998 library work; 999 use work.Execute_queue_0_Pack.all; 1000 1001 entity Execute_queue_0_Testbench is 1002 end Execute_queue_0_Testbench; 1003 1004 architecture behavioural of Execute_queue_0_Testbench is 1005 1006 signal in_CLOCK : std_logic := '0'; 1007 signal in_NRESET : std_logic := '0'; 1008 signal in_EXECUTE_QUEUE_IN_VAL : std_logic; 1009 signal out_EXECUTE_QUEUE_IN_ACK : std_logic; 1010 signal out_EXECUTE_QUEUE_IN_ACK_test : std_logic; 1011 signal in_EXECUTE_QUEUE_IN_PACKET_ID : std_logic_vector(3 downto 0); 1012 signal in_EXECUTE_QUEUE_IN_FLAGS : std_logic_vector(1 downto 0); 1013 signal in_EXECUTE_QUEUE_IN_EXCEPTION : std_logic_vector(4 downto 0); 1014 signal in_EXECUTE_QUEUE_IN_NO_SEQUENCE : std_logic; 1015 signal in_EXECUTE_QUEUE_IN_ADDRESS : std_logic_vector(31 downto 0); 1016 signal in_EXECUTE_QUEUE_IN_DATA : std_logic_vector(31 downto 0); 1017 signal out_EXECUTE_QUEUE_OUT_VAL : std_logic; 1018 signal out_EXECUTE_QUEUE_OUT_VAL_test : std_logic; 1019 signal in_EXECUTE_QUEUE_OUT_ACK : std_logic; 1020 signal out_EXECUTE_QUEUE_OUT_PACKET_ID : std_logic_vector(3 downto 0); 1021 signal out_EXECUTE_QUEUE_OUT_PACKET_ID_test : std_logic_vector(3 downto 0); 1022 signal out_EXECUTE_QUEUE_OUT_FLAGS : std_logic_vector(1 downto 0); 1023 signal out_EXECUTE_QUEUE_OUT_FLAGS_test : std_logic_vector(1 downto 0); 1024 signal out_EXECUTE_QUEUE_OUT_EXCEPTION : std_logic_vector(4 downto 0); 1025 signal out_EXECUTE_QUEUE_OUT_EXCEPTION_test : std_logic_vector(4 downto 0); 1026 signal out_EXECUTE_QUEUE_OUT_NO_SEQUENCE : std_logic; 1027 signal out_EXECUTE_QUEUE_OUT_NO_SEQUENCE_test : std_logic; 1028 signal out_EXECUTE_QUEUE_OUT_ADDRESS : std_logic_vector(31 downto 0); 1029 signal out_EXECUTE_QUEUE_OUT_ADDRESS_test : std_logic_vector(31 downto 0); 1030 signal out_EXECUTE_QUEUE_OUT_DATA : std_logic_vector(31 downto 0); 1031 signal out_EXECUTE_QUEUE_OUT_DATA_test : std_logic_vector(31 downto 0); 1032 1033 signal counter : natural; 1034 signal test : std_logic; 1035 signal interface_test : std_logic; 1036 signal interface_test_ok : std_logic; 1037 signal interface_execute_queue_in_test : std_logic; 1038 signal interface_execute_queue_in_test_ok : std_logic; 1039 signal interface_execute_queue_in_test_transaction : std_logic; 1040 signal interface_execute_queue_in_test_tmp : std_logic; 1041 signal interface_execute_queue_out_test : std_logic; 1042 signal interface_execute_queue_out_test_ok : std_logic; 1043 signal interface_execute_queue_out_test_transaction : std_logic; 1044 signal interface_execute_queue_out_test_tmp : std_logic; 1045 1046 begin 1047 1048 ------------------------------------------------------ 1049 -- Component - Intanciation 1050 ------------------------------------------------------ 1051 1052 instance_Execute_queue_0 : Execute_queue_0 1053 port map ( 1054 in_CLOCK => in_CLOCK 1055 , in_NRESET => in_NRESET 1056 , in_EXECUTE_QUEUE_IN_VAL => in_EXECUTE_QUEUE_IN_VAL 1057 ,out_EXECUTE_QUEUE_IN_ACK => out_EXECUTE_QUEUE_IN_ACK 1058 , in_EXECUTE_QUEUE_IN_PACKET_ID => in_EXECUTE_QUEUE_IN_PACKET_ID 1059 , in_EXECUTE_QUEUE_IN_FLAGS => in_EXECUTE_QUEUE_IN_FLAGS 1060 , in_EXECUTE_QUEUE_IN_EXCEPTION => in_EXECUTE_QUEUE_IN_EXCEPTION 1061 , in_EXECUTE_QUEUE_IN_NO_SEQUENCE => in_EXECUTE_QUEUE_IN_NO_SEQUENCE 1062 , in_EXECUTE_QUEUE_IN_ADDRESS => in_EXECUTE_QUEUE_IN_ADDRESS 1063 , in_EXECUTE_QUEUE_IN_DATA => in_EXECUTE_QUEUE_IN_DATA 1064 ,out_EXECUTE_QUEUE_OUT_VAL => out_EXECUTE_QUEUE_OUT_VAL 1065 , in_EXECUTE_QUEUE_OUT_ACK => in_EXECUTE_QUEUE_OUT_ACK 1066 ,out_EXECUTE_QUEUE_OUT_PACKET_ID => out_EXECUTE_QUEUE_OUT_PACKET_ID 1067 ,out_EXECUTE_QUEUE_OUT_FLAGS => out_EXECUTE_QUEUE_OUT_FLAGS 1068 ,out_EXECUTE_QUEUE_OUT_EXCEPTION => out_EXECUTE_QUEUE_OUT_EXCEPTION 1069 ,out_EXECUTE_QUEUE_OUT_NO_SEQUENCE => out_EXECUTE_QUEUE_OUT_NO_SEQUENCE 1070 ,out_EXECUTE_QUEUE_OUT_ADDRESS => out_EXECUTE_QUEUE_OUT_ADDRESS 1071 ,out_EXECUTE_QUEUE_OUT_DATA => out_EXECUTE_QUEUE_OUT_DATA 1072 ); 1073 ------------------------------------------------------ 1074 -- interface "" 1075 ------------------------------------------------------ 1076 1077 -- Test exhaustive 1078 1079 interface_test_ok <= '1' when true 1080 else '0'; 1081 1082 interface_test <= '1' when (in_NRESET = '0') else interface_test_ok; 1083 ------------------------------------------------------ 1084 -- interface "execute_queue_in" 1085 ------------------------------------------------------ 1086 1087 with counter select 1088 in_EXECUTE_QUEUE_IN_VAL <= 1089 '0' when 0, 1090 '0' when 1, 1091 '0' when 2, 1092 '0' when 3, 1093 '0' when 4, 1094 '1' when 5, 1095 '1' when 6, 1096 '0' when 7, 1097 '0' when 8, 1098 '1' when 9, 1099 '1' when 10, 1100 '1' when 11, 1101 '1' when 12, 1102 '1' when 13, 1103 '1' when 14, 1104 '1' when 15, 1105 '1' when 16, 1106 '0' when 17, 1107 '1' when 18, 1108 '1' when 19, 1109 '1' when 20, 1110 '0' when 21, 1111 '1' when 22, 1112 '1' when 23, 1113 '0' when 24, 1114 '1' when 25, 1115 '0' when 26, 1116 '0' when others; 1117 1118 with counter select 1119 out_EXECUTE_QUEUE_IN_ACK_test <= 1120 '0' when 0, 1121 '1' when 1, 1122 '1' when 2, 1123 '1' when 3, 1124 '1' when 4, 1125 '1' when 5, 1126 '1' when 6, 1127 '1' when 7, 1128 '1' when 8, 1129 '1' when 9, 1130 '1' when 10, 1131 '1' when 11, 1132 '1' when 12, 1133 '1' when 13, 1134 '1' when 14, 1135 '1' when 15, 1136 '1' when 16, 1137 '1' when 17, 1138 '1' when 18, 1139 '1' when 19, 1140 '1' when 20, 1141 '1' when 21, 1142 '1' when 22, 1143 '1' when 23, 1144 '1' when 24, 1145 '1' when 25, 1146 '1' when 26, 1147 '0' when others; 1148 1149 with counter select 1150 in_EXECUTE_QUEUE_IN_PACKET_ID <= 1151 "0000" when 0, 1152 "0000" when 1, 1153 "0000" when 2, 1154 "0000" when 3, 1155 "0000" when 4, 1156 "0000" when 5, 1157 "0001" when 6, 1158 "0001" when 7, 1159 "0001" when 8, 1160 "0010" when 9, 1161 "0011" when 10, 1162 "0100" when 11, 1163 "0101" when 12, 1164 "0110" when 13, 1165 "0111" when 14, 1166 "1000" when 15, 1167 "1001" when 16, 1168 "1001" when 17, 1169 "1010" when 18, 1170 "1011" when 19, 1171 "1100" when 20, 1172 "1100" when 21, 1173 "1101" when 22, 1174 "1110" when 23, 1175 "1110" when 24, 1176 "1111" when 25, 1177 "1111" when 26, 1178 (others => '0') when others; 1179 1180 with counter select 1181 in_EXECUTE_QUEUE_IN_FLAGS <= 1182 "00" when 0, 1183 "00" when 1, 1184 "00" when 2, 1185 "00" when 3, 1186 "00" when 4, 1187 "11" when 5, 1188 "11" when 6, 1189 "11" when 7, 1190 "11" when 8, 1191 "00" when 9, 1192 "11" when 10, 1193 "11" when 11, 1194 "11" when 12, 1195 "10" when 13, 1196 "01" when 14, 1197 "01" when 15, 1198 "11" when 16, 1199 "11" when 17, 1200 "10" when 18, 1201 "00" when 19, 1202 "11" when 20, 1203 "11" when 21, 1204 "10" when 22, 1205 "01" when 23, 1206 "01" when 24, 1207 "01" when 25, 1208 "01" when 26, 1209 (others => '0') when others; 1210 1211 with counter select 1212 in_EXECUTE_QUEUE_IN_EXCEPTION <= 1213 "00000" when 0, 1214 "00000" when 1, 1215 "00000" when 2, 1216 "00000" when 3, 1217 "00000" when 4, 1218 "10001" when 5, 1219 "10010" when 6, 1220 "10010" when 7, 1221 "10010" when 8, 1222 "11011" when 9, 1223 "10011" when 10, 1224 "10001" when 11, 1225 "11000" when 12, 1226 "11011" when 13, 1227 "00001" when 14, 1228 "00001" when 15, 1229 "01010" when 16, 1230 "01010" when 17, 1231 "01100" when 18, 1232 "01100" when 19, 1233 "11011" when 20, 1234 "11011" when 21, 1235 "00101" when 22, 1236 "01001" when 23, 1237 "01001" when 24, 1238 "10001" when 25, 1239 "10001" when 26, 1240 (others => '0') when others; 1241 1242 with counter select 1243 in_EXECUTE_QUEUE_IN_NO_SEQUENCE <= 1244 '0' when 0, 1245 '0' when 1, 1246 '0' when 2, 1247 '0' when 3, 1248 '0' when 4, 1249 '1' when 5, 1250 '1' when 6, 1251 '1' when 7, 1252 '1' when 8, 1253 '1' when 9, 1254 '1' when 10, 1255 '1' when 11, 1256 '1' when 12, 1257 '1' when 13, 1258 '1' when 14, 1259 '1' when 15, 1260 '1' when 16, 1261 '1' when 17, 1262 '1' when 18, 1263 '1' when 19, 1264 '1' when 20, 1265 '1' when 21, 1266 '1' when 22, 1267 '1' when 23, 1268 '1' when 24, 1269 '1' when 25, 1270 '1' when 26, 1271 '0' when others; 1272 1273 with counter select 1274 in_EXECUTE_QUEUE_IN_ADDRESS <= 1275 "00000000000000000000000000000000" when 0, 1276 "00000000000000000000000000000000" when 1, 1277 "00000000000000000000000000000000" when 2, 1278 "00000000000000000000000000000000" when 3, 1279 "00000000000000000000000000000000" when 4, 1280 "00101010111010001001010001001010" when 5, 1281 "01111001111000101010100111100011" when 6, 1282 "01111001111000101010100111100011" when 7, 1283 "01111001111000101010100111100011" when 8, 1284 "00010001100100001100110111100111" when 9, 1285 "01000001101001111100010011001001" when 10, 1286 "00100101011100010011000010100011" when 11, 1287 "01100111011000111000010001011110" when 12, 1288 "01110001111100110010010001010100" when 13, 1289 "01110011011110111000110111011100" when 14, 1290 "01000100000010111010110111111100" when 15, 1291 "01010001111010101101001101101011" when 16, 1292 "01010001111010101101001101101011" when 17, 1293 "00011101010011101101010000111011" when 18, 1294 "00111000010000110111111111011011" when 19, 1295 "01111001101000011101111010101010" when 20, 1296 "01111001101000011101111010101010" when 21, 1297 "01100100100110111011011101111100" when 22, 1298 "00010101101101011010111101011100" when 23, 1299 "00010101101101011010111101011100" when 24, 1300 "01010111100110111110010011110001" when 25, 1301 "01010111100110111110010011110001" when 26, 1302 (others => '0') when others; 1303 1304 with counter select 1305 in_EXECUTE_QUEUE_IN_DATA <= 1306 "00000000000000000000000000000000" when 0, 1307 "00000000000000000000000000000000" when 1, 1308 "00000000000000000000000000000000" when 2, 1309 "00000000000000000000000000000000" when 3, 1310 "00000000000000000000000000000000" when 4, 1311 "01100010010101010101100011101100" when 5, 1312 "01110101010001011110000101000110" when 6, 1313 "01110101010001011110000101000110" when 7, 1314 "01110101010001011110000101000110" when 8, 1315 "01100110111011110100001110001101" when 9, 1316 "01101011011010000000011110011010" when 10, 1317 "01100010101110111101100101011010" when 11, 1318 "01110101101000101010100011010100" when 12, 1319 "00101100101010001000011000010001" when 13, 1320 "01101100111010101111000010000111" when 14, 1321 "00000101000001110010001101100111" when 15, 1322 "00101101010100010111011110010110" when 16, 1323 "00101101010100010111011110010110" when 17, 1324 "01110010010110100000011011111011" when 18, 1325 "01110110010001001010010001011100" when 19, 1326 "01110101110001101100001100111010" when 20, 1327 "01110101110001101100001100111010" when 21, 1328 "00100111010110101100011110010100" when 22, 1329 "01110100000100100010011010111011" when 23, 1330 "01110100000100100010011010111011" when 24, 1331 "00110001000011000101000010110011" when 25, 1332 "00110001000011000101000010110011" when 26, 1333 (others => '0') when others; 1334 1335 -- Test partial 1336 1337 interface_execute_queue_in_test_ok <= '1' when true 1338 and out_EXECUTE_QUEUE_IN_ACK = out_EXECUTE_QUEUE_IN_ACK_test 1339 else '0'; 1340 1341 interface_execute_queue_in_test_transaction <= '1' 1342 and in_EXECUTE_QUEUE_IN_VAL 1343 and out_EXECUTE_QUEUE_IN_ACK 1344 ; 1345 1346 with counter select 1347 interface_execute_queue_in_test_tmp <= 1348 interface_execute_queue_in_test_transaction and interface_execute_queue_in_test_ok 1349 when 5, 1350 interface_execute_queue_in_test_transaction and interface_execute_queue_in_test_ok 1351 when 6, 1352 interface_execute_queue_in_test_transaction and interface_execute_queue_in_test_ok 1353 when 9, 1354 interface_execute_queue_in_test_transaction and interface_execute_queue_in_test_ok 1355 when 10, 1356 interface_execute_queue_in_test_transaction and interface_execute_queue_in_test_ok 1357 when 11, 1358 interface_execute_queue_in_test_transaction and interface_execute_queue_in_test_ok 1359 when 12, 1360 interface_execute_queue_in_test_transaction and interface_execute_queue_in_test_ok 1361 when 13, 1362 interface_execute_queue_in_test_transaction and interface_execute_queue_in_test_ok 1363 when 14, 1364 interface_execute_queue_in_test_transaction and interface_execute_queue_in_test_ok 1365 when 15, 1366 interface_execute_queue_in_test_transaction and interface_execute_queue_in_test_ok 1367 when 16, 1368 interface_execute_queue_in_test_transaction and interface_execute_queue_in_test_ok 1369 when 18, 1370 interface_execute_queue_in_test_transaction and interface_execute_queue_in_test_ok 1371 when 19, 1372 interface_execute_queue_in_test_transaction and interface_execute_queue_in_test_ok 1373 when 20, 1374 interface_execute_queue_in_test_transaction and interface_execute_queue_in_test_ok 1375 when 22, 1376 interface_execute_queue_in_test_transaction and interface_execute_queue_in_test_ok 1377 when 23, 1378 interface_execute_queue_in_test_transaction and interface_execute_queue_in_test_ok 1379 when 25, 1380 not interface_execute_queue_in_test_transaction when others; 1381 1382 interface_execute_queue_in_test <= '1' when (in_NRESET = '0') else 1383 interface_execute_queue_in_test_tmp; 1384 ------------------------------------------------------ 1385 -- interface "execute_queue_out" 1386 ------------------------------------------------------ 1387 1388 with counter select 1389 out_EXECUTE_QUEUE_OUT_VAL_test <= 1390 '0' when 0, 1391 '0' when 1, 1392 '0' when 2, 1393 '0' when 3, 1394 '0' when 4, 1395 '0' when 5, 1396 '1' when 6, 1397 '1' when 7, 1398 '0' when 8, 1399 '0' when 9, 1400 '1' when 10, 1401 '1' when 11, 1402 '1' when 12, 1403 '1' when 13, 1404 '1' when 14, 1405 '1' when 15, 1406 '1' when 16, 1407 '1' when 17, 1408 '0' when 18, 1409 '1' when 19, 1410 '1' when 20, 1411 '1' when 21, 1412 '1' when 22, 1413 '1' when 23, 1414 '1' when 24, 1415 '0' when 25, 1416 '1' when 26, 1417 '0' when others; 1418 1419 with counter select 1420 in_EXECUTE_QUEUE_OUT_ACK <= 1421 '0' when 0, 1422 '0' when 1, 1423 '0' when 2, 1424 '0' when 3, 1425 '0' when 4, 1426 '1' when 5, 1427 '1' when 6, 1428 '1' when 7, 1429 '1' when 8, 1430 '0' when 9, 1431 '1' when 10, 1432 '1' when 11, 1433 '1' when 12, 1434 '1' when 13, 1435 '1' when 14, 1436 '1' when 15, 1437 '1' when 16, 1438 '1' when 17, 1439 '1' when 18, 1440 '1' when 19, 1441 '1' when 20, 1442 '0' when 21, 1443 '1' when 22, 1444 '1' when 23, 1445 '1' when 24, 1446 '1' when 25, 1447 '1' when 26, 1448 '0' when others; 1449 1450 with counter select 1451 out_EXECUTE_QUEUE_OUT_PACKET_ID_test <= 1452 "0000" when 0, 1453 "0000" when 1, 1454 "0000" when 2, 1455 "0000" when 3, 1456 "0000" when 4, 1457 "0000" when 5, 1458 "0000" when 6, 1459 "0001" when 7, 1460 "0001" when 8, 1461 "0001" when 9, 1462 "0010" when 10, 1463 "0011" when 11, 1464 "0100" when 12, 1465 "0101" when 13, 1466 "0110" when 14, 1467 "0111" when 15, 1468 "1000" when 16, 1469 "1001" when 17, 1470 "1001" when 18, 1471 "1010" when 19, 1472 "1011" when 20, 1473 "1100" when 21, 1474 "1100" when 22, 1475 "1101" when 23, 1476 "1110" when 24, 1477 "1110" when 25, 1478 "1111" when 26, 1479 (others => '0') when others; 1480 1481 with counter select 1482 out_EXECUTE_QUEUE_OUT_FLAGS_test <= 1483 "00" when 0, 1484 "00" when 1, 1485 "00" when 2, 1486 "00" when 3, 1487 "00" when 4, 1488 "00" when 5, 1489 "11" when 6, 1490 "11" when 7, 1491 "11" when 8, 1492 "11" when 9, 1493 "00" when 10, 1494 "11" when 11, 1495 "11" when 12, 1496 "11" when 13, 1497 "10" when 14, 1498 "01" when 15, 1499 "01" when 16, 1500 "11" when 17, 1501 "11" when 18, 1502 "10" when 19, 1503 "00" when 20, 1504 "11" when 21, 1505 "11" when 22, 1506 "10" when 23, 1507 "01" when 24, 1508 "01" when 25, 1509 "01" when 26, 1510 (others => '0') when others; 1511 1512 with counter select 1513 out_EXECUTE_QUEUE_OUT_EXCEPTION_test <= 1514 "00000" when 0, 1515 "00000" when 1, 1516 "00000" when 2, 1517 "00000" when 3, 1518 "00000" when 4, 1519 "00000" when 5, 1520 "10001" when 6, 1521 "10010" when 7, 1522 "10010" when 8, 1523 "10010" when 9, 1524 "11011" when 10, 1525 "10011" when 11, 1526 "10001" when 12, 1527 "11000" when 13, 1528 "11011" when 14, 1529 "00001" when 15, 1530 "00001" when 16, 1531 "01010" when 17, 1532 "01010" when 18, 1533 "01100" when 19, 1534 "01100" when 20, 1535 "11011" when 21, 1536 "11011" when 22, 1537 "00101" when 23, 1538 "01001" when 24, 1539 "01001" when 25, 1540 "10001" when 26, 1541 (others => '0') when others; 1542 1543 with counter select 1544 out_EXECUTE_QUEUE_OUT_NO_SEQUENCE_test <= 1545 '0' when 0, 1546 '0' when 1, 1547 '0' when 2, 1548 '0' when 3, 1549 '0' when 4, 1550 '0' when 5, 1551 '1' when 6, 1552 '1' when 7, 1553 '1' when 8, 1554 '1' when 9, 1555 '1' when 10, 1556 '1' when 11, 1557 '1' when 12, 1558 '1' when 13, 1559 '1' when 14, 1560 '1' when 15, 1561 '1' when 16, 1562 '1' when 17, 1563 '1' when 18, 1564 '1' when 19, 1565 '1' when 20, 1566 '1' when 21, 1567 '1' when 22, 1568 '1' when 23, 1569 '1' when 24, 1570 '1' when 25, 1571 '1' when 26, 1572 '0' when others; 1573 1574 with counter select 1575 out_EXECUTE_QUEUE_OUT_ADDRESS_test <= 1576 "00000000000000000000000000000000" when 0, 1577 "00000000000000000000000000000000" when 1, 1578 "00000000000000000000000000000000" when 2, 1579 "00000000000000000000000000000000" when 3, 1580 "00000000000000000000000000000000" when 4, 1581 "00000000000000000000000000000000" when 5, 1582 "00101010111010001001010001001010" when 6, 1583 "01111001111000101010100111100011" when 7, 1584 "01111001111000101010100111100011" when 8, 1585 "01111001111000101010100111100011" when 9, 1586 "00010001100100001100110111100111" when 10, 1587 "01000001101001111100010011001001" when 11, 1588 "00100101011100010011000010100011" when 12, 1589 "01100111011000111000010001011110" when 13, 1590 "01110001111100110010010001010100" when 14, 1591 "01110011011110111000110111011100" when 15, 1592 "01000100000010111010110111111100" when 16, 1593 "01010001111010101101001101101011" when 17, 1594 "01010001111010101101001101101011" when 18, 1595 "00011101010011101101010000111011" when 19, 1596 "00111000010000110111111111011011" when 20, 1597 "01111001101000011101111010101010" when 21, 1598 "01111001101000011101111010101010" when 22, 1599 "01100100100110111011011101111100" when 23, 1600 "00010101101101011010111101011100" when 24, 1601 "00010101101101011010111101011100" when 25, 1602 "01010111100110111110010011110001" when 26, 1603 (others => '0') when others; 1604 1605 with counter select 1606 out_EXECUTE_QUEUE_OUT_DATA_test <= 1607 "00000000000000000000000000000000" when 0, 1608 "00000000000000000000000000000000" when 1, 1609 "00000000000000000000000000000000" when 2, 1610 "00000000000000000000000000000000" when 3, 1611 "00000000000000000000000000000000" when 4, 1612 "00000000000000000000000000000000" when 5, 1613 "01100010010101010101100011101100" when 6, 1614 "01110101010001011110000101000110" when 7, 1615 "01110101010001011110000101000110" when 8, 1616 "01110101010001011110000101000110" when 9, 1617 "01100110111011110100001110001101" when 10, 1618 "01101011011010000000011110011010" when 11, 1619 "01100010101110111101100101011010" when 12, 1620 "01110101101000101010100011010100" when 13, 1621 "00101100101010001000011000010001" when 14, 1622 "01101100111010101111000010000111" when 15, 1623 "00000101000001110010001101100111" when 16, 1624 "00101101010100010111011110010110" when 17, 1625 "00101101010100010111011110010110" when 18, 1626 "01110010010110100000011011111011" when 19, 1627 "01110110010001001010010001011100" when 20, 1628 "01110101110001101100001100111010" when 21, 1629 "01110101110001101100001100111010" when 22, 1630 "00100111010110101100011110010100" when 23, 1631 "01110100000100100010011010111011" when 24, 1632 "01110100000100100010011010111011" when 25, 1633 "00110001000011000101000010110011" when 26, 1634 (others => '0') when others; 1635 1636 -- Test partial 1637 1638 interface_execute_queue_out_test_ok <= '1' when true 1639 and out_EXECUTE_QUEUE_OUT_VAL = out_EXECUTE_QUEUE_OUT_VAL_test 1640 and out_EXECUTE_QUEUE_OUT_PACKET_ID = out_EXECUTE_QUEUE_OUT_PACKET_ID_test 1641 and out_EXECUTE_QUEUE_OUT_FLAGS = out_EXECUTE_QUEUE_OUT_FLAGS_test 1642 and out_EXECUTE_QUEUE_OUT_EXCEPTION = out_EXECUTE_QUEUE_OUT_EXCEPTION_test 1643 and out_EXECUTE_QUEUE_OUT_NO_SEQUENCE = out_EXECUTE_QUEUE_OUT_NO_SEQUENCE_test 1644 and out_EXECUTE_QUEUE_OUT_ADDRESS = out_EXECUTE_QUEUE_OUT_ADDRESS_test 1645 and out_EXECUTE_QUEUE_OUT_DATA = out_EXECUTE_QUEUE_OUT_DATA_test 1646 else '0'; 1647 1648 interface_execute_queue_out_test_transaction <= '1' 1649 and out_EXECUTE_QUEUE_OUT_VAL 1650 and in_EXECUTE_QUEUE_OUT_ACK 1651 ; 1652 1653 with counter select 1654 interface_execute_queue_out_test_tmp <= 1655 interface_execute_queue_out_test_transaction and interface_execute_queue_out_test_ok 1656 when 6, 1657 interface_execute_queue_out_test_transaction and interface_execute_queue_out_test_ok 1658 when 7, 1659 interface_execute_queue_out_test_transaction and interface_execute_queue_out_test_ok 1660 when 10, 1661 interface_execute_queue_out_test_transaction and interface_execute_queue_out_test_ok 1662 when 11, 1663 interface_execute_queue_out_test_transaction and interface_execute_queue_out_test_ok 1664 when 12, 1665 interface_execute_queue_out_test_transaction and interface_execute_queue_out_test_ok 1666 when 13, 1667 interface_execute_queue_out_test_transaction and interface_execute_queue_out_test_ok 1668 when 14, 1669 interface_execute_queue_out_test_transaction and interface_execute_queue_out_test_ok 1670 when 15, 1671 interface_execute_queue_out_test_transaction and interface_execute_queue_out_test_ok 1672 when 16, 1673 interface_execute_queue_out_test_transaction and interface_execute_queue_out_test_ok 1674 when 17, 1675 interface_execute_queue_out_test_transaction and interface_execute_queue_out_test_ok 1676 when 19, 1677 interface_execute_queue_out_test_transaction and interface_execute_queue_out_test_ok 1678 when 20, 1679 interface_execute_queue_out_test_transaction and interface_execute_queue_out_test_ok 1680 when 22, 1681 interface_execute_queue_out_test_transaction and interface_execute_queue_out_test_ok 1682 when 23, 1683 interface_execute_queue_out_test_transaction and interface_execute_queue_out_test_ok 1684 when 24, 1685 interface_execute_queue_out_test_transaction and interface_execute_queue_out_test_ok 1686 when 26, 1687 not interface_execute_queue_out_test_transaction when others; 1688 1689 interface_execute_queue_out_test <= '1' when (in_NRESET = '0') else 1690 interface_execute_queue_out_test_tmp; 1691 1692 ------------------------------------------------------ 1693 -- Test 1694 ------------------------------------------------------ 1695 1696 test <= '1' 1697 and interface_test 1698 and interface_execute_queue_in_test 1699 and interface_execute_queue_out_test; 1700 1701 ------------------------------------------------------ 1702 -- reset 1703 ------------------------------------------------------ 1704 1705 -- if the systemC simulate have multiple reset, we make the last 1706 in_NRESET <= '1' after 150 ns; 1707 1708 ------------------------------------------------------ 1709 -- process clock_name 1710 ------------------------------------------------------ 1711 1712 in_CLOCK <= not in_CLOCK after 50 ns; 1713 1714 process (in_CLOCK) 1715 begin 1716 if (in_CLOCK'event and in_CLOCK = '1') then 1717 1718 if (in_NRESET = '0') then 1719 counter <= 4; 1720 else 1721 counter <= counter+1; 1722 1723 assert not (counter >= 27) report "Test OK" severity FAILURE; 1724 assert not (test = '0') report "Test KO" severity FAILURE; 1725 end if; 1726 end if; 1727 end process; 1728 end behavioural; 1729 \end{lstlisting} -
trunk/IPs/systemC/processor/Morpheo/Documentation/sty/doc-style.sty
r91 r98 16 16 \usepackage[latin1]{inputenc} % Car jâécris selon le jeu de caractÚres ISO-8859-1 17 17 %\usepackage[utf8]{inputenc} % Car jâécris selon le jeu de caractÚres UTF-8 18 18 \usepackage{listings} 19 19 \usepackage{openbib} 20 20 \usepackage{fancyhdr} … … 83 83 } 84 84 85 \newcommand{\lstparam}[1] 86 { 87 \lstset{ 88 language=#1, 89 numbers=left, 90 numberstyle=\tiny, 91 stepnumber=5, 92 numbersep=5pt, 93 firstnumber=1} 94 } 85 95 \newcommand{\TODO}[1] 86 96 {
Note: See TracChangeset
for help on using the changeset viewer.