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

Last change on this file since 53 was 53, checked in by rosiere, 17 years ago
  • Banc de registre multi banc
  • Banc de registre générique.
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#undef  FUNCTION
15#define FUNCTION "@COMPONENT::@COMPONENT"
16#ifdef SYSTEMC
17  @COMPONENT::@COMPONENT (sc_module_name name,
18#else
19  @COMPONENT::@COMPONENT (string name,
20#endif
21#ifdef STATISTICS
22                          morpheo::behavioural::Parameters_Statistics * param_statistics,
23#endif
24                          morpheo::behavioural::@NAMESPACE_USE::Parameters * param ):
25                              _name              (name)
26                              ,_param            (param)
27// #ifdef STATISTICS
28//                            ,_param_statistics (param_statistics)
29// #endif
30  {
31    log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
32
33#ifdef SYSTEMC
34    log_printf(INFO,@COMPONENT,FUNCTION,"Allocation");
35
36    allocation ();
37#endif
38
39#ifdef STATISTICS
40    log_printf(INFO,@COMPONENT,FUNCTION,"Allocation of statistics");
41
42    // Allocation of statistics
43    _stat = new Statistics (static_cast<string>(_name),
44                            param_statistics          ,
45                            param);
46#endif
47
48#ifdef VHDL
49    // generate the vhdl
50    log_printf(INFO,@COMPONENT,FUNCTION,"Generate the vhdl");
51
52    vhdl();
53#endif
54
55#ifdef SYSTEMC
56//#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
57    log_printf(INFO,@COMPONENT,FUNCTION,"Method - transition");
58
59    SC_METHOD (transition);
60    dont_initialize ();
61    sensitive_pos << *(in_CLOCK);
62//#endif
63
64#ifdef SYSTEMCASS_SPECIFIC
65    // List dependency information
66#endif   
67
68#endif
69    log_printf(FUNC,@COMPONENT,FUNCTION,"End");
70  };
71 
72#undef  FUNCTION
73#define FUNCTION "@COMPONENT::~@COMPONENT"
74  @COMPONENT::~@COMPONENT (void)
75  {
76    log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
77
78#ifdef STATISTICS
79    log_printf(INFO,@COMPONENT,FUNCTION,"Generate Statistics file");
80
81    _stat->generate_file(statistics(0));
82   
83    delete _stat;
84#endif
85
86#ifdef SYSTEMC
87    log_printf(INFO,@COMPONENT,FUNCTION,"Deallocation");
88
89    deallocation ();
90#endif
91
92    log_printf(FUNC,@COMPONENT,FUNCTION,"End");
93  };
94
95@NAMESPACE_END
96}; // end namespace behavioural
97}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.