Changeset 910 for branches/MESI/modules/vci_mem_cache
- Timestamp:
- Dec 19, 2014, 4:45:08 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/MESI/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp
r838 r910 678 678 uint8_t req_y = (req_srcid >> (srcid_width - m_x_width - m_y_width)) & ((1 << m_y_width) - 1); 679 679 680 return abs(m_x_self - req_x) + abs(m_y_self - req_y) ;680 return abs(m_x_self - req_x) + abs(m_y_self - req_y) + 1; 681 681 } 682 682 … … 686 686 ///////////////////////////////////////////////////// 687 687 { 688 return req_distance(req_srcid) == 0;688 return req_distance(req_srcid) == 1; 689 689 } 690 690 … … 1858 1858 cmd_write_fifo_put = true; 1859 1859 // <Activity counters> 1860 if (p_vci_tgt.cmd.read() == vci_param_int::CMD_NOP) { 1861 // (2 (CMD) + 1 (RSP)) flits VCI => 4 + (1 (success) || 2 (failure)) flits dspin 1862 m_cpt_sc_cost += 5 * req_distance(p_vci_tgt.srcid.read()); 1863 } 1864 else { 1860 if (p_vci_tgt.cmd.read() != vci_param_int::CMD_NOP) { 1865 1861 if (is_local_req(p_vci_tgt.srcid.read())) 1866 1862 { … … 1871 1867 m_cpt_write_flits_remote++; 1872 1868 } 1873 // (burst_size (CMD) + 1 (RSP) flits VCI => 2 + burst_size + 1 flits dspin1874 m_cpt_write_cost += (3 + (plen >> 2)) * req_distance(p_vci_tgt.srcid.read());1875 1869 } 1876 1870 // </Activity counters> … … 1879 1873 // <Activity counters> 1880 1874 if (p_vci_tgt.cmd.read() == vci_param_int::CMD_NOP) { 1875 // SC 1876 // (2 (CMD) + 1 (RSP)) flits VCI => 4 + (1 (success) || 2 (failure)) flits dspin 1877 m_cpt_sc_cost += 5 * req_distance(p_vci_tgt.srcid.read()); 1878 1881 1879 if (is_local_req(p_vci_tgt.srcid.read())) 1882 1880 { … … 1889 1887 } 1890 1888 else { 1889 // WRITE 1890 // (burst_size + 1 (CMD) + 1 (RSP)) flits VCI => 2 + burst_size + 1 flits dspin 1891 m_cpt_write_cost += (3 + (plen >> 2)) * req_distance(p_vci_tgt.srcid.read()); 1892 1891 1893 if (is_local_req(p_vci_tgt.srcid.read())) 1892 1894 {
Note: See TracChangeset
for help on using the changeset viewer.