source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/include/Ifetch_unit_Glue.h @ 85

Last change on this file since 85 was 85, checked in by rosiere, 16 years ago
  • Ifetch_unit : systemC test ok
  • modif shell script and makefile.tools : SHELL=/bin/bash
  • Property svn:keywords set to Id
File size: 5.1 KB
Line 
1#ifndef morpheo_behavioural_core_multi_front_end_front_end_ifetch_unit_ifetch_unit_glue_Ifetch_unit_Glue_h
2#define morpheo_behavioural_core_multi_front_end_front_end_ifetch_unit_ifetch_unit_glue_Ifetch_unit_Glue_h
3
4/*
5 * $Id: Ifetch_unit_Glue.h 85 2008-05-14 13:09:48Z rosiere $
6 *
7 * [ Description ]
8 *
9 */
10
11#ifdef SYSTEMC
12#include "systemc.h"
13#endif
14
15#include <iostream>
16#include "Common/include/ToString.h"
17#include "Common/include/Debug.h"
18#include "Behavioural/include/Types.h"
19
20#include "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/include/Parameters.h"
21#ifdef STATISTICS
22#include "Behavioural/include/Stat.h"
23#endif
24#include "Behavioural/include/Component.h"
25#ifdef VHDL
26#include "Behavioural/include/Vhdl.h"
27#endif
28#include "Behavioural/include/Usage.h"
29
30namespace morpheo {
31namespace behavioural {
32
33namespace core {
34namespace multi_front_end {
35namespace front_end {
36namespace ifetch_unit {
37namespace ifetch_unit_glue {
38
39
40  class Ifetch_unit_Glue
41#if SYSTEMC
42    : public sc_module
43#endif
44  {
45    // -----[ fields ]----------------------------------------------------
46    // Parameters
47  protected : const std::string  _name;
48  protected : const Parameters * _param;
49  private   : const Tusage_t     _usage;
50
51#ifdef STATISTICS
52  public    : Stat                           * _stat;
53#endif
54
55  public    : Component                      * _component;
56  private   : Interfaces                     * _interfaces;
57
58#ifdef SYSTEMC
59    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
61  public    : SC_CLOCK                      *  in_CLOCK        ;
62  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
63
64    // ~~~~~[ Interface "icache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65  public    : SC_OUT(Tcontrol_t           ) * out_ICACHE_REQ_VAL         ;
66  public    : SC_IN (Tcontrol_t           ) *  in_ICACHE_REQ_ADDRESS_VAL ;
67  public    : SC_OUT(Tcontrol_t           ) * out_ICACHE_REQ_QUEUE_VAL   ;
68
69  public    : SC_IN (Tcontrol_t           ) *  in_ICACHE_REQ_ACK         ;
70  public    : SC_OUT(Tcontrol_t           ) * out_ICACHE_REQ_ADDRESS_ACK ;
71  public    : SC_IN (Tcontrol_t           ) *  in_ICACHE_REQ_QUEUE_ACK   ;
72   
73  public    : SC_OUT(Ticache_type_t       ) * out_ICACHE_REQ_TYPE        ;
74
75  public    : SC_OUT(Taddress_t           ) * out_ICACHE_REQ_ADDRESS        ;
76  public    : SC_IN (Taddress_t           ) *  in_ICACHE_REQ_ADDRESS_ADDRESS;
77  public    : SC_OUT(Taddress_t           ) * out_ICACHE_REQ_QUEUE_ADDRESS  ;
78
79    // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80  public    : SC_IN (Tcontrol_t           ) *  in_EVENT_VAL              ;
81  public    : SC_OUT(Tcontrol_t           ) * out_EVENT_ADDRESS_VAL      ;
82  public    : SC_OUT(Tcontrol_t           ) * out_EVENT_QUEUE_VAL        ;
83
84  public    : SC_OUT(Tcontrol_t           ) * out_EVENT_ACK              ;
85  public    : SC_IN (Tcontrol_t           ) *  in_EVENT_ADDRESS_ACK      ;
86  public    : SC_IN (Tcontrol_t           ) *  in_EVENT_QUEUE_ACK        ;
87
88    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
89
90    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
91
92    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
93#endif
94
95    // -----[ Methods ]---------------------------------------------------
96
97#ifdef SYSTEMC
98    SC_HAS_PROCESS (Ifetch_unit_Glue);
99#endif
100  public  :          Ifetch_unit_Glue             
101  (
102#ifdef SYSTEMC
103   sc_module_name                                name,
104#else                                         
105   std::string                                   name,
106#endif                                         
107#ifdef STATISTICS
108   morpheo::behavioural::Parameters_Statistics * param_statistics,
109#endif
110   Parameters                                  * param,
111   morpheo::behavioural::Tusage_t                usage
112   );
113  public  :          ~Ifetch_unit_Glue             (void);
114                                               
115  private : void        allocation                (
116#ifdef STATISTICS
117                                                   morpheo::behavioural::Parameters_Statistics * param_statistics
118#else
119                                                   void
120#endif
121                                                   );
122  private : void        deallocation              (void);
123                                               
124#ifdef SYSTEMC                                 
125# if defined(STATISTICS) or defined(VHDL_TESTBENCH)
126  public  : void        transition                (void);
127# endif
128  public  : void        genMealy_icache_req       (void);
129  public  : void        genMealy_event            (void);
130#endif                                         
131
132#if VHDL                                       
133  public  : void        vhdl                      (void);
134  private : void        vhdl_declaration          (Vhdl * & vhdl);
135  private : void        vhdl_body                 (Vhdl * & vhdl);
136#endif                                         
137
138#ifdef STATISTICS
139  public  : void        statistics_allocation     (morpheo::behavioural::Parameters_Statistics * param_statistics);
140  public  : void        statistics_deallocation   (void);
141#endif
142#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
143  private : void        end_cycle                 (void);
144#endif
145  };
146
147}; // end namespace ifetch_unit_glue
148}; // end namespace ifetch_unit
149}; // end namespace front_end
150}; // end namespace multi_front_end
151}; // end namespace core
152
153}; // end namespace behavioural
154}; // end namespace morpheo             
155
156#endif
Note: See TracBrowser for help on using the repository browser.