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

Last change on this file since 45 was 45, checked in by rosiere, 17 years ago
  • Documentation : specification d'un cache de donnée non bloquant
  • Modification de l'aborescence
File size: 4.9 KB
Line 
1#ifndef morpheo_behavioural_stage_1_ifetch_predictor_meta_predictor_two_level_branch_predictor_branch_history_table_Branch_History_Table_h
2#define morpheo_behavioural_stage_1_ifetch_predictor_meta_predictor_two_level_branch_predictor_branch_history_table_Branch_History_Table_h
3
4/*
5 * $Id$
6 *
7 * [ Description ]
8 *
9 */
10
11#ifdef SYSTEMC
12#include "systemc.h"
13#endif
14
15#include "Common/include/ToString.h"
16#include "Common/include/Debug.h"
17
18// Internal structure
19#include "Behavioural/Generic/Shifter/include/Shifter.h"
20#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h"
21#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Parameters.h"
22#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Types.h"
23#ifdef STATISTICS
24#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Statistics.h"
25#endif
26#ifdef VHDL
27#include "Behavioural/include/Vhdl.h"
28#endif
29#include "Behavioural/include/Component.h"
30
31using namespace std;
32
33namespace morpheo {
34namespace behavioural {
35namespace stage_1_ifetch {
36namespace predictor {
37namespace meta_predictor {
38namespace two_level_branch_predictor {
39namespace branch_history_table {
40
41
42  class Branch_History_Table
43#if SYSTEMC
44    : public sc_module
45#endif
46  {
47    // -----[ fields ]----------------------------------------------------
48    // Parameters
49  protected : const string     _name;
50
51  protected : const Parameters _param;
52#ifdef STATISTICS
53  protected : const morpheo::behavioural::Parameters_Statistics _param_statistics;
54#endif
55#ifdef STATISTICS
56  private   : Statistics                     * _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  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_VAL            ;
69  public    : SC_OUT(Tcontrol_t)           ** out_PREDICT_ACK            ;
70  public    : SC_IN (Taddress_t)           **  in_PREDICT_ADDRESS        ;
71  public    : SC_OUT(Thistory_t)           ** out_PREDICT_HISTORY        ;
72
73  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_VAL    ;
74  public    : SC_OUT(Tcontrol_t)           ** out_BRANCH_COMPLETE_ACK    ;
75  public    : SC_IN (Taddress_t)           **  in_BRANCH_COMPLETE_ADDRESS;
76  public    : SC_IN (Thistory_t)           **  in_BRANCH_COMPLETE_HISTORY;
77  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_DIRECTION;
78
79    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
80
81    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
82#endif
83
84    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
85  public    : morpheo::behavioural::generic::shifter::Shifter           * component_Shifter     ;
86  public    : morpheo::behavioural::generic::registerfile::registerfile_monolithic::RegisterFile_Monolithic * component_RegisterFile;
87
88    // -----[ methods ]---------------------------------------------------
89
90#ifdef SYSTEMC
91    SC_HAS_PROCESS (Branch_History_Table);
92#endif                                         
93  public  :          Branch_History_Table              (
94#ifdef SYSTEMC
95                                                        sc_module_name                              name,
96#else                                         
97                                                        string                                      name,
98#endif                                         
99#ifdef STATISTICS
100                                                        morpheo::behavioural::Parameters_Statistics param_statistics,
101#endif
102                                                        Parameters                                  param );
103                                               
104  public  :          Branch_History_Table              (Parameters param );
105  public  :          ~Branch_History_Table             (void);
106                                               
107#ifdef SYSTEMC                                 
108  private : void     allocation                (void);
109  private : void     deallocation              (void);
110                                               
111#if (defined(STATISTICS) || defined (VHDL_TESTBENCH))
112  public  : void     transition                (void);
113#endif
114#endif                                         
115                                               
116#ifdef STATISTICS
117  public  : string   statistics                (uint32_t depth);
118#endif
119#if VHDL                                       
120  public  : void     vhdl                      (void);
121  private : void     vhdl_declaration          (Vhdl * & vhdl);
122  private : void     vhdl_body                 (Vhdl * & vhdl);
123#endif                                         
124#ifdef VHDL_TESTBENCH                         
125  private : void     vhdl_testbench_transition (void);
126#endif
127  };
128
129}; // end namespace branch_history_table
130}; // end namespace two_level_branch_predictor
131}; // end namespace meta_predictor
132}; // end namespace predictor
133}; // end namespace stage_1_ifetch
134
135}; // end namespace behavioural
136}; // end namespace morpheo             
137
138#endif
Note: See TracBrowser for help on using the repository browser.