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
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
[82]16#include "Behavioural/@DIRECTORY/include/Parameters.h"
[78]17#include "Behavioural/@DIRECTORY/include/Types.h"
[2]18#ifdef STATISTICS
[71]19#include "Behavioural/include/Stat.h"
[2]20#endif
[42]21#include "Behavioural/include/Component.h"
[2]22#ifdef VHDL
23#include "Behavioural/include/Vhdl.h"
24#endif
[57]25#include "Behavioural/include/Usage.h"
[2]26
[82]27#include "Common/include/ToString.h"
28#include "Common/include/Debug.h"
29
30#include <iostream>
31
[2]32namespace morpheo {
33namespace behavioural {
[57]34
[2]35@NAMESPACE_BEGIN
36
37  class @COMPONENT
38#if SYSTEMC
39    : public sc_module
40#endif
41  {
[71]42    // -----[ fields ]----------------------------------------------------
[2]43    // Parameters
[71]44  protected : const std::string  _name;
[57]45  protected : const Parameters * _param;
46  private   : const Tusage_t     _usage;
[2]47
48#ifdef STATISTICS
[74]49  public    : Stat                           * _stat;
[2]50#endif
51
[42]52  public    : Component                      * _component;
[40]53  private   : Interfaces                     * _interfaces;
54
[2]55#ifdef SYSTEMC
[71]56    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[78]57    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2]58  public    : SC_CLOCK                      *  in_CLOCK        ;
59  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
60
[71]61    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
[2]62
[71]63    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
[2]64
[71]65    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2]66#endif
67
[71]68    // -----[ Methods ]---------------------------------------------------
[2]69
70#ifdef SYSTEMC
71    SC_HAS_PROCESS (@COMPONENT);
72#endif
[57]73  public  :          @COMPONENT             
74  (
[2]75#ifdef SYSTEMC
[57]76   sc_module_name                                name,
[2]77#else                                         
[71]78   std::string                                   name,
[2]79#endif                                         
80#ifdef STATISTICS
[57]81   morpheo::behavioural::Parameters_Statistics * param_statistics,
[2]82#endif
[57]83   Parameters                                  * param,
[81]84   morpheo::behavioural::Tusage_t                usage
[57]85   );
[2]86  public  :          ~@COMPONENT             (void);
87                                               
[74]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);
[2]96                                               
[57]97#ifdef SYSTEMC                                 
[74]98  public  : void        transition                (void);
99//public  : void        genMoore                  (void);
[2]100#endif                                         
[75]101
[2]102#if VHDL                                       
[74]103  public  : void        vhdl                      (void);
104  private : void        vhdl_declaration          (Vhdl * & vhdl);
105  private : void        vhdl_body                 (Vhdl * & vhdl);
[2]106#endif                                         
[75]107
108#ifdef STATISTICS
[78]109  public  : void        statistics_allocation     (morpheo::behavioural::Parameters_Statistics * param_statistics);
110  public  : void        statistics_deallocation   (void);
[75]111#endif
[71]112#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
[74]113  private : void        end_cycle                 (void);
[71]114#endif
[2]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.