1 | /* |
---|
2 | * $Id: Meta_Predictor.cpp 110 2009-02-19 16:31:47Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Meta_Predictor.h" |
---|
9 | |
---|
10 | namespace morpheo { |
---|
11 | namespace behavioural { |
---|
12 | namespace core { |
---|
13 | namespace multi_front_end { |
---|
14 | namespace front_end { |
---|
15 | namespace prediction_unit { |
---|
16 | namespace direction { |
---|
17 | namespace meta_predictor { |
---|
18 | |
---|
19 | |
---|
20 | #undef FUNCTION |
---|
21 | #define FUNCTION "Meta_Predictor::Meta_Predictor" |
---|
22 | Meta_Predictor::Meta_Predictor |
---|
23 | ( |
---|
24 | #ifdef SYSTEMC |
---|
25 | sc_module_name name, |
---|
26 | #else |
---|
27 | string name, |
---|
28 | #endif |
---|
29 | #ifdef STATISTICS |
---|
30 | morpheo::behavioural::Parameters_Statistics * param_statistics, |
---|
31 | #endif |
---|
32 | morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Parameters * param, |
---|
33 | morpheo::behavioural::Tusage_t usage |
---|
34 | ): |
---|
35 | _name (name) |
---|
36 | ,_param (param) |
---|
37 | ,_usage (usage) |
---|
38 | { |
---|
39 | log_begin(Meta_Predictor,FUNCTION); |
---|
40 | |
---|
41 | usage_environment(_usage); |
---|
42 | |
---|
43 | log_printf(INFO,Meta_Predictor,FUNCTION,_("<%s> : Allocation"),_name.c_str()); |
---|
44 | |
---|
45 | allocation ( |
---|
46 | #ifdef STATISTICS |
---|
47 | param_statistics |
---|
48 | #endif |
---|
49 | ); |
---|
50 | |
---|
51 | #ifdef STATISTICS |
---|
52 | if (usage_is_set(_usage,USE_STATISTICS)) |
---|
53 | { |
---|
54 | log_printf(INFO,Meta_Predictor,FUNCTION,_("<%s> : Allocation of statistics"),_name.c_str()); |
---|
55 | |
---|
56 | statistics_allocation(param_statistics); |
---|
57 | } |
---|
58 | #endif |
---|
59 | |
---|
60 | #ifdef VHDL |
---|
61 | if (usage_is_set(_usage,USE_VHDL)) |
---|
62 | { |
---|
63 | // generate the vhdl |
---|
64 | log_printf(INFO,Meta_Predictor,FUNCTION,_("<%s> : Generate the vhdl"),_name.c_str()); |
---|
65 | |
---|
66 | vhdl(); |
---|
67 | } |
---|
68 | #endif |
---|
69 | |
---|
70 | #ifdef SYSTEMC |
---|
71 | if (usage_is_set(_usage,USE_SYSTEMC)) |
---|
72 | { |
---|
73 | log_printf(INFO,Meta_Predictor,FUNCTION,_("<%s> : Method - transition"),_name.c_str()); |
---|
74 | |
---|
75 | SC_METHOD (transition); |
---|
76 | dont_initialize (); |
---|
77 | sensitive << (*(in_CLOCK)).pos(); |
---|
78 | |
---|
79 | # ifdef SYSTEMCASS_SPECIFIC |
---|
80 | // List dependency information |
---|
81 | # endif |
---|
82 | |
---|
83 | #endif |
---|
84 | } |
---|
85 | log_end(Meta_Predictor,FUNCTION); |
---|
86 | }; |
---|
87 | |
---|
88 | #undef FUNCTION |
---|
89 | #define FUNCTION "Meta_Predictor::~Meta_Predictor" |
---|
90 | Meta_Predictor::~Meta_Predictor (void) |
---|
91 | { |
---|
92 | log_begin(Meta_Predictor,FUNCTION); |
---|
93 | |
---|
94 | #ifdef STATISTICS |
---|
95 | if (usage_is_set(_usage,USE_STATISTICS)) |
---|
96 | { |
---|
97 | statistics_deallocation(); |
---|
98 | } |
---|
99 | #endif |
---|
100 | |
---|
101 | log_printf(INFO,Meta_Predictor,FUNCTION,_("<%s> : Deallocation"),_name.c_str()); |
---|
102 | deallocation (); |
---|
103 | |
---|
104 | log_end(Meta_Predictor,FUNCTION); |
---|
105 | }; |
---|
106 | |
---|
107 | }; // end namespace meta_predictor |
---|
108 | }; // end namespace direction |
---|
109 | }; // end namespace prediction_unit |
---|
110 | }; // end namespace front_end |
---|
111 | }; // end namespace multi_front_end |
---|
112 | }; // end namespace core |
---|
113 | |
---|
114 | }; // end namespace behavioural |
---|
115 | }; // end namespace morpheo |
---|