Changeset 82 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/src/test.cpp
- Timestamp:
- May 1, 2008, 6:48:45 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/src/test.cpp
r81 r82 6 6 * Test 7 7 */ 8 #define NB_ITERATION 2 9 #define CYCLE_MAX (2048*NB_ITERATION) 8 10 9 11 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/include/test.h" 10 12 #include "Common/include/Test.h" 11 13 #include "Common/include/BitManipulation.h" 12 13 #define NB_ITERATION 214 #define CYCLE_MAX (2048*NB_ITERATION)15 16 #define LABEL(str) \17 { \18 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \19 } while(0)20 21 static uint32_t cycle = 0;22 23 #define SC_START(cycle_offset) \24 do \25 { \26 /*cout << "SC_START (begin)" << endl;*/ \27 \28 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \29 sc_start(cycle_offset); \30 if (cycle_current != cycle) \31 { \32 cycle = cycle_current; \33 cout << "##########[ cycle "<< cycle << " ]" << endl; \34 } \35 \36 if (cycle_current > CYCLE_MAX) \37 { \38 TEST_KO("Maximal cycles Reached"); \39 } \40 /*cout << "SC_START (end )" << endl;*/ \41 } while(0)42 14 43 15 void test (string name, … … 50 22 #endif 51 23 52 Reservation_station * _Reservation_station = new Reservation_station (name.c_str(), 24 Reservation_station * _Reservation_station = new Reservation_station 25 (name.c_str(), 53 26 #ifdef STATISTICS 54 27 _parameters_statistics, 55 28 #endif 56 _param); 29 _param, 30 USE_ALL); 57 31 58 32 #ifdef SYSTEMC … … 354 328 for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++) 355 329 { 356 LABEL("Iteration "+toString(iteration));330 LABEL("Iteration %d",iteration); 357 331 358 332 int32_t percent_transaction_queue_in = (rand()%50)+25; … … 507 481 if (val) 508 482 { 509 LABEL(" * GPR_WRITE [ "+toString(i)+"] - gpr["+toString(num_reg)+"]["+toString(ooo_engine)+"] <- "+toString(data));483 LABEL(" * GPR_WRITE [%d] - gpr[%d][%d] <- 0x%x",i,num_reg,ooo_engine,data); 510 484 can_gpr_use [ooo_engine][num_reg] = false; 511 485 need_gpr [ooo_engine][num_reg] = false; … … 533 507 if (val == 1) 534 508 { 535 LABEL(" * SPR_WRITE ["+toString(i)+"] - spr["+toString(num_reg)+"]["+toString(ooo_engine)+"] <- "+toString(data)); 509 LABEL(" * SPR_WRITE [%d] - spr[%d][%d] <- 0x%x",i,num_reg,ooo_engine,data); 510 536 511 can_spr_use [ooo_engine][num_reg] = false; 537 512 need_spr[ooo_engine][num_reg] = false; … … 560 535 if (gpr_val) 561 536 { 562 LABEL(" * BYPASS_WRITE [ "+toString(i)+"] - gpr["+toString(gpr_num_reg)+"]["+toString(ooo_engine)+"] <- "+toString(gpr_data));537 LABEL(" * BYPASS_WRITE [%d] - gpr[%d][%d] <- 0x%x",i,gpr_num_reg,ooo_engine,gpr_data); 563 538 can_gpr_use [ooo_engine][gpr_num_reg] = false; 564 539 need_gpr[ooo_engine][gpr_num_reg] = false; … … 580 555 if (spr_val) 581 556 { 582 LABEL(" * BYPASS_WRITE ["+toString(i)+"] - spr["+toString(spr_num_reg)+"]["+toString(ooo_engine)+"] <- "+toString(spr_data)); 557 LABEL(" * BYPASS_WRITE [%d] - spr[%d][%d] <- 0x%x",i,spr_num_reg,ooo_engine,spr_data); 558 583 559 can_spr_use [ooo_engine][spr_num_reg] = false; 584 560 need_spr[ooo_engine][spr_num_reg] = false; … … 608 584 if (val) 609 585 { 610 LABEL(" * BYPASS_MEMORY ["+toString(i)+"] - gpr["+toString(num_reg)+"]["+toString(ooo_engine)+"] <- "+toString(data)); 586 LABEL(" * BYPASS_MEMORY [%d] - spr[%d][%d] <- 0x%x",i,num_reg,ooo_engine,data); 587 611 588 can_gpr_use [ooo_engine][num_reg] = false; 612 589 need_gpr [ooo_engine][num_reg] = false; … … 622 599 (out_INSERT_ACK->read() == 1)) 623 600 { 624 LABEL("Accepted INSERT number : "+toString(request_in));601 LABEL("Accepted INSERT number : %d",request_in); 625 602 request_in ++; 626 603 } … … 628 605 for (uint32_t i=0; i<_param->_nb_inst_retire; i++) 629 606 { 630 LABEL("Test RETIRE "+toString(i)+" : "+toString(out_RETIRE_VAL[i]->read())+","+toString(in_RETIRE_ACK[i]->read()));607 LABEL("Test RETIRE %d : %d,%d",i,out_RETIRE_VAL[i]->read(),in_RETIRE_ACK[i]->read()); 631 608 if ((out_RETIRE_VAL [i]->read() == 1) and 632 609 ( in_RETIRE_ACK [i]->read() == 1)) … … 637 614 else 638 615 rob_id = 0; 639 LABEL("Accepted RETIRE [ "+toString(i)+"] number : "+toString(rob_id)+", request number : "+toString(request_out));616 LABEL("Accepted RETIRE [%d] number : %d, request number : %d",i,rob_id,request_out); 640 617 TEST(bool, request_out_wait [rob_id] , true); 641 618
Note: See TracChangeset
for help on using the changeset viewer.