Changeset 325
- Timestamp:
- Mar 14, 2013, 4:14:03 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.cpp
r323 r325 1924 1924 if(not r_icache_cc_send_req.read()) // cc_send is available 1925 1925 { 1926 //consume last flit 1927 cc_receive_updt_fifo_get = true; 1926 1928 // coherence request completed 1927 1929 r_cc_receive_icache_req = false; … … 4479 4481 { 4480 4482 r_dcache_in_tlb[way*m_dcache_sets+set] = false; 4481 r_dcache_tlb_inval_line = r_cc_receive_dcache_nline.read() / (m_dcache_words<<2);4483 r_dcache_tlb_inval_line = r_cc_receive_dcache_nline.read(); 4482 4484 r_dcache_tlb_inval_set = 0; 4483 4485 r_dcache_fsm_scan_save = r_dcache_fsm.read(); 4484 4486 r_dcache_fsm = DCACHE_INVAL_TLB_SCAN; 4487 break; 4485 4488 } 4486 4489 else … … 4550 4553 { 4551 4554 r_dcache_in_tlb[way*m_dcache_sets+set] = false; 4552 r_dcache_tlb_inval_line = r_cc_receive_dcache_nline.read() / (m_dcache_words<<2);4555 r_dcache_tlb_inval_line = r_cc_receive_dcache_nline.read(); 4553 4556 r_dcache_tlb_inval_set = 0; 4554 4557 r_dcache_fsm_scan_save = r_dcache_fsm.read(); … … 4556 4559 break; 4557 4560 } 4558 else 4559 { 4560 if ( r_dcache_contains_ptd[way*m_dcache_sets+set] ) // TLB flush 4561 { 4562 r_itlb.reset(); 4563 r_dtlb.reset(); 4564 r_dcache_contains_ptd[way*m_dcache_sets+set] = false; 4561 4562 if ( r_dcache_contains_ptd[way*m_dcache_sets+set] ) // TLB flush 4563 { 4564 r_itlb.reset(); 4565 r_dtlb.reset(); 4566 r_dcache_contains_ptd[way*m_dcache_sets+set] = false; 4565 4567 4566 4568 #if DEBUG_DCACHE … … 4571 4573 } 4572 4574 #endif 4573 4575 } 4574 4576 4575 4577 #ifdef INSTRUMENTATION 4576 4578 m_cpt_dcache_data_write++; 4577 4579 #endif 4578 4579 4580 4581 4582 4583 4584 4580 r_dcache.write( way, 4581 set, 4582 word, 4583 r_cc_receive_updt_fifo_data.read(), 4584 r_cc_receive_updt_fifo_be.read() ); 4585 4586 r_dcache_cc_word = word + 1; 4585 4587 4586 4588 #if DEBUG_DCACHE … … 4595 4597 } 4596 4598 #endif 4597 }4598 4599 } 4599 4600 … … 4626 4627 cc_receive_updt_fifo_get = true; 4627 4628 } 4628 4629 4629 } 4630 4630 break; … … 4637 4637 size_t way = r_dcache_cc_way.read(); 4638 4638 size_t set = r_dcache_cc_set.read(); 4639 paddr_t nline = r_cc_receive_dcache_nline.read() / (m_dcache_words<<2);4639 paddr_t nline = r_cc_receive_dcache_nline.read(); 4640 4640 4641 4641 if (r_dcache_cc_need_write.read()) … … 4648 4648 r_dcache_fsm_scan_save = r_dcache_fsm.read(); 4649 4649 r_dcache_fsm = DCACHE_INVAL_TLB_SCAN; 4650 break; 4650 4651 } 4651 4652 else … … 5334 5335 { 5335 5336 // a coherence request has arrived 5336 if (p_dspin_in.write.read())5337 if (p_dspin_in.write.read()) 5337 5338 { 5338 5339 // initialize dspin received data … … 5343 5344 r_cc_receive_data_ins = (bool)(receive_type & 0x1); 5344 5345 // test for a broadcast 5345 if(DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::FROM_MC_BC)) 5346 if (DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::FROM_MC_BC)) 5347 { 5346 5348 r_cc_receive_fsm = CC_RECEIVE_BRDCAST_HEADER; 5349 } 5347 5350 // test for a CLACK 5348 else if(receive_type == DspinDhccpParam::TYPE_CLEANUP_ACK) 5351 else if (receive_type == DspinDhccpParam::TYPE_CLEANUP_ACK) 5352 { 5349 5353 r_cc_receive_fsm = CC_RECEIVE_CLACK; 5354 } 5350 5355 // test for a multi updt 5351 else if((receive_type == DspinDhccpParam::TYPE_MULTI_UPDT_DATA) or 5352 (receive_type == DspinDhccpParam::TYPE_MULTI_UPDT_INST)) 5356 else if ((receive_type == DspinDhccpParam::TYPE_MULTI_UPDT_DATA) or 5357 (receive_type == DspinDhccpParam::TYPE_MULTI_UPDT_INST)) 5358 { 5353 5359 r_cc_receive_fsm = CC_RECEIVE_UPDT_HEADER; 5360 } 5354 5361 // test for a multi inval 5355 5362 else 5363 { 5356 5364 r_cc_receive_fsm = CC_RECEIVE_INVAL_HEADER; 5365 } 5357 5366 } 5358 5367 break; … … 5369 5378 // request dcache to handle the CLACK 5370 5379 r_cc_receive_dcache_req = true; 5371 r_cc_receive_dcache_set = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::CLEANUP_ACK_SET) ;5372 r_cc_receive_dcache_way = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::CLEANUP_ACK_WAY) ;5380 r_cc_receive_dcache_set = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::CLEANUP_ACK_SET) & ((1ULL<<(uint32_log2(m_dcache_sets)))-1); 5381 r_cc_receive_dcache_way = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::CLEANUP_ACK_WAY) & ((1ULL<<(uint32_log2(m_dcache_ways)))-1); 5373 5382 r_cc_receive_dcache_type = CC_TYPE_CLACK; 5374 5383 // get back to idle state … … 5381 5390 // request icache to handle the CLACK 5382 5391 r_cc_receive_icache_req = true; 5383 r_cc_receive_icache_set = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::CLEANUP_ACK_SET) ;5384 r_cc_receive_icache_way = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::CLEANUP_ACK_WAY) ;5392 r_cc_receive_icache_set = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::CLEANUP_ACK_SET) & ((1ULL<<(uint32_log2(m_icache_sets)))-1); 5393 r_cc_receive_icache_way = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::CLEANUP_ACK_WAY) & ((1ULL<<(uint32_log2(m_icache_ways)))-1); 5385 5394 r_cc_receive_icache_type = CC_TYPE_CLACK; 5386 5395 // get back to idle state … … 5483 5492 // for data INVAL, wait for dcache to take the request and fifo to 5484 5493 // be empty 5485 if ((r_cc_receive_data_ins.read() == 0) and not (r_cc_receive_dcache_req.read()) and r_cc_receive_updt_fifo_be.empty())5494 if ((r_cc_receive_data_ins.read() == 0) and not r_cc_receive_dcache_req.read() and r_cc_receive_updt_fifo_be.empty()) 5486 5495 { 5487 5496 r_cc_receive_dcache_updt_tab_idx = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_UPDT_INDEX); … … 5491 5500 // for ins INVAL, wait for icache to take the request and fifo to be 5492 5501 // empty 5493 if ((r_cc_receive_data_ins.read() == 1) and not (r_cc_receive_icache_req.read()) and r_cc_receive_updt_fifo_be.empty())5502 if ((r_cc_receive_data_ins.read() == 1) and not r_cc_receive_icache_req.read() and r_cc_receive_updt_fifo_be.empty()) 5494 5503 { 5495 5504 r_cc_receive_icache_updt_tab_idx = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_UPDT_INDEX); … … 5925 5934 { 5926 5935 if (((r_cc_receive_data_ins.read() == 0) and 5927 not (r_cc_receive_dcache_req.read()) and5936 not r_cc_receive_dcache_req.read() and 5928 5937 r_cc_receive_updt_fifo_be.empty()) 5929 5938 or 5930 5939 ((r_cc_receive_data_ins.read() == 1) and 5931 not (r_cc_receive_icache_req.read()) and5932 r_cc_receive_updt_fifo_be.empty()) )5940 not r_cc_receive_icache_req.read()) and 5941 r_cc_receive_updt_fifo_be.empty()) 5933 5942 p_dspin_in.read = true; 5934 5943 else
Note: See TracChangeset
for help on using the changeset viewer.