Changeset 403 for trunk/modules/vci_cc_vcache_wrapper
- Timestamp:
- Jun 6, 2013, 9:42:29 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_cc_vcache_wrapper/caba/source/src/vci_cc_vcache_wrapper.cpp
r394 r403 2128 2128 size_t tlb_way; 2129 2129 size_t tlb_set; 2130 paddr_t tlb_nline ;2130 paddr_t tlb_nline = 0; 2131 2131 size_t cache_way; 2132 2132 size_t cache_set; … … 5405 5405 // C_RECEIVE FSM 5406 5406 // This FSM receive all coherence packets on a DSPIN40 port. 5407 // There is 4packet types:5407 // There is 7 packet types: 5408 5408 // - CC_DATA_INVAL : DCACHE invalidate request 5409 5409 // - CC_DATA_UPDT : DCACHE update request (multi-words) … … 5566 5566 uint64_t receive_data = p_dspin_in.data.read(); 5567 5567 // for data INVAL, wait for dcache to take the request 5568 if ((r_cc_receive_data_ins.read() == 0) and not (r_cc_receive_dcache_req.read()) and (p_dspin_in.write.read())) 5568 if ( (r_cc_receive_data_ins.read() == 0) and 5569 not (r_cc_receive_dcache_req.read()) and 5570 (p_dspin_in.write.read()) ) 5569 5571 { 5570 5572 // request dcache to handle the INVAL … … 5588 5590 } 5589 5591 // we should never get there 5590 assert ( false && " CC_RECEIVE_INVAL_NLINE : incoherent handling of either r_cc_receive_data_ins or r_cc_receive_*cache_req\n");5592 assert ( false && "ERROR in CC_VCACHE : CC_RECEIVE_INVAL_NLINE\n"); 5591 5593 } 5592 5594 //////////////////////////// … … 5621 5623 // for data INVAL, wait for dcache to take the request and fifo to 5622 5624 // be empty 5623 if ((r_cc_receive_data_ins.read() == 0) and not (r_cc_receive_dcache_req.read()) and r_cc_receive_updt_fifo_be.empty() and (p_dspin_in.write.read())) 5625 if ( (r_cc_receive_data_ins.read() == 0) and 5626 not (r_cc_receive_dcache_req.read()) and 5627 r_cc_receive_updt_fifo_be.empty() and 5628 (p_dspin_in.write.read()) ) 5624 5629 { 5625 5630 r_cc_receive_dcache_nline = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_NLINE); … … 5632 5637 // for ins INVAL, wait for icache to take the request and fifo to be 5633 5638 // empty 5634 if ((r_cc_receive_data_ins.read() == 1) and not (r_cc_receive_icache_req.read()) and r_cc_receive_updt_fifo_be.empty() and (p_dspin_in.write.read())) 5639 if ( (r_cc_receive_data_ins.read() == 1) and 5640 not (r_cc_receive_icache_req.read()) and 5641 r_cc_receive_updt_fifo_be.empty() and 5642 (p_dspin_in.write.read())) 5635 5643 { 5636 5644 r_cc_receive_icache_nline = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_NLINE); … … 5642 5650 } 5643 5651 // we should never get there 5644 assert ( false && " CC_RECEIVE_UPDT_NLINE : incoherent handling of either r_cc_receive_data_ins or r_cc_receive_*cache_req or r_cc_receive_fifo\n");5652 assert ( false && "ERROR in CC_VCACHE : CC_RECEIVE_UPDT_NLINE \n"); 5645 5653 break; 5646 5654 } … … 5653 5661 r_cc_receive_icache_req = true; 5654 5662 5655 // sample data, be and eop5656 uint64_t receive_data = p_dspin_in.data.read();5657 5663 // wait for the fifo 5658 5664 if (r_cc_receive_updt_fifo_be.wok() and (p_dspin_in.write.read())) 5659 5665 { 5660 cc_receive_updt_fifo_be = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_BE); 5666 uint64_t receive_data = p_dspin_in.data.read(); 5667 bool receive_eop = p_dspin_in.eop.read(); 5668 cc_receive_updt_fifo_be = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_BE); 5661 5669 cc_receive_updt_fifo_data = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_DATA); 5662 // sample eop to test for state exit 5663 bool flit_eop = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::FROM_MC_EOP); 5664 cc_receive_updt_fifo_eop = flit_eop; 5670 cc_receive_updt_fifo_eop = receive_eop; 5665 5671 cc_receive_updt_fifo_put = true; 5666 if(flit_eop) 5667 r_cc_receive_fsm = CC_RECEIVE_IDLE; 5672 if ( receive_eop ) r_cc_receive_fsm = CC_RECEIVE_IDLE; 5668 5673 } 5669 5674 break; … … 5857 5862 { 5858 5863 // initialize dspin send data 5859 DspinDhccpParam::dspin_set(dspin_send_data,5860 0,5861 DspinDhccpParam::FROM_L1_EOP);5864 // DspinDhccpParam::dspin_set(dspin_send_data, 5865 // 0, 5866 // DspinDhccpParam::FROM_L1_EOP); 5862 5867 DspinDhccpParam::dspin_set(dspin_send_data, 5863 5868 m_cc_global_id, … … 5914 5919 p_dspin_out.data = dspin_send_data; 5915 5920 p_dspin_out.write = true; 5921 p_dspin_out.eop = false; 5916 5922 break; 5917 5923 } … … 5920 5926 { 5921 5927 // initialize dspin send data 5922 DspinDhccpParam::dspin_set(dspin_send_data,5923 1,5924 DspinDhccpParam::FROM_L1_EOP);5928 // DspinDhccpParam::dspin_set(dspin_send_data, 5929 // 1, 5930 // DspinDhccpParam::FROM_L1_EOP); 5925 5931 5926 5932 if(r_cc_send_last_client.read() == 0) // dcache active request … … 5939 5945 p_dspin_out.data = dspin_send_data; 5940 5946 p_dspin_out.write = true; 5947 p_dspin_out.eop = true; 5941 5948 break; 5942 5949 } … … 5945 5952 { 5946 5953 // initialize dspin send data 5947 DspinDhccpParam::dspin_set(dspin_send_data,5948 1,5949 DspinDhccpParam::FROM_L1_EOP);5954 // DspinDhccpParam::dspin_set(dspin_send_data, 5955 // 1, 5956 // DspinDhccpParam::FROM_L1_EOP); 5950 5957 DspinDhccpParam::dspin_set(dspin_send_data, 5951 5958 0, … … 5987 5994 p_dspin_out.data = dspin_send_data; 5988 5995 p_dspin_out.write = true; 5996 p_dspin_out.eop = true; 5989 5997 5990 5998 break;
Note: See TracChangeset
for help on using the changeset viewer.