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 @ 88

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

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
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: Execution_unit_to_Write_unit.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#include <iostream>
16#include <list>
17#include "Common/include/ToString.h"
18#include "Common/include/Debug.h"
19#include "Behavioural/include/Identification.h"
20
21#include "Behavioural/include/Types.h"
22#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/include/Parameters.h"
23#ifdef STATISTICS
24#include "Behavioural/include/Stat.h"
25#endif
26#include "Behavioural/include/Component.h"
27#ifdef VHDL
28#include "Behavioural/include/Vhdl.h"
29#endif
30#include "Behavioural/include/Usage.h"
31
32namespace morpheo {
33namespace behavioural {
34
35namespace core {
36namespace multi_execute_loop {
37namespace execute_loop {
38namespace network {
39namespace execution_unit_to_write_unit {
40
41
42  class Execution_unit_to_Write_unit
43#if SYSTEMC
44    : public sc_module
45#endif
46  {
47    // -----[ fields ]----------------------------------------------------
48    // Parameters
49  protected : const std::string  _name;
50  protected : const Parameters * _param;
51  private   : const Tusage_t     _usage;
52
53#ifdef STATISTICS
54  public    : Stat                           * _stat;
55#endif
56
57  public    : Component                      * _component;
58  private   : Interfaces                     * _interfaces;
59
60#ifdef SYSTEMC
61    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62    // Interface
63  public    : SC_CLOCK                      *  in_CLOCK        ;
64  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
65
66    // ~~~~~[ Interface "execute_unit_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67  public    : SC_IN (Tcontrol_t        )  ***  in_EXECUTE_UNIT_OUT_VAL            ;
68  public    : SC_OUT(Tcontrol_t        )  *** out_EXECUTE_UNIT_OUT_ACK            ;
69  public    : SC_IN (Tcontext_t        )  ***  in_EXECUTE_UNIT_OUT_CONTEXT_ID     ;
70  public    : SC_IN (Tcontext_t        )  ***  in_EXECUTE_UNIT_OUT_FRONT_END_ID   ;
71  public    : SC_IN (Tcontext_t        )  ***  in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID  ;
72  public    : SC_IN (Tpacket_t         )  ***  in_EXECUTE_UNIT_OUT_PACKET_ID      ;
73//public    : SC_IN (Toperation_t      )  ***  in_EXECUTE_UNIT_OUT_OPERATION      ;
74  public    : SC_IN (Ttype_t           )  ***  in_EXECUTE_UNIT_OUT_TYPE           ;
75  public    : SC_IN (Tcontrol_t        )  ***  in_EXECUTE_UNIT_OUT_WRITE_RD       ;
76  public    : SC_IN (Tgeneral_address_t)  ***  in_EXECUTE_UNIT_OUT_NUM_REG_RD     ;
77  public    : SC_IN (Tgeneral_data_t   )  ***  in_EXECUTE_UNIT_OUT_DATA_RD        ;
78  public    : SC_IN (Tcontrol_t        )  ***  in_EXECUTE_UNIT_OUT_WRITE_RE       ;
79  public    : SC_IN (Tspecial_address_t)  ***  in_EXECUTE_UNIT_OUT_NUM_REG_RE     ;
80  public    : SC_IN (Tspecial_data_t   )  ***  in_EXECUTE_UNIT_OUT_DATA_RE        ;
81  public    : SC_IN (Texception_t      )  ***  in_EXECUTE_UNIT_OUT_EXCEPTION      ;
82  public    : SC_IN (Tcontrol_t        )  ***  in_EXECUTE_UNIT_OUT_NO_SEQUENCE    ;
83  public    : SC_IN (Tgeneral_data_t   )  ***  in_EXECUTE_UNIT_OUT_ADDRESS        ;
84
85    // ~~~~~[ Interface "write_unit_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
86  public    : SC_OUT(Tcontrol_t        )   ** out_WRITE_UNIT_IN_VAL            ;
87  public    : SC_IN (Tcontrol_t        )   **  in_WRITE_UNIT_IN_ACK            ;
88  public    : SC_OUT(Tcontext_t        )   ** out_WRITE_UNIT_IN_CONTEXT_ID     ;
89  public    : SC_OUT(Tcontext_t        )   ** out_WRITE_UNIT_IN_FRONT_END_ID   ;
90  public    : SC_OUT(Tcontext_t        )   ** out_WRITE_UNIT_IN_OOO_ENGINE_ID  ;
91  public    : SC_OUT(Tpacket_t         )   ** out_WRITE_UNIT_IN_PACKET_ID      ;
92//public    : SC_OUT(Toperation_t      )   ** out_WRITE_UNIT_IN_OPERATION      ;
93  public    : SC_OUT(Ttype_t           )   ** out_WRITE_UNIT_IN_TYPE           ;
94  public    : SC_OUT(Tcontrol_t        )   ** out_WRITE_UNIT_IN_WRITE_RD       ;
95  public    : SC_OUT(Tgeneral_address_t)   ** out_WRITE_UNIT_IN_NUM_REG_RD     ;
96  public    : SC_OUT(Tgeneral_data_t   )   ** out_WRITE_UNIT_IN_DATA_RD        ;
97  public    : SC_OUT(Tcontrol_t        )   ** out_WRITE_UNIT_IN_WRITE_RE       ;
98  public    : SC_OUT(Tspecial_address_t)   ** out_WRITE_UNIT_IN_NUM_REG_RE     ;
99  public    : SC_OUT(Tspecial_data_t   )   ** out_WRITE_UNIT_IN_DATA_RE        ;
100  public    : SC_OUT(Texception_t      )   ** out_WRITE_UNIT_IN_EXCEPTION      ;
101  public    : SC_OUT(Tcontrol_t        )   ** out_WRITE_UNIT_IN_NO_SEQUENCE    ;
102  public    : SC_OUT(Tgeneral_data_t   )   ** out_WRITE_UNIT_IN_ADDRESS        ;
103
104    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
105
106    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
107
108    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
109  private   : std::list<uint32_t> *** _destination; //[nb_execute_unit][nb_execute_unit_port][nb_thread];
110#endif
111
112    // -----[ Methods ]---------------------------------------------------
113
114#ifdef SYSTEMC
115    SC_HAS_PROCESS (Execution_unit_to_Write_unit);
116#endif
117  public  :          Execution_unit_to_Write_unit             
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  :          ~Execution_unit_to_Write_unit             (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        genMealy                  (void);
144#endif                                         
145
146#if VHDL                                       
147  public  : void        vhdl                      (void);
148  private : void        vhdl_declaration          (Vhdl * & vhdl);
149  private : void        vhdl_body                 (Vhdl * & vhdl);
150#endif                                         
151
152#ifdef STATISTICS
153  public  : void        statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
154#endif
155#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
156  private : void        end_cycle                 (void);
157#endif
158  };
159
160}; // end namespace execution_unit_to_write_unit
161}; // end namespace network
162}; // end namespace execute_loop
163}; // end namespace multi_execute_loop
164}; // end namespace core
165
166}; // end namespace behavioural
167}; // end namespace morpheo             
168
169#endif
Note: See TracBrowser for help on using the repository browser.