[78] | 1 | /* |
---|
| 2 | * $Id: Parameters.cpp 95 2008-12-16 16:24:26Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/include/Parameters.h" |
---|
| 9 | #include "Common/include/Max.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace multi_front_end { |
---|
| 15 | namespace front_end { |
---|
| 16 | namespace prediction_unit { |
---|
| 17 | namespace return_address_stack { |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | #undef FUNCTION |
---|
| 21 | #define FUNCTION "Return_Address_Stack::Parameters" |
---|
| 22 | Parameters::Parameters (uint32_t nb_context , |
---|
| 23 | uint32_t * size_queue , |
---|
| 24 | uint32_t size_address , |
---|
| 25 | uint32_t nb_inst_predict, |
---|
| 26 | uint32_t nb_inst_decod , |
---|
[88] | 27 | uint32_t nb_inst_update , |
---|
| 28 | bool is_toplevel |
---|
| 29 | ) |
---|
[78] | 30 | { |
---|
| 31 | log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin"); |
---|
| 32 | |
---|
| 33 | _nb_context = nb_context ; |
---|
| 34 | _size_queue = size_queue ; |
---|
| 35 | _nb_inst_predict = nb_inst_predict; |
---|
| 36 | _nb_inst_decod = nb_inst_decod ; |
---|
| 37 | _nb_inst_update = nb_inst_update ; |
---|
| 38 | |
---|
[95] | 39 | _size_index = log2(max<uint32_t>(size_queue,nb_context)); |
---|
[78] | 40 | |
---|
[88] | 41 | test(); |
---|
[78] | 42 | |
---|
[88] | 43 | if (is_toplevel) |
---|
| 44 | { |
---|
| 45 | _size_instruction_address = size_address ; |
---|
| 46 | _size_context_id = log2(nb_context); |
---|
| 47 | _have_port_context_id = _size_context_id > 0; |
---|
| 48 | |
---|
| 49 | copy (); |
---|
| 50 | } |
---|
| 51 | |
---|
[78] | 52 | log_printf(FUNC,Return_Address_Stack,FUNCTION,"End"); |
---|
| 53 | }; |
---|
| 54 | |
---|
| 55 | // #undef FUNCTION |
---|
| 56 | // #define FUNCTION "Return_Address_Stack::Parameters (copy)" |
---|
| 57 | // Parameters::Parameters (Parameters & param) |
---|
| 58 | // { |
---|
| 59 | // log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin"); |
---|
| 60 | // test(); |
---|
| 61 | // log_printf(FUNC,Return_Address_Stack,FUNCTION,"End"); |
---|
| 62 | // }; |
---|
| 63 | |
---|
| 64 | #undef FUNCTION |
---|
| 65 | #define FUNCTION "Return_Address_Stack::~Parameters" |
---|
| 66 | Parameters::~Parameters () |
---|
| 67 | { |
---|
| 68 | log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin"); |
---|
| 69 | log_printf(FUNC,Return_Address_Stack,FUNCTION,"End"); |
---|
| 70 | }; |
---|
| 71 | |
---|
[88] | 72 | #undef FUNCTION |
---|
| 73 | #define FUNCTION "Return_Address_Stack::copy" |
---|
| 74 | void Parameters::copy (void) |
---|
| 75 | { |
---|
| 76 | log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin"); |
---|
| 77 | log_printf(FUNC,Return_Address_Stack,FUNCTION,"End"); |
---|
| 78 | }; |
---|
| 79 | |
---|
[78] | 80 | }; // end namespace return_address_stack |
---|
| 81 | }; // end namespace prediction_unit |
---|
| 82 | }; // end namespace front_end |
---|
| 83 | }; // end namespace multi_front_end |
---|
| 84 | }; // end namespace core |
---|
| 85 | |
---|
| 86 | }; // end namespace behavioural |
---|
| 87 | }; // end namespace morpheo |
---|