[78] | 1 | /* |
---|
| 2 | * $Id: Parameters.cpp 88 2008-12-10 18:31:39Z 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 , |
---|
[88] | 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 , |
---|
| 29 | uint32_t ** link_load_store_unit_with_thread, |
---|
| 30 | uint32_t nb_inst_insert , |
---|
[88] | 31 | uint32_t nb_inst_retire , |
---|
| 32 | bool is_toplevel |
---|
| 33 | ) |
---|
[78] | 34 | { |
---|
| 35 | log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"Begin"); |
---|
| 36 | |
---|
| 37 | _nb_front_end = nb_front_end ; |
---|
| 38 | _nb_context = nb_context ; |
---|
| 39 | _nb_load_store_queue = nb_load_store_queue ; |
---|
| 40 | _size_store_queue = size_store_queue ; |
---|
| 41 | _size_load_queue = size_load_queue ; |
---|
| 42 | _link_load_store_unit_with_thread = link_load_store_unit_with_thread; |
---|
| 43 | _nb_inst_insert = nb_inst_insert ; |
---|
| 44 | _nb_inst_retire = nb_inst_retire ; |
---|
| 45 | |
---|
[88] | 46 | test(); |
---|
[78] | 47 | |
---|
[88] | 48 | if (is_toplevel) |
---|
| 49 | { |
---|
| 50 | _size_front_end_id = log2(_nb_front_end); |
---|
| 51 | _size_context_id = log2(max<uint32_t>(_nb_context,_nb_front_end)); |
---|
| 52 | _size_store_queue_ptr = log2(max<uint32_t>(size_store_queue, nb_load_store_queue)); |
---|
| 53 | _size_load_queue_ptr = log2(max<uint32_t>(size_load_queue, nb_load_store_queue)); |
---|
| 54 | |
---|
| 55 | _have_port_front_end_id = (_size_front_end_id > 0); |
---|
| 56 | _have_port_context_id = (_size_context_id > 0); |
---|
| 57 | _have_port_load_queue_ptr = (_size_load_queue_ptr > 0); |
---|
[78] | 58 | |
---|
[88] | 59 | copy(); |
---|
| 60 | } |
---|
| 61 | |
---|
[78] | 62 | log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"End"); |
---|
| 63 | }; |
---|
| 64 | |
---|
| 65 | // #undef FUNCTION |
---|
| 66 | // #define FUNCTION "Load_Store_pointer_unit::Parameters (copy)" |
---|
| 67 | // Parameters::Parameters (Parameters & param) |
---|
| 68 | // { |
---|
| 69 | // log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"Begin"); |
---|
| 70 | // test(); |
---|
| 71 | // log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"End"); |
---|
| 72 | // }; |
---|
| 73 | |
---|
| 74 | #undef FUNCTION |
---|
| 75 | #define FUNCTION "Load_Store_pointer_unit::~Parameters" |
---|
[88] | 76 | Parameters::~Parameters (void) |
---|
[78] | 77 | { |
---|
| 78 | log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"Begin"); |
---|
| 79 | log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"End"); |
---|
| 80 | }; |
---|
| 81 | |
---|
[88] | 82 | #undef FUNCTION |
---|
| 83 | #define FUNCTION "Load_Store_pointer_unit::copy" |
---|
| 84 | void Parameters::copy (void) |
---|
| 85 | { |
---|
| 86 | log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"Begin"); |
---|
| 87 | log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"End"); |
---|
| 88 | }; |
---|
| 89 | |
---|
[78] | 90 | }; // end namespace load_store_pointer_unit |
---|
| 91 | }; // end namespace rename_unit |
---|
| 92 | }; // end namespace ooo_engine |
---|
| 93 | }; // end namespace multi_ooo_engine |
---|
| 94 | }; // end namespace core |
---|
| 95 | |
---|
| 96 | }; // end namespace behavioural |
---|
| 97 | }; // end namespace morpheo |
---|