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

Last change on this file since 2 was 2, checked in by kane, 17 years ago

Import Morpheo

File size: 3.3 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 "Include/ToString.h"
17#include "Include/Debug.h"
18
19#include "Behavioural/@DIRECTORY/include/Parameters.h"
20#include "Behavioural/@DIRECTORY/include/Types.h"
21#ifdef STATISTICS
22#include "Behavioural/@DIRECTORY/include/Statistics.h"
23#endif
24#ifdef VHDL
25#include "Behavioural/include/Vhdl.h"
26#endif
27#ifdef VHDL_TESTBENCH
28#include "Behavioural/include/Vhdl_Testbench.h"
29#endif
30
31using namespace std;
32
33namespace morpheo {
34namespace behavioural {
35@NAMESPACE_BEGIN
36
37  class @COMPONENT
38#if SYSTEMC
39    : public sc_module
40#endif
41  {
42    // -----[ fields ]----------------------------------------------------
43    // Parameters
44  protected : const string     _name;
45
46  protected : const Parameters _param;
47//#ifdef STATISTICS
48//  protected : const morpheo::behavioural::Parameters_Statistics _param_statistics;
49//#endif
50
51#ifdef STATISTICS
52  private   : Statistics                     * _stat;
53#endif
54
55#ifdef VHDL_TESTBENCH
56  private   : Vhdl_Testbench                 * _vhdl_testbench;
57#endif
58
59#ifdef SYSTEMC
60    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
61    // Interface
62  public    : SC_CLOCK                      *  in_CLOCK        ;
63  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
64
65    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
66
67    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
68
69    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70#endif
71
72    // -----[ methods ]---------------------------------------------------
73
74#ifdef SYSTEMC
75    SC_HAS_PROCESS (@COMPONENT);
76#endif
77  public  :          @COMPONENT              (
78#ifdef SYSTEMC
79                                              sc_module_name                              name,
80#else                                         
81                                              string                                      name,
82#endif                                         
83#ifdef STATISTICS
84                                              morpheo::behavioural::Parameters_Statistics param_statistics,
85#endif
86                                              Parameters                                  param );
87                                               
88  public  :          @COMPONENT              (Parameters param );
89  public  :          ~@COMPONENT             (void);
90                                               
91#ifdef SYSTEMC                                 
92  private : void     allocation                (void);
93  private : void     deallocation              (void);
94                                               
95  public  : void     transition                (void);
96//public  : void     genMoore                  (void) {/* empty */};
97#endif                                         
98#ifdef STATISTICS
99  public  : string   statistics                (uint32_t depth);
100#endif
101                                               
102#if VHDL                                       
103  public  : void     vhdl                      (void);
104  private : void     vhdl_port                 (Vhdl & vhdl);
105  private : void     vhdl_declaration          (Vhdl & vhdl);
106  private : void     vhdl_body                 (Vhdl & vhdl);
107#endif                                         
108                                               
109#ifdef VHDL_TESTBENCH                         
110  private : void     vhdl_testbench_port       (void);
111  private : void     vhdl_testbench_transition (void);
112#endif
113  public  : void     vhdl_testbench_label      (string label);
114  };
115
116@NAMESPACE_END
117}; // end namespace behavioural
118}; // end namespace morpheo             
119
120#endif
Note: See TracBrowser for help on using the repository browser.