source: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/include/New_Component.h @ 76

Last change on this file since 76 was 76, checked in by rosiere, 16 years ago

Add new component : Read_unit (no tested)
Change functionnal_unit : now use type and operation to execute the good function
Change New_Component's script

File size: 3.0 KB
Line 
1#ifndef morpheo_behavioural_@DEFINE_@COMPONENT_h
2#define morpheo_behavioural_@DEFINE_@COMPONENT_h
3
4/*
5 * $Id$
6 *
7 * [ Description ]
8 *
9 */
10
11#ifdef SYSTEMC
12#include "systemc.h"
13#endif
14
15#include <iostream>
16#include "Common/include/ToString.h"
17#include "Common/include/Debug.h"
18#include "Behavioural/include/Types.h"
19
20#include "Behavioural/@DIRECTORY/include/Parameters.h"
21#ifdef STATISTICS
22#include "Behavioural/include/Stat.h"
23#endif
24#include "Behavioural/include/Component.h"
25#ifdef VHDL
26#include "Behavioural/include/Vhdl.h"
27#endif
28#include "Behavioural/include/Usage.h"
29
30namespace morpheo {
31namespace behavioural {
32
33@NAMESPACE_BEGIN
34
35  class @COMPONENT
36#if SYSTEMC
37    : public sc_module
38#endif
39  {
40    // -----[ fields ]----------------------------------------------------
41    // Parameters
42  protected : const std::string  _name;
43  protected : const Parameters * _param;
44  private   : const Tusage_t     _usage;
45
46#ifdef STATISTICS
47  public    : Stat                           * _stat;
48#endif
49
50  public    : Component                      * _component;
51  private   : Interfaces                     * _interfaces;
52
53#ifdef SYSTEMC
54    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55    // Interface
56  public    : SC_CLOCK                      *  in_CLOCK        ;
57  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
58
59    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
60
61    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
62
63    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
64#endif
65
66    // -----[ Methods ]---------------------------------------------------
67
68#ifdef SYSTEMC
69    SC_HAS_PROCESS (@COMPONENT);
70#endif
71  public  :          @COMPONENT             
72  (
73#ifdef SYSTEMC
74   sc_module_name                                name,
75#else                                         
76   std::string                                   name,
77#endif                                         
78#ifdef STATISTICS
79   morpheo::behavioural::Parameters_Statistics * param_statistics,
80#endif
81   Parameters                                  * param,
82   morpheo::behavioural::Tusage_t                usage=USE_ALL
83   );
84  public  :          ~@COMPONENT             (void);
85                                               
86  private : void        allocation                (
87#ifdef STATISTICS
88                                                   morpheo::behavioural::Parameters_Statistics * param_statistics
89#else
90                                                   void
91#endif
92                                                   );
93  private : void        deallocation              (void);
94                                               
95#ifdef SYSTEMC                                 
96# if defined(STATISTICS) or defined(VHDL_TESTBENCH)
97  public  : void        transition                (void);
98# endif                                       
99#endif                                         
100
101#if VHDL                                       
102  public  : void        vhdl                      (void);
103#endif                                         
104
105#ifdef STATISTICS
106  public  : void        statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
107#endif
108#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
109  private : void        end_cycle                 (void);
110#endif
111  };
112
113@NAMESPACE_END
114}; // end namespace behavioural
115}; // end namespace morpheo             
116
117#endif
Note: See TracBrowser for help on using the repository browser.