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

Last change on this file since 82 was 82, checked in by rosiere, 16 years ago
  • support locale (now must "just" translate)
  • update all component with new test format
  • update all component with usage
  • New component : decod queue and prediction_unit
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
16#include "Behavioural/@DIRECTORY/include/Parameters.h"
17#include "Behavioural/@DIRECTORY/include/Types.h"
18#ifdef STATISTICS
19#include "Behavioural/include/Stat.h"
20#endif
21#include "Behavioural/include/Component.h"
22#ifdef VHDL
23#include "Behavioural/include/Vhdl.h"
24#endif
25#include "Behavioural/include/Usage.h"
26
27#include "Common/include/ToString.h"
28#include "Common/include/Debug.h"
29
30#include <iostream>
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 std::string  _name;
45  protected : const Parameters * _param;
46  private   : const Tusage_t     _usage;
47
48#ifdef STATISTICS
49  public    : Stat                           * _stat;
50#endif
51
52  public    : Component                      * _component;
53  private   : Interfaces                     * _interfaces;
54
55#ifdef SYSTEMC
56    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
58  public    : SC_CLOCK                      *  in_CLOCK        ;
59  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
60
61    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
62
63    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
64
65    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66#endif
67
68    // -----[ Methods ]---------------------------------------------------
69
70#ifdef SYSTEMC
71    SC_HAS_PROCESS (@COMPONENT);
72#endif
73  public  :          @COMPONENT             
74  (
75#ifdef SYSTEMC
76   sc_module_name                                name,
77#else                                         
78   std::string                                   name,
79#endif                                         
80#ifdef STATISTICS
81   morpheo::behavioural::Parameters_Statistics * param_statistics,
82#endif
83   Parameters                                  * param,
84   morpheo::behavioural::Tusage_t                usage
85   );
86  public  :          ~@COMPONENT             (void);
87                                               
88  private : void        allocation                (
89#ifdef STATISTICS
90                                                   morpheo::behavioural::Parameters_Statistics * param_statistics
91#else
92                                                   void
93#endif
94                                                   );
95  private : void        deallocation              (void);
96                                               
97#ifdef SYSTEMC                                 
98  public  : void        transition                (void);
99//public  : void        genMoore                  (void);
100#endif                                         
101
102#if VHDL                                       
103  public  : void        vhdl                      (void);
104  private : void        vhdl_declaration          (Vhdl * & vhdl);
105  private : void        vhdl_body                 (Vhdl * & vhdl);
106#endif                                         
107
108#ifdef STATISTICS
109  public  : void        statistics_allocation     (morpheo::behavioural::Parameters_Statistics * param_statistics);
110  public  : void        statistics_deallocation   (void);
111#endif
112#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
113  private : void        end_cycle                 (void);
114#endif
115  };
116
117@NAMESPACE_END
118}; // end namespace behavioural
119}; // end namespace morpheo             
120
121#endif
Note: See TracBrowser for help on using the repository browser.