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

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

Almost complete design
with Test and test platform

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