source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h @ 44

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

Modification des classes d'encapsulation des interfaces.
Stable sur tous les composants actuels

File size: 4.2 KB
Line 
1#ifndef morpheo_behavioural_generic_registerfile_registerfile_monolithic_RegisterFile_Monolithic
2#define morpheo_behavioural_generic_registerfile_registerfile_monolithic_RegisterFile_Monolithic
3
4/*
5 * $Id$
6 *
7 * [ Description ]
8 *
9 */
10
11#ifdef SYSTEMC
12#include "systemc.h"
13#endif
14
15#include "Common/include/Debug.h"
16#include "Common/include/ToString.h"
17#include <iostream>
18using namespace std;
19
20#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Parameters.h"
21#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Types.h"
22#ifdef STATISTICS
23#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Statistics.h"
24#endif
25#include "Behavioural/include/Component.h"
26#ifdef VHDL
27#include "Behavioural/include/Vhdl.h"
28#endif
29
30using namespace std;
31
32namespace morpheo                    {
33namespace behavioural                {
34namespace generic                    {
35namespace registerfile               {
36namespace registerfile_monolithic    {
37
38  class RegisterFile_Monolithic
39#if SYSTEMC
40    : public sc_module
41#endif
42  {
43    // -----[ fields ]----------------------------------------------------
44    // Parameters
45  protected : const string     _name;
46
47  protected : const Parameters _param;
48#ifdef STATISTICS
49  private   : Statistics                     * _stat;
50   
51  private   : uint32_t                         _stat_nb_read;
52  private   : uint32_t                         _stat_nb_write;
53#endif
54
55  public    : Component                      * _component;
56  private   : Interfaces                     * _interfaces;
57
58#ifdef SYSTEMC
59    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60    // Interface
61  public    : SC_CLOCK                      *  in_CLOCK        ;
62  public    : SC_IN       (Tcontrol_t)      *  in_NRESET       ;
63
64    // ----- Interface Read
65  public    : SC_IN       (Tcontrol_t)     **  in_READ_VAL     ;
66  public    : SC_OUT      (Tcontrol_t)     ** out_READ_ACK     ;
67  public    : SC_IN       (Taddress_t)     **  in_READ_ADDRESS ;
68  public    : SC_OUT      (Tdata_t)        ** out_READ_DATA    ;
69
70    // ----- Interface Write
71  public    : SC_IN       (Tcontrol_t)     **  in_WRITE_VAL    ;
72  public    : SC_OUT      (Tcontrol_t)     ** out_WRITE_ACK    ;
73  public    : SC_IN       (Taddress_t)     **  in_WRITE_ADDRESS;
74  public    : SC_IN       (Tdata_t)        **  in_WRITE_DATA   ;
75
76    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
77  private   : SC_REGISTER (Tdata_t)        ** reg_DATA         ;
78
79    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80#endif
81
82    // -----[ methods ]---------------------------------------------------
83
84#ifdef SYSTEMC
85    SC_HAS_PROCESS (RegisterFile_Monolithic);
86#endif                                         
87
88  public  :          RegisterFile_Monolithic   (
89#ifdef SYSTEMC
90                                                sc_module_name                              name,
91#else                                         
92                                                string                                      name,
93#endif                                         
94#ifdef STATISTICS
95                                                morpheo::behavioural::Parameters_Statistics param_statistics,
96#endif
97                                                Parameters                                  param );
98                                               
99  public  :          RegisterFile_Monolithic   (Parameters param );
100  public  :          ~RegisterFile_Monolithic  (void);
101                                               
102#ifdef SYSTEMC                                 
103  private : void     allocation                (void);
104  private : void     deallocation              (void);
105                                               
106  public  : void     transition                (void);
107//public  : void     genMoore                  (void) {/* empty */};
108  public  : void     genMealy_read             (void);
109#endif                                         
110
111#ifdef STATISTICS
112  public  : string  statistics                 (uint32_t depth);
113#endif                                         
114#if VHDL                                       
115  private : void     vhdl                      (void);
116  private : void     vhdl_declaration          (Vhdl * & vhdl);
117  private : void     vhdl_body                 (Vhdl * & vhdl);
118#endif                                         
119                                               
120#ifdef VHDL_TESTBENCH                         
121  private : void     vhdl_testbench_transition (void);
122#endif
123
124  };
125
126}; // end namespace registerfile_monolithic
127}; // end namespace registerfile
128}; // end namespace generic
129}; // end namespace behavioural         
130}; // end namespace morpheo             
131
132#endif
Note: See TracBrowser for help on using the repository browser.