[78] | 1 | /* |
---|
| 2 | * $Id: Parameters.cpp 81 2008-04-15 18:40:01Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/include/Parameters.h" |
---|
| 9 | |
---|
| 10 | namespace morpheo { |
---|
| 11 | namespace behavioural { |
---|
| 12 | namespace core { |
---|
| 13 | namespace multi_execute_loop { |
---|
| 14 | namespace execute_loop { |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | #undef FUNCTION |
---|
| 18 | #define FUNCTION "Execute_loop::Parameters" |
---|
| 19 | Parameters::Parameters (uint32_t nb_read_unit , |
---|
| 20 | uint32_t nb_functionnal_unit , |
---|
| 21 | uint32_t nb_load_store_unit , |
---|
| 22 | uint32_t nb_write_unit , |
---|
| 23 | |
---|
| 24 | uint32_t nb_context , |
---|
| 25 | uint32_t nb_front_end , |
---|
| 26 | uint32_t nb_ooo_engine , |
---|
| 27 | uint32_t nb_packet , |
---|
| 28 | uint32_t size_general_data , |
---|
| 29 | uint32_t size_special_data , |
---|
| 30 | |
---|
| 31 | uint32_t * size_read_queue , |
---|
| 32 | uint32_t * size_reservation_station , |
---|
| 33 | uint32_t * nb_inst_retire , |
---|
| 34 | |
---|
| 35 | execute_timing_t *** timing , |
---|
| 36 | morpheo::behavioural::custom::custom_information_t (*get_custom_information) (uint32_t), |
---|
| 37 | |
---|
| 38 | uint32_t * size_store_queue , |
---|
| 39 | uint32_t * size_load_queue , |
---|
| 40 | uint32_t * size_speculative_access_queue , |
---|
| 41 | uint32_t * nb_port_check , |
---|
| 42 | Tspeculative_load_t * speculative_load , |
---|
| 43 | uint32_t * nb_bypass_memory , |
---|
| 44 | |
---|
| 45 | uint32_t * size_write_queue , |
---|
| 46 | uint32_t * size_execute_queue , |
---|
| 47 | uint32_t * nb_bypass_write , |
---|
| 48 | |
---|
| 49 | uint32_t nb_gpr_bank , |
---|
| 50 | uint32_t nb_gpr_port_read_by_bank , |
---|
| 51 | uint32_t nb_gpr_port_write_by_bank , |
---|
| 52 | uint32_t nb_spr_bank , |
---|
| 53 | uint32_t nb_spr_port_read_by_bank , |
---|
| 54 | uint32_t nb_spr_port_write_by_bank , |
---|
| 55 | uint32_t * nb_general_register , |
---|
| 56 | uint32_t * nb_special_register , |
---|
| 57 | uint32_t * nb_inst_insert_rob , |
---|
| 58 | uint32_t * nb_inst_retire_rob , |
---|
| 59 | |
---|
| 60 | Tpriority_t execution_unit_to_write_unit_priority , |
---|
| 61 | bool ** execution_unit_to_write_unit_table_routing, |
---|
| 62 | bool ** execution_unit_to_write_unit_table_thread , |
---|
| 63 | |
---|
| 64 | Tpriority_t read_unit_to_execution_unit_priority , |
---|
| 65 | bool ** read_unit_to_execution_unit_table_routing , |
---|
| 66 | bool ** read_unit_to_execution_unit_table_thread |
---|
| 67 | ) |
---|
| 68 | { |
---|
| 69 | log_printf(FUNC,Execute_loop,FUNCTION,"Begin"); |
---|
| 70 | |
---|
| 71 | _nb_read_unit = nb_read_unit ; |
---|
| 72 | _nb_functionnal_unit = nb_functionnal_unit ; |
---|
| 73 | _nb_load_store_unit = nb_load_store_unit ; |
---|
| 74 | _nb_write_unit = nb_write_unit ; |
---|
| 75 | |
---|
| 76 | _nb_context = nb_context ; |
---|
| 77 | _nb_front_end = nb_front_end ; |
---|
| 78 | _nb_ooo_engine = nb_ooo_engine ; |
---|
| 79 | _nb_packet = nb_packet ; |
---|
| 80 | _size_general_data = size_general_data ; |
---|
| 81 | _size_special_data = size_special_data ; |
---|
| 82 | |
---|
| 83 | _size_read_queue = size_read_queue ; |
---|
| 84 | _size_reservation_station = size_reservation_station ; |
---|
| 85 | _nb_inst_retire = nb_inst_retire ; |
---|
| 86 | |
---|
| 87 | _timing = timing ; |
---|
| 88 | _get_custom_information = get_custom_information ; |
---|
| 89 | |
---|
| 90 | _size_store_queue = size_store_queue ; |
---|
| 91 | _size_load_queue = size_load_queue ; |
---|
| 92 | _size_speculative_access_queue = size_speculative_access_queue ; |
---|
| 93 | _nb_port_check = nb_port_check ; |
---|
| 94 | _speculative_load = speculative_load ; |
---|
| 95 | _nb_bypass_memory = nb_bypass_memory ; |
---|
| 96 | |
---|
| 97 | _size_write_queue = size_write_queue ; |
---|
| 98 | _size_execute_queue = size_execute_queue ; |
---|
| 99 | _nb_bypass_write = nb_bypass_write ; |
---|
| 100 | |
---|
| 101 | _nb_gpr_bank = nb_gpr_bank ; |
---|
| 102 | _nb_gpr_port_read_by_bank = nb_gpr_port_read_by_bank ; |
---|
| 103 | _nb_gpr_port_write_by_bank = nb_gpr_port_write_by_bank ; |
---|
| 104 | _nb_spr_bank = nb_spr_bank ; |
---|
| 105 | _nb_spr_port_read_by_bank = nb_spr_port_read_by_bank ; |
---|
| 106 | _nb_spr_port_write_by_bank = nb_spr_port_write_by_bank ; |
---|
| 107 | _nb_general_register = nb_general_register ; |
---|
| 108 | _nb_special_register = nb_special_register ; |
---|
| 109 | _nb_inst_insert_rob = nb_inst_insert_rob ; |
---|
| 110 | _nb_inst_retire_rob = nb_inst_retire_rob ; |
---|
| 111 | |
---|
| 112 | _execution_unit_to_write_unit_priority = execution_unit_to_write_unit_priority; |
---|
| 113 | _execution_unit_to_write_unit_table_routing = execution_unit_to_write_unit_table_routing; |
---|
| 114 | _execution_unit_to_write_unit_table_thread = execution_unit_to_write_unit_table_thread ; |
---|
| 115 | |
---|
| 116 | _read_unit_to_execution_unit_priority = read_unit_to_execution_unit_priority ; |
---|
| 117 | _read_unit_to_execution_unit_table_routing = read_unit_to_execution_unit_table_routing ; |
---|
| 118 | _read_unit_to_execution_unit_table_thread = read_unit_to_execution_unit_table_thread ; |
---|
| 119 | |
---|
| 120 | _nb_execute_unit = _nb_functionnal_unit + _nb_load_store_unit; |
---|
| 121 | |
---|
| 122 | _size_context_id = log2(nb_context ); |
---|
| 123 | _size_front_end_id = log2(nb_front_end ); |
---|
| 124 | _size_ooo_engine_id = log2(nb_ooo_engine ); |
---|
| 125 | _size_packet_id = log2(nb_packet ); |
---|
| 126 | |
---|
| 127 | _have_port_context_id = _size_context_id >= 1; |
---|
| 128 | _have_port_front_end_id = _size_front_end_id >= 1; |
---|
| 129 | _have_port_ooo_engine_id = _size_ooo_engine_id >= 1; |
---|
| 130 | _have_port_packet_id = _size_packet_id >= 1; |
---|
| 131 | |
---|
| 132 | _is_load_store_unit = new bool [_nb_execute_unit]; |
---|
| 133 | _translate_num_execute_unit = new uint32_t [_nb_execute_unit]; |
---|
| 134 | |
---|
| 135 | _read_unit_to_execution_unit_table_execute_type = new bool * [_nb_execute_unit]; |
---|
| 136 | for (uint32_t i=0; i<_nb_execute_unit; i++) |
---|
| 137 | { |
---|
| 138 | _is_load_store_unit [i] = false; |
---|
| 139 | _read_unit_to_execution_unit_table_execute_type [i] = new bool [_nb_type]; |
---|
| 140 | for (uint32_t j=0; j<_nb_type; j++) |
---|
| 141 | _read_unit_to_execution_unit_table_execute_type [i][j] = false; |
---|
| 142 | } |
---|
| 143 | |
---|
| 144 | // Fill execute_type |
---|
| 145 | for (uint32_t i=0; i<_nb_execute_unit; i++) |
---|
| 146 | for (uint32_t j=0; j<_nb_type; j++) |
---|
| 147 | for (uint32_t k=0; k<_nb_operation; k++) |
---|
| 148 | // Test if operation is implemnted |
---|
| 149 | if (timing[i][j][k]._latence > 0) |
---|
| 150 | { |
---|
| 151 | _read_unit_to_execution_unit_table_execute_type [i][j] = true; |
---|
| 152 | _is_load_store_unit [i] = (j == TYPE_MEMORY); |
---|
| 153 | break; |
---|
| 154 | } |
---|
| 155 | |
---|
| 156 | for (uint32_t i=0; i<_nb_execute_unit; i++) |
---|
| 157 | if (_is_load_store_unit [i]) |
---|
| 158 | log_printf(TRACE,Execute_loop,FUNCTION,"Execute unit '%d' is a Load Store unit",i); |
---|
| 159 | else |
---|
| 160 | log_printf(TRACE,Execute_loop,FUNCTION,"Execute unit '%d' is a Functionnal unit",i); |
---|
| 161 | |
---|
| 162 | _nb_gpr_read = 2*_nb_read_unit; |
---|
| 163 | _nb_spr_read = 1*_nb_read_unit; |
---|
| 164 | _nb_gpr_write = 1*_nb_write_unit; |
---|
| 165 | _nb_spr_write = 1*_nb_write_unit; |
---|
| 166 | |
---|
| 167 | _max_nb_general_register = 0; |
---|
| 168 | _max_nb_special_register = 0; |
---|
| 169 | for (uint32_t i=0; i<nb_ooo_engine; i++) |
---|
| 170 | { |
---|
| 171 | if (_nb_general_register[i] > _max_nb_general_register) _max_nb_general_register = _nb_general_register[i]; |
---|
| 172 | if (_nb_special_register[i] > _max_nb_special_register) _max_nb_special_register = _nb_special_register[i]; |
---|
| 173 | } |
---|
| 174 | |
---|
| 175 | _max_size_store_queue = 0; |
---|
| 176 | _max_size_load_queue = 0; |
---|
| 177 | for (uint32_t i=0; i<nb_load_store_unit; i++) |
---|
| 178 | { |
---|
| 179 | if (_size_store_queue[i] > _max_size_store_queue) _max_size_store_queue = _size_store_queue[i]; |
---|
| 180 | if (_size_load_queue [i] > _max_size_load_queue ) _max_size_load_queue = _size_load_queue [i]; |
---|
| 181 | } |
---|
| 182 | |
---|
| 183 | _have_port_load_queue_ptr= _max_size_load_queue >= 2; |
---|
| 184 | |
---|
| 185 | _size_general_register = log2(_max_nb_general_register); |
---|
| 186 | _size_special_register = log2(_max_nb_special_register); |
---|
| 187 | |
---|
| 188 | uint32_t _nb_thread = get_nb_thread(_nb_context, |
---|
| 189 | _nb_front_end, |
---|
| 190 | _nb_ooo_engine); |
---|
| 191 | |
---|
| 192 | _set_read_unit_source_register_write = new std::set<uint32_t> [_nb_read_unit]; |
---|
| 193 | _set_read_unit_source_bypass_write = new std::set<uint32_t> [_nb_read_unit]; |
---|
| 194 | _set_read_unit_source_bypass_memory = new std::set<uint32_t> [_nb_read_unit]; |
---|
| 195 | |
---|
| 196 | _read_unit_nb_register_write = new uint32_t [_nb_read_unit]; |
---|
| 197 | _read_unit_nb_bypass_write = new uint32_t [_nb_read_unit]; |
---|
| 198 | _read_unit_nb_bypass_memory = new uint32_t [_nb_read_unit]; |
---|
| 199 | |
---|
| 200 | _link_read_unit_with_load_store_unit = new bool * [nb_read_unit]; |
---|
| 201 | _link_read_unit_with_write_unit = new bool * [nb_read_unit]; |
---|
| 202 | _link_read_unit_with_thread = new bool * [nb_read_unit]; |
---|
| 203 | |
---|
| 204 | for (uint32_t i=0; i<_nb_read_unit; i++) |
---|
| 205 | { |
---|
| 206 | _read_unit_nb_register_write [i] = 0; |
---|
| 207 | _read_unit_nb_bypass_write [i] = 0; |
---|
| 208 | _read_unit_nb_bypass_memory [i] = 0; |
---|
| 209 | |
---|
| 210 | _link_read_unit_with_load_store_unit [i] = new bool [_nb_execute_unit]; |
---|
| 211 | _link_read_unit_with_write_unit [i] = new bool [_nb_write_unit]; |
---|
| 212 | _link_read_unit_with_thread [i] = new bool [_nb_thread]; |
---|
| 213 | |
---|
| 214 | for (uint32_t j=0; j<_nb_execute_unit; j++) |
---|
| 215 | _link_read_unit_with_load_store_unit [i][j] = false; |
---|
| 216 | for (uint32_t j=0; j<_nb_write_unit; j++) |
---|
| 217 | _link_read_unit_with_write_unit [i][j] = false; |
---|
| 218 | for (uint32_t j=0; j<_nb_thread; j++) |
---|
| 219 | _link_read_unit_with_thread [i][j] = false; |
---|
| 220 | |
---|
| 221 | // fill link array |
---|
| 222 | for (uint32_t j=0; j<_nb_execute_unit; j++) |
---|
| 223 | { |
---|
| 224 | // Test if this read unit can send operation at this execute_unit |
---|
| 225 | if (_read_unit_to_execution_unit_table_routing [i][j]) |
---|
| 226 | { |
---|
| 227 | if (_is_load_store_unit [j]) |
---|
| 228 | { |
---|
| 229 | _link_read_unit_with_load_store_unit [i][j] = true; |
---|
| 230 | } |
---|
| 231 | |
---|
| 232 | for (uint32_t k=0; k<_nb_thread; k++) |
---|
| 233 | { |
---|
| 234 | if (_read_unit_to_execution_unit_table_thread [j][k]) |
---|
| 235 | { |
---|
| 236 | _link_read_unit_with_thread [i][k] = true; |
---|
| 237 | } |
---|
| 238 | } |
---|
| 239 | // Scearch associed write_unit |
---|
| 240 | for (uint32_t k=0; k<_nb_write_unit; k++) |
---|
| 241 | { |
---|
| 242 | // Test if this execute_unit can send operation at this write_unit |
---|
| 243 | // Test if have not a previous link ! (a same read_unit can send operation à two execute_unit and each execute_unit send at the same write_unit) |
---|
| 244 | if (_execution_unit_to_write_unit_table_routing [j][k] and |
---|
| 245 | not _link_read_unit_with_write_unit [i][k]) |
---|
| 246 | // if yes : this write_unit can have operation sended by this read_unit |
---|
| 247 | { |
---|
| 248 | _link_read_unit_with_write_unit [i][k] = true; |
---|
| 249 | } |
---|
| 250 | } |
---|
| 251 | } |
---|
| 252 | } |
---|
| 253 | } |
---|
| 254 | |
---|
| 255 | // Compute the gpr_write and spr_write port for the read_unit : |
---|
| 256 | // * Max : 2*nb_write_unit gpr_write_port. |
---|
| 257 | // * a specific read_unit and a specific write_unit can execute a null intersection of thread operation. Also it's unnecessarry to send the gpr_write at the read_unit. |
---|
| 258 | |
---|
| 259 | |
---|
| 260 | std::cout << "_link_......." << std::endl; |
---|
| 261 | std::cout << "_link_read_unit_with_load_store_unit" << std::endl; |
---|
| 262 | for (uint32_t i=0; i<_nb_read_unit; i++) |
---|
| 263 | { |
---|
| 264 | std::cout << "\t" << std::endl; |
---|
| 265 | for (uint32_t j=0; j<_nb_execute_unit; j++) |
---|
| 266 | std::cout << _link_read_unit_with_load_store_unit [i][j] << " "; |
---|
| 267 | std::cout << std::endl; |
---|
| 268 | } |
---|
| 269 | std::cout << "_link_read_unit_with_write_unit" << std::endl; |
---|
| 270 | for (uint32_t i=0; i<_nb_read_unit; i++) |
---|
| 271 | { |
---|
| 272 | std::cout << "\t" << std::endl; |
---|
| 273 | for (uint32_t j=0; j<_nb_write_unit; j++) |
---|
| 274 | std::cout << _link_read_unit_with_write_unit [i][j] << " "; |
---|
| 275 | std::cout << std::endl; |
---|
| 276 | } |
---|
| 277 | std::cout << "_link_read_unit_with_thread" << std::endl; |
---|
| 278 | for (uint32_t i=0; i<_nb_read_unit; i++) |
---|
| 279 | { |
---|
| 280 | std::cout << "\t" << std::endl; |
---|
| 281 | for (uint32_t j=0; j<_nb_thread; j++) |
---|
| 282 | std::cout << _link_read_unit_with_thread [i][j] << " "; |
---|
| 283 | std::cout << std::endl; |
---|
| 284 | } |
---|
| 285 | |
---|
| 286 | std::cout << "_set_......." << std::endl; |
---|
| 287 | |
---|
| 288 | for (uint32_t i=0; i<_nb_read_unit; i++) |
---|
| 289 | { |
---|
| 290 | std::cout << " * Read_unit[" << i << "]" << std::endl; |
---|
| 291 | for (uint32_t j=0; j<_nb_write_unit; j++) |
---|
| 292 | { |
---|
| 293 | std::cout << " * Write_unit[" << j << "]" << std::endl; |
---|
| 294 | // Test the thread executed on this write_unit |
---|
| 295 | for (uint32_t k=0; k<_nb_thread; k++) |
---|
| 296 | { |
---|
| 297 | std::cout << " * Thread[" << k << "]" << std::endl; |
---|
| 298 | if ( (_execution_unit_to_write_unit_table_thread [j][k]) and |
---|
| 299 | (_link_read_unit_with_thread [i][k])) |
---|
| 300 | { |
---|
| 301 | std::cout << " * Find !!!!" << std::endl; |
---|
| 302 | std::cout << " * Read_unit "+toString(i)+" must take the gpr_write with write_unit "+toString(j)+"." << std::endl; |
---|
| 303 | _set_read_unit_source_register_write[i].insert(j); |
---|
| 304 | _read_unit_nb_register_write [i] ++; |
---|
| 305 | |
---|
| 306 | std::cout << " * bypass_write : " << _nb_bypass_write [j] << std::endl; |
---|
| 307 | std::cout << " * Read_unit "+toString(i)+" must take the bypass_write with write_unit "+toString(j)+"." << std::endl; |
---|
| 308 | _set_read_unit_source_bypass_write [i].insert(j); |
---|
| 309 | _read_unit_nb_bypass_write [i] += _nb_bypass_write [j]; |
---|
| 310 | break; |
---|
| 311 | } |
---|
| 312 | } |
---|
| 313 | } |
---|
| 314 | } |
---|
| 315 | |
---|
| 316 | for (uint32_t i=0; i<_nb_read_unit; i++) |
---|
| 317 | { |
---|
| 318 | std::cout << " * Read_unit[" << i << "]" << std::endl; |
---|
| 319 | for (uint32_t j=0; j<_nb_execute_unit; j++) |
---|
| 320 | { |
---|
| 321 | std::cout << " * Execute_unit[" << j << "]" << std::endl; |
---|
| 322 | // Test the thread executed on this execute_unit |
---|
| 323 | for (uint32_t k=0; k<_nb_thread; k++) |
---|
| 324 | { |
---|
| 325 | std::cout << " * Thread[" << k << "]" << std::endl; |
---|
| 326 | if ((_read_unit_to_execution_unit_table_thread [j][k]) and |
---|
| 327 | (_link_read_unit_with_thread [i][k]) and |
---|
| 328 | (_is_load_store_unit [j])) |
---|
| 329 | { |
---|
| 330 | std::cout << " * Find !!!!" << std::endl; |
---|
| 331 | std::cout << " * Bypass_memory !!!!" << std::endl; |
---|
| 332 | std::cout << " * Read_unit "+toString(i)+" must take the bypass_memory with load_store_unit "+toString(j)+"." << std::endl; |
---|
| 333 | |
---|
| 334 | _set_read_unit_source_bypass_memory [i].insert(j); |
---|
| 335 | _read_unit_nb_bypass_memory [i] += _nb_bypass_memory [j]; |
---|
| 336 | break; |
---|
| 337 | } |
---|
| 338 | } |
---|
| 339 | } |
---|
| 340 | } |
---|
| 341 | |
---|
| 342 | test(); |
---|
| 343 | |
---|
| 344 | _param_read_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::Parameters * [_nb_read_unit]; |
---|
| 345 | for (uint32_t i=0; i<_nb_read_unit; i++) |
---|
| 346 | _param_read_unit [i] = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::Parameters |
---|
| 347 | (_size_read_queue [i], |
---|
| 348 | _size_reservation_station [i], |
---|
| 349 | _nb_context , |
---|
| 350 | _nb_front_end , |
---|
| 351 | _nb_ooo_engine , |
---|
| 352 | _nb_packet , |
---|
| 353 | _size_general_data , |
---|
| 354 | _size_special_data , |
---|
| 355 | _max_nb_general_register , |
---|
| 356 | _max_nb_special_register , |
---|
| 357 | 1*_read_unit_nb_register_write [i], |
---|
| 358 | 1*_read_unit_nb_register_write [i], |
---|
| 359 | _max_size_store_queue , |
---|
| 360 | _max_size_load_queue , |
---|
| 361 | _nb_inst_retire [i], |
---|
| 362 | _read_unit_nb_bypass_write [i], |
---|
| 363 | _read_unit_nb_bypass_memory [i]); |
---|
| 364 | |
---|
| 365 | _param_functionnal_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::Parameters * [_nb_functionnal_unit]; |
---|
| 366 | _param_load_store_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Parameters * [_nb_load_store_unit]; |
---|
| 367 | |
---|
| 368 | uint32_t x=0; |
---|
| 369 | uint32_t y=0; |
---|
| 370 | |
---|
| 371 | for (uint32_t i=0; i<_nb_execute_unit; i++) |
---|
| 372 | if (_is_load_store_unit [i] == false) |
---|
| 373 | { |
---|
| 374 | _translate_num_execute_unit [i] = x; |
---|
| 375 | |
---|
| 376 | _param_functionnal_unit [x] = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::Parameters |
---|
| 377 | (_nb_context , |
---|
| 378 | _nb_front_end , |
---|
| 379 | _nb_ooo_engine , |
---|
| 380 | _nb_packet , |
---|
| 381 | _size_general_data , |
---|
| 382 | _max_nb_general_register , |
---|
| 383 | _size_special_data , |
---|
| 384 | _max_nb_special_register , |
---|
| 385 | _max_size_store_queue , |
---|
| 386 | _max_size_load_queue , |
---|
| 387 | _timing [i], |
---|
| 388 | _get_custom_information ); |
---|
| 389 | |
---|
| 390 | x++; |
---|
| 391 | } |
---|
| 392 | else |
---|
| 393 | { |
---|
| 394 | _translate_num_execute_unit [i] = y; |
---|
| 395 | |
---|
| 396 | _param_load_store_unit [y] = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Parameters |
---|
| 397 | (_size_store_queue [y], |
---|
| 398 | _size_load_queue [y], |
---|
| 399 | _size_speculative_access_queue [y], |
---|
| 400 | _nb_port_check [y], |
---|
| 401 | _speculative_load [y], |
---|
| 402 | _nb_bypass_memory [y], |
---|
| 403 | _nb_context , |
---|
| 404 | _nb_front_end , |
---|
| 405 | _nb_ooo_engine , |
---|
| 406 | _nb_packet , |
---|
| 407 | _size_general_data , |
---|
| 408 | _size_special_data , |
---|
| 409 | _max_nb_special_register , |
---|
| 410 | _max_nb_general_register ); |
---|
| 411 | |
---|
| 412 | y ++; |
---|
| 413 | } |
---|
| 414 | |
---|
| 415 | for (uint32_t i=0; i<_nb_load_store_unit; i++) |
---|
| 416 | |
---|
| 417 | _param_write_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::Parameters * [_nb_write_unit]; |
---|
| 418 | for (uint32_t i=0; i<_nb_write_unit; i++) |
---|
| 419 | _param_write_unit [i] = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::Parameters |
---|
| 420 | (_size_write_queue [i], |
---|
| 421 | _size_execute_queue [i], |
---|
| 422 | _nb_context , |
---|
| 423 | _nb_front_end , |
---|
| 424 | _nb_ooo_engine , |
---|
| 425 | _nb_packet , |
---|
| 426 | _size_general_data , |
---|
| 427 | _max_nb_general_register , |
---|
| 428 | _size_special_data , |
---|
| 429 | _max_nb_special_register , |
---|
| 430 | _nb_bypass_write [i]); |
---|
| 431 | |
---|
| 432 | |
---|
| 433 | _param_read_unit_to_execution_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::network::read_unit_to_execution_unit::Parameters |
---|
| 434 | (_nb_read_unit , |
---|
| 435 | _nb_execute_unit , |
---|
| 436 | _nb_context , |
---|
| 437 | _nb_front_end , |
---|
| 438 | _nb_ooo_engine , |
---|
| 439 | _nb_packet , |
---|
| 440 | _size_general_data , |
---|
| 441 | _size_special_data , |
---|
| 442 | _max_nb_general_register , |
---|
| 443 | _max_nb_special_register , |
---|
| 444 | _max_size_store_queue , |
---|
| 445 | _max_size_load_queue , |
---|
| 446 | _read_unit_to_execution_unit_priority , |
---|
| 447 | _read_unit_to_execution_unit_table_routing , |
---|
| 448 | _read_unit_to_execution_unit_table_execute_type, |
---|
| 449 | _read_unit_to_execution_unit_table_thread ); |
---|
| 450 | |
---|
| 451 | _param_execution_unit_to_write_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::network::execution_unit_to_write_unit::Parameters |
---|
| 452 | (_nb_execute_unit , |
---|
| 453 | _nb_write_unit , |
---|
| 454 | _nb_context , |
---|
| 455 | _nb_front_end , |
---|
| 456 | _nb_ooo_engine , |
---|
| 457 | _nb_packet , |
---|
| 458 | _size_general_data , |
---|
| 459 | _size_special_data , |
---|
| 460 | _max_nb_general_register , |
---|
| 461 | _max_nb_special_register , |
---|
| 462 | _execution_unit_to_write_unit_priority , |
---|
| 463 | _execution_unit_to_write_unit_table_routing, |
---|
| 464 | _execution_unit_to_write_unit_table_thread ); |
---|
| 465 | |
---|
| 466 | _param_register_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::Parameters |
---|
| 467 | (_nb_ooo_engine , |
---|
| 468 | _size_general_data , |
---|
| 469 | _size_special_data , |
---|
| 470 | _nb_gpr_read , |
---|
| 471 | _nb_gpr_write , |
---|
| 472 | _nb_gpr_bank , |
---|
| 473 | _nb_gpr_port_read_by_bank , |
---|
| 474 | _nb_gpr_port_write_by_bank , |
---|
| 475 | _nb_spr_read , |
---|
| 476 | _nb_spr_write , |
---|
| 477 | _nb_spr_bank , |
---|
| 478 | _nb_spr_port_read_by_bank , |
---|
| 479 | _nb_spr_port_write_by_bank , |
---|
| 480 | _nb_general_register , |
---|
| 481 | _nb_special_register , |
---|
| 482 | _nb_inst_insert_rob , |
---|
| 483 | _nb_inst_retire_rob ); |
---|
| 484 | |
---|
| 485 | |
---|
| 486 | _max_size_dcache_context_id = 0; |
---|
| 487 | _max_size_dcache_packet_id = 0; |
---|
| 488 | |
---|
| 489 | for (uint32_t i=0; i<_nb_load_store_unit; i++) |
---|
| 490 | { |
---|
| 491 | if (_param_load_store_unit [i]->_size_dcache_context_id > _max_size_dcache_context_id) _max_size_dcache_context_id = _param_load_store_unit [i]->_size_dcache_context_id; |
---|
| 492 | if (_param_load_store_unit [i]->_size_dcache_packet_id > _max_size_dcache_packet_id) _max_size_dcache_packet_id = _param_load_store_unit [i]->_size_dcache_packet_id; |
---|
| 493 | } |
---|
| 494 | |
---|
| 495 | _have_port_dcache_context_id = (_max_size_dcache_context_id>1); |
---|
| 496 | |
---|
| 497 | log_printf(FUNC,Execute_loop,FUNCTION,"End"); |
---|
| 498 | }; |
---|
| 499 | |
---|
| 500 | // #undef FUNCTION |
---|
| 501 | // #define FUNCTION "Execute_loop::Parameters (copy)" |
---|
| 502 | // Parameters::Parameters (Parameters & param) |
---|
| 503 | // { |
---|
| 504 | // log_printf(FUNC,Execute_loop,FUNCTION,"Begin"); |
---|
| 505 | |
---|
| 506 | // test(); |
---|
| 507 | |
---|
| 508 | // log_printf(FUNC,Execute_loop,FUNCTION,"End"); |
---|
| 509 | // }; |
---|
| 510 | |
---|
| 511 | #undef FUNCTION |
---|
| 512 | #define FUNCTION "Execute_loop::~Parameters" |
---|
| 513 | Parameters::~Parameters () |
---|
| 514 | { |
---|
| 515 | log_printf(FUNC,Execute_loop,FUNCTION,"Begin"); |
---|
| 516 | |
---|
| 517 | delete [] _param_read_unit; |
---|
| 518 | delete [] _param_functionnal_unit; |
---|
| 519 | delete [] _param_load_store_unit; |
---|
| 520 | delete [] _param_write_unit; |
---|
| 521 | delete _param_read_unit_to_execution_unit; |
---|
| 522 | delete _param_execution_unit_to_write_unit; |
---|
| 523 | delete _param_register_unit; |
---|
| 524 | |
---|
| 525 | delete [] _read_unit_to_execution_unit_table_execute_type; |
---|
| 526 | delete [] _read_unit_nb_register_write; |
---|
| 527 | delete [] _read_unit_nb_bypass_write; |
---|
| 528 | delete [] _read_unit_nb_bypass_memory; |
---|
| 529 | delete [] _set_read_unit_source_register_write ; |
---|
| 530 | delete [] _set_read_unit_source_bypass_write ; |
---|
| 531 | delete [] _set_read_unit_source_bypass_memory ; |
---|
| 532 | delete [] _link_read_unit_with_load_store_unit; |
---|
| 533 | delete [] _link_read_unit_with_write_unit; |
---|
| 534 | delete [] _link_read_unit_with_thread; |
---|
| 535 | delete [] _is_load_store_unit; |
---|
| 536 | delete [] _translate_num_execute_unit; |
---|
| 537 | |
---|
| 538 | log_printf(FUNC,Execute_loop,FUNCTION,"End"); |
---|
| 539 | }; |
---|
| 540 | |
---|
| 541 | }; // end namespace execute_loop |
---|
| 542 | }; // end namespace multi_execute_loop |
---|
| 543 | }; // end namespace core |
---|
| 544 | |
---|
| 545 | }; // end namespace behavioural |
---|
| 546 | }; // end namespace morpheo |
---|