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

Last change on this file since 146 was 146, checked in by rosiere, 13 years ago

1) Integration of RegisterFile_Internal_Banked in RegisterFile?
2) Erase "read_write" interface in RegisterFile_Monolithic component
3) Add smith predictor parameters in Load_store_pointer_unit.
4) Fix not statistics flags

  • Property svn:keywords set to Id
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: RegisterFile_Monolithic.h 146 2011-02-01 20:57:54Z rosiere $
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>
18
19#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Parameters.h"
20#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Types.h"
21#ifdef STATISTICS
22#include "Behavioural/include/Stat.h"
23#endif
24#include "Behavioural/include/Component.h"
25#ifdef VHDL
26#include "Behavioural/include/Vhdl.h"
27#endif
28#include "Behavioural/include/Usage.h"
29
30namespace morpheo                    {
31namespace behavioural                {
32namespace generic                    {
33namespace registerfile               {
34namespace registerfile_monolithic    {
35
36// #define VHDL_GAISLER
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 std::string       _name;
48  protected : const Parameters * _param;
49  private   : const Tusage_t     _usage;
50
51#ifdef STATISTICS
52  public    : Stat                           * _stat;
53   
54  // private   : counter_t                      * _stat_nb_read;
55  // private   : counter_t                      * _stat_nb_write;
56  private   : counters_t                     * _stat_port_read;
57  private   : counters_t                     * _stat_port_write;
58#endif
59
60  public    : Component                      * _component;
61  private   : Interfaces                     * _interfaces;
62
63#ifdef SYSTEMC
64    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65    // Interface
66  public    : SC_CLOCK                      *  in_CLOCK        ;
67  public    : SC_IN       (Tcontrol_t)      *  in_NRESET       ;
68
69    // ----- Interface Read
70  public    : SC_IN       (Tcontrol_t)     **  in_READ_VAL     ;
71  public    : SC_OUT      (Tcontrol_t)     ** out_READ_ACK     ;
72  public    : SC_IN       (Taddress_t)     **  in_READ_ADDRESS ;
73  public    : SC_OUT      (Tdata_t)        ** out_READ_DATA    ;
74
75    // ----- Interface Write
76  public    : SC_IN       (Tcontrol_t)     **  in_WRITE_VAL    ;
77  public    : SC_OUT      (Tcontrol_t)     ** out_WRITE_ACK    ;
78  public    : SC_IN       (Taddress_t)     **  in_WRITE_ADDRESS;
79  public    : SC_IN       (Tdata_t)        **  in_WRITE_DATA   ;
80
81    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
82  private   : Tdata_t * reg_DATA;
83
84    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
85#endif
86
87    // -----[ methods ]---------------------------------------------------
88
89#ifdef SYSTEMC
90    SC_HAS_PROCESS (RegisterFile_Monolithic);
91#endif                                         
92  public  : RegisterFile_Monolithic
93  (
94#ifdef SYSTEMC
95   sc_module_name                              name
96#else                                         
97   std::string                                      name
98#endif                                         
99#ifdef STATISTICS
100   ,morpheo::behavioural::Parameters_Statistics * param_statistics
101#endif
102   ,Parameters                                  * param
103   ,morpheo::behavioural::Tusage_t                usage
104   );
105
106  public  :          ~RegisterFile_Monolithic  (void);
107                                               
108  private : void     allocation                (void);
109  private : void     deallocation              (void);
110                                               
111#ifdef SYSTEMC                                 
112  public  : void     constant                  (void);
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  : void     statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
120#endif                                         
121
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#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
129  private : void     end_cycle                 (void);
130#endif
131  };
132
133}; // end namespace registerfile_monolithic
134}; // end namespace registerfile
135}; // end namespace generic
136}; // end namespace behavioural         
137}; // end namespace morpheo             
138
139#endif
Note: See TracBrowser for help on using the repository browser.