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
RevLine 
[15]1#ifndef morpheo_behavioural_generic_registerfile_registerfile_monolithic_RegisterFile_Monolithic
2#define morpheo_behavioural_generic_registerfile_registerfile_monolithic_RegisterFile_Monolithic
[2]3
4/*
5 * $Id$
6 *
7 * [ Description ]
8 *
9 */
10
11#ifdef SYSTEMC
12#include "systemc.h"
13#endif
14
[44]15#include "Common/include/Debug.h"
16#include "Common/include/ToString.h"
[2]17#include <iostream>
18using namespace std;
19
[15]20#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Parameters.h"
21#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Types.h"
[2]22#ifdef STATISTICS
[15]23#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Statistics.h"
[2]24#endif
[42]25#include "Behavioural/include/Component.h"
[2]26#ifdef VHDL
27#include "Behavioural/include/Vhdl.h"
28#endif
29
30using namespace std;
31
32namespace morpheo                    {
33namespace behavioural                {
34namespace generic                    {
35namespace registerfile               {
[15]36namespace registerfile_monolithic    {
[2]37
[55]38  typedef enum {RW_READ, RW_WRITE} rw_t;
39
[15]40  class RegisterFile_Monolithic
[2]41#if SYSTEMC
42    : public sc_module
43#endif
44  {
45    // -----[ fields ]----------------------------------------------------
46    // Parameters
[55]47  protected : const string       _name;
[2]48
[55]49  protected : const Parameters * _param;
[2]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
[42]57  public    : Component                      * _component;
[41]58  private   : Interfaces                     * _interfaces;
59
[2]60#ifdef SYSTEMC
61    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62    // Interface
63  public    : SC_CLOCK                      *  in_CLOCK        ;
[41]64  public    : SC_IN       (Tcontrol_t)      *  in_NRESET       ;
[2]65
66    // ----- Interface Read
[6]67  public    : SC_IN       (Tcontrol_t)     **  in_READ_VAL     ;
68  public    : SC_OUT      (Tcontrol_t)     ** out_READ_ACK     ;
[2]69  public    : SC_IN       (Taddress_t)     **  in_READ_ADDRESS ;
70  public    : SC_OUT      (Tdata_t)        ** out_READ_DATA    ;
71
72    // ----- Interface Write
[6]73  public    : SC_IN       (Tcontrol_t)     **  in_WRITE_VAL    ;
74  public    : SC_OUT      (Tcontrol_t)     ** out_WRITE_ACK    ;
[2]75  public    : SC_IN       (Taddress_t)     **  in_WRITE_ADDRESS;
76  public    : SC_IN       (Tdata_t)        **  in_WRITE_DATA   ;
77
[55]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
[2]86    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
87  private   : SC_REGISTER (Tdata_t)        ** reg_DATA         ;
88
89    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
90#endif
91
92    // -----[ methods ]---------------------------------------------------
93
94#ifdef SYSTEMC
[15]95    SC_HAS_PROCESS (RegisterFile_Monolithic);
[2]96#endif                                         
97
[15]98  public  :          RegisterFile_Monolithic   (
[2]99#ifdef SYSTEMC
100                                                sc_module_name                              name,
101#else                                         
102                                                string                                      name,
103#endif                                         
104#ifdef STATISTICS
[55]105                                                morpheo::behavioural::Parameters_Statistics * param_statistics,
[2]106#endif
[55]107                                                Parameters                                  * param );
[15]108  public  :          ~RegisterFile_Monolithic  (void);
[2]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);
[43]124  private : void     vhdl_declaration          (Vhdl * & vhdl);
[41]125  private : void     vhdl_body                 (Vhdl * & vhdl);
[2]126#endif                                         
127                                               
128#ifdef VHDL_TESTBENCH                         
[41]129  private : void     vhdl_testbench_transition (void);
[2]130#endif
131
132  };
133
[15]134}; // end namespace registerfile_monolithic
[2]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.