Changeset 908 for trunk/modules/vci_mem_cache
- Timestamp:
- Dec 19, 2014, 4:17:17 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp
r891 r908 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 … … 1726 1726 cmd_write_fifo_put = true; 1727 1727 // <Activity counters> 1728 if (p_vci_tgt.cmd.read() == vci_param_int::CMD_NOP) 1729 { 1730 // (2 (CMD) + 1 (RSP)) flits VCI => 4 + (1 (success) || 2 (failure)) flits dspin 1731 m_cpt_sc_cost += 5 * req_distance(p_vci_tgt.srcid.read()); 1732 } 1733 else { 1728 if (p_vci_tgt.cmd.read() != vci_param_int::CMD_NOP) { 1734 1729 if (is_local_req(p_vci_tgt.srcid.read())) 1735 1730 { … … 1740 1735 m_cpt_write_flits_remote++; 1741 1736 } 1742 // (burst_size (CMD) + 1 (RSP) flits VCI => 2 + burst_size + 1 flits dspin1743 m_cpt_write_cost += (3 + (plen >> 2)) * req_distance(p_vci_tgt.srcid.read());1744 1737 } 1745 1738 // </Activity counters> … … 1750 1743 if (p_vci_tgt.cmd.read() == vci_param_int::CMD_NOP) 1751 1744 { 1745 // SC 1746 // (2 (CMD) + 1 (RSP)) flits VCI => 4 + (1 (success) || 2 (failure)) flits dspin 1747 m_cpt_sc_cost += 5 * req_distance(p_vci_tgt.srcid.read()); 1752 1748 if (is_local_req(p_vci_tgt.srcid.read())) 1753 1749 { … … 1760 1756 } 1761 1757 else { 1758 // Writes 1759 // (burst_size + 1 (CMD) + 1 (RSP)) flits VCI => 2 + burst_size + 1 flits dspin 1760 m_cpt_write_cost += (3 + (plen >> 2)) * req_distance(p_vci_tgt.srcid.read()); 1761 1762 1762 if (is_local_req(p_vci_tgt.srcid.read())) 1763 1763 {
Note: See TracChangeset
for help on using the changeset viewer.