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

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

1) Stat_list : fix retire old and new register bug
2) Stat_list : remove read_counter and valid flag, because validation of destination is in retire step (not in commit step)
3) Model : add class Model (cf Morpheo.sim)
4) Allocation : alloc_interface_begin and alloc_interface_end to delete temporary array.
5) Script : add distexe.sh
6) Add Comparator, Multiplier, Divider. But this component are not implemented
7) Software : add Dhrystone

  • Property svn:keywords set to Id
File size: 6.1 KB
Line 
1#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_direction_glue_Direction_Glue_h
2#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_direction_glue_Direction_Glue_h
3
4/*
5 * $Id: Direction_Glue.h 112 2009-03-18 22:36:26Z rosiere $
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#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/include/Types.h"
20#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/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
30namespace morpheo {
31namespace behavioural {
32
33namespace core {
34namespace multi_front_end {
35namespace front_end {
36namespace prediction_unit {
37namespace direction {
38namespace direction_glue {
39
40
41  class Direction_Glue
42#if SYSTEMC
43    : public sc_module
44#endif
45  {
46    // -----[ fields ]----------------------------------------------------
47    // Parameters
48  protected : const std::string  _name;
49  protected : const Parameters * _param;
50  private   : const Tusage_t     _usage;
51
52#ifdef STATISTICS
53  public    : Stat                           * _stat;
54#endif
55
56  public    : Component                      * _component;
57  private   : Interfaces                     * _interfaces;
58
59#ifdef SYSTEMC
60    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
61    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62  public    : SC_CLOCK                      *  in_CLOCK        ;
63  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
64
65    // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_VAL                  ;
67  public    : SC_OUT(Tcontrol_t)           ** out_PREDICT_ACK                  ;
68  public    : SC_IN (Taddress_t)           **  in_PREDICT_ADDRESS_SRC          ;
69  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_STATIC               ;
70  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_LAST_TAKE            ;
71  public    : SC_OUT(Thistory_t)           ** out_PREDICT_HISTORY              ;
72  public    : SC_OUT(Tcontrol_t)           ** out_PREDICT_DIRECTION            ;
73
74  public    : SC_OUT(Tcontrol_t)           ** out_PREDICT_PREDICTOR_VAL        ;
75  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_PREDICTOR_ACK        ;
76  public    : SC_OUT(Taddress_t)           ** out_PREDICT_PREDICTOR_ADDRESS_SRC;
77  public    : SC_IN (Thistory_t)           **  in_PREDICT_PREDICTOR_HISTORY    ;
78  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_PREDICTOR_DIRECTION  ;
79
80    // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
81  public    : SC_IN (Tcontrol_t)           **  in_UPDATE_VAL                        ;
82  public    : SC_OUT(Tcontrol_t)           ** out_UPDATE_ACK                        ;
83  public    : SC_IN (Taddress_t)           **  in_UPDATE_ADDRESS                    ;
84  public    : SC_IN (Thistory_t)           **  in_UPDATE_HISTORY                    ;
85  public    : SC_IN (Tcontrol_t)           **  in_UPDATE_DIRECTION                  ;
86  public    : SC_IN (Tcontrol_t)           **  in_UPDATE_PREDICTION_IFETCH          ;
87
88  public    : SC_OUT(Tcontrol_t)           ** out_UPDATE_PREDICTOR_VAL              ;
89  public    : SC_IN (Tcontrol_t)           **  in_UPDATE_PREDICTOR_ACK              ;
90  public    : SC_OUT(Taddress_t)           ** out_UPDATE_PREDICTOR_ADDRESS          ;
91  public    : SC_OUT(Thistory_t)           ** out_UPDATE_PREDICTOR_HISTORY          ;
92  public    : SC_OUT(Tcontrol_t)           ** out_UPDATE_PREDICTOR_DIRECTION        ;
93  public    : SC_OUT(Tcontrol_t)           ** out_UPDATE_PREDICTOR_PREDICTION_IFETCH;
94
95    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
96
97    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
98
99    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100#endif
101
102    // -----[ Methods ]---------------------------------------------------
103
104#ifdef SYSTEMC
105    SC_HAS_PROCESS (Direction_Glue);
106#endif
107  public  :          Direction_Glue             
108  (
109#ifdef SYSTEMC
110   sc_module_name                                name,
111#else                                         
112   std::string                                   name,
113#endif                                         
114#ifdef STATISTICS
115   morpheo::behavioural::Parameters_Statistics * param_statistics,
116#endif
117   Parameters                                  * param,
118   morpheo::behavioural::Tusage_t                usage
119   );
120  public  :          ~Direction_Glue             (void);
121                                               
122  private : void        allocation                (
123#ifdef STATISTICS
124                                                   morpheo::behavioural::Parameters_Statistics * param_statistics
125#else
126                                                   void
127#endif
128                                                   );
129  private : void        deallocation              (void);
130                                               
131#ifdef SYSTEMC                                 
132# if defined(STATISTICS) or defined(VHDL_TESTBENCH)
133  public  : void        transition                (void);
134# endif
135  public  : void        genMealy_predict          (void);
136  public  : void        genMealy_update           (void);
137#endif                                         
138
139#if VHDL                                       
140  public  : void        vhdl                      (void);
141  private : void        vhdl_declaration          (Vhdl * & vhdl);
142  private : void        vhdl_body                 (Vhdl * & vhdl);
143#endif                                         
144
145#ifdef STATISTICS
146  public  : void        statistics_allocation     (morpheo::behavioural::Parameters_Statistics * param_statistics);
147  public  : void        statistics_deallocation   (void);
148#endif
149#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
150  private : void        end_cycle                 (void);
151#endif
152  };
153
154}; // end namespace direction_glue
155}; // end namespace direction
156}; // end namespace prediction_unit
157}; // end namespace front_end
158}; // end namespace multi_front_end
159}; // end namespace core
160
161}; // end namespace behavioural
162}; // end namespace morpheo             
163
164#endif
Note: See TracBrowser for help on using the repository browser.