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

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

Ajout SystemC read_queue et reservation_station
Ajout port au bloc registerfile_monolithic (à ajouter également au bloc registerfile et registerfile_multi_banked)
Modif param : passage de pointeur (attention, tous les composants n'ont pas été tous modifier)

File size: 4.6 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  typedef enum {RW_READ, RW_WRITE} rw_t;
39
40  class RegisterFile_Monolithic
41#if SYSTEMC
42    : public sc_module
43#endif
44  {
45    // -----[ fields ]----------------------------------------------------
46    // Parameters
47  protected : const string       _name;
48
49  protected : const Parameters * _param;
50#ifdef STATISTICS
51  private   : Statistics                     * _stat;
52   
53  private   : uint32_t                         _stat_nb_read;
54  private   : uint32_t                         _stat_nb_write;
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 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    // ----- Interface Read_Write
79  public    : SC_IN       (Tcontrol_t)     **  in_READ_WRITE_VAL    ;
80  public    : SC_OUT      (Tcontrol_t)     ** out_READ_WRITE_ACK    ;
81  public    : SC_IN       (Tcontrol_t)     **  in_READ_WRITE_RW     ;
82  public    : SC_IN       (Taddress_t)     **  in_READ_WRITE_ADDRESS;
83  public    : SC_OUT      (Tdata_t)        ** out_READ_WRITE_RDATA  ;
84  public    : SC_IN       (Tdata_t)        **  in_READ_WRITE_WDATA  ;
85
86    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
87  private   : SC_REGISTER (Tdata_t)        ** reg_DATA         ;
88
89    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
90#endif
91
92    // -----[ methods ]---------------------------------------------------
93
94#ifdef SYSTEMC
95    SC_HAS_PROCESS (RegisterFile_Monolithic);
96#endif                                         
97
98  public  :          RegisterFile_Monolithic   (
99#ifdef SYSTEMC
100                                                sc_module_name                              name,
101#else                                         
102                                                string                                      name,
103#endif                                         
104#ifdef STATISTICS
105                                                morpheo::behavioural::Parameters_Statistics * param_statistics,
106#endif
107                                                Parameters                                  * param );
108  public  :          ~RegisterFile_Monolithic  (void);
109                                               
110#ifdef SYSTEMC                                 
111  private : void     allocation                (void);
112  private : void     deallocation              (void);
113                                               
114  public  : void     transition                (void);
115//public  : void     genMoore                  (void) {/* empty */};
116  public  : void     genMealy_read             (void);
117#endif                                         
118
119#ifdef STATISTICS
120  public  : string  statistics                 (uint32_t depth);
121#endif                                         
122#if VHDL                                       
123  private : 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
134}; // end namespace registerfile_monolithic
135}; // end namespace registerfile
136}; // end namespace generic
137}; // end namespace behavioural         
138}; // end namespace morpheo             
139
140#endif
Note: See TracBrowser for help on using the repository browser.