[78] | 1 | /* |
---|
| 2 | * $Id: Parameters.cpp 88 2008-12-10 18:31:39Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/include/Parameters.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 direction_glue { |
---|
| 18 | |
---|
| 19 | #undef FUNCTION |
---|
| 20 | #define FUNCTION "Direction_Glue::Parameters" |
---|
| 21 | Parameters::Parameters (Tpredictor_t predictor_scheme, |
---|
| 22 | uint32_t nb_inst_predict , |
---|
| 23 | uint32_t nb_inst_update , |
---|
| 24 | uint32_t size_address , |
---|
[88] | 25 | uint32_t size_history , |
---|
| 26 | bool is_toplevel ) |
---|
[78] | 27 | { |
---|
| 28 | log_printf(FUNC,Direction_Glue,FUNCTION,"Begin"); |
---|
| 29 | |
---|
| 30 | _predictor_scheme = predictor_scheme; |
---|
| 31 | _nb_inst_predict = nb_inst_predict ; |
---|
| 32 | _nb_inst_update = nb_inst_update ; |
---|
| 33 | |
---|
| 34 | switch (predictor_scheme) |
---|
| 35 | { |
---|
| 36 | case PREDICTOR_NEVER_TAKE : |
---|
| 37 | case PREDICTOR_ALWAYS_TAKE : |
---|
| 38 | case PREDICTOR_STATIC : |
---|
| 39 | case PREDICTOR_LAST_TAKE : |
---|
| 40 | { |
---|
| 41 | _have_component_meta_predictor = false; |
---|
| 42 | break; |
---|
| 43 | } |
---|
| 44 | case PREDICTOR_COUNTER : |
---|
| 45 | case PREDICTOR_LOCAL : |
---|
| 46 | case PREDICTOR_GLOBAL : |
---|
| 47 | case PREDICTOR_META : |
---|
| 48 | case PREDICTOR_CUSTOM : |
---|
| 49 | { |
---|
| 50 | _have_component_meta_predictor = true; |
---|
| 51 | break; |
---|
| 52 | } |
---|
| 53 | } |
---|
| 54 | |
---|
| 55 | _size_history = (_have_component_meta_predictor)?size_history:0; |
---|
| 56 | |
---|
| 57 | _have_port_history = (_size_history>0); |
---|
| 58 | |
---|
| 59 | test(); |
---|
[88] | 60 | |
---|
| 61 | if (is_toplevel) |
---|
| 62 | { |
---|
| 63 | _size_instruction_address = size_address; |
---|
| 64 | |
---|
| 65 | copy(); |
---|
| 66 | } |
---|
| 67 | |
---|
[78] | 68 | log_printf(FUNC,Direction_Glue,FUNCTION,"End"); |
---|
| 69 | }; |
---|
| 70 | |
---|
| 71 | // #undef FUNCTION |
---|
| 72 | // #define FUNCTION "Direction_Glue::Parameters (copy)" |
---|
| 73 | // Parameters::Parameters (Parameters & param) |
---|
| 74 | // { |
---|
| 75 | // log_printf(FUNC,Direction_Glue,FUNCTION,"Begin"); |
---|
| 76 | // test(); |
---|
| 77 | // log_printf(FUNC,Direction_Glue,FUNCTION,"End"); |
---|
| 78 | // }; |
---|
| 79 | |
---|
| 80 | #undef FUNCTION |
---|
| 81 | #define FUNCTION "Direction_Glue::~Parameters" |
---|
| 82 | Parameters::~Parameters () |
---|
| 83 | { |
---|
| 84 | log_printf(FUNC,Direction_Glue,FUNCTION,"Begin"); |
---|
| 85 | log_printf(FUNC,Direction_Glue,FUNCTION,"End"); |
---|
| 86 | }; |
---|
| 87 | |
---|
[88] | 88 | #undef FUNCTION |
---|
| 89 | #define FUNCTION "Direction_Glue::copy" |
---|
| 90 | void Parameters::copy (void) |
---|
| 91 | { |
---|
| 92 | log_printf(FUNC,Direction_Glue,FUNCTION,"Begin"); |
---|
| 93 | log_printf(FUNC,Direction_Glue,FUNCTION,"End"); |
---|
| 94 | }; |
---|
| 95 | |
---|
| 96 | |
---|
| 97 | |
---|
[78] | 98 | }; // end namespace direction_glue |
---|
| 99 | }; // end namespace direction |
---|
| 100 | }; // end namespace prediction_unit |
---|
| 101 | }; // end namespace front_end |
---|
| 102 | }; // end namespace multi_front_end |
---|
| 103 | }; // end namespace core |
---|
| 104 | |
---|
| 105 | }; // end namespace behavioural |
---|
| 106 | }; // end namespace morpheo |
---|