source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Counter.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.4 KB
Line 
1#ifndef morpheo_behavioural_generic_counter_Counter_h
2#define morpheo_behavioural_generic_counter_Counter_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#include "Common/include/Debug.h"
18
19#include "Behavioural/Generic/Counter/include/Parameters.h"
20#include "Behavioural/Generic/Counter/include/Types.h"
21#ifdef STATISTICS
22#include "Behavioural/include/Stat.h"
23#endif
24#ifdef VHDL
25#include "Behavioural/include/Vhdl.h"
26#endif
27#include "Behavioural/include/Component.h"
28
29namespace morpheo {
30namespace behavioural {
31namespace generic {
32namespace counter {
33
34  class Counter
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
45#ifdef STATISTICS
46  public    : Stat                           * _stat;
47#endif
48
49  public    : Component                      * _component;
50  private   : Interfaces                     * _interfaces;
51
52#ifdef SYSTEMC
53    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
54    // Interface
55  public    : SC_CLOCK                      *  in_CLOCK        ;
56  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
57  public    : SC_IN (Tdata_t)              **  in_COUNTER_DATA         ;
58  public    : SC_IN (Tcontrol_t)           **  in_COUNTER_ADDSUB       ;
59  public    : SC_OUT(Tdata_t)              ** out_COUNTER_DATA         ;
60   
61    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
62
63    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
64
65    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66#endif
67
68    // -----[ methods ]---------------------------------------------------
69
70#ifdef SYSTEMC
71    SC_HAS_PROCESS (Counter);
72
73  public  :          Counter              (sc_module_name                              name,
74#else                                         
75  public  :          Counter              (std::string                                 name,
76#endif                                         
77#ifdef STATISTICS
78                                           morpheo::behavioural::Parameters_Statistics * param_statistics,
79#endif
80                                           Parameters                                  param );
81                                               
82  public  :          Counter              (Parameters param );
83  public  :          ~Counter             (void);
84                                               
85#ifdef SYSTEMC                                 
86  private : void     allocation                (void);
87  private : void     deallocation              (void);
88                                               
89#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
90  public  : void     transition                (void);
91#endif
92  public  : void     genMealy                  (void);
93#endif                                         
94#ifdef STATISTICS
95  public  : void     statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
96#endif
97                                               
98#if VHDL                                       
99  public  : void     vhdl                      (void);
100  private : void     vhdl_port                 (Vhdl * & vhdl);
101  private : void     vhdl_declaration          (Vhdl * & vhdl);
102  private : void     vhdl_body                 (Vhdl * & vhdl);
103#endif                                         
104                                               
105#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
106  private : void     end_cycle                 (void);
107#endif
108  };
109
110}; // end namespace counter
111}; // end namespace generic
112}; // end namespace behavioural
113}; // end namespace morpheo             
114
115#endif
Note: See TracBrowser for help on using the repository browser.