Changeset 230 for trunk/modules/vci_cc_vcache_wrapper_v4
- Timestamp:
- May 8, 2012, 12:54:58 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_cc_vcache_wrapper_v4/caba/source/src/vci_cc_vcache_wrapper_v4.cpp
r229 r230 689 689 r_mmu_mode = 0x3; 690 690 691 // No request from ICACHE FSM to CMD FSM691 // No request from ICACHE FSM to CMD FSM 692 692 r_icache_miss_req = false; 693 693 r_icache_unc_req = false; … … 712 712 713 713 // No LL reservation 714 r_dcache_ll_valid = false;714 r_dcache_ll_valid = false; 715 715 716 716 // No processor XTN request pending … … 1964 1964 { 1965 1965 case DCACHE_IDLE: // There is 8 conditions to exit the IDLE state : 1966 1967 1968 1969 1970 1971 1972 1973 1966 // 1) Dirty bit update (processor) => DCACHE_DIRTY_GET_PTE 1967 // 2) Coherence request (TGT FSM) => DCACHE_CC_CHECK 1968 // 3) ITLB miss request (ICACHE FSM) => DCACHE_TLB_MISS 1969 // 4) XTN request (processor) => DCACHE_XTN_* 1970 // 5) DTLB miss (processor) => DCACHE_TLB_MISS 1971 // 6) Cacheable read miss (processor) => DCACHE_MISS_VICTIM 1972 // 7) Uncacheable read (processor) => DCACHE_UNC_WAIT 1973 // 8) SC access (processor) => DCACHE_SC_WAIT 1974 1974 // 1975 1975 // The dtlb is unconditionally accessed to translate the … … 2532 2532 // If dcache miss, we go to DCACHE_MISS_VICTIM state. 2533 2533 // If uncacheable, we go to DCACHE_UNC_WAIT state. 2534 // In case of LL, the LL registration is done when the data is returned: 2535 // in DCACHE_IDLE if cacheable / in DCACHE_UNC_WAIT if uncacheable 2534 2536 if ( ((m_dreq.type == iss_t::DATA_READ) or (m_dreq.type == iss_t::DATA_LL)) 2535 2537 and not r_dcache_p0_valid.read() and not r_dcache_p1_valid.read() ) … … 2570 2572 m_drsp.valid = true; 2571 2573 m_drsp.rdata = cache_rdata; 2574 2575 // makes reservation in case of LL 2576 if ( m_dreq.type == iss_t::DATA_LL ) 2577 { 2578 r_dcache_ll_valid = true; 2579 r_dcache_ll_vaddr = m_dreq.addr; 2580 r_dcache_ll_data = cache_rdata; 2581 } 2572 2582 #if DEBUG_DCACHE 2573 2583 if ( m_debug_dcache_fsm ) … … 2586 2596 } 2587 2597 2588 // makes reservation in case of LL2589 if ( m_dreq.type == iss_t::DATA_LL )2590 {2591 r_dcache_ll_valid = true;2592 r_dcache_ll_data = cache_rdata;2593 r_dcache_ll_vaddr = m_dreq.addr;2594 }2595 2598 r_dcache_p0_valid = false; 2596 2599 } // end READ or LL … … 2666 2669 { 2667 2670 // The PTE physical address is obtained from the nline value (dtlb), 2668 // and the word index ( proper bits of thevirtual address)2671 // and the word index (virtual address) 2669 2672 if ( tlb_flags.b ) // PTE1 2670 2673 { … … 3867 3870 break; 3868 3871 } 3869 else if ( r_vci_rsp_fifo_dcache.rok() ) // data available 3870 { 3872 else if ( r_vci_rsp_fifo_dcache.rok() ) // data available 3873 { 3874 // consume data 3871 3875 vci_rsp_fifo_dcache_get = true; 3872 3876 r_dcache_fsm = DCACHE_IDLE; 3873 // we acknowledge the processor request if it has not been modified 3877 3878 // acknowledge the processor request if it has not been modified 3874 3879 if ( m_dreq.valid and (m_dreq.addr == r_dcache_p0_vaddr.read()) ) 3875 3880 { 3876 m_drsp.valid = true; 3877 m_drsp.rdata = r_vci_rsp_fifo_dcache.read(); 3878 } 3879 } 3881 m_drsp.valid = true; 3882 m_drsp.rdata = r_vci_rsp_fifo_dcache.read(); 3883 3884 // makes reservation in case of LL 3885 if ( m_dreq.type == iss_t::DATA_LL ) 3886 { 3887 r_dcache_ll_valid = true; 3888 r_dcache_ll_data = r_vci_rsp_fifo_dcache.read(); 3889 r_dcache_ll_vaddr = m_dreq.addr; 3890 } 3891 } 3892 } 3880 3893 break; 3881 3894 }
Note: See TracChangeset
for help on using the changeset viewer.