[88] | 1 | /* |
---|
| 2 | * $Id: Parameters.cpp 145 2010-10-13 18:15:51Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/include/Parameters.h" |
---|
| 9 | #include "Common/include/Max.h" |
---|
[139] | 10 | #include "Behavioural/include/Allocation.h" |
---|
[88] | 11 | |
---|
| 12 | namespace morpheo { |
---|
| 13 | namespace behavioural { |
---|
| 14 | namespace core { |
---|
| 15 | namespace multi_ooo_engine { |
---|
| 16 | namespace ooo_engine { |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | #undef FUNCTION |
---|
| 20 | #define FUNCTION "OOO_Engine::Parameters" |
---|
| 21 | Parameters::Parameters (uint32_t nb_front_end , |
---|
| 22 | uint32_t * nb_context ,//[nb_front_end] |
---|
| 23 | uint32_t nb_rename_unit , |
---|
| 24 | uint32_t nb_execute_loop , |
---|
| 25 | uint32_t * nb_inst_decod ,//[nb_front_end] |
---|
| 26 | uint32_t * nb_inst_insert ,//[nb_rename_unit] |
---|
| 27 | uint32_t * nb_inst_retire ,//[nb_rename_unit] |
---|
[117] | 28 | // uint32_t nb_inst_issue , |
---|
[88] | 29 | uint32_t * nb_inst_execute ,//[nb_execute_loop] |
---|
| 30 | uint32_t nb_inst_reexecute , |
---|
| 31 | uint32_t nb_inst_commit , |
---|
| 32 | uint32_t nb_inst_branch_complete , |
---|
| 33 | uint32_t ** nb_branch_speculated ,//[nb_front_end][nb_context] |
---|
[108] | 34 | uint32_t size_nb_inst_decod , |
---|
[88] | 35 | uint32_t nb_rename_unit_select , |
---|
| 36 | uint32_t nb_execute_loop_select , |
---|
| 37 | uint32_t size_general_data , |
---|
| 38 | uint32_t size_special_data , |
---|
| 39 | uint32_t * link_rename_unit_with_front_end ,//[nb_front_end] |
---|
| 40 | // Commit |
---|
| 41 | uint32_t size_re_order_buffer , |
---|
| 42 | uint32_t nb_re_order_buffer_bank , |
---|
[138] | 43 | commit_unit::Tretire_ooo_scheme_t |
---|
| 44 | retire_ooo_scheme , |
---|
[88] | 45 | Tpriority_t commit_priority , |
---|
| 46 | Tload_balancing_t commit_load_balancing , |
---|
| 47 | // Issue |
---|
| 48 | uint32_t size_issue_queue , |
---|
[111] | 49 | issue_queue::Tissue_queue_scheme_t |
---|
| 50 | issue_queue_scheme , |
---|
[88] | 51 | uint32_t nb_issue_queue_bank , |
---|
| 52 | Tpriority_t issue_priority , |
---|
| 53 | Tload_balancing_t issue_load_balancing , |
---|
[117] | 54 | // bool ** table_routing ,//[nb_rename_unit][nb_inst_issue] |
---|
| 55 | // bool ** table_issue_type ,//[nb_inst_issue][nb_type] |
---|
[88] | 56 | // Reexecute |
---|
| 57 | uint32_t size_reexecute_queue , |
---|
| 58 | // Rename_unit |
---|
| 59 | Tpriority_t * rename_select_priority ,//[nb_rename_unit] |
---|
| 60 | Tload_balancing_t * rename_select_load_balancing ,//[nb_rename_unit] |
---|
| 61 | uint32_t * rename_select_nb_front_end_select,//[nb_rename_unit] |
---|
| 62 | uint32_t * nb_general_register ,//[nb_rename_unit] |
---|
| 63 | uint32_t * nb_special_register ,//[nb_rename_unit] |
---|
[139] | 64 | Trat_scheme_t * rat_scheme ,//[nb_rename_unit] |
---|
[88] | 65 | uint32_t * nb_reg_free ,//[nb_rename_unit] |
---|
| 66 | uint32_t * nb_rename_unit_bank ,//[nb_rename_unit] |
---|
[117] | 67 | // uint32_t * size_read_counter ,//[nb_rename_unit] |
---|
[88] | 68 | uint32_t * nb_load_store_queue ,//[nb_rename_unit] |
---|
| 69 | uint32_t ** size_store_queue ,//[nb_rename_unit][nb_load_store_queue] |
---|
| 70 | uint32_t ** size_load_queue ,//[nb_rename_unit][nb_load_store_queue] |
---|
[110] | 71 | uint32_t ** nb_inst_memory ,//[nb_rename_unit][nb_load_store_queue] |
---|
[88] | 72 | uint32_t ** link_load_store_unit_with_thread ,//[nb_front_end][nb_context] |
---|
| 73 | // SPR |
---|
| 74 | bool *** implement_group ,//[nb_front_end][nb_context][NB_GROUP] |
---|
[110] | 75 | // Others |
---|
| 76 | uint32_t nb_thread , |
---|
| 77 | uint32_t ** translate_num_context_to_num_thread, //[nb_front_end][nb_context] |
---|
[88] | 78 | |
---|
| 79 | bool is_toplevel |
---|
| 80 | ) |
---|
| 81 | { |
---|
| 82 | log_begin(OOO_Engine,FUNCTION); |
---|
| 83 | |
---|
[145] | 84 | _nb_front_end = nb_front_end ; |
---|
| 85 | _nb_context = nb_context ; |
---|
| 86 | _nb_rename_unit = nb_rename_unit ; |
---|
| 87 | _nb_execute_loop = nb_execute_loop ; |
---|
| 88 | _nb_inst_decod = nb_inst_decod ; |
---|
| 89 | _nb_inst_insert = nb_inst_insert ; |
---|
| 90 | _nb_inst_retire = nb_inst_retire ; |
---|
| 91 | // _nb_inst_issue = nb_inst_issue ; |
---|
| 92 | _nb_inst_execute = nb_inst_execute ; |
---|
| 93 | _nb_inst_reexecute = nb_inst_reexecute ; |
---|
| 94 | _nb_inst_commit = nb_inst_commit ; |
---|
| 95 | _nb_inst_branch_complete = nb_inst_branch_complete ; |
---|
| 96 | _nb_branch_speculated = nb_branch_speculated ; |
---|
| 97 | _nb_rename_unit_select = nb_rename_unit_select ; |
---|
| 98 | _nb_execute_loop_select = nb_execute_loop_select ; |
---|
| 99 | // _size_general_data = size_general_data ; |
---|
| 100 | // _size_special_data = size_special_data ; |
---|
| 101 | _link_rename_unit_with_front_end = link_rename_unit_with_front_end ; |
---|
| 102 | _size_re_order_buffer = size_re_order_buffer ; |
---|
| 103 | _nb_re_order_buffer_bank = nb_re_order_buffer_bank ; |
---|
| 104 | _retire_ooo_scheme = retire_ooo_scheme ; |
---|
| 105 | _commit_priority = commit_priority ; |
---|
| 106 | _commit_load_balancing = commit_load_balancing ; |
---|
| 107 | _size_issue_queue = size_issue_queue ; |
---|
| 108 | _issue_queue_scheme = issue_queue_scheme ; |
---|
| 109 | _nb_issue_queue_bank = nb_issue_queue_bank ; |
---|
| 110 | _issue_priority = issue_priority ; |
---|
| 111 | _issue_load_balancing = issue_load_balancing ; |
---|
| 112 | // _table_routing = table_routing ; |
---|
| 113 | // _table_issue_type = table_issue_type ; |
---|
| 114 | _size_reexecute_queue = size_reexecute_queue ; |
---|
| 115 | _rename_select_priority = rename_select_priority ; |
---|
| 116 | _rename_select_load_balancing = rename_select_load_balancing ; |
---|
| 117 | _rename_select_nb_front_end_select = rename_select_nb_front_end_select; |
---|
| 118 | _nb_general_register = nb_general_register ; |
---|
| 119 | _nb_special_register = nb_special_register ; |
---|
| 120 | _rat_scheme = rat_scheme ; |
---|
| 121 | _nb_reg_free = nb_reg_free ; |
---|
| 122 | _nb_rename_unit_bank = nb_rename_unit_bank ; |
---|
| 123 | // _size_read_counter = size_read_counter ; |
---|
| 124 | _nb_load_store_queue = nb_load_store_queue ; |
---|
| 125 | _size_store_queue = size_store_queue ; |
---|
| 126 | _size_load_queue = size_load_queue ; |
---|
| 127 | _nb_inst_memory = nb_inst_memory ; |
---|
| 128 | _link_load_store_unit_with_thread = link_load_store_unit_with_thread ; |
---|
| 129 | _implement_group = implement_group ; |
---|
[110] | 130 | _nb_thread = nb_thread ; |
---|
| 131 | _translate_num_context_to_num_thread = translate_num_context_to_num_thread; |
---|
| 132 | |
---|
[88] | 133 | test(); |
---|
| 134 | |
---|
[120] | 135 | log_printf(TRACE,OOO_Engine,FUNCTION," * link_front_end_with_rename_unit"); |
---|
[88] | 136 | _link_front_end_with_rename_unit = new std::vector<uint32_t> [_nb_rename_unit]; |
---|
| 137 | for (uint32_t i=0; i<_nb_front_end; i++) |
---|
[120] | 138 | { |
---|
| 139 | uint32_t num_rename_unit = _link_rename_unit_with_front_end[i]; |
---|
[88] | 140 | |
---|
[120] | 141 | log_printf(TRACE,OOO_Engine,FUNCTION," front_end %d is link with rename_unit %d with id %d",i,num_rename_unit,_link_front_end_with_rename_unit[num_rename_unit].size()); |
---|
| 142 | |
---|
| 143 | _link_front_end_with_rename_unit[num_rename_unit].push_back(i); |
---|
| 144 | } |
---|
[145] | 145 | |
---|
[88] | 146 | _rename_unit_size_front_end_id = new uint32_t [_nb_rename_unit]; |
---|
| 147 | _rename_unit_size_context_id = new uint32_t [_nb_rename_unit]; |
---|
| 148 | _rename_unit_nb_front_end = new uint32_t [_nb_rename_unit]; |
---|
| 149 | _rename_unit_nb_context = new uint32_t * [_nb_rename_unit]; |
---|
| 150 | _rename_unit_nb_inst_decod = new uint32_t * [_nb_rename_unit]; |
---|
| 151 | _rename_unit_link_load_store_unit_with_thread = new uint32_t ** [_nb_rename_unit]; |
---|
[139] | 152 | _rename_unit_nb_branch_speculated = new uint32_t ** [_nb_rename_unit]; |
---|
[88] | 153 | |
---|
| 154 | for (uint32_t i=0; i<_nb_rename_unit; i++) |
---|
| 155 | { |
---|
| 156 | uint32_t x = _link_front_end_with_rename_unit[i].size(); // number of linked front_end |
---|
| 157 | |
---|
| 158 | _rename_unit_nb_front_end [i] = x; |
---|
| 159 | _rename_unit_nb_context [i] = new uint32_t [x]; |
---|
| 160 | _rename_unit_nb_inst_decod [i] = new uint32_t [x]; |
---|
| 161 | _rename_unit_link_load_store_unit_with_thread [i] = new uint32_t * [x]; |
---|
[139] | 162 | _rename_unit_nb_branch_speculated [i] = new uint32_t * [x]; |
---|
[88] | 163 | |
---|
| 164 | // Scan front_end list |
---|
| 165 | std::vector<uint32_t>::iterator it=_link_front_end_with_rename_unit[i].begin(); |
---|
| 166 | for (uint32_t j=0; j<x; j++) |
---|
| 167 | { |
---|
| 168 | _rename_unit_nb_context [i][j] = _nb_context [*it]; |
---|
| 169 | _rename_unit_nb_inst_decod [i][j] = _nb_inst_decod [*it]; |
---|
| 170 | _rename_unit_link_load_store_unit_with_thread [i][j] = new uint32_t [_nb_context [*it]]; |
---|
[139] | 171 | _rename_unit_nb_branch_speculated [i][j] = new uint32_t [_nb_context [*it]]; |
---|
| 172 | |
---|
[88] | 173 | for (uint32_t k=0; k<_nb_context [*it]; k++) |
---|
[139] | 174 | { |
---|
| 175 | _rename_unit_link_load_store_unit_with_thread [i][j][k] = _link_load_store_unit_with_thread [*it][k]; |
---|
| 176 | _rename_unit_nb_branch_speculated [i][j][k] = _nb_branch_speculated [*it][k]; |
---|
| 177 | } |
---|
[88] | 178 | |
---|
| 179 | ++it; |
---|
| 180 | } |
---|
| 181 | |
---|
| 182 | _rename_unit_size_front_end_id [i] = log2(_rename_unit_nb_front_end [i]); |
---|
| 183 | _rename_unit_size_context_id [i] = log2(max<uint32_t>(_rename_unit_nb_context [i], _rename_unit_nb_front_end [i])); |
---|
| 184 | } |
---|
| 185 | |
---|
| 186 | for (uint32_t i=0; i<_nb_rename_unit; i++) |
---|
| 187 | { |
---|
[120] | 188 | log_printf(TRACE,OOO_Engine,FUNCTION," * Rename_unit [%d]",i); |
---|
| 189 | log_printf(TRACE,OOO_Engine,FUNCTION," * front_end : %d",_rename_unit_nb_front_end[i]); |
---|
[88] | 190 | |
---|
| 191 | for (uint32_t j=0; j<_rename_unit_nb_front_end[i]; j++) |
---|
| 192 | { |
---|
[120] | 193 | log_printf(TRACE,OOO_Engine,FUNCTION," * [%d] nb_context : %d, nb_inst_decod : %d",j,_rename_unit_nb_context[i][j],_rename_unit_nb_inst_decod[i][j]); |
---|
[88] | 194 | |
---|
| 195 | for (uint32_t k=0; k<_rename_unit_nb_context[i][j]; ++k) |
---|
[120] | 196 | log_printf(TRACE,OOO_Engine,FUNCTION," * [%d][%d] link_lsq : %d",j,k,_rename_unit_link_load_store_unit_with_thread[i][j][k]); |
---|
[88] | 197 | } |
---|
| 198 | } |
---|
| 199 | |
---|
| 200 | _max_nb_context = max<uint32_t>(_nb_context,_nb_front_end); |
---|
| 201 | _max_branch_speculated = max<uint32_t>(_nb_branch_speculated,_nb_front_end,_nb_context); |
---|
| 202 | _size_rename_id = log2(_nb_rename_unit); |
---|
| 203 | // _size_max_depth = log2(_max_branch_speculated); |
---|
| 204 | uint32_t size_front_end_id = log2(_nb_front_end); |
---|
| 205 | uint32_t size_context_id = log2(_max_nb_context); |
---|
| 206 | uint32_t size_packet_id = log2(nb_re_order_buffer_bank)+log2(size_re_order_buffer/nb_re_order_buffer_bank); |
---|
| 207 | uint32_t size_general_register = log2(max<uint32_t>(_nb_general_register,_nb_rename_unit)); |
---|
| 208 | uint32_t size_special_register = log2(max<uint32_t>(_nb_special_register,_nb_rename_unit)); |
---|
| 209 | uint32_t size_store_queue_ptr = log2(max<uint32_t>(_size_store_queue,_nb_rename_unit,_nb_load_store_queue)); |
---|
| 210 | uint32_t size_load_queue_ptr = log2(max<uint32_t>(_size_load_queue ,_nb_rename_unit,_nb_load_store_queue)); |
---|
| 211 | |
---|
| 212 | _sum_inst_insert = 0; |
---|
| 213 | _sum_inst_retire = 0; |
---|
| 214 | for (uint32_t i=0; i<_nb_rename_unit; i++) |
---|
| 215 | { |
---|
| 216 | _sum_inst_insert += _nb_inst_insert [i]; |
---|
| 217 | _sum_inst_retire += _nb_inst_retire [i]; |
---|
| 218 | |
---|
[120] | 219 | log_printf(TRACE,OOO_Engine,FUNCTION," * rename_unit [%d] - nb_inst_insert %d, nb_inst_retire %d", i,_nb_inst_insert [i],_nb_inst_retire [i]); |
---|
[88] | 220 | } |
---|
| 221 | |
---|
[120] | 222 | log_printf(TRACE,OOO_Engine,FUNCTION," * sum_inst_insert %d, sum_inst_retire %d",_sum_inst_insert,_sum_inst_retire); |
---|
[88] | 223 | |
---|
| 224 | // _have_port_front_end_id = _size_front_end_id > 0; |
---|
| 225 | // _have_port_context_id = _size_context_id > 0; |
---|
| 226 | // _have_port_packet_id = _size_packet_id > 0; |
---|
| 227 | _have_port_rename_id = _size_rename_id > 0; |
---|
| 228 | // _have_port_load_queue_ptr = _size_load_queue_ptr > 0; |
---|
| 229 | // _have_port_max_depth = _size_max_depth > 0; |
---|
| 230 | // _have_port_depth = _param_commit_unit->_have_port_depth; |
---|
| 231 | |
---|
| 232 | _param_rename_unit = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::Parameters * [_nb_rename_unit]; |
---|
| 233 | for (uint32_t i=0; i<_nb_rename_unit; i++) |
---|
| 234 | _param_rename_unit [i] = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::Parameters |
---|
| 235 | ( |
---|
| 236 | _rename_unit_nb_front_end [i], |
---|
| 237 | _rename_unit_nb_context [i], |
---|
| 238 | _rename_unit_nb_inst_decod [i], |
---|
| 239 | _nb_inst_insert [i], |
---|
| 240 | _nb_inst_retire [i], |
---|
| 241 | _nb_load_store_queue [i], |
---|
| 242 | _size_store_queue [i], |
---|
| 243 | _size_load_queue [i], |
---|
[110] | 244 | _nb_inst_memory [i], |
---|
[88] | 245 | _rename_unit_link_load_store_unit_with_thread [i], |
---|
| 246 | _rename_select_priority [i], |
---|
| 247 | _rename_select_load_balancing [i], |
---|
| 248 | _rename_select_nb_front_end_select [i], |
---|
| 249 | _max_branch_speculated , |
---|
| 250 | size_general_data , |
---|
| 251 | _nb_general_register [i], |
---|
| 252 | _nb_special_register [i], |
---|
[139] | 253 | _rat_scheme [i], |
---|
[88] | 254 | _nb_reg_free [i], |
---|
[139] | 255 | _nb_rename_unit_bank [i], |
---|
| 256 | // _size_read_counter [i] |
---|
| 257 | _rename_unit_nb_branch_speculated [i] |
---|
[88] | 258 | ); |
---|
| 259 | |
---|
| 260 | _param_commit_unit = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::Parameters |
---|
| 261 | ( |
---|
[145] | 262 | _nb_front_end , |
---|
| 263 | _nb_context , |
---|
| 264 | _nb_rename_unit , |
---|
| 265 | _size_re_order_buffer , |
---|
| 266 | _nb_re_order_buffer_bank , |
---|
| 267 | _retire_ooo_scheme , |
---|
| 268 | _nb_inst_insert , |
---|
| 269 | _nb_inst_retire , |
---|
| 270 | _nb_inst_commit , |
---|
| 271 | _nb_inst_reexecute , |
---|
| 272 | _nb_inst_branch_complete , |
---|
| 273 | _nb_branch_speculated , |
---|
| 274 | size_nb_inst_decod , |
---|
| 275 | size_general_data , |
---|
| 276 | size_store_queue_ptr , |
---|
| 277 | size_load_queue_ptr , |
---|
| 278 | size_general_register , |
---|
| 279 | size_special_register , |
---|
| 280 | _rat_scheme , |
---|
| 281 | _link_front_end_with_rename_unit, |
---|
| 282 | _issue_priority , |
---|
| 283 | _issue_load_balancing , |
---|
| 284 | _nb_rename_unit_select , |
---|
| 285 | _nb_thread , |
---|
[110] | 286 | _translate_num_context_to_num_thread |
---|
[88] | 287 | ); |
---|
| 288 | |
---|
| 289 | |
---|
| 290 | _param_issue_queue = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::Parameters |
---|
| 291 | (_max_nb_context , |
---|
| 292 | _nb_front_end , |
---|
| 293 | _nb_rename_unit , |
---|
| 294 | _size_issue_queue , |
---|
[111] | 295 | _issue_queue_scheme , |
---|
[88] | 296 | _nb_issue_queue_bank , |
---|
| 297 | size_packet_id , |
---|
| 298 | size_general_data , |
---|
| 299 | size_special_data , |
---|
| 300 | size_general_register ,//+_size_rename_id |
---|
| 301 | size_special_register ,//+_size_rename_id |
---|
| 302 | size_store_queue_ptr , |
---|
| 303 | size_load_queue_ptr , |
---|
[117] | 304 | // _nb_inst_issue , |
---|
[88] | 305 | _nb_inst_insert , |
---|
| 306 | _nb_inst_reexecute , |
---|
| 307 | _nb_rename_unit_select , |
---|
| 308 | _issue_priority , |
---|
[117] | 309 | _issue_load_balancing // , |
---|
| 310 | // _table_routing , |
---|
| 311 | // _table_issue_type |
---|
[88] | 312 | ); |
---|
| 313 | |
---|
[117] | 314 | _nb_inst_issue = _param_issue_queue->_nb_inst_issue; |
---|
| 315 | |
---|
[88] | 316 | _param_reexecute_unit = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::reexecute_unit::Parameters |
---|
| 317 | ( size_context_id , |
---|
| 318 | size_front_end_id , |
---|
| 319 | size_packet_id , |
---|
| 320 | _size_reexecute_queue , |
---|
| 321 | _nb_execute_loop , |
---|
| 322 | _nb_inst_execute , |
---|
| 323 | _nb_inst_commit , |
---|
| 324 | _nb_inst_reexecute , |
---|
| 325 | _nb_execute_loop_select , |
---|
[138] | 326 | _commit_priority , |
---|
| 327 | _commit_load_balancing , |
---|
[88] | 328 | size_general_register ,//+_size_rename_id |
---|
| 329 | size_special_register ,//+_size_rename_id |
---|
| 330 | size_general_data , |
---|
| 331 | size_special_data , |
---|
| 332 | size_store_queue_ptr , |
---|
| 333 | size_load_queue_ptr |
---|
| 334 | ); |
---|
| 335 | |
---|
| 336 | _param_special_register_unit = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::special_register_unit::Parameters |
---|
| 337 | ( |
---|
| 338 | _nb_front_end , |
---|
| 339 | _nb_context , |
---|
| 340 | _nb_inst_reexecute , |
---|
[117] | 341 | _implement_group , |
---|
| 342 | _translate_num_context_to_num_thread |
---|
[88] | 343 | ); |
---|
| 344 | |
---|
| 345 | _param_glue = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::ooo_engine_glue::Parameters |
---|
| 346 | (_nb_front_end , |
---|
| 347 | _nb_context , |
---|
| 348 | _nb_rename_unit , |
---|
| 349 | _nb_inst_decod , |
---|
| 350 | _nb_inst_insert , |
---|
| 351 | _nb_inst_retire , |
---|
| 352 | size_general_data , |
---|
| 353 | size_special_data , |
---|
| 354 | _link_rename_unit_with_front_end , |
---|
| 355 | _link_front_end_with_rename_unit , |
---|
| 356 | size_packet_id , |
---|
| 357 | size_general_register , |
---|
| 358 | size_special_register , |
---|
| 359 | size_store_queue_ptr , |
---|
| 360 | size_load_queue_ptr |
---|
| 361 | ); |
---|
| 362 | |
---|
| 363 | if (is_toplevel) |
---|
| 364 | { |
---|
| 365 | _size_front_end_id = size_front_end_id; |
---|
| 366 | _size_context_id = size_context_id ; |
---|
| 367 | _size_depth = log2(_max_branch_speculated); |
---|
| 368 | _size_instruction_address = size_general_data-2; |
---|
| 369 | _size_general_data = size_general_data; |
---|
| 370 | _size_special_data = size_special_data; |
---|
| 371 | _size_general_register = size_general_register; |
---|
| 372 | _size_special_register = size_special_register; |
---|
| 373 | _size_store_queue_ptr = size_store_queue_ptr ; |
---|
| 374 | _size_load_queue_ptr = size_load_queue_ptr ; |
---|
| 375 | _size_rob_ptr = size_packet_id; |
---|
| 376 | _size_nb_inst_commit = log2(size_re_order_buffer)+1; |
---|
[108] | 377 | _size_nb_inst_decod = size_nb_inst_decod; |
---|
[88] | 378 | |
---|
| 379 | _have_port_front_end_id = _size_front_end_id > 0; |
---|
| 380 | _have_port_context_id = _size_context_id > 0; |
---|
| 381 | _have_port_rob_ptr = _size_rob_ptr > 0; |
---|
| 382 | _have_port_load_queue_ptr = _size_load_queue_ptr > 0; |
---|
| 383 | _have_port_depth = _size_depth > 0; |
---|
| 384 | |
---|
| 385 | copy(); |
---|
| 386 | } |
---|
| 387 | |
---|
| 388 | |
---|
| 389 | log_end(OOO_Engine,FUNCTION); |
---|
| 390 | }; |
---|
| 391 | |
---|
| 392 | // #undef FUNCTION |
---|
| 393 | // #define FUNCTION "OOO_Engine::Parameters (copy)" |
---|
| 394 | // Parameters::Parameters (Parameters & param) |
---|
| 395 | // { |
---|
| 396 | // log_begin(OOO_Engine,FUNCTION); |
---|
| 397 | // test(); |
---|
| 398 | // log_end(OOO_Engine,FUNCTION); |
---|
| 399 | // }; |
---|
| 400 | |
---|
| 401 | #undef FUNCTION |
---|
| 402 | #define FUNCTION "OOO_Engine::~Parameters" |
---|
| 403 | Parameters::~Parameters (void) |
---|
| 404 | { |
---|
| 405 | log_begin(OOO_Engine,FUNCTION); |
---|
| 406 | |
---|
| 407 | for (uint32_t i=0; i<_nb_rename_unit; i++) |
---|
| 408 | { |
---|
| 409 | for (uint32_t j=0; j<_nb_front_end; j++) |
---|
[139] | 410 | delete [] _rename_unit_nb_branch_speculated [i][j]; |
---|
| 411 | delete [] _rename_unit_nb_branch_speculated [i]; |
---|
| 412 | for (uint32_t j=0; j<_nb_front_end; j++) |
---|
[88] | 413 | delete [] _rename_unit_link_load_store_unit_with_thread [i][j]; |
---|
| 414 | delete [] _rename_unit_link_load_store_unit_with_thread [i]; |
---|
| 415 | delete [] _rename_unit_nb_inst_decod [i]; |
---|
| 416 | delete [] _rename_unit_nb_context [i]; |
---|
| 417 | } |
---|
| 418 | |
---|
[139] | 419 | delete [] _rename_unit_nb_branch_speculated ; |
---|
[88] | 420 | delete [] _rename_unit_link_load_store_unit_with_thread; |
---|
| 421 | delete [] _rename_unit_nb_inst_decod ; |
---|
| 422 | delete [] _rename_unit_nb_context ; |
---|
| 423 | delete [] _rename_unit_nb_front_end ; |
---|
| 424 | delete [] _rename_unit_size_front_end_id ; |
---|
| 425 | delete [] _rename_unit_size_context_id ; |
---|
| 426 | delete [] _link_front_end_with_rename_unit ; |
---|
| 427 | |
---|
[128] | 428 | for (uint32_t i=0; i<_nb_rename_unit; i++) |
---|
| 429 | delete _param_rename_unit [i] ; |
---|
[88] | 430 | delete [] _param_rename_unit ; |
---|
| 431 | delete _param_commit_unit ; |
---|
| 432 | delete _param_issue_queue ; |
---|
| 433 | delete _param_reexecute_unit ; |
---|
| 434 | delete _param_special_register_unit; |
---|
| 435 | delete _param_glue ; |
---|
| 436 | |
---|
| 437 | log_end(OOO_Engine,FUNCTION); |
---|
| 438 | }; |
---|
| 439 | |
---|
| 440 | #undef FUNCTION |
---|
| 441 | #define FUNCTION "OOO_Engine::copy" |
---|
| 442 | void Parameters::copy (void) |
---|
| 443 | { |
---|
| 444 | log_begin(OOO_Engine,FUNCTION); |
---|
| 445 | |
---|
| 446 | for (uint32_t i=0; i<_nb_rename_unit; i++) |
---|
| 447 | COPY(_param_rename_unit [i]); |
---|
| 448 | COPY(_param_commit_unit ); |
---|
| 449 | COPY(_param_issue_queue ); |
---|
| 450 | COPY(_param_reexecute_unit ); |
---|
| 451 | COPY(_param_special_register_unit); |
---|
| 452 | COPY(_param_glue ); |
---|
| 453 | |
---|
| 454 | log_end(OOO_Engine,FUNCTION); |
---|
| 455 | }; |
---|
| 456 | |
---|
| 457 | }; // end namespace ooo_engine |
---|
| 458 | }; // end namespace multi_ooo_engine |
---|
| 459 | }; // end namespace core |
---|
| 460 | |
---|
| 461 | }; // end namespace behavioural |
---|
| 462 | }; // end namespace morpheo |
---|