- Timestamp:
- Jul 19, 2013, 4:26:26 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/v5/modules/vci_cc_vcache_wrapper/caba/source/src/vci_cc_vcache_wrapper.cpp
r461 r462 1819 1819 paddr_t mask = ~((m_icache_words<<2)-1); 1820 1820 1821 1822 // Match between MISS address and CC address 1823 // note: In the same cycle we can handle a CLACK and a MISS match 1824 // because the CLACK access the directory but the MISS match dont. 1825 if (r_cc_receive_icache_req.read() and 1826 ((r_icache_fsm_save.read() == ICACHE_MISS_SELECT ) or 1827 (r_icache_fsm_save.read() == ICACHE_MISS_WAIT ) or 1828 (r_icache_fsm_save.read() == ICACHE_MISS_DIR_UPDT)) and 1829 ((r_icache_vci_paddr.read() & mask) == (paddr & mask)) ) // matching 1830 { 1831 // signaling the matching 1832 r_icache_miss_inval = true; 1833 1834 // in case of update, go to CC_UPDT 1835 // JUST TO POP THE FIFO 1836 if (r_cc_receive_icache_type.read() == CC_TYPE_UPDT) 1837 { 1838 r_icache_fsm = ICACHE_CC_UPDT; 1839 r_icache_cc_word = r_cc_receive_word_idx.read(); 1840 1841 // just pop the fifo , don't write in icache 1842 r_icache_cc_need_write = false; 1843 } 1844 // the request is dealt with 1845 else 1846 { 1847 r_cc_receive_icache_req = false; 1848 r_icache_fsm = r_icache_fsm_save.read(); 1849 } 1850 #if DEBUG_ICACHE 1851 if ( m_debug_activated ) 1852 { 1853 std::cout << " <PROC " << name() 1854 << " ICACHE_CC_CHECK> Coherence request matching a pending miss:" 1855 << " PADDR = " << std::hex << paddr << std::endl; 1856 } 1857 #endif 1858 } 1859 1821 1860 // CLACK handler 1822 1861 // We switch the directory slot to EMPTY state … … 1858 1897 #endif 1859 1898 1860 break;1861 }1862 1863 // Match between MISS address and CC address1864 if (r_cc_receive_icache_req.read() and1865 ((r_icache_fsm_save.read() == ICACHE_MISS_SELECT ) or1866 (r_icache_fsm_save.read() == ICACHE_MISS_WAIT ) or1867 (r_icache_fsm_save.read() == ICACHE_MISS_DIR_UPDT)) and1868 ((r_icache_vci_paddr.read() & mask) == (paddr & mask)) ) // matching1869 {1870 // signaling the matching1871 r_icache_miss_inval = true;1872 1873 // in case of update, go to CC_UPDT1874 // JUST TO POP THE FIFO1875 if (r_cc_receive_icache_type.read() == CC_TYPE_UPDT)1876 {1877 r_icache_fsm = ICACHE_CC_UPDT;1878 r_icache_cc_word = r_cc_receive_word_idx.read();1879 1880 // just pop the fifo , don't write in icache1881 r_icache_cc_need_write = false;1882 }1883 // the request is dealt with1884 else1885 {1886 r_cc_receive_icache_req = false;1887 r_icache_fsm = r_icache_fsm_save.read();1888 }1889 #if DEBUG_ICACHE1890 if ( m_debug_activated )1891 {1892 std::cout << " <PROC " << name()1893 << " ICACHE_CC_CHECK> Coherence request matching a pending miss:"1894 << " PADDR = " << std::hex << paddr << std::endl;1895 }1896 #endif1897 1899 break; 1898 1900 } … … 4574 4576 #endif 4575 4577 4578 4579 // Match between MISS address and CC address 4580 // note: In the same cycle we can handle a CLACK and a MISS match 4581 // because the CLACK access the directory but the MISS match dont. 4582 if (r_cc_receive_dcache_req.read() and 4583 ((r_dcache_fsm_cc_save == DCACHE_MISS_SELECT ) or 4584 (r_dcache_fsm_cc_save == DCACHE_MISS_WAIT ) or 4585 (r_dcache_fsm_cc_save == DCACHE_MISS_DIR_UPDT)) and 4586 ((r_dcache_vci_paddr.read() & mask) == (paddr & mask))) // matching 4587 { 4588 // signaling matching 4589 r_dcache_miss_inval = true; 4590 4591 // in case of update, go to CC_UPDT 4592 // JUST TO POP THE FIFO 4593 if (r_cc_receive_dcache_type.read() == CC_TYPE_UPDT) 4594 { 4595 r_dcache_fsm = DCACHE_CC_UPDT; 4596 r_dcache_cc_word = r_cc_receive_word_idx.read(); 4597 4598 // just pop the fifo , don't write in icache 4599 r_dcache_cc_need_write = false; 4600 } 4601 // the request is dealt with 4602 else 4603 { 4604 r_cc_receive_dcache_req = false; 4605 r_dcache_fsm = r_dcache_fsm_cc_save.read(); 4606 } 4607 4608 #if DEBUG_DCACHE 4609 if ( m_debug_activated ) 4610 { 4611 std::cout << " <PROC " << name() 4612 << " DCACHE_CC_CHECK> Coherence request matching a pending miss:" 4613 << " PADDR = " << std::hex << paddr << std::endl; 4614 } 4615 #endif 4616 } 4617 4576 4618 // CLACK handler 4577 // We switch the directory slot to EMPTY state 4578 // and reset r_dcache_miss_clack if the cleanup ack 4579 // is matching a pending miss. 4619 // We switch the directory slot to EMPTY state and reset 4620 // r_dcache_miss_clack if the cleanup ack is matching a pending miss. 4580 4621 if ( r_dcache_clack_req.read() ) 4581 4622 { … … 4600 4641 // return to cc_save state if no pending CC request 4601 4642 if ( not r_cc_receive_dcache_req.read() ) 4643 { 4602 4644 r_dcache_fsm = r_dcache_fsm_cc_save.read() ; 4645 } 4603 4646 4604 4647 #if DEBUG_DCACHE … … 4611 4654 } 4612 4655 #endif 4613 break;4614 }4615 4616 // Match between MISS address and CC address4617 if (r_cc_receive_dcache_req.read() and4618 ((r_dcache_fsm_cc_save == DCACHE_MISS_SELECT ) or4619 (r_dcache_fsm_cc_save == DCACHE_MISS_WAIT ) or4620 (r_dcache_fsm_cc_save == DCACHE_MISS_DIR_UPDT)) and4621 ((r_dcache_vci_paddr.read() & mask) == (paddr & mask))) // matching4622 {4623 // signaling matching4624 r_dcache_miss_inval = true;4625 4626 // in case of update, go to CC_UPDT4627 // JUST TO POP THE FIFO4628 if (r_cc_receive_dcache_type.read() == CC_TYPE_UPDT)4629 {4630 r_dcache_fsm = DCACHE_CC_UPDT;4631 r_dcache_cc_word = r_cc_receive_word_idx.read();4632 4633 // just pop the fifo , don't write in icache4634 r_dcache_cc_need_write = false;4635 }4636 // the request is dealt with4637 else4638 {4639 r_cc_receive_dcache_req = false;4640 r_dcache_fsm = r_dcache_fsm_cc_save.read();4641 }4642 4643 #if DEBUG_DCACHE4644 if ( m_debug_activated )4645 {4646 std::cout << " <PROC " << name()4647 << " DCACHE_CC_CHECK> Coherence request matching a pending miss:"4648 << " PADDR = " << std::hex << paddr << std::endl;4649 }4650 #endif4651 4652 4656 break; 4653 4657 }
Note: See TracChangeset
for help on using the changeset viewer.