source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/include/Core.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.9 KB
Line 
1#ifndef morpheo_behavioural_core_Core_h
2#define morpheo_behavioural_core_Core_h
3
4/*
5 * $Id: Core.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 "Behavioural/Core/Multi_Front_end/Front_end/include/Front_end.h"
16#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/include/OOO_Engine.h"
17#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/include/Execute_loop.h"
18#include "Behavioural/Core/Icache_Access/include/Icache_Access.h"
19#include "Behavioural/Core/Dcache_Access/include/Dcache_Access.h"
20#include "Behavioural/Core/Core_Glue/include/Core_Glue.h"
21
22#include "Behavioural/Core/include/Parameters.h"
23#include "Behavioural/include/Types.h"
24
25#ifdef STATISTICS
26#include "Behavioural/include/Stat.h"
27#endif
28#include "Behavioural/include/Component.h"
29#ifdef VHDL
30#include "Behavioural/include/Vhdl.h"
31#endif
32#include "Behavioural/include/Usage.h"
33
34#include "Common/include/ToString.h"
35#include "Common/include/Debug.h"
36
37#include <iostream>
38
39namespace morpheo {
40namespace behavioural {
41namespace core {
42
43
44  class Core
45#if SYSTEMC
46    : public sc_module
47#endif
48  {
49    // -----[ fields ]----------------------------------------------------
50    // Parameters
51  protected : const std::string  _name;
52  protected : const Parameters * _param;
53  private   : const Tusage_t     _usage;
54
55#ifdef STATISTICS
56  public    : Stat                           * _stat;
57#endif
58
59  public    : Component                      * _component;
60  private   : Interfaces                     * _interfaces;
61
62#ifdef SYSTEMC
63    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
64    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65  public    : SC_CLOCK                        *  in_CLOCK        ;
66  public    : SC_IN (Tcontrol_t)              *  in_NRESET       ;
67
68    // ~~~~~[ Interface "icache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69  public    : SC_OUT(Tcontrol_t           )  ** out_ICACHE_REQ_VAL         ;//[nb_icache_port]
70  public    : SC_IN (Tcontrol_t           )  **  in_ICACHE_REQ_ACK         ;//[nb_icache_port]
71  public    : SC_OUT(Tcontext_t           )  ** out_ICACHE_REQ_THREAD_ID   ;//[nb_icache_port]
72  public    : SC_OUT(Tpacket_t            )  ** out_ICACHE_REQ_PACKET_ID   ;//[nb_icache_port]
73  public    : SC_OUT(Ticache_address_t    )  ** out_ICACHE_REQ_ADDRESS     ;//[nb_icache_port]
74  public    : SC_OUT(Ticache_type_t       )  ** out_ICACHE_REQ_TYPE        ;//[nb_icache_port]
75                                                                           
76    // ~~~~~[ Interface "icache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
77  public    : SC_IN (Tcontrol_t           )  **  in_ICACHE_RSP_VAL         ;//[nb_icache_port]
78  public    : SC_OUT(Tcontrol_t           )  ** out_ICACHE_RSP_ACK         ;//[nb_icache_port]
79  public    : SC_IN (Tcontext_t           )  **  in_ICACHE_RSP_THREAD_ID   ;//[nb_icache_port]
80  public    : SC_IN (Tpacket_t            )  **  in_ICACHE_RSP_PACKET_ID   ;//[nb_icache_port]
81  public    : SC_IN (Ticache_instruction_t) ***  in_ICACHE_RSP_INSTRUCTION ;//[nb_icache_port][icache_nb_instruction]
82  public    : SC_IN (Ticache_error_t      )  **  in_ICACHE_RSP_ERROR       ;//[nb_icache_port]
83
84    // ~~~~~[ Interface "dcache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
85  public    : SC_OUT(Tcontrol_t           )  ** out_DCACHE_REQ_VAL         ;//[nb_dcache_port]
86  public    : SC_IN (Tcontrol_t           )  **  in_DCACHE_REQ_ACK         ;//[nb_dcache_port]
87  public    : SC_OUT(Tcontext_t           )  ** out_DCACHE_REQ_THREAD_ID   ;//[nb_dcache_port]
88  public    : SC_OUT(Tpacket_t            )  ** out_DCACHE_REQ_PACKET_ID   ;//[nb_dcache_port]
89  public    : SC_OUT(Tdcache_address_t    )  ** out_DCACHE_REQ_ADDRESS     ;//[nb_dcache_port]
90  public    : SC_OUT(Tdcache_data_t       )  ** out_DCACHE_REQ_WDATA       ;//[nb_dcache_port]
91  public    : SC_OUT(Tdcache_type_t       )  ** out_DCACHE_REQ_TYPE        ;//[nb_dcache_port]
92                                                                           
93    // ~~~~~[ Interface "dcache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
94  public    : SC_IN (Tcontrol_t           )  **  in_DCACHE_RSP_VAL         ;//[nb_dcache_port]
95  public    : SC_OUT(Tcontrol_t           )  ** out_DCACHE_RSP_ACK         ;//[nb_dcache_port]
96  public    : SC_IN (Tcontext_t           )  **  in_DCACHE_RSP_THREAD_ID   ;//[nb_dcache_port]
97  public    : SC_IN (Tpacket_t            )  **  in_DCACHE_RSP_PACKET_ID   ;//[nb_dcache_port]
98  public    : SC_IN (Tdcache_data_t       )  **  in_DCACHE_RSP_RDATA       ;//[nb_dcache_port]
99  public    : SC_IN (Tdcache_error_t      )  **  in_DCACHE_RSP_ERROR       ;//[nb_dcache_port]
100
101    // ~~~~~[ Interface : "interrupt" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
102  public    : SC_IN (Tcontrol_t           )  **  in_INTERRUPT_ENABLE       ;//[nb_thread] - Interrupt Exception
103
104    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
105  private   : core::multi_front_end::front_end::Front_end          ** _component_front_end;
106  private   : core::multi_ooo_engine::ooo_engine::OOO_Engine       ** _component_ooo_engine;
107  private   : core::multi_execute_loop::execute_loop::Execute_loop ** _component_execute_loop;
108  private   : core::icache_access::Icache_Access                    * _component_icache_access;
109  private   : core::dcache_access::Dcache_Access                    * _component_dcache_access;
110  private   : core::core_glue::Core_Glue                            * _component_glue;
111
112    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
113
114    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
115#endif
116
117    // -----[ Methods ]---------------------------------------------------
118
119#ifdef SYSTEMC
120    SC_HAS_PROCESS (Core);
121#endif
122  public  :          Core             
123  (
124#ifdef SYSTEMC
125   sc_module_name                                name,
126#else                                         
127   std::string                                   name,
128#endif                                         
129#ifdef STATISTICS
130   morpheo::behavioural::Parameters_Statistics * param_statistics,
131#endif
132   Parameters                                  * param,
133   morpheo::behavioural::Tusage_t                usage
134   );
135  public  :          ~Core             (void);
136
137
138  private : void        allocation                (
139#ifdef STATISTICS
140                                                   morpheo::behavioural::Parameters_Statistics * param_statistics
141#else
142                                                   void
143#endif
144                                                   );
145  private : void        deallocation              (void);
146                                               
147#ifdef SYSTEMC                                 
148# if defined(STATISTICS) or defined(VHDL_TESTBENCH)
149  public  : void        transition                (void);
150# endif                                       
151#endif                                         
152
153#if VHDL                                       
154  public  : void        vhdl                      (void);
155#endif                                         
156
157#ifdef STATISTICS
158  public  : void        statistics_allocation     (morpheo::behavioural::Parameters_Statistics * param_statistics);
159  public  : void        statistics_deallocation   (void);
160#endif
161#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
162  private : void        end_cycle                 (void);
163#endif
164  };
165
166}; // end namespace core
167}; // end namespace behavioural
168}; // end namespace morpheo             
169
170#endif
Note: See TracBrowser for help on using the repository browser.