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