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 110 2009-02-19 16:31:47Z 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/include/Parameters.h" |
---|
16 | #include "Behavioural/include/Types.h" |
---|
17 | |
---|
18 | #ifdef STATISTICS |
---|
19 | #include "Behavioural/include/Stat.h" |
---|
20 | #endif |
---|
21 | #include "Behavioural/include/Component.h" |
---|
22 | #ifdef VHDL |
---|
23 | #include "Behavioural/include/Vhdl.h" |
---|
24 | #endif |
---|
25 | #include "Behavioural/include/Usage.h" |
---|
26 | |
---|
27 | #include "Common/include/ToString.h" |
---|
28 | #include "Common/include/Debug.h" |
---|
29 | |
---|
30 | #include <iostream> |
---|
31 | |
---|
32 | namespace morpheo { |
---|
33 | namespace behavioural { |
---|
34 | |
---|
35 | namespace core { |
---|
36 | namespace multi_front_end { |
---|
37 | namespace front_end { |
---|
38 | namespace prediction_unit { |
---|
39 | namespace direction { |
---|
40 | namespace meta_predictor { |
---|
41 | |
---|
42 | |
---|
43 | class Meta_Predictor |
---|
44 | #if SYSTEMC |
---|
45 | : public sc_module |
---|
46 | #endif |
---|
47 | { |
---|
48 | // -----[ fields ]---------------------------------------------------- |
---|
49 | // Parameters |
---|
50 | protected : const std::string _name; |
---|
51 | protected : const Parameters * _param; |
---|
52 | private : const Tusage_t _usage; |
---|
53 | |
---|
54 | #ifdef STATISTICS |
---|
55 | public : Stat * _stat; |
---|
56 | #endif |
---|
57 | |
---|
58 | public : Component * _component; |
---|
59 | private : Interfaces * _interfaces; |
---|
60 | |
---|
61 | #ifdef SYSTEMC |
---|
62 | // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
63 | // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
64 | public : SC_CLOCK * in_CLOCK ; |
---|
65 | public : SC_IN (Tcontrol_t) * in_NRESET ; |
---|
66 | |
---|
67 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
68 | |
---|
69 | // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
70 | |
---|
71 | // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
72 | #endif |
---|
73 | |
---|
74 | // -----[ Methods ]--------------------------------------------------- |
---|
75 | |
---|
76 | #ifdef SYSTEMC |
---|
77 | SC_HAS_PROCESS (Meta_Predictor); |
---|
78 | #endif |
---|
79 | public : Meta_Predictor |
---|
80 | ( |
---|
81 | #ifdef SYSTEMC |
---|
82 | sc_module_name name, |
---|
83 | #else |
---|
84 | std::string name, |
---|
85 | #endif |
---|
86 | #ifdef STATISTICS |
---|
87 | morpheo::behavioural::Parameters_Statistics * param_statistics, |
---|
88 | #endif |
---|
89 | Parameters * param, |
---|
90 | morpheo::behavioural::Tusage_t usage |
---|
91 | ); |
---|
92 | public : ~Meta_Predictor (void); |
---|
93 | |
---|
94 | private : void allocation ( |
---|
95 | #ifdef STATISTICS |
---|
96 | morpheo::behavioural::Parameters_Statistics * param_statistics |
---|
97 | #else |
---|
98 | void |
---|
99 | #endif |
---|
100 | ); |
---|
101 | private : void deallocation (void); |
---|
102 | |
---|
103 | #ifdef SYSTEMC |
---|
104 | # if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
105 | public : void transition (void); |
---|
106 | # endif |
---|
107 | #endif |
---|
108 | |
---|
109 | #if VHDL |
---|
110 | public : void vhdl (void); |
---|
111 | #endif |
---|
112 | |
---|
113 | #ifdef STATISTICS |
---|
114 | public : void statistics_allocation (morpheo::behavioural::Parameters_Statistics * param_statistics); |
---|
115 | public : void statistics_deallocation (void); |
---|
116 | #endif |
---|
117 | #if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
118 | private : void end_cycle (void); |
---|
119 | #endif |
---|
120 | }; |
---|
121 | |
---|
122 | }; // end namespace meta_predictor |
---|
123 | }; // end namespace direction |
---|
124 | }; // end namespace prediction_unit |
---|
125 | }; // end namespace front_end |
---|
126 | }; // end namespace multi_front_end |
---|
127 | }; // end namespace core |
---|
128 | |
---|
129 | }; // end namespace behavioural |
---|
130 | }; // end namespace morpheo |
---|
131 | |
---|
132 | #endif |
---|