source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Two_Level_Branch_Predictor/Pattern_History_Table/include/Pattern_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: 5.0 KB
Line 
1#ifndef morpheo_behavioural_stage_1_ifetch_predictor_meta_predictor_two_level_branch_predictor_pattern_history_table_Pattern_History_Table_h
2#define morpheo_behavioural_stage_1_ifetch_predictor_meta_predictor_two_level_branch_predictor_pattern_history_table_Pattern_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 <iostream>
16#include "Common/include/ToString.h"
17#include "Common/include/Debug.h"
18
19// Internal structure
20#include "Behavioural/Generic/Counter/include/Counter.h"
21#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h"
22
23#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Parameters.h"
24#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Types.h"
25#ifdef STATISTICS
26#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Statistics.h"
27#endif
28#ifdef VHDL
29#include "Behavioural/include/Vhdl.h"
30#endif
31#include "Behavioural/include/Component.h"
32
33using namespace std;
34
35namespace morpheo                    {
36namespace behavioural {
37namespace stage_1_ifetch {
38namespace predictor {
39namespace meta_predictor {
40namespace two_level_branch_predictor {
41namespace pattern_history_table {
42
43
44  class Pattern_History_Table
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_VAL            ;
72  public    : SC_OUT(Tcontrol_t)           ** out_PREDICT_ACK            ;
73  public    : SC_IN (Taddress_t)           **  in_PREDICT_ADDRESS        ;
74  public    : SC_OUT(Thistory_t)           ** out_PREDICT_HISTORY        ;
75
76  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_VAL    ;
77  public    : SC_OUT(Tcontrol_t)           ** out_BRANCH_COMPLETE_ACK    ;
78  public    : SC_IN (Taddress_t)           **  in_BRANCH_COMPLETE_ADDRESS;
79  public    : SC_IN (Thistory_t)           **  in_BRANCH_COMPLETE_HISTORY;
80  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_DIRECTION;
81
82    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
83
84    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
85  public    : SC_SIGNAL(Thistory_t)        ** signal_BRANCH_COMPLETE_HISTORY;
86#endif
87
88    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
89  public    : morpheo::behavioural::generic::counter::Counter           * component_Counter     ;
90  public    : morpheo::behavioural::generic::registerfile::registerfile_monolithic::RegisterFile_Monolithic * component_RegisterFile;
91
92    // -----[ methods ]---------------------------------------------------
93
94#ifdef SYSTEMC
95    SC_HAS_PROCESS (Pattern_History_Table);
96#endif                                         
97
98  public  :          Pattern_History_Table              (
99#ifdef SYSTEMC
100                                                         sc_module_name                              name,
101#else                                         
102                                                         string                                      name,
103#endif                                         
104#ifdef STATISTICS
105                                                         morpheo::behavioural::Parameters_Statistics param_statistics,
106#endif
107                                                         Parameters                                  param );
108   
109  public  :          Pattern_History_Table              (Parameters param );
110  public  :          ~Pattern_History_Table             (void);
111                                               
112#ifdef SYSTEMC                                 
113  private : void     allocation                (void);
114  private : void     deallocation              (void);
115                                               
116#if (defined(STATISTICS) || defined (VHDL_TESTBENCH))
117  public  : void     transition                (void);
118#endif
119#endif                                         
120
121#ifdef STATISTICS
122  public  : string   statistics                (uint32_t depth);
123#endif
124#if VHDL                                       
125  public  : void     vhdl                      (void);
126  private : void     vhdl_declaration          (Vhdl * & vhdl);
127  private : void     vhdl_body                 (Vhdl * & vhdl);
128#endif                                         
129#ifdef VHDL_TESTBENCH                         
130  private : void     vhdl_testbench_transition (void);
131#endif
132  };
133
134}; // end namespace pattern_history_table
135}; // end namespace two_level_branch_predictor
136}; // end namespace meta_predictor
137}; // end namespace predictor
138}; // end namespace stage_1_ifetch
139
140}; // end namespace behavioural
141}; // end namespace morpheo             
142
143#endif
Note: See TracBrowser for help on using the repository browser.