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

Last change on this file since 111 was 111, checked in by rosiere, 15 years ago

1) Decod_queue : multi implementation (one_fifo, multi_fifo)
2) Issue_queue : multi implementation (in_order, out_of_order)
3) Direction : Add Meta predictor
4) Context_State : re add Branch_complete, More priority to Load miss (is not speculative)
5) Return_Address_Stack : update reg_PREDICT pointer on decod miss prediction
6) UPT : Fix bug in multi event
7) Prediction_glue : in read_stack case, insert in UPT pc_next
8) Rename select : when rob have an event (need flush), read_r{a,b,c} and write_r{d,e} is set at 0

  • Property svn:keywords set to Id
File size: 5.4 KB
Line 
1#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_Meta_Predictor_h
2#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_Meta_Predictor_h
3
4/*
5 * $Id: Meta_Predictor.h 111 2009-02-27 18:37:40Z rosiere $
6 *
7 * [ Description ]
8 *
9 */
10
11#ifdef SYSTEMC
12#include "systemc.h"
13#endif
14
15#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h"
16#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
17
18#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Parameters.h"
19#include "Behavioural/include/Types.h"
20
21#ifdef STATISTICS
22#include "Behavioural/include/Stat.h"
23#endif
24#include "Behavioural/include/Component.h"
25#ifdef VHDL
26#include "Behavioural/include/Vhdl.h"
27#endif
28#include "Behavioural/include/Usage.h"
29
30#include "Common/include/ToString.h"
31#include "Common/include/Debug.h"
32
33#include <iostream>
34
35namespace morpheo {
36namespace behavioural {
37
38namespace core {
39namespace multi_front_end {
40namespace front_end {
41namespace prediction_unit {
42namespace direction {
43namespace meta_predictor {
44
45
46  class Meta_Predictor
47#if SYSTEMC
48    : public sc_module
49#endif
50  {
51    // -----[ fields ]----------------------------------------------------
52    // Parameters
53  protected : const std::string  _name;
54  protected : const Parameters * _param;
55  private   : const Tusage_t     _usage;
56
57#ifdef STATISTICS
58  public    : Stat                           * _stat;
59#endif
60
61  public    : Component                      * _component;
62  private   : Interfaces                     * _interfaces;
63
64#ifdef SYSTEMC
65    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67  public    : SC_CLOCK                      *  in_CLOCK        ;
68  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
69
70    // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_VAL          ;//[nb_inst_predict]
72  public    : SC_OUT(Tcontrol_t)           ** out_PREDICT_ACK          ;//[nb_inst_predict]
73  public    : SC_IN (Taddress_t)           **  in_PREDICT_ADDRESS      ;//[nb_inst_predict]
74  public    : SC_OUT(Tcontrol_t)           ** out_PREDICT_DIRECTION    ;//[nb_inst_predict] // = MSB[history]
75  public    : SC_OUT(Thistory_t)           ** out_PREDICT_HISTORY      ;//[nb_inst_predict]
76
77    // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
78  public    : SC_IN (Tcontrol_t)           **  in_UPDATE_VAL           ;//[nb_inst_update]
79  public    : SC_OUT(Tcontrol_t)           ** out_UPDATE_ACK           ;//[nb_inst_update]
80  public    : SC_IN (Taddress_t)           **  in_UPDATE_ADDRESS       ;//[nb_inst_update]
81  public    : SC_IN (Thistory_t)           **  in_UPDATE_HISTORY       ;//[nb_inst_update]
82  public    : SC_IN (Tcontrol_t)           **  in_UPDATE_DIRECTION     ;//[nb_inst_update]
83
84    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
85  private   : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Two_Level_Branch_Predictor ** _component_two_level_branch_predictor;//[nb_predictor]
86  private   : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue       ::Meta_Predictor_Glue         * _component_glue;
87
88    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
89
90    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
91#endif
92
93    // -----[ Methods ]---------------------------------------------------
94
95#ifdef SYSTEMC
96    SC_HAS_PROCESS (Meta_Predictor);
97#endif
98  public  :          Meta_Predictor             
99  (
100#ifdef SYSTEMC
101   sc_module_name                                name,
102#else                                         
103   std::string                                   name,
104#endif                                         
105#ifdef STATISTICS
106   morpheo::behavioural::Parameters_Statistics * param_statistics,
107#endif
108   Parameters                                  * param,
109   morpheo::behavioural::Tusage_t                usage
110   );
111  public  :          ~Meta_Predictor             (void);
112                                               
113  private : void        allocation                (
114#ifdef STATISTICS
115                                                   morpheo::behavioural::Parameters_Statistics * param_statistics
116#else
117                                                   void
118#endif
119                                                   );
120  private : void        deallocation              (void);
121                                               
122#ifdef SYSTEMC                                 
123# if defined(STATISTICS) or defined(VHDL_TESTBENCH)
124  public  : void        transition                (void);
125# endif                                       
126#endif                                         
127
128#if VHDL                                       
129  public  : void        vhdl                      (void);
130#endif                                         
131
132#ifdef STATISTICS
133  public  : void        statistics_allocation     (morpheo::behavioural::Parameters_Statistics * param_statistics);
134  public  : void        statistics_deallocation   (void);
135#endif
136#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
137  private : void        end_cycle                 (void);
138#endif
139  };
140
141}; // end namespace meta_predictor
142}; // end namespace direction
143}; // end namespace prediction_unit
144}; // end namespace front_end
145}; // end namespace multi_front_end
146}; // end namespace core
147
148}; // end namespace behavioural
149}; // end namespace morpheo             
150
151#endif
Note: See TracBrowser for help on using the repository browser.