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

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

1) Write_queue : fix multi write bug

  • Property svn:keywords set to Id
File size: 4.1 KB
RevLine 
[88]1/*
2 * $Id: test.cpp 133 2009-07-13 15:19:10Z 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"
[97]12#include "Common/include/Time.h"
[88]13
14void test (string name)
15{
[97]16  Time * timing = new Time (false);
17
[88]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
[120]38  Instance * instance1 = new Instance ("../../../Files/Instance_x1_w1_0.cfg",
[88]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",
[120]51                                           "../../../Files/Instance_x1_w1_0.cfg",
[88]52                                           _get_custom_information);
53
54//cout << *configuration1 << endl;
55
56  configuration1->toFile("data_out");
57
[133]58  if (1)
[88]59  {
60    cout << "------------------------------------------------------" << endl;
[133]61    Instance * instance = new Instance ("../../../Files/Instance_x4_w8_01.cfg", generator1, _get_custom_information);
62    delete instance;
63  }
[88]64
[133]65  if (1)
66  {
67    cout << "------------------------------------------------------" << endl;
68    Instance * instance = new Instance ("../../../Files/Instance_x4_w8_02.cfg", generator1, _get_custom_information);
[88]69    delete instance;
70  }
71
[133]72  if (1)
[131]73  {
74    cout << "------------------------------------------------------" << endl;
[133]75    Instance * instance = new Instance ("../../../Files/Instance_x4_w8_03.cfg", generator1, _get_custom_information);
76    delete instance;
77  }
[88]78
[133]79
80  if (0)
81  {
82    cout << "------------------------------------------------------" << endl;
83    Instance * instance = new Instance ("../../../Files/Instance_x4_w8_04.cfg", generator1, _get_custom_information);
[131]84    delete instance;
85  }
86
[133]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  }
[131]93
[133]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
[88]129  delete configuration1;
130  delete instance1;
131  delete generator1;
132  delete simulator1;
[97]133  delete timing;
[88]134}
Note: See TracBrowser for help on using the repository browser.