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