source: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/src/New_Component.cpp @ 40

Last change on this file since 40 was 40, checked in by rosiere, 17 years ago

Interface et Signal, c'est deux classes enregistres la valeurs des signaux à chaque cycle ... étape préparatoire avan le changement de la classe Vhdl_Testbench

File size: 2.3 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/@DIRECTORY/include/@COMPONENT.h"
9
10namespace morpheo                    {
11namespace behavioural {
12@NAMESPACE_BEGIN
13
14#ifdef SYSTEMC
15  @COMPONENT::@COMPONENT (sc_module_name name,
16#else
17  @COMPONENT::@COMPONENT (string name,
18#endif
19#ifdef STATISTICS
20                              morpheo::behavioural::Parameters_Statistics             param_statistics,
21#endif
22                              morpheo::behavioural::@NAMESPACE_USE::Parameters param ):
23                              _name              (name)
24                              ,_param            (param)
25// #ifdef STATISTICS
26//                            ,_param_statistics (param_statistics)
27// #endif
28  {
29    log_printf(FUNC,@COMPONENT,"@COMPONENT","Begin");
30
31#ifdef SYSTEMC
32    log_printf(INFO,@COMPONENT,"@COMPONENT","Allocation");
33
34    allocation ();
35#endif
36
37#ifdef STATISTICS
38    log_printf(INFO,@COMPONENT,"@COMPONENT","Allocation of statistics");
39
40    // Allocation of statistics
41    _stat = new Statistics (static_cast<string>(_name),
42                            param_statistics          ,
43                            param);
44#endif
45
46#ifdef VHDL_TESTBENCH
47    log_printf(INFO,@COMPONENT,"@COMPONENT","Creation of a testbench");
48
49    _vhdl_testbench = new Vhdl_Testbench (_name);
50#endif
51
52#ifdef VHDL
53    // generate the vhdl
54    log_printf(INFO,@COMPONENT,"@COMPONENT","Generate the vhdl");
55
56    vhdl();
57#endif
58
59#ifdef SYSTEMC
60//#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
61    log_printf(INFO,@COMPONENT,"@COMPONENT","Method - transition");
62
63    SC_METHOD (transition);
64    dont_initialize ();
65    sensitive_pos << *(in_CLOCK);
66//#endif
67
68#ifdef SYSTEMCASS_SPECIFIC
69    // List dependency information
70#endif   
71
72#endif
73    log_printf(FUNC,@COMPONENT,"@COMPONENT","End");
74  };
75 
76  @COMPONENT::~@COMPONENT (void)
77  {
78    log_printf(FUNC,@COMPONENT,"~@COMPONENT","Begin");
79
80#ifdef VHDL_TESTBENCH
81    log_printf(INFO,@COMPONENT,"~@COMPONENT","Generate Testbench  file");
82
83    // generate the test bench
84    _vhdl_testbench->generate_file();
85    delete _vhdl_testbench;
86#endif
87
88#ifdef STATISTICS
89    log_printf(INFO,@COMPONENT,"~@COMPONENT","Generate Statistics file");
90
91    _stat->generate_file(statistics(0));
92   
93    delete _stat;
94#endif
95
96#ifdef SYSTEMC
97    log_printf(INFO,@COMPONENT,"~@COMPONENT","Deallocation");
98
99    deallocation ();
100#endif
101
102    log_printf(FUNC,@COMPONENT,"~@COMPONENT","End");
103  };
104
105@NAMESPACE_END
106}; // end namespace behavioural
107}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.