Changeset 82 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/SelfTest/src
- 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/Register_unit/Register_unit_Glue/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 128 10 #define CYCLE_MAX (128*NB_ITERATION) 11 9 12 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" 11 12 #define NB_ITERATION 12813 #define CYCLE_MAX (128*NB_ITERATION)14 15 #define LABEL(str) \16 { \17 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \18 } while(0)19 20 static uint32_t cycle = 0;21 22 #define SC_START(cycle_offset) \23 do \24 { \25 /*cout << "SC_START (begin)" << endl;*/ \26 \27 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \28 if (cycle_current != cycle) \29 { \30 cycle = cycle_current; \31 cout << "##########[ cycle "<< cycle << " ]" << endl; \32 } \33 \34 if (cycle_current > CYCLE_MAX) \35 { \36 TEST_KO("Maximal cycles Reached"); \37 } \38 sc_start(cycle_offset); \39 /*cout << "SC_START (end )" << endl;*/ \40 } while(0)41 14 42 15 void test (string name, … … 49 22 #endif 50 23 51 Register_unit_Glue * _Register_unit_Glue = new Register_unit_Glue (name.c_str(), 24 Register_unit_Glue * _Register_unit_Glue = new Register_unit_Glue 25 (name.c_str(), 52 26 #ifdef STATISTICS 53 27 _parameters_statistics, 54 28 #endif 55 _param); 29 _param, 30 USE_ALL); 56 31 57 32 #ifdef SYSTEMC … … 575 550 for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++) 576 551 { 577 LABEL("Iteration "+toString(iteration));552 LABEL("Iteration %d",iteration); 578 553 579 554 if (test_read == true) … … 584 559 Tcontrol_t val = (rand()%100)<=percent_transaction; 585 560 586 LABEL("GPR_READ [ "+toString(j)+"] : "+toString(val)+" - " +toString(static_cast<uint32_t>(context)));561 LABEL("GPR_READ [%d] : %d - %d",j,val,context); 587 562 588 563 in_GPR_READ_VAL [j] ->write(val); … … 623 598 Tcontrol_t val = (rand()%100)<=percent_transaction; 624 599 625 LABEL("SPR_READ [ "+toString(j)+"] : "+toString(val)+" - " +toString(static_cast<uint32_t>(context)));600 LABEL("SPR_READ [%d] : %d - %d",j,val,context); 626 601 627 602 in_SPR_READ_VAL [j] ->write(val); … … 666 641 Tcontrol_t val = (rand()%100)<=percent_transaction; 667 642 668 LABEL("GPR_WRITE [ "+toString(j)+"] : "+toString(val)+" - " +toString(static_cast<uint32_t>(context)));669 643 LABEL("GPR_WRITE [%d] : %d - %d",j,val,context); 644 670 645 in_GPR_WRITE_VAL [j] ->write(val); 671 646 in_GPR_WRITE_OOO_ENGINE_ID [j] ->write(context); … … 701 676 Tcontrol_t val = (rand()%100)<=percent_transaction; 702 677 703 LABEL("SPR_WRITE [ "+toString(j)+"] : "+toString(val)+" - " +toString(static_cast<uint32_t>(context)));678 LABEL("SPR_WRITE [%d] : %d - %d",j,val,context); 704 679 705 680 in_SPR_WRITE_VAL [j] ->write(val);
Note: See TracChangeset
for help on using the changeset viewer.