Changeset 221 for trunk/modules/vci_cc_vcache_wrapper_v4/caba
- Timestamp:
- Mar 23, 2012, 9:20:48 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
r220 r221 4119 4119 bool hit; 4120 4120 4121 hit = r_dcache.inval( way, 4122 set, 4123 &nline ); 4124 assert(hit && "CC_INVAL way/set should still be in dcache"); 4125 4126 // possible itlb & dtlb invalidate 4127 if ( r_dcache_in_tlb[way*m_dcache_sets+set] ) // selective inval 4121 if ( r_dcache_in_tlb[way*m_dcache_sets+set] ) // selective TLB inval 4128 4122 { 4129 4123 r_dcache_in_tlb[way*m_dcache_sets+set] = false; … … 4133 4127 r_dcache_fsm = DCACHE_INVAL_TLB_SCAN; 4134 4128 } 4135 else if ( r_dcache_contains_ptd[way*m_dcache_sets+set] ) // flush 4136 { 4137 r_itlb.reset(); 4138 r_dtlb.reset(); 4139 r_dcache_contains_ptd[way*m_dcache_sets+set] = false; 4129 else // actual cache line inval 4130 { 4131 if ( r_dcache_contains_ptd[way*m_dcache_sets+set] ) // TLB flush 4132 { 4133 r_itlb.reset(); 4134 r_dtlb.reset(); 4135 r_dcache_contains_ptd[way*m_dcache_sets+set] = false; 4136 } 4140 4137 r_tgt_dcache_rsp = true; 4141 4138 r_tgt_dcache_req = false; 4142 4139 r_dcache_fsm = r_dcache_fsm_cc_save.read(); 4143 } 4144 else // no inval 4145 { 4146 r_tgt_dcache_rsp = true; 4147 r_tgt_dcache_req = false; 4148 r_dcache_fsm = r_dcache_fsm_cc_save.read(); 4149 } 4150 4140 4141 hit = r_dcache.inval( way, 4142 set, 4143 &nline ); 4151 4144 #if DEBUG_DCACHE 4152 4145 if ( m_debug_dcache_fsm ) … … 4158 4151 #endif 4159 4152 4153 assert(hit && "CC_INVAL way/set should still be in dcache"); 4154 } 4160 4155 break; 4161 4156 } … … 4169 4164 paddr_t nline = r_tgt_paddr.read() >> (uint32_log2(m_dcache_words)+2); 4170 4165 4171 // possible itlb & dtlb invalidate 4172 if ( r_dcache_in_tlb[way*m_dcache_sets+set] ) // selective inval 4166 if ( r_dcache_in_tlb[way*m_dcache_sets+set] ) // selective TLB inval 4173 4167 { 4174 4168 r_dcache_in_tlb[way*m_dcache_sets+set] = false; … … 4178 4172 r_dcache_fsm = DCACHE_INVAL_TLB_SCAN; 4179 4173 } 4180 else if ( r_dcache_contains_ptd[way*m_dcache_sets+set] ) // flush 4181 { 4182 r_itlb.reset(); 4183 r_dtlb.reset(); 4184 r_dcache_contains_ptd[way*m_dcache_sets+set] = false; 4185 r_tgt_dcache_rsp = true; 4186 r_tgt_dcache_req = false; 4187 r_dcache_fsm = r_dcache_fsm_cc_save.read(); 4188 } 4189 else // no inval & no flush 4190 { 4174 else // cache update 4175 { 4176 if ( r_dcache_contains_ptd[way*m_dcache_sets+set] ) // TLB flush 4177 { 4178 r_itlb.reset(); 4179 r_dtlb.reset(); 4180 r_dcache_contains_ptd[way*m_dcache_sets+set] = false; 4181 } 4182 4191 4183 r_dcache.write( way, 4192 4184 set, … … 4198 4190 #endif 4199 4191 r_dcache_cc_word = word + 1; 4200 4201 if ( word == r_tgt_word_max.read() ) // last word4202 {4203 r_tgt_dcache_rsp = true;4204 r_tgt_dcache_req = false;4205 r_dcache_fsm = r_dcache_fsm_cc_save.read();4206 }4207 }4208 4192 4209 4193 #if DEBUG_DCACHE … … 4217 4201 } 4218 4202 #endif 4219 4203 if ( word == r_tgt_word_max.read() ) // last word 4204 { 4205 r_tgt_dcache_rsp = true; 4206 r_tgt_dcache_req = false; 4207 r_dcache_fsm = r_dcache_fsm_cc_save.read(); 4208 } 4209 } 4210 4220 4211 break; 4221 4212 }
Note: See TracChangeset
for help on using the changeset viewer.