Changeset 50 for trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/SelfTest/src/test.cpp
- Timestamp:
- Aug 17, 2007, 6:00:56 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/SelfTest/src/test.cpp
r44 r50 7 7 */ 8 8 9 #define NB_ITERATION 110 11 #define LABEL(str) do {cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; _@COMPONENT->vhdl_testbench_label(str);} while (0)12 13 9 #include "Behavioural/@DIRECTORY/SelfTest/include/test.h" 14 10 #include "Common/include/Test.h" 15 11 12 #define NB_ITERATION 1 13 #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 #define SC_START(cycle) \ 21 do \ 22 { \ 23 if (static_cast<uint32_t>(sc_simulation_time()) > CYCLE_MAX) \ 24 { \ 25 TEST_KO("Maximal cycles Reached"); \ 26 } \ 27 sc_start(cycle); \ 28 } while(0) 29 16 30 void test (string name, 17 morpheo::behavioural::@NAMESPACE_USE::Parameters _param)31 morpheo::behavioural::@NAMESPACE_USE::Parameters * _param) 18 32 { 19 33 cout << "<" << name << "> : Simulation SystemC" << endl; … … 23 37 morpheo::behavioural::Parameters_Statistics(5,50), 24 38 #endif 25 _param);39 *_param); 26 40 27 41 #ifdef SYSTEMC … … 48 62 49 63 cout << "<" << name << "> Start Simulation ............" << endl; 64 Time * _time = new Time(); 50 65 51 66 /******************************************************** … … 60 75 srand(seed); 61 76 62 sc_start(0);77 SC_START(0); 63 78 LABEL("Initialisation"); 64 79 … … 69 84 LABEL("Iteration "+toString(iteration)); 70 85 71 sc_start(1);86 SC_START(1); 72 87 } 73 88 … … 76 91 ********************************************************/ 77 92 93 TEST_OK ("End of Simulation"); 94 delete _time; 78 95 cout << "<" << name << "> ............ Stop Simulation" << endl; 79 96
Note: See TracChangeset
for help on using the changeset viewer.