- Timestamp:
- Mar 28, 2013, 2:12:01 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/v5/modules/vci_cc_vcache_wrapper_dspin_coherence/caba/source/src/vci_cc_vcache_wrapper_dspin_coherence.cpp
r336 r338 2861 2861 size_t set; 2862 2862 size_t word; 2863 2864 bool hit = r_dcache.read( r_dcache_tlb_paddr.read(), 2865 &entry, 2866 &way, 2867 &set, 2868 &word ); 2863 int cache_state; 2864 r_dcache.read( r_dcache_tlb_paddr.read(), 2865 &entry, 2866 &way, 2867 &set, 2868 &word, 2869 &cache_state ); 2869 2870 #ifdef INSTRUMENTATION 2870 2871 m_cpt_dcache_data_read++; 2871 2872 m_cpt_dcache_dir_read++; 2872 2873 #endif 2873 if ( hit ) //hit in dcache2874 if ( cache_state == CACHE_SLOT_STATE_VALID ) // hit in dcache 2874 2875 { 2875 2876 if ( not (entry & PTE_V_MASK) ) // unmapped … … 2960 2961 #endif 2961 2962 } 2963 } 2964 else if ( cache_state == CACHE_SLOT_STATE_ZOMBI ) // pending cleanup 2965 { 2966 // stalled until cleanup is acknowledged 2967 r_dcache_fsm = DCACHE_TLB_PTE1_GET; 2962 2968 } 2963 2969 else // we must load the missing cache line in dcache … … 3136 3142 size_t set; 3137 3143 size_t word; 3138 3139 bool hit = r_dcache.read( r_dcache_tlb_paddr.read(), 3140 &pte_flags, 3141 &pte_ppn, 3142 &way, 3143 &set, 3144 &word ); 3144 int cache_state; 3145 3146 r_dcache.read( r_dcache_tlb_paddr.read(), 3147 &pte_flags, 3148 &pte_ppn, 3149 &way, 3150 &set, 3151 &word, 3152 &cache_state ); 3145 3153 #ifdef INSTRUMENTATION 3146 3154 m_cpt_dcache_data_read++; 3147 3155 m_cpt_dcache_dir_read++; 3148 3156 #endif 3149 if ( hit ) // request hitsin dcache3157 if ( cache_state == CACHE_SLOT_STATE_VALID ) // hit in dcache 3150 3158 { 3151 3159 if ( not (pte_flags & PTE_V_MASK) ) // unmapped … … 3162 3170 r_mmu_detr = MMU_READ_PT2_UNMAPPED; 3163 3171 r_mmu_dbvar = r_dcache_tlb_vaddr.read(); 3164 m_drsp.valid 3165 m_drsp.error 3172 m_drsp.valid = true; 3173 m_drsp.error = true; 3166 3174 } 3167 r_dcache_fsm = DCACHE_IDLE;3175 r_dcache_fsm = DCACHE_IDLE; 3168 3176 3169 3177 #if DEBUG_DCACHE … … 3196 3204 #endif 3197 3205 } 3206 } 3207 else if ( cache_state == CACHE_SLOT_STATE_ZOMBI ) // pending cleanup 3208 { 3209 // stalled until cleanup is acknowledged 3210 r_dcache_fsm = DCACHE_TLB_PTE2_GET; 3198 3211 } 3199 3212 else // we must load the missing cache line in dcache
Note: See TracChangeset
for help on using the changeset viewer.