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

Last change on this file since 78 was 78, checked in by rosiere, 16 years ago

Add :

  • Execute_loop (must be test systemC)
  • Prediction
    • Direction : predifined scheme
    • Branch Target Buffer
  • iFetch_unit
    • ifetch_queue
    • pc management
  • Decod_unit
    • coming soon : support for custom operation
  • Rename_unit
    • RAT
    • Free_list
    • Dependence RAW check
    • Load store unit pointer
  • New Environnement (hierarchy_memory will remove in a next version)


Modif :

  • Manage Custom Operation
  • All component in execute_loop to use the new statistics management

Not Finish :

  • Return Address Stack
  • Environnement
File size: 4.8 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$
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#include "Behavioural/include/Types.h"
19
20#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/include/Parameters.h"
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 "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/include/Direction_Glue.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::direction_glue::Direction_Glue * _component_glue;
82
83    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
84
85    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
86#endif
87
88    // -----[ Methods ]---------------------------------------------------
89
90#ifdef SYSTEMC
91    SC_HAS_PROCESS (Direction);
92#endif
93  public  :          Direction             
94  (
95#ifdef SYSTEMC
96   sc_module_name                                name,
97#else                                         
98   std::string                                   name,
99#endif                                         
100#ifdef STATISTICS
101   morpheo::behavioural::Parameters_Statistics * param_statistics,
102#endif
103   Parameters                                  * param,
104   morpheo::behavioural::Tusage_t                usage=USE_ALL
105   );
106  public  :          ~Direction             (void);
107                                               
108  private : void        allocation                (
109#ifdef STATISTICS
110                                                   morpheo::behavioural::Parameters_Statistics * param_statistics
111#else
112                                                   void
113#endif
114                                                   );
115  private : void        deallocation              (void);
116                                               
117#ifdef SYSTEMC                                 
118# if defined(STATISTICS) or defined(VHDL_TESTBENCH)
119  public  : void        transition                (void);
120# endif                                       
121#endif                                         
122
123#if VHDL                                       
124  public  : void        vhdl                      (void);
125#endif                                         
126
127#ifdef STATISTICS
128  public  : void        statistics_allocation     (morpheo::behavioural::Parameters_Statistics * param_statistics);
129  public  : void        statistics_deallocation   (void);
130#endif
131#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
132  private : void        end_cycle                 (void);
133#endif
134  };
135
136}; // end namespace direction
137}; // end namespace prediction_unit
138}; // end namespace front_end
139}; // end namespace multi_front_end
140}; // end namespace core
141
142}; // end namespace behavioural
143}; // end namespace morpheo             
144
145#endif
Note: See TracBrowser for help on using the repository browser.