[82] | 1 | /* |
---|
| 2 | * $Id: Parameters.cpp 82 2008-05-01 16:48:45Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/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 decod_unit { |
---|
| 17 | namespace decod_queue { |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | #undef FUNCTION |
---|
| 21 | #define FUNCTION "Decod_queue::Parameters" |
---|
| 22 | Parameters::Parameters (uint32_t nb_context , |
---|
| 23 | uint32_t nb_inst_decod , |
---|
| 24 | uint32_t size_queue , |
---|
| 25 | uint32_t size_general_data , |
---|
| 26 | uint32_t * nb_branch_speculated) |
---|
| 27 | { |
---|
| 28 | log_begin(Decod_queue,FUNCTION); |
---|
| 29 | |
---|
| 30 | _nb_context = nb_context ; |
---|
| 31 | _nb_inst_decod = nb_inst_decod ; |
---|
| 32 | _size_queue = size_queue ; |
---|
| 33 | _size_general_data = size_general_data ; |
---|
| 34 | _nb_branch_speculated = nb_branch_speculated; |
---|
| 35 | |
---|
| 36 | _nb_bank = _nb_inst_decod ; |
---|
| 37 | _size_bank = _size_queue / _nb_bank; |
---|
| 38 | |
---|
| 39 | _size_context_id = log2(nb_context); |
---|
| 40 | _size_depth = log2(max<uint32_t>(_nb_branch_speculated,_nb_context)); |
---|
| 41 | _size_nb_inst = log2(_size_queue); |
---|
| 42 | |
---|
| 43 | _have_port_context_id = (_size_context_id > 0); |
---|
| 44 | _have_port_depth = (_size_depth > 0); |
---|
| 45 | |
---|
| 46 | test(); |
---|
| 47 | log_end(Decod_queue,FUNCTION); |
---|
| 48 | }; |
---|
| 49 | |
---|
| 50 | // #undef FUNCTION |
---|
| 51 | // #define FUNCTION "Decod_queue::Parameters (copy)" |
---|
| 52 | // Parameters::Parameters (Parameters & param) |
---|
| 53 | // { |
---|
| 54 | // log_begin(Decod_queue,FUNCTION); |
---|
| 55 | // test(); |
---|
| 56 | // log_end(Decod_queue,FUNCTION); |
---|
| 57 | // }; |
---|
| 58 | |
---|
| 59 | #undef FUNCTION |
---|
| 60 | #define FUNCTION "Decod_queue::~Parameters" |
---|
| 61 | Parameters::~Parameters () |
---|
| 62 | { |
---|
| 63 | log_begin(Decod_queue,FUNCTION); |
---|
| 64 | log_end(Decod_queue,FUNCTION); |
---|
| 65 | }; |
---|
| 66 | |
---|
| 67 | }; // end namespace decod_queue |
---|
| 68 | }; // end namespace decod_unit |
---|
| 69 | }; // end namespace front_end |
---|
| 70 | }; // end namespace multi_front_end |
---|
| 71 | }; // end namespace core |
---|
| 72 | |
---|
| 73 | }; // end namespace behavioural |
---|
| 74 | }; // end namespace morpheo |
---|