[78] | 1 | /* |
---|
| 2 | * $Id: Parameters.cpp 85 2008-05-14 13:09:48Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/include/Parameters.h" |
---|
| 9 | |
---|
| 10 | namespace morpheo { |
---|
| 11 | namespace behavioural { |
---|
| 12 | namespace core { |
---|
| 13 | namespace multi_front_end { |
---|
| 14 | namespace front_end { |
---|
| 15 | namespace ifetch_unit { |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | #undef FUNCTION |
---|
| 19 | #define FUNCTION "Ifetch_unit::Parameters" |
---|
| 20 | Parameters::Parameters (uint32_t size_queue , |
---|
| 21 | uint32_t nb_instruction , |
---|
| 22 | uint32_t size_branch_update_prediction, |
---|
| 23 | uint32_t size_address ) |
---|
| 24 | { |
---|
| 25 | log_printf(FUNC,Ifetch_unit,FUNCTION,"Begin"); |
---|
| 26 | |
---|
| 27 | _size_queue = size_queue ; |
---|
| 28 | _nb_instruction = nb_instruction ; |
---|
| 29 | _size_branch_update_prediction = size_branch_update_prediction; |
---|
| 30 | _size_address = size_address ; |
---|
| 31 | |
---|
| 32 | _size_queue_ptr = log2(size_queue); |
---|
| 33 | _size_instruction_ptr = log2(nb_instruction); |
---|
| 34 | |
---|
| 35 | _have_port_queue_ptr = _size_queue_ptr > 0; |
---|
| 36 | _have_port_instruction_ptr = _size_instruction_ptr > 0; |
---|
| 37 | _have_port_branch_update_prediction_id = size_branch_update_prediction > 0; |
---|
| 38 | |
---|
| 39 | test(); |
---|
| 40 | |
---|
| 41 | _param_address_management = new morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::address_management::Parameters |
---|
| 42 | (nb_instruction , |
---|
| 43 | size_address , |
---|
| 44 | size_branch_update_prediction); |
---|
| 45 | _param_ifetch_queue = new morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_queue:: Parameters |
---|
| 46 | (size_queue , |
---|
| 47 | nb_instruction , |
---|
| 48 | size_branch_update_prediction, |
---|
| 49 | size_address ); |
---|
| 50 | _param_ifetch_unit_glue = new morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_unit_glue:: Parameters |
---|
[85] | 51 | (size_address); |
---|
[78] | 52 | |
---|
| 53 | log_printf(FUNC,Ifetch_unit,FUNCTION,"End"); |
---|
| 54 | }; |
---|
| 55 | |
---|
| 56 | // #undef FUNCTION |
---|
| 57 | // #define FUNCTION "Ifetch_unit::Parameters (copy)" |
---|
| 58 | // Parameters::Parameters (Parameters & param) |
---|
| 59 | // { |
---|
| 60 | // log_printf(FUNC,Ifetch_unit,FUNCTION,"Begin"); |
---|
| 61 | // test(); |
---|
| 62 | // log_printf(FUNC,Ifetch_unit,FUNCTION,"End"); |
---|
| 63 | // }; |
---|
| 64 | |
---|
| 65 | #undef FUNCTION |
---|
| 66 | #define FUNCTION "Ifetch_unit::~Parameters" |
---|
| 67 | Parameters::~Parameters () |
---|
| 68 | { |
---|
| 69 | log_printf(FUNC,Ifetch_unit,FUNCTION,"Begin"); |
---|
| 70 | delete _param_address_management; |
---|
| 71 | delete _param_ifetch_queue ; |
---|
| 72 | delete _param_ifetch_unit_glue ; |
---|
| 73 | log_printf(FUNC,Ifetch_unit,FUNCTION,"End"); |
---|
| 74 | }; |
---|
| 75 | |
---|
| 76 | }; // end namespace ifetch_unit |
---|
| 77 | }; // end namespace front_end |
---|
| 78 | }; // end namespace multi_front_end |
---|
| 79 | }; // end namespace core |
---|
| 80 | |
---|
| 81 | }; // end namespace behavioural |
---|
| 82 | }; // end namespace morpheo |
---|