- Timestamp:
- Sep 2, 2010, 2:22:12 PM (14 years ago)
- Location:
- trunk/modules
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_cc_xcache_wrapper_v1/caba/source/src/vci_cc_xcache_wrapper_v1.cpp
r2 r82 434 434 435 435 // multi-update or multi-invalidate for data type 436 if ( ( address!= 0x3) && (! m_segment.contains(address)) )436 if ( ((address&0x3) != 0x3) && (! m_segment.contains(address)) ) 437 437 { 438 438 std::cout << "error in component VCI_CC_XCACHE_WRAPPER " << name() << std::endl; … … 448 448 r_tgt_plen = p_vci_tgt.plen.read(); 449 449 450 if ( address== 0x3 ) // broadcast invalidate for data or instruction type450 if ( (address&0x3) == 0x3 ) // broadcast invalidate for data or instruction type 451 451 { 452 452 if ( ! p_vci_tgt.eop.read() ) … … 1487 1487 r_vci_rsp_fsm = RSP_IDLE; 1488 1488 } 1489 if ( p_vci_ini_rw.rerror.read() != vci_param::ERR_NORMAL ) r_vci_rsp_ins_error = true;1489 if ( (p_vci_ini_rw.rerror.read()&0x1) != vci_param::ERR_NORMAL ) r_vci_rsp_ins_error = true; 1490 1490 break; 1491 1491 … … 1499 1499 r_vci_rsp_fsm = RSP_IDLE; 1500 1500 r_icache_unc_req = false; 1501 if ( p_vci_ini_rw.rerror.read() != vci_param::ERR_NORMAL ) r_vci_rsp_ins_error = true;1501 if ( (p_vci_ini_rw.rerror.read()&0x1) != vci_param::ERR_NORMAL ) r_vci_rsp_ins_error = true; 1502 1502 break; 1503 1503 … … 1516 1516 r_vci_rsp_fsm = RSP_IDLE; 1517 1517 } 1518 if ( p_vci_ini_rw.rerror.read() != vci_param::ERR_NORMAL ) r_vci_rsp_data_error = true;1518 if ( (p_vci_ini_rw.rerror.read()&0x1) != vci_param::ERR_NORMAL ) r_vci_rsp_data_error = true; 1519 1519 break; 1520 1520 … … 1527 1527 r_dcache_write_req = false; 1528 1528 } 1529 if ( p_vci_ini_rw.rerror.read() != vci_param::ERR_NORMAL ) m_iss.setWriteBerr();1529 if ( (p_vci_ini_rw.rerror.read()&0x1) != vci_param::ERR_NORMAL ) m_iss.setWriteBerr(); 1530 1530 break; 1531 1531 … … 1539 1539 r_vci_rsp_fsm = RSP_IDLE; 1540 1540 r_dcache_unc_req = false; 1541 if ( p_vci_ini_rw.rerror.read() != vci_param::ERR_NORMAL ) r_vci_rsp_data_error = true;1541 if ( (p_vci_ini_rw.rerror.read()&0x1) != vci_param::ERR_NORMAL ) r_vci_rsp_data_error = true; 1542 1542 break; 1543 1543 … … 1548 1548 assert( p_vci_ini_c.reop.read() && 1549 1549 "illegal VCI response packet for icache cleanup"); 1550 assert( ( p_vci_ini_c.rerror.read() == vci_param::ERR_NORMAL) &&1550 assert( ((p_vci_ini_c.rerror.read()&0x1) == vci_param::ERR_NORMAL) && 1551 1551 "error in response packet for icache cleanup"); 1552 1552 if ( r_vci_rsp_fsm == RSP_INS_CLEANUP ) r_icache_cleanup_req = false; … … 1887 1887 p_vci_tgt.rtrdid = r_tgt_trdid.read(); 1888 1888 p_vci_tgt.rdata = 0; 1889 p_vci_tgt.rerror = 0 ;1889 p_vci_tgt.rerror = 0x2 & ( (1 << (vci_param::E + 1)) - 1); // Write OK 1890 1890 p_vci_tgt.reop = true; 1891 1891 break; … … 1898 1898 p_vci_tgt.rtrdid = r_tgt_trdid.read(); 1899 1899 p_vci_tgt.rdata = 0; 1900 p_vci_tgt.rerror = 0 ;1900 p_vci_tgt.rerror = 0x2 & ( (1 << (vci_param::E + 1)) - 1); // Write OK 1901 1901 p_vci_tgt.reop = true; 1902 1902 break; … … 1909 1909 p_vci_tgt.rtrdid = r_tgt_trdid.read(); 1910 1910 p_vci_tgt.rdata = 0; 1911 p_vci_tgt.rerror = 0 ;1911 p_vci_tgt.rerror = 0x2 & ( (1 << (vci_param::E + 1)) - 1); // Write OK 1912 1912 p_vci_tgt.reop = true; 1913 1913 break; -
trunk/modules/vci_cc_xcache_wrapper_v4/caba/source/src/vci_cc_xcache_wrapper_v4.cpp
r58 r82 432 432 433 433 // multi-update or multi-invalidate for data type 434 if ( ( address!= 0x3) && (! m_segment.contains(address)) )434 if ( ((address&0x3) != 0x3) && (! m_segment.contains(address)) ) 435 435 { 436 436 std::cout << "error in component VCI_CC_XCACHE_WRAPPER " << name() << std::endl; … … 446 446 r_tgt_plen = p_vci_tgt.plen.read(); 447 447 448 if ( address== 0x3 ) // broadcast invalidate for data or instruction type448 if ( (address&0x3) == 0x3 ) // broadcast invalidate for data or instruction type 449 449 { 450 450 if ( ! p_vci_tgt.eop.read() ) … … 1558 1558 r_vci_rsp_fsm = RSP_IDLE; 1559 1559 } 1560 if ( p_vci_ini_rw.rerror.read() != vci_param::ERR_NORMAL ) r_vci_rsp_ins_error = true;1560 if ( (p_vci_ini_rw.rerror.read()&0x1) != vci_param::ERR_NORMAL ) r_vci_rsp_ins_error = true; 1561 1561 break; 1562 1562 … … 1570 1570 r_vci_rsp_fsm = RSP_IDLE; 1571 1571 r_icache_unc_req = false; 1572 if ( p_vci_ini_rw.rerror.read() != vci_param::ERR_NORMAL ) r_vci_rsp_ins_error = true;1572 if ( (p_vci_ini_rw.rerror.read()&0x1) != vci_param::ERR_NORMAL ) r_vci_rsp_ins_error = true; 1573 1573 break; 1574 1574 … … 1587 1587 r_vci_rsp_fsm = RSP_IDLE; 1588 1588 } 1589 if ( p_vci_ini_rw.rerror.read() != vci_param::ERR_NORMAL ) r_vci_rsp_data_error = true;1589 if ( (p_vci_ini_rw.rerror.read()&0x1) != vci_param::ERR_NORMAL ) r_vci_rsp_data_error = true; 1590 1590 break; 1591 1591 … … 1598 1598 r_dcache_write_req = false; 1599 1599 } 1600 if ( p_vci_ini_rw.rerror.read() != vci_param::ERR_NORMAL ) m_iss.setWriteBerr();1600 if ( (p_vci_ini_rw.rerror.read()&0x1) != vci_param::ERR_NORMAL ) m_iss.setWriteBerr(); 1601 1601 break; 1602 1602 … … 1610 1610 r_vci_rsp_fsm = RSP_IDLE; 1611 1611 r_dcache_unc_req = false; 1612 if ( p_vci_ini_rw.rerror.read() != vci_param::ERR_NORMAL ) r_vci_rsp_data_error = true;1612 if ( (p_vci_ini_rw.rerror.read()&0x1) != vci_param::ERR_NORMAL ) r_vci_rsp_data_error = true; 1613 1613 break; 1614 1614 … … 1622 1622 r_vci_rsp_fsm = RSP_IDLE; 1623 1623 r_dcache_sc_req = false; 1624 if ( p_vci_ini_rw.rerror.read() != vci_param::ERR_NORMAL ) r_vci_rsp_data_error = true;1624 if ( (p_vci_ini_rw.rerror.read()&0x1) != vci_param::ERR_NORMAL ) r_vci_rsp_data_error = true; 1625 1625 break; 1626 1626 … … 1631 1631 assert( p_vci_ini_c.reop.read() && 1632 1632 "illegal VCI response packet for icache cleanup"); 1633 assert( ( p_vci_ini_c.rerror.read() == vci_param::ERR_NORMAL) &&1633 assert( ((p_vci_ini_c.rerror.read()&0x1) == vci_param::ERR_NORMAL) && 1634 1634 "error in response packet for icache cleanup"); 1635 1635 if ( r_vci_rsp_fsm == RSP_INS_CLEANUP ) r_icache_cleanup_req = false; … … 2011 2011 p_vci_tgt.rtrdid = r_tgt_trdid.read(); 2012 2012 p_vci_tgt.rdata = 0; 2013 p_vci_tgt.rerror = 0 ;2013 p_vci_tgt.rerror = 0x2 & ( (1 << (vci_param::E + 1)) - 1); // Write OK 2014 2014 p_vci_tgt.reop = true; 2015 2015 break; … … 2022 2022 p_vci_tgt.rtrdid = r_tgt_trdid.read(); 2023 2023 p_vci_tgt.rdata = 0; 2024 p_vci_tgt.rerror = 0 ;2024 p_vci_tgt.rerror = 0x2 & ( (1 << (vci_param::E + 1)) - 1); // Write OK 2025 2025 p_vci_tgt.reop = true; 2026 2026 break; … … 2033 2033 p_vci_tgt.rtrdid = r_tgt_trdid.read(); 2034 2034 p_vci_tgt.rdata = 0; 2035 p_vci_tgt.rerror = 0 ;2035 p_vci_tgt.rerror = 0x2 & ( (1 << (vci_param::E + 1)) - 1); // Write OK 2036 2036 p_vci_tgt.reop = true; 2037 2037 break; -
trunk/modules/vci_mem_cache_v2/caba/source/include/vci_mem_cache_v2.h
r2 r82 334 334 const soclib::common::AddressMaskingTable<vci_addr_t> m_nline; 335 335 336 // broadcast address 337 vci_addr_t broadcast_addr; 338 336 339 ////////////////////////////////////////////////// 337 340 // Others registers … … 448 451 sc_signal<copy_t> r_write_to_init_cmd_d_copies; // bit_vector of L1 to update 449 452 sc_signal<data_t> *r_write_to_init_cmd_data; // data (one cache line) 450 sc_signal<b ool> *r_write_to_init_cmd_we; // word enable453 sc_signal<be_t> *r_write_to_init_cmd_be; // word enable 451 454 sc_signal<size_t> r_write_to_init_cmd_count; // number of words in line 452 455 sc_signal<size_t> r_write_to_init_cmd_index; // index of first word in line -
trunk/modules/vci_mem_cache_v2/caba/source/src/vci_mem_cache_v2.cpp
r59 r82 34 34 //#define DEBUG_VCI_MEM_CACHE 1 35 35 #define RANDOMIZE_SC 36 #define DEBUG_START_CYCLE 33069000 36 37 37 38 namespace soclib { namespace caba { … … 295 296 296 297 298 // Set the broadcast address with Xmin,Xmax,Ymin,Ymax set to maximum 299 broadcast_addr = 0x3 | (0x7C1F << (vci_param::N-20)); 300 297 301 // Get the segments associated to the MemCache 298 302 std::list<soclib::common::Segment>::iterator seg; … … 348 352 r_write_be = new sc_signal<be_t>[nwords]; 349 353 r_write_to_init_cmd_data = new sc_signal<data_t>[nwords]; 350 r_write_to_init_cmd_ we = new sc_signal<bool>[nwords];354 r_write_to_init_cmd_be = new sc_signal<be_t>[nwords]; 351 355 r_write_to_ixr_cmd_data = new sc_signal<data_t>[nwords]; 352 356 … … 530 534 531 535 #if DEBUG_VCI_MEM_CACHE 536 if(m_cpt_cycles > DEBUG_START_CYCLE){ 532 537 std::cout << "---------------------------------------------" << std::dec << std::endl; 533 538 std::cout << "MEM_CACHE " << m_srcid_ini << " ; Time = " << m_cpt_cycles << std::endl … … 546 551 << " - ALLOC_TRT FSM = " << alloc_trt_fsm_str[r_alloc_trt_fsm] << std::endl 547 552 << " - ALLOC_UPT FSM = " << alloc_upt_fsm_str[r_alloc_upt_fsm] << std::endl; 553 } 548 554 #endif 549 555 … … 700 706 bool valid = m_update_tab.decrement(r_init_rsp_upt_index.read(), count); 701 707 #ifdef IDEBUG 708 if(m_cpt_cycles > DEBUG_START_CYCLE){ 702 709 std::cout << sc_time_stamp() << " " << name() << " INIT_RSP_UPT_LOCK update table : " << std::endl; 703 710 m_update_tab.print(); 711 } 704 712 #endif 705 713 assert ( valid … … 724 732 m_update_tab.clear(r_init_rsp_upt_index.read()); 725 733 #ifdef IDEBUG 734 if(m_cpt_cycles > DEBUG_START_CYCLE){ 726 735 std::cout << sc_time_stamp() << " " << name() << " INIT_RSP_UPT_CLEAR update table : " << std::endl; 727 736 m_update_tab.print(); 737 } 728 738 #endif 729 739 } … … 777 787 DirectoryEntry entry = m_cache_directory.read(m_cmd_read_addr_fifo.read(), way); 778 788 #ifdef DDEBUG 789 if(m_cpt_cycles > DEBUG_START_CYCLE){ 779 790 std::cout << "In READ_DIR_LOCK printing the entry of address is : " << std::hex << m_cmd_read_addr_fifo.read() << std::endl; 780 791 entry.print(); 781 792 std::cout << "done" << std::endl; 793 } 782 794 #endif 783 795 … … 832 844 } 833 845 if(!inst_read && !is_cnt){ // Data read, vector mode 834 assert(!(r_read_d_copies.read() & (0x1 << m_cmd_read_srcid_fifo.read())) && "MemCache Error : processor read on an already owned cache line"); 846 if(r_read_d_copies.read() & (0x1 << m_cmd_read_srcid_fifo.read())) { 847 std::cout << "MemCache Error : processor read on an already owned cache line, Time : " << m_cpt_cycles << std::endl; 848 exit(0); 849 } 835 850 entry.d_copies = r_read_d_copies.read() | (0x1 << m_cmd_read_srcid_fifo.read()); 836 851 entry.i_copies = r_read_i_copies.read(); … … 848 863 } 849 864 #ifdef DDEBUG 865 if(m_cpt_cycles > DEBUG_START_CYCLE){ 850 866 std::cout << "In READ_DIR_HIT printing the entry of address is : " << std::endl; 851 867 entry.print(); 852 868 std::cout << "done" << std::endl; 869 } 853 870 #endif 854 871 … … 881 898 if ( r_alloc_trt_fsm.read() == ALLOC_TRT_READ ) { 882 899 #ifdef TDEBUG 900 if(m_cpt_cycles > DEBUG_START_CYCLE){ 883 901 std::cout << sc_time_stamp() << " " << name() << " READ_TRT_LOCK " << std::endl; 902 } 884 903 #endif 885 904 size_t index = 0; … … 912 931 std::vector<data_t>(m_words,0)); 913 932 #ifdef TDEBUG 933 if(m_cpt_cycles > DEBUG_START_CYCLE){ 914 934 std::cout << sc_time_stamp() << " " << name() << " READ_TRT_SET transaction table : " << std::endl; 915 935 for(size_t i = 0 ; i < m_transaction_tab.size() ; i++) 916 936 m_transaction_tab.print(i); 937 } 917 938 #endif 918 939 … … 1178 1199 index); 1179 1200 #ifdef IDEBUG 1201 if(m_cpt_cycles > DEBUG_START_CYCLE){ 1180 1202 if(wok){ 1181 1203 std::cout << sc_time_stamp() << " " << name() << " WRITE_UPT_LOCK update table : " << std::endl; 1182 1204 m_update_tab.print(); 1183 1205 } 1206 } 1184 1207 #endif 1185 1208 r_write_upt_index = index; … … 1210 1233 1211 1234 for(size_t i=0; i<m_words ; i++){ 1212 if(r_write_be[i].read()) r_write_to_init_cmd_we[i]=true; 1213 else r_write_to_init_cmd_we[i]=false; 1235 r_write_to_init_cmd_be[i]=r_write_be[i].read(); 1214 1236 } 1215 1237 … … 1241 1263 if ( r_alloc_trt_fsm.read() == ALLOC_TRT_WRITE ) { 1242 1264 #ifdef TDEBUG 1265 if(m_cpt_cycles > DEBUG_START_CYCLE){ 1243 1266 std::cout << sc_time_stamp() << " " << name() << " READ_TRT_LOCK " << std::endl; 1267 } 1244 1268 #endif 1245 1269 size_t hit_index = 0; … … 1292 1316 data_vector); 1293 1317 #ifdef TDEBUG 1318 if(m_cpt_cycles > DEBUG_START_CYCLE){ 1294 1319 std::cout << sc_time_stamp() << " " << name() << " WRITE_TRT_SET transaction table : " << std::endl; 1295 1320 for(size_t i = 0 ; i < m_transaction_tab.size() ; i++) 1296 1321 m_transaction_tab.print(i); 1322 } 1297 1323 #endif 1298 1324 … … 1318 1344 r_write_fsm = WRITE_RSP; 1319 1345 #ifdef TDEBUG 1346 if(m_cpt_cycles > DEBUG_START_CYCLE){ 1320 1347 std::cout << sc_time_stamp() << " " << name() << " WRITE_TRT_DATA transaction table : " << std::endl; 1321 1348 for(size_t i = 0 ; i < m_transaction_tab.size() ; i++) 1322 1349 m_transaction_tab.print(i); 1350 } 1323 1351 #endif 1324 1352 … … 1377 1405 index); 1378 1406 #ifdef IDEBUG 1407 if(m_cpt_cycles > DEBUG_START_CYCLE){ 1379 1408 if(wok){ 1380 1409 std::cout << sc_time_stamp() << " " << name() << " WRITE_INVAL_LOCK update table : " << std::endl; 1381 1410 m_update_tab.print(); 1382 1411 } 1412 } 1383 1413 #endif 1384 1414 r_write_upt_index = index; … … 1408 1438 std::vector<data_t>(m_words,0)); 1409 1439 #ifdef TDEBUG 1440 if(m_cpt_cycles > DEBUG_START_CYCLE){ 1410 1441 std::cout << sc_time_stamp() << " " << name() << " WRITE_DIR_INVAL transaction table : " << std::endl; 1411 1442 for(size_t i = 0 ; i < m_transaction_tab.size() ; i++) 1412 1443 m_transaction_tab.print(i); 1444 } 1413 1445 #endif 1414 1446 … … 1447 1479 1448 1480 for(size_t i=0; i<m_words ; i++){ 1449 r_write_to_init_cmd_ we[i]=false;1481 r_write_to_init_cmd_be[i]=0; 1450 1482 r_write_to_init_cmd_data[i] = 0; 1451 1483 } … … 1617 1649 r_ixr_rsp_fsm = IXR_RSP_IDLE; 1618 1650 #ifdef TDEBUG 1651 if(m_cpt_cycles > DEBUG_START_CYCLE){ 1619 1652 std::cout << sc_time_stamp() << " " << name() << " IXR_RSP_TRT_ERASE transaction table : " << std::endl; 1620 1653 for(size_t i = 0 ; i < m_transaction_tab.size() ; i++) 1621 1654 m_transaction_tab.print(i); 1655 } 1622 1656 #endif 1623 1657 … … 1638 1672 if ( eop ) { 1639 1673 #ifdef TDEBUG 1674 if(m_cpt_cycles > DEBUG_START_CYCLE){ 1640 1675 std::cout << sc_time_stamp() << " " << name() << " IXR_RSP_TRT_READ transaction table : " << std::endl; 1641 1676 for(size_t i = 0 ; i < m_transaction_tab.size() ; i++) 1642 1677 m_transaction_tab.print(i); 1678 } 1643 1679 #endif 1644 1680 … … 1687 1723 break; 1688 1724 #ifdef TDEBUG 1725 if(m_cpt_cycles > DEBUG_START_CYCLE){ 1689 1726 std::cout << "XRAM_RSP FSM in XRAM_RSP_IDLE state" << std::endl; 1727 } 1690 1728 #endif 1691 1729 } … … 1699 1737 r_xram_rsp_fsm = XRAM_RSP_TRT_COPY; 1700 1738 #ifdef TDEBUG 1739 if(m_cpt_cycles > DEBUG_START_CYCLE){ 1701 1740 std::cout << "XRAM_RSP FSM in XRAM_RSP_DIR_LOCK state" << std::endl; 1741 } 1702 1742 #endif 1703 1743 } … … 1734 1774 r_xram_rsp_fsm = XRAM_RSP_INVAL_LOCK; 1735 1775 #ifdef TDEBUG 1776 if(m_cpt_cycles > DEBUG_START_CYCLE){ 1736 1777 std::cout << "XRAM_RSP FSM in XRAM_RSP_TRT_COPY state" << std::endl; 1737 1778 std::cout << "Victim way : " << std::hex << way << " set " << std::hex << set << std::endl; 1738 1779 victim.print(); 1780 } 1739 1781 #endif 1740 1782 } … … 1746 1788 if ( r_alloc_upt_fsm == ALLOC_UPT_XRAM_RSP ) { 1747 1789 #ifdef IDEBUG 1790 if(m_cpt_cycles > DEBUG_START_CYCLE){ 1748 1791 std::cout << "XRAM_RSP FSM in XRAM_RSP_INVAL_LOCK state" << std::endl; 1792 } 1749 1793 #endif 1750 1794 size_t index; … … 1752 1796 r_xram_rsp_fsm = XRAM_RSP_INVAL_WAIT; 1753 1797 #ifdef IDEBUG 1798 if(m_cpt_cycles > DEBUG_START_CYCLE){ 1754 1799 std::cout << "XRAM_RSP FSM in XRAM_RSP_INVAL_LOCK state to XRAM_RSP_INVAL_WAIT state" << std::endl; 1800 } 1755 1801 #endif 1756 1802 … … 1759 1805 r_xram_rsp_fsm = XRAM_RSP_INVAL_WAIT; 1760 1806 #ifdef IDEBUG 1807 if(m_cpt_cycles > DEBUG_START_CYCLE){ 1761 1808 std::cout << "XRAM_RSP FSM in XRAM_RSP_INVAL_LOCK state to XRAM_RSP_INVAL_WAIT state" << std::endl; 1809 } 1762 1810 #endif 1763 1811 } … … 1765 1813 r_xram_rsp_fsm = XRAM_RSP_DIR_UPDT; 1766 1814 #ifdef IDEBUG 1815 if(m_cpt_cycles > DEBUG_START_CYCLE){ 1767 1816 std::cout << "XRAM_RSP FSM in XRAM_RSP_INVAL_LOCK state to XRAM_RSP_DIR_UPDT state" << std::endl; 1817 } 1768 1818 #endif 1769 1819 } … … 1777 1827 break; 1778 1828 #ifdef IDEBUG 1829 if(m_cpt_cycles > DEBUG_START_CYCLE){ 1779 1830 std::cout << "XRAM_RSP FSM in XRAM_RSP_INVAL_WAIT state" << std::endl; 1831 } 1780 1832 #endif 1781 1833 } … … 1822 1874 m_cache_directory.write(set, way, entry); 1823 1875 #ifdef DDEBUG 1876 if(m_cpt_cycles > DEBUG_START_CYCLE){ 1824 1877 std::cout << "printing the entry : " << std::endl; 1825 1878 entry.print(); 1826 1879 std::cout << "done" << std::endl; 1880 } 1827 1881 #endif 1828 1882 1829 1883 #ifdef TDEBUG 1884 if(m_cpt_cycles > DEBUG_START_CYCLE){ 1830 1885 std::cout << sc_time_stamp() << " " << name() << " XRAM_RSP_DIR_UPDT transaction table : " << std::endl; 1831 1886 for(size_t i = 0 ; i < m_transaction_tab.size() ; i++) 1832 1887 m_transaction_tab.print(i); 1888 } 1833 1889 #endif 1834 1890 … … 1849 1905 1850 1906 #ifdef IDEBUG 1907 if(m_cpt_cycles > DEBUG_START_CYCLE){ 1851 1908 std::cout << "xram_rsp : record invalidation, time = " << std::dec << m_cpt_cycles << std::endl; 1852 1909 m_update_tab.print(); 1910 } 1853 1911 #endif 1854 1912 r_xram_rsp_upt_index = index; … … 1885 1943 std::vector<data_t>(m_words,0) ); 1886 1944 #ifdef TDEBUG 1945 if(m_cpt_cycles > DEBUG_START_CYCLE){ 1887 1946 std::cout << sc_time_stamp() << " " << name() << " XRAM_RSP_TRT_DIRTY transaction table : " << std::endl; 1888 1947 for(size_t i = 0 ; i < m_transaction_tab.size() ; i++) 1889 1948 m_transaction_tab.print(i); 1949 } 1890 1950 #endif 1891 1951 … … 1915 1975 1916 1976 #ifdef DDEBUG 1977 if(m_cpt_cycles > DEBUG_START_CYCLE){ 1917 1978 std::cout << "XRAM_RSP FSM in XRAM_RSP_DIR_RSP state" << std::endl; 1979 } 1918 1980 #endif 1919 1981 } … … 1933 1995 else r_xram_rsp_fsm = XRAM_RSP_IDLE; 1934 1996 #ifdef DDEBUG 1997 if(m_cpt_cycles > DEBUG_START_CYCLE){ 1935 1998 std::cout << "XRAM_RSP FSM in XRAM_RSP_INVAL state" << std::endl; 1999 } 1936 2000 #endif 1937 2001 } … … 1951 2015 r_xram_rsp_fsm = XRAM_RSP_IDLE; 1952 2016 #ifdef TDEBUG 2017 if(m_cpt_cycles > DEBUG_START_CYCLE){ 1953 2018 std::cout << "XRAM_RSP FSM in XRAM_RSP_WRITE_DIRTY state" << std::endl; 2019 } 1954 2020 #endif 1955 2021 } … … 1981 2047 } 1982 2048 if ( (p_vci_tgt_cleanup.cmd.read() == vci_param::CMD_WRITE) && 1983 (((addr_t)(p_vci_tgt_cleanup.address.read()) ) != BROADCAST_ADDR) &&2049 (((addr_t)(p_vci_tgt_cleanup.address.read())&0x3) != 0x3) && 1984 2050 reached) { 1985 2051 … … 2006 2072 DirectoryEntry entry = m_cache_directory.read(cleanup_address , way); 2007 2073 #ifdef DDEBUG 2074 if(m_cpt_cycles > DEBUG_START_CYCLE){ 2008 2075 std::cout << "In CLEANUP_DIR_LOCK printing the entry of address is : " << std::hex << cleanup_address << std::endl; 2009 2076 entry.print(); 2010 2077 std::cout << "done" << std::endl; 2078 } 2011 2079 #endif 2012 2080 r_cleanup_is_cnt = entry.is_cnt; … … 2089 2157 if(!hit_inval) { 2090 2158 #ifdef DEBUG_VCI_MEM_CACHE 2159 if(m_cpt_cycles > DEBUG_START_CYCLE){ 2091 2160 std::cout << "MEM_CACHE WARNING: cleanup with no corresponding entry at address : " << std::hex << (r_cleanup_nline.read()*4*m_words) << std::dec << std::endl; 2161 } 2092 2162 #endif 2093 2163 r_cleanup_fsm = CLEANUP_RSP; … … 2111 2181 m_update_tab.clear(r_cleanup_index.read()); 2112 2182 #ifdef IDEBUG 2183 if(m_cpt_cycles > DEBUG_START_CYCLE){ 2113 2184 std::cout << sc_time_stamp() << " " << name() << " CLEANUP_UPT_WRITE update table : " << std::endl; 2114 2185 m_update_tab.print(); 2186 } 2115 2187 #endif 2116 2188 … … 2206 2278 // set Atomic Table 2207 2279 m_atomic_tab.set(m_cmd_llsc_srcid_fifo.read(), m_cmd_llsc_addr_fifo.read()); 2280 2281 #ifdef DDEBUG 2282 if(m_cpt_cycles > DEBUG_START_CYCLE){ 2283 std::cout << "In LLSC_DIR_LOCK printing the entry of address is : " << std::hex << m_cmd_llsc_addr_fifo.read() << std::endl; 2284 entry.print(); 2285 std::cout << "done" << std::endl; 2286 } 2287 #endif 2288 2208 2289 2209 2290 if ( entry.valid ) r_llsc_fsm = LL_DIR_HIT; … … 2347 2428 index); 2348 2429 #ifdef IDEBUG 2430 if(m_cpt_cycles > DEBUG_START_CYCLE){ 2349 2431 if(wok){ 2350 2432 std::cout << sc_time_stamp() << " " << name() << " SC_UPT_LOCK update table : " << std::endl; 2351 2433 m_update_tab.print(); 2352 2434 } 2435 } 2353 2436 #endif 2354 2437 r_llsc_upt_index = index; … … 2436 2519 index); 2437 2520 #ifdef IDEBUG 2521 if(m_cpt_cycles > DEBUG_START_CYCLE){ 2438 2522 if(wok){ 2439 2523 std::cout << sc_time_stamp() << " " << name() << " LLSC_INVAL_LOCK update table : " << std::endl; 2440 2524 m_update_tab.print(); 2441 2525 } 2526 } 2442 2527 #endif 2443 2528 r_llsc_upt_index = index; … … 2466 2551 std::vector<data_t>(m_words,0)); 2467 2552 #ifdef TDEBUG 2553 if(m_cpt_cycles > DEBUG_START_CYCLE){ 2468 2554 std::cout << sc_time_stamp() << " " << name() << " SC_DIR_INVAL transaction table : " << std::endl; 2469 2555 for(size_t i = 0 ; i < m_transaction_tab.size() ; i++) 2470 2556 m_transaction_tab.print(i); 2557 } 2471 2558 #endif 2472 2559 // reset Atomic Table … … 2624 2711 } 2625 2712 #ifdef TDEBUG 2713 if(m_cpt_cycles > DEBUG_START_CYCLE){ 2626 2714 std::cout << sc_time_stamp() << " " << name() << " LLSC_TRT_SET transaction table : " << std::endl; 2627 2715 for(size_t i = 0 ; i < m_transaction_tab.size() ; i++) 2628 2716 m_transaction_tab.print(i); 2717 } 2629 2718 #endif 2630 2719 … … 3611 3700 p_vci_tgt.rtrdid = r_write_to_tgt_rsp_trdid.read(); 3612 3701 p_vci_tgt.rpktid = r_write_to_tgt_rsp_pktid.read(); 3613 p_vci_tgt.rerror = 0 ;3702 p_vci_tgt.rerror = 0x2 & ( (1 << (vci_param::E + 1)) - 1); // Write OK 3614 3703 p_vci_tgt.reop = true; 3615 3704 break; … … 3684 3773 p_vci_ini.cmdval = true; 3685 3774 if(r_xram_rsp_to_init_cmd_brdcast.read()) 3686 p_vci_ini.address = BROADCAST_ADDR;3775 p_vci_ini.address = broadcast_addr; 3687 3776 else { 3688 3777 if(r_init_cmd_inst.read()) { … … 3700 3789 case INIT_CMD_BRDCAST: 3701 3790 p_vci_ini.cmdval = true; 3702 p_vci_ini.address = BROADCAST_ADDR;3791 p_vci_ini.address = broadcast_addr; 3703 3792 p_vci_ini.wdata = (addr_t)r_write_to_init_cmd_nline.read(); 3704 3793 p_vci_ini.be = ((r_write_to_init_cmd_nline.read() >> 32) & 0x3); … … 3730 3819 p_vci_ini.wdata = r_write_to_init_cmd_data[r_init_cmd_cpt.read() + 3731 3820 r_write_to_init_cmd_index.read()].read(); 3732 if(r_write_to_init_cmd_we[r_init_cmd_cpt.read() + 3733 r_write_to_init_cmd_index.read()].read()) 3734 p_vci_ini.be = 0xF; 3735 else p_vci_ini.be = 0x0; 3821 p_vci_ini.be = r_write_to_init_cmd_be[r_init_cmd_cpt.read() +r_write_to_init_cmd_index.read()].read() ; 3736 3822 p_vci_ini.plen = 4 * (r_write_to_init_cmd_count.read() + 2); 3737 3823 p_vci_ini.trdid = r_write_to_init_cmd_trdid.read(); … … 3741 3827 case INIT_CMD_SC_BRDCAST: 3742 3828 p_vci_ini.cmdval = true; 3743 p_vci_ini.address = BROADCAST_ADDR;3829 p_vci_ini.address = broadcast_addr; 3744 3830 p_vci_ini.wdata = (addr_t)r_llsc_to_init_cmd_nline.read(); 3745 3831 p_vci_ini.be = ((r_llsc_to_init_cmd_nline.read() >> 32) & 0x3); … … 3810 3896 p_vci_tgt_cleanup.rpktid = r_cleanup_pktid.read(); 3811 3897 p_vci_tgt_cleanup.rtrdid = r_cleanup_trdid.read(); 3812 p_vci_tgt_cleanup.rerror = 0 ;3898 p_vci_tgt_cleanup.rerror = 0x2 & ( (1 << (vci_param::E + 1)) - 1); 3813 3899 p_vci_tgt_cleanup.reop = 1; 3814 3900 break; -
trunk/modules/vci_mem_cache_v3/caba/source/include/vci_mem_cache_v3.h
r2 r82 61 61 #define TRANSACTION_TAB_LINES 4 // Number of lines in the transaction tab 62 62 #define UPDATE_TAB_LINES 4 // Number of lines in the update tab 63 #define BROADCAST_ADDR 0x0000000003 // Address to send the broadcast invalidate64 63 65 64 namespace soclib { namespace caba { … … 362 361 const soclib::common::AddressMaskingTable<vci_addr_t> m_nline; 363 362 363 // broadcast address 364 vci_addr_t broadcast_addr; 365 364 366 ////////////////////////////////////////////////// 365 367 // Others registers -
trunk/modules/vci_mem_cache_v3/caba/source/src/vci_mem_cache_v3.cpp
r57 r82 325 325 assert(nways <= 32); 326 326 327 // Set the broadcast address with Xmin,Xmax,Ymin,Ymax set to maximum 328 broadcast_addr = 0x3 | (0x7C1F << (vci_param::N-20)); 327 329 328 330 // Get the segments associated to the MemCache … … 2358 2360 } 2359 2361 if ( (p_vci_tgt_cleanup.cmd.read() == vci_param::CMD_WRITE) && 2360 (((addr_t)(p_vci_tgt_cleanup.address.read()) ) != BROADCAST_ADDR) &&2362 (((addr_t)(p_vci_tgt_cleanup.address.read())&0x3) != 0x3) && 2361 2363 reached) { 2362 2364 … … 4337 4339 p_vci_tgt.rtrdid = r_write_to_tgt_rsp_trdid.read(); 4338 4340 p_vci_tgt.rpktid = r_write_to_tgt_rsp_pktid.read(); 4339 p_vci_tgt.rerror = 0 ;4341 p_vci_tgt.rerror = 0x2 & ( (1 << (vci_param::E + 1)) - 1); // Write OK 4340 4342 p_vci_tgt.reop = true; 4341 4343 break; … … 4421 4423 case INIT_CMD_XRAM_BRDCAST: 4422 4424 p_vci_ini.cmdval = true; 4423 p_vci_ini.address = BROADCAST_ADDR;4425 p_vci_ini.address = broadcast_addr; 4424 4426 p_vci_ini.wdata = (uint32_t)r_xram_rsp_to_init_cmd_nline.read(); 4425 4427 p_vci_ini.be = ((r_xram_rsp_to_init_cmd_nline.read() >> 32) & 0x3); … … 4431 4433 case INIT_CMD_WRITE_BRDCAST: 4432 4434 p_vci_ini.cmdval = true; 4433 p_vci_ini.address = BROADCAST_ADDR;4435 p_vci_ini.address = broadcast_addr; 4434 4436 p_vci_ini.wdata = (addr_t)r_write_to_init_cmd_nline.read(); 4435 4437 p_vci_ini.be = ((r_write_to_init_cmd_nline.read() >> 32) & 0x3); … … 4476 4478 case INIT_CMD_SC_BRDCAST: 4477 4479 p_vci_ini.cmdval = true; 4478 p_vci_ini.address = BROADCAST_ADDR;4480 p_vci_ini.address = broadcast_addr; 4479 4481 p_vci_ini.wdata = (addr_t)r_llsc_to_init_cmd_nline.read(); 4480 4482 p_vci_ini.be = ((r_llsc_to_init_cmd_nline.read() >> 32) & 0x3); … … 4549 4551 p_vci_tgt_cleanup.rpktid = r_cleanup_pktid.read(); 4550 4552 p_vci_tgt_cleanup.rtrdid = r_cleanup_trdid.read(); 4551 p_vci_tgt_cleanup.rerror = 0 ;4553 p_vci_tgt_cleanup.rerror = 0x2 & ( (1 << (vci_param::E + 1)) - 1); 4552 4554 p_vci_tgt_cleanup.reop = 1; 4553 4555 break; -
trunk/modules/vci_mem_cache_v4/caba/source/include/vci_mem_cache_v4.h
r2 r82 354 354 const soclib::common::AddressMaskingTable<vci_addr_t> m_nline; 355 355 356 // broadcast address 357 vci_addr_t broadcast_addr; 358 356 359 ////////////////////////////////////////////////// 357 360 // Others registers -
trunk/modules/vci_mem_cache_v4/caba/source/src/vci_mem_cache_v4.cpp
r57 r82 321 321 assert(nways <= 32); 322 322 323 // Set the broadcast address with Xmin,Xmax,Ymin,Ymax set to maximum 324 broadcast_addr = 0x3 | (0x7C1F << (vci_param::N-20)); 323 325 324 326 // Get the segments associated to the MemCache … … 2324 2326 } 2325 2327 if ( (p_vci_tgt_cleanup.cmd.read() == vci_param::CMD_WRITE) && 2326 (((addr_t)(p_vci_tgt_cleanup.address.read()) ) != BROADCAST_ADDR) &&2328 (((addr_t)(p_vci_tgt_cleanup.address.read())&0x3) != 0x3) && 2327 2329 reached) { 2328 2330 … … 4247 4249 p_vci_tgt.rtrdid = r_write_to_tgt_rsp_trdid.read(); 4248 4250 p_vci_tgt.rpktid = r_write_to_tgt_rsp_pktid.read(); 4249 p_vci_tgt.rerror = 0 ;4251 p_vci_tgt.rerror = 0x2 & ( (1 << (vci_param::E + 1)) - 1); // Write OK 4250 4252 p_vci_tgt.reop = true; 4251 4253 break; … … 4256 4258 p_vci_tgt.rtrdid = r_cleanup_to_tgt_rsp_trdid.read(); 4257 4259 p_vci_tgt.rpktid = r_cleanup_to_tgt_rsp_pktid.read(); 4258 p_vci_tgt.rerror = 0; 4260 p_vci_tgt.rerror = 0; // Can be a SC rsp 4259 4261 p_vci_tgt.reop = true; 4260 4262 break; … … 4283 4285 p_vci_tgt.rtrdid = r_init_rsp_to_tgt_rsp_trdid.read(); 4284 4286 p_vci_tgt.rpktid = r_init_rsp_to_tgt_rsp_pktid.read(); 4285 p_vci_tgt.rerror = 0; 4287 p_vci_tgt.rerror = 0; // Can be a SC rsp 4286 4288 p_vci_tgt.reop = true; 4287 4289 break; … … 4331 4333 case INIT_CMD_XRAM_BRDCAST: 4332 4334 p_vci_ini.cmdval = true; 4333 p_vci_ini.address = BROADCAST_ADDR;4335 p_vci_ini.address = broadcast_addr; 4334 4336 p_vci_ini.wdata = (uint32_t)r_xram_rsp_to_init_cmd_nline.read(); 4335 4337 p_vci_ini.be = ((r_xram_rsp_to_init_cmd_nline.read() >> 32) & 0x3); … … 4341 4343 case INIT_CMD_WRITE_BRDCAST: 4342 4344 p_vci_ini.cmdval = true; 4343 p_vci_ini.address = BROADCAST_ADDR;4345 p_vci_ini.address = broadcast_addr; 4344 4346 p_vci_ini.wdata = (addr_t)r_write_to_init_cmd_nline.read(); 4345 4347 p_vci_ini.be = ((r_write_to_init_cmd_nline.read() >> 32) & 0x3); … … 4396 4398 case INIT_CMD_SC_BRDCAST: 4397 4399 p_vci_ini.cmdval = true; 4398 p_vci_ini.address = BROADCAST_ADDR;4400 p_vci_ini.address = broadcast_addr; 4399 4401 p_vci_ini.wdata = (addr_t)r_llsc_to_init_cmd_nline.read(); 4400 4402 p_vci_ini.be = ((r_llsc_to_init_cmd_nline.read() >> 32) & 0x3); … … 4507 4509 p_vci_tgt_cleanup.rpktid = r_cleanup_pktid.read(); 4508 4510 p_vci_tgt_cleanup.rtrdid = r_cleanup_trdid.read(); 4509 p_vci_tgt_cleanup.rerror = 0 ;4511 p_vci_tgt_cleanup.rerror = 0x2 & ( (1 << (vci_param::E + 1)) - 1); 4510 4512 p_vci_tgt_cleanup.reop = 1; 4511 4513 break;
Note: See TracChangeset
for help on using the changeset viewer.