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