source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/include/Queue.h @ 74

Last change on this file since 74 was 67, checked in by rosiere, 17 years ago

Ajout d'un nouveau composant : fifo generic (un port lecture et un port ecriture).

File size: 4.1 KB
Line 
1#ifndef morpheo_behavioural_generic_queue_Queue_h
2#define morpheo_behavioural_generic_queue_Queue_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/Queue_Control/include/Queue_Control.h"
20
21#include "Behavioural/Generic/Queue/include/Types.h"
22#include "Behavioural/Generic/Queue/include/Parameters.h"
23#ifdef STATISTICS
24#include "Behavioural/Generic/Queue/include/Statistics.h"
25#endif
26#include "Behavioural/include/Component.h"
27#ifdef VHDL
28#include "Behavioural/include/Vhdl.h"
29#endif
30#include "Behavioural/include/Usage.h"
31
32using namespace std;
33using namespace morpheo::behavioural::generic::queue_control;
34
35namespace morpheo {
36namespace behavioural {
37namespace generic {
38namespace queue {
39
40
41  class Queue
42#if SYSTEMC
43    : public sc_module
44#endif
45  {
46    // -----[ fields ]----------------------------------------------------
47    // Parameters
48  protected : const string       _name;
49  protected : const Parameters * _param;
50  private   : const Tusage_t     _usage;
51
52//#ifdef STATISTICS
53//  protected : const morpheo::behavioural::Parameters_Statistics * _param_statistics;
54//#endif
55
56#ifdef STATISTICS
57  private   : Statistics                     * _stat;
58#endif
59
60  public    : Component                      * _component;
61  private   : Interfaces                     * _interfaces;
62
63#ifdef SYSTEMC
64    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65    // Interface
66  public    : SC_CLOCK                      *  in_CLOCK        ;
67  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
68
69    // ~~~~~[ Interface "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70  public    : SC_IN (Tcontrol_t)            *  in_INSERT_VAL;
71  public    : SC_OUT(Tcontrol_t)            * out_INSERT_ACK;
72  public    : SC_IN (Tdata_t   )            *  in_INSERT_DATA;
73
74    // ~~~~~[ Interface "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
75  public    : SC_OUT(Tcontrol_t)            * out_RETIRE_VAL;
76  public    : SC_IN (Tcontrol_t)            *  in_RETIRE_ACK;
77  public    : SC_OUT(Tdata_t   )            * out_RETIRE_DATA;
78
79    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
80  protected : morpheo::behavioural::generic::queue_control::Queue_Control * _queue_control;
81
82    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
83  protected : Tdata_t                       * _queue_data;
84
85    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
86  protected : Tcontrol_t                      internal_INSERT_ACK;
87  protected : Tcontrol_t                      internal_RETIRE_VAL;
88
89#endif
90
91    // -----[ methods ]---------------------------------------------------
92
93#ifdef SYSTEMC
94    SC_HAS_PROCESS (Queue);
95#endif
96  public  :          Queue             
97  (
98#ifdef SYSTEMC
99   sc_module_name                                name,
100#else                                         
101   string                                        name,
102#endif                                         
103#ifdef STATISTICS
104   morpheo::behavioural::Parameters_Statistics * param_statistics,
105#endif
106   Parameters                                  * param,
107   morpheo::behavioural::Tusage_t                usage=USE_ALL
108   );
109  public  :          ~Queue             (void);
110                                               
111  private : void     allocation                (void);
112  private : void     deallocation              (void);
113                                               
114#ifdef SYSTEMC                                 
115  public  : void     transition                (void);
116  public  : void     genMoore                  (void);
117#endif                                         
118#ifdef STATISTICS
119  public  : string   statistics                (uint32_t depth);
120#endif
121                                               
122#if VHDL                                       
123  public  : void     vhdl                      (void);
124  private : void     vhdl_declaration          (Vhdl * & vhdl);
125  private : void     vhdl_body                 (Vhdl * & vhdl);
126#endif                                         
127                                               
128#ifdef VHDL_TESTBENCH                         
129  private : void     vhdl_testbench_transition (void);
130#endif
131  };
132
133}; // end namespace queue
134}; // end namespace generic
135
136}; // end namespace behavioural
137}; // end namespace morpheo             
138
139#endif
Note: See TracBrowser for help on using the repository browser.