[73] | 1 | /* |
---|
| 2 | * $Id: Parameters.cpp 88 2008-12-10 18:31:39Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Parameters.h" |
---|
| 9 | |
---|
| 10 | namespace morpheo { |
---|
| 11 | namespace behavioural { |
---|
| 12 | namespace core { |
---|
| 13 | namespace multi_execute_loop { |
---|
| 14 | namespace execute_loop { |
---|
| 15 | namespace multi_write_unit { |
---|
| 16 | namespace write_unit { |
---|
| 17 | namespace execute_queue { |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | #undef FUNCTION |
---|
| 21 | #define FUNCTION "Execute_queue::Parameters" |
---|
| 22 | Parameters::Parameters (uint32_t size_queue , |
---|
| 23 | uint32_t nb_context , |
---|
| 24 | uint32_t nb_front_end , |
---|
| 25 | uint32_t nb_ooo_engine , |
---|
| 26 | uint32_t nb_packet , |
---|
| 27 | uint32_t size_general_data , |
---|
[88] | 28 | uint32_t size_special_data , |
---|
| 29 | bool is_toplevel ) |
---|
| 30 | { |
---|
| 31 | log_printf(FUNC,Execute_queue,FUNCTION,"Begin"); |
---|
[73] | 32 | |
---|
[88] | 33 | _size_queue = size_queue ; |
---|
| 34 | _nb_context = nb_context ; |
---|
| 35 | _nb_front_end = nb_front_end ; |
---|
| 36 | _nb_ooo_engine = nb_ooo_engine ; |
---|
| 37 | _nb_packet = nb_packet ; |
---|
[73] | 38 | |
---|
| 39 | test(); |
---|
[88] | 40 | |
---|
| 41 | if (is_toplevel) |
---|
| 42 | { |
---|
| 43 | _size_context_id = log2(_nb_context ); |
---|
| 44 | _size_front_end_id = log2(_nb_front_end ); |
---|
| 45 | _size_ooo_engine_id = log2(_nb_ooo_engine); |
---|
| 46 | _size_rob_ptr = log2(_nb_packet ); |
---|
| 47 | _size_general_data = size_general_data; |
---|
| 48 | _size_special_data = size_special_data; |
---|
| 49 | |
---|
| 50 | _have_port_context_id = _size_context_id > 0; |
---|
| 51 | _have_port_front_end_id = _size_front_end_id > 0; |
---|
| 52 | _have_port_ooo_engine_id = _size_ooo_engine_id > 0; |
---|
| 53 | _have_port_rob_ptr = _size_rob_ptr > 0; |
---|
| 54 | |
---|
| 55 | copy(); |
---|
| 56 | } |
---|
| 57 | |
---|
[73] | 58 | log_printf(FUNC,Execute_queue,FUNCTION,"End"); |
---|
| 59 | }; |
---|
| 60 | |
---|
[88] | 61 | // #undef FUNCTION |
---|
| 62 | // #define FUNCTION "Execute_queue::Parameters (copy)" |
---|
| 63 | // Parameters::Parameters (Parameters & param): |
---|
| 64 | // _size_queue (param._size_queue ), |
---|
| 65 | // _nb_context (param._nb_context ), |
---|
| 66 | // _nb_front_end (param._nb_front_end ), |
---|
| 67 | // _nb_ooo_engine (param._nb_ooo_engine ), |
---|
| 68 | // _nb_packet (param._nb_packet ), |
---|
| 69 | // _size_general_data (param._size_general_data ), |
---|
| 70 | // _size_special_data (param._size_special_data ), |
---|
[73] | 71 | |
---|
[88] | 72 | // _size_context_id (param._size_context_id ), |
---|
| 73 | // _size_front_end_id (param._size_front_end_id ), |
---|
| 74 | // _size_ooo_engine_id (param._size_ooo_engine_id ), |
---|
| 75 | // _size_packet_id (param._size_packet_id ), |
---|
[73] | 76 | |
---|
[88] | 77 | // _have_port_context_id (param._have_port_context_id ), |
---|
| 78 | // _have_port_front_end_id (param._have_port_front_end_id ), |
---|
| 79 | // _have_port_ooo_engine_id (param._have_port_ooo_engine_id), |
---|
| 80 | // _have_port_packet_id (param._have_port_packet_id ) |
---|
| 81 | // { |
---|
| 82 | // log_printf(FUNC,Execute_queue,FUNCTION,"Begin"); |
---|
| 83 | // test(); |
---|
| 84 | // log_printf(FUNC,Execute_queue,FUNCTION,"End"); |
---|
| 85 | // }; |
---|
| 86 | |
---|
| 87 | #undef FUNCTION |
---|
| 88 | #define FUNCTION "Execute_queue::~Parameters" |
---|
| 89 | Parameters::~Parameters (void) |
---|
[73] | 90 | { |
---|
| 91 | log_printf(FUNC,Execute_queue,FUNCTION,"Begin"); |
---|
| 92 | log_printf(FUNC,Execute_queue,FUNCTION,"End"); |
---|
| 93 | }; |
---|
| 94 | |
---|
| 95 | #undef FUNCTION |
---|
[88] | 96 | #define FUNCTION "Execute_queue::copy" |
---|
| 97 | void Parameters::copy (void) |
---|
[73] | 98 | { |
---|
| 99 | log_printf(FUNC,Execute_queue,FUNCTION,"Begin"); |
---|
| 100 | log_printf(FUNC,Execute_queue,FUNCTION,"End"); |
---|
| 101 | }; |
---|
| 102 | |
---|
| 103 | }; // end namespace execute_queue |
---|
| 104 | }; // end namespace write_unit |
---|
| 105 | }; // end namespace multi_write_unit |
---|
| 106 | }; // end namespace execute_loop |
---|
| 107 | }; // end namespace multi_execute_loop |
---|
| 108 | }; // end namespace core |
---|
| 109 | |
---|
| 110 | }; // end namespace behavioural |
---|
| 111 | }; // end namespace morpheo |
---|