Changeset 672 for branches/MESI
- Timestamp:
- Apr 8, 2014, 11:36:22 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/MESI/modules/vci_cc_vcache_wrapper/caba/source/src/vci_cc_vcache_wrapper.cpp
r670 r672 4398 4398 &found, 4399 4399 &cleanup ); 4400 4400 4401 state = r_dcache.get_cache_state(way,set); 4401 4402 … … 5218 5219 } 5219 5220 5221 int state = 0; 5222 size_t way = 0; 5223 size_t set = 0; 5224 size_t word = 0; 5225 r_dcache.read_dir( paddr, 5226 &state, 5227 &way, 5228 &set, 5229 &word ); // unused 5230 5231 r_dcache_cc_state = state; 5232 r_dcache_cc_way = way; 5233 r_dcache_cc_set = set; 5234 r_dcache_cc_inval_addr = (paddr &~0x3F); 5220 5235 5221 5236 // Match between MISS address and CC address … … 5229 5244 { 5230 5245 5231 if(r_cc_receive_dcache_type.read() == CC_TYPE_BRDCAST and r_dcache_read_for_modify.read() and (r_dcache_miss_type.read() == PROC_MISS)) 5246 if(r_cc_receive_dcache_type.read() == CC_TYPE_BRDCAST and r_dcache_read_for_modify.read() and 5247 r_cc_receive_dcache_srcid.read() == m_srcid and (r_dcache_miss_type.read() == PROC_MISS)) 5232 5248 { 5233 5249 r_cc_receive_dcache_req = false; 5234 r_dcache_fsm = r_dcache_fsm_cc_save.read(); 5235 } 5236 else 5250 r_dcache_fsm = r_dcache_fsm_cc_save.read(); 5251 } 5252 else if(r_cc_receive_dcache_type.read() == CC_TYPE_BRDCAST and 5253 r_dcache_read_for_modify.read() and 5254 r_cc_receive_dcache_srcid.read() != m_srcid and 5255 (r_dcache_miss_type.read() == PROC_MISS) and 5256 (state == CACHE_SLOT_STATE_SHARED)) 5257 { 5258 r_dcache_fsm = DCACHE_CC_INVAL; 5259 } 5260 else if(r_cc_receive_dcache_type.read() == CC_TYPE_INVAL and r_dcache_read_for_modify.read() and 5261 (r_dcache_miss_type.read() == PROC_MISS) and 5262 (state == CACHE_SLOT_STATE_SHARED)) 5263 { 5264 r_dcache_fsm = DCACHE_CC_INVAL; 5265 } 5266 else 5237 5267 { 5238 5268 r_dcache_miss_inval = false; … … 5280 5310 // } 5281 5311 5282 #if DEBU //G_DCACHE5312 #if DEBUG_DCACHE 5283 5313 if ( m_debug_activated ) 5284 5314 { … … 5296 5326 // CC request handler 5297 5327 5298 int state = 0; 5299 size_t way = 0; 5300 size_t set = 0; 5301 size_t word = 0; 5328 5302 5329 5303 5330 #ifdef INSTRUMENTATION 5304 5331 m_cpt_dcache_dir_read++; 5305 5332 #endif 5306 r_dcache.read_dir( paddr, 5307 &state, 5308 &way, 5309 &set, 5310 &word ); // unused 5333 5311 5334 5312 5335 #if DEBUG_DCACHE … … 5320 5343 } 5321 5344 #endif 5322 r_dcache_cc_state = state; 5323 r_dcache_cc_way = way; 5324 r_dcache_cc_set = set; 5325 r_dcache_cc_inval_addr = (paddr &~0x3F); 5345 5326 5346 5327 5347 if (state == CACHE_SLOT_STATE_EXCLUSIVE or state == CACHE_SLOT_STATE_MODIFIED) … … 5600 5620 } 5601 5621 } // end switch r_dcache_fsm 5602 5603 //if(r_dcache_miss_updt.read()) 5604 //std::cout << " <PROC " << name() 5605 // << " miss updt " << r_dcache_miss_updt.read() << std::endl; 5622 if(r_dcache_miss_updt.read()) 5623 std::cout << " <PROC " << name() 5624 << " miss updt " << r_dcache_miss_updt.read() << std::endl; 5606 5625 5607 5626 //std::cout << " <PROC " << name()
Note: See TracChangeset
for help on using the changeset viewer.