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