source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Counter.h @ 71

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

Modification of Statisctics
Add a new systemC component : Load_Store_Queue (tested with one benchmark and one configuration). Store don't supported the Data Buss Error (Load is supported)

File size: 3.5 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
29using namespace std;
30
31namespace morpheo {
32namespace behavioural {
33namespace generic {
34namespace counter {
35
36  class Counter
37#if SYSTEMC
38    : public sc_module
39#endif
40  {
41    // -----[ fields ]----------------------------------------------------
42    // Parameters
43  protected : const string     _name;
44
45  protected : const Parameters _param;
46
47#ifdef STATISTICS
48  private   : Stat                           * _stat;
49#endif
50
51  public    : Component                      * _component;
52  private   : Interfaces                     * _interfaces;
53
54#ifdef SYSTEMC
55    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56    // Interface
57  public    : SC_CLOCK                      *  in_CLOCK        ;
58  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
59  public    : SC_IN (Tdata_t)              **  in_COUNTER_DATA         ;
60  public    : SC_IN (Tcontrol_t)           **  in_COUNTER_ADDSUB       ;
61  public    : SC_OUT(Tdata_t)              ** out_COUNTER_DATA         ;
62   
63    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
64
65    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
66
67    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68#endif
69
70    // -----[ methods ]---------------------------------------------------
71
72#ifdef SYSTEMC
73    SC_HAS_PROCESS (Counter);
74
75  public  :          Counter              (sc_module_name                              name,
76#else                                         
77  public  :          Counter              (string                                      name,
78#endif                                         
79#ifdef STATISTICS
80                                           morpheo::behavioural::Parameters_Statistics * param_statistics,
81#endif
82                                           Parameters                                  param );
83                                               
84  public  :          Counter              (Parameters param );
85  public  :          ~Counter             (void);
86                                               
87#ifdef SYSTEMC                                 
88  private : void     allocation                (void);
89  private : void     deallocation              (void);
90                                               
91#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
92  public  : void     transition                (void);
93#endif
94  public  : void     genMealy                  (void);
95#endif                                         
96#ifdef STATISTICS
97  public  : void     statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
98  public  : string   statistics_print          (uint32_t depth);
99#endif
100                                               
101#if VHDL                                       
102  public  : void     vhdl                      (void);
103  private : void     vhdl_port                 (Vhdl * & vhdl);
104  private : void     vhdl_declaration          (Vhdl * & vhdl);
105  private : void     vhdl_body                 (Vhdl * & vhdl);
106#endif                                         
107                                               
108#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
109  private : void     end_cycle                 (void);
110#endif
111  };
112
113}; // end namespace counter
114}; // end namespace generic
115}; // end namespace behavioural
116}; // end namespace morpheo             
117
118#endif
Note: See TracBrowser for help on using the repository browser.