Changeset 789 for trunk/modules/vci_mem_cache/caba/source
- Timestamp:
- Sep 3, 2014, 2:38:01 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp
r781 r789 827 827 { 828 828 m_cpt_reset_count = m_cpt_cycles; 829 829 830 m_cpt_read_local = 0; 830 831 m_cpt_read_remote = 0; 831 832 m_cpt_read_cost = 0; 833 832 834 m_cpt_write_local = 0; 833 835 m_cpt_write_remote = 0; … … 835 837 m_cpt_write_flits_remote = 0; 836 838 m_cpt_write_cost = 0; 839 837 840 m_cpt_ll_local = 0; 838 841 m_cpt_ll_remote = 0; 839 842 m_cpt_ll_cost = 0; 843 840 844 m_cpt_sc_local = 0; 841 845 m_cpt_sc_remote = 0; 842 846 m_cpt_sc_cost = 0; 847 843 848 m_cpt_cas_local = 0; 844 849 m_cpt_cas_remote = 0; 845 850 m_cpt_cas_cost = 0; 851 846 852 m_cpt_update = 0; 847 853 m_cpt_update_local = 0; 848 854 m_cpt_update_remote = 0; 849 855 m_cpt_update_cost = 0; 856 850 857 m_cpt_minval = 0; 851 858 m_cpt_minval_local = 0; 852 859 m_cpt_minval_remote = 0; 853 860 m_cpt_minval_cost = 0; 861 854 862 m_cpt_binval = 0; 863 m_cpt_write_broadcast = 0; 864 855 865 m_cpt_cleanup_local = 0; 856 866 m_cpt_cleanup_remote = 0; 857 867 m_cpt_cleanup_cost = 0; 868 858 869 m_cpt_read_miss = 0; 859 870 m_cpt_write_miss = 0; 860 871 m_cpt_write_dirty = 0; 872 861 873 m_cpt_trt_rb = 0; 862 874 m_cpt_trt_full = 0; … … 915 927 << "[080] BROADCAT INVAL = " << m_cpt_binval << std::endl 916 928 << "[081] WRITE BROADCAST = " << m_cpt_write_broadcast << std::endl 929 << "[082] GETM BROADCAST = " << "0" << std::endl 917 930 << std::endl 918 931 << "[090] LOCAL CLEANUP = " << m_cpt_cleanup_local << std::endl 919 932 << "[091] REMOTE CLEANUP = " << m_cpt_cleanup_remote << std::endl 920 933 << "[092] CLNUP COST (FLITS * DIST) = " << m_cpt_cleanup_cost << std::endl 921 << "[093] CLEANUP DATA = " << "0" << std::endl 934 << "[093] LOCAL CLEANUP DATA = " << "0" << std::endl 935 << "[094] REMOTE CLEANUP DATA = " << "0" << std::endl 936 << "[095] CLEANUP DATA COST = " << "0" << std::endl 922 937 << std::endl 923 938 << "[100] READ MISS = " << m_cpt_read_miss << std::endl 924 939 << "[101] WRITE MISS = " << m_cpt_write_miss << std::endl 925 940 << "[102] WRITE DIRTY = " << m_cpt_write_dirty << std::endl 941 << "[103] GETM MISS = " << "0" << std::endl 926 942 << std::endl 927 943 << "[110] RD BLOCKED BY HIT IN TRT = " << m_cpt_trt_rb << std::endl … … 933 949 << "[140] NCC TO CC (READ) = " << "0" << std::endl 934 950 << "[141] NCC TO CC (WRITE) = " << "0" << std::endl 951 << std::endl 952 << "[150] LOCAL GETM = " << "0" << std::endl 953 << "[151] REMOTE GETM = " << "0" << std::endl 954 << "[152] GETM COST (FLITS * DIST) = " << "0" << std::endl 955 << std::endl 956 << "[160] LOCAL INVAL RO = " << "0" << std::endl 957 << "[161] REMOTE INVAL RO = " << "0" << std::endl 958 << "[162] INVAL RO COST = " << "0" << std::endl 935 959 << std::endl; 936 960 } 937 938 if (stats) { 939 std::cout << "----------------------------------" << std::dec << std::endl; 940 std::cout << "--- Calculated Stats ---" << std::dec << std::endl; 941 std::cout << "----------------------------------" << std::dec << std::endl; 942 std::cout 943 << "[300] READ TOTAL = " << m_cpt_read_local + m_cpt_read_remote << std::endl 944 << "[301] READ RATE = " << (double) (m_cpt_read_local + m_cpt_read_remote) / m_cpt_cycles << std::endl 945 << "[302] LOCAL READ RATE = " << (double) m_cpt_read_local / m_cpt_cycles << std::endl 946 << "[303] REMOTE READ RATE = " << (double) m_cpt_read_remote / m_cpt_cycles << std::endl 947 << "[304] READ MISS RATE = " << (double) m_cpt_read_miss / (m_cpt_read_local + m_cpt_read_remote) << std::endl 948 << std::endl 949 << "[305] WRITE TOTAL = " << m_cpt_write_local + m_cpt_write_remote << std::endl 950 << "[306] WRITE RATE = " << (double) (m_cpt_write_local + m_cpt_write_remote) / m_cpt_cycles << std::endl 951 << "[307] LOCAL WRITE RATE = " << (double) m_cpt_write_local / m_cpt_cycles << std::endl 952 << "[308] REMOTE WRITE RATE = " << (double) m_cpt_write_remote / m_cpt_cycles << std::endl 953 << "[309] WRITE MISS RATE = " << (double) m_cpt_write_miss / (m_cpt_write_local + m_cpt_write_remote) << std::endl 954 << "[310] WRITE BURST TOTAL = " << m_cpt_write_flits_local + m_cpt_write_flits_remote << std::endl 955 << "[311] WRITE BURST AVERAGE = " << (double) (m_cpt_write_flits_local + m_cpt_write_flits_remote) / (m_cpt_write_local + m_cpt_write_remote) << std::endl 956 << "[312] LOCAL WRITE BURST AV. = " << (double) m_cpt_write_flits_local / (m_cpt_write_local + m_cpt_write_remote) << std::endl 957 << "[313] REMOTE WRITE BURST AV = " << (double) m_cpt_write_flits_remote / (m_cpt_write_local + m_cpt_write_remote) << std::endl 958 << std::endl 959 << "[314] UPDATE RATE = " << (double) m_cpt_update / m_cpt_cycles << std::endl 960 << "[315] AV. UPDATE PER UP REQ = " << (double) (m_cpt_update_local + m_cpt_update_remote) / m_cpt_update << std::endl 961 << "[316] AV. LOC UPDT PER UP REQ = " << (double) m_cpt_update_local / m_cpt_update << std::endl 962 << "[317] AV. REMOTE UPDT PER UP REQ = " << (double) m_cpt_update_remote / m_cpt_update << std::endl 963 << std::endl 964 << "[318] INVAL MULTICAST RATE = " << (double) m_cpt_minval / m_cpt_cycles << std::endl 965 << "[319] AVE. INVAL PER M_INV = " << (double) (m_cpt_minval_local + m_cpt_minval_remote) / m_cpt_minval << std::endl 966 << "[320] AV. LOC INV PER M_INV = " << (double) m_cpt_minval_local / m_cpt_minval << std::endl 967 << "[321] AV. REM INV PER M_INV = " << (double) m_cpt_minval_remote / m_cpt_minval << std::endl 968 << std::endl 969 << "[322] INVAL BROADCAST RATE = " << (double) m_cpt_binval / m_cpt_cycles << std::endl 970 << "[323] WRITE DIRTY RATE = " << (double) m_cpt_write_dirty / m_cpt_cycles << std::endl 971 << std::endl 972 << "[324] CLEANUP RATE = " << (double) (m_cpt_cleanup_local + m_cpt_cleanup_remote) / m_cpt_cycles << std::endl 973 << "[325] LOCAL CLEANUP RATE = " << (double) m_cpt_cleanup_local / m_cpt_cycles << std::endl 974 << "[326] REMOTE CLEANUP RATE = " << (double) m_cpt_cleanup_remote / m_cpt_cycles << std::endl 975 << "[327] LL RATE = " << (double) (m_cpt_ll_local + m_cpt_ll_remote) / m_cpt_cycles << std::endl 976 << "[328] LOCAL LL RATE = " << (double) m_cpt_ll_local / m_cpt_cycles << std::endl 977 << "[329] REMOTE LL RATE = " << (double) m_cpt_ll_remote / m_cpt_cycles << std::endl 978 << "[330] SC RATE = " << (double) (m_cpt_sc_local + m_cpt_sc_remote) / m_cpt_cycles << std::endl 979 << "[331] LOCAL SC RATE = " << (double) m_cpt_sc_local / m_cpt_cycles << std::endl 980 << "[332] REMOTE SC RATE = " << (double) m_cpt_sc_remote / m_cpt_cycles << std::endl 981 << "[333] CAS RATE = " << (double) (m_cpt_cas_local + m_cpt_cas_remote) / m_cpt_cycles << std::endl 982 << "[334] LOCAL CAS RATE = " << (double) m_cpt_cas_local / m_cpt_cycles << std::endl 983 << "[335] REMOTE CAS RATE = " << (double) m_cpt_cas_remote / m_cpt_cycles << std::endl 984 << std::endl 985 << std::endl; 986 } 961 // No more computed stats 987 962 } 988 963 … … 1141 1116 m_cpt_cycles = 0; 1142 1117 m_cpt_reset_count = 0; 1118 1143 1119 m_cpt_read_local = 0; 1144 1120 m_cpt_read_remote = 0; 1145 1121 m_cpt_read_cost = 0; 1122 1146 1123 m_cpt_write_local = 0; 1147 1124 m_cpt_write_remote = 0; … … 1149 1126 m_cpt_write_flits_remote = 0; 1150 1127 m_cpt_write_cost = 0; 1128 1151 1129 m_cpt_ll_local = 0; 1152 1130 m_cpt_ll_remote = 0; 1153 1131 m_cpt_ll_cost = 0; 1132 1154 1133 m_cpt_sc_local = 0; 1155 1134 m_cpt_sc_remote = 0; 1156 1135 m_cpt_sc_cost = 0; 1136 1157 1137 m_cpt_cas_local = 0; 1158 1138 m_cpt_cas_remote = 0; 1159 1139 m_cpt_cas_cost = 0; 1140 1160 1141 m_cpt_update = 0; 1161 1142 m_cpt_update_local = 0; 1162 1143 m_cpt_update_remote = 0; 1163 1144 m_cpt_update_cost = 0; 1145 1164 1146 m_cpt_minval = 0; 1165 1147 m_cpt_minval_local = 0; 1166 1148 m_cpt_minval_remote = 0; 1167 1149 m_cpt_minval_cost = 0; 1150 1168 1151 m_cpt_binval = 0; 1152 m_cpt_write_broadcast = 0; 1153 1169 1154 m_cpt_cleanup_local = 0; 1170 1155 m_cpt_cleanup_remote = 0; 1171 1156 m_cpt_cleanup_cost = 0; 1172 1157 1173 m_cpt_read_miss = 0;1174 m_cpt_write_miss = 0;1175 m_cpt_write_dirty = 0;1176 m_cpt_write_broadcast = 0;1177 m_cpt_trt_rb = 0;1178 m_cpt_trt_full = 0;1179 m_cpt_get = 0;1180 m_cpt_put = 0;1158 m_cpt_read_miss = 0; 1159 m_cpt_write_miss = 0; 1160 m_cpt_write_dirty = 0; 1161 1162 m_cpt_trt_rb = 0; 1163 m_cpt_trt_full = 0; 1164 m_cpt_get = 0; 1165 m_cpt_put = 0; 1181 1166 1182 1167 return; … … 1692 1677 // <Activity counters> 1693 1678 if (p_vci_tgt.cmd.read() == vci_param_int::CMD_LOCKED_READ) { 1694 if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_ll_local++; 1695 else m_cpt_ll_remote++; 1696 m_cpt_ll_cost += req_distance(p_vci_tgt.srcid.read()); // LL on a single word 1679 if (is_local_req(p_vci_tgt.srcid.read())) 1680 { 1681 m_cpt_ll_local++; 1682 } 1683 else 1684 { 1685 m_cpt_ll_remote++; 1686 } 1687 // (1 (CMD) + 2 (RSP)) VCI flits for LL => 2 + 3 dspin flits 1688 m_cpt_ll_cost += 5 * req_distance(p_vci_tgt.srcid.read()); 1697 1689 } 1698 1690 else { 1699 if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_read_local++; 1700 else m_cpt_read_remote++; 1701 m_cpt_read_cost += req_distance(p_vci_tgt.srcid.read()); 1691 if (is_local_req(p_vci_tgt.srcid.read())) 1692 { 1693 m_cpt_read_local++; 1694 } 1695 else 1696 { 1697 m_cpt_read_remote++; 1698 } 1699 // (1 (CMD) + m_words (RSP)) flits VCI => 2 + m_words + 1 flits dspin 1700 m_cpt_read_cost += (3 + m_words) * req_distance(p_vci_tgt.srcid.read()); 1702 1701 } 1703 1702 // </Activity counters> … … 1710 1709 if (p_vci_tgt.cmdval and m_cmd_write_addr_fifo.wok()) 1711 1710 { 1712 1711 uint32_t plen = p_vci_tgt.plen.read(); 1713 1712 #if DEBUG_MEMC_TGT_CMD 1714 1713 if (m_debug) … … 1725 1724 // <Activity counters> 1726 1725 if (p_vci_tgt.cmd.read() == vci_param_int::CMD_NOP) { 1727 m_cpt_sc_cost += req_distance(p_vci_tgt.srcid.read()); 1726 // (2 (CMD) + 1 (RSP)) flits VCI => 4 + (1 (success) || 2 (failure)) flits dspin 1727 m_cpt_sc_cost += 5 * req_distance(p_vci_tgt.srcid.read()); 1728 1728 } 1729 1729 else { 1730 if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_write_flits_local++; 1731 else m_cpt_write_flits_remote++; 1732 m_cpt_write_cost += req_distance(p_vci_tgt.srcid.read()); 1730 if (is_local_req(p_vci_tgt.srcid.read())) 1731 { 1732 m_cpt_write_flits_local++; 1733 } 1734 else 1735 { 1736 m_cpt_write_flits_remote++; 1737 } 1738 // (burst_size (CMD) + 1 (RSP) flits VCI => 2 + burst_size + 1 flits dspin 1739 m_cpt_write_cost += (3 + (plen >> 2)) * req_distance(p_vci_tgt.srcid.read()); 1733 1740 } 1734 1741 // </Activity counters> … … 1737 1744 // <Activity counters> 1738 1745 if (p_vci_tgt.cmd.read() == vci_param_int::CMD_NOP) { 1739 if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_sc_local++; 1740 else m_cpt_sc_remote++; 1741 1746 if (is_local_req(p_vci_tgt.srcid.read())) 1747 { 1748 m_cpt_sc_local++; 1749 } 1750 else 1751 { 1752 m_cpt_sc_remote++; 1753 } 1742 1754 } 1743 1755 else { 1744 if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_write_local++; 1745 else m_cpt_write_remote++; 1756 if (is_local_req(p_vci_tgt.srcid.read())) 1757 { 1758 m_cpt_write_local++; 1759 } 1760 else 1761 { 1762 m_cpt_write_remote++; 1763 } 1746 1764 } 1747 1765 // </Activity counters> … … 1777 1795 if (p_vci_tgt.eop) { 1778 1796 // <Activity counters> 1779 if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_cas_local++; 1780 else m_cpt_cas_remote++; 1781 m_cpt_cas_cost += req_distance(p_vci_tgt.srcid.read()); 1797 if (is_local_req(p_vci_tgt.srcid.read())) 1798 { 1799 m_cpt_cas_local++; 1800 } 1801 else 1802 { 1803 m_cpt_cas_remote++; 1804 } 1805 // (2 (CMD) + 1 (RSP)) flits VCI => 4 + (1 (success) || 2 (failure)) flits dspin 1806 m_cpt_cas_cost += 5 * req_distance(p_vci_tgt.srcid.read()); 1782 1807 // </Activity counters> 1783 1808 r_tgt_cmd_fsm = TGT_CMD_IDLE; … … 6575 6600 { 6576 6601 m_cpt_minval_remote++; 6577 m_cpt_minval_cost += req_distance(m_config_to_cc_send_srcid_fifo.read()); 6578 } 6602 } 6603 // 2 flits for multi inval 6604 m_cpt_minval_cost += 2 * req_distance(m_config_to_cc_send_srcid_fifo.read()); 6579 6605 // </Activity Counters> 6580 6606 r_cc_send_fsm = CC_SEND_CONFIG_INVAL_NLINE; … … 6642 6668 { 6643 6669 m_cpt_minval_remote++; 6644 m_cpt_minval_cost += req_distance(m_xram_rsp_to_cc_send_srcid_fifo.read()); 6645 } 6670 } 6671 // 2 flits for multi inval 6672 m_cpt_minval_cost += 2 * req_distance(m_xram_rsp_to_cc_send_srcid_fifo.read()); 6646 6673 // </Activity Counters> 6647 6674 r_cc_send_fsm = CC_SEND_XRAM_RSP_INVAL_NLINE; … … 6737 6764 { 6738 6765 m_cpt_update_remote++; 6739 m_cpt_update_cost += req_distance(m_write_to_cc_send_srcid_fifo.read()); 6740 } 6766 } 6767 // 2 flits for multi update 6768 m_cpt_update_cost += 2 * req_distance(m_write_to_cc_send_srcid_fifo.read()); 6741 6769 // </Activity Counters> 6742 6770 … … 6826 6854 { 6827 6855 m_cpt_update_remote++; 6828 m_cpt_update_cost += req_distance(m_cas_to_cc_send_srcid_fifo.read()); 6829 } 6856 } 6857 // 2 flits for multi update 6858 m_cpt_update_cost += 2 * req_distance(m_cas_to_cc_send_srcid_fifo.read()); 6830 6859 // </Activity Counters> 6831 6860 r_cc_send_fsm = CC_SEND_CAS_UPDT_NLINE; … … 6951 6980 else { 6952 6981 m_cpt_cleanup_remote++; 6953 m_cpt_cleanup_cost += req_distance(srcid); 6954 } 6982 } 6983 // 2 flits for cleanup without data 6984 m_cpt_cleanup_cost += 2 * req_distance(srcid); 6955 6985 // </Activity Counters> 6956 6986
Note: See TracChangeset
for help on using the changeset viewer.