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

Last change on this file since 57 was 57, checked in by rosiere, 17 years ago
  • VHDL - RegisterFile_Multi_Banked (only partial_crossbar)
  • SystemC - modif Component, interface and co -> ajout du type Tusage_T pour instancier un coposant mais ne demander que le VHDL ou le systemC.
  • Séminaire interne
File size: 3.1 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/@DIRECTORY/include/Statistics.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
30using namespace std;
31
32namespace morpheo {
33namespace behavioural {
34
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  protected : const Parameters * _param;
46  private   : const Tusage_t     _usage;
47
48//#ifdef STATISTICS
49//  protected : const morpheo::behavioural::Parameters_Statistics * _param_statistics;
50//#endif
51
52#ifdef STATISTICS
53  private   : Statistics                     * _stat;
54#endif
55
56  public    : Component                      * _component;
57  private   : Interfaces                     * _interfaces;
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  (
79#ifdef SYSTEMC
80   sc_module_name                                name,
81#else                                         
82   string                                        name,
83#endif                                         
84#ifdef STATISTICS
85   morpheo::behavioural::Parameters_Statistics * param_statistics,
86#endif
87   Parameters                                  * param,
88   morpheo::behavioural::Tusage_t                usage=USE_ALL
89   );
90  public  :          ~@COMPONENT             (void);
91                                               
92  private : void     allocation                (void);
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#ifdef STATISTICS
101  public  : string   statistics                (uint32_t depth);
102#endif
103                                               
104#if VHDL                                       
105  public  : void     vhdl                      (void);
106  private : void     vhdl_declaration          (Vhdl * & vhdl);
107  private : void     vhdl_body                 (Vhdl * & vhdl);
108#endif                                         
109                                               
110#ifdef VHDL_TESTBENCH                         
111  private : void     vhdl_testbench_transition (void);
112#endif
113  };
114
115@NAMESPACE_END
116}; // end namespace behavioural
117}; // end namespace morpheo             
118
119#endif
Note: See TracBrowser for help on using the repository browser.