source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Shifter.h @ 75

Last change on this file since 75 was 75, checked in by rosiere, 16 years ago

Update all component (except front_end) to :

  • new statistics model
  • no namespace std
File size: 3.6 KB
Line 
1#ifndef morpheo_behavioural_generic_shifter_Shifter_h
2#define morpheo_behavioural_generic_shifter_Shifter_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
18#include "Behavioural/Generic/Shifter/include/Parameters.h"
19#include "Behavioural/Generic/Shifter/include/Types.h"
20#ifdef STATISTICS
21#include "Behavioural/include/Stat.h"
22#endif
23#ifdef VHDL
24#include "Behavioural/include/Vhdl.h"
25#endif
26#include "Behavioural/include/Component.h"
27
28namespace morpheo                    {
29namespace behavioural {
30namespace generic {
31namespace shifter {
32
33
34  class Shifter
35#if SYSTEMC
36    : public sc_module
37#endif
38  {
39    // -----[ fields ]----------------------------------------------------
40    // Parameters
41  protected : const std::string     _name;
42
43  protected : const Parameters _param;
44#ifdef STATISTICS
45  public    : Stat                           * _stat;
46#endif
47
48  public    : Component                      * _component;
49  private   : Interfaces                     * _interfaces;
50
51#ifdef SYSTEMC
52    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53  public    : SC_CLOCK                      *  in_CLOCK             ;
54  public    : SC_IN (Tcontrol_t)            *  in_NRESET            ;
55
56    // Interface "shifter"
57  public    : SC_IN (Tdata_t)              **  in_SHIFTER_DATA      ;
58  public    : SC_IN (Tshift_t)             **  in_SHIFTER_SHIFT     ;
59  public    : SC_IN (Tdirection_t)         **  in_SHIFTER_DIRECTION ;
60  public    : SC_IN (Ttype_t)              **  in_SHIFTER_TYPE      ;
61  public    : SC_IN (Tcarry_t)             **  in_SHIFTER_CARRY     ;
62  public    : SC_IN (Tcontrol_t)           **  in_SHIFTER_CARRY_IN  ; // Completion == type bool
63  public    : SC_IN (Tdata_t)              **  in_SHIFTER_COMPLETION; // Completion != type bool
64  public    : SC_OUT(Tdata_t)              ** out_SHIFTER_DATA      ;
65   
66    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
67
68    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69#endif
70
71    // -----[ methods ]---------------------------------------------------
72
73#ifdef SYSTEMC
74    SC_HAS_PROCESS (Shifter);
75#endif
76
77  public  :          Shifter              (
78#ifdef SYSTEMC
79                                           sc_module_name                                name,
80#else                                         
81                                           std::string                                   name,
82#endif                                         
83#ifdef STATISTICS
84                                           morpheo::behavioural::Parameters_Statistics * param_statistics,
85#endif
86                                           Parameters                                    param );
87   
88  public  :          Shifter              (Parameters param );
89  public  :          ~Shifter             (void);
90                                               
91#ifdef SYSTEMC                                 
92  private : void     allocation                (void);
93  private : void     deallocation              (void);
94                                               
95#if (defined(STATISTICS) || defined (VHDL_TESTBENCH))
96  public  : void     transition                (void);
97#endif
98  public  : void     genMealy_shift            (void);
99#endif                                         
100                                               
101#if VHDL                                       
102  public  : void     vhdl                      (void);
103  private : void     vhdl_declaration          (Vhdl * & vhdl);
104  private : void     vhdl_body                 (Vhdl * & vhdl);
105#endif                                         
106
107#ifdef STATISTICS
108  public  : void        statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
109#endif
110#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
111  private : void        end_cycle                 (void);
112#endif
113  };
114
115}; // end namespace shifter
116}; // end namespace generic
117
118}; // end namespace behavioural
119}; // end namespace morpheo             
120
121#endif
Note: See TracBrowser for help on using the repository browser.