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

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

Banc de registres

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