[78] | 1 | /* |
---|
| 2 | * $Id: Parameters.cpp 110 2009-02-19 16:31:47Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/include/Parameters.h" |
---|
| 9 | #include "Common/include/Max.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace multi_ooo_engine { |
---|
| 15 | namespace ooo_engine { |
---|
| 16 | namespace rename_unit { |
---|
| 17 | namespace load_store_pointer_unit { |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | #undef FUNCTION |
---|
| 21 | #define FUNCTION "Load_Store_pointer_unit::Parameters" |
---|
| 22 | Parameters::Parameters (uint32_t nb_front_end , |
---|
| 23 | uint32_t * nb_context , |
---|
[110] | 24 | // uint32_t size_front_end_id , |
---|
| 25 | // uint32_t size_context_id , |
---|
[78] | 26 | uint32_t nb_load_store_queue , |
---|
| 27 | uint32_t * size_store_queue , |
---|
| 28 | uint32_t * size_load_queue , |
---|
[110] | 29 | uint32_t * nb_inst_memory , |
---|
[78] | 30 | uint32_t ** link_load_store_unit_with_thread, |
---|
| 31 | uint32_t nb_inst_insert , |
---|
[88] | 32 | uint32_t nb_inst_retire , |
---|
| 33 | bool is_toplevel |
---|
| 34 | ) |
---|
[78] | 35 | { |
---|
| 36 | log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"Begin"); |
---|
| 37 | |
---|
| 38 | _nb_front_end = nb_front_end ; |
---|
| 39 | _nb_context = nb_context ; |
---|
| 40 | _nb_load_store_queue = nb_load_store_queue ; |
---|
| 41 | _size_store_queue = size_store_queue ; |
---|
| 42 | _size_load_queue = size_load_queue ; |
---|
[110] | 43 | _nb_inst_memory = nb_inst_memory ; |
---|
[78] | 44 | _link_load_store_unit_with_thread = link_load_store_unit_with_thread; |
---|
| 45 | _nb_inst_insert = nb_inst_insert ; |
---|
| 46 | _nb_inst_retire = nb_inst_retire ; |
---|
[110] | 47 | |
---|
[88] | 48 | test(); |
---|
[78] | 49 | |
---|
[110] | 50 | _max_size_store_queue = max<uint32_t>(_size_store_queue,_nb_load_store_queue); |
---|
| 51 | _max_size_load_queue = max<uint32_t>(_size_load_queue ,_nb_load_store_queue); |
---|
| 52 | |
---|
[88] | 53 | if (is_toplevel) |
---|
| 54 | { |
---|
| 55 | _size_front_end_id = log2(_nb_front_end); |
---|
| 56 | _size_context_id = log2(max<uint32_t>(_nb_context,_nb_front_end)); |
---|
| 57 | _size_store_queue_ptr = log2(max<uint32_t>(size_store_queue, nb_load_store_queue)); |
---|
| 58 | _size_load_queue_ptr = log2(max<uint32_t>(size_load_queue, nb_load_store_queue)); |
---|
| 59 | |
---|
| 60 | _have_port_front_end_id = (_size_front_end_id > 0); |
---|
| 61 | _have_port_context_id = (_size_context_id > 0); |
---|
| 62 | _have_port_load_queue_ptr = (_size_load_queue_ptr > 0); |
---|
[78] | 63 | |
---|
[88] | 64 | copy(); |
---|
| 65 | } |
---|
| 66 | |
---|
[78] | 67 | log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"End"); |
---|
| 68 | }; |
---|
| 69 | |
---|
| 70 | // #undef FUNCTION |
---|
| 71 | // #define FUNCTION "Load_Store_pointer_unit::Parameters (copy)" |
---|
| 72 | // Parameters::Parameters (Parameters & param) |
---|
| 73 | // { |
---|
| 74 | // log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"Begin"); |
---|
| 75 | // test(); |
---|
| 76 | // log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"End"); |
---|
| 77 | // }; |
---|
| 78 | |
---|
| 79 | #undef FUNCTION |
---|
| 80 | #define FUNCTION "Load_Store_pointer_unit::~Parameters" |
---|
[88] | 81 | Parameters::~Parameters (void) |
---|
[78] | 82 | { |
---|
| 83 | log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"Begin"); |
---|
| 84 | log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"End"); |
---|
| 85 | }; |
---|
| 86 | |
---|
[88] | 87 | #undef FUNCTION |
---|
| 88 | #define FUNCTION "Load_Store_pointer_unit::copy" |
---|
| 89 | void Parameters::copy (void) |
---|
| 90 | { |
---|
| 91 | log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"Begin"); |
---|
| 92 | log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"End"); |
---|
| 93 | }; |
---|
| 94 | |
---|
[78] | 95 | }; // end namespace load_store_pointer_unit |
---|
| 96 | }; // end namespace rename_unit |
---|
| 97 | }; // end namespace ooo_engine |
---|
| 98 | }; // end namespace multi_ooo_engine |
---|
| 99 | }; // end namespace core |
---|
| 100 | |
---|
| 101 | }; // end namespace behavioural |
---|
| 102 | }; // end namespace morpheo |
---|