Changeset 82 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/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/Read_queue/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/include/test.h"10 #include "Common/include/Test.h"11 12 9 #define NB_ITERATION 1 13 10 //64 14 11 #define CYCLE_MAX (1024*NB_ITERATION) 15 12 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 if (cycle_current != cycle) \ 30 { \ 31 cycle = cycle_current; \ 32 cout << "##########[ cycle "<< cycle << " ]" << endl; \ 33 } \ 34 \ 35 if (cycle_current > CYCLE_MAX) \ 36 { \ 37 TEST_KO("Maximal cycles Reached"); \ 38 } \ 39 sc_start(cycle_offset); \ 40 /*cout << "SC_START (end )" << endl;*/ \ 41 } while(0) 13 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/include/test.h" 14 #include "Common/include/Test.h" 42 15 43 16 void test (string name, … … 54 27 _parameters_statistics, 55 28 #endif 56 _param); 29 _param, 30 USE_ALL); 57 31 58 32 #ifdef SYSTEMC … … 362 336 for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++) 363 337 { 364 LABEL("Iteration "+toString(iteration));338 LABEL("Iteration %d",iteration); 365 339 int32_t percent_transaction_queue_in = (rand()%45)+30; 366 340 int32_t percent_transaction_queue_out = (rand()%45)+30; … … 518 492 SC_START(0); 519 493 520 LABEL("Test READ_QUEUE_IN : "+toString(READ_QUEUE_IN_VAL->read())+","+toString(READ_QUEUE_IN_ACK->read()));494 LABEL("Test READ_QUEUE_IN : %d,%d",READ_QUEUE_IN_VAL->read(),READ_QUEUE_IN_ACK->read()); 521 495 if ((READ_QUEUE_IN_VAL->read() == 1) and 522 496 (READ_QUEUE_IN_ACK->read() == 1)) 523 497 { 524 LABEL("Accepted READ_QUEUE_IN [ "+toString(request_in)+"]");498 LABEL("Accepted READ_QUEUE_IN [%d]",request_in); 525 499 request_in ++; 526 500 } 527 LABEL("Test READ_QUEUE_OUT : "+toString(READ_QUEUE_OUT_VAL->read())+","+toString(READ_QUEUE_OUT_ACK->read()));501 LABEL("Test READ_QUEUE_OUT : %d,%d",READ_QUEUE_OUT_VAL->read(),READ_QUEUE_OUT_ACK->read()); 528 502 if ((READ_QUEUE_OUT_VAL->read() == 1) and 529 503 (READ_QUEUE_OUT_ACK->read() == 1)) … … 535 509 rob_id = 0; 536 510 Tcontext_t ctxt = _ooo_engine_id [rob_id]; 537 LABEL("Accepted READ_QUEUE_OUT [ "+toString(rob_id)+"]");511 LABEL("Accepted READ_QUEUE_OUT [%d]",rob_id); 538 512 539 513 TEST(uint32_t , rob_id ,request_out);
Note: See TracChangeset
for help on using the changeset viewer.