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