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

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

Vhdl_Testbench : Modification du testbench. Maintenant complétement encapsuler dans la classe "Interfaces".
Suppression de la class Vhdl_Testbench dans un avenir proche :D
Suppression du répertoire Configuration.old

File size: 4.4 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 "Include/Debug.h"
16#include "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#ifdef POSITION
26#include "Behavioural/include/Position.h"
27#else
28#include "Behavioural/include/Interfaces.h"
29#endif
30#ifdef VHDL
31#include "Behavioural/include/Vhdl.h"
32#endif
33
34using namespace std;
35
36namespace morpheo                    {
37namespace behavioural                {
38namespace generic                    {
39namespace registerfile               {
40namespace registerfile_monolithic    {
41
42  class RegisterFile_Monolithic
43#if SYSTEMC
44    : public sc_module
45#endif
46  {
47    // -----[ fields ]----------------------------------------------------
48    // Parameters
49  protected : const string     _name;
50
51  protected : const Parameters _param;
52#ifdef STATISTICS
53  private   : Statistics                     * _stat;
54   
55  private   : uint32_t                         _stat_nb_read;
56  private   : uint32_t                         _stat_nb_write;
57#endif
58
59#ifdef POSITION
60  private   : Position                       * _position;
61#endif
62
63  private   : Interfaces                     * _interfaces;
64
65#ifdef SYSTEMC
66    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67    // Interface
68  public    : SC_CLOCK                      *  in_CLOCK        ;
69  public    : SC_IN       (Tcontrol_t)      *  in_NRESET       ;
70
71    // ----- Interface Read
72  public    : SC_IN       (Tcontrol_t)     **  in_READ_VAL     ;
73  public    : SC_OUT      (Tcontrol_t)     ** out_READ_ACK     ;
74  public    : SC_IN       (Taddress_t)     **  in_READ_ADDRESS ;
75  public    : SC_OUT      (Tdata_t)        ** out_READ_DATA    ;
76
77    // ----- Interface Write
78  public    : SC_IN       (Tcontrol_t)     **  in_WRITE_VAL    ;
79  public    : SC_OUT      (Tcontrol_t)     ** out_WRITE_ACK    ;
80  public    : SC_IN       (Taddress_t)     **  in_WRITE_ADDRESS;
81  public    : SC_IN       (Tdata_t)        **  in_WRITE_DATA   ;
82
83    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
84  private   : SC_REGISTER (Tdata_t)        ** reg_DATA         ;
85
86    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
87#endif
88
89    // -----[ methods ]---------------------------------------------------
90
91#ifdef SYSTEMC
92    SC_HAS_PROCESS (RegisterFile_Monolithic);
93#endif                                         
94
95  public  :          RegisterFile_Monolithic   (
96#ifdef SYSTEMC
97                                                sc_module_name                              name,
98#else                                         
99                                                string                                      name,
100#endif                                         
101#ifdef STATISTICS
102                                                morpheo::behavioural::Parameters_Statistics param_statistics,
103#endif
104                                                Parameters                                  param );
105                                               
106  public  :          RegisterFile_Monolithic   (Parameters param );
107  public  :          ~RegisterFile_Monolithic  (void);
108                                               
109#ifdef SYSTEMC                                 
110  private : void     allocation                (void);
111  private : void     deallocation              (void);
112                                               
113  public  : void     transition                (void);
114//public  : void     genMoore                  (void) {/* empty */};
115  public  : void     genMealy_read             (void);
116#endif                                         
117
118#ifdef STATISTICS
119  public  : string  statistics                 (uint32_t depth);
120#endif                                         
121#if VHDL                                       
122  private : void     vhdl                      (void);
123  private : void     vhdl_port                 (Vhdl * & vhdl);
124  private : void     vhdl_type                 (Vhdl * & vhdl);
125  private : void     vhdl_signal               (Vhdl * & vhdl);
126  private : void     vhdl_body                 (Vhdl * & vhdl);
127#endif                                         
128                                               
129#ifdef VHDL_TESTBENCH                         
130  private : void     vhdl_testbench_transition (void);
131#endif
132
133  };
134
135}; // end namespace registerfile_monolithic
136}; // end namespace registerfile
137}; // end namespace generic
138}; // end namespace behavioural         
139}; // end namespace morpheo             
140
141#endif
Note: See TracBrowser for help on using the repository browser.