[5] | 1 | /* |
---|
| 2 | * $Id: Meta_Predictor.cpp 81 2008-04-15 18:40:01Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
[48] | 8 | #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Meta_Predictor.h" |
---|
[5] | 9 | |
---|
| 10 | namespace morpheo { |
---|
| 11 | namespace behavioural { |
---|
[48] | 12 | namespace core { |
---|
| 13 | namespace multi_front_end { |
---|
| 14 | namespace front_end { |
---|
| 15 | namespace prediction_unit { |
---|
| 16 | namespace direction { |
---|
| 17 | |
---|
[5] | 18 | namespace meta_predictor { |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | #ifdef SYSTEMC |
---|
| 22 | Meta_Predictor::Meta_Predictor (sc_module_name name, |
---|
| 23 | #else |
---|
| 24 | Meta_Predictor::Meta_Predictor (string name, |
---|
| 25 | #endif |
---|
| 26 | #ifdef STATISTICS |
---|
| 27 | morpheo::behavioural::Parameters_Statistics param_statistics, |
---|
| 28 | #endif |
---|
[48] | 29 | morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Parameters param ): |
---|
[5] | 30 | _name (name) |
---|
| 31 | ,_param (param) |
---|
| 32 | #ifdef STATISTICS |
---|
| 33 | ,_param_statistics (param_statistics) |
---|
| 34 | #endif |
---|
| 35 | { |
---|
| 36 | log_printf(FUNC,Meta_Predictor,"Meta_Predictor","Begin"); |
---|
| 37 | |
---|
[44] | 38 | #ifdef SYSTEMC |
---|
| 39 | allocation (); |
---|
| 40 | #endif |
---|
| 41 | |
---|
[5] | 42 | #ifdef STATISTICS |
---|
| 43 | // Allocation of statistics |
---|
| 44 | _stat = new Statistics (static_cast<string>(_name), |
---|
| 45 | param_statistics , |
---|
| 46 | param); |
---|
| 47 | #endif |
---|
| 48 | |
---|
| 49 | #ifdef VHDL |
---|
| 50 | // generate the vhdl |
---|
| 51 | vhdl(); |
---|
| 52 | #endif |
---|
| 53 | |
---|
| 54 | #ifdef SYSTEMC |
---|
| 55 | #if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
| 56 | SC_METHOD (transition); |
---|
| 57 | dont_initialize (); |
---|
| 58 | sensitive_pos << *(in_CLOCK); |
---|
| 59 | #endif |
---|
| 60 | |
---|
| 61 | #ifdef SYSTEMCASS_SPECIFIC |
---|
| 62 | // List dependency information |
---|
| 63 | #endif |
---|
| 64 | |
---|
| 65 | #endif |
---|
| 66 | log_printf(FUNC,Meta_Predictor,"Meta_Predictor","End"); |
---|
| 67 | }; |
---|
| 68 | |
---|
| 69 | Meta_Predictor::~Meta_Predictor (void) |
---|
| 70 | { |
---|
| 71 | log_printf(FUNC,Meta_Predictor,"~Meta_Predictor","Begin"); |
---|
| 72 | |
---|
| 73 | #ifdef STATISTICS |
---|
| 74 | _stat->generate_file(statistics(0)); |
---|
| 75 | |
---|
| 76 | delete _stat; |
---|
| 77 | #endif |
---|
| 78 | |
---|
| 79 | #ifdef SYSTEMC |
---|
| 80 | deallocation (); |
---|
| 81 | #endif |
---|
| 82 | |
---|
| 83 | log_printf(FUNC,Meta_Predictor,"~Meta_Predictor","End"); |
---|
| 84 | }; |
---|
| 85 | |
---|
| 86 | }; // end namespace meta_predictor |
---|
| 87 | |
---|
[48] | 88 | }; // end namespace core |
---|
| 89 | }; // end namespace multi_front_end |
---|
| 90 | }; // end namespace front_end |
---|
| 91 | }; // end namespace prediction_unit |
---|
| 92 | }; // end namespace direction |
---|
| 93 | |
---|
| 94 | |
---|
[5] | 95 | }; // end namespace behavioural |
---|
| 96 | }; // end namespace morpheo |
---|