[77] | 1 | /* |
---|
| 2 | * $Id: Parameters.cpp 120 2009-05-26 19:01:47Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/include/Parameters.h" |
---|
[88] | 9 | #include "Common/include/Max.h" |
---|
[77] | 10 | namespace morpheo { |
---|
| 11 | namespace behavioural { |
---|
| 12 | namespace core { |
---|
| 13 | namespace multi_execute_loop { |
---|
| 14 | namespace execute_loop { |
---|
| 15 | namespace network { |
---|
| 16 | namespace execution_unit_to_write_unit { |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | #undef FUNCTION |
---|
| 20 | #define FUNCTION "Execution_unit_to_Write_unit::Parameters" |
---|
| 21 | Parameters::Parameters (uint32_t nb_execute_unit , |
---|
[88] | 22 | uint32_t * nb_execute_unit_port ,//[nb_execute_unit] |
---|
[77] | 23 | uint32_t nb_write_unit , |
---|
| 24 | uint32_t nb_context , |
---|
| 25 | uint32_t nb_front_end , |
---|
| 26 | uint32_t nb_ooo_engine , |
---|
| 27 | uint32_t nb_packet , |
---|
| 28 | uint32_t size_general_data , |
---|
| 29 | uint32_t size_special_data , |
---|
| 30 | uint32_t nb_general_register , |
---|
| 31 | uint32_t nb_special_register , |
---|
| 32 | Tpriority_t priority , |
---|
[88] | 33 | bool *** table_routing ,//[nb_execute_unit][nb_execute_unit_port][nb_write_unit] |
---|
| 34 | bool ** table_thread ,//[nb_write_unit][nb_thread] |
---|
[120] | 35 | bool * num_thread_valid ,//[nb_thread] |
---|
[88] | 36 | bool is_toplevel ) |
---|
[77] | 37 | { |
---|
| 38 | log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin"); |
---|
| 39 | |
---|
[88] | 40 | _nb_execute_unit = nb_execute_unit ; |
---|
| 41 | _nb_execute_unit_port = nb_execute_unit_port; |
---|
| 42 | _nb_write_unit = nb_write_unit ; |
---|
| 43 | _nb_context = nb_context ; |
---|
| 44 | _nb_front_end = nb_front_end ; |
---|
| 45 | _nb_ooo_engine = nb_ooo_engine ; |
---|
| 46 | _nb_packet = nb_packet ; |
---|
| 47 | _nb_general_register = nb_general_register ; |
---|
| 48 | _nb_special_register = nb_special_register ; |
---|
| 49 | _priority = priority ; |
---|
| 50 | _table_routing = table_routing ; |
---|
| 51 | _table_thread = table_thread ; |
---|
[120] | 52 | _num_thread_valid = num_thread_valid ; |
---|
[77] | 53 | |
---|
[88] | 54 | _max_nb_execute_unit_port= max<uint32_t>(_nb_execute_unit_port, _nb_execute_unit); |
---|
| 55 | |
---|
| 56 | _nb_thread = get_nb_thread (nb_context, nb_front_end, nb_ooo_engine); |
---|
| 57 | |
---|
[77] | 58 | test(); |
---|
[88] | 59 | |
---|
| 60 | if (is_toplevel) |
---|
| 61 | { |
---|
[97] | 62 | _size_instruction_address= size_general_data-2; |
---|
[88] | 63 | _size_context_id = log2(nb_context ); |
---|
| 64 | _size_front_end_id = log2(nb_front_end ); |
---|
| 65 | _size_ooo_engine_id = log2(nb_ooo_engine ); |
---|
| 66 | _size_rob_ptr = log2(nb_packet ); |
---|
| 67 | _size_general_register = log2(nb_general_register); |
---|
| 68 | _size_special_register = log2(nb_special_register); |
---|
| 69 | _size_general_data = size_general_data ; |
---|
| 70 | _size_special_data = size_special_data ; |
---|
| 71 | |
---|
| 72 | _have_port_context_id = _size_context_id > 0; |
---|
| 73 | _have_port_front_end_id = _size_front_end_id > 0; |
---|
| 74 | _have_port_ooo_engine_id = _size_ooo_engine_id > 0; |
---|
| 75 | _have_port_rob_ptr = _size_rob_ptr > 0; |
---|
| 76 | |
---|
| 77 | copy(); |
---|
| 78 | } |
---|
| 79 | |
---|
[77] | 80 | log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End"); |
---|
| 81 | }; |
---|
| 82 | |
---|
[88] | 83 | // #undef FUNCTION |
---|
| 84 | // #define FUNCTION "Execution_unit_to_Write_unit::Parameters (copy)" |
---|
| 85 | // Parameters::Parameters (Parameters & param) |
---|
| 86 | // { |
---|
| 87 | // log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin"); |
---|
[77] | 88 | |
---|
[88] | 89 | // test(); |
---|
| 90 | // log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End"); |
---|
| 91 | // }; |
---|
[77] | 92 | |
---|
[88] | 93 | #undef FUNCTION |
---|
| 94 | #define FUNCTION "Execution_unit_to_Write_unit::~Parameters" |
---|
| 95 | Parameters::~Parameters (void) |
---|
[77] | 96 | { |
---|
| 97 | log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin"); |
---|
| 98 | log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End"); |
---|
| 99 | }; |
---|
| 100 | |
---|
| 101 | #undef FUNCTION |
---|
[88] | 102 | #define FUNCTION "Execution_unit_to_Write_unit::copy" |
---|
| 103 | void Parameters::copy (void) |
---|
[77] | 104 | { |
---|
| 105 | log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin"); |
---|
| 106 | log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End"); |
---|
| 107 | }; |
---|
| 108 | |
---|
| 109 | }; // end namespace execution_unit_to_write_unit |
---|
| 110 | }; // end namespace network |
---|
| 111 | }; // end namespace execute_loop |
---|
| 112 | }; // end namespace multi_execute_loop |
---|
| 113 | }; // end namespace core |
---|
| 114 | |
---|
| 115 | }; // end namespace behavioural |
---|
| 116 | }; // end namespace morpheo |
---|