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

Last change on this file since 100 was 100, checked in by rosiere, 15 years ago

1) Bug fix (Operation, Instruction)
2) Modif Return Address Stack
3) Add Soft Test
4) Add Soc Test

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