Changeset 138 for trunk/IPs/systemC/processor/Morpheo/Behavioural
- Timestamp:
- May 12, 2010, 7:34:01 PM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural
- Files:
-
- 1 added
- 77 edited
- 5 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/include/Parameters.h
r136 r138 59 59 // Read bloc 60 60 public : uint32_t _nb_read_bloc ;// 61 public : uint32_t * _nb_inst_read ;//[nb_read_bloc] 61 62 public : uint32_t * _size_read_queue ;//[nb_read_bloc] 62 63 public : uint32_t * _size_reservation_station ;//[nb_read_bloc] … … 65 66 // Write bloc 66 67 public : uint32_t _nb_write_bloc ;// 68 public : uint32_t * _nb_inst_write ;//[nb_write_bloc] 67 69 public : uint32_t * _size_write_queue ;//[nb_write_bloc] 68 70 public : uint32_t * _size_execute_queue ;//[nb_write_bloc] … … 76 78 public : uint32_t * _size_load_queue ;//[nb_load_store_unit] 77 79 public : uint32_t * _size_speculative_access_queue ;//[nb_load_store_unit] 80 public : uint32_t * _nb_store_queue_bank ;//[nb_load_store_unit] 81 public : uint32_t * _nb_load_queue_bank ;//[nb_load_store_unit] 78 82 public : uint32_t * _nb_port_check ;//[nb_load_store_unit] 79 83 public : core::multi_execute_loop::execute_loop::Tspeculative_load_t 80 84 * _speculative_load ;//[nb_load_store_unit] 85 public : Tpredictor_t * _speculative_commit_predictor_scheme ;//[nb_load_store_unit] 86 public : uint32_t ** _lsu_pht_size_counter ;//[nb_load_store_unit][1] 87 public : uint32_t ** _lsu_pht_nb_counter ;//[nb_load_store_unit][1] 81 88 public : uint32_t * _nb_bypass_memory ;//[nb_load_store_unit] 82 89 public : uint32_t * _nb_cache_port ;//[nb_load_store_unit] … … 130 137 public : uint32_t * _size_re_order_buffer ;//[nb_ooo_engine] 131 138 public : uint32_t * _nb_re_order_buffer_bank ;//[nb_ooo_engine] 139 public : morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::Tretire_ooo_scheme_t 140 * _retire_ooo_scheme ;//[nb_ooo_engine] 132 141 public : Tpriority_t * _commit_priority ;//[nb_ooo_engine] 133 142 public : Tload_balancing_t * _commit_load_balancing ;//[nb_ooo_engine] … … 139 148 public : Tload_balancing_t * _issue_load_balancing ;//[nb_ooo_engine] 140 149 public : uint32_t * _size_reexecute_queue ;//[nb_ooo_engine] 141 public : Tpriority_t * _reexecute_priority ;//[nb_ooo_engine]142 public : Tload_balancing_t * _reexecute_load_balancing ;//[nb_ooo_engine]143 150 144 151 // Execute_loop … … 166 173 public : uint32_t * _link_decod_bloc_with_thread ;//[nb_thread] 167 174 public : uint32_t * _link_rename_bloc_with_front_end ;//[nb_front_end] 168 public : bool *** _table_dispatch ;//[nb_ooo_engine][nb_inst_issue][nb_read_bloc]169 public : bool ** _link_read_bloc_and_load_store_unit ;//[nb_read_bloc][nb_load_store_unit]175 //public : bool *** _table_dispatch ;//[nb_ooo_engine][nb_issue_queue_bank][nb_read_bloc] 176 public : uint32_t * _link_read_bloc_with_load_store_unit ;//[nb_load_store_unit] 170 177 public : bool ** _link_read_bloc_and_functionnal_unit ;//[nb_read_bloc][nb_functionnal_unit] 171 public : bool ** _link_write_bloc_and_load_store_unit ;//[nb_write_bloc][nb_load_store_unit]178 public : uint32_t * _link_write_bloc_with_load_store_unit ;//[nb_load_store_unit] 172 179 public : bool ** _link_write_bloc_and_functionnal_unit ;//[nb_write_bloc][nb_functionnal_unit] 173 180 public : uint32_t * _link_load_store_unit_with_thread ;//[nb_thread] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/src/Configuration.cpp
r124 r138 46 46 fromString<uint32_t> (_simulator->getParam("debug_idle_time"))); 47 47 48 log_init(fromString<bool> (_simulator->getParam("debug_log_file_generate")),48 log_init(fromString<bool> (_simulator->getParam("debug_log_file_generate")), 49 49 fromString<bool> (_simulator->getParam("simulation_file_with_date")), 50 50 fromString<bool> (_simulator->getParam("simulation_file_with_pid")), … … 91 91 // Simulation condition stop 92 92 //-------------------------------------------------- 93 simulation_init (fromString<double>(_simulator->getParam("simulation_nb_cycle")), 94 fromString<double>(_simulator->getParam("debug_nb_cycle")), 95 fromString<double>(_simulator->getParam("simulation_nb_instruction")), 96 fromString<bool> (_simulator->getParam("simulation_file_with_date")), 97 fromString<bool> (_simulator->getParam("simulation_file_with_pid")) 93 simulation_init (fromString<double> (_simulator->getParam("simulation_nb_cycle")), 94 fromString<double> (_simulator->getParam("debug_nb_cycle")), 95 fromString<double> (_simulator->getParam("simulation_nb_instruction")), 96 fromString<stop_type_t>(_simulator->getParam("simulation_stop_type")), 97 fromString<bool> (_simulator->getParam("simulation_file_with_date")), 98 fromString<bool> (_simulator->getParam("simulation_file_with_pid")) 98 99 ); 99 100 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/src/Instance.cpp
r136 r138 74 74 DELETE1(_param->_link_load_store_unit_with_thread ,_param->_nb_thread); 75 75 DELETE2(_param->_link_write_bloc_and_functionnal_unit ,_param->_nb_write_bloc,_param->_nb_functionnal_unit); 76 DELETE 2(_param->_link_write_bloc_and_load_store_unit ,_param->_nb_write_bloc,_param->_nb_load_store_unit);76 DELETE1(_param->_link_write_bloc_with_load_store_unit ,_param->_nb_load_store_unit); 77 77 DELETE2(_param->_link_read_bloc_and_functionnal_unit ,_param->_nb_read_bloc,_param->_nb_functionnal_unit); 78 DELETE 2(_param->_link_read_bloc_and_load_store_unit ,_param->_nb_read_bloc,_param->_nb_load_store_unit);79 DELETE3(_param->_table_dispatch ,_param->_nb_ooo_engine,_param->_nb_inst_issue[it1],_param->_nb_read_bloc);78 DELETE1(_param->_link_read_bloc_with_load_store_unit ,_param->_nb_load_store_unit); 79 // DELETE3(_param->_table_dispatch ,_param->_nb_ooo_engine,_param->_nb_issue_queue_bank[it1],_param->_nb_read_bloc); 80 80 DELETE1(_param->_link_rename_bloc_with_front_end ,_param->_nb_front_end); 81 81 DELETE1(_param->_link_decod_bloc_with_thread ,_param->_nb_thread); … … 98 98 DELETE1(_param->_nb_execute_unit ,_param->_nb_execute_loop); 99 99 DELETE1(_param->_nb_read_unit ,_param->_nb_execute_loop); 100 DELETE1(_param->_reexecute_load_balancing ,_param->_nb_ooo_engine);101 DELETE1(_param->_reexecute_priority ,_param->_nb_ooo_engine);102 100 DELETE1(_param->_size_reexecute_queue ,_param->_nb_ooo_engine); 103 101 DELETE1(_param->_issue_load_balancing ,_param->_nb_ooo_engine); … … 108 106 DELETE1(_param->_commit_load_balancing ,_param->_nb_ooo_engine); 109 107 DELETE1(_param->_commit_priority ,_param->_nb_ooo_engine); 108 DELETE1(_param->_retire_ooo_scheme ,_param->_nb_ooo_engine); 110 109 DELETE1(_param->_nb_re_order_buffer_bank ,_param->_nb_ooo_engine); 111 110 DELETE1(_param->_size_re_order_buffer ,_param->_nb_ooo_engine); … … 136 135 DELETE3(_param->_timing ,_param->_nb_functionnal_unit,MAX_TYPE,MAX_OPERATION); 137 136 DELETE1(_param->_nb_inst_functionnal_unit ,_param->_nb_functionnal_unit); 138 DELETE1(_param->_speculative_load ,_param->_nb_load_store_unit);139 137 DELETE1(_param->_nb_inst_memory ,_param->_nb_load_store_unit); 140 138 DELETE1(_param->_nb_cache_port ,_param->_nb_load_store_unit); 141 139 DELETE1(_param->_nb_bypass_memory ,_param->_nb_load_store_unit); 140 DELETE2(_param->_lsu_pht_nb_counter ,_param->_nb_load_store_unit,1); 141 DELETE2(_param->_lsu_pht_size_counter ,_param->_nb_load_store_unit,1); 142 DELETE1(_param->_speculative_commit_predictor_scheme ,_param->_nb_load_store_unit); 143 DELETE1(_param->_speculative_load ,_param->_nb_load_store_unit); 142 144 DELETE1(_param->_nb_port_check ,_param->_nb_load_store_unit); 145 DELETE1(_param->_nb_load_queue_bank ,_param->_nb_load_store_unit); 146 DELETE1(_param->_nb_store_queue_bank ,_param->_nb_load_store_unit); 143 147 DELETE1(_param->_size_speculative_access_queue ,_param->_nb_load_store_unit); 144 148 DELETE1(_param->_size_load_queue ,_param->_nb_load_store_unit); 145 149 DELETE1(_param->_size_store_queue ,_param->_nb_load_store_unit); 150 146 151 DELETE1(_param->_write_queue_scheme ,_param->_nb_write_bloc); 147 152 DELETE1(_param->_nb_bypass_write ,_param->_nb_write_bloc); 148 153 DELETE1(_param->_size_execute_queue ,_param->_nb_write_bloc); 149 154 DELETE1(_param->_size_write_queue ,_param->_nb_write_bloc); 155 DELETE1(_param->_nb_inst_write ,_param->_nb_write_bloc); 150 156 DELETE1(_param->_nb_inst_retire_reservation_station ,_param->_nb_read_bloc); 151 157 DELETE1(_param->_size_reservation_station ,_param->_nb_read_bloc); 152 158 DELETE1(_param->_size_read_queue ,_param->_nb_read_bloc); 159 DELETE1(_param->_nb_inst_read ,_param->_nb_read_bloc); 153 160 // DELETE1(_param->_size_read_counter ,_param->_nb_rename_bloc); 154 161 DELETE1(_param->_nb_rename_unit_bank ,_param->_nb_rename_bloc); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/src/Instance_fromInternalStructure.cpp
r136 r138 138 138 // Read_bloc 139 139 //----------------------------------------------------- 140 ALLOC1(_param->_nb_inst_read ,uint32_t,_param->_nb_read_bloc); 140 141 ALLOC1(_param->_size_read_queue ,uint32_t,_param->_nb_read_bloc); 141 142 ALLOC1(_param->_size_reservation_station ,uint32_t,_param->_nb_read_bloc); … … 146 147 //log_printf(INFO,Configuration,FUNCTION,_("READ_BLOC [%d]"),i); 147 148 149 _param->_nb_inst_read [i] = fromString<uint32_t> (getParam("nb_inst_read" ,"read_bloc",toString(i).c_str(),"")); 148 150 _param->_size_read_queue [i] = fromString<uint32_t> (getParam("size_read_queue" ,"read_bloc",toString(i).c_str(),"")); 149 151 _param->_size_reservation_station [i] = fromString<uint32_t> (getParam("size_reservation_station" ,"read_bloc",toString(i).c_str(),"")); … … 154 156 // Write_bloc 155 157 //----------------------------------------------------- 158 ALLOC1(_param->_nb_inst_write ,uint32_t,_param->_nb_write_bloc); 156 159 ALLOC1(_param->_size_write_queue ,uint32_t,_param->_nb_write_bloc); 157 160 ALLOC1(_param->_size_execute_queue,uint32_t,_param->_nb_write_bloc); … … 163 166 //log_printf(INFO,Configuration,FUNCTION,_("WRITE_BLOC [%d]"),i); 164 167 168 _param->_nb_inst_write [i] = fromString<uint32_t> (getParam("nb_inst_write" ,"write_bloc",toString(i).c_str(),"")); 165 169 _param->_size_write_queue [i] = fromString<uint32_t> (getParam("size_write_queue" ,"write_bloc",toString(i).c_str(),"")); 166 170 _param->_size_execute_queue [i] = fromString<uint32_t> (getParam("size_execute_queue","write_bloc",toString(i).c_str(),"")); … … 172 176 // load_store_unit 173 177 //----------------------------------------------------- 174 ALLOC1(_param->_size_store_queue ,uint32_t,_param->_nb_load_store_unit); 175 ALLOC1(_param->_size_load_queue ,uint32_t,_param->_nb_load_store_unit); 176 ALLOC1(_param->_size_speculative_access_queue,uint32_t,_param->_nb_load_store_unit); 177 ALLOC1(_param->_nb_port_check ,uint32_t,_param->_nb_load_store_unit); 178 ALLOC1(_param->_nb_bypass_memory ,uint32_t,_param->_nb_load_store_unit); 179 ALLOC1(_param->_nb_cache_port ,uint32_t,_param->_nb_load_store_unit); 180 ALLOC1(_param->_nb_inst_memory ,uint32_t,_param->_nb_load_store_unit); 181 ALLOC1(_param->_speculative_load ,core::multi_execute_loop::execute_loop::Tspeculative_load_t,_param->_nb_load_store_unit); 178 ALLOC1(_param->_size_store_queue ,uint32_t ,_param->_nb_load_store_unit); 179 ALLOC1(_param->_size_load_queue ,uint32_t ,_param->_nb_load_store_unit); 180 ALLOC1(_param->_size_speculative_access_queue ,uint32_t ,_param->_nb_load_store_unit); 181 ALLOC1(_param->_nb_store_queue_bank ,uint32_t ,_param->_nb_load_store_unit); 182 ALLOC1(_param->_nb_load_queue_bank ,uint32_t ,_param->_nb_load_store_unit); 183 ALLOC1(_param->_nb_port_check ,uint32_t ,_param->_nb_load_store_unit); 184 ALLOC1(_param->_speculative_load ,core::multi_execute_loop::execute_loop::Tspeculative_load_t,_param->_nb_load_store_unit); 185 ALLOC1(_param->_speculative_commit_predictor_scheme,Tpredictor_t,_param->_nb_load_store_unit); 186 ALLOC2(_param->_lsu_pht_size_counter ,uint32_t ,_param->_nb_load_store_unit,1); 187 ALLOC2(_param->_lsu_pht_nb_counter ,uint32_t ,_param->_nb_load_store_unit,1); 188 ALLOC1(_param->_nb_bypass_memory ,uint32_t ,_param->_nb_load_store_unit); 189 ALLOC1(_param->_nb_cache_port ,uint32_t ,_param->_nb_load_store_unit); 190 ALLOC1(_param->_nb_inst_memory ,uint32_t ,_param->_nb_load_store_unit); 182 191 183 192 for (uint32_t i=0; i<_param->_nb_load_store_unit; ++i) … … 185 194 //log_printf(INFO,Configuration,FUNCTION,_("LOAD_STORE_UNIT [%d]"),i); 186 195 187 _param->_size_store_queue [i] = fromString<uint32_t> (getParam("size_store_queue" ,"load_store_unit",toString(i).c_str(),"")); 188 _param->_size_load_queue [i] = fromString<uint32_t> (getParam("size_load_queue" ,"load_store_unit",toString(i).c_str(),"")); 189 _param->_size_speculative_access_queue [i] = fromString<uint32_t> (getParam("size_speculative_access_queue","load_store_unit",toString(i).c_str(),"")); 190 _param->_nb_port_check [i] = fromString<uint32_t> (getParam("nb_port_check" ,"load_store_unit",toString(i).c_str(),"")); 191 _param->_nb_bypass_memory [i] = fromString<uint32_t> (getParam("nb_bypass_memory" ,"load_store_unit",toString(i).c_str(),"")); 192 _param->_nb_cache_port [i] = fromString<uint32_t> (getParam("nb_cache_port" ,"load_store_unit",toString(i).c_str(),"")); 193 _param->_nb_inst_memory [i] = fromString<uint32_t> (getParam("nb_inst_memory" ,"load_store_unit",toString(i).c_str(),"")); 194 195 _param->_speculative_load [i] = fromString<core::multi_execute_loop::execute_loop::Tspeculative_load_t> (getParam("speculative_load","load_store_unit",toString(i).c_str(),"")); 196 _param->_size_store_queue [i] = fromString<uint32_t > (getParam("size_store_queue" ,"load_store_unit",toString(i).c_str(),"")); 197 _param->_size_load_queue [i] = fromString<uint32_t > (getParam("size_load_queue" ,"load_store_unit",toString(i).c_str(),"")); 198 _param->_size_speculative_access_queue [i] = fromString<uint32_t > (getParam("size_speculative_access_queue" ,"load_store_unit",toString(i).c_str(),"")); 199 _param->_nb_store_queue_bank [i] = fromString<uint32_t > (getParam("nb_store_queue_bank" ,"load_store_unit",toString(i).c_str(),"")); 200 _param->_nb_load_queue_bank [i] = fromString<uint32_t > (getParam("nb_load_queue_bank" ,"load_store_unit",toString(i).c_str(),"")); 201 _param->_speculative_load [i] = fromString<core::multi_execute_loop::execute_loop::Tspeculative_load_t> 202 (getParam("speculative_load" ,"load_store_unit",toString(i).c_str(),"")); 203 _param->_speculative_commit_predictor_scheme [i] = fromString<Tpredictor_t> 204 (getParam("speculative_commit_predictor_scheme","load_store_unit",toString(i).c_str(),"")); 205 _param->_nb_port_check [i] = fromString<uint32_t > (getParam("nb_port_check" ,"load_store_unit",toString(i).c_str(),"")); 206 207 // just read !!! 208 try 209 { 210 getParam("nb_predictor","load_store_unit",toString(i).c_str(), ""); 211 } 212 catch (morpheo::ErrorMorpheo & error) 213 { 214 } 215 216 const uint32_t max_nb_predictor=1; 217 for (uint32_t j=0; j<max_nb_predictor; ++j) 218 { 219 //log_printf(INFO,Configuration,FUNCTION,_("PREDICTOR [%d][%d]"),i,j); 220 _param->_lsu_pht_size_counter [i][j] = fromString<uint32_t > (getParam("lsu_pht_size_counter" ,"load_store_unit",toString(i).c_str(),"predictor",toString(j).c_str(), "")); 221 _param->_lsu_pht_nb_counter [i][j] = fromString<uint32_t > (getParam("lsu_pht_nb_counter" ,"load_store_unit",toString(i).c_str(),"predictor",toString(j).c_str(), "")); 222 } 223 224 _param->_nb_bypass_memory [i] = fromString<uint32_t > (getParam("nb_bypass_memory" ,"load_store_unit",toString(i).c_str(),"")); 225 _param->_nb_cache_port [i] = fromString<uint32_t > (getParam("nb_cache_port" ,"load_store_unit",toString(i).c_str(),"")); 226 _param->_nb_inst_memory [i] = fromString<uint32_t > (getParam("nb_inst_memory" ,"load_store_unit",toString(i).c_str(),"")); 196 227 } 197 228 … … 318 349 } 319 350 320 for (uint32_t j=0; j<3; ++j) 351 const uint32_t max_nb_predictor=3; 352 for (uint32_t j=0; j<max_nb_predictor; ++j) 321 353 { 322 354 //log_printf(INFO,Configuration,FUNCTION,_("PREDICTOR [%d][%d]"),i,j); … … 345 377 ALLOC1(_param->_size_re_order_buffer ,uint32_t ,_param->_nb_ooo_engine); 346 378 ALLOC1(_param->_nb_re_order_buffer_bank ,uint32_t ,_param->_nb_ooo_engine); 379 ALLOC1(_param->_retire_ooo_scheme ,morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::Tretire_ooo_scheme_t 380 ,_param->_nb_ooo_engine); 347 381 ALLOC1(_param->_commit_priority ,Tpriority_t ,_param->_nb_ooo_engine); 348 382 ALLOC1(_param->_commit_load_balancing ,Tload_balancing_t,_param->_nb_ooo_engine); … … 354 388 ALLOC1(_param->_issue_load_balancing ,Tload_balancing_t,_param->_nb_ooo_engine); 355 389 ALLOC1(_param->_size_reexecute_queue ,uint32_t ,_param->_nb_ooo_engine); 356 ALLOC1(_param->_reexecute_priority ,Tpriority_t ,_param->_nb_ooo_engine);357 ALLOC1(_param->_reexecute_load_balancing,Tload_balancing_t,_param->_nb_ooo_engine);358 390 359 391 for (uint32_t i=0; i<_param->_nb_ooo_engine; ++i) … … 370 402 _param->_size_re_order_buffer [i] = fromString<uint32_t >(getParam("size_re_order_buffer" ,"ooo_engine",toString(i).c_str(), "")); 371 403 _param->_nb_re_order_buffer_bank [i] = fromString<uint32_t >(getParam("nb_re_order_buffer_bank" ,"ooo_engine",toString(i).c_str(), "")); 404 _param->_retire_ooo_scheme [i] = fromString<morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::Tretire_ooo_scheme_t> 405 (getParam("retire_ooo_scheme" ,"ooo_engine",toString(i).c_str(), "")); 372 406 _param->_commit_priority [i] = fromString<Tpriority_t >(getParam("commit_priority" ,"ooo_engine",toString(i).c_str(), "")); 373 407 _param->_commit_load_balancing [i] = fromString<Tload_balancing_t>(getParam("commit_load_balancing" ,"ooo_engine",toString(i).c_str(), "")); … … 379 413 _param->_issue_load_balancing [i] = fromString<Tload_balancing_t>(getParam("issue_load_balancing" ,"ooo_engine",toString(i).c_str(), "")); 380 414 _param->_size_reexecute_queue [i] = fromString<uint32_t >(getParam("size_reexecute_queue" ,"ooo_engine",toString(i).c_str(), "")); 381 _param->_reexecute_priority [i] = fromString<Tpriority_t >(getParam("reexecute_priority" ,"ooo_engine",toString(i).c_str(), ""));382 _param->_reexecute_load_balancing[i] = fromString<Tload_balancing_t>(getParam("reexecute_load_balancing","ooo_engine",toString(i).c_str(), ""));383 415 } 384 416 … … 434 466 ALLOC1(_param->_link_decod_bloc_with_thread ,uint32_t ,_param->_nb_thread); 435 467 ALLOC1(_param->_link_rename_bloc_with_front_end ,uint32_t ,_param->_nb_front_end); 436 ALLOC3(_param->_table_dispatch ,bool ,_param->_nb_ooo_engine,_param->_nb_inst_issue[it1],_param->_nb_read_bloc);437 ALLOC 2(_param->_link_read_bloc_and_load_store_unit ,bool ,_param->_nb_read_bloc,_param->_nb_load_store_unit);468 // ALLOC3(_param->_table_dispatch ,bool ,_param->_nb_ooo_engine,_param->_nb_issue_queue_bank[it1],_param->_nb_read_bloc); 469 ALLOC1(_param->_link_read_bloc_with_load_store_unit ,uint32_t ,_param->_nb_load_store_unit); 438 470 ALLOC2(_param->_link_read_bloc_and_functionnal_unit ,bool ,_param->_nb_read_bloc,_param->_nb_functionnal_unit); 439 ALLOC 2(_param->_link_write_bloc_and_load_store_unit ,bool ,_param->_nb_write_bloc,_param->_nb_load_store_unit);471 ALLOC1(_param->_link_write_bloc_with_load_store_unit ,uint32_t ,_param->_nb_load_store_unit); 440 472 ALLOC2(_param->_link_write_bloc_and_functionnal_unit ,bool ,_param->_nb_write_bloc,_param->_nb_functionnal_unit); 441 473 ALLOC1(_param->_link_load_store_unit_with_thread ,uint32_t ,_param->_nb_thread); … … 497 529 _param->_link_read_bloc_and_functionnal_unit [i][j] = fromString<bool>(dest[0]); 498 530 } 499 500 for (uint32_t j=0; j<_param->_nb_load_store_unit; ++j) 501 { 502 getLink_1("link_read_bloc_and_load_store_unit",toString(i).c_str(),toString(j).c_str(), ""); 503 _param->_link_read_bloc_and_load_store_unit [i][j] = fromString<bool>(dest[0]); 504 } 531 } 532 533 for (uint32_t i=0; i<_param->_nb_load_store_unit; ++i) 534 { 535 getLink_1("link_read_bloc_with_load_store_unit",toString(i).c_str(), ""); 536 _param->_link_read_bloc_with_load_store_unit [i] = fromString<uint32_t>(dest[0]); 537 538 getLink_1("link_write_bloc_with_load_store_unit",toString(i).c_str(), ""); 539 _param->_link_write_bloc_with_load_store_unit [i] = fromString<uint32_t>(dest[0]); 505 540 } 506 541 … … 516 551 _param->_link_write_bloc_and_functionnal_unit [i][j] = fromString<bool>(dest[0]); 517 552 } 518 519 for (uint32_t j=0; j<_param->_nb_load_store_unit; ++j)520 {521 getLink_1("link_write_bloc_and_load_store_unit",toString(i).c_str(),toString(j).c_str(), "");522 _param->_link_write_bloc_and_load_store_unit [i][j] = fromString<bool>(dest[0]);523 }524 553 } 525 554 … … 550 579 } 551 580 552 for (uint32_t i=0; i<_param->_nb_ooo_engine; ++i)553 for (uint32_t j=0; j<_param->_nb_inst_issue[i]; ++j)554 for (uint32_t k=0; k<_param->_nb_read_bloc; ++k)555 {556 getLink_1("table_dispatch",toString(i).c_str(),toString(j).c_str(),toString(k).c_str(),"");557 _param->_table_dispatch [i][j][k] = fromString<bool>(dest[0]);558 }581 // for (uint32_t i=0; i<_param->_nb_ooo_engine; ++i) 582 // for (uint32_t j=0; j<_param->_nb_issue_queue_bank[i]; ++j) 583 // for (uint32_t k=0; k<_param->_nb_read_bloc; ++k) 584 // { 585 // getLink_1("table_dispatch",toString(i).c_str(),toString(j).c_str(),toString(k).c_str(),""); 586 // _param->_table_dispatch [i][j][k] = fromString<bool>(dest[0]); 587 // } 559 588 560 589 test_use (); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/include/Parameters.h
r136 r138 34 34 public : uint32_t * _nb_inst_reexecute ;//[nb_ooo_engine] 35 35 public : uint32_t * _nb_inst_issue_queue ;//[nb_ooo_engine] 36 36 //public : uint32_t * _nb_inst_issue_slot ;//[nb_ooo_engine] 37 37 public : uint32_t ** _nb_inst_execute ;//[nb_ooo_engine][ooo_engine_nb_execute_loop] 38 38 public : bool * _issue_queue_in_order ;//[nb_ooo_engine] … … 52 52 public : Tpriority_t _dispatch_priority ; 53 53 public : Tload_balancing_t _dispatch_load_balancing ; 54 54 //public : bool **** _table_dispatch ;//[nb_ooo_engine][nb_inst_issue_slot][execute_loop][nb_read_unit] 55 55 public : bool *** _table_issue_type ;// [execute_loop][nb_read_unit][nb_type] 56 public : bool *** _table_issue_thread ;// [execute_loop][nb_read_unit][nb_thread] 57 56 58 public : uint32_t ** _translate_ooo_engine_num_front_end ;//[nb_ooo_engine][ooo_engine_nb_front_end] 57 59 public : uint32_t ** _translate_ooo_engine_num_execute_loop;//[nb_ooo_engine][ooo_engine_nb_execute_loop] 58 60 public : uint32_t ** _translate_execute_loop_num_ooo_engine;//[nb_execute_loop][execute_loop_nb_ooo_engine] 61 public : uint32_t *** _translate_num_context_to_num_thread ;//[nb_ooo_engine][ooo_engine_nb_front_end][nb_context] 59 62 60 63 public : uint32_t * _link_ooo_engine_with_front_end ;//[nb_front_end] … … 65 68 66 69 //public : uint32_t ** _execute_loop_nb_inst_insert ;//[nb_execute_loop][execute_loop_nb_ooo_engine] 67 70 //public : uint32_t ** _execute_loop_nb_inst_issue_slot ;//[nb_execute_loop][execute_loop_nb_ooo_engine] 68 71 //public : uint32_t * _link_execute_loop_with_ooo_engine ;//[nb_ooo_engine] 69 72 … … 75 78 //public : uint32_t _max_nb_inst_insert ; 76 79 public : uint32_t _max_nb_inst_issue_queue ; 77 80 //public : uint32_t _max_nb_inst_issue_slot ; 78 81 public : uint32_t _max_nb_read_unit ; 79 82 … … 90 93 uint32_t * front_end_nb_inst_branch_complete ,//[nb_front_end] 91 94 uint32_t * ooo_engine_nb_inst_branch_complete ,//[nb_ooo_engine] 92 // 95 // uint32_t * nb_inst_insert ,//[nb_ooo_engine] 93 96 uint32_t * nb_inst_reexecute ,//[nb_ooo_engine] 94 97 uint32_t * nb_inst_issue_queue ,//[nb_ooo_engine] 95 98 // uint32_t * nb_inst_issue_slot ,//[nb_ooo_engine] 96 99 uint32_t ** nb_inst_execute ,//[nb_ooo_engine][ooo_engine_nb_execute_loop] 97 100 bool * issue_queue_in_order ,//[nb_ooo_engine] … … 108 111 Tpriority_t dispatch_priority , 109 112 Tload_balancing_t dispatch_load_balancing , 110 113 // bool **** table_dispatch ,//[nb_ooo_engine][nb_inst_issue_slot][execute_loop][nb_read_unit] 111 114 bool *** table_issue_type ,// [execute_loop][nb_read_unit][nb_type] 112 //bool *** table_issue_thread ,// [execute_loop][nb_read_unit][nb_thread]115 bool *** table_issue_thread ,// [execute_loop][nb_read_unit][nb_thread] 113 116 uint32_t ** translate_ooo_engine_num_front_end ,//[nb_ooo_engine][ooo_engine_nb_front_end] 114 117 uint32_t ** translate_ooo_engine_num_execute_loop,//[nb_ooo_engine][ooo_engine_nb_execute_loop] 115 118 uint32_t ** translate_execute_loop_num_ooo_engine,//[nb_execute_loop][execute_loop_nb_ooo_engine] 119 uint32_t *** translate_num_context_to_num_thread ,//[nb_ooo_engine][ooo_engine_nb_front_end][nb_context] 120 116 121 bool is_toplevel=false); 117 122 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Core_Glue_genMealy_issue.cpp
r136 r138 16 16 17 17 /* 18 OOO SLOTExecute Loop19 ---+ 20 | +-----+ +-----+|21 -+->| | | |-+->22 | | | -()->| ||23 -+->| _ _ | ||-+->24 | | _X_ |-()->|| |25 -+->| | | |+-----26 | | | -()->| |27 -+->| | | |+-----28 | +-----+| | |29 ---+ crossbar| _ _ |-+->30 31 ---+ 32 | +-----+| | |33 -+->| | | |+-----34 | | | -()->| |35 -+->| _ _ | || +-----36 | | _X_ |-()->|| |37 -+->| | | |-+->38 | | | -()->| ||39 -+->| | | |-+->40 | +-----+ +-----+|41 ---+ crossbardispatch +-----18 OOO Execute Loop 19 ---+ +----- 20 | +-----+ | 21 -+->| |-+-> 22 | | | | 23 -+->| |-+-> 24 | | | | 25 -+->| | +----- 26 | | | 27 -+->| | +----- 28 | | | | 29 ---+ | _ _ |-+-> 30 | _X_ | | 31 ---+ | |-+-> 32 | | | | 33 -+->| | +----- 34 | | | 35 -+->| | +----- 36 | | | | 37 -+->| |-+-> 38 | | | | 39 -+->| |-+-> 40 | +-----+ | 41 ---+ dispatch +----- 42 42 */ 43 43 … … 75 75 { 76 76 Tcontrol_t READ_UNIT_ENABLE [_param->_nb_execute_loop][_param->_max_nb_read_unit]; 77 Tcontrol_t SLOT_ENABLE [_param->_nb_ooo_engine ][_param->_max_nb_inst_issue_slot];78 77 79 78 // Init -> all at 0 80 for (uint32_t i=0; i<_param->_nb_ooo_engine; ++i)81 for (uint32_t j=0; j<_param->_nb_inst_issue_slot[i]; ++j)82 SLOT_ENABLE [i][j] = 1;83 84 79 for (uint32_t i=0; i<_param->_nb_execute_loop; ++i) 85 80 for (uint32_t j=0; j<_param->_nb_read_unit[i]; ++j) … … 90 85 } 91 86 92 // std::list<num_read_unit_t> SLOT_TYPE [_param->_nb_ooo_engine][_param->_max_nb_inst_issue_slot][_param->_nb_type];93 94 // // for each read_unit95 // for (uint32_t i=0; i<_param->_nb_execute_loop; ++i)96 // for (uint32_t j=0; j<_param->_nb_read_unit[i]; ++j)97 // // test if this read_unit can receive an instruction98 // if (PORT_READ(in_ISSUE_EXECUTE_LOOP_ACK [i][j]) == 1)99 // for (uint32_t x=0; x<_nb_ooo_engine; ++x)100 // for (uint32_t y=0; y<_nb_inst_issue_slot[y]; ++y)101 // // test if can dispatch102 // if (_param->_table_dispatch [x][y][i][j])103 // for (uint32_t k=0;k<_param->_nb_type; ++k)104 // // Can receive this type105 // if (_param->_table_dispatch [i][j][k])106 // SLOT_TYPE[x][y][k].push_back(num_read_unit_t(i,j));107 108 // // Select an issue_slot of an ooo_engine109 // std::list<generic::priority::select_t> * select_ooo_engine = _priority_ooo_engine->select();110 // for (std::list<generic::priority::select_t>::iterator it_ooo_engine=select_ooo_engine->begin();111 // it_ooo_engine!=select_ooo_engine->end();112 // ++it_ooo_engine)113 // {114 // // ... get id of the most priotary115 // const uint32_t num_ooo_engine = it_ooo_engine->grp;116 // const uint32_t num_inst_issue_slot = it_ooo_engine->elt;117 118 // // Test if this ooo_engine is enable (can be desable if issue in_order)119 // if (OOO_ENGINE_ENABLE[num_ooo_engine])120 // {121 122 // }123 // }124 125 // for (uint32_t num_ooo_engine=0; num_ooo_engine<_param->_nb_ooo_engine; ++num_ooo_engine)126 127 87 std::list<generic::priority::select_t> * select_ooo_engine = _priority_ooo_engine->select(); 128 88 for (std::list<generic::priority::select_t>::iterator it_ooo_engine=select_ooo_engine->begin(); … … 130 90 ++it_ooo_engine) 131 91 { 132 uint32_t num_ooo_engine = it_ooo_engine->grp; 92 // select the most priotary 93 uint32_t num_ooo_engine = it_ooo_engine->grp; 133 94 134 95 for (uint32_t num_inst_issue_queue=0; num_inst_issue_queue<_param->_nb_inst_issue_queue[num_ooo_engine]; ++num_inst_issue_queue) 135 96 { 97 // init stop condition 136 98 bool find = false; 137 99 138 Tcontrol_t val = PORT_READ(in_ISSUE_OOO_ENGINE_VAL [num_ooo_engine][num_inst_issue_queue]); 139 Ttype_t type = PORT_READ(in_ISSUE_OOO_ENGINE_TYPE [num_ooo_engine][num_inst_issue_queue]); 100 // Read request information from issue_queue 101 Tcontrol_t val = PORT_READ(in_ISSUE_OOO_ENGINE_VAL [num_ooo_engine][num_inst_issue_queue]); 102 Ttype_t type = PORT_READ(in_ISSUE_OOO_ENGINE_TYPE [num_ooo_engine][num_inst_issue_queue]); 103 Tcontext_t context_id = (_param->_have_port_context_id )?PORT_READ(in_ISSUE_OOO_ENGINE_CONTEXT_ID [num_ooo_engine][num_inst_issue_queue]):0; 104 Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_ISSUE_OOO_ENGINE_FRONT_END_ID [num_ooo_engine][num_inst_issue_queue]):0; 105 uint32_t num_thread = _param->_translate_num_context_to_num_thread[num_ooo_engine][front_end_id][context_id]; 140 106 141 107 log_printf(TRACE,Core_Glue,FUNCTION," * num_ooo_engine : %d",num_ooo_engine ); 142 108 log_printf(TRACE,Core_Glue,FUNCTION," * num_inst_issue_queue : %d",num_inst_issue_queue); 143 109 log_printf(TRACE,Core_Glue,FUNCTION," * val : %d",val); 144 log_printf(TRACE,Core_Glue,FUNCTION," * type : %d",type); 145 110 log_printf(TRACE,Core_Glue,FUNCTION," * type : %d",type); 111 log_printf(TRACE,Core_Glue,FUNCTION," * context_id : %d",context_id); 112 log_printf(TRACE,Core_Glue,FUNCTION," * front_end_id : %d",front_end_id); 113 log_printf(TRACE,Core_Glue,FUNCTION," * num_thread : %d",num_thread); 114 146 115 if (val) 147 for (uint32_t num_inst_issue_slot=0; num_inst_issue_slot<_param->_nb_inst_issue_slot[num_ooo_engine]; ++num_inst_issue_slot) 116 // for each execute_loop 117 for (uint32_t num_execute_loop=0; num_execute_loop<_param->_nb_execute_loop; ++num_execute_loop) 148 118 { 149 log_printf(TRACE,Core_Glue,FUNCTION," * num_inst_issue_slot : %d",num_inst_issue_slot); 150 151 // scan all read_unit 152 153 if (SLOT_ENABLE [num_ooo_engine][num_inst_issue_slot]) 154 for (uint32_t num_execute_loop=0; num_execute_loop<_param->_nb_execute_loop; ++num_execute_loop) 155 { 156 std::list<generic::priority::select_t> * select_read_unit = _priority_read_unit[num_execute_loop]->select(); 157 for (std::list<generic::priority::select_t>::iterator it_read_unit=select_read_unit->begin(); 158 it_read_unit!=select_read_unit->end(); 159 ++it_read_unit) 160 { 161 // get the most priotary ... 162 uint32_t num_read_unit = it_read_unit->grp; 163 Tcontrol_t ack = READ_UNIT_ENABLE [num_execute_loop][num_read_unit]; 164 165 log_printf(TRACE,Core_Glue,FUNCTION," * num_execute_loop : %d",num_execute_loop); 166 log_printf(TRACE,Core_Glue,FUNCTION," * num_read_unit : %d",num_read_unit ); 167 log_printf(TRACE,Core_Glue,FUNCTION," * read_unit_enable : %d",ack ); 168 169 // test if : 170 // * read_unit can accept an instruction (valid and no previous instruction) 171 // * slot can issue an instruction at this read_unit 172 // * read_unit can accept this type 173 if (ack and 174 _param->_table_dispatch [num_ooo_engine][num_inst_issue_slot][num_execute_loop][num_read_unit] and 175 _param->_table_issue_type [num_execute_loop][num_read_unit][type]) 176 { 177 log_printf(TRACE,Core_Glue,FUNCTION," * find !!!"); 178 179 // find ! 180 // Transaction 181 READ_UNIT_ENABLE [num_execute_loop][num_read_unit] = false; // now, this read_unit is busy 182 ISSUE_EXECUTE_LOOP_VAL [num_execute_loop][num_read_unit] = 1; // = val 183 ISSUE_OOO_ENGINE_ACK [num_ooo_engine][num_inst_issue_queue] = 1; // = ack 184 SLOT_ENABLE [num_ooo_engine][num_inst_issue_slot] = false; // now this slot is used 185 186 if (_param->_have_port_context_id) 187 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_CONTEXT_ID [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_CONTEXT_ID [num_ooo_engine][num_inst_issue_queue])); 188 if (_param->_have_port_front_end_id) 189 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_FRONT_END_ID [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_FRONT_END_ID [num_ooo_engine][num_inst_issue_queue])); 190 if (_param->_have_port_ooo_engine_id) 191 { 192 Tcontext_t ooo_engine_id = _param->_translate_num_ooo_engine_to_execute_loop_ooo_engine_id [num_ooo_engine][num_execute_loop]; 193 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_OOO_ENGINE_ID [num_execute_loop][num_read_unit],ooo_engine_id); 194 } 195 if (_param->_have_port_rob_ptr) 196 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_PACKET_ID [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_PACKET_ID [num_ooo_engine][num_inst_issue_queue])); 197 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_OPERATION [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_OPERATION [num_ooo_engine][num_inst_issue_queue])); 198 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_TYPE [num_execute_loop][num_read_unit],type); 199 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_CANCEL [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_CANCEL [num_ooo_engine][num_inst_issue_queue])); 200 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_WRITE [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE [num_ooo_engine][num_inst_issue_queue])); 201 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_READ [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_READ [num_ooo_engine][num_inst_issue_queue])); 202 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_EMPTY [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_STORE_QUEUE_EMPTY [num_ooo_engine][num_inst_issue_queue])); 203 if (_param->_have_port_load_queue_ptr) 204 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_LOAD_QUEUE_PTR_WRITE [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_LOAD_QUEUE_PTR_WRITE [num_ooo_engine][num_inst_issue_queue])); 205 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_HAS_IMMEDIAT [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_HAS_IMMEDIAT [num_ooo_engine][num_inst_issue_queue])); 206 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_IMMEDIAT [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_IMMEDIAT [num_ooo_engine][num_inst_issue_queue])); 207 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_READ_RA [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_READ_RA [num_ooo_engine][num_inst_issue_queue])); 208 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RA [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RA [num_ooo_engine][num_inst_issue_queue])); 209 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_READ_RB [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_READ_RB [num_ooo_engine][num_inst_issue_queue])); 210 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RB [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RB [num_ooo_engine][num_inst_issue_queue])); 211 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_READ_RC [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_READ_RC [num_ooo_engine][num_inst_issue_queue])); 212 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RC [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RC [num_ooo_engine][num_inst_issue_queue])); 213 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_WRITE_RD [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_WRITE_RD [num_ooo_engine][num_inst_issue_queue])); 214 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RD [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RD [num_ooo_engine][num_inst_issue_queue])); 215 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_WRITE_RE [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_WRITE_RE [num_ooo_engine][num_inst_issue_queue])); 216 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RE [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RE [num_ooo_engine][num_inst_issue_queue])); 217 218 219 find = true; 220 break; 221 } 222 //if (find) 223 // break; 224 } 225 if (find) 119 // for each read_unit 120 std::list<generic::priority::select_t> * select_read_unit = _priority_read_unit[num_execute_loop]->select(); 121 for (std::list<generic::priority::select_t>::iterator it_read_unit=select_read_unit->begin(); 122 it_read_unit!=select_read_unit->end(); 123 ++it_read_unit) 124 { 125 // get the most priotary ... 126 uint32_t num_read_unit = it_read_unit->grp; 127 Tcontrol_t ack = READ_UNIT_ENABLE [num_execute_loop][num_read_unit]; 128 129 log_printf(TRACE,Core_Glue,FUNCTION," * num_execute_loop : %d",num_execute_loop); 130 log_printf(TRACE,Core_Glue,FUNCTION," * num_read_unit : %d",num_read_unit ); 131 log_printf(TRACE,Core_Glue,FUNCTION," * read_unit_enable : %d",ack ); 132 133 // test if : 134 // * read_unit can accept an instruction (valid and no previous instruction) 135 // * read_unit can accept this type 136 if (ack and 137 _param->_table_issue_type [num_execute_loop][num_read_unit][type] and 138 _param->_table_issue_thread [num_execute_loop][num_read_unit][num_thread]) 139 { 140 log_printf(TRACE,Core_Glue,FUNCTION," * find !!!"); 141 142 // find ! 143 // Transaction 144 find = true; 145 146 READ_UNIT_ENABLE [num_execute_loop][num_read_unit] = false; // now, this read_unit is busy 147 ISSUE_EXECUTE_LOOP_VAL [num_execute_loop][num_read_unit] = 1; // = val 148 ISSUE_OOO_ENGINE_ACK [num_ooo_engine][num_inst_issue_queue] = 1; // = ack 149 150 if (_param->_have_port_context_id) 151 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_CONTEXT_ID [num_execute_loop][num_read_unit],context_id); 152 if (_param->_have_port_front_end_id) 153 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_FRONT_END_ID [num_execute_loop][num_read_unit],front_end_id); 154 if (_param->_have_port_ooo_engine_id) 155 { 156 Tcontext_t ooo_engine_id = _param->_translate_num_ooo_engine_to_execute_loop_ooo_engine_id [num_ooo_engine][num_execute_loop]; 157 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_OOO_ENGINE_ID [num_execute_loop][num_read_unit],ooo_engine_id); 158 } 159 if (_param->_have_port_rob_ptr) 160 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_PACKET_ID [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_PACKET_ID [num_ooo_engine][num_inst_issue_queue])); 161 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_OPERATION [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_OPERATION [num_ooo_engine][num_inst_issue_queue])); 162 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_TYPE [num_execute_loop][num_read_unit],type); 163 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_CANCEL [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_CANCEL [num_ooo_engine][num_inst_issue_queue])); 164 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_WRITE [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE [num_ooo_engine][num_inst_issue_queue])); 165 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_READ [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_READ [num_ooo_engine][num_inst_issue_queue])); 166 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_EMPTY [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_STORE_QUEUE_EMPTY [num_ooo_engine][num_inst_issue_queue])); 167 if (_param->_have_port_load_queue_ptr) 168 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_LOAD_QUEUE_PTR_WRITE [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_LOAD_QUEUE_PTR_WRITE [num_ooo_engine][num_inst_issue_queue])); 169 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_HAS_IMMEDIAT [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_HAS_IMMEDIAT [num_ooo_engine][num_inst_issue_queue])); 170 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_IMMEDIAT [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_IMMEDIAT [num_ooo_engine][num_inst_issue_queue])); 171 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_READ_RA [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_READ_RA [num_ooo_engine][num_inst_issue_queue])); 172 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RA [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RA [num_ooo_engine][num_inst_issue_queue])); 173 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_READ_RB [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_READ_RB [num_ooo_engine][num_inst_issue_queue])); 174 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RB [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RB [num_ooo_engine][num_inst_issue_queue])); 175 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_READ_RC [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_READ_RC [num_ooo_engine][num_inst_issue_queue])); 176 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RC [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RC [num_ooo_engine][num_inst_issue_queue])); 177 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_WRITE_RD [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_WRITE_RD [num_ooo_engine][num_inst_issue_queue])); 178 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RD [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RD [num_ooo_engine][num_inst_issue_queue])); 179 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_WRITE_RE [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_WRITE_RE [num_ooo_engine][num_inst_issue_queue])); 180 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RE [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RE [num_ooo_engine][num_inst_issue_queue])); 226 181 break; 227 } 182 } 183 //if (find) 184 // break; 185 } 228 186 if (find) 229 187 break; … … 240 198 } 241 199 } 242 200 243 201 } 244 202 … … 260 218 }; // end namespace morpheo 261 219 #endif 262 263 /*264 bool OOO_ENGINE_ENABLE [_param->_nb_ooo_engine ];265 Tcontrol_t SLOT_ENABLE [_param->_nb_ooo_engine ][_param->_max_nb_inst_issue_slot];266 bool READ_UNIT_ENABLE [_param->_nb_execute_loop][_param->_max_nb_read_unit];267 268 // Init -> all at 0269 for (uint32_t i=0; i<_param->_nb_ooo_engine; ++i)270 {271 OOO_ENGINE_ENABLE [i] = true;272 273 for (uint32_t j=0; j<_param->_nb_inst_issue_slot[i]; ++j)274 SLOT_ENABLE [i][j] = 1;275 }276 277 for (uint32_t i=0; i<_param->_nb_execute_loop; ++i)278 for (uint32_t j=0; j<_param->_nb_read_unit[i]; ++j)279 {280 // Read unit is enable is signal ack is set281 READ_UNIT_ENABLE [i][j] = (PORT_READ(in_ISSUE_EXECUTE_LOOP_ACK [i][j]) == 1);282 log_printf(TRACE,Core_Glue,FUNCTION," * Read_unit [%d][%d].enable : %d",i,j,READ_UNIT_ENABLE[i][j]);283 }284 285 286 // for each execute_loop287 for (uint32_t i=0; i<_param->_nb_execute_loop; ++i)288 {289 // Scan all read_unit290 std::list<generic::priority::select_t> * select_read_unit = _priority_read_unit[i]->select();291 for (std::list<generic::priority::select_t>::iterator it_read_unit=select_read_unit->begin();292 it_read_unit!=select_read_unit->end();293 ++it_read_unit)294 {295 // get the most priotary ...296 uint32_t num_read_unit = it_read_unit->grp;297 298 log_printf(TRACE,Core_Glue,FUNCTION," * read_unit [%d][%d]",i,num_read_unit);299 300 // ... and test if this read_unit is valid301 if (READ_UNIT_ENABLE [i][num_read_unit])302 {303 bool find = false;304 305 // This read_unit is valid, now find an valid instruction306 // for each issue of each ooo_engine ...307 std::list<generic::priority::select_t> * select_ooo_engine = _priority_ooo_engine[i]->select();308 for (std::list<generic::priority::select_t>::iterator it_ooo_engine=select_ooo_engine->begin();309 it_ooo_engine!=select_ooo_engine->end();310 ++it_ooo_engine)311 {312 // ... get id of the most priotary313 const uint32_t ooo_engine_id = it_ooo_engine->grp;314 const uint32_t num_ooo_engine = _param->_translate_execute_loop_num_ooo_engine [i][ooo_engine_id];315 const uint32_t num_inst_issue_slot = it_ooo_engine->elt;316 317 log_printf(TRACE,Core_Glue,FUNCTION," * num_ooo_engine [%d (%d)][%d]",num_ooo_engine, ooo_engine_id,num_inst_issue_slot);318 319 if (OOO_ENGINE_ENABLE [num_ooo_engine] and SLOT_ENABLE [num_ooo_engine][num_inst_issue_slot])320 {321 uint32_t num_inst_issue_queue = 0;322 for (; num_inst_issue_queue < _param->_nb_inst_issue_queue [num_ooo_engine]; num_inst_issue_queue ++)323 {324 // Test if this instruction is not previously send at a read_unit325 if (not ISSUE_OOO_ENGINE_ACK [num_ooo_engine][num_inst_issue_queue])326 {327 Tcontrol_t ooo_engine_val = PORT_READ(in_ISSUE_OOO_ENGINE_VAL [num_ooo_engine][num_inst_issue_queue]);328 Ttype_t type = PORT_READ(in_ISSUE_OOO_ENGINE_TYPE [num_ooo_engine][num_inst_issue_queue]);329 // Test if have an link and read unit is enable330 bool can_dispatch = _param->_table_dispatch [num_ooo_engine][num_inst_issue_slot][i][num_read_unit];331 bool can_issue_type = _param->_table_issue_type [i][num_read_unit][type];332 333 log_printf(TRACE,Core_Glue,FUNCTION," * num_ooo_engine_queue : %d",num_inst_issue_queue);334 log_printf(TRACE,Core_Glue,FUNCTION," * type : %s",toString(type).c_str());335 log_printf(TRACE,Core_Glue,FUNCTION," * ISSUE_OOO_ENGINE_VAL : %d",ooo_engine_val);336 log_printf(TRACE,Core_Glue,FUNCTION," * table_dispatch : %d",can_dispatch);337 log_printf(TRACE,Core_Glue,FUNCTION," * table_issue_type : %d",can_issue_type);338 339 340 // test if have a request ?341 // and test if have a link between the issue slot and read_unit342 // and if the read_unit accept this instruction's type343 if (ooo_engine_val and344 can_dispatch and345 can_issue_type)346 {347 // log_printf(TRACE,Core_Glue,FUNCTION," * find !!!");348 349 // Transaction350 READ_UNIT_ENABLE [i][num_read_unit] = false; // now, this read_unit is busy351 ISSUE_EXECUTE_LOOP_VAL [i][num_read_unit] = ooo_engine_val;352 ISSUE_OOO_ENGINE_ACK [num_ooo_engine][num_inst_issue_queue] = 1;353 SLOT_ENABLE [num_ooo_engine][num_inst_issue_slot] = 0; // now this slot is used354 355 if (_param->_have_port_context_id)356 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_CONTEXT_ID [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_CONTEXT_ID [num_ooo_engine][num_inst_issue_queue]));357 if (_param->_have_port_front_end_id)358 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_FRONT_END_ID [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_FRONT_END_ID [num_ooo_engine][num_inst_issue_queue]));359 if (_param->_have_port_ooo_engine_id)360 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_OOO_ENGINE_ID [i][num_read_unit],ooo_engine_id);361 if (_param->_have_port_rob_ptr)362 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_PACKET_ID [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_PACKET_ID [num_ooo_engine][num_inst_issue_queue]));363 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_OPERATION [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_OPERATION [num_ooo_engine][num_inst_issue_queue]));364 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_TYPE [i][num_read_unit],type);365 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_WRITE [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE [num_ooo_engine][num_inst_issue_queue]));366 if (_param->_have_port_load_queue_ptr)367 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_LOAD_QUEUE_PTR_WRITE [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_LOAD_QUEUE_PTR_WRITE [num_ooo_engine][num_inst_issue_queue]));368 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_HAS_IMMEDIAT [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_HAS_IMMEDIAT [num_ooo_engine][num_inst_issue_queue]));369 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_IMMEDIAT [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_IMMEDIAT [num_ooo_engine][num_inst_issue_queue]));370 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_READ_RA [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_READ_RA [num_ooo_engine][num_inst_issue_queue]));371 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RA [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RA [num_ooo_engine][num_inst_issue_queue]));372 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_READ_RB [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_READ_RB [num_ooo_engine][num_inst_issue_queue]));373 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RB [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RB [num_ooo_engine][num_inst_issue_queue]));374 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_READ_RC [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_READ_RC [num_ooo_engine][num_inst_issue_queue]));375 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RC [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RC [num_ooo_engine][num_inst_issue_queue]));376 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_WRITE_RD [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_WRITE_RD [num_ooo_engine][num_inst_issue_queue]));377 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RD [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RD [num_ooo_engine][num_inst_issue_queue]));378 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_WRITE_RE [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_WRITE_RE [num_ooo_engine][num_inst_issue_queue]));379 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RE [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RE [num_ooo_engine][num_inst_issue_queue]));380 381 find = true;// find : stop scan read_unit382 }383 }384 if (find)385 break;386 }387 388 if (find)389 {390 log_printf(TRACE,Core_Glue,FUNCTION," * find !!!");391 break;392 }393 else394 {395 log_printf(TRACE,Core_Glue,FUNCTION," * not find !!!");396 log_printf(TRACE,Core_Glue,FUNCTION," * issue_queue_in_order: %d",_param->_issue_queue_in_order [num_ooo_engine]);397 log_printf(TRACE,Core_Glue,FUNCTION," * num_inst_issue_queue: %d",num_inst_issue_queue);398 log_printf(TRACE,Core_Glue,FUNCTION," * nb_inst_reexecute : %d",_param->_nb_inst_reexecute [num_ooo_engine]);399 400 if (_param->_issue_queue_in_order [num_ooo_engine] and401 (num_inst_issue_queue >= _param->_nb_inst_reexecute [num_ooo_engine]))402 OOO_ENGINE_ENABLE [num_ooo_engine] = false;403 }404 }405 }406 }407 }408 }409 */410 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Parameters.cpp
r136 r138 32 32 uint32_t * nb_inst_reexecute ,//[nb_ooo_engine] 33 33 uint32_t * nb_inst_issue_queue ,//[nb_ooo_engine] 34 34 // uint32_t * nb_inst_issue_slot ,//[nb_ooo_engine] 35 35 uint32_t ** nb_inst_execute ,//[nb_ooo_engine][ooo_engine_nb_execute_loop] 36 36 bool * issue_queue_in_order ,//[nb_ooo_engine] … … 47 47 Tpriority_t dispatch_priority , 48 48 Tload_balancing_t dispatch_load_balancing , 49 49 // bool **** table_dispatch ,//[nb_ooo_engine][nb_inst_issue_slot][execute_loop][nb_read_unit] 50 50 bool *** table_issue_type ,// [execute_loop][nb_read_unit][nb_type] 51 bool *** table_issue_thread ,// [execute_loop][nb_read_unit][nb_thread] 51 52 uint32_t ** translate_ooo_engine_num_front_end ,//[nb_ooo_engine][ooo_engine_nb_front_end] 52 53 uint32_t ** translate_ooo_engine_num_execute_loop,//[nb_ooo_engine][ooo_engine_nb_execute_loop] 53 54 uint32_t ** translate_execute_loop_num_ooo_engine,//[nb_execute_loop][execute_loop_nb_ooo_engine] 55 uint32_t *** translate_num_context_to_num_thread ,//[nb_ooo_engine][ooo_engine_nb_front_end][nb_context] 54 56 bool is_toplevel) 55 57 { … … 69 71 _nb_inst_reexecute = nb_inst_reexecute ; 70 72 _nb_inst_issue_queue = nb_inst_issue_queue ; 71 73 // _nb_inst_issue_slot = nb_inst_issue_slot ; 72 74 _nb_inst_execute = nb_inst_execute ; 73 75 _issue_queue_in_order = issue_queue_in_order ; … … 76 78 _dispatch_priority = dispatch_priority ; 77 79 _dispatch_load_balancing = dispatch_load_balancing ; 78 80 // _table_dispatch = table_dispatch ; 79 81 _table_issue_type = table_issue_type ; 82 _table_issue_thread = table_issue_thread ; 80 83 _translate_ooo_engine_num_front_end = translate_ooo_engine_num_front_end ; 81 84 _translate_ooo_engine_num_execute_loop = translate_ooo_engine_num_execute_loop; 82 85 _translate_execute_loop_num_ooo_engine = translate_execute_loop_num_ooo_engine; 86 _translate_num_context_to_num_thread = translate_num_context_to_num_thread ; 83 87 84 88 test(); … … 118 122 119 123 // ALLOC2(_execute_loop_nb_inst_insert,uint32_t,_nb_execute_loop,_execute_loop_nb_ooo_engine[it1]); 120 121 122 for (uint32_t i=0; i<_nb_execute_loop; ++i)123 for (uint32_t j=0; j<_execute_loop_nb_ooo_engine[i]; ++j)124 {125 uint32_t num_ooo_engine = _translate_execute_loop_num_ooo_engine [i][j];126 _execute_loop_nb_inst_issue_slot [i][j] = _nb_inst_issue_slot [num_ooo_engine];127 // _execute_loop_nb_inst_insert [i][j] = _nb_inst_insert [num_ooo_engine];128 }124 // ALLOC2(_execute_loop_nb_inst_issue_slot ,uint32_t,_nb_execute_loop,_execute_loop_nb_ooo_engine[it1]); 125 126 // for (uint32_t i=0; i<_nb_execute_loop; ++i) 127 // for (uint32_t j=0; j<_execute_loop_nb_ooo_engine[i]; ++j) 128 // { 129 // uint32_t num_ooo_engine = _translate_execute_loop_num_ooo_engine [i][j]; 130 // _execute_loop_nb_inst_issue_slot [i][j] = _nb_inst_issue_slot [num_ooo_engine]; 131 // _execute_loop_nb_inst_insert [i][j] = _nb_inst_insert [num_ooo_engine]; 132 // } 129 133 130 134 _max_ooo_engine_nb_inst_branch_complete = max<uint32_t>(_ooo_engine_nb_inst_branch_complete,_nb_ooo_engine); … … 135 139 // _max_nb_inst_insert = max<uint32_t>(_nb_inst_insert ,_nb_ooo_engine); 136 140 _max_nb_inst_issue_queue = max<uint32_t>(_nb_inst_issue_queue ,_nb_ooo_engine); 137 141 // _max_nb_inst_issue_slot = max<uint32_t>(_nb_inst_issue_slot ,_nb_ooo_engine); 138 142 _max_nb_read_unit = max<uint32_t>(_nb_read_unit ,_nb_execute_loop); 139 143 … … 188 192 log_begin(Core_Glue,FUNCTION); 189 193 190 194 // DELETE2(_execute_loop_nb_inst_issue_slot ,_nb_execute_loop,_execute_loop_nb_ooo_engine[it1]); 191 195 // DELETE2(_execute_loop_nb_inst_insert ,_nb_execute_loop,_execute_loop_nb_ooo_engine[it1]); 192 196 DELETE2(_translate_num_ooo_engine_to_execute_loop_ooo_engine_id ,_nb_ooo_engine,_nb_execute_loop); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Parameters_msg_error.cpp
r120 r138 8 8 #include "Behavioural/include/Types.h" 9 9 #include "Behavioural/Core/Core_Glue/include/Parameters.h" 10 #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Types.h" 10 11 #include <sstream> 11 12 … … 58 59 } 59 60 61 { 62 bool issue_queue_can_ooo [_nb_ooo_engine]; 63 for (uint32_t i=0; i<_nb_ooo_engine; ++i) 64 issue_queue_can_ooo [i] = true; 65 66 for (uint32_t i=0; i<_nb_execute_loop; ++i) 67 for (uint32_t j=0; j<_execute_loop_nb_ooo_engine[i]; ++j) 68 { 69 Tcontext_t num_ooo_engine = _translate_execute_loop_num_ooo_engine [i][j]; 70 71 // Test if multiple ooo_engine for this execute loop 72 if (_execute_loop_nb_ooo_engine[i]>1) 73 issue_queue_can_ooo [num_ooo_engine] = false; 74 } 75 76 for (uint32_t i=0; i<_nb_ooo_engine; ++i) 77 if (not _issue_queue_in_order [i] and // out of order 78 not issue_queue_can_ooo [i]) 79 test.error(toString(_("The scheme of Issue queue in ooo_engine [%d] must be \"%s\" because, the execute loop can be access with multiple ooo_engine (deadlock is possible).\n"),i,toString(core::multi_ooo_engine::ooo_engine::issue_queue::ISSUE_QUEUE_SCHEME_IN_ORDER).c_str())); 80 } 81 60 82 if (_dispatch_load_balancing != LOAD_BALANCING_MAXIMUM_FOR_PRIORITY) 61 83 test.error(toString(_("distpatch load_balancing scheme \"%s\" is not yet supported.\n"),toString(_dispatch_load_balancing).c_str())); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Load_store_unit.h
r136 r138 181 181 // Registers 182 182 public : Tlsq_ptr_t * reg_STORE_QUEUE_NB_CHECK ;//[size_store_queue] 183 //public : Tcontrol_t * reg_STORE_QUEUE_INVALID ;//[size_store_queue] 183 184 public : Tlsq_ptr_t reg_STORE_QUEUE_PTR_READ ; 184 185 //public : Tlsq_ptr_t reg_LOAD_QUEUE_PTR_READ ; … … 236 237 public : void genMealy_retire (void); 237 238 238 public : void function_speculative_load_ commit_transition (void);239 public : void function_speculative_load_ commit_genMoore (void);240 public : void function_speculative_load_ commit_genMealy_dcache (void);241 public : void function_speculative_load_ commit_genMealy_insert (void);242 public : void function_speculative_load_ commit_genMealy_retire (void);239 public : void function_speculative_load_access_transition (void); 240 public : void function_speculative_load_access_genMoore (void); 241 public : void function_speculative_load_access_genMealy_dcache (void); 242 public : void function_speculative_load_access_genMealy_insert (void); 243 public : void function_speculative_load_access_genMealy_retire (void); 243 244 #endif 244 245 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Parameters.h
r124 r138 27 27 { 28 28 //-----[ fields ]------------------------------------------------------------ 29 public : uint32_t _size_store_queue ; 30 public : uint32_t _size_load_queue ; 31 public : uint32_t _size_speculative_access_queue; 32 public : uint32_t _nb_port_check ; 33 public : Tspeculative_load_t _speculative_load ; 34 public : uint32_t _nb_bypass_memory ; 35 public : uint32_t _nb_cache_port ; 36 public : uint32_t _nb_inst_memory ; 37 public : uint32_t _nb_context ; 38 public : uint32_t _nb_front_end ; 39 public : uint32_t _nb_ooo_engine ; 40 public : uint32_t _nb_packet ; 41 //public : uint32_t _size_general_data ; 42 //public : uint32_t _size_special_data ; 43 public : uint32_t _nb_general_register ; 44 public : uint32_t _nb_special_register ; 45 public : uint32_t _nb_thread ; 46 public : bool * _num_thread_valid ; //[nb_thread] 29 public : uint32_t _size_store_queue ; 30 public : uint32_t _size_load_queue ; 31 public : uint32_t _size_speculative_access_queue ; 32 public : uint32_t _nb_store_queue_bank ; 33 public : uint32_t _nb_load_queue_bank ; 34 public : uint32_t _nb_port_check ; 35 public : Tspeculative_load_t _speculative_load ; 36 public : Tpredictor_t _speculative_commit_predictor_scheme; 37 public : uint32_t * _lsu_pht_size_counter ;//[1] 38 public : uint32_t * _lsu_pht_nb_counter ;//[1] 39 public : uint32_t _nb_bypass_memory ; 40 public : uint32_t _nb_cache_port ; 41 public : uint32_t _nb_inst_memory ; 42 public : uint32_t _nb_context ; 43 public : uint32_t _nb_front_end ; 44 public : uint32_t _nb_ooo_engine ; 45 public : uint32_t _nb_packet ; 46 //public : uint32_t _size_general_data ; 47 //public : uint32_t _size_special_data ; 48 public : uint32_t _nb_general_register ; 49 public : uint32_t _nb_special_register ; 50 public : uint32_t _nb_thread ; 51 public : bool * _num_thread_valid ; //[nb_thread] 47 52 48 53 //public : uint32_t _size_address_store_queue ; … … 70 75 71 76 //-----[ methods ]----------------------------------------------------------- 72 public : Parameters (uint32_t size_store_queue , 73 uint32_t size_load_queue , 74 uint32_t size_speculative_access_queue, 75 uint32_t nb_port_check , 76 Tspeculative_load_t speculative_load , 77 uint32_t nb_bypass_memory , 78 uint32_t nb_cache_port , 79 uint32_t nb_inst_memory , 80 uint32_t nb_context , 81 uint32_t nb_front_end , 82 uint32_t nb_ooo_engine , 83 uint32_t nb_packet , 84 uint32_t size_general_data , 85 uint32_t size_special_data , 86 uint32_t nb_general_register , 87 uint32_t nb_special_register , 88 uint32_t nb_thread , 89 bool * num_thread_valid , //[nb_thread] 77 public : Parameters (uint32_t size_store_queue , 78 uint32_t size_load_queue , 79 uint32_t size_speculative_access_queue , 80 uint32_t nb_store_queue_bank , 81 uint32_t nb_load_queue_bank , 82 uint32_t nb_port_check , 83 Tspeculative_load_t speculative_load , 84 Tpredictor_t speculative_commit_predictor_scheme, 85 uint32_t * lsu_pht_size_counter ,//[1] 86 uint32_t * lsu_pht_nb_counter ,//[1] 87 uint32_t nb_bypass_memory , 88 uint32_t nb_cache_port , 89 uint32_t nb_inst_memory , 90 uint32_t nb_context , 91 uint32_t nb_front_end , 92 uint32_t nb_ooo_engine , 93 uint32_t nb_packet , 94 uint32_t size_general_data , 95 uint32_t size_special_data , 96 uint32_t nb_general_register , 97 uint32_t nb_special_register , 98 uint32_t nb_thread , 99 bool * num_thread_valid , //[nb_thread] 90 100 bool is_toplevel=false); 91 101 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Types.h
r136 r138 35 35 NO_SPECULATIVE_LOAD //each load wait all previous store before the data cache access 36 36 ,SPECULATIVE_LOAD_ACCESS //each load wait all previous store before the commiting 37 37 //,SPECULATIVE_LOAD_COMMIT //each load commit the result before the end of dependence's check 38 38 //,SPECULATIVE_LOAD_BYPASS //each load bypass the result before the end of dependence's check 39 39 } Tspeculative_load_t; … … 184 184 public : Tgeneral_address_t _num_reg_rd ; 185 185 public : Texception_t _exception ; 186 public : Tcontrol_t _can_speculative_commit; 186 187 187 188 friend std::ostream & operator << (std::ostream& os, const Tload_queue_entry_t & x) … … 194 195 << " * exception : " << toString(x._exception) << std::endl 195 196 << " * check_hit, check_hit_byte : " << toString(x._check_hit) << " - " << toString(x._check_hit_byte) << std::endl 197 << " * can_speculative_commit : " << toString(x._can_speculative_commit) << std::endl 196 198 << std::hex 197 199 << " * address : " << toString(x._address)<< std::endl … … 217 219 case morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::NO_SPECULATIVE_LOAD : return "no_speculative_load" ; break; 218 220 case morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_ACCESS : return "speculative_load_access"; break; 219 220 // 221 // case morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_COMMIT : return "speculative_load_commit"; break; 222 // case morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_BYPASS : return "speculative_load_bypass"; break; 221 223 default : return "" ; break; 222 224 } … … 225 227 template<> inline morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Tspeculative_load_t fromString<morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Tspeculative_load_t>(const std::string& x) 226 228 { 227 if ( 228 (x.compare("no_speculative_load")== 0))229 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::NO_SPECULATIVE_LOAD ))) == 0) or 230 (x.compare(toString( morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::NO_SPECULATIVE_LOAD )) == 0)) 229 231 return morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::NO_SPECULATIVE_LOAD; 230 if ( 231 (x.compare("speculative_load_access") == 0))232 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_ACCESS))) == 0) or 233 (x.compare(toString( morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_ACCESS )) == 0)) 232 234 return morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_ACCESS; 233 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_COMMIT))) == 0) or234 (x.compare("speculative_load_commit") == 0))235 236 // if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_BYPASS)))) or237 // (x.compare("speculative_load_bypass") == 0))238 // 235 // if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_COMMIT))) == 0) or 236 // (x.compare(toString( morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_COMMIT )) == 0)) 237 // return morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_COMMIT; 238 // if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_BYPASS))) == 0) or 239 // (x.compare(toString( morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_BYPASS )) == 0)) 240 // return morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_BYPASS; 239 241 240 242 throw (ErrorMorpheo ("<fromString> : Unknow string : \""+x+"\"")); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit.cpp
r132 r138 77 77 switch (_param->_speculative_load) 78 78 { 79 case SPECULATIVE_LOAD_ COMMIT:79 case SPECULATIVE_LOAD_ACCESS : 80 80 { 81 function_transition = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_ commit_transition ;82 function_genMoore = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_ commit_genMoore ;83 function_genMealy_dcache = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_ commit_genMealy_dcache;84 function_genMealy_insert = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_ commit_genMealy_insert;85 function_genMealy_retire = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_ commit_genMealy_retire;81 function_transition = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_access_transition ; 82 function_genMoore = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_access_genMoore ; 83 function_genMealy_dcache = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_access_genMealy_dcache; 84 function_genMealy_insert = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_access_genMealy_insert; 85 function_genMealy_retire = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_access_genMealy_retire; 86 86 break; 87 87 } 88 88 case NO_SPECULATIVE_LOAD : 89 case SPECULATIVE_LOAD_ACCESS:90 89 // case SPECULATIVE_LOAD_COMMIT : 90 //case SPECULATIVE_LOAD_BYPASS : 91 91 default : 92 92 { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_allocation.cpp
r136 r138 160 160 161 161 ALLOC1(reg_STORE_QUEUE_NB_CHECK ,Tlsq_ptr_t ,_param->_size_store_queue); 162 // ALLOC1(reg_STORE_QUEUE_INVALID ,Tcontrol_t ,_param->_size_store_queue); 162 163 163 164 // ALLOC1(internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ,Tlsq_ptr_t ,_param->_nb_cache_port); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_deallocation.cpp
r136 r138 106 106 107 107 DELETE1(reg_STORE_QUEUE_NB_CHECK ,_param->_size_store_queue); 108 // DELETE1(reg_STORE_QUEUE_INVALID ,_param->_size_store_queue); 108 109 109 110 // DELETE1(internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ,_param->_nb_cache_port); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_access_genMealy_dcache.cpp
r137 r138 21 21 22 22 #undef FUNCTION 23 #define FUNCTION "Load_store_unit::function_speculative_load_ commit_genMealy_dcache"24 void Load_store_unit::function_speculative_load_ commit_genMealy_dcache (void)23 #define FUNCTION "Load_store_unit::function_speculative_load_access_genMealy_dcache" 24 void Load_store_unit::function_speculative_load_access_genMealy_dcache (void) 25 25 { 26 26 log_begin(Load_store_unit,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_access_genMealy_insert.cpp
r137 r138 21 21 22 22 #undef FUNCTION 23 #define FUNCTION "Load_store_unit::function_speculative_load_ commit_genMealy_insert"24 void Load_store_unit::function_speculative_load_ commit_genMealy_insert (void)23 #define FUNCTION "Load_store_unit::function_speculative_load_access_genMealy_insert" 24 void Load_store_unit::function_speculative_load_access_genMealy_insert (void) 25 25 { 26 26 log_begin(Load_store_unit,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_access_genMealy_retire.cpp
r137 r138 21 21 22 22 #undef FUNCTION 23 #define FUNCTION "Load_store_unit::function_speculative_load_ commit_genMealy_retire"24 void Load_store_unit::function_speculative_load_ commit_genMealy_retire (void)23 #define FUNCTION "Load_store_unit::function_speculative_load_access_genMealy_retire" 24 void Load_store_unit::function_speculative_load_access_genMealy_retire (void) 25 25 { 26 26 log_begin(Load_store_unit,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_access_genMoore.cpp
r137 r138 21 21 22 22 #undef FUNCTION 23 #define FUNCTION "Load_store_unit::function_speculative_load_ commit_genMoore"24 void Load_store_unit::function_speculative_load_ commit_genMoore (void)23 #define FUNCTION "Load_store_unit::function_speculative_load_access_genMoore" 24 void Load_store_unit::function_speculative_load_access_genMoore (void) 25 25 { 26 26 log_begin(Load_store_unit,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_access_transition.cpp
r137 r138 228 228 229 229 #undef FUNCTION 230 #define FUNCTION "Load_store_unit::function_speculative_load_ commit_transition"231 void Load_store_unit::function_speculative_load_ commit_transition (void)230 #define FUNCTION "Load_store_unit::function_speculative_load_access_transition" 231 void Load_store_unit::function_speculative_load_access_transition (void) 232 232 { 233 233 log_begin(Load_store_unit,FUNCTION); … … 245 245 { 246 246 reg_STORE_QUEUE_NB_CHECK [i] = 0; 247 // reg_STORE_QUEUE_INVALID [i] = 0; 247 248 _store_queue [i]._state = STORE_QUEUE_EMPTY; 248 249 _store_queue [i]._context_id = 0; // not necessary … … 283 284 _load_queue [i]._num_reg_rd = 0; // not necessary 284 285 _load_queue [i]._exception = 0; // not necessary 286 _load_queue [i]._can_speculative_commit= 0; // not necessary 285 287 } 286 288 … … 407 409 408 410 // find a entry that it need a check 409 Tlsq_ptr_t store_queue_ptr_write = _load_queue[index_load_queue]._store_queue_ptr_write;410 Tlsq_ptr_t store_queue_ptr_read = _load_queue[index_load_queue]._store_queue_ptr_read ;411 Tlsq_ptr_t store_queue_empty = _load_queue[index_load_queue]._store_queue_empty ;411 Tlsq_ptr_t store_queue_ptr_write = _load_queue[index_load_queue]._store_queue_ptr_write; 412 Tlsq_ptr_t store_queue_ptr_read = _load_queue[index_load_queue]._store_queue_ptr_read ; 413 Tlsq_ptr_t store_queue_empty = _load_queue[index_load_queue]._store_queue_empty ; 412 414 // Tlsq_ptr_t store_queue_ptr_write_old = store_queue_ptr_write; 413 415 … … 442 444 443 445 log_printf(TRACE,Load_store_unit,FUNCTION," * store_queue_ptr_write : %d",store_queue_ptr_write); 446 447 bool test_thread_id = true; 448 449 // Test thread id 450 if (_param->_have_port_context_id) 451 test_thread_id &= (_load_queue[index_load_queue]._context_id == _store_queue[store_queue_ptr_write]._context_id); 452 if (_param->_have_port_front_end_id) 453 test_thread_id &= (_load_queue[index_load_queue]._front_end_id == _store_queue[store_queue_ptr_write]._front_end_id); 454 if (_param->_have_port_ooo_engine_id) 455 test_thread_id &= (_load_queue[index_load_queue]._ooo_engine_id == _store_queue[store_queue_ptr_write]._ooo_engine_id); 444 456 445 457 // switch on store_queue state … … 450 462 case STORE_QUEUE_VALID_SPECULATIVE : 451 463 { 452 453 log_printf(TRACE,Load_store_unit,FUNCTION," * store have a valid entry"); 464 log_printf(TRACE,Load_store_unit,FUNCTION," * store have a valid entry"); 454 465 455 466 // TODO : MMU - nous considérons que les adresses sont physique 456 bool test_thread_id = true;457 458 // Test thread id459 if (_param->_have_port_context_id)460 test_thread_id &= (_load_queue[index_load_queue]._context_id == _store_queue[store_queue_ptr_write]._context_id);461 if (_param->_have_port_front_end_id)462 test_thread_id &= (_load_queue[index_load_queue]._front_end_id == _store_queue[store_queue_ptr_write]._front_end_id);463 if (_param->_have_port_ooo_engine_id)464 test_thread_id &= (_load_queue[index_load_queue]._ooo_engine_id == _store_queue[store_queue_ptr_write]._ooo_engine_id);465 466 467 if (test_thread_id) 467 468 { … … 481 482 { 482 483 log_printf(TRACE,Load_store_unit,FUNCTION," * address_msb is the same."); 484 483 485 // all case - [] : store, () : load 484 486 // (1) store_max >= load_max and store_min <= load_min ...[...(...)...]... Ok - inclusion in store … … 533 535 log_printf(TRACE,Load_store_unit,FUNCTION," * store_num_byte_min : %d",store_num_byte_min); 534 536 log_printf(TRACE,Load_store_unit,FUNCTION," * store_num_byte_max : %d",store_num_byte_max); 535 536 // uint32_t load_nb_byte = (1<<memory_access(_load_queue[index_load_queue]._operation));537 538 // uint32_t load_num_byte_min = (load_addr & _param->_mask_address_lsb);539 // uint32_t load_num_byte_max = load_num_byte_min+load_nb_byte;540 541 // log_printf(TRACE,Load_store_unit,FUNCTION," * load_num_byte_min : %d",load_num_byte_min);542 // log_printf(TRACE,Load_store_unit,FUNCTION," * load_num_byte_max : %d",load_num_byte_max);543 544 // for (uint32_t num_load_byte=load_num_byte_min; num_load_byte<load_num_byte_max; num_load_byte ++)545 // {546 // // Make a mask547 // uint32_t num_store_byte = num_load_byte;548 549 537 550 538 … … 671 659 // The check is finish if all bit is set 672 660 end_check = (_load_queue[index_load_queue]._check_hit_byte == _param->_mask_check_hit_byte); 673 674 661 } 675 662 } … … 679 666 } 680 667 case STORE_QUEUE_EMPTY : 668 { 669 log_printf(TRACE,Load_store_unit,FUNCTION," * store is empty ... wait."); 670 break; 671 } 672 681 673 case STORE_QUEUE_NO_VALID_NO_SPECULATIVE : 682 674 { 683 log_printf(TRACE,Load_store_unit,FUNCTION," * store have an invalid entry"); 675 log_printf(TRACE,Load_store_unit,FUNCTION," * store have an invalid entry"); 676 677 if (test_thread_id) 678 { 679 end_check = true; // previous store is invalid -> exception 680 change_state = true; 681 } 682 else 683 next = true; 684 684 685 break; 685 686 } … … 852 853 case STORE_QUEUE_EMPTY : 853 854 { 855 // reg_STORE_QUEUE_INVALID [index] = false; // new first store instruction 856 854 857 if (is_operation_memory_store_head(operation) == true) 855 858 { … … 858 861 // test if is a speculation 859 862 if (operation == OPERATION_MEMORY_STORE_HEAD_KO) 860 new_exception = EXCEPTION_MEMORY_MISS_SPECULATION; 863 { 864 new_exception = EXCEPTION_MEMORY_MISS_SPECULATION; 865 // reg_STORE_QUEUE_INVALID [index] = true; 866 } 861 867 else 862 868 new_exception = EXCEPTION_MEMORY_NONE; … … 901 907 #endif 902 908 if (operation == OPERATION_MEMORY_STORE_HEAD_KO) 903 new_exception = EXCEPTION_MEMORY_MISS_SPECULATION; // great prioritary 904 909 { 910 new_exception = EXCEPTION_MEMORY_MISS_SPECULATION; // great prioritary 911 // reg_STORE_QUEUE_INVALID [index] = true; 912 } 913 905 914 if (new_exception != EXCEPTION_MEMORY_NONE) 906 915 new_state = STORE_QUEUE_COMMIT; … … 913 922 case STORE_QUEUE_COMMIT : 914 923 { 915 throw ERRORMORPHEO(FUNCTION,"<Load_store_unit::function_speculative_load_ commit_transition> Invalid state and operation");924 throw ERRORMORPHEO(FUNCTION,"<Load_store_unit::function_speculative_load_access_transition> Invalid state and operation"); 916 925 } 917 926 } … … 1115 1124 _load_queue [ptr_write]._exception = exception; 1116 1125 _load_queue [ptr_write]._rdata = address; // to the exception 1126 1127 switch (_param->_speculative_commit_predictor_scheme) 1128 { 1129 1130 case PREDICTOR_NEVER_TAKE : {_load_queue [ptr_write]._can_speculative_commit = false; break;} 1131 case PREDICTOR_ALWAYS_TAKE : {_load_queue [ptr_write]._can_speculative_commit = true ; break;} 1132 case PREDICTOR_COUNTER : {_load_queue [ptr_write]._can_speculative_commit = false; break;} // TODO 1133 default : 1134 { 1135 // throw ERRORMORPHEO(FUNCTION,_("Invalid predictor scheme.\n")); 1136 _load_queue [ptr_write]._can_speculative_commit = false; 1137 break; 1138 } 1139 } 1117 1140 1118 1141 log_printf(TRACE,Load_store_unit,FUNCTION," * speculative_access_queue"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Parameters.cpp
r124 r138 20 20 #undef FUNCTION 21 21 #define FUNCTION "Load_store_unit::Parameters" 22 Parameters::Parameters (uint32_t size_store_queue , 23 uint32_t size_load_queue , 24 uint32_t size_speculative_access_queue, 25 uint32_t nb_port_check , 26 Tspeculative_load_t speculative_load , 27 uint32_t nb_bypass_memory , 28 uint32_t nb_cache_port , 29 uint32_t nb_inst_memory , 30 uint32_t nb_context , 31 uint32_t nb_front_end , 32 uint32_t nb_ooo_engine , 33 uint32_t nb_packet , 34 uint32_t size_general_data , 35 uint32_t size_special_data , 36 uint32_t nb_general_register , 37 uint32_t nb_special_register , 38 uint32_t nb_thread , 39 bool * num_thread_valid , //[nb_thread] 22 Parameters::Parameters (uint32_t size_store_queue , 23 uint32_t size_load_queue , 24 uint32_t size_speculative_access_queue , 25 uint32_t nb_store_queue_bank , 26 uint32_t nb_load_queue_bank , 27 uint32_t nb_port_check , 28 Tspeculative_load_t speculative_load , 29 Tpredictor_t speculative_commit_predictor_scheme, 30 uint32_t * lsu_pht_size_counter ,//[1] 31 uint32_t * lsu_pht_nb_counter ,//[1] 32 uint32_t nb_bypass_memory , 33 uint32_t nb_cache_port , 34 uint32_t nb_inst_memory , 35 uint32_t nb_context , 36 uint32_t nb_front_end , 37 uint32_t nb_ooo_engine , 38 uint32_t nb_packet , 39 uint32_t size_general_data , 40 uint32_t size_special_data , 41 uint32_t nb_general_register , 42 uint32_t nb_special_register , 43 uint32_t nb_thread , 44 bool * num_thread_valid , //[nb_thread] 40 45 bool is_toplevel) 41 46 { 42 47 log_printf(FUNC,Load_store_unit,FUNCTION,"Begin"); 43 48 44 _size_store_queue = size_store_queue ; 45 _size_load_queue = size_load_queue ; 46 _size_speculative_access_queue = size_speculative_access_queue; 47 _nb_port_check = nb_port_check ; 48 _speculative_load = speculative_load ; 49 _nb_bypass_memory = nb_bypass_memory ; 50 _nb_cache_port = nb_cache_port ; 51 _nb_inst_memory = nb_inst_memory ; 52 _nb_context = nb_context ; 53 _nb_front_end = nb_front_end ; 54 _nb_ooo_engine = nb_ooo_engine ; 55 _nb_packet = nb_packet ; 56 _nb_general_register = nb_general_register ; 57 _nb_special_register = nb_special_register ; 58 _nb_thread = nb_thread ; 59 _num_thread_valid = num_thread_valid ; 49 _size_store_queue = size_store_queue ; 50 _size_load_queue = size_load_queue ; 51 _size_speculative_access_queue = size_speculative_access_queue ; 52 _nb_store_queue_bank = nb_store_queue_bank ; 53 _nb_load_queue_bank = nb_load_queue_bank ; 54 _nb_port_check = nb_port_check ; 55 _speculative_load = speculative_load ; 56 _speculative_commit_predictor_scheme = speculative_commit_predictor_scheme; 57 _lsu_pht_size_counter = lsu_pht_size_counter ; 58 _lsu_pht_nb_counter = lsu_pht_nb_counter ; 59 _nb_bypass_memory = nb_bypass_memory ; 60 _nb_cache_port = nb_cache_port ; 61 _nb_inst_memory = nb_inst_memory ; 62 _nb_context = nb_context ; 63 _nb_front_end = nb_front_end ; 64 _nb_ooo_engine = nb_ooo_engine ; 65 _nb_packet = nb_packet ; 66 _nb_general_register = nb_general_register ; 67 _nb_special_register = nb_special_register ; 68 _nb_thread = nb_thread ; 69 _num_thread_valid = num_thread_valid ; 60 70 61 71 _size_speculative_access_queue_ptr = log2(size_speculative_access_queue); … … 99 109 log_printf(FUNC,Load_store_unit,FUNCTION,"End"); 100 110 }; 101 102 // #undef FUNCTION103 // #define FUNCTION "Load_store_unit::Parameters (copy)"104 // Parameters::Parameters (Parameters & param):105 // _size_store_queue (param._size_store_queue ),106 // _size_load_queue (param._size_load_queue ),107 // _size_speculative_access_queue (param._size_speculative_access_queue),108 // _nb_port_check (param._nb_port_check ),109 // _speculative_load (param._speculative_load ),110 // _nb_bypass_memory (param._nb_bypass_memory ),111 // _nb_cache_port (param._nb_cache_port ),112 // _nb_inst_memory (param._nb_inst_memory ),113 // _nb_context (param._nb_context ),114 // _nb_front_end (param._nb_front_end ),115 // _nb_ooo_engine (param._nb_ooo_engine ),116 // _nb_packet (param._nb_packet ),117 // _size_general_data (param._size_general_data ),118 // _size_special_data (param._size_special_data ),119 // _nb_general_register (param._nb_general_register ),120 // _nb_special_register (param._nb_special_register ),121 122 // _size_address_store_queue (param._size_address_store_queue ),123 // _size_address_load_queue (param._size_address_load_queue ),124 // _size_address_speculative_access_queue (param._size_address_speculative_access_queue),125 126 // _size_context_id (param._size_context_id ),127 // _size_front_end_id (param._size_front_end_id ),128 // _size_ooo_engine_id (param._size_ooo_engine_id ),129 // _size_packet_id (param._size_packet_id ),130 // _size_general_register (param._size_general_register ),131 // _size_special_register (param._size_special_register ),132 // _size_dcache_context_id (param._size_dcache_context_id ),133 // _size_dcache_packet_id (param._size_dcache_packet_id ),134 135 // _have_port_context_id (param._have_port_context_id ),136 // _have_port_front_end_id (param._have_port_front_end_id ),137 // _have_port_ooo_engine_id (param._have_port_ooo_engine_id),138 // _have_port_packet_id (param._have_port_packet_id ),139 // _have_port_dcache_context_id(param._have_port_dcache_context_id),140 // _have_port_load_queue_ptr(param._have_port_load_queue_ptr),141 142 // _mask_address_lsb (param._mask_address_lsb),143 // _mask_address_msb (param._mask_address_msb)144 // {145 // log_printf(FUNC,Load_store_unit,FUNCTION,"Begin");146 // test();147 // log_printf(FUNC,Load_store_unit,FUNCTION,"End");148 // };149 111 150 112 #undef FUNCTION -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Parameters_msg_error.cpp
r88 r138 6 6 */ 7 7 8 #include "Behavioural/include/Test.h" 8 9 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Parameters.h" 9 10 #include <sstream> … … 29 30 switch (_speculative_load) 30 31 { 31 case SPECULATIVE_LOAD_ COMMIT:32 case SPECULATIVE_LOAD_ACCESS : 32 33 { 33 34 if (not (_nb_bypass_memory == 0)) … … 37 38 } 38 39 case NO_SPECULATIVE_LOAD : 39 case SPECULATIVE_LOAD_ACCESS :40 40 // case SPECULATIVE_LOAD_BYPASS : 41 // case SPECULATIVE_LOAD_COMMIT : 41 42 default : 42 43 { … … 55 56 test.error(_("Bypass number must be less than load_queue's size.\n")); 56 57 58 if (not is_multiple(_nb_store_queue_bank,_nb_inst_memory)) 59 test.error(_("Number of bank of store queue must be a multiple of number input instruction.\n")); 60 61 if (not is_multiple(_nb_load_queue_bank,_nb_inst_memory)) 62 test.error(_("Number of bank of load queue must be a multiple of number input instruction.\n")); 63 64 switch (_speculative_commit_predictor_scheme) 65 { 66 case PREDICTOR_NEVER_TAKE : 67 case PREDICTOR_ALWAYS_TAKE : 68 case PREDICTOR_COUNTER : 69 { 70 break; 71 } 72 case PREDICTOR_STATIC : 73 case PREDICTOR_LAST_TAKE : 74 case PREDICTOR_LOCAL : 75 case PREDICTOR_GLOBAL : 76 case PREDICTOR_META : 77 case PREDICTOR_CUSTOM : 78 { 79 test.error(toString(_("Predictor scheme \"%s\" is unsupported for load scheme.\n"),toString(_speculative_commit_predictor_scheme).c_str())); 80 break; 81 } 82 } 83 57 84 if (_nb_cache_port > 1) 58 85 test.warning(_("nb_cache_port > 1 is unsupported (Coming Soon).\n")); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/include/Parameters.h
r88 r138 26 26 { 27 27 //-----[ fields ]------------------------------------------------------------ 28 public : uint32_t _nb_inst_read ; 28 29 public : uint32_t _size_read_queue ; 29 30 public : uint32_t _size_reservation_station; … … 63 64 64 65 //-----[ methods ]----------------------------------------------------------- 65 public : Parameters (uint32_t size_read_queue , 66 public : Parameters (uint32_t nb_inst_read , 67 uint32_t size_read_queue , 66 68 uint32_t size_reservation_station, 67 69 uint32_t nb_context , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/src/Parameters.cpp
r88 r138 19 19 #undef FUNCTION 20 20 #define FUNCTION "Read_unit::Parameters" 21 Parameters::Parameters (uint32_t size_read_queue , 21 Parameters::Parameters (uint32_t nb_inst_read , 22 uint32_t size_read_queue , 22 23 uint32_t size_reservation_station, 23 24 uint32_t nb_context , … … 40 41 log_printf(FUNC,Read_unit,FUNCTION,"Begin"); 41 42 43 _nb_inst_read = nb_inst_read ; 42 44 _size_read_queue = size_read_queue ; 43 45 _size_reservation_station = size_reservation_station; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/src/Parameters_msg_error.cpp
r81 r138 27 27 Parameters_test test ("Read_unit"); 28 28 29 if (_nb_inst_read != 1) 30 test.error(_("nb_inst_read must be equal at 1.\n")); 31 29 32 log_printf(FUNC,Read_unit,FUNCTION,"End"); 30 33 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/include/Parameters.h
r115 r138 28 28 { 29 29 //-----[ fields ]------------------------------------------------------------ 30 public : uint32_t _nb_inst_write ; 30 31 public : uint32_t _size_write_queue ; 31 32 public : uint32_t _size_execute_queue ; … … 61 62 62 63 //-----[ methods ]----------------------------------------------------------- 63 public : Parameters (uint32_t size_write_queue , 64 public : Parameters (uint32_t nb_inst_write , 65 uint32_t size_write_queue , 64 66 uint32_t size_execute_queue , 65 67 uint32_t nb_context , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Parameters.cpp
r115 r138 19 19 #undef FUNCTION 20 20 #define FUNCTION "Write_unit::Parameters" 21 Parameters::Parameters (uint32_t size_write_queue , 21 Parameters::Parameters (uint32_t nb_inst_write , 22 uint32_t size_write_queue , 22 23 uint32_t size_execute_queue , 23 24 uint32_t nb_context , … … 36 37 log_printf(FUNC,Write_unit,FUNCTION,"Begin"); 37 38 39 _nb_inst_write = nb_inst_write ; 38 40 _size_write_queue = size_write_queue ; 39 41 _size_execute_queue = size_execute_queue ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Parameters_msg_error.cpp
r81 r138 27 27 28 28 if (_size_write_queue == 0) 29 test.error("Write queue must have a less one entry."); 29 test.error(_("Write queue must have a less one entry.\n")); 30 31 if (_nb_inst_write != 1) 32 test.error(_("nb_inst_write must be equal at 1.\n")); 30 33 31 34 log_printf(FUNC,Write_unit,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/include/Parameters.h
r136 r138 54 54 public : uint32_t * _size_load_queue ; //[nb_load_store_unit] 55 55 public : uint32_t * _size_speculative_access_queue ; //[nb_load_store_unit] 56 public : uint32_t * _nb_store_queue_bank ; //[nb_load_store_unit] 57 public : uint32_t * _nb_load_queue_bank ; //[nb_load_store_unit] 56 58 public : uint32_t * _nb_port_check ; //[nb_load_store_unit] 57 59 public : Tspeculative_load_t * _speculative_load ; //[nb_load_store_unit] 60 public : Tpredictor_t * _speculative_commit_predictor_scheme ; //[nb_load_store_unit] 61 public : uint32_t ** _lsu_pht_size_counter ; //[nb_load_store_unit][1] 62 public : uint32_t ** _lsu_pht_nb_counter ; //[nb_load_store_unit][1] 58 63 public : uint32_t * _nb_bypass_memory ; //[nb_load_store_unit] 59 64 public : uint32_t * _nb_cache_port ; //[nb_load_store_unit] 60 65 public : uint32_t * _nb_inst_memory ; //[nb_load_store_unit] 61 66 // * read_unit 67 public : uint32_t * _nb_inst_read ; //[nb_read_unit] 62 68 public : uint32_t * _size_read_queue ; //[nb_read_unit] 63 69 public : uint32_t * _size_reservation_station ; //[nb_read_unit] … … 70 76 public : bool ** _link_read_unit_with_thread ; //[nb_read_unit][nb_thread] 71 77 // * write_unit 78 public : uint32_t * _nb_inst_write ; //[nb_write_unit] 72 79 public : uint32_t * _size_write_queue ; //[nb_write_unit] 73 80 public : uint32_t * _size_execute_queue ; //[nb_write_unit] … … 158 165 uint32_t size_special_data , 159 166 167 uint32_t * nb_inst_read ,//[nb_read_unit] 160 168 uint32_t * size_read_queue ,//[nb_read_unit] 161 169 uint32_t * size_reservation_station ,//[nb_read_unit] … … 169 177 uint32_t * size_load_queue ,//[nb_load_store_unit] 170 178 uint32_t * size_speculative_access_queue ,//[nb_load_store_unit] 179 uint32_t * nb_store_queue_bank ,//[nb_load_store_unit] 180 uint32_t * nb_load_queue_bank ,//[nb_load_store_unit] 171 181 uint32_t * nb_port_check ,//[nb_load_store_unit] 172 182 Tspeculative_load_t * speculative_load ,//[nb_load_store_unit] 183 Tpredictor_t * speculative_commit_predictor_scheme ,//[nb_load_store_unit] 184 uint32_t ** lsu_pht_size_counter ,//[nb_load_store_unit][1] 185 uint32_t ** lsu_pht_nb_counter ,//[nb_load_store_unit][1] 173 186 uint32_t * nb_bypass_memory ,//[nb_load_store_unit] 174 187 uint32_t * nb_cache_port ,//[nb_load_store_unit] 175 188 uint32_t * nb_inst_memory ,//[nb_load_store_unit] 176 189 190 uint32_t * nb_inst_write ,//[nb_write_unit] 177 191 uint32_t * size_write_queue ,//[nb_write_unit] 178 192 uint32_t * size_execute_queue ,//[nb_write_unit] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/src/Parameters.cpp
r136 r138 31 31 uint32_t size_special_data , 32 32 33 uint32_t * nb_inst_read ,//[nb_read_unit] 33 34 uint32_t * size_read_queue ,//[nb_read_unit] 34 35 uint32_t * size_reservation_station ,//[nb_read_unit] … … 42 43 uint32_t * size_load_queue ,//[nb_load_store_unit] 43 44 uint32_t * size_speculative_access_queue ,//[nb_load_store_unit] 44 uint32_t * nb_port_check ,//[nb_load_store_unit] 45 Tspeculative_load_t * speculative_load ,//[nb_load_store_unit] 45 uint32_t * nb_store_queue_bank ,//[nb_load_store_unit] 46 uint32_t * nb_load_queue_bank ,//[nb_load_store_unit] 47 uint32_t * nb_port_check ,//[nb_load_store_unit] 48 Tspeculative_load_t * speculative_load ,//[nb_load_store_unit] 49 Tpredictor_t * speculative_commit_predictor_scheme ,//[nb_load_store_unit] 50 uint32_t ** lsu_pht_size_counter ,//[nb_load_store_unit][1] 51 uint32_t ** lsu_pht_nb_counter ,//[nb_load_store_unit][1] 46 52 uint32_t * nb_bypass_memory ,//[nb_load_store_unit] 47 53 uint32_t * nb_cache_port ,//[nb_load_store_unit] 48 54 uint32_t * nb_inst_memory ,//[nb_load_store_unit] 49 55 56 uint32_t * nb_inst_write ,//[nb_write_unit] 50 57 uint32_t * size_write_queue ,//[nb_write_unit] 51 58 uint32_t * size_execute_queue ,//[nb_write_unit] … … 92 99 _nb_packet = nb_packet ; 93 100 101 _nb_inst_read = nb_inst_read ; 94 102 _size_read_queue = size_read_queue ; 95 103 _size_reservation_station = size_reservation_station ; … … 100 108 _get_custom_information = get_custom_information ; 101 109 110 _nb_inst_write = nb_inst_write ; 102 111 _size_store_queue = size_store_queue ; 103 112 _size_load_queue = size_load_queue ; 104 113 _size_speculative_access_queue = size_speculative_access_queue ; 114 _nb_store_queue_bank = nb_store_queue_bank ; 115 _nb_load_queue_bank = nb_load_queue_bank ; 105 116 _nb_port_check = nb_port_check ; 106 117 _speculative_load = speculative_load ; 118 _speculative_commit_predictor_scheme = speculative_commit_predictor_scheme ; 119 _lsu_pht_size_counter = lsu_pht_size_counter ; 120 _lsu_pht_nb_counter = lsu_pht_nb_counter ; 107 121 _nb_bypass_memory = nb_bypass_memory ; 108 122 _nb_cache_port = nb_cache_port ; … … 379 393 for (uint32_t i=0; i<_nb_read_unit; i++) 380 394 _param_read_unit [i] = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::Parameters 381 (_size_read_queue [i], 395 (_nb_inst_read [i], 396 _size_read_queue [i], 382 397 _size_reservation_station [i], 383 398 _nb_context , … … 421 436 else 422 437 _param_load_store_unit [x] = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Parameters 423 (_size_store_queue [x], 424 _size_load_queue [x], 425 _size_speculative_access_queue [x], 426 _nb_port_check [x], 427 _speculative_load [x], 428 _nb_bypass_memory [x], 429 _nb_cache_port [x], 430 _nb_inst_memory [x], 431 _nb_context , 432 _nb_front_end , 433 _nb_ooo_engine , 434 _nb_packet , 435 size_general_data , 436 size_special_data , 437 _max_nb_special_register , 438 _max_nb_general_register , 439 _nb_thread , 440 _num_thread_valid ); 438 (_size_store_queue [x], 439 _size_load_queue [x], 440 _size_speculative_access_queue [x], 441 442 _nb_store_queue_bank [x], 443 _nb_load_queue_bank [x], 444 _nb_port_check [x], 445 _speculative_load [x], 446 _speculative_commit_predictor_scheme [x], 447 _lsu_pht_size_counter [x], 448 _lsu_pht_nb_counter [x], 449 _nb_bypass_memory [x], 450 _nb_cache_port [x], 451 _nb_inst_memory [x], 452 _nb_context , 453 _nb_front_end , 454 _nb_ooo_engine , 455 _nb_packet , 456 size_general_data , 457 size_special_data , 458 _max_nb_special_register , 459 _max_nb_general_register , 460 _nb_thread , 461 _num_thread_valid ); 441 462 } 442 463 … … 446 467 for (uint32_t i=0; i<_nb_write_unit; i++) 447 468 _param_write_unit [i] = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::Parameters 448 (_size_write_queue [i], 469 (_nb_inst_write [i], 470 _size_write_queue [i], 449 471 _size_execute_queue [i], 450 472 _nb_context , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit.cpp
r123 r138 72 72 #endif 73 73 74 #if def SYSTEMC74 #if defined(SYSTEMC) and (defined(STATISTICS) or defined(VHDL_TESTBENCH)) 75 75 if (usage_is_set(_usage,USE_SYSTEMC)) 76 76 { … … 84 84 // List dependency information 85 85 # endif 86 86 } 87 87 #endif 88 } 88 89 89 log_end(Decod_unit,FUNCTION); 90 90 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Ifetch_unit.cpp
r123 r138 70 70 #endif 71 71 72 #if def SYSTEMC72 #if defined(SYSTEMC) and (defined(STATISTICS) or defined(VHDL_TESTBENCH)) 73 73 if (usage_is_set(_usage,USE_SYSTEMC)) 74 74 { … … 82 82 // List dependency information 83 83 # endif 84 84 } 85 85 #endif 86 }87 86 log_printf(FUNC,Ifetch_unit,FUNCTION,"End"); 88 87 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer.cpp
r123 r138 71 71 #endif 72 72 73 #if def SYSTEMC73 #if defined(SYSTEMC) and (defined(STATISTICS) or defined(VHDL_TESTBENCH)) 74 74 if (usage_is_set(_usage,USE_SYSTEMC)) 75 75 { … … 83 83 // List dependency information 84 84 # endif 85 85 } 86 86 #endif 87 }88 87 log_printf(FUNC,Branch_Target_Buffer,FUNCTION,"End"); 89 88 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/src/Meta_Predictor.cpp
r110 r138 68 68 #endif 69 69 70 #if def SYSTEMC70 #if defined(SYSTEMC) and (defined(STATISTICS) or defined(VHDL_TESTBENCH)) 71 71 if (usage_is_set(_usage,USE_SYSTEMC)) 72 72 { … … 80 80 // List dependency information 81 81 # endif 82 82 } 83 83 #endif 84 }85 84 log_end(Meta_Predictor,FUNCTION); 86 85 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction.cpp
r123 r138 71 71 #endif 72 72 73 #if def SYSTEMC73 #if defined(SYSTEMC) and (defined(STATISTICS) or defined(VHDL_TESTBENCH)) 74 74 if (usage_is_set(_usage,USE_SYSTEMC)) 75 75 { … … 83 83 // List dependency information 84 84 # endif 85 85 } 86 86 #endif 87 }88 87 log_printf(FUNC,Direction,FUNCTION,"End"); 89 88 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit.cpp
r123 r138 70 70 #endif 71 71 72 #if def SYSTEMC72 #if defined(SYSTEMC) and (defined(STATISTICS) or defined(VHDL_TESTBENCH)) 73 73 if (usage_is_set(_usage,USE_SYSTEMC)) 74 74 { … … 82 82 // List dependency information 83 83 # endif 84 84 } 85 85 #endif 86 }87 86 log_printf(FUNC,Prediction_unit,FUNCTION,"End"); 88 87 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end.cpp
r123 r138 71 71 #endif 72 72 73 #if def SYSTEMC73 #if defined(SYSTEMC) and (defined(STATISTICS) or defined(VHDL_TESTBENCH)) 74 74 if (usage_is_set(_usage,USE_SYSTEMC)) 75 75 { … … 83 83 // List dependency information 84 84 # endif 85 85 } 86 86 #endif 87 }88 87 log_end(Front_end,FUNCTION); 89 88 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h
r137 r138 208 208 209 209 // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 210 public : SC_IN (Tcontrol_t )*** in_EVENT_VAL ;//[nb_front_end][nb_context]211 public : SC_OUT(Tcontrol_t )*** out_EVENT_ACK ;//[nb_front_end][nb_context]212 public : SC_IN (Taddress_t )*** in_EVENT_ADDRESS ;//[nb_front_end][nb_context]213 public : SC_IN (Taddress_t )*** in_EVENT_ADDRESS_NEXT ;//[nb_front_end][nb_context]214 public : SC_IN (Tcontrol_t )*** in_EVENT_ADDRESS_NEXT_VAL ;//[nb_front_end][nb_context]215 public : SC_IN (Tcontrol_t )*** in_EVENT_IS_DS_TAKE ;//[nb_front_end][nb_context]210 public : SC_IN (Tcontrol_t ) *** in_EVENT_VAL ;//[nb_front_end][nb_context] 211 public : SC_OUT(Tcontrol_t ) *** out_EVENT_ACK ;//[nb_front_end][nb_context] 212 public : SC_IN (Taddress_t ) *** in_EVENT_ADDRESS ;//[nb_front_end][nb_context] 213 public : SC_IN (Taddress_t ) *** in_EVENT_ADDRESS_NEXT ;//[nb_front_end][nb_context] 214 public : SC_IN (Tcontrol_t ) *** in_EVENT_ADDRESS_NEXT_VAL ;//[nb_front_end][nb_context] 215 public : SC_IN (Tcontrol_t ) *** in_EVENT_IS_DS_TAKE ;//[nb_front_end][nb_context] 216 216 217 217 // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Parameters.h
r117 r138 24 24 { 25 25 //-----[ fields ]------------------------------------------------------------ 26 public : uint32_t _nb_front_end ;27 public : uint32_t * _nb_context ;//[nb_front_end]28 public : uint32_t _nb_rename_unit ;29 public : uint32_t _size_queue ;30 public : uint32_t _nb_bank ;31 public : uint32_t * _nb_inst_insert ;//[nb_rename_unit]32 public : uint32_t * _nb_inst_retire;//[nb_rename_unit]33 public : uint32_t _nb_inst_commit ;34 public : uint32_t _nb_inst_reexecute;35 public : uint32_t _nb_inst_branch_complete;36 public : uint32_t ** _nb_branch_speculated ;//[nb_front_end][nb_context]37 //public : uint32_t _size_general_data ; 38 //public : uint32_t _size_store_queue_ptr;39 //public : uint32_t _size_load_queue_ptr;40 //public : uint32_t _size_general_register;41 //public : uint32_t _size_special_register ;42 public : Tpriority_t _priority;43 public : T load_balancing_t _load_balancing;44 public : uint32_t _nb_rename_unit_select;45 public : uint32_t _nb_thread;46 public : uint32_t ** _translate_num_context_to_num_thread; //[nb_front_end][nb_context]47 public : const uint32_t _nb_bank_access_commit ;48 public : const retire_ooo_t _retire_ooo;49 50 public : uint32_t _max_nb_context ;51 public : uint32_t _max_nb_inst_insert ;52 public : uint32_t _max_nb_inst_retire ;53 //public : uint32_t _size_address ;54 //public : uint32_t _size_front_end_id ;55 //public : uint32_t _size_context_id ;56 public : uint32_t _size_rename_unit_id ;57 public : uint32_t _size_bank ;58 //public : uint32_t _size_nb_inst ;59 //public : uint32_t _size_packet_id ;60 public : uint32_t ** _array_size_depth ;//[nb_front_end][nb_context]61 //public : uint32_t _max_size_depth ;62 63 //public : Tpacket_t _shift_num_bank ;64 public : Tpacket_t _mask_num_bank ;65 public : Tpacket_t _shift_num_slot ;66 //public : Tpacket_t _mask_num_slot ;67 68 69 //public : bool _have_port_front_end_id ;70 //public : bool _have_port_context_id ;71 //public : bool _have_port_packet_id ;72 public : bool _have_port_rename_unit_id;73 //public : bool _have_port_load_queue_ptr;74 //public : bool _have_port_max_depth ;75 //public : bool ** _have_port_depth ;//[nb_front_end][nb_context]76 77 public : bool * _have_thread ;//[nb_thread]26 public : uint32_t _nb_front_end ; 27 public : uint32_t * _nb_context ;//[nb_front_end] 28 public : uint32_t _nb_rename_unit ; 29 public : uint32_t _size_queue ; 30 public : uint32_t _nb_bank ; 31 public : Tretire_ooo_scheme_t _retire_ooo_scheme ; 32 public : uint32_t * _nb_inst_insert ;//[nb_rename_unit] 33 public : uint32_t * _nb_inst_retire ;//[nb_rename_unit] 34 public : uint32_t _nb_inst_commit ; 35 public : uint32_t _nb_inst_reexecute ; 36 public : uint32_t _nb_inst_branch_complete ; 37 public : uint32_t ** _nb_branch_speculated ;//[nb_front_end][nb_context] 38 //public : uint32_t _size_general_data ; 39 //public : uint32_t _size_store_queue_ptr ; 40 //public : uint32_t _size_load_queue_ptr ; 41 //public : uint32_t _size_general_register ; 42 //public : uint32_t _size_special_register ; 43 public : Tpriority_t _priority ; 44 public : Tload_balancing_t _load_balancing ; 45 public : uint32_t _nb_rename_unit_select ; 46 public : uint32_t _nb_thread ; 47 public : uint32_t ** _translate_num_context_to_num_thread; //[nb_front_end][nb_context] 48 public : const uint32_t _nb_bank_access_commit ; 49 50 public : uint32_t _max_nb_context ; 51 public : uint32_t _max_nb_inst_insert ; 52 public : uint32_t _max_nb_inst_retire ; 53 //public : uint32_t _size_address ; 54 //public : uint32_t _size_front_end_id ; 55 //public : uint32_t _size_context_id ; 56 public : uint32_t _size_rename_unit_id ; 57 public : uint32_t _size_bank ; 58 //public : uint32_t _size_nb_inst ; 59 //public : uint32_t _size_packet_id ; 60 public : uint32_t ** _array_size_depth ;//[nb_front_end][nb_context] 61 //public : uint32_t _max_size_depth ; 62 63 //public : Tpacket_t _shift_num_bank ; 64 public : Tpacket_t _mask_num_bank ; 65 public : Tpacket_t _shift_num_slot ; 66 //public : Tpacket_t _mask_num_slot ; 67 68 69 //public : bool _have_port_front_end_id ; 70 //public : bool _have_port_context_id ; 71 //public : bool _have_port_packet_id ; 72 public : bool _have_port_rename_unit_id; 73 //public : bool _have_port_load_queue_ptr; 74 //public : bool _have_port_max_depth ; 75 //public : bool ** _have_port_depth ;//[nb_front_end][nb_context] 76 77 public : bool * _have_thread ;//[nb_thread] 78 78 79 79 //-----[ methods ]----------------------------------------------------------- 80 public : Parameters (uint32_t nb_front_end , 81 uint32_t * nb_context ,//[nb_front_end] 82 uint32_t nb_rename_unit , 83 uint32_t size_queue , 84 uint32_t nb_bank , 85 uint32_t * nb_inst_insert ,//[nb_rename_unit] 86 uint32_t * nb_inst_retire ,//[nb_rename_unit] 87 uint32_t nb_inst_commit , 88 uint32_t nb_inst_reexecute , 89 uint32_t nb_inst_branch_complete , 90 uint32_t ** nb_branch_speculated ,//[nb_front_end][nb_context] 91 uint32_t size_nb_inst_decod , 92 uint32_t size_general_data , 93 uint32_t size_store_queue_ptr , 94 uint32_t size_load_queue_ptr , 95 uint32_t size_general_register , 96 uint32_t size_special_register , 97 Tpriority_t priority , 98 Tload_balancing_t load_balancing , 99 uint32_t nb_rename_unit_select , 100 uint32_t nb_thread , 101 uint32_t ** translate_num_context_to_num_thread, //[nb_front_end][nb_context] 102 bool is_toplevel=false 80 public : Parameters (uint32_t nb_front_end , 81 uint32_t * nb_context ,//[nb_front_end] 82 uint32_t nb_rename_unit , 83 uint32_t size_queue , 84 uint32_t nb_bank , 85 Tretire_ooo_scheme_t retire_ooo_scheme , 86 uint32_t * nb_inst_insert ,//[nb_rename_unit] 87 uint32_t * nb_inst_retire ,//[nb_rename_unit] 88 uint32_t nb_inst_commit , 89 uint32_t nb_inst_reexecute , 90 uint32_t nb_inst_branch_complete , 91 uint32_t ** nb_branch_speculated ,//[nb_front_end][nb_context] 92 uint32_t size_nb_inst_decod , 93 uint32_t size_general_data , 94 uint32_t size_store_queue_ptr , 95 uint32_t size_load_queue_ptr , 96 uint32_t size_general_register , 97 uint32_t size_special_register , 98 Tpriority_t priority , 99 Tload_balancing_t load_balancing , 100 uint32_t nb_rename_unit_select , 101 uint32_t nb_thread , 102 uint32_t ** translate_num_context_to_num_thread, //[nb_front_end][nb_context] 103 bool is_toplevel=false 103 104 ); 104 105 // public : Parameters (Parameters & param) ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Types.h
r137 r138 23 23 RETIRE_OOO_RENAME_UNIT, 24 24 RETIRE_OOO_CONTEXT 25 } retire_ooo_t;25 } Tretire_ooo_scheme_t; 26 26 27 27 typedef enum … … 142 142 }; // end namespace core 143 143 }; // end namespace behavioural 144 145 template<> inline std::string toString<morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::Tretire_ooo_scheme_t>(const morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::Tretire_ooo_scheme_t& x) 146 { 147 switch (x) 148 { 149 case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::RETIRE_IN_ORDER : return "retire_in_order" ; break; 150 case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::RETIRE_OOO_RENAME_UNIT : return "retire_ooo_rename_unit"; break; 151 case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::RETIRE_OOO_CONTEXT : return "retire_ooo_context" ; break; 152 default : return "" ; break; 153 } 154 }; 155 156 template<> inline morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::Tretire_ooo_scheme_t fromString<morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::Tretire_ooo_scheme_t>(const std::string& x) 157 { 158 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::RETIRE_IN_ORDER ))) == 0) or 159 (x.compare(toString( morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::RETIRE_IN_ORDER )) == 0)) 160 return morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::RETIRE_IN_ORDER; 161 162 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::RETIRE_OOO_RENAME_UNIT))) == 0) or 163 (x.compare(toString( morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::RETIRE_OOO_RENAME_UNIT )) == 0)) 164 return morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::RETIRE_OOO_RENAME_UNIT; 165 166 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::RETIRE_OOO_CONTEXT ))) == 0) or 167 (x.compare(toString( morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::RETIRE_OOO_CONTEXT )) == 0)) 168 return morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::RETIRE_OOO_CONTEXT; 169 170 throw (ERRORMORPHEO ("fromString","Unknow string : \""+x+"\"")); 171 }; 144 172 145 173 template<> inline std::string toString<morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::rob_state_t>(const morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::rob_state_t& x) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Parameters.cpp
r117 r138 21 21 #undef FUNCTION 22 22 #define FUNCTION "Commit_unit::Parameters" 23 Parameters::Parameters (uint32_t nb_front_end ,24 uint32_t * nb_context ,25 uint32_t nb_rename_unit ,26 uint32_t size_queue ,27 uint32_t nb_bank ,28 uint32_t * nb_inst_insert,29 uint32_t * nb_inst_retire,30 uint32_t nb_inst_commit,31 uint32_t nb_inst_reexecute,32 uint32_t nb_inst_branch_complete,33 uint32_t ** nb_branch_speculated,34 uint32_t size_nb_inst_decod,35 uint32_t size_general_data,36 uint32_t size_store_queue_ptr,37 uint32_t size_load_queue_ptr,38 uint32_t size_general_register,39 uint32_t size_special_register ,40 Tpriority_t priority,41 T load_balancing_t load_balancing,42 uint32_t nb_rename_unit_select,43 uint32_t nb_thread,44 uint32_t ** translate_num_context_to_num_thread,45 bool is_toplevel):46 _nb_bank_access_commit (1 ),47 _ retire_ooo (RETIRE_IN_ORDER)23 Parameters::Parameters (uint32_t nb_front_end , 24 uint32_t * nb_context , 25 uint32_t nb_rename_unit , 26 uint32_t size_queue , 27 uint32_t nb_bank , 28 Tretire_ooo_scheme_t retire_ooo_scheme , 29 uint32_t * nb_inst_insert , 30 uint32_t * nb_inst_retire , 31 uint32_t nb_inst_commit , 32 uint32_t nb_inst_reexecute , 33 uint32_t nb_inst_branch_complete , 34 uint32_t ** nb_branch_speculated , 35 uint32_t size_nb_inst_decod , 36 uint32_t size_general_data , 37 uint32_t size_store_queue_ptr , 38 uint32_t size_load_queue_ptr , 39 uint32_t size_general_register , 40 uint32_t size_special_register , 41 Tpriority_t priority , 42 Tload_balancing_t load_balancing , 43 uint32_t nb_rename_unit_select , 44 uint32_t nb_thread , 45 uint32_t ** translate_num_context_to_num_thread, 46 bool is_toplevel): 47 _nb_bank_access_commit (1 ) 48 48 { 49 49 log_begin(Commit_unit,FUNCTION); … … 54 54 _size_queue = size_queue ; 55 55 _nb_bank = nb_bank ; 56 _retire_ooo_scheme = retire_ooo_scheme ; 56 57 _nb_inst_insert = nb_inst_insert ; 57 58 _nb_inst_retire = nb_inst_retire ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Parameters_msg_error.cpp
r122 r138 40 40 test.error(_("nb_bank must be a multiple of size_queue.\n")); 41 41 42 if (_retire_ooo_scheme != RETIRE_IN_ORDER) 43 test.error(toString(_("retire_ooo_scheme \"%s\" is not yet implemented.\n"),toString(_retire_ooo_scheme).c_str())); 44 42 45 // if (_nb_inst_reexecute != 1) 43 46 // test.error(_("nb_inst_reexecute must be set at 1. Anothers value is unsupported.\n")); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Parameters_print.cpp
r88 r138 25 25 std::string str = ""; 26 26 27 str += toString(MSG_INFORMATION)+" * nb_front_end : "+toString<uint32_t >(_nb_front_end )+"\n";27 str += toString(MSG_INFORMATION)+" * nb_front_end : "+toString<uint32_t >(_nb_front_end )+"\n"; 28 28 for (uint32_t i=0; i<_nb_front_end; ++i) 29 29 str += toString(MSG_INFORMATION)+" * nb_context ["+toString(i)+"] : "+toString<uint32_t >(_nb_context [i])+"\n";//[nb_front_end] 30 str += toString(MSG_INFORMATION)+" * nb_rename_unit : "+toString<uint32_t >(_nb_rename_unit )+"\n";31 str += toString(MSG_INFORMATION)+" * size_queue : "+toString<uint32_t >(_size_queue )+"\n";32 str += toString(MSG_INFORMATION)+" * nb_bank : "+toString<uint32_t >(_nb_bank )+"\n";30 str += toString(MSG_INFORMATION)+" * nb_rename_unit : "+toString<uint32_t >(_nb_rename_unit )+"\n"; 31 str += toString(MSG_INFORMATION)+" * size_queue : "+toString<uint32_t >(_size_queue )+"\n"; 32 str += toString(MSG_INFORMATION)+" * nb_bank : "+toString<uint32_t >(_nb_bank )+"\n"; 33 33 for (uint32_t i=0; i<_nb_rename_unit; ++i) 34 34 str += toString(MSG_INFORMATION)+" * nb_inst_insert ["+toString(i)+"] : "+toString<uint32_t >(_nb_inst_insert[i])+"\n";//[nb_rename_unit] 35 35 for (uint32_t i=0; i<_nb_rename_unit; ++i) 36 36 str += toString(MSG_INFORMATION)+" * nb_inst_retire ["+toString(i)+"] : "+toString<uint32_t >(_nb_inst_retire[i])+"\n";//[nb_rename_unit] 37 str += toString(MSG_INFORMATION)+" * nb_inst_commit : "+toString<uint32_t >(_nb_inst_commit )+"\n";38 str += toString(MSG_INFORMATION)+" * nb_inst_reexecute : "+toString<uint32_t >(_nb_inst_reexecute )+"\n";39 str += toString(MSG_INFORMATION)+" * nb_inst_branch_complete : "+toString<uint32_t >(_nb_inst_branch_complete)+"\n";37 str += toString(MSG_INFORMATION)+" * nb_inst_commit : "+toString<uint32_t >(_nb_inst_commit )+"\n"; 38 str += toString(MSG_INFORMATION)+" * nb_inst_reexecute : "+toString<uint32_t >(_nb_inst_reexecute )+"\n"; 39 str += toString(MSG_INFORMATION)+" * nb_inst_branch_complete : "+toString<uint32_t >(_nb_inst_branch_complete)+"\n"; 40 40 for (uint32_t i=0; i<_nb_front_end; ++i) 41 41 for (uint32_t j=0; j<_nb_context[i]; ++j) 42 42 str += toString(MSG_INFORMATION)+" * nb_branch_speculated ["+toString(i)+"]["+toString(j)+"] : "+toString<uint32_t >(_nb_branch_speculated[i][j])+"\n";//[nb_front_end][nb_context] 43 str += toString(MSG_INFORMATION)+" * size_general_data : "+toString<uint32_t >(_size_general_data )+"\n";44 str += toString(MSG_INFORMATION)+" * size_store_queue_ptr : "+toString<uint32_t >(_size_store_queue_ptr )+"\n";45 str += toString(MSG_INFORMATION)+" * size_load_queue_ptr : "+toString<uint32_t >(_size_load_queue_ptr )+"\n";46 str += toString(MSG_INFORMATION)+" * size_general_register : "+toString<uint32_t >(_size_general_register )+"\n";47 str += toString(MSG_INFORMATION)+" * size_special_register : "+toString<uint32_t >(_size_special_register )+"\n";48 str += toString(MSG_INFORMATION)+" * priority : "+toString<Tpriority_t >(_priority )+"\n";49 str += toString(MSG_INFORMATION)+" * load_balancing : "+toString<Tload_balancing_t >(_load_balancing )+"\n";50 str += toString(MSG_INFORMATION)+" * nb_rename_unit_select : "+toString<uint32_t >(_nb_rename_unit_select )+"\n";51 str += toString(MSG_INFORMATION)+" * nb_bank_access_commit : "+toString<uint32_t >(_nb_bank_access_commit )+"\n";52 str += toString(MSG_INFORMATION)+" * retire_ooo : "+toString<retire_ooo_t >(_retire_ooo)+"\n";43 str += toString(MSG_INFORMATION)+" * size_general_data : "+toString<uint32_t >(_size_general_data )+"\n"; 44 str += toString(MSG_INFORMATION)+" * size_store_queue_ptr : "+toString<uint32_t >(_size_store_queue_ptr )+"\n"; 45 str += toString(MSG_INFORMATION)+" * size_load_queue_ptr : "+toString<uint32_t >(_size_load_queue_ptr )+"\n"; 46 str += toString(MSG_INFORMATION)+" * size_general_register : "+toString<uint32_t >(_size_general_register )+"\n"; 47 str += toString(MSG_INFORMATION)+" * size_special_register : "+toString<uint32_t >(_size_special_register )+"\n"; 48 str += toString(MSG_INFORMATION)+" * priority : "+toString<Tpriority_t >(_priority )+"\n"; 49 str += toString(MSG_INFORMATION)+" * load_balancing : "+toString<Tload_balancing_t >(_load_balancing )+"\n"; 50 str += toString(MSG_INFORMATION)+" * nb_rename_unit_select : "+toString<uint32_t >(_nb_rename_unit_select )+"\n"; 51 str += toString(MSG_INFORMATION)+" * nb_bank_access_commit : "+toString<uint32_t >(_nb_bank_access_commit )+"\n"; 52 str += toString(MSG_INFORMATION)+" * retire_ooo_scheme : "+toString<Tretire_ooo_scheme_t>(_retire_ooo_scheme )+"\n"; 53 53 54 54 /* -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Issue_queue.h
r136 r138 149 149 // in_order implementation only 150 150 // out_of_order implementation only 151 151 //private : generic::priority::Priority * _priority_reg; 152 152 private : generic::priority::Priority * _priority_out; 153 153 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_allocation.cpp
r136 r138 191 191 _param->_nb_bank); 192 192 193 _priority_reg = new generic::priority::Priority (_name+"_priority_reg" ,194 195 196 193 // _priority_reg = new generic::priority::Priority (_name+"_priority_reg" , 194 // _param->_priority , 195 // _param->_nb_bank, 196 // _param->_nb_bank); 197 197 } 198 198 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_deallocation.cpp
r136 r138 136 136 { 137 137 delete _priority_out; 138 delete _priority_reg;138 // delete _priority_reg; 139 139 } 140 140 delete _component; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_out_of_order_genMoore.cpp
r136 r138 45 45 ack [i][j] = false; 46 46 47 std::list<generic::priority::select_t> * select_reg = _priority_reg->select(); // same select for all issue47 // std::list<generic::priority::select_t> * select_reg = _priority_reg->select(); // same select for all issue 48 48 49 49 // issue_in interface … … 60 60 61 61 // scan all bank 62 for (std::list<generic::priority::select_t>::iterator it=select_reg->begin(); 63 it!=select_reg->end(); 64 it++) 62 // for (std::list<generic::priority::select_t>::iterator it=select_reg->begin(); 63 // it!=select_reg->end(); 64 // it++) 65 for (uint32_t num_bank=0; 66 num_bank<_param->_nb_bank; 67 ++num_bank) 65 68 { 66 uint32_t num_bank = it->grp;69 // uint32_t num_bank = it->grp; 67 70 68 71 log_printf(TRACE,Issue_queue,FUNCTION," * BANK [%d]",num_bank); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_out_of_order_transition.cpp
r128 r138 28 28 // _priority_in ->reset(); 29 29 _priority_out->reset(); 30 30 // _priority_reg->reset(); 31 31 32 32 for (uint32_t i=0; i<_param->_nb_bank; i++) … … 37 37 // _priority_in ->transition(); 38 38 _priority_out->transition(); 39 _priority_reg->transition();39 // _priority_reg->transition(); 40 40 41 41 // =================================================================== -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Parameters_msg_error.cpp
r136 r138 41 41 } 42 42 43 if (// (_queue_scheme == ISSUE_QUEUE_SCHEME_IN_BUNDLE_ORDER) or44 (_queue_scheme == ISSUE_QUEUE_SCHEME_OUT_OF_ORDER ))45 test.error(toString(_("Can have deadlock with the queue scheme \"%s\".\n"),toString(_queue_scheme).c_str()));43 // if (// (_queue_scheme == ISSUE_QUEUE_SCHEME_IN_BUNDLE_ORDER) or 44 // (_queue_scheme == ISSUE_QUEUE_SCHEME_OUT_OF_ORDER )) 45 // test.error(toString(_("Can have deadlock with the queue scheme \"%s\".\n"),toString(_queue_scheme).c_str())); 46 46 47 47 if (not is_multiple(_size_queue, _nb_bank)) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/include/Load_Store_pointer_unit.h
r131 r138 134 134 morpheo::behavioural::Tusage_t usage 135 135 ); 136 public : ~Load_Store_pointer_unit(void);137 136 public : ~Load_Store_pointer_unit (void); 137 138 138 private : void allocation ( 139 139 #ifdef STATISTICS … … 146 146 147 147 #ifdef SYSTEMC 148 public : void constant (void);148 public : void constant (void); 149 149 public : void transition (void); 150 150 public : void genMealy_insert (void); 151 151 public : void genMealy_retire (void); 152 #endif 152 #endif 153 153 154 #if VHDL 154 #if VHDL 155 155 public : void vhdl (void); 156 156 private : void vhdl_declaration (Vhdl * & vhdl); 157 157 private : void vhdl_body (Vhdl * & vhdl); 158 #endif 158 #endif 159 159 160 160 #ifdef STATISTICS -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Load_Store_pointer_unit_genMealy_insert.cpp
r123 r138 54 54 log_printf(TRACE,Load_Store_pointer_unit,FUNCTION," * INSERT [%d]",i); 55 55 56 Tcontrol_t ack = false; 56 Tcontrol_t ack = false; 57 bool find = false; 57 58 58 if ((PORT_READ(in_INSERT_VAL [i]) == true ) and 59 (PORT_READ(in_INSERT_TYPE [i]) == TYPE_MEMORY)) 60 { 61 log_printf(TRACE,Load_Store_pointer_unit,FUNCTION," * type is memory"); 62 63 Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_INSERT_FRONT_END_ID [i]):0; 64 Tcontext_t context_id = (_param->_have_port_context_id )?PORT_READ(in_INSERT_CONTEXT_ID [i]):0; 65 uint32_t lsq = _param->_link_load_store_unit_with_thread[front_end_id][context_id]; 66 59 if (PORT_READ(in_INSERT_VAL [i]) == true) 60 { 61 Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_INSERT_FRONT_END_ID [i]):0; 62 Tcontext_t context_id = (_param->_have_port_context_id )?PORT_READ(in_INSERT_CONTEXT_ID [i]):0; 63 uint32_t lsq = _param->_link_load_store_unit_with_thread[front_end_id][context_id]; 64 67 65 log_printf(TRACE,Load_Store_pointer_unit,FUNCTION," * front_end_id : %d",front_end_id); 68 66 log_printf(TRACE,Load_Store_pointer_unit,FUNCTION," * context_id : %d",context_id ); 69 67 log_printf(TRACE,Load_Store_pointer_unit,FUNCTION," * lsq : %d",lsq ); 68 69 PORT_WRITE(out_INSERT_STORE_QUEUE_PTR_WRITE [i], STORE_QUEUE_PTR_WRITE [lsq]); 70 // PORT_WRITE(out_INSERT_STORE_QUEUE_PTR_READ [i], ((reg_STORE_QUEUE_PTR_READ [front_end_id][context_id]+1)%_param->_size_load_queue[lsq])); 71 PORT_WRITE(out_INSERT_STORE_QUEUE_PTR_READ [i], reg_STORE_QUEUE_PTR_READ [front_end_id][context_id]); 72 PORT_WRITE(out_INSERT_STORE_QUEUE_EMPTY [i], reg_STORE_QUEUE_EMPTY [front_end_id][context_id]); 73 if (_param->_have_port_load_queue_ptr) 74 PORT_WRITE(out_INSERT_LOAD_QUEUE_PTR_WRITE [i], LOAD_QUEUE_PTR_WRITE [lsq]); 70 75 71 // Test if a previous instruction use the same lsq 72 // Authorize once memory access by load store unit 73 if (nb_use_lsq [lsq] > 0) 74 { 75 nb_use_lsq [lsq] --; 76 if (PORT_READ(in_INSERT_TYPE [i]) == TYPE_MEMORY) 77 { 78 log_printf(TRACE,Load_Store_pointer_unit,FUNCTION," * type is memory"); 79 80 find = true; 81 82 // Test if a previous instruction use the same lsq 83 // Authorize once memory access by load store unit 84 if (nb_use_lsq [lsq] > 0) 85 { 86 nb_use_lsq [lsq] --; 87 88 uint32_t ptr; 89 90 log_printf(TRACE,Load_Store_pointer_unit,FUNCTION," * sq_ptr_write : %d",STORE_QUEUE_PTR_WRITE [lsq]); 91 log_printf(TRACE,Load_Store_pointer_unit,FUNCTION," * lq_ptr_write : %d",LOAD_QUEUE_PTR_WRITE [lsq]); 92 93 // operation became of decod_stage. Also operation is != store_head_ok and store_head_ko 94 if (is_operation_memory_store(PORT_READ(in_INSERT_OPERATION [i]))) 95 { 96 log_printf(TRACE,Load_Store_pointer_unit,FUNCTION," * USE_STORE_QUEUE"); 97 98 internal_INSERT_OPERATION_USE [i] = OPERATION_USE_STORE_QUEUE; 99 100 ptr = STORE_QUEUE_PTR_WRITE [lsq]; 101 ack = not STORE_QUEUE_USE [lsq][ptr] and (static_cast<uint32_t>(STORE_QUEUE_NB_USE [lsq]+1) < _param->_size_store_queue[lsq]); 102 103 if (ack) 104 { 105 STORE_QUEUE_PTR_WRITE [lsq] = (ptr+1)%_param->_size_store_queue[lsq]; 106 STORE_QUEUE_NB_USE [lsq] ++; 107 STORE_QUEUE_USE [lsq][ptr] = true; 108 } 109 } 110 else 111 { 112 log_printf(TRACE,Load_Store_pointer_unit,FUNCTION," * USE_LOAD_QUEUE"); 113 114 internal_INSERT_OPERATION_USE [i] = OPERATION_USE_LOAD_QUEUE; 115 116 ptr = LOAD_QUEUE_PTR_WRITE [lsq]; 117 ack = (not LOAD_QUEUE_USE [lsq][ptr]); 118 119 if (ack) 120 { 121 LOAD_QUEUE_PTR_WRITE [lsq] = (ptr+1)%_param->_size_load_queue[lsq]; 122 LOAD_QUEUE_USE [lsq][ptr] = true; 123 } 124 } 125 126 log_printf(TRACE,Load_Store_pointer_unit,FUNCTION," * ptr : %d",ptr ); 127 log_printf(TRACE,Load_Store_pointer_unit,FUNCTION," * ack : %d",ack ); 128 129 internal_INSERT_LSQ [i] = lsq; 130 internal_INSERT_PTR [i] = ptr; 131 } 132 } 133 } 76 134 77 uint32_t ptr; 135 if (not find) 136 { 137 ack = true; 138 139 internal_INSERT_OPERATION_USE [i] = OPERATION_USE_NONE; 140 } 78 141 79 PORT_WRITE(out_INSERT_STORE_QUEUE_PTR_WRITE [i], STORE_QUEUE_PTR_WRITE [lsq]);80 // PORT_WRITE(out_INSERT_STORE_QUEUE_PTR_READ [i], ((reg_STORE_QUEUE_PTR_READ [front_end_id][context_id]+1)%_param->_size_load_queue[lsq]));81 PORT_WRITE(out_INSERT_STORE_QUEUE_PTR_READ [i], reg_STORE_QUEUE_PTR_READ [front_end_id][context_id]);82 PORT_WRITE(out_INSERT_STORE_QUEUE_EMPTY [i], reg_STORE_QUEUE_EMPTY [front_end_id][context_id]);83 if (_param->_have_port_load_queue_ptr)84 PORT_WRITE(out_INSERT_LOAD_QUEUE_PTR_WRITE [i], LOAD_QUEUE_PTR_WRITE [lsq]);85 86 log_printf(TRACE,Load_Store_pointer_unit,FUNCTION," * sq_ptr_write : %d",STORE_QUEUE_PTR_WRITE [lsq]);87 log_printf(TRACE,Load_Store_pointer_unit,FUNCTION," * lq_ptr_write : %d",LOAD_QUEUE_PTR_WRITE [lsq]);88 89 // operation became of decod_stage. Also operation is != store_head_ok and store_head_ko90 if (is_operation_memory_store(PORT_READ(in_INSERT_OPERATION [i])))91 {92 log_printf(TRACE,Load_Store_pointer_unit,FUNCTION," * USE_STORE_QUEUE");93 94 internal_INSERT_OPERATION_USE [i] = OPERATION_USE_STORE_QUEUE;95 96 ptr = STORE_QUEUE_PTR_WRITE [lsq];97 ack = not STORE_QUEUE_USE [lsq][ptr] and (static_cast<uint32_t>(STORE_QUEUE_NB_USE [lsq]+1) < _param->_size_store_queue[lsq]);98 99 if (ack)100 {101 STORE_QUEUE_PTR_WRITE [lsq] = (ptr+1)%_param->_size_store_queue[lsq];102 STORE_QUEUE_NB_USE [lsq] ++;103 STORE_QUEUE_USE [lsq][ptr] = true;104 }105 }106 else107 {108 log_printf(TRACE,Load_Store_pointer_unit,FUNCTION," * USE_LOAD_QUEUE");109 110 internal_INSERT_OPERATION_USE [i] = OPERATION_USE_LOAD_QUEUE;111 112 ptr = LOAD_QUEUE_PTR_WRITE [lsq];113 ack = (not LOAD_QUEUE_USE [lsq][ptr]);114 115 if (ack)116 {117 LOAD_QUEUE_PTR_WRITE [lsq] = (ptr+1)%_param->_size_load_queue[lsq];118 LOAD_QUEUE_USE [lsq][ptr] = true;119 }120 }121 122 log_printf(TRACE,Load_Store_pointer_unit,FUNCTION," * ptr : %d",ptr );123 log_printf(TRACE,Load_Store_pointer_unit,FUNCTION," * ack : %d",ack );124 125 internal_INSERT_LSQ [i] = lsq;126 internal_INSERT_PTR [i] = ptr;127 }128 }129 else130 {131 ack = true;132 133 internal_INSERT_OPERATION_USE [i] = OPERATION_USE_NONE;134 }135 142 136 143 // Write output … … 142 149 for (uint32_t i=0; i<_param->_nb_inst_insert; i++) 143 150 internal_INSERT_ACK [i] = 0; 144 145 151 } 146 152 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/src/Register_translation_unit_Glue.cpp
r132 r138 186 186 // List dependency information 187 187 # endif 188 189 190 191 #endif192 188 } 189 #endif 190 193 191 log_printf(FUNC,Register_translation_unit_Glue,FUNCTION,"End"); 194 192 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Register_translation_unit.cpp
r123 r138 71 71 #endif 72 72 73 #if def SYSTEMC73 #if defined(SYSTEMC) and (defined(STATISTICS) or defined(VHDL_TESTBENCH)) 74 74 if (usage_is_set(_usage,USE_SYSTEMC)) 75 75 { … … 83 83 // List dependency information 84 84 # endif 85 85 } 86 86 #endif 87 }88 87 log_printf(FUNC,Register_translation_unit,FUNCTION,"End"); 89 88 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/src/Rename_unit.cpp
r123 r138 72 72 #endif 73 73 74 #if def SYSTEMC74 #if defined(SYSTEMC) and (defined(STATISTICS) or defined(VHDL_TESTBENCH)) 75 75 if (usage_is_set(_usage,USE_SYSTEMC)) 76 76 { … … 84 84 // List dependency information 85 85 # endif 86 86 } 87 87 #endif 88 }89 88 log_end(Rename_unit,FUNCTION); 90 89 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/Makefile.deps
r88 r138 11 11 12 12 ifndef Behavioural 13 include $(DIR_MORPHEO)/Behavioural/Makefile.deps13 include $(DIR_MORPHEO)/Behavioural/Makefile.deps 14 14 endif 15 15 16 16 #-----[ Directory ]---------------------------------------- 17 17 18 Special_Register_unit_DIR 18 Special_Register_unit_DIR = $(DIR_MORPHEO)/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit 19 19 20 20 #-----[ Library ]------------------------------------------ 21 21 22 22 Special_Register_unit_LIBRARY = -lSpecial_Register_unit \ 23 $(Behavioural_LIBRARY)23 $(Behavioural_LIBRARY) 24 24 25 Special_Register_unit_DIR_LIBRARY 26 $(Behavioural_DIR_LIBRARY)25 Special_Register_unit_DIR_LIBRARY = -L$(Special_Register_unit_DIR)/lib \ 26 $(Behavioural_DIR_LIBRARY) 27 27 28 28 #-----[ Rules ]-------------------------------------------- -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/include/SPR.h
r128 r138 449 449 public : void write (Tspr_t x) 450 450 { 451 // old flag 452 Tspr_t old_ov = ov; 453 Tspr_t old_cy = cy; 454 Tspr_t old_f = f; 455 451 456 cid = x >> 28; 452 457 sumra = x >> 16; … … 466 471 tee = x >> 1; 467 472 sm = x >> 0; 473 474 if ((old_ov != ov) or 475 (old_cy != cy) or 476 (old_f != f)) 477 msgWarning(_("Flag OV, CY and F are renamed. You can't modify this flag with the instruction l.mtspr.\n")); 468 478 }; 469 479 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/include/Parameters.h
r117 r138 53 53 public : uint32_t _size_re_order_buffer ; 54 54 public : uint32_t _nb_re_order_buffer_bank ; 55 public : commit_unit::Tretire_ooo_scheme_t 56 _retire_ooo_scheme ; 55 57 public : Tpriority_t _commit_priority ; 56 58 public : Tload_balancing_t _commit_load_balancing ; … … 66 68 // Reexecute 67 69 public : uint32_t _size_reexecute_queue ; 68 public : Tpriority_t _reexecute_priority ;69 public : Tload_balancing_t _reexecute_load_balancing ;70 70 // Rename_unit 71 71 public : Tpriority_t * _rename_select_priority ;//[nb_rename_unit] … … 150 150 uint32_t size_re_order_buffer , 151 151 uint32_t nb_re_order_buffer_bank , 152 commit_unit::Tretire_ooo_scheme_t 153 retire_ooo_scheme , 152 154 Tpriority_t commit_priority , 153 155 Tload_balancing_t commit_load_balancing , … … 163 165 // Reexecute 164 166 uint32_t size_reexecute_queue , 165 Tpriority_t reexecute_priority ,166 Tload_balancing_t reexecute_load_balancing ,167 167 // Rename_unit 168 168 Tpriority_t * rename_select_priority ,//[nb_rename_unit] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine.cpp
r123 r138 71 71 #endif 72 72 73 #if def SYSTEMC73 #if defined(SYSTEMC) and (defined(STATISTICS) or defined(VHDL_TESTBENCH)) 74 74 if (usage_is_set(_usage,USE_SYSTEMC)) 75 75 { … … 83 83 // List dependency information 84 84 # endif 85 85 } 86 86 #endif 87 }88 87 log_end(OOO_Engine,FUNCTION); 89 88 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/Parameters.cpp
r128 r138 40 40 uint32_t size_re_order_buffer , 41 41 uint32_t nb_re_order_buffer_bank , 42 commit_unit::Tretire_ooo_scheme_t 43 retire_ooo_scheme , 42 44 Tpriority_t commit_priority , 43 45 Tload_balancing_t commit_load_balancing , … … 53 55 // Reexecute 54 56 uint32_t size_reexecute_queue , 55 Tpriority_t reexecute_priority ,56 Tload_balancing_t reexecute_load_balancing ,57 57 // Rename_unit 58 58 Tpriority_t * rename_select_priority ,//[nb_rename_unit] … … 100 100 _size_re_order_buffer = size_re_order_buffer ; 101 101 _nb_re_order_buffer_bank = nb_re_order_buffer_bank ; 102 _retire_ooo_scheme = retire_ooo_scheme ; 102 103 _commit_priority = commit_priority ; 103 104 _commit_load_balancing = commit_load_balancing ; … … 110 111 // _table_issue_type = table_issue_type ; 111 112 _size_reexecute_queue = size_reexecute_queue ; 112 _reexecute_priority = reexecute_priority ;113 _reexecute_load_balancing = reexecute_load_balancing ;114 113 _rename_select_priority = rename_select_priority ; 115 114 _rename_select_load_balancing = rename_select_load_balancing ; … … 256 255 _size_re_order_buffer , 257 256 _nb_re_order_buffer_bank , 257 _retire_ooo_scheme , 258 258 _nb_inst_insert , 259 259 _nb_inst_retire , … … 268 268 size_general_register , 269 269 size_special_register , 270 _ commit_priority,271 _ commit_load_balancing,270 _issue_priority , 271 _issue_load_balancing , 272 272 _nb_rename_unit_select , 273 273 _nb_thread , … … 312 312 _nb_inst_reexecute , 313 313 _nb_execute_loop_select , 314 _ reexecute_priority,315 _ reexecute_load_balancing,314 _commit_priority , 315 _commit_load_balancing , 316 316 size_general_register ,//+_size_rename_id 317 317 size_special_register ,//+_size_rename_id -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/Parameters_print.cpp
r117 r138 65 65 // str+= toString(MSG_INFORMATION)+" * table_issue_type ["+toString(i)+"]["+toString(j)+"] : "+toString<bool >(_table_issue_type [i][j] )+"\n";//[nb_inst_issue][nb_type] 66 66 str+= toString(MSG_INFORMATION)+" * size_reexecute_queue : "+toString<uint32_t >(_size_reexecute_queue )+"\n"; 67 str+= toString(MSG_INFORMATION)+" * reexecute_priority : "+toString<Tpriority_t >(_reexecute_priority )+"\n";68 str+= toString(MSG_INFORMATION)+" * reexecute_load_balancing : "+toString<Tload_balancing_t>(_reexecute_load_balancing )+"\n";69 67 for (uint32_t i=0; i<_nb_rename_unit; ++i) 70 68 str+= toString(MSG_INFORMATION)+" * rename_select_priority ["+toString(i)+"] : "+toString<Tpriority_t >(_rename_select_priority [i])+"\n";//[nb_rename_unit] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/include/Parameters.h
r136 r138 28 28 29 29 namespace core { 30 31 30 32 31 class Parameters : public morpheo::behavioural::Parameters … … 75 74 // Read bloc 76 75 public : uint32_t _nb_read_bloc ;// 76 public : uint32_t * _nb_inst_read ;//[nb_read_bloc] 77 77 public : uint32_t * _size_read_queue ;//[nb_read_bloc] 78 78 public : uint32_t * _size_reservation_station ;//[nb_read_bloc] … … 81 81 // Write bloc 82 82 public : uint32_t _nb_write_bloc ;// 83 public : uint32_t * _nb_inst_write ;//[nb_write_bloc] 83 84 public : uint32_t * _size_write_queue ;//[nb_write_bloc] 84 85 public : uint32_t * _size_execute_queue ;//[nb_write_bloc] … … 91 92 public : uint32_t * _size_load_queue ;//[nb_load_store_unit] 92 93 public : uint32_t * _size_speculative_access_queue ;//[nb_load_store_unit] 94 public : uint32_t * _nb_store_queue_bank ;//[nb_load_store_unit] 95 public : uint32_t * _nb_load_queue_bank ;//[nb_load_store_unit] 93 96 public : uint32_t * _nb_port_check ;//[nb_load_store_unit] 94 97 public : multi_execute_loop::execute_loop::Tspeculative_load_t 95 98 * _speculative_load ;//[nb_load_store_unit] 99 public : Tpredictor_t * _speculative_commit_predictor_scheme ;//[nb_load_store_unit] 100 public : uint32_t ** _lsu_pht_size_counter ;//[nb_load_store_unit][1] 101 public : uint32_t ** _lsu_pht_nb_counter ;//[nb_load_store_unit][1] 96 102 public : uint32_t * _nb_bypass_memory ;//[nb_load_store_unit] 97 103 public : uint32_t * _nb_cache_port ;//[nb_load_store_unit] … … 138 144 public : uint32_t * _nb_rename_unit ;//[nb_ooo_engine] 139 145 public : uint32_t * _nb_inst_issue_queue ;//[nb_ooo_engine] 140 146 //public : uint32_t * _nb_inst_issue_slot ;//[nb_ooo_engine] 141 147 public : uint32_t * _nb_inst_reexecute ;//[nb_ooo_engine] 142 148 public : uint32_t * _nb_inst_commit ;//[nb_ooo_engine] … … 146 152 public : uint32_t * _size_re_order_buffer ;//[nb_ooo_engine] 147 153 public : uint32_t * _nb_re_order_buffer_bank ;//[nb_ooo_engine] 154 public : multi_ooo_engine::ooo_engine::commit_unit::Tretire_ooo_scheme_t 155 * _retire_ooo_scheme ;//[nb_ooo_engine] 148 156 public : Tpriority_t * _commit_priority ;//[nb_ooo_engine] 149 157 public : Tload_balancing_t * _commit_load_balancing ;//[nb_ooo_engine] … … 156 164 public : Tload_balancing_t * _issue_load_balancing ;//[nb_ooo_engine] 157 165 public : uint32_t * _size_reexecute_queue ;//[nb_ooo_engine] 158 public : Tpriority_t * _reexecute_priority ;//[nb_ooo_engine]159 public : Tload_balancing_t * _reexecute_load_balancing ;//[nb_ooo_engine]160 166 161 167 //Execute_loop … … 183 189 public : uint32_t * _link_decod_bloc_with_thread ;//[nb_thread] 184 190 public : uint32_t * _link_rename_bloc_with_front_end ;//[nb_front_end] 185 186 public : bool ** _link_read_bloc_and_load_store_unit ;//[nb_read_bloc][nb_load_store_unit]191 //public : bool *** _table_dispatch ;//[nb_ooo_engine][nb_inst_issue_slot][nb_read_bloc] 192 public : uint32_t * _link_read_bloc_with_load_store_unit ;//[nb_load_store_unit] 187 193 public : bool ** _link_read_bloc_and_functionnal_unit ;//[nb_read_bloc][nb_functionnal_unit] 188 public : bool ** _link_write_bloc_and_load_store_unit ;//[nb_write_bloc][nb_load_store_unit]194 public : uint32_t * _link_write_bloc_with_load_store_unit ;//[nb_load_store_unit] 189 195 public : bool ** _link_write_bloc_and_functionnal_unit ;//[nb_write_bloc][nb_functionnal_unit] 190 196 public : uint32_t * _link_load_store_unit_with_thread ;//[nb_thread] … … 276 282 public : uint32_t * _execute_loop_nb_thread ;//[nb_execute_loop] 277 283 public : uint32_t * _execute_loop_nb_packet ;//[nb_execute_loop] 284 public : uint32_t ** _execute_loop_nb_inst_read ;//[nb_execute_loop][nb_read_unit] 278 285 public : uint32_t ** _execute_loop_size_read_queue ;//[nb_execute_loop][nb_read_unit] 279 286 public : uint32_t ** _execute_loop_size_reservation_station ;//[nb_execute_loop][nb_read_unit] … … 285 292 public : uint32_t ** _execute_loop_size_load_queue ;//[nb_execute_loop][execute_loop_nb_load_store_unit] 286 293 public : uint32_t ** _execute_loop_size_speculative_access_queue ;//[nb_execute_loop][execute_loop_nb_load_store_unit] 294 public : uint32_t ** _execute_loop_nb_store_queue_bank ;//[nb_execute_loop][execute_loop_nb_load_store_unit] 295 public : uint32_t ** _execute_loop_nb_load_queue_bank ;//[nb_execute_loop][execute_loop_nb_load_store_unit] 287 296 public : uint32_t ** _execute_loop_nb_port_check ;//[nb_execute_loop][execute_loop_nb_load_store_unit] 288 297 public : multi_execute_loop::execute_loop::Tspeculative_load_t 289 298 ** _execute_loop_speculative_load ;//[nb_execute_loop][execute_loop_nb_load_store_unit] 299 public : Tpredictor_t ** _execute_loop_speculative_commit_predictor_scheme ;//[nb_execute_loop][execute_loop_nb_load_store_unit] 300 public : uint32_t *** _execute_loop_lsu_pht_size_counter ;//[nb_execute_loop][execute_loop_nb_load_store_unit][1] 301 public : uint32_t *** _execute_loop_lsu_pht_nb_counter ;//[nb_execute_loop][execute_loop_nb_load_store_unit][1] 290 302 public : uint32_t ** _execute_loop_nb_bypass_memory ;//[nb_execute_loop][execute_loop_nb_load_store_unit] 291 303 public : uint32_t ** _execute_loop_nb_cache_port ;//[nb_execute_loop][execute_loop_nb_load_store_unit] 292 304 public : uint32_t ** _execute_loop_nb_inst_memory ;//[nb_execute_loop][execute_loop_nb_load_store_unit] 305 public : uint32_t ** _execute_loop_nb_inst_write ;//[nb_execute_loop][nb_write_unit] 293 306 public : uint32_t ** _execute_loop_size_write_queue ;//[nb_execute_loop][nb_write_unit] 294 307 public : uint32_t ** _execute_loop_size_execute_queue ;//[nb_execute_loop][nb_write_unit] … … 325 338 public : uint32_t ** _dcache_access_size_packet_id ;//[nb_execute_loop][execute_loop_nb_load_store_unit] 326 339 public : uint32_t *** _dcache_access_table_routing ;//[nb_execute_loop][execute_loop_nb_load_store_unit][execute_loop_nb_cache_port] 327 public : uint32_t * _dcache_access_nb_context 340 public : uint32_t * _dcache_access_nb_context ;//[nb_execute_loop] 328 341 public : uint32_t *** _dcache_access_translate_load_store_unit_to_thread;//[nb_execute_loop][execute_loop_nb_load_store_unit][dcache_access_nb_context] 329 342 … … 338 351 339 352 340 353 //public : bool **** _network_table_dispatch ;//[nb_ooo_engine][nb_inst_issue_slot][nb_execute_loop][nb_read_unit] 341 354 public : bool *** _network_table_issue_type ;// [nb_execute_loop][nb_read_unit][nb_type] 342 355 public : bool *** _network_table_issue_thread ;// [nb_execute_loop][nb_read_unit][nb_thread] 343 356 344 357 // Translate … … 398 411 // Read bloc 399 412 uint32_t nb_read_bloc ,// 413 uint32_t * nb_inst_read ,//[nb_read_bloc] 400 414 uint32_t * size_read_queue ,//[nb_read_bloc] 401 415 uint32_t * size_reservation_station ,//[nb_read_bloc] … … 404 418 // Write bloc 405 419 uint32_t nb_write_bloc ,// 420 uint32_t * nb_inst_write ,//[nb_write_bloc] 406 421 uint32_t * size_write_queue ,//[nb_write_bloc] 407 422 uint32_t * size_execute_queue ,//[nb_write_bloc] … … 414 429 uint32_t * size_load_queue ,//[nb_load_store_unit] 415 430 uint32_t * size_speculative_access_queue ,//[nb_load_store_unit] 431 uint32_t * nb_store_queue_bank ,//[nb_load_store_unit] 432 uint32_t * nb_load_queue_bank ,//[nb_load_store_unit] 416 433 uint32_t * nb_port_check ,//[nb_load_store_unit] 417 434 multi_execute_loop::execute_loop::Tspeculative_load_t 418 435 * speculative_load ,//[nb_load_store_unit] 436 Tpredictor_t * speculative_commit_predictor_scheme ,//[nb_load_store_unit] 437 uint32_t ** lsu_pht_size_counter ,//[nb_load_store_unit][1] 438 uint32_t ** lsu_pht_nb_counter ,//[nb_load_store_unit][1] 419 439 uint32_t * nb_bypass_memory ,//[nb_load_store_unit] 420 440 uint32_t * nb_cache_port ,//[nb_load_store_unit] … … 460 480 uint32_t nb_ooo_engine , 461 481 uint32_t * nb_rename_unit ,//[nb_ooo_engine] 462 482 //uint32_t * nb_inst_issue_slot ,//[nb_ooo_engine] 463 483 uint32_t * nb_inst_reexecute ,//[nb_ooo_engine] 464 484 uint32_t * nb_inst_commit ,//[nb_ooo_engine] … … 468 488 uint32_t * size_re_order_buffer ,//[nb_ooo_engine] 469 489 uint32_t * nb_re_order_buffer_bank ,//[nb_ooo_engine] 490 multi_ooo_engine::ooo_engine::commit_unit::Tretire_ooo_scheme_t 491 * retire_ooo_scheme ,//[nb_ooo_engine] 470 492 Tpriority_t * commit_priority ,//[nb_ooo_engine] 471 493 Tload_balancing_t * commit_load_balancing ,//[nb_ooo_engine] … … 477 499 Tload_balancing_t * issue_load_balancing ,//[nb_ooo_engine] 478 500 uint32_t * size_reexecute_queue ,//[nb_ooo_engine] 479 Tpriority_t * reexecute_priority ,//[nb_ooo_engine]480 Tload_balancing_t * reexecute_load_balancing ,//[nb_ooo_engine]481 501 482 502 //Execute_loop … … 504 524 uint32_t * link_decod_bloc_with_thread ,//[nb_thread] 505 525 uint32_t * link_rename_bloc_with_front_end ,//[nb_front_end] 506 507 bool ** link_read_bloc_and_load_store_unit ,//[nb_read_bloc][nb_load_store_unit]526 //bool *** table_dispatch ,//[nb_ooo_engine][nb_inst_issue_slot][nb_read_bloc] 527 uint32_t * link_read_bloc_with_load_store_unit ,//[nb_load_store_unit] 508 528 bool ** link_read_bloc_and_functionnal_unit ,//[nb_read_bloc][nb_functionnal_unit] 509 bool ** link_write_bloc_and_load_store_unit ,//[nb_write_bloc][nb_load_store_unit]529 uint32_t * link_write_bloc_with_load_store_unit ,//[nb_load_store_unit] 510 530 bool ** link_write_bloc_and_functionnal_unit ,//[nb_write_bloc][nb_functionnal_unit] 511 531 uint32_t * link_load_store_unit_with_thread ,//[nb_thread] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Parameters.cpp
r136 r138 67 67 } 68 68 69 #undef FUNCTION 70 #define FUNCTION "Core::sort_and_unique" 71 //template <typename T> 72 std::vector<uint32_t> sort_and_unique (std::vector<uint32_t> v) 73 { 74 sort (v.begin(), v.end()); 75 std::vector<uint32_t>::iterator it=std::unique(v.begin(), v.end()); 76 v.erase(it,v.end()); 77 78 return v; 79 } 69 80 70 81 #undef FUNCTION … … 112 123 // Read bloc 113 124 uint32_t nb_read_bloc ,// 125 uint32_t * nb_inst_read ,//[nb_read_bloc] 114 126 uint32_t * size_read_queue ,//[nb_read_bloc] 115 127 uint32_t * size_reservation_station ,//[nb_read_bloc] … … 118 130 // Write bloc 119 131 uint32_t nb_write_bloc ,// 132 uint32_t * nb_inst_write ,//[nb_write_bloc] 120 133 uint32_t * size_write_queue ,//[nb_write_bloc] 121 134 uint32_t * size_execute_queue ,//[nb_write_bloc] … … 128 141 uint32_t * size_load_queue ,//[nb_load_store_unit] 129 142 uint32_t * size_speculative_access_queue ,//[nb_load_store_unit] 143 uint32_t * nb_store_queue_bank ,//[nb_load_store_unit] 144 uint32_t * nb_load_queue_bank ,//[nb_load_store_unit] 130 145 uint32_t * nb_port_check ,//[nb_load_store_unit] 131 146 multi_execute_loop::execute_loop::Tspeculative_load_t 132 147 * speculative_load ,//[nb_load_store_unit] 148 Tpredictor_t * speculative_commit_predictor_scheme ,//[nb_load_store_unit] 149 uint32_t ** lsu_pht_size_counter ,//[nb_load_store_unit][1] 150 uint32_t ** lsu_pht_nb_counter ,//[nb_load_store_unit][1] 133 151 uint32_t * nb_bypass_memory ,//[nb_load_store_unit] 134 152 uint32_t * nb_cache_port ,//[nb_load_store_unit] … … 174 192 uint32_t nb_ooo_engine , 175 193 uint32_t * nb_rename_unit ,//[nb_ooo_engine] 176 194 //uint32_t * nb_inst_issue_slot ,//[nb_ooo_engine] 177 195 uint32_t * nb_inst_reexecute ,//[nb_ooo_engine] 178 196 uint32_t * nb_inst_commit ,//[nb_ooo_engine] … … 182 200 uint32_t * size_re_order_buffer ,//[nb_ooo_engine] 183 201 uint32_t * nb_re_order_buffer_bank ,//[nb_ooo_engine] 202 multi_ooo_engine::ooo_engine::commit_unit::Tretire_ooo_scheme_t 203 * retire_ooo_scheme ,//[nb_ooo_engine] 184 204 Tpriority_t * commit_priority ,//[nb_ooo_engine] 185 205 Tload_balancing_t * commit_load_balancing ,//[nb_ooo_engine] … … 191 211 Tload_balancing_t * issue_load_balancing ,//[nb_ooo_engine] 192 212 uint32_t * size_reexecute_queue ,//[nb_ooo_engine] 193 Tpriority_t * reexecute_priority ,//[nb_ooo_engine]194 Tload_balancing_t * reexecute_load_balancing ,//[nb_ooo_engine]195 213 196 214 //Execute_loop … … 218 236 uint32_t * link_decod_bloc_with_thread ,//[nb_thread] 219 237 uint32_t * link_rename_bloc_with_front_end ,//[nb_front_end] 220 221 bool ** link_read_bloc_and_load_store_unit ,//[nb_read_bloc][nb_load_store_unit]238 //bool *** table_dispatch ,//[nb_ooo_engine][nb_inst_issue_slot][nb_read_bloc] 239 uint32_t * link_read_bloc_with_load_store_unit ,//[nb_load_store_unit] 222 240 bool ** link_read_bloc_and_functionnal_unit ,//[nb_read_bloc][nb_functionnal_unit] 223 bool ** link_write_bloc_and_load_store_unit ,//[nb_write_bloc][nb_load_store_unit]241 uint32_t * link_write_bloc_with_load_store_unit ,//[nb_load_store_unit] 224 242 bool ** link_write_bloc_and_functionnal_unit ,//[nb_write_bloc][nb_functionnal_unit] 225 243 uint32_t * link_load_store_unit_with_thread ,//[nb_thread] … … 268 286 269 287 _nb_read_bloc = nb_read_bloc ; 288 _nb_inst_read = nb_inst_read ; 270 289 _size_read_queue = size_read_queue ; 271 290 _size_reservation_station = size_reservation_station ; … … 273 292 274 293 _nb_write_bloc = nb_write_bloc ; 294 _nb_inst_write = nb_inst_write ; 275 295 _size_write_queue = size_write_queue ; 276 296 _size_execute_queue = size_execute_queue ; … … 282 302 _size_load_queue = size_load_queue ; 283 303 _size_speculative_access_queue = size_speculative_access_queue ; 304 _nb_store_queue_bank = nb_store_queue_bank ; 305 _nb_load_queue_bank = nb_load_queue_bank ; 284 306 _nb_port_check = nb_port_check ; 285 307 _speculative_load = speculative_load ; 308 _speculative_commit_predictor_scheme = speculative_commit_predictor_scheme ; 309 _lsu_pht_size_counter = lsu_pht_size_counter ; 310 _lsu_pht_nb_counter = lsu_pht_nb_counter ; 286 311 _nb_bypass_memory = nb_bypass_memory ; 287 312 _nb_cache_port = nb_cache_port ; … … 321 346 _nb_ooo_engine = nb_ooo_engine ; 322 347 _nb_rename_unit = nb_rename_unit ; 323 348 // _nb_inst_issue_slot = nb_inst_issue_slot ; 324 349 _nb_inst_reexecute = nb_inst_reexecute ; 325 350 _nb_inst_commit = nb_inst_commit ; … … 329 354 _size_re_order_buffer = size_re_order_buffer ; 330 355 _nb_re_order_buffer_bank = nb_re_order_buffer_bank ; 356 _retire_ooo_scheme = retire_ooo_scheme ; 331 357 _commit_priority = commit_priority ; 332 358 _commit_load_balancing = commit_load_balancing ; … … 337 363 _issue_load_balancing = issue_load_balancing ; 338 364 _size_reexecute_queue = size_reexecute_queue ; 339 _reexecute_priority = reexecute_priority ;340 _reexecute_load_balancing = reexecute_load_balancing ;341 365 342 366 _nb_execute_loop = nb_execute_loop ; … … 362 386 _link_decod_bloc_with_thread = link_decod_bloc_with_thread ; 363 387 _link_rename_bloc_with_front_end = link_rename_bloc_with_front_end ; 364 365 _link_read_bloc_ and_load_store_unit = link_read_bloc_and_load_store_unit;388 // _table_dispatch = table_dispatch ; 389 _link_read_bloc_with_load_store_unit = link_read_bloc_with_load_store_unit ; 366 390 _link_read_bloc_and_functionnal_unit = link_read_bloc_and_functionnal_unit ; 367 _link_write_bloc_ and_load_store_unit = link_write_bloc_and_load_store_unit;391 _link_write_bloc_with_load_store_unit = link_write_bloc_with_load_store_unit ; 368 392 _link_write_bloc_and_functionnal_unit = link_write_bloc_and_functionnal_unit ; 369 393 _link_load_store_unit_with_thread = link_load_store_unit_with_thread ; … … 885 909 886 910 { 887 std::vector<uint32_t> list_execute_loop [_nb_ooo_engine];888 889 911 // initialization counter 890 912 for (uint32_t i=0; i<_nb_ooo_engine; ++i) 891 913 _ooo_engine_nb_execute_loop [i] = 0; 892 893 // scan the dispatch table 914 915 std::vector<uint32_t> list_execute_loop [_nb_ooo_engine]; 916 917 for (uint32_t i=0; i<_nb_thread; ++i) 918 { 919 uint32_t num_front_end = _link_context_with_thread [i].first; 920 uint32_t num_rename_bloc = _link_rename_bloc_with_front_end [num_front_end]; 921 uint32_t num_ooo_engine = _link_rename_unit_with_rename_bloc [num_rename_bloc].first; 922 uint32_t num_execute_loop = _link_execute_unit_with_load_store_unit [i].first; 923 list_execute_loop[num_ooo_engine].push_back(num_execute_loop); 924 925 // One execute per ooo_engine 926 // for (uint32_t j=0; j<_nb_functionnal_unit; ++j) 927 // if (_link_thread_and_functionnal_unit [i][j]) 928 // { 929 // uint32_t num_execute_loop = _link_execute_unit_with_functionnal_unit [i].first; 930 // list_execute_loop[num_ooo_engine].push_back(num_execute_loop); 931 // } 932 } 933 934 // Sort and erase duplicate value 894 935 for (uint32_t i=0; i<_nb_ooo_engine; ++i) 895 936 { 896 for (uint32_t j=0; j<_nb_inst_issue_slot[i]; ++j) 897 for (uint32_t k=0; k<_nb_read_bloc; ++k) 898 { 899 // have route between this slot's ooo_engine and an read_bloc 900 if (_table_dispatch [i][j][k]) 901 { 902 uint32_t num_execute_loop = _link_read_unit_with_read_bloc [k].first; 903 904 list_execute_loop[i].push_back(num_execute_loop); 905 } 906 } 907 908 { 909 sort (list_execute_loop[i].begin(), 910 list_execute_loop[i].end()); 911 std::vector<uint32_t>::iterator it=std::unique(list_execute_loop[i].begin(), 912 list_execute_loop[i].end()); 913 list_execute_loop[i].erase(it,list_execute_loop[i].end()); 914 } 915 937 list_execute_loop[i] = sort_and_unique (list_execute_loop[i]); 938 939 // { 940 // sort (list_execute_loop[i].begin(), 941 // list_execute_loop[i].end()); 942 // std::vector<uint32_t>::iterator it=std::unique(list_execute_loop[i].begin(), 943 // list_execute_loop[i].end()); 944 // list_execute_loop[i].erase(it,list_execute_loop[i].end()); 945 // } 946 916 947 _ooo_engine_nb_execute_loop [i] = list_execute_loop[i].size(); 917 948 } 949 950 #if 0 951 // // scan the dispatch table 952 // for (uint32_t i=0; i<_nb_ooo_engine; ++i) 953 // { 954 // for (uint32_t j=0; j<_nb_inst_issue_slot[i]; ++j) 955 // for (uint32_t k=0; k<_nb_read_bloc; ++k) 956 // { 957 // // have route between this slot's ooo_engine and an read_bloc 958 // if (_table_dispatch [i][j][k]) 959 // { 960 // uint32_t num_execute_loop = _link_read_unit_with_read_bloc [k].first; 961 962 // list_execute_loop[i].push_back(num_execute_loop); 963 // } 964 // } 965 966 // { 967 // sort (list_execute_loop[i].begin(), 968 // list_execute_loop[i].end()); 969 // std::vector<uint32_t>::iterator it=std::unique(list_execute_loop[i].begin(), 970 // list_execute_loop[i].end()); 971 // list_execute_loop[i].erase(it,list_execute_loop[i].end()); 972 // } 973 974 // _ooo_engine_nb_execute_loop [i] = list_execute_loop[i].size(); 975 // } 976 #endif 918 977 919 978 log_printf(TRACE,Core,FUNCTION,_(" * translate_ooo_engine_num_execute_loop")); … … 1029 1088 } 1030 1089 1031 1090 // ALLOC4(_network_table_dispatch ,bool ,_nb_ooo_engine,_nb_inst_issue_slot[it1],_nb_execute_loop,_nb_read_unit[it3]); 1032 1091 // ALLOC3(_ooo_engine_table_routing ,bool ,_nb_ooo_engine,_nb_rename_unit[it1],_nb_inst_issue_slot[it1]); 1033 1092 // ALLOC3(_ooo_engine_table_issue_type ,bool ,_nb_ooo_engine,_nb_inst_issue_slot[it1],_nb_type); … … 1035 1094 ALLOC2(_list_load_store_unit_with_rename_unit ,std::vector<uint32_t>,_nb_ooo_engine,_nb_rename_unit[it1]); 1036 1095 1096 for (uint32_t num_thread=0; num_thread<_nb_thread; ++num_thread) 1097 { 1098 uint32_t num_front_end = _link_context_with_thread [num_thread].first; 1099 uint32_t num_rename_bloc = _link_rename_bloc_with_front_end [num_front_end]; 1100 uint32_t num_ooo_engine = _link_rename_unit_with_rename_bloc [num_rename_bloc].first; 1101 uint32_t num_rename_unit = _link_rename_unit_with_rename_bloc [num_rename_bloc].second; 1102 1103 { 1104 uint32_t num_load_store_unit = _link_load_store_unit_with_thread [num_thread]; 1105 1106 log_printf(TRACE,Core,FUNCTION,_(" * list_load_store_unit_with_rename_unit [%d][%d] = %d"), 1107 num_ooo_engine, 1108 num_rename_unit, 1109 num_load_store_unit); 1110 1111 _list_load_store_unit_with_rename_unit [num_ooo_engine][num_rename_unit].push_back(num_load_store_unit); 1112 } 1113 1114 for (uint32_t num_functionnal_unit=0; 1115 num_functionnal_unit<_nb_functionnal_unit; 1116 ++num_functionnal_unit) 1117 if (_link_thread_and_functionnal_unit[num_thread][num_functionnal_unit]) 1118 { 1119 log_printf(TRACE,Core,FUNCTION,_(" * list_functionnal_unit_with_rename_unit [%d][%d] = %d"), 1120 num_ooo_engine, 1121 num_rename_unit, 1122 num_functionnal_unit); 1123 1124 _list_functionnal_unit_with_rename_unit [num_ooo_engine][num_rename_unit].push_back(num_functionnal_unit); 1125 } 1126 } 1127 1037 1128 for (uint32_t i=0; i<_nb_ooo_engine; ++i) 1038 1129 { 1039 // log_printf(TRACE,Core,FUNCTION,_(" * ooo_engine_table_issue_type [%d]"),i); 1040 1041 // Init 1042 for (uint32_t j=0; j<_nb_inst_issue_slot[i]; ++j) 1043 { 1044 for (uint32_t k=0; k<_nb_execute_loop; ++k) 1045 for (uint32_t l=0; l<_nb_read_unit[k]; ++l) 1046 _network_table_dispatch [i][j][k][l] = false; 1047 // for (uint32_t k=0; k<_nb_rename_unit[i]; ++k) 1048 // _ooo_engine_table_routing [i][k][j] = false; 1049 // for (uint32_t k=0; k<_nb_type; ++k) 1050 // _ooo_engine_table_issue_type [i][j][k] = false; 1051 } 1052 1053 std::vector<uint32_t> list_thread_with_inst_issue [_nb_inst_issue_slot[i]]; 1130 #if 0 1131 // // log_printf(TRACE,Core,FUNCTION,_(" * ooo_engine_table_issue_type [%d]"),i); 1132 1133 // // Init 1134 // for (uint32_t j=0; j<_nb_inst_issue_slot[i]; ++j) 1135 // { 1136 // for (uint32_t k=0; k<_nb_execute_loop; ++k) 1137 // for (uint32_t l=0; l<_nb_read_unit[k]; ++l) 1138 // _network_table_dispatch [i][j][k][l] = false; 1139 // // for (uint32_t k=0; k<_nb_rename_unit[i]; ++k) 1140 // // _ooo_engine_table_routing [i][k][j] = false; 1141 // // for (uint32_t k=0; k<_nb_type; ++k) 1142 // // _ooo_engine_table_issue_type [i][j][k] = false; 1143 // } 1144 1145 // std::vector<uint32_t> list_thread_with_inst_issue [_nb_inst_issue_slot[i]]; 1054 1146 1055 for (uint32_t j=0; j<_nb_inst_issue_slot[i]; ++j)1056 {1057 for (uint32_t k=0; k<_nb_read_bloc; ++k)1058 // Test if the issue slot is linked with the read_bloc1059 if (_table_dispatch[i][j][k])1060 {1061 pair_dual x = _link_read_unit_with_read_bloc[k];1062 _network_table_dispatch [i][j][x.first][x.second] = true;1063 1064 // Test functional unit connected with this read bloc1065 for (uint32_t l=0; l<_nb_functionnal_unit; ++l)1066 {1067 // the issue slot [j] is connected with the read bloc [k] and it's connected with the functionnal_unit [l]1068 if (_link_read_bloc_and_functionnal_unit [k][l])1069 {1070 // Scan timing table, test if have an instruction1071 // for (uint32_t m=0; m<_nb_type; ++m)1072 // for (uint32_t n=0; n<_nb_operation; ++n)1073 // if (_timing[l][m][n]._latence > 0)1074 // {1075 // log_printf(TRACE,Core,FUNCTION,_(" [%d][%d] -> true"),j,m);1147 // for (uint32_t j=0; j<_nb_inst_issue_slot[i]; ++j) 1148 // { 1149 // for (uint32_t k=0; k<_nb_read_bloc; ++k) 1150 // // Test if the issue slot is linked with the read_bloc 1151 // if (_table_dispatch[i][j][k]) 1152 // { 1153 // pair_dual x = _link_read_unit_with_read_bloc[k]; 1154 // _network_table_dispatch [i][j][x.first][x.second] = true; 1155 1156 // // Test functional unit connected with this read bloc 1157 // for (uint32_t l=0; l<_nb_functionnal_unit; ++l) 1158 // { 1159 // // the issue slot [j] is connected with the read bloc [k] and it's connected with the functionnal_unit [l] 1160 // if (_link_read_bloc_and_functionnal_unit [k][l]) 1161 // { 1162 // // Scan timing table, test if have an instruction 1163 // // for (uint32_t m=0; m<_nb_type; ++m) 1164 // // for (uint32_t n=0; n<_nb_operation; ++n) 1165 // // if (_timing[l][m][n]._latence > 0) 1166 // // { 1167 // // log_printf(TRACE,Core,FUNCTION,_(" [%d][%d] -> true"),j,m); 1076 1168 1077 // _ooo_engine_table_issue_type [i][j][m] = true;1078 // break;1079 // }1169 // // _ooo_engine_table_issue_type [i][j][m] = true; 1170 // // break; 1171 // // } 1080 1172 1081 for (uint32_t m=0; m<_nb_thread; ++m)1082 {1083 list_thread_with_inst_issue [j].push_back(m);1173 // for (uint32_t m=0; m<_nb_thread; ++m) 1174 // { 1175 // list_thread_with_inst_issue [j].push_back(m); 1084 1176 1085 uint32_t num_front_end = _link_context_with_thread [m].first;1086 uint32_t num_rename_bloc = _link_rename_bloc_with_front_end[num_front_end];1087 uint32_t num_rename_unit = _link_rename_unit_with_rename_bloc [num_rename_bloc].second;1177 // uint32_t num_front_end = _link_context_with_thread [m].first; 1178 // uint32_t num_rename_bloc = _link_rename_bloc_with_front_end[num_front_end]; 1179 // uint32_t num_rename_unit = _link_rename_unit_with_rename_bloc [num_rename_bloc].second; 1088 1180 1089 _list_functionnal_unit_with_rename_unit [i][num_rename_unit].push_back(l);1090 }1091 }1092 }1093 1094 // Test load store unit connected with this read bloc1095 for (uint32_t l=0; l<_nb_load_store_unit; ++l)1096 {1097 // Test load store unit connected with this read bloc1098 if (_link_read_bloc_and_load_store_unit [k][l])1099 {1100 // _ooo_engine_table_issue_type [i][j][TYPE_MEMORY] = true;1101 // _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_LBS)._type] |= (_timing[l][instruction_information(INSTRUCTION_L_LBS)._type][instruction_information(INSTRUCTION_L_LBS)._operation]._latence > 0);1102 // _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_LBZ)._type] |= (_timing[l][instruction_information(INSTRUCTION_L_LBZ)._type][instruction_information(INSTRUCTION_L_LBZ)._operation]._latence > 0);1103 // _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_LD )._type] |= (_timing[l][instruction_information(INSTRUCTION_L_LD )._type][instruction_information(INSTRUCTION_L_LD )._operation]._latence > 0);1104 // _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_LHS)._type] |= (_timing[l][instruction_information(INSTRUCTION_L_LHS)._type][instruction_information(INSTRUCTION_L_LHS)._operation]._latence > 0);1105 // _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_LHZ)._type] |= (_timing[l][instruction_information(INSTRUCTION_L_LHZ)._type][instruction_information(INSTRUCTION_L_LHZ)._operation]._latence > 0);1106 // _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_LWS)._type] |= (_timing[l][instruction_information(INSTRUCTION_L_LWS)._type][instruction_information(INSTRUCTION_L_LWS)._operation]._latence > 0);1107 // _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_LWZ)._type] |= (_timing[l][instruction_information(INSTRUCTION_L_LWZ)._type][instruction_information(INSTRUCTION_L_LWZ)._operation]._latence > 0);1108 // _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_SB )._type] |= (_timing[l][instruction_information(INSTRUCTION_L_SB )._type][instruction_information(INSTRUCTION_L_SB )._operation]._latence > 0);1109 // _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_SD )._type] |= (_timing[l][instruction_information(INSTRUCTION_L_SD )._type][instruction_information(INSTRUCTION_L_SD )._operation]._latence > 0);1110 // _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_SH )._type] |= (_timing[l][instruction_information(INSTRUCTION_L_SH )._type][instruction_information(INSTRUCTION_L_SH )._operation]._latence > 0);1111 // _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_SW )._type] |= (_timing[l][instruction_information(INSTRUCTION_L_SW )._type][instruction_information(INSTRUCTION_L_SW )._operation]._latence > 0);1112 1113 // the issue slot [j] is connected with the read bloc [k] and it's connected with the load_store_unit [l]1114 for (uint32_t m=0; m<_nb_thread; ++m)1115 {1116 list_thread_with_inst_issue [j].push_back(m);1181 // _list_functionnal_unit_with_rename_unit [i][num_rename_unit].push_back(l); 1182 // } 1183 // } 1184 // } 1185 1186 // // Test load store unit connected with this read bloc 1187 // for (uint32_t l=0; l<_nb_load_store_unit; ++l) 1188 // { 1189 // // Test load store unit connected with this read bloc 1190 // if (_link_read_bloc_and_load_store_unit [k][l]) 1191 // { 1192 // // _ooo_engine_table_issue_type [i][j][TYPE_MEMORY] = true; 1193 // // _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_LBS)._type] |= (_timing[l][instruction_information(INSTRUCTION_L_LBS)._type][instruction_information(INSTRUCTION_L_LBS)._operation]._latence > 0); 1194 // // _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_LBZ)._type] |= (_timing[l][instruction_information(INSTRUCTION_L_LBZ)._type][instruction_information(INSTRUCTION_L_LBZ)._operation]._latence > 0); 1195 // // _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_LD )._type] |= (_timing[l][instruction_information(INSTRUCTION_L_LD )._type][instruction_information(INSTRUCTION_L_LD )._operation]._latence > 0); 1196 // // _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_LHS)._type] |= (_timing[l][instruction_information(INSTRUCTION_L_LHS)._type][instruction_information(INSTRUCTION_L_LHS)._operation]._latence > 0); 1197 // // _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_LHZ)._type] |= (_timing[l][instruction_information(INSTRUCTION_L_LHZ)._type][instruction_information(INSTRUCTION_L_LHZ)._operation]._latence > 0); 1198 // // _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_LWS)._type] |= (_timing[l][instruction_information(INSTRUCTION_L_LWS)._type][instruction_information(INSTRUCTION_L_LWS)._operation]._latence > 0); 1199 // // _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_LWZ)._type] |= (_timing[l][instruction_information(INSTRUCTION_L_LWZ)._type][instruction_information(INSTRUCTION_L_LWZ)._operation]._latence > 0); 1200 // // _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_SB )._type] |= (_timing[l][instruction_information(INSTRUCTION_L_SB )._type][instruction_information(INSTRUCTION_L_SB )._operation]._latence > 0); 1201 // // _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_SD )._type] |= (_timing[l][instruction_information(INSTRUCTION_L_SD )._type][instruction_information(INSTRUCTION_L_SD )._operation]._latence > 0); 1202 // // _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_SH )._type] |= (_timing[l][instruction_information(INSTRUCTION_L_SH )._type][instruction_information(INSTRUCTION_L_SH )._operation]._latence > 0); 1203 // // _ooo_engine_table_issue_type [i][j][instruction_information(INSTRUCTION_L_SW )._type] |= (_timing[l][instruction_information(INSTRUCTION_L_SW )._type][instruction_information(INSTRUCTION_L_SW )._operation]._latence > 0); 1204 1205 // // the issue slot [j] is connected with the read bloc [k] and it's connected with the load_store_unit [l] 1206 // for (uint32_t m=0; m<_nb_thread; ++m) 1207 // { 1208 // list_thread_with_inst_issue [j].push_back(m); 1117 1209 1118 uint32_t num_front_end = _link_context_with_thread [m].first;1119 uint32_t num_rename_bloc = _link_rename_bloc_with_front_end[num_front_end];1120 uint32_t num_rename_unit = _link_rename_unit_with_rename_bloc [num_rename_bloc].second;1210 // uint32_t num_front_end = _link_context_with_thread [m].first; 1211 // uint32_t num_rename_bloc = _link_rename_bloc_with_front_end[num_front_end]; 1212 // uint32_t num_rename_unit = _link_rename_unit_with_rename_bloc [num_rename_bloc].second; 1121 1213 1122 log_printf(TRACE,Core,FUNCTION,_(" * list_load_store_unit_with_rename_unit [%d][%d][%d] = %d"),i,num_rename_unit,_list_load_store_unit_with_rename_unit [i][num_rename_unit].size(),l); 1123 1124 _list_load_store_unit_with_rename_unit [i][num_rename_unit].push_back(l); 1125 } 1126 } 1127 } 1128 } 1129 // sort and erase duplicate value 1130 { 1131 sort (list_thread_with_inst_issue [j].begin(), 1132 list_thread_with_inst_issue [j].end()); 1133 std::vector<uint32_t>::iterator it=unique(list_thread_with_inst_issue [j].begin(), 1134 list_thread_with_inst_issue [j].end()); 1135 list_thread_with_inst_issue [j].erase(it,list_thread_with_inst_issue [j].end()); 1136 } 1137 } 1214 // log_printf(TRACE,Core,FUNCTION,_(" * list_load_store_unit_with_rename_unit [%d][%d][%d] = %d"),i,num_rename_unit,_list_load_store_unit_with_rename_unit [i][num_rename_unit].size(),l); 1215 1216 // _list_load_store_unit_with_rename_unit [i][num_rename_unit].push_back(l); 1217 // } 1218 // } 1219 // } 1220 // } 1221 // // sort and erase duplicate value 1222 // list_thread_with_inst_issue [j] = sort_and_unique (list_thread_with_inst_issue [j]); 1223 1224 // // { 1225 // // sort (list_thread_with_inst_issue [j].begin(), 1226 // // list_thread_with_inst_issue [j].end()); 1227 // // std::vector<uint32_t>::iterator it=unique(list_thread_with_inst_issue [j].begin(), 1228 // // list_thread_with_inst_issue [j].end()); 1229 // // list_thread_with_inst_issue [j].erase(it,list_thread_with_inst_issue [j].end()); 1230 // // } 1231 // } 1232 #endif 1138 1233 1139 1234 log_printf(TRACE,Core,FUNCTION,_(" * ooo_engine_table_routing [%d]"),i); … … 1141 1236 { 1142 1237 // sort and erase duplicate value 1143 { 1144 sort (_list_load_store_unit_with_rename_unit [i][j].begin(), 1145 _list_load_store_unit_with_rename_unit [i][j].end()); 1146 std::vector<uint32_t>::iterator it=unique(_list_load_store_unit_with_rename_unit [i][j].begin(), 1147 _list_load_store_unit_with_rename_unit [i][j].end()); 1148 _list_load_store_unit_with_rename_unit [i][j].erase(it,_list_load_store_unit_with_rename_unit [i][j].end()); 1149 } 1150 { 1151 sort (_list_functionnal_unit_with_rename_unit [i][j].begin(), 1152 _list_functionnal_unit_with_rename_unit [i][j].end()); 1153 std::vector<uint32_t>::iterator it=unique(_list_functionnal_unit_with_rename_unit [i][j].begin(), 1154 _list_functionnal_unit_with_rename_unit [i][j].end()); 1155 _list_functionnal_unit_with_rename_unit [i][j].erase(it,_list_functionnal_unit_with_rename_unit [i][j].end()); 1156 } 1238 _list_load_store_unit_with_rename_unit [i][j] = sort_and_unique (_list_load_store_unit_with_rename_unit [i][j]); 1239 1240 // { 1241 // sort (_list_load_store_unit_with_rename_unit [i][j].begin(), 1242 // _list_load_store_unit_with_rename_unit [i][j].end()); 1243 // std::vector<uint32_t>::iterator it=unique(_list_load_store_unit_with_rename_unit [i][j].begin(), 1244 // _list_load_store_unit_with_rename_unit [i][j].end()); 1245 // _list_load_store_unit_with_rename_unit [i][j].erase(it,_list_load_store_unit_with_rename_unit [i][j].end()); 1246 // } 1247 1248 _list_functionnal_unit_with_rename_unit [i][j] = sort_and_unique (_list_functionnal_unit_with_rename_unit [i][j]); 1249 1250 // { 1251 // sort (_list_functionnal_unit_with_rename_unit [i][j].begin(), 1252 // _list_functionnal_unit_with_rename_unit [i][j].end()); 1253 // std::vector<uint32_t>::iterator it=unique(_list_functionnal_unit_with_rename_unit [i][j].begin(), 1254 // _list_functionnal_unit_with_rename_unit [i][j].end()); 1255 // _list_functionnal_unit_with_rename_unit [i][j].erase(it,_list_functionnal_unit_with_rename_unit [i][j].end()); 1256 // } 1157 1257 1158 1258 // uint32_t num_rename_bloc = _link_rename_bloc_with_rename_unit[i][j]; … … 1175 1275 } 1176 1276 1177 log_printf(TRACE,Core,FUNCTION,_(" * network_table_dispatch [nb_ooo_engine][nb_inst_issue_slot][nb_execute_loop][nb_read_unit]")); 1178 for (uint32_t i=0; i<_nb_ooo_engine; ++i) 1179 for (uint32_t j=0; j<_nb_inst_issue_slot[i]; ++j) 1180 for (uint32_t k=0; k<_nb_execute_loop; ++k) 1181 for (uint32_t l=0; l<_nb_read_unit[k]; ++l) 1182 if (_network_table_dispatch [i][j][k][l] == true) 1183 log_printf(TRACE,Core,FUNCTION,_(" Issue Slot [%d][%d] is connected with Read_unit [%d][%d]"),i,j,k,l); 1184 1185 ALLOC3(_network_table_issue_type,bool,_nb_execute_loop,_nb_read_unit[it1],_nb_type); 1186 1187 log_printf(TRACE,Core,FUNCTION,_(" * network_table_issue_type")); 1277 ALLOC3(_network_table_issue_type ,bool,_nb_execute_loop,_nb_read_unit[it1],_nb_type); 1278 ALLOC3(_network_table_issue_thread,bool,_nb_execute_loop,_nb_read_unit[it1],_nb_thread); 1279 1280 log_printf(TRACE,Core,FUNCTION,_(" * network_table_issue_type and network_table_issue_thread")); 1188 1281 for (uint32_t i=0; i<_nb_execute_loop; ++i) 1189 1282 for (uint32_t j=0; j<_nb_read_unit[i]; ++j) … … 1191 1284 // init 1192 1285 for (uint32_t t=0; t<_nb_type; ++t) 1193 _network_table_issue_type [i][j][t] = false; 1286 _network_table_issue_type [i][j][t] = false; 1287 for (uint32_t t=0; t<_nb_thread; ++t) 1288 _network_table_issue_thread [i][j][t] = false; 1194 1289 1195 1290 // get number of read bloc … … 1199 1294 for (uint32_t k=0; k<_nb_functionnal_unit; ++k) 1200 1295 if (_link_read_bloc_and_functionnal_unit [num_read_bloc][k]) 1201 // Scan timing table, test if have an instruction 1202 for (uint32_t t=0; t<_nb_type; ++t) 1203 for (uint32_t o=0; o<_nb_operation; ++o) 1204 if (_timing[k][t][o]._latence > 0) 1296 { 1297 // Scan timing table, test if have an instruction 1298 for (uint32_t t=0; t<_nb_type; ++t) 1299 for (uint32_t o=0; o<_nb_operation; ++o) 1300 if (_timing[k][t][o]._latence > 0) 1301 { 1302 log_printf(TRACE,Core,FUNCTION,_(" * network_table_issue_type [%d][%d][%d] -> true"),i,j,t); 1303 1304 _network_table_issue_type [i][j][t] = true; 1305 break; // operation 1306 } 1307 1308 for (uint32_t t=0; t<_nb_thread; ++t) 1309 if (_link_thread_and_functionnal_unit [t][k]) 1205 1310 { 1206 log_printf(TRACE,Core,FUNCTION,_(" [%d][%d][%d] -> true"),i,j,t);1311 log_printf(TRACE,Core,FUNCTION,_(" * network_table_issue_thread [%d][%d][%d] -> true"),i,j,t); 1207 1312 1208 _network_table_issue_type [i][j][t] = true; 1209 break; // operation 1313 _network_table_issue_thread [i][j][t] = true; 1210 1314 } 1315 } 1211 1316 1212 1317 // Test load store unit connected with this read bloc 1213 1318 for (uint32_t k=0; k<_nb_load_store_unit; ++k) 1214 1319 // Test load store unit connected with this read bloc 1215 if (_link_read_bloc_ and_load_store_unit [num_read_bloc][k])1320 if (_link_read_bloc_with_load_store_unit [k] == num_read_bloc) 1216 1321 { 1217 uint32_t t = TYPE_MEMORY; 1218 1219 log_printf(TRACE,Core,FUNCTION,_(" [%d][%d][%d] -> true"),i,j,t); 1220 1221 _network_table_issue_type [i][j][t] = true; 1222 break; // load_store_unit 1322 { 1323 uint32_t t = TYPE_MEMORY; 1324 1325 log_printf(TRACE,Core,FUNCTION,_(" * network_table_issue_type [%d][%d][%d] -> true"),i,j,t); 1326 1327 _network_table_issue_type [i][j][t] = true; 1328 } 1329 1330 for (uint32_t t=0; t<_nb_thread; ++t) 1331 if (_link_load_store_unit_with_thread[t] == k) 1332 { 1333 log_printf(TRACE,Core,FUNCTION,_(" * network_table_issue_thread [%d][%d][%d] -> true"),i,j,t); 1334 1335 _network_table_issue_thread [i][j][t] = true; 1336 } 1223 1337 } 1224 1338 } … … 1346 1460 ALLOC1(_list_ooo_engine_with_execute_loop ,std::vector<uint32_t>,_nb_execute_loop); 1347 1461 ALLOC1(_list_front_end_with_execute_loop ,std::vector<uint32_t>,_nb_execute_loop); 1348 1462 1349 1463 for (uint32_t i=0; i<_nb_ooo_engine; ++i) 1350 1464 { … … 1366 1480 for (uint32_t i=0; i<_nb_execute_loop; ++i) 1367 1481 { 1368 { 1369 sort (_list_ooo_engine_with_execute_loop[i].begin(), 1370 _list_ooo_engine_with_execute_loop[i].end()); 1371 std::vector<uint32_t>::iterator it=unique(_list_ooo_engine_with_execute_loop[i].begin(), 1372 _list_ooo_engine_with_execute_loop[i].end()); 1373 _list_ooo_engine_with_execute_loop[i].erase(it,_list_ooo_engine_with_execute_loop[i].end()); 1374 } 1375 { 1376 sort (_list_front_end_with_execute_loop[i].begin(), 1377 _list_front_end_with_execute_loop[i].end()); 1378 std::vector<uint32_t>::iterator it=unique(_list_front_end_with_execute_loop[i].begin(), 1379 _list_front_end_with_execute_loop[i].end()); 1380 _list_front_end_with_execute_loop[i].erase(it,_list_front_end_with_execute_loop[i].end()); 1381 } 1482 _list_ooo_engine_with_execute_loop[i] = sort_and_unique (_list_ooo_engine_with_execute_loop[i]); 1483 1484 // { 1485 // sort (_list_ooo_engine_with_execute_loop[i].begin(), 1486 // _list_ooo_engine_with_execute_loop[i].end()); 1487 // std::vector<uint32_t>::iterator it=unique(_list_ooo_engine_with_execute_loop[i].begin(), 1488 // _list_ooo_engine_with_execute_loop[i].end()); 1489 // _list_ooo_engine_with_execute_loop[i].erase(it,_list_ooo_engine_with_execute_loop[i].end()); 1490 // } 1491 1492 _list_front_end_with_execute_loop[i] = sort_and_unique (_list_front_end_with_execute_loop[i]); 1493 1494 // { 1495 // sort (_list_front_end_with_execute_loop[i].begin(), 1496 // _list_front_end_with_execute_loop[i].end()); 1497 // std::vector<uint32_t>::iterator it=unique(_list_front_end_with_execute_loop[i].begin(), 1498 // _list_front_end_with_execute_loop[i].end()); 1499 // _list_front_end_with_execute_loop[i].erase(it,_list_front_end_with_execute_loop[i].end()); 1500 // } 1382 1501 } 1383 1502 … … 1402 1521 ALLOC1(_execute_loop_nb_packet ,uint32_t,_nb_execute_loop); 1403 1522 ALLOC1(_execute_loop_nb_thread ,uint32_t,_nb_execute_loop); 1404 1523 1405 1524 for (uint32_t i=0; i<_nb_execute_loop; ++i) 1406 1525 { … … 1453 1572 } 1454 1573 1574 ALLOC2(_execute_loop_nb_inst_read ,uint32_t,_nb_execute_loop,_nb_read_unit[it1]); 1455 1575 ALLOC2(_execute_loop_size_read_queue ,uint32_t,_nb_execute_loop,_nb_read_unit[it1]); 1456 1576 ALLOC2(_execute_loop_size_reservation_station ,uint32_t,_nb_execute_loop,_nb_read_unit[it1]); … … 1468 1588 log_printf(TRACE,Core,FUNCTION,_(" * num_read_bloc : %d"),num_read_bloc); 1469 1589 1590 _execute_loop_nb_inst_read [i][j] = _nb_inst_read [num_read_bloc]; 1470 1591 _execute_loop_size_read_queue [i][j] = _size_read_queue [num_read_bloc]; 1471 1592 _execute_loop_size_reservation_station [i][j] = _size_reservation_station [num_read_bloc]; … … 1538 1659 } 1539 1660 1540 ALLOC2(_execute_loop_size_store_queue ,uint32_t,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 1541 ALLOC2(_execute_loop_size_load_queue ,uint32_t,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 1542 ALLOC2(_execute_loop_size_speculative_access_queue ,uint32_t,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 1543 ALLOC2(_execute_loop_nb_port_check ,uint32_t,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 1661 ALLOC2(_execute_loop_size_store_queue ,uint32_t ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 1662 ALLOC2(_execute_loop_size_load_queue ,uint32_t ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 1663 ALLOC2(_execute_loop_size_speculative_access_queue ,uint32_t ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 1664 ALLOC2(_execute_loop_nb_store_queue_bank ,uint32_t ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 1665 ALLOC2(_execute_loop_nb_load_queue_bank ,uint32_t ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 1666 ALLOC2(_execute_loop_nb_port_check ,uint32_t ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 1544 1667 ALLOC2(_execute_loop_speculative_load ,multi_execute_loop::execute_loop::Tspeculative_load_t 1545 ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 1546 ALLOC2(_execute_loop_nb_bypass_memory ,uint32_t,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 1547 ALLOC2(_execute_loop_nb_cache_port ,uint32_t,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 1548 ALLOC2(_execute_loop_nb_inst_memory ,uint32_t,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 1668 ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 1669 ALLOC2(_execute_loop_speculative_commit_predictor_scheme ,Tpredictor_t,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 1670 ALLOC3(_execute_loop_lsu_pht_size_counter ,uint32_t ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1],1); 1671 ALLOC3(_execute_loop_lsu_pht_nb_counter ,uint32_t ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1],1); 1672 ALLOC2(_execute_loop_nb_bypass_memory ,uint32_t ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 1673 ALLOC2(_execute_loop_nb_cache_port ,uint32_t ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 1674 ALLOC2(_execute_loop_nb_inst_memory ,uint32_t ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 1549 1675 1550 1676 for (uint32_t i=0; i<_nb_execute_loop; ++i) … … 1556 1682 log_printf(TRACE,Core,FUNCTION,_(" * nb_bypass_memory : %d"),_nb_bypass_memory[num_load_store_unit]); 1557 1683 1558 _execute_loop_size_store_queue [i][j] = _size_store_queue [num_load_store_unit]; 1559 _execute_loop_size_load_queue [i][j] = _size_load_queue [num_load_store_unit]; 1560 _execute_loop_size_speculative_access_queue [i][j] = _size_speculative_access_queue [num_load_store_unit]; 1561 _execute_loop_nb_port_check [i][j] = _nb_port_check [num_load_store_unit]; 1562 _execute_loop_speculative_load [i][j] = _speculative_load [num_load_store_unit]; 1563 _execute_loop_nb_bypass_memory [i][j] = _nb_bypass_memory [num_load_store_unit]; 1564 _execute_loop_nb_cache_port [i][j] = _nb_cache_port [num_load_store_unit]; 1565 _execute_loop_nb_inst_memory [i][j] = _nb_inst_memory [num_load_store_unit]; 1684 _execute_loop_size_store_queue [i][j] = _size_store_queue [num_load_store_unit]; 1685 _execute_loop_size_load_queue [i][j] = _size_load_queue [num_load_store_unit]; 1686 _execute_loop_size_speculative_access_queue [i][j] = _size_speculative_access_queue [num_load_store_unit]; 1687 _execute_loop_nb_store_queue_bank [i][j] = _nb_store_queue_bank [num_load_store_unit]; 1688 _execute_loop_nb_load_queue_bank [i][j] = _nb_load_queue_bank [num_load_store_unit]; 1689 _execute_loop_nb_port_check [i][j] = _nb_port_check [num_load_store_unit]; 1690 _execute_loop_speculative_load [i][j] = _speculative_load [num_load_store_unit]; 1691 _execute_loop_speculative_commit_predictor_scheme [i][j] = _speculative_commit_predictor_scheme [num_load_store_unit]; 1692 for (uint32_t k=0; k<1; ++k) 1693 { 1694 _execute_loop_lsu_pht_size_counter [i][j][k] = _lsu_pht_size_counter [num_load_store_unit][k]; 1695 _execute_loop_lsu_pht_nb_counter [i][j][k] = _lsu_pht_nb_counter [num_load_store_unit][k]; 1696 } 1697 _execute_loop_nb_bypass_memory [i][j] = _nb_bypass_memory [num_load_store_unit]; 1698 _execute_loop_nb_cache_port [i][j] = _nb_cache_port [num_load_store_unit]; 1699 _execute_loop_nb_inst_memory [i][j] = _nb_inst_memory [num_load_store_unit]; 1566 1700 } 1567 1701 1702 ALLOC2(_execute_loop_nb_inst_write ,uint32_t,_nb_execute_loop,_nb_write_unit[it1]); 1568 1703 ALLOC2(_execute_loop_size_write_queue ,uint32_t,_nb_execute_loop,_nb_write_unit[it1]); 1569 1704 ALLOC2(_execute_loop_size_execute_queue ,uint32_t,_nb_execute_loop,_nb_write_unit[it1]); … … 1576 1711 uint32_t num_write_bloc = _link_write_bloc_with_write_unit [i][j]; 1577 1712 1713 _execute_loop_nb_inst_write [i][j] = _nb_inst_write [num_write_bloc]; 1578 1714 _execute_loop_size_write_queue [i][j] = _size_write_queue [num_write_bloc]; 1579 1715 _execute_loop_size_execute_queue [i][j] = _size_execute_queue [num_write_bloc]; … … 1660 1796 1661 1797 if (is_lsu) 1662 link = _link_read_bloc_and_load_store_unit [num_read_bloc][num_load_store_unit];1798 link = (_link_read_bloc_with_load_store_unit [num_load_store_unit] == num_read_bloc); 1663 1799 else 1664 1800 link = _link_read_bloc_and_functionnal_unit [num_read_bloc][num_functionnal_unit]; … … 1689 1825 1690 1826 if (is_lsu) 1691 link = _link_write_bloc_and_load_store_unit [num_write_bloc][num_load_store_unit];1827 link = (_link_write_bloc_with_load_store_unit [num_load_store_unit] == num_write_bloc); 1692 1828 else 1693 1829 link = _link_write_bloc_and_functionnal_unit [num_write_bloc][num_functionnal_unit]; … … 1745 1881 { 1746 1882 uint32_t num_write_bloc = _link_write_bloc_with_write_unit[i][k]; 1747 bool have_link = (is_lsu)?(_link_write_bloc_ and_load_store_unit [num_write_bloc][num_load_store_unit]):(_link_write_bloc_and_functionnal_unit [num_write_bloc][num_functionnal_unit]);1883 bool have_link = (is_lsu)?(_link_write_bloc_with_load_store_unit [num_load_store_unit]==num_write_bloc):(_link_write_bloc_and_functionnal_unit [num_write_bloc][num_functionnal_unit]); 1748 1884 1749 1885 if (have_link) … … 1997 2133 _ooo_engine_nb_inst_insert [i], 1998 2134 _ooo_engine_nb_inst_retire [i], 1999 // 2135 // _nb_inst_issue [i], 2000 2136 _ooo_engine_nb_inst_execute [i], 2001 2137 _nb_inst_reexecute [i], … … 2011 2147 _size_re_order_buffer [i], 2012 2148 _nb_re_order_buffer_bank [i], 2149 _retire_ooo_scheme [i], 2013 2150 _commit_priority [i], 2014 2151 _commit_load_balancing [i], … … 2021 2158 // _ooo_engine_table_issue_type [i], 2022 2159 _size_reexecute_queue [i], 2023 _reexecute_priority [i],2024 _reexecute_load_balancing [i],2025 2160 _ooo_engine_rename_select_priority [i], 2026 2161 _ooo_engine_rename_select_load_balancing [i], … … 2060 2195 _size_special_data , 2061 2196 2197 _execute_loop_nb_inst_read [i], 2062 2198 _execute_loop_size_read_queue [i], 2063 2199 _execute_loop_size_reservation_station [i], … … 2071 2207 _execute_loop_size_load_queue [i], 2072 2208 _execute_loop_size_speculative_access_queue [i], 2209 _execute_loop_nb_store_queue_bank [i], 2210 _execute_loop_nb_load_queue_bank [i], 2073 2211 _execute_loop_nb_port_check [i], 2074 2212 _execute_loop_speculative_load [i], 2213 _execute_loop_speculative_commit_predictor_scheme [i], 2214 _execute_loop_lsu_pht_size_counter [i], 2215 _execute_loop_lsu_pht_nb_counter [i], 2075 2216 _execute_loop_nb_bypass_memory [i], 2076 2217 _execute_loop_nb_cache_port [i], 2077 2218 _execute_loop_nb_inst_memory [i], 2078 2219 2220 _execute_loop_nb_inst_write [i], 2079 2221 _execute_loop_size_write_queue [i], 2080 2222 _execute_loop_size_execute_queue [i], … … 2146 2288 _param_glue = new core::core_glue::Parameters 2147 2289 ( 2148 _nb_front_end , 2149 _nb_context ,//[nb_front_end] 2150 _nb_ooo_engine , 2151 _nb_execute_loop , 2152 _ooo_engine_nb_front_end ,//[nb_ooo_engine] 2153 _ooo_engine_nb_execute_loop ,//[nb_ooo_engine] 2154 _execute_loop_nb_ooo_engine ,//[nb_execute_loop] 2155 _front_end_sum_inst_decod ,//[nb_front_end] -> [sum_inst_decod] 2156 _front_end_nb_inst_branch_complete ,//[nb_front_end] 2157 _nb_inst_branch_complete ,//[nb_ooo_engine] 2158 // _ooo_engine_nb_inst_insert_rob ,//[nb_ooo_engine] 2159 _nb_inst_reexecute ,//[nb_ooo_engine] 2160 _nb_inst_issue_queue ,//[nb_ooo_engine] 2161 _nb_inst_issue_slot ,//[nb_ooo_engine] 2162 _ooo_engine_nb_inst_execute ,//[nb_ooo_engine][ooo_engine_nb_execute_loop] 2163 _issue_queue_in_order ,//[nb_ooo_engine] 2164 _nb_read_unit ,//[nb_execute_loop] 2165 _nb_write_unit ,//[nb_execute_loop] 2166 _size_depth , 2167 _size_rob_ptr , 2168 _size_load_queue_ptr , 2169 _size_store_queue_ptr , 2170 _size_general_data , 2171 _size_special_data , 2172 _size_general_register , 2173 _size_special_register , 2174 _dispatch_priority , 2175 _dispatch_load_balancing , 2176 _network_table_dispatch ,//[nb_ooo_engine][nb_inst_issue_slot][nb_execute_loop][nb_read_unit] 2177 _network_table_issue_type ,// [nb_execute_loop][nb_read_unit][nb_type] 2178 _translate_ooo_engine_num_front_end ,//[nb_ooo_engine][ooo_engine_nb_front_end] 2179 _translate_ooo_engine_num_execute_loop,//[nb_ooo_engine][ooo_engine_nb_execute_loop] 2180 _translate_execute_loop_num_ooo_engine //[nb_execute_loop][execute_loop_nb_ooo_engine] 2290 _nb_front_end , 2291 _nb_context ,//[nb_front_end] 2292 _nb_ooo_engine , 2293 _nb_execute_loop , 2294 _ooo_engine_nb_front_end ,//[nb_ooo_engine] 2295 _ooo_engine_nb_execute_loop ,//[nb_ooo_engine] 2296 _execute_loop_nb_ooo_engine ,//[nb_execute_loop] 2297 _front_end_sum_inst_decod ,//[nb_front_end] -> [sum_inst_decod] 2298 _front_end_nb_inst_branch_complete ,//[nb_front_end] 2299 _nb_inst_branch_complete ,//[nb_ooo_engine] 2300 // _ooo_engine_nb_inst_insert_rob ,//[nb_ooo_engine] 2301 _nb_inst_reexecute ,//[nb_ooo_engine] 2302 _nb_inst_issue_queue ,//[nb_ooo_engine] 2303 // _nb_inst_issue_slot ,//[nb_ooo_engine] 2304 _ooo_engine_nb_inst_execute ,//[nb_ooo_engine][ooo_engine_nb_execute_loop] 2305 _issue_queue_in_order ,//[nb_ooo_engine] 2306 _nb_read_unit ,//[nb_execute_loop] 2307 _nb_write_unit ,//[nb_execute_loop] 2308 _size_depth , 2309 _size_rob_ptr , 2310 _size_load_queue_ptr , 2311 _size_store_queue_ptr , 2312 _size_general_data , 2313 _size_special_data , 2314 _size_general_register , 2315 _size_special_register , 2316 _dispatch_priority , 2317 _dispatch_load_balancing , 2318 // _network_table_dispatch ,//[nb_ooo_engine][nb_inst_issue_slot][nb_execute_loop][nb_read_unit] 2319 _network_table_issue_type ,// [nb_execute_loop][nb_read_unit][nb_type] 2320 _network_table_issue_thread ,// [nb_execute_loop][nb_read_unit][nb_thread] 2321 _translate_ooo_engine_num_front_end ,//[nb_ooo_engine][ooo_engine_nb_front_end] 2322 _translate_ooo_engine_num_execute_loop ,//[nb_ooo_engine][ooo_engine_nb_execute_loop] 2323 _translate_execute_loop_num_ooo_engine ,//[nb_execute_loop][execute_loop_nb_ooo_engine] 2324 _ooo_engine_translate_num_context_to_num_thread //[nb_ooo_engine][ooo_engine_nb_front_end][nb_context] 2181 2325 ); 2182 2326 … … 2238 2382 DELETE2(_execute_loop_size_execute_queue ,_nb_execute_loop,_nb_write_unit[it1]); 2239 2383 DELETE2(_execute_loop_size_write_queue ,_nb_execute_loop,_nb_write_unit[it1]); 2384 DELETE2(_execute_loop_nb_inst_write ,_nb_execute_loop,_nb_write_unit[it1]); 2240 2385 DELETE2(_execute_loop_nb_inst_memory ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 2241 2386 DELETE2(_execute_loop_nb_cache_port ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 2242 2387 DELETE2(_execute_loop_nb_bypass_memory ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 2388 DELETE3(_execute_loop_lsu_pht_nb_counter ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1],1); 2389 DELETE3(_execute_loop_lsu_pht_size_counter ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1],1); 2390 DELETE2(_execute_loop_speculative_commit_predictor_scheme ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 2243 2391 DELETE2(_execute_loop_speculative_load ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 2244 2392 DELETE2(_execute_loop_nb_port_check ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 2393 DELETE2(_execute_loop_nb_load_queue_bank ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 2394 DELETE2(_execute_loop_nb_store_queue_bank ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 2245 2395 DELETE2(_execute_loop_size_speculative_access_queue ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); 2246 2396 DELETE2(_execute_loop_size_load_queue ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1]); … … 2253 2403 DELETE2(_execute_loop_size_reservation_station ,_nb_execute_loop,_nb_read_unit[it1]); 2254 2404 DELETE2(_execute_loop_size_read_queue ,_nb_execute_loop,_nb_read_unit[it1]); 2405 DELETE2(_execute_loop_nb_inst_read ,_nb_execute_loop,_nb_read_unit[it1]); 2255 2406 DELETE2(_translate_execute_loop_num_ooo_engine ,_nb_execute_loop,_execute_loop_nb_ooo_engine[it1]); 2256 2407 DELETE1(_execute_loop_nb_thread ,_nb_execute_loop); … … 2273 2424 // DELETE3(_ooo_engine_table_issue_type ,_nb_ooo_engine,_nb_inst_issue_slot[it1],_nb_type); 2274 2425 // DELETE3(_ooo_engine_table_routing ,_nb_ooo_engine,_nb_rename_unit[it1],_nb_inst_issue_slot[it1]); 2426 DELETE3(_network_table_issue_thread ,_nb_execute_loop,_nb_read_unit[it1],_nb_thread); 2275 2427 DELETE3(_network_table_issue_type ,_nb_execute_loop,_nb_read_unit[it1],_nb_type); 2276 2428 // DELETE4(_network_table_dispatch ,_nb_ooo_engine,_nb_inst_issue_slot[it1],_nb_execute_loop,_nb_read_unit[it3]); 2277 2429 // DELETE2(_ooo_engine_size_read_counter ,_nb_ooo_engine,_nb_rename_unit[it1]); 2278 2430 DELETE2(_ooo_engine_nb_rename_unit_bank ,_nb_ooo_engine,_nb_rename_unit[it1]); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Parameters_msg_error.cpp
r128 r138 24 24 Parameters_test test ("Core"); 25 25 26 // TESTER SI LES VALEURS NE DEPASSE PAS DE L'INTERVALLE AUTORISE 27 26 // Test if value is valid 28 27 { 29 28 // initialisation … … 191 190 uint32_t num_execute_loop = _link_execute_unit_with_load_store_unit [i].first; 192 191 uint32_t num_execute_unit = _link_execute_unit_with_load_store_unit [i].second; 192 193 log_printf(TRACE,Core,FUNCTION," * _link_execute_unit_with_load_store_unit [%d] = %d.%d",i,num_execute_loop,num_execute_unit); 193 194 194 195 nb_link_execute_unit [num_execute_loop][num_execute_unit] ++; … … 224 225 225 226 { 226 // initialisation 227 uint32_t nb_link_slot [_nb_ooo_engine][max<uint32_t>(_nb_inst_issue_slot,_nb_ooo_engine)]; 228 uint32_t nb_link_read_bloc [_nb_read_bloc]; 229 230 // initialisation 231 for (uint32_t i=0; i<_nb_ooo_engine; ++i) 232 for (uint32_t j=0; j<_nb_inst_issue_slot[i]; ++j) 233 nb_link_slot [i][j] = 0; 227 bool read_bloc_link_with_load_store_unit [_nb_read_bloc]; 228 bool read_bloc_link_with_functionnal_unit [_nb_read_bloc]; 229 uint32_t nb_link_functionnal_unit [_nb_functionnal_unit]; 230 234 231 for (uint32_t i=0; i<_nb_read_bloc; ++i) 235 nb_link_read_bloc [i] = 0; 236 237 // set link 238 for (uint32_t i=0; i<_nb_ooo_engine; ++i) 239 for (uint32_t j=0; j<_nb_inst_issue_slot[i]; ++j) 240 for (uint32_t k=0; k<_nb_read_bloc; ++k) 241 if (_table_dispatch [i][j][k]) 242 { 243 nb_link_slot [i][j] ++; 244 nb_link_read_bloc [k] ++; 245 } 246 247 // test 248 for (uint32_t i=0; i<_nb_ooo_engine; ++i) 249 for (uint32_t j=0; j<_nb_inst_issue_slot[i]; ++j) 250 if (nb_link_slot [i][j] == 0) 251 test.error(toString(_("In Out Of Order Engine [%d], the slot issue [%d] is not link with a read_bloc.\n"),i,j)); 232 { 233 read_bloc_link_with_load_store_unit [i] = false; 234 read_bloc_link_with_functionnal_unit [i] = false; 235 } 236 for (uint32_t i=0; i<_nb_functionnal_unit; ++i) 237 nb_link_functionnal_unit [i] = 0; 238 239 for (uint32_t i=0; i<_nb_load_store_unit; ++i) 240 read_bloc_link_with_load_store_unit [_link_read_bloc_with_load_store_unit[i]] = true; 241 252 242 for (uint32_t i=0; i<_nb_read_bloc; ++i) 253 if (nb_link_read_bloc [i] == 0) 254 test.error(toString(_("Read_bloc [%d] is not link with a issue's slot.\n"),i)); 255 } 256 257 { 258 uint32_t nb_link_read_bloc [_nb_read_bloc]; 259 uint32_t nb_link_load_store_unit [_nb_load_store_unit]; 260 uint32_t nb_link_functionnal_unit [_nb_functionnal_unit]; 243 for (uint32_t j=0; j<_nb_functionnal_unit; ++j) 244 if (_link_read_bloc_and_functionnal_unit [i][j]) 245 { 246 nb_link_functionnal_unit [j] ++; 247 read_bloc_link_with_functionnal_unit [i] = true; 248 } 261 249 262 250 for (uint32_t i=0; i<_nb_read_bloc; ++i) 263 nb_link_read_bloc [i] = 0; 264 for (uint32_t i=0; i<_nb_load_store_unit; ++i) 265 nb_link_load_store_unit [i] = 0; 266 for (uint32_t i=0; i<_nb_functionnal_unit; ++i) 267 nb_link_functionnal_unit [i] = 0; 268 269 for (uint32_t i=0; i<_nb_read_bloc; ++i) 270 { 271 for (uint32_t j=0; j<_nb_load_store_unit; ++j) 272 if (_link_read_bloc_and_load_store_unit [i][j]) 273 { 274 nb_link_read_bloc [i] ++; 275 nb_link_load_store_unit [j] ++; 276 } 277 for (uint32_t j=0; j<_nb_functionnal_unit; ++j) 278 if (_link_read_bloc_and_functionnal_unit [i][j]) 279 { 280 nb_link_read_bloc [i] ++; 281 nb_link_functionnal_unit [j] ++; 282 } 283 } 284 285 for (uint32_t i=0; i<_nb_read_bloc; ++i) 286 if (nb_link_read_bloc [i] == 0) 287 test.error(toString(_("Read_bloc [%d] is not link with an execute_unit.\n"),i)); 288 for (uint32_t i=0; i<_nb_load_store_unit; ++i) 289 if (nb_link_load_store_unit [i] == 0) 290 test.error(toString(_("load_store_unit [%d] is not link with a read_bloc.\n"),i)); 251 { 252 if (not read_bloc_link_with_load_store_unit [i] and 253 not read_bloc_link_with_functionnal_unit [i]) 254 test.error(toString(_("Read_bloc [%d] is not link with an execute_unit.\n"),i)); 255 if ( read_bloc_link_with_load_store_unit [i] and 256 read_bloc_link_with_functionnal_unit [i]) 257 test.error(toString(_("Read_bloc [%d] is linked with an load store unit and functionnal unit.\n"),i)); 258 } 291 259 for (uint32_t i=0; i<_nb_functionnal_unit; ++i) 292 260 if (nb_link_functionnal_unit [i] == 0) … … 296 264 { 297 265 uint32_t nb_link_write_bloc [_nb_write_bloc]; 298 uint32_t nb_link_load_store_unit [_nb_load_store_unit];299 266 uint32_t nb_link_functionnal_unit [_nb_functionnal_unit]; 300 267 301 268 for (uint32_t i=0; i<_nb_write_bloc; ++i) 302 269 nb_link_write_bloc [i] = 0; 303 for (uint32_t i=0; i<_nb_load_store_unit; ++i)304 nb_link_load_store_unit [i] = 0;305 270 for (uint32_t i=0; i<_nb_functionnal_unit; ++i) 306 271 nb_link_functionnal_unit [i] = 0; 307 272 273 for (uint32_t i=0; i<_nb_load_store_unit; ++i) 274 nb_link_write_bloc [_link_write_bloc_with_load_store_unit[i]] = true; 275 308 276 for (uint32_t i=0; i<_nb_write_bloc; ++i) 309 { 310 for (uint32_t j=0; j<_nb_load_store_unit; ++j) 311 if (_link_write_bloc_and_load_store_unit [i][j]) 312 { 313 nb_link_write_bloc [i] ++; 314 nb_link_load_store_unit [j] ++; 315 } 316 for (uint32_t j=0; j<_nb_functionnal_unit; ++j) 317 if (_link_write_bloc_and_functionnal_unit [i][j]) 318 { 319 nb_link_write_bloc [i] ++; 320 nb_link_functionnal_unit [j] ++; 321 } 322 } 277 for (uint32_t j=0; j<_nb_functionnal_unit; ++j) 278 if (_link_write_bloc_and_functionnal_unit [i][j]) 279 { 280 nb_link_write_bloc [i] ++; 281 nb_link_functionnal_unit [j] ++; 282 } 323 283 324 284 for (uint32_t i=0; i<_nb_write_bloc; ++i) 325 285 if (nb_link_write_bloc [i] == 0) 326 286 test.error(toString(_("Write_bloc [%d] is not link with an execute_unit.\n"),i)); 327 for (uint32_t i=0; i<_nb_load_store_unit; ++i)328 if (nb_link_load_store_unit [i] == 0)329 test.error(toString(_("load_store_unit [%d] is not link with a write_bloc.\n"),i));330 287 for (uint32_t i=0; i<_nb_functionnal_unit; ++i) 331 288 if (nb_link_functionnal_unit [i] == 0) … … 334 291 335 292 { 336 uint32_t nb_link_thread [_nb_thread]; 337 uint32_t nb_link_load_store_unit [_nb_load_store_unit]; 338 uint32_t nb_link_functionnal_unit [_nb_functionnal_unit]; 293 uint32_t nb_link_thread [_nb_thread]; 294 uint32_t nb_link_load_store_unit [_nb_load_store_unit]; 295 uint32_t nb_link_functionnal_unit [_nb_functionnal_unit]; 296 bool link_front_end_with_execute_loop [_nb_front_end][_nb_execute_loop]; 297 uint32_t nb_link_front_end_with_execute_loop [_nb_front_end]; 339 298 340 299 for (uint32_t i=0; i<_nb_thread; ++i) … … 344 303 for (uint32_t i=0; i<_nb_functionnal_unit; ++i) 345 304 nb_link_functionnal_unit [i] = 0; 346 347 for (uint32_t i=0; i<_nb_thread; ++i) 348 { 305 for (uint32_t i=0; i<_nb_front_end; ++i) 306 { 307 nb_link_front_end_with_execute_loop [i] = 0; 308 for (uint32_t j=0; j<_nb_execute_loop; ++j) 309 link_front_end_with_execute_loop [i][j] = false; 310 } 311 312 for (uint32_t i=0; i<_nb_thread; ++i) 313 { 314 uint32_t num_front_end = _link_context_with_thread [i].first; 315 349 316 { 350 317 uint32_t num_load_store_unit = _link_load_store_unit_with_thread [i]; 318 uint32_t num_execute_loop = _link_execute_unit_with_load_store_unit [i].first; 351 319 352 320 nb_link_thread [i] ++; 353 321 nb_link_load_store_unit [num_load_store_unit] ++; 322 323 if (not link_front_end_with_execute_loop [num_front_end][num_execute_loop]) 324 nb_link_front_end_with_execute_loop [num_front_end] ++; 325 link_front_end_with_execute_loop [num_front_end][num_execute_loop] = true; 354 326 } 355 327 … … 357 329 if (_link_thread_and_functionnal_unit [i][j]) 358 330 { 331 uint32_t num_execute_loop = _link_execute_unit_with_functionnal_unit [i].first; 332 359 333 nb_link_thread [i] ++; 360 334 nb_link_functionnal_unit [j] ++; 335 336 if (not link_front_end_with_execute_loop [num_front_end][num_execute_loop]) 337 nb_link_front_end_with_execute_loop [num_front_end] ++; 338 link_front_end_with_execute_loop [num_front_end][num_execute_loop] = true; 361 339 } 362 340 } … … 371 349 if (nb_link_functionnal_unit [i] == 0) 372 350 test.error(toString(_("Functionnal_unit [%d] is not link with a thread.\n"),i)); 351 for (uint32_t i=0; i<_nb_front_end; ++i) 352 if (nb_link_front_end_with_execute_loop [i] != 1) 353 test.error(toString(_("Front end [%d] is link with many execute_loop.\n"),i)); 373 354 } 374 355 … … 395 376 for (uint32_t i=0; i<_nb_load_store_unit; ++i) 396 377 for (uint32_t j=0; j<_nb_cache_port[i]; ++j) 397 nb_link_dcache_port [_link_dcache_port_with_load_store_unit[i][j]] ++;378 nb_link_dcache_port [_link_dcache_port_with_load_store_unit[i][j]] ++; 398 379 399 380 for (uint32_t i=0; i<_nb_dcache_port; ++i) … … 402 383 } 403 384 404 405 // public : pair_dual * _link_context_with_thread ;//[nb_thread]406 // public : pair_dual * _link_decod_unit_with_decod_bloc ;//[nb_decod_bloc]407 // public : pair_dual * _link_rename_unit_with_rename_bloc ;//[nb_rename_bloc]408 // public : pair_dual * _link_read_unit_with_read_bloc ;//[nb_read_bloc]409 // public : pair_dual * _link_write_unit_with_write_bloc ;//[nb_write_bloc]410 // public : pair_dual * _link_execute_unit_with_functionnal_unit ;//[nb_functionnal_unit]411 // public : pair_dual * _link_execute_unit_with_load_store_unit ;//[nb_load_store_unit]412 // public : uint32_t * _link_decod_bloc_with_thread ;//[nb_thread]413 // public : uint32_t * _link_rename_bloc_with_front_end ;//[nb_front_end]414 // public : bool *** _table_dispatch ;//[nb_ooo_engine][nb_inst_issue][nb_read_bloc]415 // public : bool ** _link_read_bloc_and_load_store_unit ;//[nb_read_bloc][nb_load_store_unit]416 // public : bool ** _link_read_bloc_and_functionnal_unit ;//[nb_read_bloc][nb_functionnal_unit]417 // public : bool ** _link_write_bloc_and_load_store_unit ;//[nb_write_bloc][nb_load_store_unit]418 // public : bool ** _link_write_bloc_and_functionnal_unit ;//[nb_write_bloc][nb_functionnal_unit]419 // public : uint32_t * _link_load_store_unit_with_thread ;//[nb_thread]420 // public : bool ** _link_thread_and_functionnal_unit ;//[nb_thread][nb_functionnal_unit]421 // public : uint32_t * _link_icache_port_with_thread ;//[nb_thread]422 // public : uint32_t ** _link_dcache_port_with_load_store_unit ;//[nb_load_store_unit][nb_cache_port]423 424 385 log_end(Core,FUNCTION); 425 386 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Parameters_print.cpp
r136 r138 176 176 str+= toString(MSG_INFORMATION)+" * nb_rename_unit : "+toString<uint32_t >(_nb_rename_unit [i])+"\n"; 177 177 str+= toString(MSG_INFORMATION)+" * nb_inst_issue_queue : "+toString<uint32_t >(_nb_inst_issue_queue [i])+"\n"; 178 str+= toString(MSG_INFORMATION)+" * nb_inst_issue_slot : "+toString<uint32_t >(_nb_inst_issue_slot [i])+"\n";179 178 str+= toString(MSG_INFORMATION)+" * nb_inst_reexecute : "+toString<uint32_t >(_nb_inst_reexecute [i])+"\n"; 180 179 str+= toString(MSG_INFORMATION)+" * nb_inst_commit : "+toString<uint32_t >(_nb_inst_commit [i])+"\n"; … … 193 192 str+= toString(MSG_INFORMATION)+" * issue_load_balancing : "+toString<Tload_balancing_t>(_issue_load_balancing [i])+"\n"; 194 193 str+= toString(MSG_INFORMATION)+" * size_reexecute_queue : "+toString<uint32_t >(_size_reexecute_queue [i])+"\n"; 195 str+= toString(MSG_INFORMATION)+" * reexecute_priority : "+toString<Tpriority_t >(_reexecute_priority [i])+"\n";196 str+= toString(MSG_INFORMATION)+" * reexecute_load_balancing : "+toString<Tload_balancing_t>(_reexecute_load_balancing[i])+"\n";197 194 } 198 195 … … 245 242 246 243 247 for (uint32_t i=0; i<_nb_read_bloc; ++i) 248 for (uint32_t j=0; j<_nb_load_store_unit; ++j) 249 str+= toString(MSG_INFORMATION)+" * link_read_bloc_and_load_store_unit ["+toString(i)+"]["+toString(j)+"] : "+toString(_link_read_bloc_and_load_store_unit [i][j])+"\n";//[nb_read_bloc][nb_load_store_unit] 244 for (uint32_t i=0; i<_nb_load_store_unit; ++i) 245 str+= toString(MSG_INFORMATION)+" * link_read_bloc_with_load_store_unit ["+toString(i)+"] : "+toString(_link_read_bloc_with_load_store_unit [i])+"\n";//[nb_load_store_unit] 250 246 for (uint32_t i=0; i<_nb_read_bloc; ++i) 251 247 for (uint32_t j=0; j<_nb_functionnal_unit; ++j) 252 248 str+= toString(MSG_INFORMATION)+" * link_read_bloc_and_functionnal_unit ["+toString(i)+"]["+toString(j)+"] : "+toString(_link_read_bloc_and_functionnal_unit [i][j])+"\n";//[nb_read_bloc][nb_functionnal_unit] 253 for (uint32_t i=0; i<_nb_write_bloc; ++i) 254 for (uint32_t j=0; j<_nb_load_store_unit; ++j) 255 str+= toString(MSG_INFORMATION)+" * link_write_bloc_and_load_store_unit ["+toString(i)+"]["+toString(j)+"] : "+toString(_link_write_bloc_and_load_store_unit [i][j])+"\n";//[nb_write_bloc][nb_load_store_unit] 249 for (uint32_t i=0; i<_nb_load_store_unit; ++i) 250 str+= toString(MSG_INFORMATION)+" * link_write_bloc_with_load_store_unit ["+toString(i)+"] : "+toString(_link_write_bloc_with_load_store_unit [i])+"\n";//[nb_load_store_unit] 256 251 for (uint32_t i=0; i<_nb_write_bloc; ++i) 257 252 for (uint32_t j=0; j<_nb_functionnal_unit; ++j) … … 262 257 263 258 str+= toString(MSG_INFORMATION)+" -----[ Dispatch ]---------------------------------\n"; 264 265 for (uint32_t i=0; i<_nb_ooo_engine; ++i)266 for (uint32_t j=0; j<_nb_inst_issue_slot[i]; ++j)267 for (uint32_t k=0; k<_nb_read_bloc; ++k)268 str+= toString(MSG_INFORMATION)+" * table_dispatch ["+toString(i)+"]["+toString(j)+"]["+toString(k)+"] : "+toString(_table_dispatch [i][j][k])+"\n";//[nb_ooo_engine][nb_inst_issue][nb_read_bloc]269 270 259 str+= toString(MSG_INFORMATION)+" * dispatch_priority : "+toString<Tpriority_t >(_dispatch_priority )+"\n"; 271 260 str+= toString(MSG_INFORMATION)+" * dispatch_load_balancing : "+toString<Tload_balancing_t>(_dispatch_load_balancing); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h
r131 r138 50 50 public : Stat * _stat; 51 51 52 private : counter_t * _stat_nb_read; 53 private : counter_t * _stat_nb_write; 52 // private : counter_t * _stat_nb_read; 53 // private : counter_t * _stat_nb_write; 54 private : counters_t * _stat_port_read; 55 private : counters_t * _stat_port_write; 56 private : counters_t * _stat_port_read_write; 54 57 #endif 55 58 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_statistics_declaration.cpp
r84 r138 21 21 param_statistics); 22 22 23 _stat_nb_read = _stat->create_variable("nb_read" ); 24 _stat_nb_write = _stat->create_variable("nb_write"); 23 if (_param->_nb_port_read>0) 24 _stat_port_read = _stat->create_counters("port_read",_param->_nb_port_read,"", 25 _("Usage of read port %d."), 26 _("Percent of usage read port %d."), 27 _("Average of usage read port.") 28 ); 25 29 26 _stat->create_expr_average_by_cycle("average_read" , "nb_read" , "", _("Average read by cycle" )); 27 _stat->create_expr_average_by_cycle("average_write", "nb_write", "", _("Average write by cycle")); 30 if (_param->_nb_port_write>0) 31 _stat_port_write = _stat->create_counters("port_write",_param->_nb_port_write,"", 32 _("Usage of write port %d."), 33 _("Percent of usage write port %d."), 34 _("Average of usage write port.") 35 ); 36 if (_param->_nb_port_read_write>0) 37 _stat_port_read_write = _stat->create_counters("port_read_write",_param->_nb_port_read_write,"", 38 _("Usage of read_write port."), 39 _("Percent of usage read_write port %d."), 40 _("Average of usage read_write port.") 41 ); 28 42 29 _stat->create_expr_percent ("percent_use_read" , "average_read" , toString(_param->_nb_port_read +_param->_nb_port_read_write), _("Percent read by cycle" )); 30 _stat->create_expr_percent ("percent_use_write", "average_write", toString(_param->_nb_port_write+_param->_nb_port_read_write), _("Percent write by cycle")); 43 // _stat_nb_read = _stat->create_variable("nb_read" ); 44 // _stat_nb_write = _stat->create_variable("nb_write"); 45 46 // _stat->create_expr_average_by_cycle("average_read" , "nb_read" , "", _("Average read by cycle" )); 47 // _stat->create_expr_average_by_cycle("average_write", "nb_write", "", _("Average write by cycle")); 48 49 // _stat->create_expr_percent ("percent_use_read" , "average_read" , toString(_param->_nb_port_read +_param->_nb_port_read_write), _("Percent read by cycle" )); 50 // _stat->create_expr_percent ("percent_use_write", "average_write", toString(_param->_nb_port_write+_param->_nb_port_read_write), _("Percent write by cycle")); 31 51 32 52 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_transition.cpp
r131 r138 37 37 else 38 38 { 39 #ifdef STATISTICS 40 uint32_t stat_nb_read =0; 41 uint32_t stat_nb_write =0; 42 uint32_t stat_nb_read_write=0; 43 #endif 39 44 for (uint32_t i=0; i<_param->_nb_port_write; i++) 40 45 { … … 45 50 { 46 51 #ifdef STATISTICS 47 if (usage_is_set(_usage,USE_STATISTICS)) 48 (*_stat_nb_write) ++; 49 #endif 52 stat_nb_write++; 53 #endif 54 55 // #ifdef STATISTICS 56 // if (usage_is_set(_usage,USE_STATISTICS)) 57 // (*_stat_nb_write) ++; 58 // #endif 50 59 51 60 Taddress_t address = (_param->_have_port_address)?PORT_READ(in_WRITE_ADDRESS[i]):0; … … 74 83 if (PORT_READ(in_READ_WRITE_VAL[i]) == true) 75 84 { 85 #ifdef STATISTICS 86 stat_nb_read_write++; 87 #endif 88 76 89 if (PORT_READ(in_READ_WRITE_RW [i]) == RW_WRITE) 77 90 { 78 #ifdef STATISTICS79 if (usage_is_set(_usage,USE_STATISTICS))80 (*_stat_nb_write) ++;81 #endif91 // #ifdef STATISTICS 92 // if (usage_is_set(_usage,USE_STATISTICS)) 93 // (*_stat_nb_write) ++; 94 // #endif 82 95 83 96 Taddress_t address = (_param->_have_port_address)?PORT_READ(in_READ_WRITE_ADDRESS[i]):0; … … 95 108 reg_DATA[address] = data; 96 109 } 97 #ifdef STATISTICS98 else99 {100 if (usage_is_set(_usage,USE_STATISTICS))101 (*_stat_nb_read) ++;102 }103 #endif110 // #ifdef STATISTICS 111 // else 112 // { 113 // if (usage_is_set(_usage,USE_STATISTICS)) 114 // (*_stat_nb_read) ++; 115 // } 116 // #endif 104 117 } 105 118 } 119 120 121 #ifdef STATISTICS 122 if (usage_is_set(_usage,USE_STATISTICS)) 123 { 124 for (uint32_t i=0; i<_param->_nb_port_read; i++) 125 if ( PORT_READ(in_READ_VAL [i]) == 1) 126 { 127 stat_nb_read ++; 128 // (*_stat_nb_read) ++; 129 } 130 131 if (_param->_nb_port_read>0) 132 (*_stat_port_read ) += stat_nb_read; 133 if (_param->_nb_port_write>0) 134 (*_stat_port_write ) += stat_nb_write; 135 if (_param->_nb_port_read_write>0) 136 (*_stat_port_read_write) += stat_nb_read_write; 137 } 138 #endif 106 139 } 107 108 #ifdef STATISTICS109 if (usage_is_set(_usage,USE_STATISTICS))110 for (uint32_t i=0; i<_param->_nb_port_read; i++)111 if ( PORT_READ(in_READ_VAL [i]) == 1)112 (*_stat_nb_read) ++;113 #endif114 140 115 141 #if defined(DEBUG_RegisterFile_Monolithic) and DEBUG_RegisterFile_Monolithic and (DEBUG >= DEBUG_TRACE) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest/mkf.info
r137 r138 3 3 target_dep all RegisterFile_Multi_Banked_00.ngc 4 4 target_dep RegisterFile_Multi_Banked_00.ngc RegisterFile_Multi_Banked_00.prj 5 target_dep RegisterFile_Multi_Banked_00.prj RegisterFile_Multi_Banked_00_bank_Pack.vhdl RegisterFile_Multi_Banked_00_bank.vhdl RegisterFile_Multi_Banked_00_Pack.vhdl RegisterFile_Multi_Banked_00_select_ 12_ports_Pack.vhdl RegisterFile_Multi_Banked_00_select_12_ports.vhdl RegisterFile_Multi_Banked_00_select_6_ports_Pack.vhdl RegisterFile_Multi_Banked_00_select_6_ports.vhdl RegisterFile_Multi_Banked_00.vhdl5 target_dep RegisterFile_Multi_Banked_00.prj RegisterFile_Multi_Banked_00_bank_Pack.vhdl RegisterFile_Multi_Banked_00_bank.vhdl RegisterFile_Multi_Banked_00_Pack.vhdl RegisterFile_Multi_Banked_00_select_3_ports_Pack.vhdl RegisterFile_Multi_Banked_00_select_3_ports.vhdl RegisterFile_Multi_Banked_00.vhdl 6 6 7 7 # RegisterFile_Multi_Banked_01 8 8 target_dep all RegisterFile_Multi_Banked_01.ngc 9 9 target_dep RegisterFile_Multi_Banked_01.ngc RegisterFile_Multi_Banked_01.prj 10 target_dep RegisterFile_Multi_Banked_01.prj RegisterFile_Multi_Banked_01_bank_Pack.vhdl RegisterFile_Multi_Banked_01_bank.vhdl RegisterFile_Multi_Banked_01_Pack.vhdl RegisterFile_Multi_Banked_01_select_ 6_ports_Pack.vhdl RegisterFile_Multi_Banked_01_select_6_ports.vhdl RegisterFile_Multi_Banked_01.vhdl10 target_dep RegisterFile_Multi_Banked_01.prj RegisterFile_Multi_Banked_01_bank_Pack.vhdl RegisterFile_Multi_Banked_01_bank.vhdl RegisterFile_Multi_Banked_01_Pack.vhdl RegisterFile_Multi_Banked_01_select_3_ports_Pack.vhdl RegisterFile_Multi_Banked_01_select_3_ports.vhdl RegisterFile_Multi_Banked_01.vhdl 11 11 12 12 # RegisterFile_Multi_Banked_02 13 13 target_dep all RegisterFile_Multi_Banked_02.ngc 14 14 target_dep RegisterFile_Multi_Banked_02.ngc RegisterFile_Multi_Banked_02.prj 15 target_dep RegisterFile_Multi_Banked_02.prj RegisterFile_Multi_Banked_02_bank_Pack.vhdl RegisterFile_Multi_Banked_02_bank.vhdl RegisterFile_Multi_Banked_02_Pack.vhdl RegisterFile_Multi_Banked_02_select_ 1_ports_Pack.vhdl RegisterFile_Multi_Banked_02_select_1_ports.vhdl RegisterFile_Multi_Banked_02_select_2_ports_Pack.vhdl RegisterFile_Multi_Banked_02_select_2_ports.vhdl RegisterFile_Multi_Banked_02.vhdl15 target_dep RegisterFile_Multi_Banked_02.prj RegisterFile_Multi_Banked_02_bank_Pack.vhdl RegisterFile_Multi_Banked_02_bank.vhdl RegisterFile_Multi_Banked_02_Pack.vhdl RegisterFile_Multi_Banked_02_select_4_ports_Pack.vhdl RegisterFile_Multi_Banked_02_select_4_ports.vhdl RegisterFile_Multi_Banked_02.vhdl 16 16 17 17 # RegisterFile_Multi_Banked_03 18 18 target_dep all RegisterFile_Multi_Banked_03.ngc 19 19 target_dep RegisterFile_Multi_Banked_03.ngc RegisterFile_Multi_Banked_03.prj 20 target_dep RegisterFile_Multi_Banked_03.prj RegisterFile_Multi_Banked_03_bank_Pack.vhdl RegisterFile_Multi_Banked_03_bank.vhdl RegisterFile_Multi_Banked_03_Pack.vhdl RegisterFile_Multi_Banked_03_select_ 2_ports_Pack.vhdl RegisterFile_Multi_Banked_03_select_2_ports.vhdl RegisterFile_Multi_Banked_03.vhdl20 target_dep RegisterFile_Multi_Banked_03.prj RegisterFile_Multi_Banked_03_bank_Pack.vhdl RegisterFile_Multi_Banked_03_bank.vhdl RegisterFile_Multi_Banked_03_Pack.vhdl RegisterFile_Multi_Banked_03_select_4_ports_Pack.vhdl RegisterFile_Multi_Banked_03_select_4_ports.vhdl RegisterFile_Multi_Banked_03.vhdl 21 21 22 22 # RegisterFile_Multi_Banked_04 23 23 target_dep all RegisterFile_Multi_Banked_04.ngc 24 24 target_dep RegisterFile_Multi_Banked_04.ngc RegisterFile_Multi_Banked_04.prj 25 target_dep RegisterFile_Multi_Banked_04.prj RegisterFile_Multi_Banked_04_bank_Pack.vhdl RegisterFile_Multi_Banked_04_bank.vhdl RegisterFile_Multi_Banked_04_Pack.vhdl RegisterFile_Multi_Banked_04_select_ 1_ports_Pack.vhdl RegisterFile_Multi_Banked_04_select_1_ports.vhdl RegisterFile_Multi_Banked_04_select_2_ports_Pack.vhdl RegisterFile_Multi_Banked_04_select_2_ports.vhdl RegisterFile_Multi_Banked_04.vhdl25 target_dep RegisterFile_Multi_Banked_04.prj RegisterFile_Multi_Banked_04_bank_Pack.vhdl RegisterFile_Multi_Banked_04_bank.vhdl RegisterFile_Multi_Banked_04_Pack.vhdl RegisterFile_Multi_Banked_04_select_6_ports_Pack.vhdl RegisterFile_Multi_Banked_04_select_6_ports.vhdl RegisterFile_Multi_Banked_04.vhdl 26 26 27 27 # RegisterFile_Multi_Banked_05 28 28 target_dep all RegisterFile_Multi_Banked_05.ngc 29 29 target_dep RegisterFile_Multi_Banked_05.ngc RegisterFile_Multi_Banked_05.prj 30 target_dep RegisterFile_Multi_Banked_05.prj RegisterFile_Multi_Banked_05_bank_Pack.vhdl RegisterFile_Multi_Banked_05_bank.vhdl RegisterFile_Multi_Banked_05_Pack.vhdl RegisterFile_Multi_Banked_05_select_ 12_ports_Pack.vhdl RegisterFile_Multi_Banked_05_select_12_ports.vhdl RegisterFile_Multi_Banked_05_select_6_ports_Pack.vhdl RegisterFile_Multi_Banked_05_select_6_ports.vhdl RegisterFile_Multi_Banked_05.vhdl30 target_dep RegisterFile_Multi_Banked_05.prj RegisterFile_Multi_Banked_05_bank_Pack.vhdl RegisterFile_Multi_Banked_05_bank.vhdl RegisterFile_Multi_Banked_05_Pack.vhdl RegisterFile_Multi_Banked_05_select_2_ports_Pack.vhdl RegisterFile_Multi_Banked_05_select_2_ports.vhdl RegisterFile_Multi_Banked_05.vhdl 31 31 32 32 # RegisterFile_Multi_Banked_06 33 33 target_dep all RegisterFile_Multi_Banked_06.ngc 34 34 target_dep RegisterFile_Multi_Banked_06.ngc RegisterFile_Multi_Banked_06.prj 35 target_dep RegisterFile_Multi_Banked_06.prj RegisterFile_Multi_Banked_06_bank_Pack.vhdl RegisterFile_Multi_Banked_06_bank.vhdl RegisterFile_Multi_Banked_06_Pack.vhdl RegisterFile_Multi_Banked_06_select_ 3_ports_Pack.vhdl RegisterFile_Multi_Banked_06_select_3_ports.vhdl RegisterFile_Multi_Banked_06.vhdl35 target_dep RegisterFile_Multi_Banked_06.prj RegisterFile_Multi_Banked_06_bank_Pack.vhdl RegisterFile_Multi_Banked_06_bank.vhdl RegisterFile_Multi_Banked_06_Pack.vhdl RegisterFile_Multi_Banked_06_select_6_ports_Pack.vhdl RegisterFile_Multi_Banked_06_select_6_ports.vhdl RegisterFile_Multi_Banked_06.vhdl 36 36 37 37 # RegisterFile_Multi_Banked_07 38 38 target_dep all RegisterFile_Multi_Banked_07.ngc 39 39 target_dep RegisterFile_Multi_Banked_07.ngc RegisterFile_Multi_Banked_07.prj 40 target_dep RegisterFile_Multi_Banked_07.prj RegisterFile_Multi_Banked_07_bank_Pack.vhdl RegisterFile_Multi_Banked_07_bank.vhdl RegisterFile_Multi_Banked_07_Pack.vhdl RegisterFile_Multi_Banked_07_select_ 2_ports_Pack.vhdl RegisterFile_Multi_Banked_07_select_2_ports.vhdl RegisterFile_Multi_Banked_07.vhdl40 target_dep RegisterFile_Multi_Banked_07.prj RegisterFile_Multi_Banked_07_bank_Pack.vhdl RegisterFile_Multi_Banked_07_bank.vhdl RegisterFile_Multi_Banked_07_Pack.vhdl RegisterFile_Multi_Banked_07_select_1_ports_Pack.vhdl RegisterFile_Multi_Banked_07_select_1_ports.vhdl RegisterFile_Multi_Banked_07_select_2_ports_Pack.vhdl RegisterFile_Multi_Banked_07_select_2_ports.vhdl RegisterFile_Multi_Banked_07.vhdl 41 41 42 42 # RegisterFile_Multi_Banked_08 43 43 target_dep all RegisterFile_Multi_Banked_08.ngc 44 44 target_dep RegisterFile_Multi_Banked_08.ngc RegisterFile_Multi_Banked_08.prj 45 target_dep RegisterFile_Multi_Banked_08.prj RegisterFile_Multi_Banked_08_bank_Pack.vhdl RegisterFile_Multi_Banked_08_bank.vhdl RegisterFile_Multi_Banked_08_Pack.vhdl RegisterFile_Multi_Banked_08_select_1 _ports_Pack.vhdl RegisterFile_Multi_Banked_08_select_1_ports.vhdl RegisterFile_Multi_Banked_08_select_2_ports_Pack.vhdl RegisterFile_Multi_Banked_08_select_2_ports.vhdl RegisterFile_Multi_Banked_08.vhdl45 target_dep RegisterFile_Multi_Banked_08.prj RegisterFile_Multi_Banked_08_bank_Pack.vhdl RegisterFile_Multi_Banked_08_bank.vhdl RegisterFile_Multi_Banked_08_Pack.vhdl RegisterFile_Multi_Banked_08_select_11_ports_Pack.vhdl RegisterFile_Multi_Banked_08_select_11_ports.vhdl RegisterFile_Multi_Banked_08_select_22_ports_Pack.vhdl RegisterFile_Multi_Banked_08_select_22_ports.vhdl RegisterFile_Multi_Banked_08.vhdl 46 46 47 47 # RegisterFile_Multi_Banked_09 48 48 target_dep all RegisterFile_Multi_Banked_09.ngc 49 49 target_dep RegisterFile_Multi_Banked_09.ngc RegisterFile_Multi_Banked_09.prj 50 target_dep RegisterFile_Multi_Banked_09.prj RegisterFile_Multi_Banked_09_bank_Pack.vhdl RegisterFile_Multi_Banked_09_bank.vhdl RegisterFile_Multi_Banked_09_Pack.vhdl RegisterFile_Multi_Banked_09_select_ 6_ports_Pack.vhdl RegisterFile_Multi_Banked_09_select_6_ports.vhdl RegisterFile_Multi_Banked_09.vhdl50 target_dep RegisterFile_Multi_Banked_09.prj RegisterFile_Multi_Banked_09_bank_Pack.vhdl RegisterFile_Multi_Banked_09_bank.vhdl RegisterFile_Multi_Banked_09_Pack.vhdl RegisterFile_Multi_Banked_09_select_2_ports_Pack.vhdl RegisterFile_Multi_Banked_09_select_2_ports.vhdl RegisterFile_Multi_Banked_09_select_3_ports_Pack.vhdl RegisterFile_Multi_Banked_09_select_3_ports.vhdl RegisterFile_Multi_Banked_09_select_4_ports_Pack.vhdl RegisterFile_Multi_Banked_09_select_4_ports.vhdl RegisterFile_Multi_Banked_09.vhdl 51 51 52 52 # RegisterFile_Multi_Banked_10 53 53 target_dep all RegisterFile_Multi_Banked_10.ngc 54 54 target_dep RegisterFile_Multi_Banked_10.ngc RegisterFile_Multi_Banked_10.prj 55 target_dep RegisterFile_Multi_Banked_10.prj RegisterFile_Multi_Banked_10_bank_Pack.vhdl RegisterFile_Multi_Banked_10_bank.vhdl RegisterFile_Multi_Banked_10_Pack.vhdl RegisterFile_Multi_Banked_10_select_ 3_ports_Pack.vhdl RegisterFile_Multi_Banked_10_select_3_ports.vhdl RegisterFile_Multi_Banked_10.vhdl55 target_dep RegisterFile_Multi_Banked_10.prj RegisterFile_Multi_Banked_10_bank_Pack.vhdl RegisterFile_Multi_Banked_10_bank.vhdl RegisterFile_Multi_Banked_10_Pack.vhdl RegisterFile_Multi_Banked_10_select_11_ports_Pack.vhdl RegisterFile_Multi_Banked_10_select_11_ports.vhdl RegisterFile_Multi_Banked_10.vhdl 56 56 57 # RegisterFile_Multi_Banked_11 58 target_dep all RegisterFile_Multi_Banked_11.ngc 59 target_dep RegisterFile_Multi_Banked_11.ngc RegisterFile_Multi_Banked_11.prj 60 target_dep RegisterFile_Multi_Banked_11.prj RegisterFile_Multi_Banked_11_bank_Pack.vhdl RegisterFile_Multi_Banked_11_bank.vhdl RegisterFile_Multi_Banked_11_Pack.vhdl RegisterFile_Multi_Banked_11_select_1_ports_Pack.vhdl RegisterFile_Multi_Banked_11_select_1_ports.vhdl RegisterFile_Multi_Banked_11_select_2_ports_Pack.vhdl RegisterFile_Multi_Banked_11_select_2_ports.vhdl RegisterFile_Multi_Banked_11.vhdl 61 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Common
r130 r138 29 29 DIR_INC = include 30 30 DIR_SRC = src 31 DIR_OBJ = $(DIR_TMP)/obj 32 DIR_LIB = $(MORPHEO_PREFIX)/lib 31 DIR_OBJ = $(DIR_TMP)/obj/$(MORPHEO_TYPE) 32 DIR_LIB = $(MORPHEO_PREFIX)/lib/$(MORPHEO_TYPE) 33 33 DIR_SCRIPT = $(MORPHEO_SCRIPT) 34 34 … … 49 49 50 50 #-----[ Variable ]----------------------------------------- 51 PREFIX_OBJ = $(ENTITY)_ 51 52 #OBJECTS_COMMON = $(patsubst $(DIR_SRC)/%.cpp,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SRC)/*.cpp)) 52 53 SOURCES = $(wildcard $(DIR_SRC)/*.cpp) 53 OBJECTS_COMMON = $(addprefix $(DIR_OBJ)/$( ENTITY)_, $(addsuffix .o, $(basename $(notdir $(SOURCES)))))54 OBJECTS_COMMON = $(addprefix $(DIR_OBJ)/$(PREFIX_OBJ), $(addsuffix .o, $(basename $(notdir $(SOURCES))))) 54 55 55 56 HEADERS = $(wildcard $(DIR_INC)/*.h) 56 57 57 58 #-----[ Rules ]-------------------------------------------- 58 .PRECIOUS : $(DIR_OBJ)/$( ENTITY)_%.o59 .PRECIOUS : $(DIR_OBJ)/$(PREFIX_OBJ)%.o 59 60 60 61 test_env : 61 62 @$(ECHO) "-------------------| $(ENTITY)" 62 63 63 $(DIR_OBJ)/$( ENTITY)_%.o: $(DIR_SRC)/%.cpp $(HEADERS)64 $(DIR_OBJ)/$(PREFIX_OBJ)%.o : $(DIR_SRC)/%.cpp $(HEADERS) 64 65 @\ 65 66 $(ECHO) "Compilation : $*";\ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.deps
r97 r138 23 23 -lCommon 24 24 25 26 25 Behavioural_DIR_LIBRARY = -L$(Behavioural_DIR)/lib \ 27 26 -L$(Common_DIR)/lib -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.mkf
r137 r138 6 6 7 7 _Generic/Queue/SelfTest: 8 make all -C Generic/Queue/SelfTest8 gmake all -C Generic/Queue/SelfTest 9 9 10 10 _Generic/RegisterFile/RegisterFile_Monolithic/SelfTest: 11 make all -C Generic/RegisterFile/RegisterFile_Monolithic/SelfTest11 gmake all -C Generic/RegisterFile/RegisterFile_Monolithic/SelfTest 12 12 13 13 _Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest: 14 make all -C Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest14 gmake all -C Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest 15 15 16 16 clean: 17 make clean -C Generic/Queue/SelfTest18 make clean -C Generic/RegisterFile/RegisterFile_Monolithic/SelfTest19 make clean -C Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest17 gmake clean -C Generic/Queue/SelfTest 18 gmake clean -C Generic/RegisterFile/RegisterFile_Monolithic/SelfTest 19 gmake clean -C Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest 20 20 21 21 re: clean all 22 22 23 23 install: 24 make install -C Generic/Queue/SelfTest25 make install -C Generic/RegisterFile/RegisterFile_Monolithic/SelfTest26 make install -C Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest24 gmake install -C Generic/Queue/SelfTest 25 gmake install -C Generic/RegisterFile/RegisterFile_Monolithic/SelfTest 26 gmake install -C Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest 27 27 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component.sh
r113 r138 1 #!/bin/ sh1 #!/bin/bash 2 2 3 3 SED_SCRIPT=".sed_script"; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component.cpp
r88 r138 62 62 #endif 63 63 64 #if def SYSTEMC64 #if defined(SYSTEMC) and (defined(STATISTICS) or defined(VHDL_TESTBENCH)) 65 65 if (usage_is_set(_usage,USE_SYSTEMC)) 66 66 { … … 74 74 // List dependency information 75 75 # endif 76 76 } 77 77 #endif 78 }79 78 log_end(@COMPONENT,FUNCTION); 80 79 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h
r137 r138 143 143 } 144 144 } 145 #endif 145 146 146 147 #undef FUNCTION … … 184 185 log_printf(FUNC,Behavioural,FUNCTION,"End"); 185 186 } 186 #endif 187 188 189 #undef FUNCTION 190 #define FUNCTION "Signal::alloc" 191 void dealloc (void) 192 { 193 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 194 195 switch (_direction) 196 { 197 case INTERNAL : 198 switch (_type_info) 199 { 200 case BOOL : delete (static_cast<sc_signal <bool > *>(_sc_signal_map)); break; 201 case UINT8_T : delete (static_cast<sc_signal <uint8_t > *>(_sc_signal_map)); break; 202 case UINT16_T : delete (static_cast<sc_signal <uint16_t> *>(_sc_signal_map)); break; 203 case UINT32_T : delete (static_cast<sc_signal <uint32_t> *>(_sc_signal_map)); break; 204 case UINT64_T : delete (static_cast<sc_signal <uint64_t> *>(_sc_signal_map)); break; 205 default : throw (ErrorMorpheo ("Signal \""+_name+"\" : type unknow.\n")); 206 } 207 default : throw (ErrorMorpheo ("Signal \""+_name+"\" : invalid direction.\n")); 208 209 210 } 211 212 log_printf(FUNC,Behavioural,FUNCTION,"End"); 213 } 187 214 188 215 #ifdef VHDL -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Simulation.h
r124 r138 19 19 namespace behavioural { 20 20 21 typedef enum 22 { 23 ALL_THREAD, 24 EACH_THREAD_AND_CONTINUE, 25 EACH_THREAD_AND_STOP 26 } stop_type_t; 27 21 28 extern bool _simulation_stop_exception; 22 29 extern double _simulation_nb_cycle; 23 30 extern double _simulation_nb_instruction; 24 31 extern std::vector<double> _simulation_nb_instruction_commited; 32 extern stop_type_t _simulation_stop_type; 25 33 extern bool _simulation_file_with_date; 26 34 extern bool _simulation_file_with_pid ; … … 29 37 30 38 bool simulation_test_end (void); 31 void simulation_init (double nb_cycle, 32 double denug_nb_cycle, 33 double nb_instruction, 34 bool file_with_date, 35 bool file_with_pid); 39 void simulation_init (double nb_cycle, 40 double denug_nb_cycle, 41 double nb_instruction, 42 stop_type_t stop_type, 43 bool file_with_date, 44 bool file_with_pid); 36 45 }; // end namespace behavioural 46 47 template<> inline std::string toString<morpheo::behavioural::stop_type_t>(const morpheo::behavioural::stop_type_t& x) 48 { 49 switch (x) 50 { 51 case morpheo::behavioural::ALL_THREAD : return "all_thread"; break; 52 case morpheo::behavioural::EACH_THREAD_AND_CONTINUE : return "each_thread_and_continue"; break; 53 case morpheo::behavioural::EACH_THREAD_AND_STOP : return "each_thread_and_stop"; break; 54 default : return ""; break; 55 } 56 }; 57 58 template<> inline morpheo::behavioural::stop_type_t fromString<morpheo::behavioural::stop_type_t>(const std::string& x) 59 { 60 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::ALL_THREAD))) == 0) or 61 (x.compare(toString( morpheo::behavioural::ALL_THREAD )) == 0)) 62 return morpheo::behavioural::ALL_THREAD; 63 64 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::EACH_THREAD_AND_CONTINUE))) == 0) or 65 (x.compare(toString( morpheo::behavioural::EACH_THREAD_AND_CONTINUE )) == 0)) 66 return morpheo::behavioural::EACH_THREAD_AND_CONTINUE; 67 68 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::EACH_THREAD_AND_STOP))) == 0) or 69 (x.compare(toString( morpheo::behavioural::EACH_THREAD_AND_STOP )) == 0)) 70 return morpheo::behavioural::EACH_THREAD_AND_STOP; 71 72 throw (ERRORMORPHEO ("fromString","Unknow string : \""+x+"\"")); 73 }; 74 37 75 }; // end namespace morpheo 38 76 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Stat.h
r124 r138 49 49 private: const cycle_t _period; 50 50 private: const bool _save_periodic; 51 private: bool _generate_file; 52 51 53 // Tableau des variables 52 54 private: std::map<std::string, var_t> * _list_operand; 53 55 // Liste chaîné des expressions 54 56 private: std::list<expr_t> * _list_expr; 57 // List chaîné des "counters" (seulement pour la désallocation) 58 private: std::list<counters_t*> * _list_counters; 55 59 56 60 private: counter_t * _cycle; 57 61 58 62 private: std::list<Stat *> * _list_stat; 59 60 private: bool _generate_file;61 63 62 64 public : Stat (std::string name_instance, … … 73 75 std::string unit, 74 76 std::string description); 77 public : counters_t * create_counters (std::string varname, 78 uint32_t nb_counter, 79 std::string unit, 80 std::string description_counter, // need one %d 81 std::string description_percent, // need one %d 82 std::string description_average); 75 83 private : counter_t * alloc_operand (counter_type_t type, 76 84 std::string varname, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Stat_type.h
r81 r138 6 6 #include <map> 7 7 #include <utility> 8 #include <cassert> 8 9 9 10 namespace morpheo { … … 19 20 //typedef std::pair<std::string, operator_t> pair_string_operator_t; 20 21 22 class counters_t 23 { 24 private : const uint32_t _nb_counter; 25 private : counter_t ** _counter; 26 27 public : counters_t (uint32_t nb_counter): 28 _nb_counter (nb_counter+1) 29 { 30 assert(nb_counter>0); 31 32 _counter = new counter_t * [_nb_counter]; 33 } 34 35 // public : counters_t (const counters_t & x): 36 // _nb_counter (x._nb_counter) 37 // { 38 // _counter = new counter_t [_nb_counter]; 39 40 // for (uint32_t i=0; i<_nb_counter; ++i) 41 // _counter[i] = x._counter[i]; 42 // } 43 44 public : ~counters_t (void) 45 { 46 delete [] _counter; 47 } 48 49 public : void set_counter (counter_t * counter, 50 uint32_t index) 51 { 52 assert((index >= 0) and (index < _nb_counter)); 53 54 _counter [index] = counter; 55 } 56 57 // public : friend const counters_t operator+ (const counters_t & left, 58 // const uint32_t right) 59 // { 60 // assert((right >= 0) and (right <= left._nb_counter)); 61 62 // counters_t tmp=left; 63 64 // tmp._counter[right] ++; 65 66 // return tmp; 67 // } 68 69 public : const counters_t & operator+= (const uint32_t value) 70 { 71 assert((value >= 0) and (value <= _nb_counter)); 72 73 (*_counter[value]) ++; 74 75 return *this; 76 } 77 78 }; 79 21 80 }; 22 81 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Types.h
r128 r138 172 172 template<> inline morpheo::behavioural::Tpriority_t fromString<morpheo::behavioural::Tpriority_t>(const std::string& x) 173 173 { 174 if ( 175 (x.compare("priority_static")== 0))174 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PRIORITY_STATIC))) == 0) or 175 (x.compare(toString( morpheo::behavioural::PRIORITY_STATIC )) == 0)) 176 176 return morpheo::behavioural::PRIORITY_STATIC; 177 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PRIORITY_ROUND_ROBIN))) == 0) or 178 (x.compare("priority_round_robin") == 0)) 177 178 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PRIORITY_ROUND_ROBIN))) == 0) or 179 (x.compare(toString( morpheo::behavioural::PRIORITY_ROUND_ROBIN )) == 0)) 179 180 return morpheo::behavioural::PRIORITY_ROUND_ROBIN; 181 180 182 throw (ERRORMORPHEO ("fromString","Unknow string : \""+x+"\"")); 181 183 }; … … 193 195 template<> inline morpheo::behavioural::Tload_balancing_t fromString<morpheo::behavioural::Tload_balancing_t>(const std::string& x) 194 196 { 195 if ( 196 (x.compare("load_balancing_balance") == 0))197 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::LOAD_BALANCING_BALANCE))) == 0) or 198 (x.compare(toString( morpheo::behavioural::LOAD_BALANCING_BALANCE )) == 0)) 197 199 return morpheo::behavioural::LOAD_BALANCING_BALANCE; 198 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::LOAD_BALANCING_MAXIMUM_FOR_PRIORITY))) == 0) or 199 (x.compare("load_balancing_maximum_for_priority") == 0)) 200 201 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::LOAD_BALANCING_MAXIMUM_FOR_PRIORITY))) == 0) or 202 (x.compare(toString( morpheo::behavioural::LOAD_BALANCING_MAXIMUM_FOR_PRIORITY )) == 0)) 200 203 return morpheo::behavioural::LOAD_BALANCING_MAXIMUM_FOR_PRIORITY; 204 201 205 throw (ERRORMORPHEO ("fromString","Unknow string : \""+x+"\"")); 202 206 }; … … 218 222 template<> inline morpheo::behavioural::Tvictim_t fromString<morpheo::behavioural::Tvictim_t>(const std::string& x) 219 223 { 220 if ( 221 (x.compare("victim_random")== 0))224 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::VICTIM_RANDOM ))) == 0) or 225 (x.compare(toString( morpheo::behavioural::VICTIM_RANDOM )) == 0)) 222 226 return morpheo::behavioural::VICTIM_RANDOM; 223 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::VICTIM_ROUND_ROBIN))) == 0) or 224 (x.compare("victim_round_robin") == 0)) 227 228 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::VICTIM_ROUND_ROBIN))) == 0) or 229 (x.compare(toString( morpheo::behavioural::VICTIM_ROUND_ROBIN )) == 0)) 225 230 return morpheo::behavioural::VICTIM_ROUND_ROBIN; 226 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::VICTIM_NLU ))) == 0) or 227 (x.compare("victim_nlu") == 0)) 231 232 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::VICTIM_NLU ))) == 0) or 233 (x.compare(toString( morpheo::behavioural::VICTIM_NLU )) == 0)) 228 234 return morpheo::behavioural::VICTIM_NLU; 229 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::VICTIM_PSEUDO_LRU ))) == 0) or 230 (x.compare("victim_pseudo_lru") == 0)) 235 236 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::VICTIM_PSEUDO_LRU ))) == 0) or 237 (x.compare(toString( morpheo::behavioural::VICTIM_PSEUDO_LRU )) == 0)) 231 238 return morpheo::behavioural::VICTIM_PSEUDO_LRU; 232 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::VICTIM_LRU ))) == 0) or 233 (x.compare("victim_lru") == 0)) 239 240 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::VICTIM_LRU ))) == 0) or 241 (x.compare(toString( morpheo::behavioural::VICTIM_LRU )) == 0)) 234 242 return morpheo::behavioural::VICTIM_LRU; 235 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::VICTIM_FIFO ))) == 0) or 236 (x.compare("victim_fifo") == 0)) 243 244 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::VICTIM_FIFO ))) == 0) or 245 (x.compare(toString( morpheo::behavioural::VICTIM_FIFO )) == 0)) 237 246 return morpheo::behavioural::VICTIM_FIFO; 247 238 248 throw (ERRORMORPHEO ("fromString","Unknow string : \""+x+"\"")); 239 249 }; … … 258 268 template<> inline morpheo::behavioural::Tpredictor_t fromString<morpheo::behavioural::Tpredictor_t>(const std::string& x) 259 269 { 260 if ( 261 (x.compare("predictor_never_take")== 0))270 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_NEVER_TAKE ))) == 0) or 271 (x.compare(toString( morpheo::behavioural::PREDICTOR_NEVER_TAKE )) == 0)) 262 272 return morpheo::behavioural::PREDICTOR_NEVER_TAKE; 263 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_ALWAYS_TAKE))) == 0) or 264 (x.compare("predictor_always_take") == 0)) 273 274 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_ALWAYS_TAKE))) == 0) or 275 (x.compare(toString( morpheo::behavioural::PREDICTOR_ALWAYS_TAKE )) == 0)) 265 276 return morpheo::behavioural::PREDICTOR_ALWAYS_TAKE; 266 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_STATIC ))) == 0) or 267 (x.compare("predictor_static") == 0)) 277 278 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_STATIC ))) == 0) or 279 (x.compare(toString( morpheo::behavioural::PREDICTOR_STATIC )) == 0)) 268 280 return morpheo::behavioural::PREDICTOR_STATIC; 269 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_LAST_TAKE ))) == 0) or 270 (x.compare("predictor_last_take") == 0)) 281 282 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_LAST_TAKE ))) == 0) or 283 (x.compare(toString( morpheo::behavioural::PREDICTOR_LAST_TAKE )) == 0)) 271 284 return morpheo::behavioural::PREDICTOR_LAST_TAKE; 272 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_COUNTER ))) == 0) or 273 (x.compare("predictor_counter") == 0)) 285 286 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_COUNTER ))) == 0) or 287 (x.compare(toString( morpheo::behavioural::PREDICTOR_COUNTER )) == 0)) 274 288 return morpheo::behavioural::PREDICTOR_COUNTER; 275 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_LOCAL ))) == 0) or 276 (x.compare("predictor_local") == 0)) 289 290 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_LOCAL ))) == 0) or 291 (x.compare(toString( morpheo::behavioural::PREDICTOR_LOCAL )) == 0)) 277 292 return morpheo::behavioural::PREDICTOR_LOCAL; 278 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_GLOBAL ))) == 0) or 279 (x.compare("predictor_global") == 0)) 293 294 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_GLOBAL ))) == 0) or 295 (x.compare(toString( morpheo::behavioural::PREDICTOR_GLOBAL )) == 0)) 280 296 return morpheo::behavioural::PREDICTOR_GLOBAL; 281 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_META ))) == 0) or 282 (x.compare("predictor_meta") == 0)) 297 298 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_META ))) == 0) or 299 (x.compare(toString( morpheo::behavioural::PREDICTOR_META )) == 0)) 283 300 return morpheo::behavioural::PREDICTOR_META; 284 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_CUSTOM ))) == 0) or 285 (x.compare("predictor_custom") == 0)) 301 302 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_CUSTOM ))) == 0) or 303 (x.compare(toString( morpheo::behavioural::PREDICTOR_CUSTOM )) == 0)) 286 304 return morpheo::behavioural::PREDICTOR_CUSTOM; 305 287 306 throw (ERRORMORPHEO ("fromString","Unknow string : \""+x+"\"")); 288 307 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Debug_signal.cpp
r137 r138 38 38 void debug_signal::print (void) 39 39 { 40 msg ("List of access signal\n");40 msgInformation("List of access signal\n"); 41 41 for (std::list<std::string>::iterator it = _signal_access.begin(); 42 42 it != _signal_access.end(); 43 43 ++ it) 44 44 { 45 msg (" * %s\n",(*it).c_str());45 msgInformation(" * %s\n",(*it).c_str()); 46 46 } 47 47 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface.cpp
r135 r138 77 77 if ((_usage & USE_SYSTEMC) and 78 78 ((*it)->get_direction() == INTERNAL)) 79 delete (*it)->get_sc_signal();79 (*it)->dealloc(); 80 80 delete (*it); 81 81 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Simulation.cpp
r124 r138 18 18 double _simulation_nb_instruction; 19 19 std::vector<double> _simulation_nb_instruction_commited; 20 stop_type_t _simulation_stop_type; 20 21 bool _simulation_file_with_date; 21 22 bool _simulation_file_with_pid ; … … 23 24 Model _model; 24 25 25 void simulation_init (double nb_cycle, 26 double debug_nb_cycle, 27 double nb_instruction, 28 bool file_with_date, 29 bool file_with_pid ) 26 void simulation_init (double nb_cycle, 27 double debug_nb_cycle, 28 double nb_instruction, 29 stop_type_t stop_type, 30 bool file_with_date, 31 bool file_with_pid ) 30 32 { 31 33 if (not simulation_initialized) … … 44 46 _simulation_nb_instruction = nb_instruction; 45 47 // _simulation_nb_instruction_commited = new std::vector<double>; 48 _simulation_stop_type = stop_type; 46 49 _simulation_file_with_date = file_with_date; 47 50 _simulation_file_with_pid = file_with_pid ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Simulation_test_end.cpp
r124 r138 35 35 { 36 36 end_inst = true; 37 std::vector<double>::iterator it=_simulation_nb_instruction_commited.begin(); 37 38 38 std::vector<double>::iterator it=_simulation_nb_instruction_commited.begin(); 39 40 // Scan all context and test if all can finish 41 while (end_inst and it!=_simulation_nb_instruction_commited.end()) 39 switch (_simulation_stop_type) 42 40 { 43 end_inst &= (_simulation_nb_instruction <= *it); 44 it ++; 41 case ALL_THREAD : 42 { 43 double sum_inst = 0; 44 45 // Scan all context and test if all can finish 46 while (it!=_simulation_nb_instruction_commited.end()) 47 { 48 sum_inst += *it; 49 it ++; 50 } 51 52 // Stop if sum of all instruction is higher of "simulation_nb_instruction" 53 end_inst &= (_simulation_nb_instruction <= sum_inst); 54 55 break; 56 } 57 case EACH_THREAD_AND_CONTINUE : 58 case EACH_THREAD_AND_STOP : 59 { 60 // Scan all context and test if all can finish 61 while (end_inst and it!=_simulation_nb_instruction_commited.end()) 62 { 63 64 // Stop if all thread have executed more that "simulation_nb_instruction" instructions. 65 end_inst &= (_simulation_nb_instruction <= *it); 66 it ++; 67 } 68 break; 69 } 45 70 } 46 71 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat.cpp
r124 r138 14 14 _save_periodic (_period>0) 15 15 { 16 _generate_file = true; 17 16 18 _list_operand = new std::map<std::string, var_t>; 17 19 _list_expr = new std::list<expr_t>; 18 20 _list_stat = new std::list<Stat *>; 21 _list_counters = new std::list<counters_t *>; 19 22 20 23 _cycle = create_variable("cycle"); 21 24 // _cycle = create_counter("cycle","",""); 22 25 *_cycle = 0; // for the first period 23 24 _generate_file = true;25 26 } 26 27 … … 35 36 _save_periodic (period>0) 36 37 { 38 _generate_file = true; 39 37 40 _list_operand = new std::map<std::string, var_t>; 38 41 _list_expr = new std::list<expr_t>; 39 42 _list_stat = new std::list<Stat *>; 43 _list_counters = new std::list<counters_t *>; 40 44 41 45 _cycle = create_variable("cycle"); 42 46 // _cycle = create_counter("cycle","",""); 43 47 *_cycle = 0; // for the first period 44 45 _generate_file = true;46 48 } 47 49 … … 68 70 } 69 71 delete _list_expr; 72 73 // parcourir la liste et desallouer les arbres 74 for (std::list<counters_t*>::iterator i=_list_counters->begin(); 75 i!= _list_counters->end(); 76 ++i) 77 { 78 delete *i; 79 } 80 delete _list_counters; 81 70 82 delete _list_stat; 71 83 }
Note: See TracChangeset
for help on using the changeset viewer.