source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Execute_loop_Glue/include/Execute_loop_Glue.h @ 88

Last change on this file since 88 was 88, checked in by rosiere, 16 years ago

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
File size: 6.7 KB
Line 
1#ifndef morpheo_behavioural_core_multi_execute_loop_execute_loop_execute_loop_glue_Execute_loop_Glue_h
2#define morpheo_behavioural_core_multi_execute_loop_execute_loop_execute_loop_glue_Execute_loop_Glue_h
3
4/*
5 * $Id: Execute_loop_Glue.h 88 2008-12-10 18:31:39Z rosiere $
6 *
7 * [ Description ]
8 *
9 */
10
11#ifdef SYSTEMC
12#include "systemc.h"
13#endif
14
15
16#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Execute_loop_Glue/include/Parameters.h"
17#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Execute_loop_Glue/include/Types.h"
18#ifdef STATISTICS
19#include "Behavioural/include/Stat.h"
20#endif
21#include "Behavioural/include/Component.h"
22#ifdef VHDL
23#include "Behavioural/include/Vhdl.h"
24#endif
25#include "Behavioural/include/Usage.h"
26
27#include "Common/include/ToString.h"
28#include "Common/include/Debug.h"
29
30#include <iostream>
31
32namespace morpheo {
33namespace behavioural {
34
35namespace core {
36namespace multi_execute_loop {
37namespace execute_loop {
38namespace execute_loop_glue {
39
40
41  class Execute_loop_Glue
42#if SYSTEMC
43    : public sc_module
44#endif
45  {
46    // -----[ fields ]----------------------------------------------------
47    // Parameters
48  protected : const std::string  _name;
49  protected : const Parameters * _param;
50  private   : const Tusage_t     _usage;
51
52#ifdef STATISTICS
53  public    : Stat                           * _stat;
54#endif
55
56  public    : Component                      * _component;
57  private   : Interfaces                     * _interfaces;
58
59#ifdef SYSTEMC
60    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
61    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62  public    : SC_CLOCK                      *  in_CLOCK        ;
63  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
64
65    // -----[ Interface "gpr_write_write_unit" ]--------------------------
66  public    : SC_IN (Tcontrol_t        )   **  in_GPR_WRITE_WRITE_UNIT_VAL               ;
67  public    : SC_OUT(Tcontrol_t        )   ** out_GPR_WRITE_WRITE_UNIT_ACK               ;
68  public    : SC_IN (Tcontext_t        )   **  in_GPR_WRITE_WRITE_UNIT_OOO_ENGINE_ID     ;
69  public    : SC_IN (Tgeneral_address_t)   **  in_GPR_WRITE_WRITE_UNIT_NUM_REG           ;
70  public    : SC_IN (Tgeneral_data_t   )   **  in_GPR_WRITE_WRITE_UNIT_DATA              ;
71
72    // -----[ Interface "gpr_write_register_file" ]-----------------------
73  public    : SC_OUT(Tcontrol_t        )   ** out_GPR_WRITE_REGISTER_FILE_VAL            ;
74  public    : SC_IN (Tcontrol_t        )   **  in_GPR_WRITE_REGISTER_FILE_ACK            ;
75  public    : SC_OUT(Tcontext_t        )   ** out_GPR_WRITE_REGISTER_FILE_OOO_ENGINE_ID  ;
76  public    : SC_OUT(Tgeneral_address_t)   ** out_GPR_WRITE_REGISTER_FILE_NUM_REG        ;
77  public    : SC_OUT(Tgeneral_data_t   )   ** out_GPR_WRITE_REGISTER_FILE_DATA           ;
78
79    // -----[ Interface "gpr_write_read_unit" ]---------------------------
80  public    : SC_OUT(Tcontrol_t        )   ** out_GPR_WRITE_READ_UNIT_VAL                ;
81  public    : SC_OUT(Tcontext_t        )   ** out_GPR_WRITE_READ_UNIT_OOO_ENGINE_ID      ;
82  public    : SC_OUT(Tgeneral_address_t)   ** out_GPR_WRITE_READ_UNIT_NUM_REG            ;
83  public    : SC_OUT(Tgeneral_data_t   )   ** out_GPR_WRITE_READ_UNIT_DATA               ;
84
85    // -----[ Interface "spr_write_write_unit" ]--------------------------
86  public    : SC_IN (Tcontrol_t        )   **  in_SPR_WRITE_WRITE_UNIT_VAL               ;
87  public    : SC_OUT(Tcontrol_t        )   ** out_SPR_WRITE_WRITE_UNIT_ACK               ;
88  public    : SC_IN (Tcontext_t        )   **  in_SPR_WRITE_WRITE_UNIT_OOO_ENGINE_ID     ;
89  public    : SC_IN (Tspecial_address_t)   **  in_SPR_WRITE_WRITE_UNIT_NUM_REG           ;
90  public    : SC_IN (Tspecial_data_t   )   **  in_SPR_WRITE_WRITE_UNIT_DATA              ;
91
92    // -----[ Interface "spr_write_register_file" ]-----------------------
93  public    : SC_OUT(Tcontrol_t        )   ** out_SPR_WRITE_REGISTER_FILE_VAL            ;
94  public    : SC_IN (Tcontrol_t        )   **  in_SPR_WRITE_REGISTER_FILE_ACK            ;
95  public    : SC_OUT(Tcontext_t        )   ** out_SPR_WRITE_REGISTER_FILE_OOO_ENGINE_ID  ;
96  public    : SC_OUT(Tspecial_address_t)   ** out_SPR_WRITE_REGISTER_FILE_NUM_REG        ;
97  public    : SC_OUT(Tspecial_data_t   )   ** out_SPR_WRITE_REGISTER_FILE_DATA           ;
98
99    // -----[ Interface "spr_write_read_unit" ]---------------------------
100  public    : SC_OUT(Tcontrol_t        )   ** out_SPR_WRITE_READ_UNIT_VAL                ;
101  public    : SC_OUT(Tcontext_t        )   ** out_SPR_WRITE_READ_UNIT_OOO_ENGINE_ID      ;
102  public    : SC_OUT(Tspecial_address_t)   ** out_SPR_WRITE_READ_UNIT_NUM_REG            ;
103  public    : SC_OUT(Tspecial_data_t   )   ** out_SPR_WRITE_READ_UNIT_DATA               ;
104   
105    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
106
107    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
108
109    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
110#endif
111
112    // -----[ Methods ]---------------------------------------------------
113
114#ifdef SYSTEMC
115    SC_HAS_PROCESS (Execute_loop_Glue);
116#endif
117  public  :          Execute_loop_Glue             
118  (
119#ifdef SYSTEMC
120   sc_module_name                                name,
121#else                                         
122   std::string                                   name,
123#endif                                         
124#ifdef STATISTICS
125   morpheo::behavioural::Parameters_Statistics * param_statistics,
126#endif
127   Parameters                                  * param,
128   morpheo::behavioural::Tusage_t                usage
129   );
130  public  :          ~Execute_loop_Glue             (void);
131                                               
132  private : void        allocation                (
133#ifdef STATISTICS
134                                                   morpheo::behavioural::Parameters_Statistics * param_statistics
135#else
136                                                   void
137#endif
138                                                   );
139  private : void        deallocation              (void);
140                                               
141#ifdef SYSTEMC                                 
142  public  : void        transition                (void);
143//public  : void        genMoore                  (void);
144  public  : void        genMealy_gpr_write        (void);
145  public  : void        genMealy_spr_write        (void);
146#endif                                         
147
148#if VHDL                                       
149  public  : void        vhdl                      (void);
150  private : void        vhdl_declaration          (Vhdl * & vhdl);
151  private : void        vhdl_body                 (Vhdl * & vhdl);
152#endif                                         
153
154#ifdef STATISTICS
155  public  : void        statistics_allocation     (morpheo::behavioural::Parameters_Statistics * param_statistics);
156  public  : void        statistics_deallocation   (void);
157#endif
158#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
159  private : void        end_cycle                 (void);
160#endif
161  };
162
163}; // end namespace execute_loop_glue
164}; // end namespace execute_loop
165}; // end namespace multi_execute_loop
166}; // end namespace core
167
168}; // end namespace behavioural
169}; // end namespace morpheo             
170
171#endif
Note: See TracBrowser for help on using the repository browser.