source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h @ 48

Last change on this file since 48 was 48, checked in by rosiere, 17 years ago

Modification des Makefile : pas de creation inutile de shell

File size: 6.8 KB
Line 
1#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_Two_Level_Branch_Predictor_h
2#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_Two_Level_Branch_Predictor_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// Internal structure
20#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Branch_History_Table.h"
21#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Pattern_History_Table.h"
22#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
23
24#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Parameters.h"
25#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Types.h"
26#ifdef STATISTICS
27#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Statistics.h"
28#endif
29#ifdef VHDL
30#include "Behavioural/include/Vhdl.h"
31#endif
32#include "Behavioural/include/Component.h"
33
34using namespace std;
35
36namespace morpheo {
37namespace behavioural {
38namespace core {
39namespace multi_front_end {
40namespace front_end {
41namespace prediction_unit {
42namespace direction {
43
44namespace meta_predictor {
45namespace two_level_branch_predictor {
46
47
48  class Two_Level_Branch_Predictor
49#if SYSTEMC
50    : public sc_module
51#endif
52  {
53    // -----[ fields ]----------------------------------------------------
54    // Parameters
55  protected : const string     _name;
56
57  protected : const Parameters _param;
58#ifdef STATISTICS
59 protected : const morpheo::behavioural::Parameters_Statistics _param_statistics;
60#endif
61
62#ifdef STATISTICS
63  private   : Statistics                     * _stat;
64#endif
65
66  public    : Component                      * _component;
67  private   : Interfaces                     * _interfaces;
68
69#ifdef SYSTEMC
70    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71    // Interface
72  public    : SC_CLOCK                      *  in_CLOCK                      ;
73  public    : SC_IN (Tcontrol_t)            *  in_NRESET                     ;
74    // Interface Predict
75  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_VAL                ;
76  public    : SC_OUT(Tcontrol_t)           ** out_PREDICT_ACK                ;
77  public    : SC_IN (Taddress_t)           **  in_PREDICT_ADDRESS            ;
78  public    : SC_OUT(Tbht_history_t)       ** out_PREDICT_BHT_HISTORY        ;
79  public    : SC_OUT(Tpht_history_t)       ** out_PREDICT_PHT_HISTORY        ;
80                       
81    // Interface Branch_complete
82  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_VAL        ;
83  public    : SC_OUT(Tcontrol_t)           ** out_BRANCH_COMPLETE_ACK        ;
84  public    : SC_IN (Taddress_t)           **  in_BRANCH_COMPLETE_ADDRESS    ;
85  public    : SC_IN (Tbht_history_t)       **  in_BRANCH_COMPLETE_BHT_HISTORY;
86  public    : SC_IN (Tpht_history_t)       **  in_BRANCH_COMPLETE_PHT_HISTORY;
87  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_DIRECTION  ;
88
89    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
90
91    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92  private   : SC_SIGNAL(Tcontrol_t)        ** signal_PREDICT_BHT_ACK            ;
93  private   : SC_SIGNAL(Tcontrol_t)        ** signal_PREDICT_PHT_ACK            ;
94  private   : SC_SIGNAL(Taddress_t)        ** signal_PREDICT_BHT_ADDRESS        ;
95  private   : SC_SIGNAL(Taddress_t)        ** signal_PREDICT_PHT_ADDRESS        ;
96
97  private   : SC_SIGNAL(Tcontrol_t)        ** signal_BRANCH_COMPLETE_BHT_ACK    ;
98  private   : SC_SIGNAL(Tcontrol_t)        ** signal_BRANCH_COMPLETE_PHT_ACK    ;
99  private   : SC_SIGNAL(Taddress_t)        ** signal_BRANCH_COMPLETE_BHT_ADDRESS; 
100  private   : SC_SIGNAL(Taddress_t)        ** signal_BRANCH_COMPLETE_PHT_ADDRESS;
101#endif
102
103    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
104  protected : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::branch_history_table ::Branch_History_Table  * component_Branch_History_Table;
105  protected : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::pattern_history_table::Pattern_History_Table * component_Pattern_History_Table;
106  protected : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::two_level_branch_predictor_glue::Two_Level_Branch_Predictor_Glue * component_Two_Level_Branch_Predictor_Glue;
107
108    // -----[ methods ]---------------------------------------------------
109
110#ifdef SYSTEMC
111    SC_HAS_PROCESS (Two_Level_Branch_Predictor);
112#endif                                         
113  public  :          Two_Level_Branch_Predictor              (
114#ifdef SYSTEMC
115                                                              sc_module_name                              name,
116#else                                         
117                                                              string                                      name,
118#endif                                         
119#ifdef STATISTICS
120                                                              morpheo::behavioural::Parameters_Statistics param_statistics,
121#endif
122                                                              Parameters                                  param );
123                                                             
124  public  :          Two_Level_Branch_Predictor              (Parameters param );
125  public  :          ~Two_Level_Branch_Predictor             (void);
126                                               
127#ifdef SYSTEMC                                 
128  private : void     allocation                (void);
129  private : void     deallocation              (void);
130                                               
131#if (defined(STATISTICS) || defined (VHDL_TESTBENCH))
132  public  : void     transition                (void);
133#endif
134#endif                                         
135#ifdef STATISTICS
136  public  : string   statistics                (uint32_t depth);
137#endif
138                                               
139#if VHDL                                       
140  public  : void     vhdl                      (void);
141  private : void     vhdl_declaration          (Vhdl * & vhdl);
142  private : void     vhdl_body                 (Vhdl * & vhdl);
143#endif                                         
144#ifdef VHDL_TESTBENCH                         
145  private : void     vhdl_testbench_transition (void);
146#endif
147  };
148
149}; // end namespace two_level_branch_predictor
150}; // end namespace meta_predictor
151
152}; // end namespace core
153}; // end namespace multi_front_end
154}; // end namespace front_end
155}; // end namespace prediction_unit
156}; // end namespace direction
157
158
159}; // end namespace behavioural
160}; // end namespace morpheo             
161
162#endif
Note: See TracBrowser for help on using the repository browser.