source: trunk/IPs/systemC/processor/Morpheo/TopLevel/include/Morpheo.h @ 146

Last change on this file since 146 was 146, checked in by rosiere, 13 years ago

1) Integration of RegisterFile_Internal_Banked in RegisterFile?
2) Erase "read_write" interface in RegisterFile_Monolithic component
3) Add smith predictor parameters in Load_store_pointer_unit.
4) Fix not statistics flags

  • Property svn:keywords set to Id
File size: 9.0 KB
Line 
1#ifndef morpheo_Morpheo_h
2#define morpheo_Morpheo_h
3
4/*
5 * $Id: Morpheo.h 146 2011-02-01 20:57:54Z rosiere $
6 *
7 * [ Description ]
8 *
9 */
10
11#ifdef SYSTEMC
12#include "systemc.h"
13#endif
14
15#include "Behavioural/Core/include/Core.h"
16#include "Behavioural/Custom/include/Custom.h"
17#include "Behavioural/Core/include/Parameters.h"
18#include "Behavioural/Configuration/include/Configuration.h"
19
20#include "TopLevel/include/Types.h"
21
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// #include "Behavioural/include/Function_pointer.h"
31
32#include "Common/include/ToString.h"
33#include "Common/include/Debug.h"
34
35#include <iostream>
36#include <csignal>
37#include <unistd.h>
38
39namespace morpheo {
40
41  class Morpheo
42#if SYSTEMC
43    : public sc_module
44#endif
45  {
46    // -----[ fields ]----------------------------------------------------
47    // Parameters
48  private   : std::string                                          _name;
49  private   : behavioural::Tusage_t                                _usage;
50  private   : morpheo::behavioural::configuration::Configuration * _config;
51  private   : morpheo::behavioural::core::Parameters             * _param_core;
52#ifdef STATISTICS
53  private   : morpheo::behavioural::Parameters_Statistics        * _param_statistics;
54  private   : behavioural::Stat                                  * _stat;
55#endif
56
57  private   : behavioural::Component                             * _component;
58  private   : behavioural::Interfaces                            * _interfaces;
59  // private   : behavioural::Function_pointer                      * _function_pointer;
60
61    // -----[ interface parameters ]--------------------------------------
62  public    : uint32_t                                             _nb_thread                 ;
63
64  public    : uint32_t                                             _nb_icache_port            ;
65  public    : uint32_t                                             _size_icache_thread_id     ;
66  public    : uint32_t                                             _size_icache_packet_id     ;
67  public    : uint32_t                                             _size_icache_address       ;
68  public    : uint32_t                                             _size_icache_type          ;
69  public    : uint32_t                                             _size_icache_error         ;
70  public    : uint32_t                                           * _icache_nb_instruction     ;//[nb_icache_port]
71  public    : uint32_t                                             _size_icache_instruction   ;
72
73  public    : uint32_t                                             _nb_dcache_port            ;
74  public    : uint32_t                                             _size_dcache_thread_id     ;
75  public    : uint32_t                                             _size_dcache_packet_id     ;
76  public    : uint32_t                                             _size_dcache_address       ;
77  public    : uint32_t                                             _size_dcache_data          ;
78  public    : uint32_t                                             _size_dcache_type          ;
79  public    : uint32_t                                             _size_dcache_error         ;
80 
81  public    : bool                                                 _have_port_icache_thread_id;
82  public    : bool                                                 _have_port_icache_packet_id;
83  public    : bool                                                 _have_port_dcache_thread_id;
84  public    : bool                                                 _have_port_dcache_packet_id;
85
86#ifdef SYSTEMC
87    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
88    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89  public    : SC_CLOCK                         *  in_CLOCK        ;
90  public    : SC_IN (Tcontrol_t)               *  in_NRESET       ;
91
92    // ~~~~~[ Interface "icache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
93  public    : SC_OUT(Tcontrol_t           )   ** out_ICACHE_REQ_VAL         ;//[nb_icache_port]
94  public    : SC_IN (Tcontrol_t           )   **  in_ICACHE_REQ_ACK         ;//[nb_icache_port]
95  public    : SC_OUT(Ticache_context_t    )   ** out_ICACHE_REQ_THREAD_ID   ;//[nb_icache_port]
96  public    : SC_OUT(Ticache_packet_t     )   ** out_ICACHE_REQ_PACKET_ID   ;//[nb_icache_port]
97  public    : SC_OUT(Ticache_address_t    )   ** out_ICACHE_REQ_ADDRESS     ;//[nb_icache_port]
98  public    : SC_OUT(Ticache_type_t       )   ** out_ICACHE_REQ_TYPE        ;//[nb_icache_port]
99
100    // ~~~~~[ Interface "icache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
101  public    : SC_IN (Tcontrol_t           )   **  in_ICACHE_RSP_VAL         ;//[nb_icache_port]
102  public    : SC_OUT(Tcontrol_t           )   ** out_ICACHE_RSP_ACK         ;//[nb_icache_port]
103  public    : SC_IN (Ticache_context_t    )   **  in_ICACHE_RSP_THREAD_ID   ;//[nb_icache_port]
104  public    : SC_IN (Ticache_packet_t     )   **  in_ICACHE_RSP_PACKET_ID   ;//[nb_icache_port]
105  public    : SC_IN (Ticache_instruction_t)  ***  in_ICACHE_RSP_INSTRUCTION ;//[nb_icache_port][icache_nb_instruction]
106  public    : SC_IN (Ticache_error_t      )   **  in_ICACHE_RSP_ERROR       ;//[nb_icache_port]
107
108    // ~~~~~[ Interface "dcache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
109  public    : SC_OUT(Tcontrol_t           )   ** out_DCACHE_REQ_VAL         ;//[nb_dcache_port]
110  public    : SC_IN (Tcontrol_t           )   **  in_DCACHE_REQ_ACK         ;//[nb_dcache_port]
111  public    : SC_OUT(Tdcache_context_t    )   ** out_DCACHE_REQ_THREAD_ID   ;//[nb_dcache_port]
112  public    : SC_OUT(Tdcache_packet_t     )   ** out_DCACHE_REQ_PACKET_ID   ;//[nb_dcache_port]
113  public    : SC_OUT(Tdcache_address_t    )   ** out_DCACHE_REQ_ADDRESS     ;//[nb_dcache_port]
114  public    : SC_OUT(Tdcache_data_t       )   ** out_DCACHE_REQ_WDATA       ;//[nb_dcache_port]
115  public    : SC_OUT(Tdcache_type_t       )   ** out_DCACHE_REQ_TYPE        ;//[nb_dcache_port]
116                                                                           
117    // ~~~~~[ Interface "dcache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
118  public    : SC_IN (Tcontrol_t           )   **  in_DCACHE_RSP_VAL         ;//[nb_dcache_port]
119  public    : SC_OUT(Tcontrol_t           )   ** out_DCACHE_RSP_ACK         ;//[nb_dcache_port]
120  public    : SC_IN (Tdcache_context_t    )   **  in_DCACHE_RSP_THREAD_ID   ;//[nb_dcache_port]
121  public    : SC_IN (Tdcache_packet_t     )   **  in_DCACHE_RSP_PACKET_ID   ;//[nb_dcache_port]
122  public    : SC_IN (Tdcache_data_t       )   **  in_DCACHE_RSP_RDATA       ;//[nb_dcache_port]
123  public    : SC_IN (Tdcache_error_t      )   **  in_DCACHE_RSP_ERROR       ;//[nb_dcache_port]
124
125    // ~~~~~[ Interface : "interrupt" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
126  public    : SC_IN (Tcontrol_t           )   **  in_INTERRUPT_ENABLE       ;//[nb_thread] - Interrupt Exception
127
128    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
129  private   : morpheo::behavioural::core::Core * _component_core            ;
130   
131    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
132
133    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
134#endif
135
136    // -----[ Methods ]---------------------------------------------------
137
138#ifdef SYSTEMC
139    SC_HAS_PROCESS (Morpheo);
140#endif
141  public  :          Morpheo             
142  (
143#ifdef SYSTEMC
144   sc_module_name name,
145#else             
146   std::string    name,
147#endif                         
148   std::string    filename_simulator,
149   std::string    filename_generator, 
150   std::string    filename_instance ,
151   morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void)
152   );
153  public  :            ~Morpheo                   (void);
154
155  private : void        configuration             (std::string filename_simulator, 
156                                                   std::string filename_generator, 
157                                                   std::string filename_instance ,
158                                                   morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void));
159                                               
160  private : void        allocation                (
161#ifdef STATISTICS
162                                                   morpheo::behavioural::Parameters_Statistics * param_statistics
163#else
164                                                   void
165#endif
166                                                   );
167  private : void        deallocation              (void);
168                                               
169#ifdef SYSTEMC
170  private : void        transition                (void);
171#endif                                         
172
173#if VHDL                                       
174  private : void        vhdl                      (void);
175#endif                                         
176
177#ifdef STATISTICS
178  private : void        statistics_allocation     (morpheo::behavioural::Parameters_Statistics * param_statistics);
179  private : void        statistics_deallocation   (void);
180#endif
181#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
182  private : void        end_cycle                 (void);
183#endif
184
185#ifdef SYSTEMC
186  public  : bool        simulation_end            (void);
187  private : void        signal_init               (void);
188//private : void        signal_handler            (int value);
189#endif
190  };
191
192  void signal_handler (int value);
193
194}; // end namespace morpheo
195
196#endif
Note: See TracBrowser for help on using the repository browser.