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

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