Changeset 71 for trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/SelfTest/src/test.cpp
- Timestamp:
- Jan 19, 2008, 12:09:01 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/SelfTest/src/test.cpp
r67 r71 13 13 #define CYCLE_MAX (128*NB_ITERATION) 14 14 15 #define LABEL(str) 16 {\17 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl;\15 #define LABEL(str) \ 16 { \ 17 msg (_("{%d} %s\n"),static_cast<uint32_t>(sc_simulation_time()),str); \ 18 18 } while(0) 19 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) 20 #define SC_START(cycle_offset) \ 21 do \ 22 { \ 23 /*cout << "SC_START (begin)" << endl;*/ \ 24 \ 25 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \ 26 if (cycle_offset != 0) \ 27 { \ 28 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \ 29 } \ 30 \ 31 if (cycle_current > CYCLE_MAX) \ 32 { \ 33 TEST_KO("Maximal cycles Reached"); \ 34 } \ 35 \ 36 sc_start(cycle_offset); \ 37 \ 38 /*cout << "SC_START (end )" << endl;*/ \ 39 } while(0) 41 40 42 41 void test (string name, 43 42 morpheo::behavioural::@NAMESPACE_USE::Parameters * _param) 44 43 { 45 cout << "<" << name << "> : Simulation SystemC" << endl;44 msg(_("<%s> : Simulation SystemC.\n"),name.c_str()); 46 45 47 46 #ifdef STATISTICS … … 68 67 ********************************************************/ 69 68 70 cout << "<" << name << "> Instanciation of _@COMPONENT" << endl;71 69 msg(_("<%s> : Instanciation of _@COMPONENT.\n"),name.c_str()); 70 72 71 (*(_@COMPONENT->in_CLOCK)) (*(in_CLOCK)); 73 72 (*(_@COMPONENT->in_NRESET)) (*(in_NRESET)); 74 73 75 74 76 cout << "<" << name << "> Start Simulation ............" << endl; 75 msg(_("<%s> : Start Simulation ............\n"),name.c_str()); 76 77 77 Time * _time = new Time(); 78 78 … … 111 111 TEST_OK ("End of Simulation"); 112 112 delete _time; 113 cout << "<" << name << "> ............ Stop Simulation" << endl; 113 114 msg(_("<%s> : ............ Stop Simulation\n"),name.c_str()); 114 115 115 116 delete in_CLOCK;
Note: See TracChangeset
for help on using the changeset viewer.