source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Pattern_History_Table.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.3 KB
Line 
1#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_pattern_history_table_Pattern_History_Table_h
2#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_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/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Parameters.h"
24#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Types.h"
25#ifdef STATISTICS
26#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/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 core {
38namespace multi_front_end {
39namespace front_end {
40namespace prediction_unit {
41namespace direction {
42
43namespace meta_predictor {
44namespace two_level_branch_predictor {
45namespace pattern_history_table {
46
47
48  class Pattern_History_Table
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
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(Thistory_t)           ** out_PREDICT_HISTORY        ;
79
80  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_VAL    ;
81  public    : SC_OUT(Tcontrol_t)           ** out_BRANCH_COMPLETE_ACK    ;
82  public    : SC_IN (Taddress_t)           **  in_BRANCH_COMPLETE_ADDRESS;
83  public    : SC_IN (Thistory_t)           **  in_BRANCH_COMPLETE_HISTORY;
84  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_DIRECTION;
85
86    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
87
88    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89  public    : SC_SIGNAL(Thistory_t)        ** signal_BRANCH_COMPLETE_HISTORY;
90#endif
91
92    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
93  public    : morpheo::behavioural::generic::counter::Counter           * component_Counter     ;
94  public    : morpheo::behavioural::generic::registerfile::registerfile_monolithic::RegisterFile_Monolithic * component_RegisterFile;
95
96    // -----[ methods ]---------------------------------------------------
97
98#ifdef SYSTEMC
99    SC_HAS_PROCESS (Pattern_History_Table);
100#endif                                         
101
102  public  :          Pattern_History_Table              (
103#ifdef SYSTEMC
104                                                         sc_module_name                              name,
105#else                                         
106                                                         string                                      name,
107#endif                                         
108#ifdef STATISTICS
109                                                         morpheo::behavioural::Parameters_Statistics param_statistics,
110#endif
111                                                         Parameters                                  param );
112   
113  public  :          Pattern_History_Table              (Parameters param );
114  public  :          ~Pattern_History_Table             (void);
115                                               
116#ifdef SYSTEMC                                 
117  private : void     allocation                (void);
118  private : void     deallocation              (void);
119                                               
120#if (defined(STATISTICS) || defined (VHDL_TESTBENCH))
121  public  : void     transition                (void);
122#endif
123#endif                                         
124
125#ifdef STATISTICS
126  public  : string   statistics                (uint32_t depth);
127#endif
128#if VHDL                                       
129  public  : void     vhdl                      (void);
130  private : void     vhdl_declaration          (Vhdl * & vhdl);
131  private : void     vhdl_body                 (Vhdl * & vhdl);
132#endif                                         
133#ifdef VHDL_TESTBENCH                         
134  private : void     vhdl_testbench_transition (void);
135#endif
136  };
137
138}; // end namespace pattern_history_table
139}; // end namespace two_level_branch_predictor
140}; // end namespace meta_predictor
141
142}; // end namespace core
143}; // end namespace multi_front_end
144}; // end namespace front_end
145}; // end namespace prediction_unit
146}; // end namespace direction
147
148
149}; // end namespace behavioural
150}; // end namespace morpheo             
151
152#endif
Note: See TracBrowser for help on using the repository browser.