source: trunk/IPs/systemC/processor/Morpheo/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 @ 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: 5.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_glue_Two_Level_Branch_Predictor_Glue_h
2#define 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_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/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Parameters.h"
20#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Types.h"
21#ifdef STATISTICS
22#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Statistics.h"
23#endif
24#ifdef VHDL
25#include "Behavioural/include/Vhdl.h"
26#endif
27#include "Behavioural/include/Component.h"
28
29using namespace std;
30
31namespace morpheo {
32namespace behavioural {
33namespace core {
34namespace multi_front_end {
35namespace front_end {
36namespace prediction_unit {
37namespace direction {
38
39namespace meta_predictor {
40namespace two_level_branch_predictor {
41namespace two_level_branch_predictor_glue {
42
43
44  class Two_Level_Branch_Predictor_Glue
45#if SYSTEMC
46    : public sc_module
47#endif
48  {
49    // -----[ fields ]----------------------------------------------------
50    // Parameters
51  protected : const string     _name;
52
53  protected : const Parameters _param;
54//#ifdef STATISTICS
55//protected : const morpheo::behavioural::Parameters_Statistics _param_statistics;
56//#endif
57
58#ifdef STATISTICS
59  private   : Statistics                     * _stat;
60#endif
61
62  public    : Component                      * _component;
63  private   : Interfaces                     * _interfaces;
64
65#ifdef SYSTEMC
66    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67    // Interface
68  public    : SC_CLOCK                      *  in_CLOCK                      ;
69  public    : SC_IN (Tcontrol_t)            *  in_NRESET                     ;
70
71  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_BHT_ACK            ;
72  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_PHT_ACK            ;
73  public    : SC_OUT(Tcontrol_t)           ** out_PREDICT_ACK                ;
74                                           
75  public    : SC_IN (Taddress_t)           **  in_PREDICT_ADDRESS            ;
76  public    : SC_IN (Tbht_history_t)       **  in_PREDICT_BHT_HISTORY        ;
77  public    : SC_OUT(Taddress_t)           ** out_PREDICT_BHT_ADDRESS        ;
78  public    : SC_OUT(Taddress_t)           ** out_PREDICT_PHT_ADDRESS        ;
79                                           
80  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_BHT_ACK    ;
81  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_PHT_ACK    ;
82  public    : SC_OUT(Tcontrol_t)           ** out_BRANCH_COMPLETE_ACK        ;
83                                           
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_OUT(Taddress_t)           ** out_BRANCH_COMPLETE_BHT_ADDRESS;
87  public    : SC_OUT(Taddress_t)           ** out_BRANCH_COMPLETE_PHT_ADDRESS;
88
89    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
90
91    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
92
93    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94#endif
95
96    // -----[ methods ]---------------------------------------------------
97
98#ifdef SYSTEMC
99    SC_HAS_PROCESS (Two_Level_Branch_Predictor_Glue);
100#endif
101  public  :          Two_Level_Branch_Predictor_Glue              (
102#ifdef SYSTEMC
103                                                                   sc_module_name                              name,
104#else                                         
105                                                                   string                                      name,
106#endif                                         
107#ifdef STATISTICS
108                                                                   morpheo::behavioural::Parameters_Statistics param_statistics,
109#endif
110                                                                   Parameters                                  param );
111                                               
112  public  :          Two_Level_Branch_Predictor_Glue              (Parameters param );
113  public  :          ~Two_Level_Branch_Predictor_Glue             (void);
114                                               
115#ifdef SYSTEMC                                 
116  private : void     allocation                (void);
117  private : void     deallocation              (void);
118                                               
119#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
120  public  : void     transition                            (void);
121#endif                                                     
122  public  : void     genMealy_predict_ack                  (void);
123  public  : void     genMealy_predict_bht_address          (void);
124  public  : void     genMealy_predict_pht_address          (void);
125  public  : void     genMealy_branch_complete_ack          (void);
126  public  : void     genMealy_branch_complete_bht_address  (void);
127  public  : void     genMealy_branch_complete_pht_address  (void);
128#endif                                         
129
130#ifdef STATISTICS
131  public  : string   statistics                (uint32_t depth);
132#endif
133#if VHDL                                       
134  public  : void     vhdl                      (void);
135  private : void     vhdl_declaration          (Vhdl * & vhdl);
136  private : void     vhdl_body                 (Vhdl * & vhdl);
137#endif                                         
138#ifdef VHDL_TESTBENCH                         
139  private : void     vhdl_testbench_transition (void);
140#endif
141  };
142
143}; // end namespace two_level_branch_predictor_glue
144}; // end namespace two_level_branch_predictor
145}; // end namespace meta_predictor
146
147}; // end namespace core
148}; // end namespace multi_front_end
149}; // end namespace front_end
150}; // end namespace prediction_unit
151}; // end namespace direction
152
153
154}; // end namespace behavioural
155}; // end namespace morpheo             
156
157#endif
Note: See TracBrowser for help on using the repository browser.