Changeset 101 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/src/test.cpp
- Timestamp:
- Jan 15, 2009, 6:19:08 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/src/test.cpp
r100 r101 18 18 public : const Tcontext_t _front_end_id ; 19 19 public : const Tcontext_t _ooo_engine_id; 20 public : const Tpacket_t_packet_id ;20 public : const uint32_t _packet_id ; 21 21 public : const Toperation_t _operation ; 22 22 public : const Ttype_t _type ; … … 40 40 Tcontext_t front_end_id , 41 41 Tcontext_t ooo_engine_id, 42 Tpacket_tpacket_id ,42 uint32_t packet_id , 43 43 Toperation_t operation , 44 44 Ttype_t type , … … 356 356 transaction_in.push_back(execute_transaction(_param,0,0,0, 99,OPERATION_FIND_L_FL1 ,TYPE_FIND,0,0 ,0x80000000,0x0 ,0 ,1,63,32 ,0,15,FLAG_CY ,EXCEPTION_NONE ,0)); 357 357 358 //transaction_in.push_back(execute_transaction(_param,0,0,0,100,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x12344321,0x1 ,0 ,1,63,0x12344320,1,15,0 ,EXCEPTION_NONE ,0));359 //transaction_in.push_back(execute_transaction(_param,0,0,0,101,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x12345678,0xffffffff,0 ,1,56,0x12345679,1,3 ,0 ,EXCEPTION_NONE ,0));360 //transaction_in.push_back(execute_transaction(_param,0,0,0,102,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x12345678,0x12345678,0 ,1,56,0x0 ,1,3 ,0 ,EXCEPTION_NONE ,0));361 //transaction_in.push_back(execute_transaction(_param,0,0,0,103,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x0 ,0x0 ,0 ,1,56,0x0 ,1,3 ,0 ,EXCEPTION_NONE ,0));362 // transaction_in.push_back(execute_transaction(_param,0,0,0,104,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x70000000,0x90000000,0 ,1,56,0x0 ,1,3 ,FLAG_CY ,EXCEPTION_NONE,0));363 // transaction_in.push_back(execute_transaction(_param,0,0,0,105,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x80001000,0x80000000,0 ,1,1 ,0x1000 ,1,0 ,FLAG_CY|FLAG_OV,EXCEPTION_ALU_RANGE,0));364 // transaction_in.push_back(execute_transaction(_param,0,0,0,106,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x00000001,0x7fffffff,FLAG_CY|FLAG_OV,1,1 ,0x80000000,1,0 , FLAG_OV,EXCEPTION_ALU_RANGE,0));358 transaction_in.push_back(execute_transaction(_param,0,0,0,100,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x12344321,0x1 ,0 ,1,63,0x12344320,1,15,0 ,EXCEPTION_NONE ,0)); 359 transaction_in.push_back(execute_transaction(_param,0,0,0,101,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x12345678,0xffffffff,0 ,1,56,0x12345679,1,3 ,0 ,EXCEPTION_NONE ,0)); 360 transaction_in.push_back(execute_transaction(_param,0,0,0,102,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x12345678,0x12345678,0 ,1,56,0x0 ,1,3 ,0 ,EXCEPTION_NONE ,0)); 361 transaction_in.push_back(execute_transaction(_param,0,0,0,103,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x0 ,0x0 ,0 ,1,56,0x0 ,1,3 ,0 ,EXCEPTION_NONE ,0)); 362 transaction_in.push_back(execute_transaction(_param,0,0,0,104,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x70000000,0x90000000,0 ,1,56,0xe0000000,1,3 , FLAG_OV,EXCEPTION_ALU_RANGE,0)); 363 transaction_in.push_back(execute_transaction(_param,0,0,0,105,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x80001000,0x80000000,0 ,1,1 ,0x1000 ,1,0 , FLAG_OV,EXCEPTION_ALU_RANGE,0)); 364 transaction_in.push_back(execute_transaction(_param,0,0,0,106,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x00000001,0x7fffffff,FLAG_CY|FLAG_OV,1,1 ,0x80000002,1,0 ,FLAG_CY ,EXCEPTION_NONE ,0)); 365 365 366 366 transaction_in.push_back(execute_transaction(_param,0,0,0,120,OPERATION_TEST_L_SFEQ ,TYPE_TEST,0,0 ,0xdead ,0xdead ,0 ,0,63,0x0 ,1,15,FLAG_F ,EXCEPTION_NONE ,0)); // + == + … … 440 440 transaction_in.push_back(execute_transaction(_param,0,0,0,232,OPERATION_TEST_L_SFGES ,TYPE_TEST,0,0 ,0x21071981,0x25071959,0 ,0,63,0x0 ,1,15,0 ,EXCEPTION_NONE ,0)); // + < + 441 441 transaction_in.push_back(execute_transaction(_param,0,0,0,233,OPERATION_TEST_L_SFGES ,TYPE_TEST,0,0 ,0xdeadbeef,0xdeadbeef,0 ,0,63,0x0 ,1,15,FLAG_F ,EXCEPTION_NONE ,0)); // - == - 442 transaction_in.push_back(execute_transaction(_param,0,0,0,234,OPERATION_TEST_L_SFGES ,TYPE_TEST,0,0 ,0xdeadbabe,0xdeadbeef,0 ,0,63,0x0 ,1,15, FLAG_F,EXCEPTION_NONE ,0)); // - > -442 transaction_in.push_back(execute_transaction(_param,0,0,0,234,OPERATION_TEST_L_SFGES ,TYPE_TEST,0,0 ,0xdeadbabe,0xdeadbeef,0 ,0,63,0x0 ,1,15,0 ,EXCEPTION_NONE ,0)); // - > - 443 443 transaction_in.push_back(execute_transaction(_param,0,0,0,235,OPERATION_TEST_L_SFGES ,TYPE_TEST,0,0 ,0xdeadbeef,0xdeadbabe,0 ,0,63,0x0 ,1,15,0 ,EXCEPTION_NONE ,0)); // - < - 444 444 transaction_in.push_back(execute_transaction(_param,0,0,0,236,OPERATION_TEST_L_SFGES ,TYPE_TEST,0,0 ,0xdeadbeef,0x21524111,0 ,0,63,0x0 ,1,15,0 ,EXCEPTION_NONE ,0)); // - == + (in unsigned) … … 569 569 transaction_in.push_back(execute_transaction(_param,0,0,0,628,OPERATION_SPECIAL_L_MFSPR ,TYPE_SPECIAL,1,GROUP_CUSTOM_7<<11, 0,0x0 ,0 ,1,63,0xa ,0, 0,0 ,EXCEPTION_ALU_NONE ,0,(GROUP_CUSTOM_7<<11)|0)); 570 570 571 transaction_in.push_back(execute_transaction(_param,0,0,0,700,OPERATION_MUL_L_MUL ,TYPE_MUL,0,0 ,0x00000001,0x00000001,0 ,1,63,0x00000001,1,15,0 ,EXCEPTION_NONE ,0)); 572 transaction_in.push_back(execute_transaction(_param,0,0,0,701,OPERATION_MUL_L_MUL ,TYPE_MUL,0,0 ,0x00002107,0x00001981,0 ,1,63,0x034a5387,1,15,0 ,EXCEPTION_NONE ,0)); 573 transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MUL ,TYPE_MUL,0,0 ,0x00048698,0x0000dead,0 ,1,63,0xefc6c4b8,1,15,FLAG_CY|FLAG_OV,EXCEPTION_ALU_RANGE,0)); 574 transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MUL ,TYPE_MUL,0,0 ,0x40000000,0x00000002,0 ,1,63,0x80000000,1,15, FLAG_OV,EXCEPTION_ALU_RANGE,0)); 575 transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MUL ,TYPE_MUL,0,0 ,0x40000000,0x00000004,0 ,1,63,0x00000000,1,15,FLAG_CY ,EXCEPTION_NONE ,0)); 576 577 transaction_in.push_back(execute_transaction(_param,0,0,0,700,OPERATION_MUL_L_MULU ,TYPE_MUL,0,0 ,0x00000001,0x00000001,0 ,1,63,0x00000001,1,15,0 ,EXCEPTION_NONE ,0)); 578 transaction_in.push_back(execute_transaction(_param,0,0,0,701,OPERATION_MUL_L_MULU ,TYPE_MUL,0,0 ,0x00002107,0x00001981,0 ,1,63,0x034a5387,1,15,0 ,EXCEPTION_NONE ,0)); 579 transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MULU ,TYPE_MUL,0,0 ,0x00048698,0x0000dead,0 ,1,63,0xefc6c4b8,1,15,FLAG_CY|FLAG_OV,EXCEPTION_ALU_RANGE,0)); 580 transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MULU ,TYPE_MUL,0,0 ,0x40000000,0x00000002,0 ,1,63,0x80000000,1,15, FLAG_OV,EXCEPTION_ALU_RANGE,0)); 581 transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MULU ,TYPE_MUL,0,0 ,0x40000000,0x00000004,0 ,1,63,0x00000000,1,15,FLAG_CY ,EXCEPTION_NONE ,0)); 582 583 584 571 585 LABEL("Reset"); 572 586 in_NRESET.write(0); … … 585 599 586 600 LABEL("Iteration %d",iteration); 587 601 588 602 while (nb_transaction_out > 0) 589 603 { 590 604 Tcontrol_t val = ((rand()%100) < percent_transaction_execute_in) and not transaction_in.empty(); 591 605 in_EXECUTE_IN_VAL .write(val); … … 601 615 in_EXECUTE_IN_OOO_ENGINE_ID .write(transaction_in.front()._ooo_engine_id); 602 616 if (_param->_have_port_rob_ptr) 603 in_EXECUTE_IN_PACKET_ID .write(transaction_in.front()._packet_id);617 in_EXECUTE_IN_PACKET_ID .write(static_cast<Tpacket_t>(transaction_in.front()._packet_id)); 604 618 in_EXECUTE_IN_OPERATION .write(transaction_in.front()._operation ); 605 619 in_EXECUTE_IN_TYPE .write(transaction_in.front()._type ); … … 624 638 // TEST 625 639 if (_param->_have_port_rob_ptr) 626 TEST(Tpacket_t , out_EXECUTE_OUT_PACKET_ID .read(), transaction_out.front()._packet_id);640 TEST(Tpacket_t , out_EXECUTE_OUT_PACKET_ID .read(), static_cast<Tpacket_t>(transaction_out.front()._packet_id )); 627 641 if (_param->_have_port_context_id) 628 642 TEST(Tcontext_t , out_EXECUTE_OUT_CONTEXT_ID .read(), transaction_out.front()._context_id ); … … 649 663 TEST(Tgeneral_data_t , out_EXECUTE_OUT_DATA_RD .read(), transaction_out.front()._data_rd ); 650 664 TEST(Tgeneral_data_t , out_EXECUTE_OUT_ADDRESS .read(), transaction_out.front()._address ); 651 break;652 665 } 653 666 … … 659 672 TEST(Tgeneral_data_t , out_EXECUTE_OUT_DATA_RD .read(), transaction_out.front()._data_rd ); 660 673 TEST(Tgeneral_data_t , out_EXECUTE_OUT_ADDRESS .read(), transaction_out.front()._address ); 661 break;662 674 } 663 675 … … 685 697 686 698 SC_START(1); 687 699 } 688 700 689 701 } 702 690 703 /******************************************************** 691 704 * Simulation - End
Note: See TracChangeset
for help on using the changeset viewer.