[78] | 1 | /* |
---|
| 2 | * $Id: Parameters.cpp 81 2008-04-15 18:40:01Z 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 , |
---|
| 27 | uint32_t nb_inst_update ) |
---|
| 28 | { |
---|
| 29 | log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin"); |
---|
| 30 | |
---|
| 31 | _nb_context = nb_context ; |
---|
| 32 | _size_queue = size_queue ; |
---|
| 33 | _size_address = size_address ; |
---|
| 34 | _nb_inst_predict = nb_inst_predict; |
---|
| 35 | _nb_inst_decod = nb_inst_decod ; |
---|
| 36 | _nb_inst_update = nb_inst_update ; |
---|
| 37 | |
---|
| 38 | _size_context_id = log2(nb_context); |
---|
| 39 | _size_index = max<uint32_t>(size_queue,nb_context); |
---|
| 40 | |
---|
| 41 | _have_port_context_id = _size_context_id > 0; |
---|
| 42 | |
---|
| 43 | test(); |
---|
| 44 | log_printf(FUNC,Return_Address_Stack,FUNCTION,"End"); |
---|
| 45 | }; |
---|
| 46 | |
---|
| 47 | // #undef FUNCTION |
---|
| 48 | // #define FUNCTION "Return_Address_Stack::Parameters (copy)" |
---|
| 49 | // Parameters::Parameters (Parameters & param) |
---|
| 50 | // { |
---|
| 51 | // log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin"); |
---|
| 52 | // test(); |
---|
| 53 | // log_printf(FUNC,Return_Address_Stack,FUNCTION,"End"); |
---|
| 54 | // }; |
---|
| 55 | |
---|
| 56 | #undef FUNCTION |
---|
| 57 | #define FUNCTION "Return_Address_Stack::~Parameters" |
---|
| 58 | Parameters::~Parameters () |
---|
| 59 | { |
---|
| 60 | log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin"); |
---|
| 61 | log_printf(FUNC,Return_Address_Stack,FUNCTION,"End"); |
---|
| 62 | }; |
---|
| 63 | |
---|
| 64 | }; // end namespace return_address_stack |
---|
| 65 | }; // end namespace prediction_unit |
---|
| 66 | }; // end namespace front_end |
---|
| 67 | }; // end namespace multi_front_end |
---|
| 68 | }; // end namespace core |
---|
| 69 | |
---|
| 70 | }; // end namespace behavioural |
---|
| 71 | }; // end namespace morpheo |
---|