- Timestamp:
- May 16, 2009, 4:42:39 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Parameters.cpp
r115 r117 107 107 uint32_t * nb_reg_free ,//[nb_rename_bloc] 108 108 uint32_t * nb_rename_unit_bank ,//[nb_rename_bloc] 109 // 109 //uint32_t * size_read_counter ,//[nb_rename_bloc] 110 110 111 111 // Read bloc … … 173 173 uint32_t nb_ooo_engine , 174 174 uint32_t * nb_rename_unit ,//[nb_ooo_engine] 175 uint32_t * nb_inst_issue 175 uint32_t * nb_inst_issue_slot ,//[nb_ooo_engine] 176 176 uint32_t * nb_inst_reexecute ,//[nb_ooo_engine] 177 177 uint32_t * nb_inst_commit ,//[nb_ooo_engine] … … 217 217 uint32_t * link_decod_bloc_with_thread ,//[nb_thread] 218 218 uint32_t * link_rename_bloc_with_front_end ,//[nb_front_end] 219 bool *** table_dispatch ,//[nb_ooo_engine][nb_inst_issue ][nb_read_bloc]219 bool *** table_dispatch ,//[nb_ooo_engine][nb_inst_issue_slot][nb_read_bloc] 220 220 bool ** link_read_bloc_and_load_store_unit ,//[nb_read_bloc][nb_load_store_unit] 221 221 bool ** link_read_bloc_and_functionnal_unit ,//[nb_read_bloc][nb_functionnal_unit] … … 319 319 _nb_ooo_engine = nb_ooo_engine ; 320 320 _nb_rename_unit = nb_rename_unit ; 321 _nb_inst_issue = nb_inst_issue;321 _nb_inst_issue_slot = nb_inst_issue_slot ; 322 322 _nb_inst_reexecute = nb_inst_reexecute ; 323 323 _nb_inst_commit = nb_inst_commit ; … … 868 868 for (uint32_t i=0; i<_nb_ooo_engine; ++i) 869 869 { 870 for (uint32_t j=0; j<_nb_inst_issue [i]; ++j)870 for (uint32_t j=0; j<_nb_inst_issue_slot[i]; ++j) 871 871 for (uint32_t k=0; k<_nb_read_bloc; ++k) 872 872 { … … 1003 1003 } 1004 1004 1005 ALLOC4(_network_table_dispatch ,bool ,_nb_ooo_engine,_nb_inst_issue [it1],_nb_execute_loop,_nb_read_unit[it3]);1006 ALLOC3(_ooo_engine_table_routing ,bool ,_nb_ooo_engine,_nb_rename_unit[it1],_nb_inst_issue[it1]);1007 ALLOC3(_ooo_engine_table_issue_type ,bool ,_nb_ooo_engine,_nb_inst_issue[it1],_nb_type);1005 ALLOC4(_network_table_dispatch ,bool ,_nb_ooo_engine,_nb_inst_issue_slot[it1],_nb_execute_loop,_nb_read_unit[it3]); 1006 // ALLOC3(_ooo_engine_table_routing ,bool ,_nb_ooo_engine,_nb_rename_unit[it1],_nb_inst_issue_slot[it1]); 1007 // ALLOC3(_ooo_engine_table_issue_type ,bool ,_nb_ooo_engine,_nb_inst_issue_slot[it1],_nb_type); 1008 1008 ALLOC2(_list_functionnal_unit_with_rename_unit ,std::vector<uint32_t>,_nb_ooo_engine,_nb_rename_unit[it1]); 1009 1009 ALLOC2(_list_load_store_unit_with_rename_unit ,std::vector<uint32_t>,_nb_ooo_engine,_nb_rename_unit[it1]); … … 1011 1011 for (uint32_t i=0; i<_nb_ooo_engine; ++i) 1012 1012 { 1013 log_printf(TRACE,Core,FUNCTION,_(" * ooo_engine_table_issue_type [%d]"),i); 1014 1013 // log_printf(TRACE,Core,FUNCTION,_(" * ooo_engine_table_issue_type [%d]"),i); 1015 1014 1016 1015 // Init 1017 for (uint32_t j=0; j<_nb_inst_issue [i]; ++j)1016 for (uint32_t j=0; j<_nb_inst_issue_slot[i]; ++j) 1018 1017 { 1019 1018 for (uint32_t k=0; k<_nb_execute_loop; ++k) 1020 1019 for (uint32_t l=0; l<_nb_read_unit[k]; ++l) 1021 1020 _network_table_dispatch [i][j][k][l] = false; 1022 for (uint32_t k=0; k<_nb_rename_unit[i]; ++k)1023 _ooo_engine_table_routing [i][k][j] = false;1024 for (uint32_t k=0; k<_nb_type; ++k)1025 _ooo_engine_table_issue_type [i][j][k] = false;1021 // for (uint32_t k=0; k<_nb_rename_unit[i]; ++k) 1022 // _ooo_engine_table_routing [i][k][j] = false; 1023 // for (uint32_t k=0; k<_nb_type; ++k) 1024 // _ooo_engine_table_issue_type [i][j][k] = false; 1026 1025 } 1027 1026 1028 std::vector<uint32_t> list_thread_with_inst_issue [_nb_inst_issue [i]];1027 std::vector<uint32_t> list_thread_with_inst_issue [_nb_inst_issue_slot[i]]; 1029 1028 1030 for (uint32_t j=0; j<_nb_inst_issue [i]; ++j)1029 for (uint32_t j=0; j<_nb_inst_issue_slot[i]; ++j) 1031 1030 { 1032 1031 for (uint32_t k=0; k<_nb_read_bloc; ++k) … … 1044 1043 { 1045 1044 // Scan timing table, test if have an instruction 1046 for (uint32_t m=0; m<_nb_type; ++m)1047 for (uint32_t n=0; n<_nb_operation; ++n)1048 if (_timing[l][m][n]._latence > 0)1049 {1050 log_printf(TRACE,Core,FUNCTION,_(" [%d][%d] -> true"),j,m);1045 // for (uint32_t m=0; m<_nb_type; ++m) 1046 // for (uint32_t n=0; n<_nb_operation; ++n) 1047 // if (_timing[l][m][n]._latence > 0) 1048 // { 1049 // log_printf(TRACE,Core,FUNCTION,_(" [%d][%d] -> true"),j,m); 1051 1050 1052 _ooo_engine_table_issue_type [i][j][m] = true;1053 break;1054 }1051 // _ooo_engine_table_issue_type [i][j][m] = true; 1052 // break; 1053 // } 1055 1054 1056 1055 for (uint32_t m=0; m<_nb_thread; ++m) … … 1073 1072 if (_link_read_bloc_and_load_store_unit [k][l]) 1074 1073 { 1075 1074 // _ooo_engine_table_issue_type [i][j][TYPE_MEMORY] = true; 1076 1075 // _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); 1077 1076 // _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); … … 1131 1130 } 1132 1131 1133 uint32_t num_rename_bloc = _link_rename_bloc_with_rename_unit[i][j];1134 1135 for (uint32_t k=0; k<_nb_front_end; ++k)1136 // test if this front_end is connected with this rename_bloc1137 if (_link_rename_bloc_with_front_end[k] == num_rename_bloc)1138 // the front end is connected with rename_bloc. Now test all slot issue that it can accepted this front_end1139 for (uint32_t l=0; l<_nb_inst_issue[i]; ++l)1140 for (std::vector<uint32_t>::iterator it = list_thread_with_inst_issue [l].begin();1141 it != list_thread_with_inst_issue [l].end();1142 ++it)1143 // Test if the this is in front_end [k]1144 if (_link_context_with_thread[*it].first == k)1145 {1146 _ooo_engine_table_routing [i][j][l] |= true;1147 log_printf(TRACE,Core,FUNCTION,_(" [%d][%d] -> true"),j,l);1148 }1132 // uint32_t num_rename_bloc = _link_rename_bloc_with_rename_unit[i][j]; 1133 1134 // for (uint32_t k=0; k<_nb_front_end; ++k) 1135 // // test if this front_end is connected with this rename_bloc 1136 // if (_link_rename_bloc_with_front_end[k] == num_rename_bloc) 1137 // // the front end is connected with rename_bloc. Now test all slot issue that it can accepted this front_end 1138 // for (uint32_t l=0; l<_nb_inst_issue_slot[i]; ++l) 1139 // for (std::vector<uint32_t>::iterator it = list_thread_with_inst_issue [l].begin(); 1140 // it != list_thread_with_inst_issue [l].end(); 1141 // ++it) 1142 // // Test if the this is in front_end [k] 1143 // if (_link_context_with_thread[*it].first == k) 1144 // { 1145 // _ooo_engine_table_routing [i][j][l] |= true; 1146 // log_printf(TRACE,Core,FUNCTION,_(" [%d][%d] -> true"),j,l); 1147 // } 1149 1148 } 1150 1149 } 1151 1150 1152 log_printf(TRACE,Core,FUNCTION,_(" * network_table_dispatch [nb_ooo_engine][nb_inst_issue][nb_execute_loop][nb_read_unit]"));1151 log_printf(TRACE,Core,FUNCTION,_(" * network_table_dispatch [nb_ooo_engine][nb_inst_issue_slot][nb_execute_loop][nb_read_unit]")); 1153 1152 for (uint32_t i=0; i<_nb_ooo_engine; ++i) 1154 for (uint32_t j=0; j<_nb_inst_issue [i]; ++j)1153 for (uint32_t j=0; j<_nb_inst_issue_slot[i]; ++j) 1155 1154 for (uint32_t k=0; k<_nb_execute_loop; ++k) 1156 1155 for (uint32_t l=0; l<_nb_read_unit[k]; ++l) 1157 1156 if (_network_table_dispatch [i][j][k][l] == true) 1158 1157 log_printf(TRACE,Core,FUNCTION,_(" Issue Slot [%d][%d] is connected with Read_unit [%d][%d]"),i,j,k,l); 1158 1159 ALLOC3(_network_table_issue_type,bool,_nb_execute_loop,_nb_read_unit[it1],_nb_type); 1160 1161 log_printf(TRACE,Core,FUNCTION,_(" * network_table_issue_type")); 1162 for (uint32_t i=0; i<_nb_execute_loop; ++i) 1163 for (uint32_t j=0; j<_nb_read_unit[i]; ++j) 1164 { 1165 // init 1166 for (uint32_t t=0; t<_nb_type; ++t) 1167 _network_table_issue_type [i][j][t] = false; 1168 1169 // get number of read bloc 1170 uint32_t num_read_bloc = _link_read_bloc_with_read_unit[i][j]; 1171 1172 // for each functionnal unit : test if the read bloc is connected with the functionnal unit 1173 for (uint32_t k=0; k<_nb_functionnal_unit; ++k) 1174 if (_link_read_bloc_and_functionnal_unit [num_read_bloc][k]) 1175 // Scan timing table, test if have an instruction 1176 for (uint32_t t=0; t<_nb_type; ++t) 1177 for (uint32_t o=0; o<_nb_operation; ++o) 1178 if (_timing[k][t][o]._latence > 0) 1179 { 1180 log_printf(TRACE,Core,FUNCTION,_(" [%d][%d][%d] -> true"),i,j,t); 1181 1182 _network_table_issue_type [i][j][t] = true; 1183 break; // operation 1184 } 1185 1186 // Test load store unit connected with this read bloc 1187 for (uint32_t k=0; k<_nb_load_store_unit; ++k) 1188 // Test load store unit connected with this read bloc 1189 if (_link_read_bloc_and_load_store_unit [num_read_bloc][k]) 1190 { 1191 uint32_t t = TYPE_MEMORY; 1192 1193 log_printf(TRACE,Core,FUNCTION,_(" [%d][%d][%d] -> true"),i,j,t); 1194 1195 _network_table_issue_type [i][j][t] = true; 1196 break; // load_store_unit 1197 } 1198 } 1159 1199 1160 1200 ALLOC2(_ooo_engine_nb_load_store_unit ,uint32_t ,_nb_ooo_engine,_nb_rename_unit[it1]); … … 1787 1827 } 1788 1828 1829 ALLOC1(_issue_queue_in_order,bool,_nb_ooo_engine); 1830 for (uint32_t i=0; i<_nb_ooo_engine; ++i) 1831 _issue_queue_in_order [i] = (_issue_queue_scheme [i] == core::multi_ooo_engine::ooo_engine::issue_queue::ISSUE_QUEUE_SCHEME_IN_ORDER); 1832 1789 1833 // parameters depends 1790 1834 _size_ooo_engine_id = log2(_nb_ooo_engine); … … 1838 1882 for (uint32_t i=0; i<_nb_front_end; ++i) 1839 1883 _param_front_end [i]= new core::multi_front_end::front_end::Parameters 1840 (1884 ( 1841 1885 _nb_context [i], 1842 1886 _nb_decod_unit [i], … … 1877 1921 ); 1878 1922 1923 ALLOC1(_nb_inst_issue_queue,uint32_t,_nb_ooo_engine); 1924 1879 1925 _param_ooo_engine = new core::multi_ooo_engine::ooo_engine::Parameters * [_nb_ooo_engine]; 1880 1926 1881 1927 for (uint32_t i=0; i<_nb_ooo_engine; ++i) 1928 { 1882 1929 _param_ooo_engine [i] = new core::multi_ooo_engine::ooo_engine::Parameters 1883 1930 ( … … 1889 1936 _ooo_engine_nb_inst_insert [i], 1890 1937 _ooo_engine_nb_inst_retire [i], 1891 _nb_inst_issue [i],1938 // _nb_inst_issue [i], 1892 1939 _ooo_engine_nb_inst_execute [i], 1893 1940 _nb_inst_reexecute [i], … … 1910 1957 _issue_priority [i], 1911 1958 _issue_load_balancing [i], 1912 _ooo_engine_table_routing [i],1913 _ooo_engine_table_issue_type [i],1959 // _ooo_engine_table_routing [i], 1960 // _ooo_engine_table_issue_type [i], 1914 1961 _size_reexecute_queue [i], 1915 1962 _reexecute_priority [i], … … 1922 1969 _ooo_engine_nb_reg_free [i], 1923 1970 _ooo_engine_nb_rename_unit_bank [i], 1924 // 1971 // _ooo_engine_size_read_counter [i], 1925 1972 _ooo_engine_nb_load_store_unit [i], 1926 1973 _ooo_engine_size_store_queue [i], … … 1932 1979 _ooo_engine_translate_num_context_to_num_thread[i] 1933 1980 ); 1981 _nb_inst_issue_queue [i] = _param_ooo_engine [i]->_nb_inst_issue; 1982 } 1934 1983 1935 1984 _param_execute_loop = new core::multi_execute_loop::execute_loop::Parameters * [_nb_execute_loop]; … … 2045 2094 _nb_inst_branch_complete ,//[nb_ooo_engine] 2046 2095 _ooo_engine_nb_inst_insert_rob ,//[nb_ooo_engine] 2047 _nb_inst_issue ,//[nb_ooo_engine] 2096 _nb_inst_reexecute ,//[nb_ooo_engine] 2097 _nb_inst_issue_queue ,//[nb_ooo_engine] 2098 _nb_inst_issue_slot ,//[nb_ooo_engine] 2048 2099 _ooo_engine_nb_inst_execute ,//[nb_ooo_engine][ooo_engine_nb_execute_loop] 2100 _issue_queue_in_order ,//[nb_ooo_engine] 2049 2101 _nb_read_unit ,//[nb_execute_loop] 2050 2102 _nb_write_unit ,//[nb_execute_loop] … … 2059 2111 _dispatch_priority , 2060 2112 _dispatch_load_balancing , 2061 _network_table_dispatch ,//[nb_ooo_engine][nb_inst_issue][nb_execute_loop][nb_read_unit] 2113 _network_table_dispatch ,//[nb_ooo_engine][nb_inst_issue_slot][nb_execute_loop][nb_read_unit] 2114 _network_table_issue_type ,// [nb_execute_loop][nb_read_unit][nb_type] 2062 2115 _translate_ooo_engine_num_front_end ,//[nb_ooo_engine][ooo_engine_nb_front_end] 2063 2116 _translate_ooo_engine_num_execute_loop,//[nb_ooo_engine][ooo_engine_nb_execute_loop] 2064 _translate_execute_loop_num_ooo_engine // *[nb_execute_loop][execute_loop_nb_ooo_engine]2117 _translate_execute_loop_num_ooo_engine //[nb_execute_loop][execute_loop_nb_ooo_engine] 2065 2118 ); 2066 2119 … … 2146 2199 DELETE2(_list_load_store_unit_with_rename_unit ,_nb_ooo_engine,_nb_rename_unit[it1]); 2147 2200 DELETE2(_list_functionnal_unit_with_rename_unit ,_nb_ooo_engine,_nb_rename_unit[it1]); 2148 DELETE3(_ooo_engine_table_issue_type ,_nb_ooo_engine,_nb_inst_issue[it1],_nb_type); 2149 DELETE3(_ooo_engine_table_routing ,_nb_ooo_engine,_nb_rename_unit[it1],_nb_inst_issue[it1]); 2150 DELETE4(_network_table_dispatch ,_nb_ooo_engine,_nb_inst_issue[it1],_nb_execute_loop,_nb_read_unit[it3]); 2151 // DELETE2(_ooo_engine_size_read_counter ,_nb_ooo_engine,_nb_rename_unit[it1]); 2201 // DELETE3(_ooo_engine_table_issue_type ,_nb_ooo_engine,_nb_inst_issue_slot[it1],_nb_type); 2202 // DELETE3(_ooo_engine_table_routing ,_nb_ooo_engine,_nb_rename_unit[it1],_nb_inst_issue_slot[it1]); 2203 DELETE3(_network_table_issue_type ,_nb_execute_loop,_nb_read_unit[it1],_nb_type); 2204 DELETE4(_network_table_dispatch ,_nb_ooo_engine,_nb_inst_issue_slot[it1],_nb_execute_loop,_nb_read_unit[it3]); 2205 // DELETE2(_ooo_engine_size_read_counter ,_nb_ooo_engine,_nb_rename_unit[it1]); 2152 2206 DELETE2(_ooo_engine_nb_rename_unit_bank ,_nb_ooo_engine,_nb_rename_unit[it1]); 2153 2207 DELETE2(_ooo_engine_nb_reg_free ,_nb_ooo_engine,_nb_rename_unit[it1]);
Note: See TracChangeset
for help on using the changeset viewer.