[78] | 1 | /* |
---|
| 2 | * $Id: Parameters.cpp 109 2009-02-16 20:28:31Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/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 | namespace ifetch_queue { |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | #undef FUNCTION |
---|
| 20 | #define FUNCTION "Ifetch_queue::Parameters" |
---|
| 21 | Parameters::Parameters (uint32_t size_queue , |
---|
| 22 | uint32_t nb_instruction , |
---|
| 23 | uint32_t size_branch_update_prediction, |
---|
[88] | 24 | uint32_t size_general_data , |
---|
| 25 | bool is_toplevel) |
---|
[78] | 26 | { |
---|
| 27 | log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin"); |
---|
| 28 | |
---|
[109] | 29 | _nb_instruction_in_queue = size_queue ; |
---|
| 30 | _size_queue = size_queue/nb_instruction ; |
---|
[78] | 31 | _nb_instruction = nb_instruction ; |
---|
[88] | 32 | // _size_branch_update_prediction = size_branch_update_prediction; |
---|
| 33 | // _size_general_data = size_general_data ; |
---|
[78] | 34 | |
---|
[88] | 35 | test(); |
---|
[78] | 36 | |
---|
[88] | 37 | if (is_toplevel) |
---|
| 38 | { |
---|
| 39 | _size_instruction_address = size_general_data; |
---|
| 40 | _size_ifetch_queue_ptr = log2(size_queue); |
---|
| 41 | _size_inst_ifetch_ptr = log2(nb_instruction); |
---|
| 42 | _size_depth = size_branch_update_prediction; |
---|
| 43 | |
---|
| 44 | _have_port_ifetch_queue_ptr = _size_ifetch_queue_ptr > 0; |
---|
| 45 | _have_port_inst_ifetch_ptr = _size_inst_ifetch_ptr > 0; |
---|
| 46 | _have_port_depth = _size_depth > 0; |
---|
| 47 | |
---|
| 48 | copy (); |
---|
| 49 | } |
---|
| 50 | |
---|
[78] | 51 | log_printf(FUNC,Ifetch_queue,FUNCTION,"End"); |
---|
| 52 | }; |
---|
| 53 | |
---|
| 54 | // #undef FUNCTION |
---|
| 55 | // #define FUNCTION "Ifetch_queue::Parameters (copy)" |
---|
| 56 | // Parameters::Parameters (Parameters & param) |
---|
| 57 | // { |
---|
| 58 | // log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin"); |
---|
| 59 | // test(); |
---|
| 60 | // log_printf(FUNC,Ifetch_queue,FUNCTION,"End"); |
---|
| 61 | // }; |
---|
| 62 | |
---|
| 63 | #undef FUNCTION |
---|
| 64 | #define FUNCTION "Ifetch_queue::~Parameters" |
---|
| 65 | Parameters::~Parameters () |
---|
| 66 | { |
---|
| 67 | log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin"); |
---|
| 68 | log_printf(FUNC,Ifetch_queue,FUNCTION,"End"); |
---|
| 69 | }; |
---|
| 70 | |
---|
[88] | 71 | #undef FUNCTION |
---|
| 72 | #define FUNCTION "Ifetch_queue::copy" |
---|
| 73 | void Parameters::copy (void) |
---|
| 74 | { |
---|
| 75 | log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin"); |
---|
| 76 | log_printf(FUNC,Ifetch_queue,FUNCTION,"End"); |
---|
| 77 | }; |
---|
| 78 | |
---|
[78] | 79 | }; // end namespace ifetch_queue |
---|
| 80 | }; // end namespace ifetch_unit |
---|
| 81 | }; // end namespace front_end |
---|
| 82 | }; // end namespace multi_front_end |
---|
| 83 | }; // end namespace core |
---|
| 84 | |
---|
| 85 | }; // end namespace behavioural |
---|
| 86 | }; // end namespace morpheo |
---|