[59] | 1 | /* |
---|
| 2 | * $Id$ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/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_execute_unit { |
---|
| 16 | namespace execute_unit { |
---|
| 17 | namespace load_store_unit { |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | #undef FUNCTION |
---|
| 21 | #define FUNCTION "Load_store_unit::Parameters" |
---|
| 22 | Parameters::Parameters (uint32_t size_store_queue , |
---|
| 23 | uint32_t size_load_queue , |
---|
[71] | 24 | uint32_t size_speculative_access_queue, |
---|
[59] | 25 | uint32_t nb_port_check , |
---|
| 26 | Tspeculative_load_t speculative_load , |
---|
| 27 | uint32_t nb_context , |
---|
[71] | 28 | uint32_t nb_front_end , |
---|
| 29 | uint32_t nb_ooo_engine , |
---|
[59] | 30 | uint32_t nb_packet , |
---|
| 31 | uint32_t size_general_data , |
---|
[77] | 32 | uint32_t nb_general_register ): |
---|
[59] | 33 | _size_store_queue (size_store_queue ), |
---|
| 34 | _size_load_queue (size_load_queue ), |
---|
| 35 | _size_speculative_access_queue (size_speculative_access_queue), |
---|
| 36 | _nb_port_check (nb_port_check ), |
---|
| 37 | _speculative_load (speculative_load ), |
---|
| 38 | _nb_context (nb_context ), |
---|
[71] | 39 | _nb_front_end (nb_front_end ), |
---|
| 40 | _nb_ooo_engine (nb_ooo_engine ), |
---|
[59] | 41 | _nb_packet (nb_packet ), |
---|
| 42 | _size_general_data (size_general_data ), |
---|
| 43 | _nb_general_register (nb_general_register ), |
---|
| 44 | |
---|
[71] | 45 | _size_address_store_queue (log2(size_store_queue )), |
---|
| 46 | _size_address_load_queue (log2(size_load_queue )), |
---|
| 47 | _size_address_speculative_access_queue (log2(size_speculative_access_queue)), |
---|
[59] | 48 | |
---|
[71] | 49 | _size_context_id (log2(nb_context )), |
---|
| 50 | _size_front_end_id (log2(nb_front_end )), |
---|
| 51 | _size_ooo_engine_id (log2(nb_ooo_engine )), |
---|
| 52 | _size_packet_id (log2(nb_packet )), |
---|
| 53 | _size_general_register (log2(nb_general_register)), |
---|
| 54 | _size_dcache_context_id (_size_context_id + _size_front_end_id + _size_ooo_engine_id), |
---|
| 55 | _size_dcache_packet_id ((log2((size_store_queue>size_load_queue)?size_store_queue:size_load_queue))+1), |
---|
| 56 | |
---|
| 57 | _have_port_context_id (_size_context_id >0), |
---|
| 58 | _have_port_front_end_id (_size_front_end_id >0), |
---|
| 59 | _have_port_ooo_engine_id (_size_ooo_engine_id>0), |
---|
| 60 | _have_port_packet_id (_size_packet_id >0), |
---|
| 61 | _have_port_dcache_context_id (_size_dcache_context_id>0), |
---|
| 62 | |
---|
| 63 | _mask_address_lsb (gen_mask<Tdcache_address_t>(log2(size_general_data/8))), |
---|
| 64 | _mask_address_msb (gen_mask<Tdcache_address_t>(size_general_data) << log2(size_general_data/8)) |
---|
[59] | 65 | { |
---|
| 66 | log_printf(FUNC,Load_store_unit,FUNCTION,"Begin"); |
---|
| 67 | test(); |
---|
| 68 | log_printf(FUNC,Load_store_unit,FUNCTION,"End"); |
---|
| 69 | }; |
---|
| 70 | |
---|
| 71 | #undef FUNCTION |
---|
| 72 | #define FUNCTION "Load_store_unit::Parameters (copy)" |
---|
| 73 | Parameters::Parameters (Parameters & param): |
---|
| 74 | _size_store_queue (param._size_store_queue ), |
---|
| 75 | _size_load_queue (param._size_load_queue ), |
---|
| 76 | _size_speculative_access_queue (param._size_speculative_access_queue), |
---|
| 77 | _nb_port_check (param._nb_port_check ), |
---|
| 78 | _speculative_load (param._speculative_load ), |
---|
| 79 | _nb_context (param._nb_context ), |
---|
[71] | 80 | _nb_front_end (param._nb_front_end ), |
---|
| 81 | _nb_ooo_engine (param._nb_ooo_engine ), |
---|
[59] | 82 | _nb_packet (param._nb_packet ), |
---|
| 83 | _size_general_data (param._size_general_data ), |
---|
| 84 | _nb_general_register (param._nb_general_register ), |
---|
| 85 | |
---|
| 86 | _size_address_store_queue (param._size_address_store_queue ), |
---|
| 87 | _size_address_load_queue (param._size_address_load_queue ), |
---|
| 88 | _size_address_speculative_access_queue (param._size_address_speculative_access_queue), |
---|
| 89 | |
---|
[71] | 90 | _size_context_id (param._size_context_id ), |
---|
| 91 | _size_front_end_id (param._size_front_end_id ), |
---|
| 92 | _size_ooo_engine_id (param._size_ooo_engine_id ), |
---|
| 93 | _size_packet_id (param._size_packet_id ), |
---|
| 94 | _size_general_register (param._size_general_register ), |
---|
| 95 | _size_dcache_context_id (param._size_dcache_context_id ), |
---|
| 96 | _size_dcache_packet_id (param._size_dcache_packet_id ), |
---|
| 97 | |
---|
| 98 | _have_port_context_id (param._have_port_context_id ), |
---|
| 99 | _have_port_front_end_id (param._have_port_front_end_id ), |
---|
| 100 | _have_port_ooo_engine_id (param._have_port_ooo_engine_id), |
---|
| 101 | _have_port_packet_id (param._have_port_packet_id ), |
---|
| 102 | |
---|
| 103 | _have_port_dcache_context_id(param._have_port_dcache_context_id), |
---|
| 104 | |
---|
| 105 | _mask_address_lsb (param._mask_address_lsb), |
---|
| 106 | _mask_address_msb (param._mask_address_msb) |
---|
[59] | 107 | { |
---|
| 108 | log_printf(FUNC,Load_store_unit,FUNCTION,"Begin"); |
---|
| 109 | test(); |
---|
| 110 | log_printf(FUNC,Load_store_unit,FUNCTION,"End"); |
---|
| 111 | }; |
---|
| 112 | |
---|
| 113 | #undef FUNCTION |
---|
| 114 | #define FUNCTION "Load_store_unit::~Parameters" |
---|
| 115 | Parameters::~Parameters () |
---|
| 116 | { |
---|
| 117 | log_printf(FUNC,Load_store_unit,FUNCTION,"Begin"); |
---|
| 118 | log_printf(FUNC,Load_store_unit,FUNCTION,"End"); |
---|
| 119 | }; |
---|
| 120 | |
---|
| 121 | }; // end namespace load_store_unit |
---|
| 122 | }; // end namespace execute_unit |
---|
| 123 | }; // end namespace multi_execute_unit |
---|
| 124 | }; // end namespace execute_loop |
---|
| 125 | }; // end namespace multi_execute_loop |
---|
| 126 | }; // end namespace core |
---|
| 127 | |
---|
| 128 | }; // end namespace behavioural |
---|
| 129 | }; // end namespace morpheo |
---|