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

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

1) Add soc test
2) fix bug (Pc management, Decod and execute, Update prediction ...)

  • Property svn:keywords set to Id
File size: 3.3 KB
Line 
1/*
2 * $Id: test.cpp 101 2009-01-15 17:19:08Z 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_min.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_min.cfg",
52                                           _get_custom_information);
53
54//cout << *configuration1 << endl;
55
56  configuration1->toFile("data_out");
57
58  {
59    cout << "------------------------------------------------------" << endl;
60
61    Instance * instance = new Instance ("../../../Files/Instance_scalar_1.cfg",
62                                        generator1,
63                                        _get_custom_information
64                                        );
65    instance->toFile("data_out");
66   
67    delete instance;
68  }
69
70  {
71    cout << "------------------------------------------------------" << endl;
72
73    Instance * instance = new Instance ("../../../Files/Instance_scalar_2.cfg",
74                                        generator1,
75                                        _get_custom_information
76                                        );
77    instance->toFile("data_out");
78   
79    delete instance;
80  }
81
82  {
83    cout << "------------------------------------------------------" << endl;
84
85    Instance * instance = new Instance ("../../../Files/Instance_scalar_3.cfg",
86                                        generator1,
87                                        _get_custom_information
88                                        );
89    instance->toFile("data_out");
90   
91    delete instance;
92  }
93
94  {
95    cout << "------------------------------------------------------" << endl;
96
97    Instance * instance = new Instance ("../../../Files/Instance_scalar_4.cfg",
98                                        generator1,
99                                        _get_custom_information
100                                        );
101    instance->toFile("data_out");
102   
103    delete instance;
104  }
105
106  delete configuration1;
107  delete instance1;
108  delete generator1;
109  delete simulator1;
110  delete timing;
111}
Note: See TracBrowser for help on using the repository browser.