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

Last change on this file since 145 was 145, checked in by rosiere, 14 years ago

1) add test with SPECINT2K
2) new config of Selftest
3) modif RAT to support multiple depth_save ... but not finish (need fix Update Prediction Table)
4) add Function_pointer but need fix

  • Property svn:keywords set to Id
File size: 4.5 KB
Line 
1#ifndef morpheo_behavioural_generic_registerfile_registerfile_internal_banked_RegisterFile_Internal_Banked
2#define morpheo_behavioural_generic_registerfile_registerfile_internal_banked_RegisterFile_Internal_Banked
3
4/*
5 * $Id: RegisterFile_Internal_Banked.h 145 2010-10-13 18:15:51Z 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_Internal_Banked/include/Parameters.h"
20#include "Behavioural/Generic/RegisterFile/RegisterFile_Internal_Banked/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_internal_banked    {
35
36  typedef enum {RW_READ, RW_WRITE} rw_t;
37
38  class RegisterFile_Internal_Banked
39#if SYSTEMC
40    : public sc_module
41#endif
42  {
43    // -----[ fields ]----------------------------------------------------
44    // Parameters
45  protected : const std::string       _name;
46  protected : const Parameters * _param;
47  private   : const Tusage_t     _usage;
48
49#ifdef STATISTICS
50  public    : Stat                           * _stat;
51   
52  // private   : counter_t                      * _stat_nb_read;
53  // private   : counter_t                      * _stat_nb_write;
54  private   : counters_t                     * _stat_port_read;
55  private   : counters_t                     * _stat_port_write;
56#endif
57
58  public    : Component                      * _component;
59  private   : Interfaces                     * _interfaces;
60
61#ifdef SYSTEMC
62    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
63    // Interface
64  public    : SC_CLOCK                      *  in_CLOCK        ;
65  public    : SC_IN       (Tcontrol_t)      *  in_NRESET       ;
66
67    // ----- Interface Read
68  public    : SC_IN       (Tcontrol_t)     **  in_READ_VAL     ;
69  public    : SC_OUT      (Tcontrol_t)     ** out_READ_ACK     ;
70  public    : SC_IN       (Taddress_t)     **  in_READ_ADDRESS ;
71  public    : SC_OUT      (Tdata_t)        ** out_READ_DATA    ;
72
73    // ----- Interface Write
74  public    : SC_IN       (Tcontrol_t)     **  in_WRITE_VAL    ;
75  public    : SC_OUT      (Tcontrol_t)     ** out_WRITE_ACK    ;
76  public    : SC_IN       (Taddress_t)     **  in_WRITE_ADDRESS;
77  public    : SC_IN       (Tdata_t)        **  in_WRITE_DATA   ;
78
79    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
80  private   : Tdata_t * reg_DATA;
81
82    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
83#endif
84
85    // -----[ methods ]---------------------------------------------------
86
87#ifdef SYSTEMC
88    SC_HAS_PROCESS (RegisterFile_Internal_Banked);
89#endif                                         
90  public  : RegisterFile_Internal_Banked
91  (
92#ifdef SYSTEMC
93   sc_module_name                              name
94#else                                         
95   std::string                                      name
96#endif                                         
97#ifdef STATISTICS
98   ,morpheo::behavioural::Parameters_Statistics * param_statistics
99#endif
100   ,Parameters                                  * param
101   ,morpheo::behavioural::Tusage_t                usage
102   );
103
104  public  :          ~RegisterFile_Internal_Banked  (void);
105                                               
106  private : void     allocation                (void);
107  private : void     deallocation              (void);
108                                               
109#ifdef SYSTEMC                                 
110  public  : void     constant                  (void);
111  public  : void     transition                (void);
112//public  : void     genMoore                  (void) {/* empty */};
113  public  : void     genMealy_read             (void);
114#endif                                         
115
116#ifdef STATISTICS
117  public  : void     statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
118#endif                                         
119
120#if VHDL                                       
121  private : void     vhdl                      (void);
122  private : void     vhdl_declaration          (Vhdl * & vhdl);
123  private : void     vhdl_body                 (Vhdl * & vhdl);
124#endif                                         
125                                               
126#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
127  private : void     end_cycle                 (void);
128#endif
129  };
130
131}; // end namespace registerfile_internal_banked
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.