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

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

read_queue : systemC et vhdl ok !
queue : quelques petits modif pour avoir une queue de taille 1
nettoyage des fichiers *mkf*

File size: 2.1 KB
RevLine 
[2]1/*
2 * $Id$
3 *
[68]4 * [ Description ]
[2]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"
[57]16  @COMPONENT::@COMPONENT
17  (
[2]18#ifdef SYSTEMC
[57]19   sc_module_name name,
[2]20#else
[57]21   string name,
[2]22#endif
23#ifdef STATISTICS
[57]24   morpheo::behavioural::Parameters_Statistics * param_statistics,
[2]25#endif
[57]26   morpheo::behavioural::@NAMESPACE_USE::Parameters * param,
27   morpheo::behavioural::Tusage_t usage
28   ):
29    _name              (name)
30    ,_param            (param)
31    ,_usage            (usage)
[2]32// #ifdef STATISTICS
33//                            ,_param_statistics (param_statistics)
34// #endif
35  {
[53]36    log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
[2]37
[53]38    log_printf(INFO,@COMPONENT,FUNCTION,"Allocation");
[40]39    allocation ();
40
[2]41#ifdef STATISTICS
[68]42    if (_usage & USE_STATISTICS)
43      { 
44        log_printf(INFO,@COMPONENT,FUNCTION,"Allocation of statistics");
45       
46        // Allocation of statistics
47        _stat = new Statistics (static_cast<string>(_name),
48                                param_statistics          ,
49                                param);
50      }
[2]51#endif
52
53#ifdef VHDL
[68]54    if (_usage & USE_VHDL)
55      {
56        // generate the vhdl
57        log_printf(INFO,@COMPONENT,FUNCTION,"Generate the vhdl");
58       
59        vhdl();
60      }
[2]61#endif
62
63#ifdef SYSTEMC
[68]64    if (_usage & USE_SYSTEMC)
65      {
66        log_printf(INFO,@COMPONENT,FUNCTION,"Method - transition");
[15]67
[68]68        SC_METHOD (transition);
69        dont_initialize ();
70        sensitive << (*(in_CLOCK)).pos();
71       
72# ifdef SYSTEMCASS_SPECIFIC
73        // List dependency information
74# endif   
75       
[2]76#endif
[68]77      }
[53]78    log_printf(FUNC,@COMPONENT,FUNCTION,"End");
[2]79  };
[68]80   
[53]81#undef  FUNCTION
82#define FUNCTION "@COMPONENT::~@COMPONENT"
[2]83  @COMPONENT::~@COMPONENT (void)
84  {
[53]85    log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
[2]86
87#ifdef STATISTICS
[68]88    if (_usage & USE_STATISTICS)
89      {
90        log_printf(INFO,@COMPONENT,FUNCTION,"Generate Statistics file");
91       
92        _stat->generate_file(statistics(0));
93        delete _stat;
94      }
[2]95#endif
96
[53]97    log_printf(INFO,@COMPONENT,FUNCTION,"Deallocation");
[2]98    deallocation ();
99
[53]100    log_printf(FUNC,@COMPONENT,FUNCTION,"End");
[2]101  };
102
103@NAMESPACE_END
104}; // end namespace behavioural
105}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.