source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/SelfTest/src/test.cpp @ 134

Last change on this file since 134 was 134, checked in by rosiere, 15 years ago

1) valgrind fix
2) debug file on/off

  • Property svn:keywords set to Id
File size: 4.1 KB
Line 
1cd /*
2 * $Id: test.cpp 134 2009-07-15 08:41:01Z rosiere $
3 *
4 * [ Description ]
5 *
6 * Test
7 */
8
9#include "Behavioural/Configuration/SelfTest/include/test.h"
10#include "Behavioural/Custom/include/Custom_default.h"
11#include "Behavioural/Custom/include/Custom_example.h"
12#include "Common/include/Time.h"
13
14void test (string name)
15{
16  Time * timing = new Time (false);
17
18  morpheo::behavioural::custom::custom_information_t (*_get_custom_information) (void) = &(morpheo::behavioural::custom::default_get_custom_information);
19
20  cout << "------------------------------------------------------" << endl;
21
22  Simulator * simulator1 = new Simulator ("../../../Files/Morpheo.sim");
23 
24//cout << *simulator1 << endl;
25 
26  simulator1->toFile("data_out");
27
28  cout << "------------------------------------------------------" << endl;
29
30  Generator * generator1 = new Generator ("../../../Files/Morpheo.gen");
31
32//cout << *generator1 << endl;
33
34  generator1->toFile("data_out");
35
36  cout << "------------------------------------------------------" << endl;
37
38  Instance * instance1 = new Instance ("../../../Files/Instance_x1_w1_0.cfg",
39                                   generator1,
40                                   _get_custom_information
41                                   );
42 
43//   cout << *instance1 << endl;
44
45  instance1->toFile("data_out");
46
47  cout << "------------------------------------------------------" << endl;
48 
49  Configuration * configuration1 = new Configuration("../../../Files/Morpheo.sim",
50                                           "../../../Files/Morpheo.gen",
51                                           "../../../Files/Instance_x1_w1_0.cfg",
52                                           _get_custom_information);
53
54//cout << *configuration1 << endl;
55
56  configuration1->toFile("data_out");
57
58  if (1)
59  {
60    cout << "------------------------------------------------------" << endl;
61    Instance * instance = new Instance ("../../../Files/Instance_x4_w8_01.cfg", generator1, _get_custom_information);
62    delete instance;
63  }
64
65  if (1)
66  {
67    cout << "------------------------------------------------------" << endl;
68    Instance * instance = new Instance ("../../../Files/Instance_x4_w8_02.cfg", generator1, _get_custom_information);
69    delete instance;
70  }
71
72  if (1)
73  {
74    cout << "------------------------------------------------------" << endl;
75    Instance * instance = new Instance ("../../../Files/Instance_x4_w8_03.cfg", generator1, _get_custom_information);
76    delete instance;
77  }
78
79
80  if (0)
81  {
82    cout << "------------------------------------------------------" << endl;
83    Instance * instance = new Instance ("../../../Files/Instance_x4_w8_04.cfg", generator1, _get_custom_information);
84    delete instance;
85  }
86
87  if (1)
88  {
89    cout << "------------------------------------------------------" << endl;
90    Instance * instance = new Instance ("../../../Files/Instance_x4_w8_05.cfg", generator1, _get_custom_information);
91    delete instance;
92  }
93
94  if (0)
95  {
96    cout << "------------------------------------------------------" << endl;
97    Instance * instance = new Instance ("../../../Files/Instance_x4_w8_06.cfg", generator1, _get_custom_information);
98    delete instance;
99  }
100
101  if (0)
102  {
103    cout << "------------------------------------------------------" << endl;
104    Instance * instance = new Instance ("../../../Files/Instance_x4_w8_07.cfg", generator1, _get_custom_information);
105    delete instance;
106  }
107
108  if (0)
109  {
110    cout << "------------------------------------------------------" << endl;
111    Instance * instance = new Instance ("../../../Files/Instance_x4_w8_08.cfg", generator1, _get_custom_information);
112    delete instance;
113  }
114
115  if (0)
116  {
117    cout << "------------------------------------------------------" << endl;
118    Instance * instance = new Instance ("../../../Files/Instance_x4_w8_09.cfg", generator1, _get_custom_information);
119    delete instance;
120  }
121
122  if (0)
123  {
124    cout << "------------------------------------------------------" << endl;
125    Instance * instance = new Instance ("../../../Files/Instance_x4_w8_10.cfg", generator1, _get_custom_information);
126    delete instance;
127  }
128
129  delete configuration1;
130  delete instance1;
131  delete generator1;
132  delete simulator1;
133  delete timing;
134}
Note: See TracBrowser for help on using the repository browser.