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

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

1) add constant method
2) test with systemc 2.2.0

  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1/*
2 * $Id: test.cpp 131 2009-07-08 18:40: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_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  {
59    cout << "------------------------------------------------------" << endl;
60
61    Instance * instance = new Instance ("../../../Files/Instance_x4_w8_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_x4_w8_2.cfg",
74                                        generator1,
75                                        _get_custom_information
76                                        );
77    instance->toFile("data_out");
78   
79    delete instance;
80  }
81
82
83  delete configuration1;
84  delete instance1;
85  delete generator1;
86  delete simulator1;
87  delete timing;
88}
Note: See TracBrowser for help on using the repository browser.