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

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

Vhdl_Testbench : Modification du testbench. Maintenant complétement encapsuler dans la classe "Interfaces".
Suppression de la class Vhdl_Testbench dans un avenir proche :D
Suppression du répertoire Configuration.old

File size: 2.0 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
47    // generate the vhdl
48    log_printf(INFO,@COMPONENT,"@COMPONENT","Generate the vhdl");
49
50    vhdl();
51#endif
52
53#ifdef SYSTEMC
54//#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
55    log_printf(INFO,@COMPONENT,"@COMPONENT","Method - transition");
56
57    SC_METHOD (transition);
58    dont_initialize ();
59    sensitive_pos << *(in_CLOCK);
60//#endif
61
62#ifdef SYSTEMCASS_SPECIFIC
63    // List dependency information
64#endif   
65
66#endif
67    log_printf(FUNC,@COMPONENT,"@COMPONENT","End");
68  };
69 
70  @COMPONENT::~@COMPONENT (void)
71  {
72    log_printf(FUNC,@COMPONENT,"~@COMPONENT","Begin");
73
74#ifdef STATISTICS
75    log_printf(INFO,@COMPONENT,"~@COMPONENT","Generate Statistics file");
76
77    _stat->generate_file(statistics(0));
78   
79    delete _stat;
80#endif
81
82#ifdef SYSTEMC
83    log_printf(INFO,@COMPONENT,"~@COMPONENT","Deallocation");
84
85    deallocation ();
86#endif
87
88    log_printf(FUNC,@COMPONENT,"~@COMPONENT","End");
89  };
90
91@NAMESPACE_END
92}; // end namespace behavioural
93}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.