source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/include/Execution_unit_to_Write_unit.h @ 77

Last change on this file since 77 was 77, checked in by rosiere, 16 years ago
  • Add two component :
    • network between read unit and execute unit
    • network between execute unit and write unit
  • remove parameters "nb_operation" and "nb_type"
  • in write_queue add the special case : load_speculative
File size: 6.8 KB
Line 
1#ifndef morpheo_behavioural_core_multi_execute_loop_execute_loop_network_execution_unit_to_write_unit_Execution_unit_to_Write_unit_h
2#define morpheo_behavioural_core_multi_execute_loop_execute_loop_network_execution_unit_to_write_unit_Execution_unit_to_Write_unit_h
3
4/*
5 * $Id$
6 *
7 * [ Description ]
8 *
9 */
10
11#ifdef SYSTEMC
12#include "systemc.h"
13#endif
14
15#include <iostream>
16#include <list>
17#include "Common/include/ToString.h"
18#include "Common/include/Debug.h"
19
20#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/include/Types.h"
21#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/include/Parameters.h"
22#ifdef STATISTICS
23#include "Behavioural/include/Stat.h"
24#endif
25#include "Behavioural/include/Component.h"
26#ifdef VHDL
27#include "Behavioural/include/Vhdl.h"
28#endif
29#include "Behavioural/include/Usage.h"
30
31namespace morpheo {
32namespace behavioural {
33
34namespace core {
35namespace multi_execute_loop {
36namespace execute_loop {
37namespace network {
38namespace execution_unit_to_write_unit {
39
40
41  class Execution_unit_to_Write_unit
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 "execute_unit_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66  public    : SC_IN (Tcontrol_t        )   **  in_EXECUTE_UNIT_OUT_VAL            ;
67  public    : SC_OUT(Tcontrol_t        )   ** out_EXECUTE_UNIT_OUT_ACK            ;
68  public    : SC_IN (Tcontext_t        )   **  in_EXECUTE_UNIT_OUT_CONTEXT_ID     ;
69  public    : SC_IN (Tcontext_t        )   **  in_EXECUTE_UNIT_OUT_FRONT_END_ID   ;
70  public    : SC_IN (Tcontext_t        )   **  in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID  ;
71  public    : SC_IN (Tpacket_t         )   **  in_EXECUTE_UNIT_OUT_PACKET_ID      ;
72//public    : SC_IN (Toperation_t      )   **  in_EXECUTE_UNIT_OUT_OPERATION      ;
73//public    : SC_IN (Ttype_t           )   **  in_EXECUTE_UNIT_OUT_TYPE           ;
74  public    : SC_IN (Tcontrol_t        )   **  in_EXECUTE_UNIT_OUT_WRITE_RD       ;
75  public    : SC_IN (Tgeneral_address_t)   **  in_EXECUTE_UNIT_OUT_NUM_REG_RD     ;
76  public    : SC_IN (Tgeneral_data_t   )   **  in_EXECUTE_UNIT_OUT_DATA_RD        ;
77  public    : SC_IN (Tcontrol_t        )   **  in_EXECUTE_UNIT_OUT_WRITE_RE       ;
78  public    : SC_IN (Tspecial_address_t)   **  in_EXECUTE_UNIT_OUT_NUM_REG_RE     ;
79  public    : SC_IN (Tspecial_data_t   )   **  in_EXECUTE_UNIT_OUT_DATA_RE        ;
80  public    : SC_IN (Texception_t      )   **  in_EXECUTE_UNIT_OUT_EXCEPTION      ;
81  public    : SC_IN (Tcontrol_t        )   **  in_EXECUTE_UNIT_OUT_NO_SEQUENCE    ;
82  public    : SC_IN (Tgeneral_data_t   )   **  in_EXECUTE_UNIT_OUT_ADDRESS        ;
83
84    // ~~~~~[ Interface "write_unit_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
85  public    : SC_OUT(Tcontrol_t        )   ** out_WRITE_UNIT_IN_VAL            ;
86  public    : SC_IN (Tcontrol_t        )   **  in_WRITE_UNIT_IN_ACK            ;
87  public    : SC_OUT(Tcontext_t        )   ** out_WRITE_UNIT_IN_CONTEXT_ID     ;
88  public    : SC_OUT(Tcontext_t        )   ** out_WRITE_UNIT_IN_FRONT_END_ID   ;
89  public    : SC_OUT(Tcontext_t        )   ** out_WRITE_UNIT_IN_OOO_ENGINE_ID  ;
90  public    : SC_OUT(Tpacket_t         )   ** out_WRITE_UNIT_IN_PACKET_ID      ;
91//public    : SC_OUT(Toperation_t      )   ** out_WRITE_UNIT_IN_OPERATION      ;
92//public    : SC_OUT(Ttype_t           )   ** out_WRITE_UNIT_IN_TYPE           ;
93  public    : SC_OUT(Tcontrol_t        )   ** out_WRITE_UNIT_IN_WRITE_RD       ;
94  public    : SC_OUT(Tgeneral_address_t)   ** out_WRITE_UNIT_IN_NUM_REG_RD     ;
95  public    : SC_OUT(Tgeneral_data_t   )   ** out_WRITE_UNIT_IN_DATA_RD        ;
96  public    : SC_OUT(Tcontrol_t        )   ** out_WRITE_UNIT_IN_WRITE_RE       ;
97  public    : SC_OUT(Tspecial_address_t)   ** out_WRITE_UNIT_IN_NUM_REG_RE     ;
98  public    : SC_OUT(Tspecial_data_t   )   ** out_WRITE_UNIT_IN_DATA_RE        ;
99  public    : SC_OUT(Texception_t      )   ** out_WRITE_UNIT_IN_EXCEPTION      ;
100  public    : SC_OUT(Tcontrol_t        )   ** out_WRITE_UNIT_IN_NO_SEQUENCE    ;
101  public    : SC_OUT(Tgeneral_data_t   )   ** out_WRITE_UNIT_IN_ADDRESS        ;
102
103    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
104
105    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
106
107    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
108  private   : std::list<uint32_t> ** _destination; // [nb_execute_unit][nb_thread];
109#endif
110
111    // -----[ Methods ]---------------------------------------------------
112
113#ifdef SYSTEMC
114    SC_HAS_PROCESS (Execution_unit_to_Write_unit);
115#endif
116  public  :          Execution_unit_to_Write_unit             
117  (
118#ifdef SYSTEMC
119   sc_module_name                                name,
120#else                                         
121   std::string                                   name,
122#endif                                         
123#ifdef STATISTICS
124   morpheo::behavioural::Parameters_Statistics * param_statistics,
125#endif
126   Parameters                                  * param,
127   morpheo::behavioural::Tusage_t                usage=USE_ALL
128   );
129  public  :          ~Execution_unit_to_Write_unit             (void);
130                                               
131  private : void        allocation                (
132#ifdef STATISTICS
133                                                   morpheo::behavioural::Parameters_Statistics * param_statistics
134#else
135                                                   void
136#endif
137                                                   );
138  private : void        deallocation              (void);
139                                               
140#ifdef SYSTEMC                                 
141  public  : void        transition                (void);
142  public  : void        genMealy                  (void);
143#endif                                         
144
145#if VHDL                                       
146  public  : void        vhdl                      (void);
147  private : void        vhdl_declaration          (Vhdl * & vhdl);
148  private : void        vhdl_body                 (Vhdl * & vhdl);
149#endif                                         
150
151#ifdef STATISTICS
152  public  : void        statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
153#endif
154#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
155  private : void        end_cycle                 (void);
156#endif
157  };
158
159}; // end namespace execution_unit_to_write_unit
160}; // end namespace network
161}; // end namespace execute_loop
162}; // end namespace multi_execute_loop
163}; // end namespace core
164
165}; // end namespace behavioural
166}; // end namespace morpheo             
167
168#endif
Note: See TracBrowser for help on using the repository browser.