source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/include/Direction_Glue.h @ 78

Last change on this file since 78 was 78, checked in by rosiere, 16 years ago

Add :

  • Execute_loop (must be test systemC)
  • Prediction
    • Direction : predifined scheme
    • Branch Target Buffer
  • iFetch_unit
    • ifetch_queue
    • pc management
  • Decod_unit
    • coming soon : support for custom operation
  • Rename_unit
    • RAT
    • Free_list
    • Dependence RAW check
    • Load store unit pointer
  • New Environnement (hierarchy_memory will remove in a next version)


Modif :

  • Manage Custom Operation
  • All component in execute_loop to use the new statistics management

Not Finish :

  • Return Address Stack
  • Environnement
File size: 5.8 KB
Line 
1#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_direction_glue_Direction_Glue_h
2#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_direction_glue_Direction_Glue_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 "Common/include/ToString.h"
17#include "Common/include/Debug.h"
18
19#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/include/Types.h"
20#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_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 prediction_unit {
37namespace direction {
38namespace direction_glue {
39
40
41  class Direction_Glue
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 : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_VAL                  ;
67  public    : SC_OUT(Tcontrol_t)           ** out_PREDICT_ACK                  ;
68  public    : SC_IN (Taddress_t)           **  in_PREDICT_ADDRESS_SRC          ;
69  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_STATIC               ;
70  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_LAST_TAKE            ;
71  public    : SC_OUT(Thistory_t)           ** out_PREDICT_HISTORY              ;
72  public    : SC_OUT(Tcontrol_t)           ** out_PREDICT_DIRECTION            ;
73
74  public    : SC_OUT(Tcontrol_t)           ** out_PREDICT_PREDICTOR_VAL        ;
75  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_PREDICTOR_ACK        ;
76  public    : SC_OUT(Taddress_t)           ** out_PREDICT_PREDICTOR_ADDRESS_SRC;
77  public    : SC_IN (Thistory_t)           **  in_PREDICT_PREDICTOR_HISTORY    ;
78  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_PREDICTOR_DIRECTION  ;
79
80    // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
81  public    : SC_IN (Tcontrol_t)           **  in_UPDATE_VAL                ;
82  public    : SC_OUT(Tcontrol_t)           ** out_UPDATE_ACK                ;
83  public    : SC_IN (Taddress_t)           **  in_UPDATE_ADDRESS            ;
84  public    : SC_IN (Thistory_t)           **  in_UPDATE_HISTORY            ;
85  public    : SC_IN (Tcontrol_t)           **  in_UPDATE_DIRECTION          ;
86
87  public    : SC_OUT(Tcontrol_t)           ** out_UPDATE_PREDICTOR_VAL      ;
88  public    : SC_IN (Tcontrol_t)           **  in_UPDATE_PREDICTOR_ACK      ;
89  public    : SC_OUT(Taddress_t)           ** out_UPDATE_PREDICTOR_ADDRESS  ;
90  public    : SC_OUT(Thistory_t)           ** out_UPDATE_PREDICTOR_HISTORY  ;
91  public    : SC_OUT(Tcontrol_t)           ** out_UPDATE_PREDICTOR_DIRECTION;
92
93    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
94
95    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
96
97    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
98#endif
99
100    // -----[ Methods ]---------------------------------------------------
101
102#ifdef SYSTEMC
103    SC_HAS_PROCESS (Direction_Glue);
104#endif
105  public  :          Direction_Glue             
106  (
107#ifdef SYSTEMC
108   sc_module_name                                name,
109#else                                         
110   std::string                                   name,
111#endif                                         
112#ifdef STATISTICS
113   morpheo::behavioural::Parameters_Statistics * param_statistics,
114#endif
115   Parameters                                  * param,
116   morpheo::behavioural::Tusage_t                usage=USE_ALL
117   );
118  public  :          ~Direction_Glue             (void);
119                                               
120  private : void        allocation                (
121#ifdef STATISTICS
122                                                   morpheo::behavioural::Parameters_Statistics * param_statistics
123#else
124                                                   void
125#endif
126                                                   );
127  private : void        deallocation              (void);
128                                               
129#ifdef SYSTEMC                                 
130# if defined(STATISTICS) or defined(VHDL_TESTBENCH)
131  public  : void        transition                (void);
132# endif
133  public  : void        genMealy_predict          (void);
134  public  : void        genMealy_update           (void);
135#endif                                         
136
137#if VHDL                                       
138  public  : void        vhdl                      (void);
139  private : void        vhdl_declaration          (Vhdl * & vhdl);
140  private : void        vhdl_body                 (Vhdl * & vhdl);
141#endif                                         
142
143#ifdef STATISTICS
144  public  : void        statistics_allocation     (morpheo::behavioural::Parameters_Statistics * param_statistics);
145  public  : void        statistics_deallocation   (void);
146#endif
147#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
148  private : void        end_cycle                 (void);
149#endif
150  };
151
152}; // end namespace direction_glue
153}; // end namespace direction
154}; // end namespace prediction_unit
155}; // end namespace front_end
156}; // end namespace multi_front_end
157}; // end namespace core
158
159}; // end namespace behavioural
160}; // end namespace morpheo             
161
162#endif
Note: See TracBrowser for help on using the repository browser.