Changeset 787 for branches/RWT/modules
- Timestamp:
- Sep 2, 2014, 6:36:27 PM (10 years ago)
- Location:
- branches/RWT/modules/vci_mem_cache/caba/source
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/RWT/modules/vci_mem_cache/caba/source/include/vci_mem_cache.h
r783 r787 494 494 uint32_t m_cpt_put; 495 495 496 // TODO: clean the following counters (not necessarily useful and well-implemented) 497 uint32_t m_cpt_read_fsm_dir_lock; // wait DIR LOCK 498 uint32_t m_cpt_read_fsm_n_dir_lock; // NB DIR LOCK 499 uint32_t m_cpt_write_fsm_dir_lock; // wait DIR LOCK 500 uint32_t m_cpt_write_fsm_n_dir_lock; // NB DIR LOCK 501 uint32_t m_cpt_xram_rsp_fsm_dir_lock; // wait DIR LOCK 502 uint32_t m_cpt_xram_rsp_fsm_n_dir_lock; // NB DIR LOCK 503 uint32_t m_cpt_cas_fsm_dir_lock; // wait DIR LOCK 504 uint32_t m_cpt_cas_fsm_n_dir_lock; // NB DIR LOCK 505 uint32_t m_cpt_cleanup_fsm_dir_lock; // wait DIR LOCK 506 uint32_t m_cpt_cleanup_fsm_n_dir_lock; // NB DIR LOCK 507 508 uint32_t m_cpt_dir_unused; // NB cycles DIR LOCK unused 509 uint32_t m_cpt_read_fsm_dir_used; // NB cycles DIR LOCK used 510 uint32_t m_cpt_write_fsm_dir_used; // NB cycles DIR LOCK used 511 uint32_t m_cpt_cas_fsm_dir_used; // NB cycles DIR LOCK used 512 uint32_t m_cpt_xram_rsp_fsm_dir_used; // NB cycles DIR LOCK used 513 uint32_t m_cpt_cleanup_fsm_dir_used; // NB cycles DIR LOCK used 514 515 uint32_t m_cpt_read_fsm_trt_lock; // wait TRT LOCK 516 uint32_t m_cpt_write_fsm_trt_lock; // wait TRT LOCK 517 uint32_t m_cpt_cas_fsm_trt_lock; // wait TRT LOCK 518 uint32_t m_cpt_xram_rsp_fsm_trt_lock; // wait TRT LOCK 519 uint32_t m_cpt_ixr_fsm_trt_lock; // wait TRT LOCK 520 521 uint32_t m_cpt_read_fsm_n_trt_lock; // NB TRT LOCK 522 uint32_t m_cpt_write_fsm_n_trt_lock; // NB TRT LOCK 523 uint32_t m_cpt_cas_fsm_n_trt_lock; // NB TRT LOCK 524 uint32_t m_cpt_xram_rsp_fsm_n_trt_lock; // NB TRT LOCK 525 uint32_t m_cpt_ixr_fsm_n_trt_lock; // NB TRT LOCK 526 527 uint32_t m_cpt_read_fsm_trt_used; // NB cycles TRT LOCK used 528 uint32_t m_cpt_write_fsm_trt_used; // NB cycles TRT LOCK used 529 uint32_t m_cpt_cas_fsm_trt_used; // NB cycles TRT LOCK used 530 uint32_t m_cpt_xram_rsp_fsm_trt_used; // NB cycles TRT LOCK used 531 uint32_t m_cpt_ixr_fsm_trt_used; // NB cycles TRT LOCK used 532 533 uint32_t m_cpt_trt_unused; // NB cycles TRT LOCK unused 534 535 uint32_t m_cpt_write_fsm_upt_lock; // wait UPT LOCK 536 uint32_t m_cpt_xram_rsp_fsm_upt_lock; // wait UPT LOCK 537 uint32_t m_cpt_multi_ack_fsm_upt_lock; // wait UPT LOCK 538 uint32_t m_cpt_cleanup_fsm_ivt_lock; // wait UPT LOCK 539 uint32_t m_cpt_cas_fsm_upt_lock; // wait UPT LOCK 540 541 uint32_t m_cpt_write_fsm_n_upt_lock; // NB UPT LOCK 542 uint32_t m_cpt_xram_rsp_fsm_n_upt_lock; // NB UPT LOCK 543 uint32_t m_cpt_multi_ack_fsm_n_upt_lock; // NB UPT LOCK 544 uint32_t m_cpt_cleanup_fsm_n_upt_lock; // NB UPT LOCK 545 uint32_t m_cpt_cas_fsm_n_upt_lock; // NB UPT LOCK 546 547 uint32_t m_cpt_write_fsm_upt_used; // NB cycles UPT LOCK used 548 uint32_t m_cpt_xram_rsp_fsm_upt_used; // NB cycles UPT LOCK used 549 uint32_t m_cpt_multi_ack_fsm_upt_used; // NB cycles UPT LOCK used 550 uint32_t m_cpt_cleanup_fsm_ivt_used; // NB cycles UPT LOCK used 551 uint32_t m_cpt_cas_fsm_upt_used; // NB cycles UPT LOCK used 552 553 uint32_t m_cpt_ivt_unused; // NB cycles UPT LOCK unused 554 uint32_t m_cpt_upt_unused; // NB cycles UPT LOCK unused 555 556 uint32_t m_cpt_read_fsm_heap_lock; // wait HEAP LOCK 557 uint32_t m_cpt_write_fsm_heap_lock; // wait HEAP LOCK 558 uint32_t m_cpt_cas_fsm_heap_lock; // wait HEAP LOCK 559 uint32_t m_cpt_cleanup_fsm_heap_lock; // wait HEAP LOCK 560 uint32_t m_cpt_xram_rsp_fsm_heap_lock; // wait HEAP LOCK 561 562 uint32_t m_cpt_read_fsm_n_heap_lock; // NB HEAP LOCK 563 uint32_t m_cpt_write_fsm_n_heap_lock; // NB HEAP LOCK 564 uint32_t m_cpt_cas_fsm_n_heap_lock; // NB HEAP LOCK 565 uint32_t m_cpt_cleanup_fsm_n_heap_lock; // NB HEAP LOCK 566 uint32_t m_cpt_xram_rsp_fsm_n_heap_lock; // NB HEAP LOCK 567 568 uint32_t m_cpt_read_fsm_heap_used; // NB cycles HEAP LOCK used 569 uint32_t m_cpt_write_fsm_heap_used; // NB cycles HEAP LOCK used 570 uint32_t m_cpt_cas_fsm_heap_used; // NB cycles HEAP LOCK used 571 uint32_t m_cpt_cleanup_fsm_heap_used; // NB cycles HEAP LOCK used 572 uint32_t m_cpt_xram_rsp_fsm_heap_used; // NB cycles HEAP LOCK used 573 496 uint32_t m_cpt_dir_unused; // NB cycles DIR LOCK unused 497 uint32_t m_cpt_trt_unused; // NB cycles TRT LOCK unused 498 uint32_t m_cpt_ivt_unused; // NB cycles UPT LOCK unused 499 uint32_t m_cpt_upt_unused; // NB cycles UPT LOCK unused 500 501 // Unused 574 502 uint32_t m_cpt_read_data_unc; 575 503 uint32_t m_cpt_read_data_miss_CC; -
branches/RWT/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp
r783 r787 846 846 { 847 847 m_cpt_reset_count = m_cpt_cycles; 848 848 849 m_cpt_read_local = 0; 849 850 m_cpt_read_remote = 0; 850 851 m_cpt_read_cost = 0; 852 851 853 m_cpt_write_local = 0; 852 854 m_cpt_write_remote = 0; … … 855 857 m_cpt_write_cost = 0; 856 858 m_cpt_write_ncc_miss = 0; 859 857 860 m_cpt_ll_local = 0; 858 861 m_cpt_ll_remote = 0; 859 862 m_cpt_ll_cost = 0; 863 860 864 m_cpt_sc_local = 0; 861 865 m_cpt_sc_remote = 0; 862 866 m_cpt_sc_cost = 0; 867 863 868 m_cpt_cas_local = 0; 864 869 m_cpt_cas_remote = 0; 865 870 m_cpt_cas_cost = 0; 871 866 872 m_cpt_update = 0; 867 873 m_cpt_update_local = 0; 868 874 m_cpt_update_remote = 0; 869 875 m_cpt_update_cost = 0; 876 870 877 m_cpt_minval = 0; 871 878 m_cpt_minval_local = 0; 872 879 m_cpt_minval_remote = 0; 873 880 m_cpt_minval_cost = 0; 881 874 882 m_cpt_binval = 0; 875 883 m_cpt_write_broadcast = 0; 884 876 885 m_cpt_cleanup_local = 0; 877 886 m_cpt_cleanup_remote = 0; 878 887 m_cpt_cleanup_cost = 0; 888 m_cpt_cleanup_data_local = 0; 889 m_cpt_cleanup_data_remote = 0; 890 m_cpt_cleanup_data_cost = 0; 891 879 892 m_cpt_read_miss = 0; 880 893 m_cpt_write_miss = 0; 881 894 m_cpt_write_dirty = 0; 895 882 896 m_cpt_trt_rb = 0; 883 897 m_cpt_trt_full = 0; 884 898 m_cpt_get = 0; 885 899 m_cpt_put = 0; 900 886 901 m_cpt_ncc_to_cc_read = 0; 887 902 m_cpt_ncc_to_cc_write = 0; 888 m_cpt_cleanup_data_local = 0;889 m_cpt_cleanup_data_remote = 0;890 m_cpt_cleanup_data_cost = 0;891 903 } 892 904 … … 941 953 << "[080] BROADCAT INVAL = " << m_cpt_binval << std::endl 942 954 << "[081] WRITE BROADCAST = " << m_cpt_write_broadcast << std::endl 955 << "[082] GETM BROADCAST = " << "0" << std::endl 943 956 << std::endl 944 957 << "[090] LOCAL CLEANUP = " << m_cpt_cleanup_local << std::endl … … 952 965 << "[101] WRITE MISS = " << m_cpt_write_miss << std::endl 953 966 << "[102] WRITE DIRTY = " << m_cpt_write_dirty << std::endl 967 << "[103] GETM MISS = " << "0" << std::endl 954 968 << std::endl 955 969 << "[110] RD BLOCKED BY HIT IN TRT = " << m_cpt_trt_rb << std::endl … … 961 975 << "[140] NCC TO CC (READ) = " << m_cpt_ncc_to_cc_read << std::endl 962 976 << "[141] NCC TO CC (WRITE) = " << m_cpt_ncc_to_cc_write << std::endl 977 << std::endl 978 << "[150] LOCAL GETM = " << "0" << std::endl 979 << "[151] REMOTE GETM = " << "0" << std::endl 980 << "[152] GETM COST (FLITS * DIST) = " << "0" << std::endl 981 << std::endl 982 << "[160] LOCAL INVAL RO = " << "0" << std::endl 983 << "[161] REMOTE INVAL RO = " << "0" << std::endl 984 << "[162] INVAL RO COST = " << "0" << std::endl 963 985 << std::endl; 964 986 } 965 987 966 if (stats) {967 std::cout << "----------------------------------" << std::dec << std::endl;968 std::cout << "--- Calculated Stats ---" << std::dec << std::endl;969 std::cout << "----------------------------------" << std::dec << std::endl;970 std::cout971 << "[300] READ TOTAL = " << m_cpt_read_local + m_cpt_read_remote << std::endl972 << "[301] READ RATE = " << (double) (m_cpt_read_local + m_cpt_read_remote) / m_cpt_cycles << std::endl973 << "[302] LOCAL READ RATE = " << (double) m_cpt_read_local / m_cpt_cycles << std::endl974 << "[303] REMOTE READ RATE = " << (double) m_cpt_read_remote / m_cpt_cycles << std::endl975 << "[304] READ MISS RATE = " << (double) m_cpt_read_miss / (m_cpt_read_local + m_cpt_read_remote) << std::endl976 << std::endl977 << "[305] WRITE TOTAL = " << m_cpt_write_local + m_cpt_write_remote << std::endl978 << "[306] WRITE RATE = " << (double) (m_cpt_write_local + m_cpt_write_remote) / m_cpt_cycles << std::endl979 << "[307] LOCAL WRITE RATE = " << (double) m_cpt_write_local / m_cpt_cycles << std::endl980 << "[308] REMOTE WRITE RATE = " << (double) m_cpt_write_remote / m_cpt_cycles << std::endl981 << "[309] WRITE MISS RATE = " << (double) m_cpt_write_miss / (m_cpt_write_local + m_cpt_write_remote) << std::endl982 << "[310] WRITE BURST TOTAL = " << m_cpt_write_flits_local + m_cpt_write_flits_remote << std::endl983 << "[311] WRITE BURST AVERAGE = " << (double) (m_cpt_write_flits_local + m_cpt_write_flits_remote) / (m_cpt_write_local + m_cpt_write_remote) << std::endl984 << "[312] LOCAL WRITE BURST AV. = " << (double) m_cpt_write_flits_local / (m_cpt_write_local + m_cpt_write_remote) << std::endl985 << "[313] REMOTE WRITE BURST AV = " << (double) m_cpt_write_flits_remote / (m_cpt_write_local + m_cpt_write_remote) << std::endl986 << std::endl987 << "[314] UPDATE RATE = " << (double) m_cpt_update / m_cpt_cycles << std::endl988 << "[315] AV. UPDATE PER UP REQ = " << (double) (m_cpt_update_local + m_cpt_update_remote) / m_cpt_update << std::endl989 << "[316] AV. LOC UPDT PER UP REQ = " << (double) m_cpt_update_local / m_cpt_update << std::endl990 << "[317] AV. REMOTE UPDT PER UP REQ = " << (double) m_cpt_update_remote / m_cpt_update << std::endl991 << std::endl992 << "[318] INVAL MULTICAST RATE = " << (double) m_cpt_minval / m_cpt_cycles << std::endl993 << "[319] AVE. INVAL PER M_INV = " << (double) (m_cpt_minval_local + m_cpt_minval_remote) / m_cpt_minval << std::endl994 << "[320] AV. LOC INV PER M_INV = " << (double) m_cpt_minval_local / m_cpt_minval << std::endl995 << "[321] AV. REM INV PER M_INV = " << (double) m_cpt_minval_remote / m_cpt_minval << std::endl996 << std::endl997 << "[322] INVAL BROADCAST RATE = " << (double) m_cpt_binval / m_cpt_cycles << std::endl998 << "[323] WRITE DIRTY RATE = " << (double) m_cpt_write_dirty / m_cpt_cycles << std::endl999 << std::endl1000 << "[324] CLEANUP RATE = " << (double) (m_cpt_cleanup_local + m_cpt_cleanup_remote) / m_cpt_cycles << std::endl1001 << "[325] LOCAL CLEANUP RATE = " << (double) m_cpt_cleanup_local / m_cpt_cycles << std::endl1002 << "[326] REMOTE CLEANUP RATE = " << (double) m_cpt_cleanup_remote / m_cpt_cycles << std::endl1003 << "[327] LL RATE = " << (double) (m_cpt_ll_local + m_cpt_ll_remote) / m_cpt_cycles << std::endl1004 << "[328] LOCAL LL RATE = " << (double) m_cpt_ll_local / m_cpt_cycles << std::endl1005 << "[329] REMOTE LL RATE = " << (double) m_cpt_ll_remote / m_cpt_cycles << std::endl1006 << "[330] SC RATE = " << (double) (m_cpt_sc_local + m_cpt_sc_remote) / m_cpt_cycles << std::endl1007 << "[331] LOCAL SC RATE = " << (double) m_cpt_sc_local / m_cpt_cycles << std::endl1008 << "[332] REMOTE SC RATE = " << (double) m_cpt_sc_remote / m_cpt_cycles << std::endl1009 << "[333] CAS RATE = " << (double) (m_cpt_cas_local + m_cpt_cas_remote) / m_cpt_cycles << std::endl1010 << "[334] LOCAL CAS RATE = " << (double) m_cpt_cas_local / m_cpt_cycles << std::endl1011 << "[335] REMOTE CAS RATE = " << (double) m_cpt_cas_remote / m_cpt_cycles << std::endl1012 << std::endl1013 << std::endl;1014 }1015 988 } 1016 989 … … 1198 1171 m_cpt_read_remote = 0; 1199 1172 m_cpt_read_cost = 0; 1173 1200 1174 m_cpt_write_local = 0; 1201 1175 m_cpt_write_remote = 0; … … 1204 1178 m_cpt_write_ncc_miss = 0; 1205 1179 m_cpt_write_cost = 0; 1180 1206 1181 m_cpt_ll_local = 0; 1207 1182 m_cpt_ll_remote = 0; 1208 1183 m_cpt_ll_cost = 0; 1184 1209 1185 m_cpt_sc_local = 0; 1210 1186 m_cpt_sc_remote = 0; 1211 1187 m_cpt_sc_cost = 0; 1188 1212 1189 m_cpt_cas_local = 0; 1213 1190 m_cpt_cas_remote = 0; 1214 1191 m_cpt_cas_cost = 0; 1192 1215 1193 m_cpt_update = 0; 1216 1194 m_cpt_update_local = 0; 1217 1195 m_cpt_update_remote = 0; 1218 1196 m_cpt_update_cost = 0; 1197 1219 1198 m_cpt_minval = 0; 1220 1199 m_cpt_minval_local = 0; 1221 1200 m_cpt_minval_remote = 0; 1222 1201 m_cpt_minval_cost = 0; 1202 1223 1203 m_cpt_binval = 0; 1204 m_cpt_write_broadcast = 0; 1205 1224 1206 m_cpt_cleanup_local = 0; 1225 1207 m_cpt_cleanup_remote = 0; … … 1229 1211 m_cpt_cleanup_data_cost = 0; 1230 1212 1231 1232 m_cpt_read_miss = 0; 1233 m_cpt_write_miss = 0; 1234 m_cpt_write_dirty = 0; 1235 m_cpt_write_broadcast = 0; 1236 m_cpt_trt_rb = 0; 1237 m_cpt_trt_full = 0; 1238 m_cpt_get = 0; 1239 m_cpt_put = 0; 1213 m_cpt_read_miss = 0; 1214 m_cpt_write_miss = 0; 1215 m_cpt_write_dirty = 0; 1216 1217 m_cpt_trt_rb = 0; 1218 m_cpt_trt_full = 0; 1219 m_cpt_get = 0; 1220 m_cpt_put = 0; 1221 1222 m_cpt_ncc_to_cc_read = 0; 1223 m_cpt_ncc_to_cc_write = 0; 1224 1225 m_cpt_heap_min_slot_available = m_heap_size; 1226 m_cpt_heap_slot_available = m_heap_size; 1227 1240 1228 m_cpt_dir_unused = 0; 1241 1229 m_cpt_upt_unused = 0; … … 1243 1231 m_cpt_heap_unused = 0; 1244 1232 m_cpt_trt_unused = 0; 1245 m_cpt_read_fsm_n_dir_lock = 0; 1246 m_cpt_read_fsm_dir_lock = 0; 1247 m_cpt_read_fsm_dir_used = 0; 1248 m_cpt_read_fsm_trt_lock = 0; 1249 m_cpt_read_fsm_heap_lock = 0; 1250 m_cpt_write_fsm_dir_lock = 0; 1251 m_cpt_write_fsm_n_dir_lock = 0; 1252 m_cpt_write_fsm_upt_lock = 0; 1253 m_cpt_write_fsm_heap_lock = 0; 1254 m_cpt_write_fsm_dir_used = 0; 1255 m_cpt_write_fsm_trt_lock = 0; 1256 m_cpt_cas_fsm_n_dir_lock = 0; 1257 m_cpt_cas_fsm_dir_lock = 0; 1258 m_cpt_cas_fsm_upt_lock = 0; 1259 m_cpt_cas_fsm_heap_lock = 0; 1260 m_cpt_cas_fsm_trt_lock = 0; 1261 m_cpt_cas_fsm_dir_used = 0; 1262 m_cpt_xram_rsp_fsm_n_dir_lock = 0; 1263 m_cpt_xram_rsp_fsm_dir_lock = 0; 1264 m_cpt_xram_rsp_fsm_trt_lock = 0; 1265 m_cpt_xram_rsp_fsm_upt_lock = 0; 1266 m_cpt_xram_rsp_fsm_heap_lock = 0; 1267 m_cpt_xram_rsp_fsm_dir_used = 0; 1268 m_cpt_cleanup_fsm_dir_lock = 0; 1269 m_cpt_cleanup_fsm_n_dir_lock = 0; 1270 m_cpt_cleanup_fsm_heap_lock = 0; 1271 m_cpt_cleanup_fsm_ivt_lock = 0; 1272 m_cpt_cleanup_fsm_dir_used = 0; 1273 m_cpt_ixr_fsm_trt_lock = 0; 1274 m_cpt_multi_ack_fsm_upt_lock = 0; 1275 m_cpt_read_data_unc = 0; 1276 m_cpt_read_data_miss_CC = 0; 1277 m_cpt_read_ins_unc = 0; 1278 m_cpt_read_ins_miss = 0; 1279 m_cpt_read_ll_CC = 0; 1280 m_cpt_read_data_miss_NCC = 0; 1281 m_cpt_read_ll_NCC = 0; 1282 m_cpt_ncc_to_cc_read = 0; 1283 m_cpt_ncc_to_cc_write = 0; 1284 1285 m_cpt_heap_min_slot_available = m_heap_size; 1286 m_cpt_heap_slot_available = m_heap_size; 1233 1234 // Unused 1235 m_cpt_read_data_unc = 0; 1236 m_cpt_read_data_miss_CC = 0; 1237 m_cpt_read_ins_unc = 0; 1238 m_cpt_read_ins_miss = 0; 1239 m_cpt_read_ll_CC = 0; 1240 m_cpt_read_data_miss_NCC = 0; 1241 m_cpt_read_ll_NCC = 0; 1287 1242 1288 1243 return; … … 1900 1855 // <Activity counters> 1901 1856 if (p_vci_tgt.cmd.read() == vci_param_int::CMD_LOCKED_READ) { 1902 if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_ll_local++; 1903 else m_cpt_ll_remote++; 1904 m_cpt_ll_cost += req_distance(p_vci_tgt.srcid.read()); // LL on a single word 1857 if (is_local_req(p_vci_tgt.srcid.read())) 1858 { 1859 m_cpt_ll_local++; 1860 } 1861 else 1862 { 1863 m_cpt_ll_remote++; 1864 } 1865 // (1 (CMD) + 2 (RSP)) VCI flits for LL => 2 + 3 dspin flits 1866 m_cpt_ll_cost += 5 * req_distance(p_vci_tgt.srcid.read()); // LL on a single word 1905 1867 } 1906 1868 else { 1907 if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_read_local++; 1908 else m_cpt_read_remote++; 1909 m_cpt_read_cost += m_words * req_distance(p_vci_tgt.srcid.read()); 1869 if (is_local_req(p_vci_tgt.srcid.read())) 1870 { 1871 m_cpt_read_local++; 1872 } 1873 else 1874 { 1875 m_cpt_read_remote++; 1876 } 1877 // (1 (CMD) + m_words (RSP)) flits VCI => 2 + m_words + 1 flits dspin 1878 m_cpt_read_cost += (3 + m_words) * req_distance(p_vci_tgt.srcid.read()); 1910 1879 } 1911 1880 // </Activity counters> … … 1918 1887 if(p_vci_tgt.cmdval and m_cmd_write_addr_fifo.wok()) 1919 1888 { 1920 1889 uint32_t plen = p_vci_tgt.plen.read(); 1921 1890 #if DEBUG_MEMC_TGT_CMD 1922 1891 if(m_debug) … … 1933 1902 // <Activity counters> 1934 1903 if (p_vci_tgt.cmd.read() == vci_param_int::CMD_NOP) { 1935 m_cpt_sc_cost += req_distance(p_vci_tgt.srcid.read()); 1904 // (2 (CMD) + 1 (RSP)) flits VCI => 4 + (1 (success) || 2 (failure)) flits dspin 1905 m_cpt_sc_cost += 5 * req_distance(p_vci_tgt.srcid.read()); 1936 1906 } 1937 1907 else { 1938 if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_write_flits_local++; 1939 else m_cpt_write_flits_remote++; 1940 m_cpt_write_cost += req_distance(p_vci_tgt.srcid.read()); 1908 if (is_local_req(p_vci_tgt.srcid.read())) 1909 { 1910 m_cpt_write_flits_local++; 1911 } 1912 else 1913 { 1914 m_cpt_write_flits_remote++; 1915 } 1916 // (burst_size (CMD) + 1 (RSP) flits VCI => 2 + burst_size + 1 flits dspin 1917 m_cpt_write_cost += (3 + (plen >> 2)) * req_distance(p_vci_tgt.srcid.read()); 1941 1918 } 1942 1919 // </Activity counters> … … 1945 1922 // <Activity counters> 1946 1923 if (p_vci_tgt.cmd.read() == vci_param_int::CMD_NOP) { 1947 if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_sc_local++; 1948 else m_cpt_sc_remote++; 1949 1924 if (is_local_req(p_vci_tgt.srcid.read())) 1925 { 1926 m_cpt_sc_local++; 1927 } 1928 else 1929 { 1930 m_cpt_sc_remote++; 1931 } 1950 1932 } 1951 1933 else { 1952 if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_write_local++; 1953 else m_cpt_write_remote++; 1934 if (is_local_req(p_vci_tgt.srcid.read())) 1935 { 1936 m_cpt_write_local++; 1937 } 1938 else 1939 { 1940 m_cpt_write_remote++; 1941 } 1954 1942 } 1955 1943 // </Activity counters> … … 1985 1973 if (p_vci_tgt.eop) { 1986 1974 // <Activity counters> 1987 if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_cas_local++; 1988 else m_cpt_cas_remote++; 1989 m_cpt_cas_cost += req_distance(p_vci_tgt.srcid.read()); 1975 if (is_local_req(p_vci_tgt.srcid.read())) 1976 { 1977 m_cpt_cas_local++; 1978 } 1979 else 1980 { 1981 m_cpt_cas_remote++; 1982 } 1983 // (2 (CMD) + 1 (RSP)) flits VCI => 4 + (1 (success) || 2 (failure)) flits dspin 1984 m_cpt_cas_cost += 5 * req_distance(p_vci_tgt.srcid.read()); 1990 1985 // </Activity counters> 1991 1986 r_tgt_cmd_fsm = TGT_CMD_IDLE; … … 2070 2065 case MULTI_ACK_UPT_LOCK: 2071 2066 { 2072 m_cpt_multi_ack_fsm_upt_lock++;2073 2067 // get lock to the UPDATE table 2074 2068 if(r_alloc_upt_fsm.read() != ALLOC_UPT_MULTI_ACK) break; … … 2102 2096 << " entry = " << r_multi_ack_upt_index.read() 2103 2097 << " / rsp_count = " << std::dec << count << std::endl; 2104 m_cpt_multi_ack_fsm_n_upt_lock++;2105 2098 #endif 2106 2099 break; … … 2762 2755 { 2763 2756 r_read_fsm = READ_DIR_LOCK; 2764 m_cpt_read_fsm_n_dir_lock++;2765 2757 } 2766 2758 … … 2769 2761 std::cout << " <MEMC " << name() << " READ_DIR_REQ> Requesting DIR lock " << std::endl; 2770 2762 #endif 2771 2772 m_cpt_read_fsm_dir_lock++;2773 2774 2763 break; 2775 2764 } … … 3016 3005 { 3017 3006 r_read_fsm = READ_HEAP_LOCK; 3018 m_cpt_read_fsm_n_heap_lock++;3019 3007 } 3020 3008 … … 3024 3012 << " Requesting HEAP lock " << std::endl; 3025 3013 #endif 3026 3027 m_cpt_read_fsm_heap_lock++;3028 3029 3014 break; 3030 3015 } … … 3297 3282 << " / hit_write = " << hit_write 3298 3283 << " / full = " << !wok << std::endl; 3299 m_cpt_read_fsm_n_trt_lock++; 3300 #endif 3301 } 3302 3303 m_cpt_read_fsm_trt_lock++; 3304 3284 #endif 3285 } 3305 3286 break; 3306 3287 } … … 3821 3802 if(wok) r_write_fsm = WRITE_UPT_HEAP_LOCK; 3822 3803 else r_write_fsm = WRITE_WAIT; 3823 m_cpt_write_fsm_n_upt_lock++; 3824 } 3825 3826 m_cpt_write_fsm_upt_lock++; 3827 3804 } 3828 3805 break; 3829 3806 } … … 3841 3818 #endif 3842 3819 r_write_fsm = WRITE_UPT_REQ; 3843 m_cpt_write_fsm_n_heap_lock++; 3844 } 3845 3846 m_cpt_write_fsm_heap_lock++; 3847 3820 } 3848 3821 break; 3849 3822 } … … 4341 4314 << " / index = " << wok_index << std::endl; 4342 4315 #endif 4343 4344 m_cpt_write_fsm_trt_lock++;4345 4346 4316 break; 4347 4317 } … … 4385 4355 if(wok) r_write_fsm = WRITE_BC_DIR_INVAL; 4386 4356 else r_write_fsm = WRITE_WAIT; 4387 m_cpt_write_fsm_n_upt_lock++; 4388 } 4389 4390 m_cpt_write_fsm_upt_lock++; 4391 4357 } 4392 4358 break; 4393 4359 } … … 5000 4966 << " / data = " << std::hex << data << std::endl; 5001 4967 #endif 5002 m_cpt_ixr_fsm_n_trt_lock++; 5003 } 5004 m_cpt_ixr_fsm_trt_lock++; 4968 } 5005 4969 break; 5006 4970 } … … 5074 5038 << " Get access to DIR and TRT" << std::endl; 5075 5039 #endif 5076 m_cpt_xram_rsp_fsm_n_dir_lock++; 5077 m_cpt_xram_rsp_fsm_n_trt_lock++; 5078 } 5079 m_cpt_xram_rsp_fsm_dir_lock++; 5080 m_cpt_xram_rsp_fsm_trt_lock++; 5040 } 5081 5041 break; 5082 5042 } … … 5365 5325 else if(r_xram_rsp_victim_inval.read()) r_xram_rsp_fsm = XRAM_RSP_INVAL; 5366 5326 else r_xram_rsp_fsm = XRAM_RSP_WRITE_DIRTY; 5367 m_cpt_xram_rsp_fsm_n_trt_lock++; 5368 } 5369 5370 m_cpt_xram_rsp_fsm_trt_lock++; 5371 5327 } 5372 5328 break; 5373 5329 } … … 5477 5433 { 5478 5434 r_xram_rsp_fsm = XRAM_RSP_HEAP_ERASE; 5479 m_cpt_xram_rsp_fsm_n_heap_lock++;5480 5435 } 5481 5436 … … 5485 5440 << " Requesting HEAP lock" << std::endl; 5486 5441 #endif 5487 5488 m_cpt_xram_rsp_fsm_heap_lock++;5489 5490 5442 break; 5491 5443 } … … 5743 5695 m_cpt_cleanup_data_remote++; 5744 5696 } 5745 m_cpt_cleanup_cost += m_words * req_distance(srcid); 5746 m_cpt_cleanup_data_cost += m_words * req_distance(srcid); 5697 // 2 + m_words flits for cleanup with data 5698 m_cpt_cleanup_cost += (m_words + 2) * req_distance(srcid); 5699 m_cpt_cleanup_data_cost += (m_words + 2) * req_distance(srcid); 5747 5700 // </Activity Counters> 5748 5701 } … … 5757 5710 m_cpt_cleanup_remote++; 5758 5711 } 5759 m_cpt_cleanup_cost += req_distance(srcid); 5712 // 2 flits for cleanup without data 5713 m_cpt_cleanup_cost += 2 * req_distance(srcid); 5760 5714 // </Activity Counters> 5761 5715 } … … 5813 5767 case CLEANUP_DIR_REQ: // Get the lock to the directory 5814 5768 { 5815 m_cpt_cleanup_fsm_dir_lock++;5816 5769 if(r_alloc_dir_fsm.read() != ALLOC_DIR_CLEANUP) break; 5817 5770 … … 5822 5775 std::cout << " <MEMC " << name() << " CLEANUP_DIR_REQ> Requesting DIR lock" << std::endl; 5823 5776 #endif 5824 5825 m_cpt_cleanup_fsm_n_dir_lock++;5826 5827 5777 break; 5828 5778 } … … 6165 6115 } 6166 6116 #endif 6167 m_cpt_cleanup_fsm_n_heap_lock++;6168 6117 break; 6169 6118 } … … 6407 6356 // invalidate transaction matching the cleanup 6408 6357 { 6409 m_cpt_cleanup_fsm_ivt_lock++;6410 6358 if(r_alloc_ivt_fsm.read() != ALLOC_IVT_CLEANUP) break; 6411 6359 … … 6427 6375 << std::endl; 6428 6376 #endif 6429 m_cpt_cleanup_fsm_n_upt_lock++;6430 6377 } 6431 6378 else … … 6723 6670 { 6724 6671 r_cas_fsm = CAS_DIR_LOCK; 6725 m_cpt_cas_fsm_n_dir_lock++;6726 6672 } 6727 6673 … … 6734 6680 } 6735 6681 #endif 6736 6737 m_cpt_cas_fsm_dir_lock++;6738 6739 6682 break; 6740 6683 } … … 6967 6910 << " / count = " << nb_copies << std::endl; 6968 6911 #endif 6969 m_cpt_cas_fsm_n_upt_lock++; 6970 } 6971 6972 m_cpt_cas_fsm_upt_lock++; 6973 6912 } 6974 6913 break; 6975 6914 } … … 7002 6941 #endif 7003 6942 r_cas_fsm = CAS_UPT_REQ; 7004 m_cpt_cas_fsm_n_heap_lock++; 7005 } 7006 7007 m_cpt_cas_fsm_heap_lock++; 7008 6943 } 7009 6944 break; 7010 6945 } … … 7118 7053 { 7119 7054 r_cas_fsm = CAS_WAIT; 7120 m_cpt_cas_fsm_n_trt_lock++;7121 7055 } 7122 7056 … … 7127 7061 #endif 7128 7062 } 7129 m_cpt_cas_fsm_trt_lock++;7130 7131 7063 break; 7132 7064 } … … 7184 7116 r_cas_fsm = CAS_WAIT; 7185 7117 } 7186 m_cpt_cas_fsm_n_upt_lock++; 7187 } 7188 7189 m_cpt_cas_fsm_upt_lock++; 7190 7118 } 7191 7119 break; 7192 7120 } … … 7366 7294 r_cas_fsm = CAS_MISS_TRT_SET; 7367 7295 } 7368 m_cpt_cas_fsm_n_trt_lock++; 7369 } 7370 7371 m_cpt_cas_fsm_trt_lock++; 7372 7296 } 7373 7297 break; 7374 7298 } … … 7793 7717 { 7794 7718 if(not p_dspin_m2p.read) break; 7719 7795 7720 // <Activity Counters> 7796 7721 if (is_local_req(m_config_to_cc_send_srcid_fifo.read())) … … 7802 7727 m_cpt_minval_remote++; 7803 7728 } 7804 m_cpt_minval_cost += req_distance(m_config_to_cc_send_srcid_fifo.read()); 7729 // 2 flits for multi inval 7730 m_cpt_minval_cost += 2 * req_distance(m_config_to_cc_send_srcid_fifo.read()); 7805 7731 // </Activity Counters> 7806 7732 r_cc_send_fsm = CC_SEND_CONFIG_INVAL_NLINE; … … 7869 7795 m_cpt_minval_remote++; 7870 7796 } 7871 m_cpt_minval_cost += req_distance(m_xram_rsp_to_cc_send_srcid_fifo.read()); 7797 // 2 flits for multi inval 7798 m_cpt_minval_cost += 2 * req_distance(m_xram_rsp_to_cc_send_srcid_fifo.read()); 7872 7799 // </Activity Counters> 7873 7800 r_cc_send_fsm = CC_SEND_XRAM_RSP_INVAL_NLINE; … … 8022 7949 m_cpt_update_remote++; 8023 7950 } 8024 m_cpt_update_cost += req_distance(m_write_to_cc_send_srcid_fifo.read()); 7951 // 2 flits for multi inval 7952 m_cpt_update_cost += 2 * req_distance(m_write_to_cc_send_srcid_fifo.read()); 8025 7953 // </Activity Counters> 8026 7954 … … 8111 8039 m_cpt_update_remote++; 8112 8040 } 8113 m_cpt_update_cost += req_distance(m_cas_to_cc_send_srcid_fifo.read()); 8041 // 2 flits for multi inval 8042 m_cpt_update_cost += 2 * req_distance(m_cas_to_cc_send_srcid_fifo.read()); 8114 8043 // </Activity Counters> 8115 8044 r_cc_send_fsm = CC_SEND_CAS_UPDT_NLINE; … … 9126 9055 m_cpt_dir_unused++; 9127 9056 } 9128 else9129 m_cpt_read_fsm_dir_used++;9130 9057 break; 9131 9058 … … 9168 9095 m_cpt_dir_unused++; 9169 9096 } 9170 else9171 m_cpt_write_fsm_dir_used++;9172 9097 break; 9173 9098 … … 9209 9134 m_cpt_dir_unused++; 9210 9135 } 9211 else9212 m_cpt_cas_fsm_dir_used++;9213 9136 break; 9214 9137 … … 9239 9162 m_cpt_dir_unused++; 9240 9163 } 9241 else9242 m_cpt_cleanup_fsm_dir_used++;9243 9164 break; 9244 9165 … … 9267 9188 m_cpt_dir_unused++; 9268 9189 } 9269 else9270 m_cpt_xram_rsp_fsm_dir_used++;9271 9190 break; 9272 9191 … … 9321 9240 m_cpt_trt_unused++; 9322 9241 } 9323 else9324 m_cpt_read_fsm_trt_used++;9325 9242 break; 9326 9243 … … 9363 9280 m_cpt_trt_unused++; 9364 9281 } 9365 else9366 m_cpt_write_fsm_trt_used++;9367 9282 break; 9368 9283 … … 9405 9320 m_cpt_trt_unused++; 9406 9321 } 9407 else9408 m_cpt_cas_fsm_trt_used++;9409 9322 break; 9410 9323 /////////////////////// … … 9484 9397 m_cpt_trt_unused++; 9485 9398 } 9486 else9487 m_cpt_xram_rsp_fsm_trt_used++;9488 9399 break; 9489 9400 … … 9525 9436 m_cpt_trt_unused++; 9526 9437 } 9527 else9528 m_cpt_ixr_fsm_trt_used++;9529 9438 break; 9530 9439 … … 9654 9563 m_cpt_heap_unused++; 9655 9564 } 9656 else9657 m_cpt_read_fsm_heap_used++;9658 9565 break; 9659 9566 … … 9682 9589 m_cpt_heap_unused++; 9683 9590 } 9684 else9685 m_cpt_write_fsm_heap_used++;9686 9591 break; 9687 9592 … … 9710 9615 m_cpt_heap_unused++; 9711 9616 } 9712 else9713 m_cpt_cas_fsm_heap_used++;9714 9617 break; 9715 9618 … … 9739 9642 m_cpt_heap_unused++; 9740 9643 } 9741 else9742 m_cpt_cleanup_fsm_heap_used++;9743 9644 break; 9744 9645 … … 9789 9690 m_cpt_heap_unused++; 9790 9691 } 9791 else9792 m_cpt_xram_rsp_fsm_heap_used++;9793 9692 break; 9794 9693
Note: See TracChangeset
for help on using the changeset viewer.