Changeset 429
- Timestamp:
- Jul 1, 2013, 1:54:12 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp
r427 r429 290 290 const IntTab &srcid_x, // global index on external network 291 291 const IntTab &tgtid_d, // global index on direct network 292 const size_t cc_global_id, // global index on cc network 292 const size_t cc_global_id, // global index on cc network 293 293 const size_t nways, // number of ways per set 294 const size_t nsets, // number of associative sets 294 const size_t nsets, // number of associative sets 295 295 const size_t nwords, // number of words in cache line 296 296 const size_t max_copies, // max number of copies in heap … … 430 430 assert( (vci_param_int::B == 4 ) and 431 431 "MEMC ERROR : VCI internal data width must be 32 bits"); 432 432 433 433 assert( (vci_param_ext::B == 8) and 434 434 "MEMC ERROR : VCI external data width must be 64 bits"); … … 437 437 assert( (vci_param_int::N == vci_param_ext::N) and 438 438 "MEMC ERROR : VCI internal & external addresses must have the same width"); 439 439 440 440 // Get the segments associated to the MemCache 441 441 std::list<soclib::common::Segment>::iterator seg; … … 446 446 std::cout << " => segment " << seg->name() 447 447 << " / base = " << std::hex << seg->baseAddress() 448 << " / size = " << seg->size() << std::endl; 448 << " / size = " << seg->size() << std::endl; 449 449 m_nseg++; 450 450 } … … 509 509 510 510 //////////////////////////////////////////////// 511 tmpl(void) ::check_monitor( const char *buf, 512 addr_t addr, 511 tmpl(void) ::check_monitor( const char *buf, 512 addr_t addr, 513 513 data_t data, 514 514 bool read ) … … 519 519 { 520 520 if ( read ) std::cout << " Monitor MEMC Read "; 521 else std::cout << " Monitor MEMC Write "; 522 std::cout << buf 521 else std::cout << " Monitor MEMC Write "; 522 std::cout << buf 523 523 << " / Address = " << std::hex << addr 524 << " / Data = " << data 524 << " / Data = " << data 525 525 << " at cycle " << std::dec << m_cpt_cycles << std::endl; 526 526 } … … 780 780 bool cc_receive_to_cleanup_fifo_get = false; 781 781 bool cc_receive_to_cleanup_fifo_put = false; 782 782 783 783 bool cc_receive_to_multi_ack_fifo_get = false; 784 784 bool cc_receive_to_multi_ack_fifo_put = false; … … 830 830 std::cout 831 831 << "---------------------------------------------" << std::dec << std::endl 832 << "MEM_CACHE " << name() 832 << "MEM_CACHE " << name() 833 833 << " ; Time = " << m_cpt_cycles << std::endl 834 834 << " - TGT_CMD FSM = " << tgt_cmd_fsm_str[r_tgt_cmd_fsm.read()] << std::endl … … 969 969 // This test checks that the read does not cross a cache line limit. 970 970 // It must not be taken into account when dealing with an LL CMD. 971 if(((m_x[(addr_t) p_vci_tgt.address.read()]+ (p_vci_tgt.plen.read() >>2)) > 16) && 971 if(((m_x[(addr_t) p_vci_tgt.address.read()]+ (p_vci_tgt.plen.read() >>2)) > 16) && 972 972 (p_vci_tgt.cmd.read() != vci_param_int::CMD_LOCKED_READ)) 973 973 { … … 1103 1103 1104 1104 // No CC_RECEIVE FSM request and no WRITE FSM request 1105 if( not multi_ack_fifo_rok and not r_write_to_multi_ack_req.read()) break; 1106 1107 // handling WRITE FSM request to decrement update table response counter 1108 // if no CC_RECEIVE FSM request 1105 if( not multi_ack_fifo_rok and not r_write_to_multi_ack_req.read()) 1106 break; 1107 1108 uint8_t updt_index; 1109 1110 // handling WRITE FSM request to decrement update table response 1111 // counter if no CC_RECEIVE FSM request 1109 1112 if(not multi_ack_fifo_rok) 1110 1113 { 1114 updt_index = r_write_to_multi_ack_upt_index.read(); 1111 1115 r_write_to_multi_ack_req = false; 1112 r_multi_ack_upt_index = r_write_to_multi_ack_upt_index.read(); 1113 r_multi_ack_fsm = MULTI_ACK_UPT_LOCK; 1114 1115 break; 1116 } 1117 1118 // Handling CC_RECEIVE FSM request 1119 uint64_t flit = m_cc_receive_to_multi_ack_fifo.read(); 1120 1121 uint8_t updt_index = 1122 DspinDhccpParam::dspin_get(flit, DspinDhccpParam::MULTI_ACK_UPDT_INDEX); 1123 1124 assert( (updt_index < m_upt.size()) and 1125 "VCI_MEM_CACHE ERROR in MULTI_ACK_IDLE : index too large for UPT"); 1126 1127 cc_receive_to_multi_ack_fifo_get = true; 1128 r_multi_ack_upt_index = updt_index; 1129 r_multi_ack_fsm = MULTI_ACK_UPT_LOCK; 1116 } 1117 // Handling CC_RECEIVE FSM request 1118 else 1119 { 1120 uint64_t flit = m_cc_receive_to_multi_ack_fifo.read(); 1121 updt_index = DspinDhccpParam::dspin_get(flit, 1122 DspinDhccpParam::MULTI_ACK_UPDT_INDEX); 1123 1124 cc_receive_to_multi_ack_fifo_get = true; 1125 } 1126 1127 assert((updt_index < m_upt.size()) and 1128 "VCI_MEM_CACHE ERROR in MULTI_ACK_IDLE : " 1129 "index too large for UPT"); 1130 1131 r_multi_ack_upt_index = updt_index; 1132 r_multi_ack_fsm = MULTI_ACK_UPT_LOCK; 1130 1133 1131 1134 #if DEBUG_MEMC_MULTI_ACK 1132 1135 if(m_debug_multi_ack_fsm) 1133 1136 { 1134 std::cout 1135 << " <MEMC " << name() 1136 << " MULTI_ACK_IDLE> Response for UPT entry " 1137 << updt_index 1138 << std::endl; 1137 if (multi_ack_fifo_rok) 1138 { 1139 std::cout 1140 << " <MEMC " << name() 1141 << " MULTI_ACK_IDLE> Response for UPT entry " 1142 << updt_index 1143 << std::endl; 1144 } 1145 else 1146 { 1147 std::cout 1148 << " <MEMC " << name() 1149 << " MULTI_ACK_IDLE> Write FSM request to decrement UPT entry " 1150 << updt_index 1151 << std::endl; 1152 } 1139 1153 } 1140 1154 #endif … … 1383 1397 else 1384 1398 { 1385 std::cout << "VCI_MEM_CACHE ERROR " << name() << " READ_DIR_LOCK state" 1399 std::cout << "VCI_MEM_CACHE ERROR " << name() << " READ_DIR_LOCK state" 1386 1400 << "Bad DIR allocation" << std::endl; 1387 1401 exit(0); … … 1471 1485 { 1472 1486 char buf[80]; 1473 snprintf(buf, 80, "READ_DIR_HIT srcid %d, ins %d", 1474 (int)m_cmd_read_srcid_fifo.read(), 1487 snprintf(buf, 80, "READ_DIR_HIT srcid %d, ins %d", 1488 (int)m_cmd_read_srcid_fifo.read(), 1475 1489 (int)((m_cmd_read_pktid_fifo.read()&0x2)!=0)); 1476 1490 check_monitor(buf, m_cmd_read_addr_fifo.read(), r_read_data[0], true); … … 1494 1508 #if DEBUG_MEMC_READ 1495 1509 if(m_debug_read_fsm) 1496 std::cout << " <MEMC " << name() << " READ_HEAP_REQ>" 1510 std::cout << " <MEMC " << name() << " READ_HEAP_REQ>" 1497 1511 << " Requesting HEAP lock " << std::endl; 1498 1512 #endif … … 1591 1605 else 1592 1606 { 1593 std::cout << "VCI_MEM_CACHE ERROR " << name() << " READ_HEAP_LOCK" 1607 std::cout << "VCI_MEM_CACHE ERROR " << name() << " READ_HEAP_LOCK" 1594 1608 << "Bad HEAP allocation" << std::endl; 1595 1609 exit(0); … … 1632 1646 else 1633 1647 { 1634 std::cout << "VCI_MEM_CACHE ERROR " << name() << " READ_HEAP_WRITE" 1648 std::cout << "VCI_MEM_CACHE ERROR " << name() << " READ_HEAP_WRITE" 1635 1649 << "Bad HEAP allocation" << std::endl; 1636 1650 exit(0); … … 1656 1670 else 1657 1671 { 1658 std::cout << "VCI_MEM_CACHE ERROR " << name() << " READ_HEAP_ERASE" 1672 std::cout << "VCI_MEM_CACHE ERROR " << name() << " READ_HEAP_ERASE" 1659 1673 << "Bad HEAP allocation" << std::endl; 1660 1674 exit(0); … … 1689 1703 else 1690 1704 { 1691 std::cout << "VCI_MEM_CACHE ERROR " << name() << " READ_HEAP_LAST" 1705 std::cout << "VCI_MEM_CACHE ERROR " << name() << " READ_HEAP_LAST" 1692 1706 << "Bad HEAP allocation" << std::endl; 1693 1707 exit(0); … … 2139 2153 addr_t address = (r_write_address.read() & ~(addr_t) 0x3F) | word<<2; 2140 2154 char buf[80]; 2141 snprintf(buf, 80, "WRITE_DIR_HIT srcid %d", 2155 snprintf(buf, 80, "WRITE_DIR_HIT srcid %d", 2142 2156 (int)r_write_srcid.read()); 2143 2157 check_monitor(buf, address, r_write_data[word].read(), false); … … 2219 2233 for(size_t word=0 ; word<m_words ; word++) 2220 2234 { 2221 m_cache_data.write(way, 2222 set, 2223 word, 2224 r_write_data[word].read(), 2235 m_cache_data.write(way, 2236 set, 2237 word, 2238 r_write_data[word].read(), 2225 2239 r_write_be[word].read()); 2226 2240 … … 2276 2290 // and write the first copy in the FIFO 2277 2291 // send the request if only one copy 2278 2292 2279 2293 assert(not r_write_to_cc_send_multi_req.read() and 2280 2294 not r_write_to_cc_send_brdcast_req.read() and … … 2789 2803 if(m_debug_write_fsm) 2790 2804 { 2791 std::cout << " <MEMC " << name() 2805 std::cout << " <MEMC " << name() 2792 2806 << " WRITE_BC_CC_SEND> Post a broadcast request to CC_SEND FSM" << std::endl; 2793 2807 } … … 2814 2828 if(m_debug_write_fsm) 2815 2829 { 2816 std::cout << " <MEMC " << name() 2830 std::cout << " <MEMC " << name() 2817 2831 << " WRITE_BC_XRAM_REQ> Post a put request to IXR_CMD FSM" << std::endl; 2818 2832 } … … 3042 3056 if(m_debug_ixr_rsp_fsm) 3043 3057 { 3044 std::cout << " <MEMC " << name() 3058 std::cout << " <MEMC " << name() 3045 3059 << " IXR_RSP_IDLE> Response from XRAM to a put transaction" << std::endl; 3046 3060 } … … 3054 3068 if(m_debug_ixr_rsp_fsm) 3055 3069 { 3056 std::cout << " <MEMC " << name() 3070 std::cout << " <MEMC " << name() 3057 3071 << " IXR_RSP_IDLE> Response from XRAM to a get transaction" << std::endl; 3058 3072 } … … 3192 3206 // copy the TRT entry in the r_xram_rsp_trt_buf local buffer 3193 3207 size_t index = r_xram_rsp_trt_index.read(); 3194 r_xram_rsp_trt_buf.copy( m_trt.read(index) ); 3208 r_xram_rsp_trt_buf.copy( m_trt.read(index) ); 3195 3209 3196 3210 r_xram_rsp_fsm = XRAM_RSP_TRT_COPY; … … 3260 3274 else 3261 3275 { 3262 std::cout << "VCI_MEM_CACHE ERROR " << name() << " XRAM_RSP_TRT_COPY" 3276 std::cout << "VCI_MEM_CACHE ERROR " << name() << " XRAM_RSP_TRT_COPY" 3263 3277 << " bad TRT or DIR allocation" << std::endl; 3264 3278 exit(0); … … 3279 3293 if(m_debug_xram_rsp_fsm) 3280 3294 std::cout << " <MEMC " << name() << " XRAM_RSP_INVAL_LOCK>" 3281 << " Get acces to UPT, but line invalidation registered" 3282 << " / nline = " << std::hex << r_xram_rsp_trt_buf.nline 3295 << " Get acces to UPT, but line invalidation registered" 3296 << " / nline = " << std::hex << r_xram_rsp_trt_buf.nline 3283 3297 << " / index = " << std::dec << index << std::endl; 3284 3298 #endif … … 3410 3424 if(m_debug_xram_rsp_fsm) 3411 3425 { 3412 std::cout << " <MEMC " << name() << " XRAM_RSP_DIR_UPDT>" 3426 std::cout << " <MEMC " << name() << " XRAM_RSP_DIR_UPDT>" 3413 3427 << " Cache update: " 3414 3428 << " way = " << std::dec << way … … 3473 3487 r_xram_rsp_to_tgt_rsp_trdid = r_xram_rsp_trt_buf.trdid; 3474 3488 r_xram_rsp_to_tgt_rsp_pktid = r_xram_rsp_trt_buf.pktid; 3475 for(size_t i=0; i < m_words; i++) 3489 for(size_t i=0; i < m_words; i++) 3476 3490 { 3477 3491 r_xram_rsp_to_tgt_rsp_data[i] = r_xram_rsp_trt_buf.wdata[i]; … … 3541 3555 r_xram_rsp_to_ixr_cmd_nline = r_xram_rsp_victim_nline.read(); 3542 3556 r_xram_rsp_to_ixr_cmd_trdid = r_xram_rsp_trt_index.read(); 3543 for(size_t i=0; i<m_words ; i++) 3557 for(size_t i=0; i<m_words ; i++) 3544 3558 { 3545 3559 r_xram_rsp_to_ixr_cmd_data[i] = r_xram_rsp_victim_data[i]; … … 3563 3577 } 3564 3578 ///////////////////////// 3565 case XRAM_RSP_HEAP_REQ: // Get the lock to the HEAP 3579 case XRAM_RSP_HEAP_REQ: // Get the lock to the HEAP 3566 3580 { 3567 3581 if(r_alloc_heap_fsm.read() == ALLOC_HEAP_XRAM_RSP) … … 3676 3690 case XRAM_RSP_ERROR_RSP: // Request an error response to TGT_RSP FSM 3677 3691 { 3678 if(!r_xram_rsp_to_tgt_rsp_req.read()) 3692 if(!r_xram_rsp_to_tgt_rsp_req.read()) 3679 3693 { 3680 3694 r_xram_rsp_to_tgt_rsp_srcid = r_xram_rsp_trt_buf.srcid; 3681 3695 r_xram_rsp_to_tgt_rsp_trdid = r_xram_rsp_trt_buf.trdid; 3682 3696 r_xram_rsp_to_tgt_rsp_pktid = r_xram_rsp_trt_buf.pktid; 3683 for(size_t i=0; i < m_words; i++) 3697 for(size_t i=0; i < m_words; i++) 3684 3698 { 3685 3699 r_xram_rsp_to_tgt_rsp_data[i] = r_xram_rsp_trt_buf.wdata[i]; … … 3694 3708 #if DEBUG_MEMC_XRAM_RSP 3695 3709 if(m_debug_xram_rsp_fsm) 3696 std::cout << " <MEMC " << name() 3710 std::cout << " <MEMC " << name() 3697 3711 << " XRAM_RSP_ERROR_RSP> Request a response error to TGT_RSP FSM:" 3698 3712 << " srcid = " << std::dec << r_xram_rsp_trt_buf.srcid << std::endl; … … 4792 4806 addr_t address = m_cmd_cas_addr_fifo.read(); 4793 4807 char buf[80]; 4794 snprintf(buf, 80, "CAS_DIR_HIT_WRITE srcid %d", 4808 snprintf(buf, 80, "CAS_DIR_HIT_WRITE srcid %d", 4795 4809 (int)m_cmd_cas_srcid_fifo.read()); 4796 4810 check_monitor(buf, address, r_cas_wdata.read(), false); … … 4807 4821 << " / word = " << word 4808 4822 << " / value = " << r_cas_wdata.read() 4809 << " / count = " << r_cas_count.read() 4823 << " / count = " << r_cas_count.read() 4810 4824 << " / global_llsc_table access" << std::endl; 4811 4825 #endif … … 4856 4870 addr_t address = m_cmd_cas_addr_fifo.read(); 4857 4871 char buf[80]; 4858 snprintf(buf, 80, "CAS_DIR_HIT_WRITE srcid %d", 4872 snprintf(buf, 80, "CAS_DIR_HIT_WRITE srcid %d", 4859 4873 (int)m_cmd_cas_srcid_fifo.read()); 4860 4874 check_monitor(buf, address, r_cas_wdata.read(), false); … … 5092 5106 addr_t address = m_cmd_cas_addr_fifo.read(); 5093 5107 char buf[80]; 5094 snprintf(buf, 80, "CAS_DIR_HIT_WRITE srcid %d", 5108 snprintf(buf, 80, "CAS_DIR_HIT_WRITE srcid %d", 5095 5109 (int)m_cmd_cas_srcid_fifo.read()); 5096 5110 check_monitor(buf, address, r_cas_wdata.read(), false); … … 5103 5117 #if DEBUG_MEMC_CAS 5104 5118 if(m_debug_cas_fsm) 5105 std::cout << " <MEMC " << name() 5119 std::cout << " <MEMC " << name() 5106 5120 << " CAS_BC_UPT_LOCK> Register a broadcast inval transaction in UPT" 5107 5121 << " / nline = " << std::hex << nline … … 5159 5173 #if DEBUG_MEMC_CAS 5160 5174 if(m_debug_cas_fsm) 5161 std::cout << " <MEMC " << name() 5175 std::cout << " <MEMC " << name() 5162 5176 << " CAS_BC_DIR_INVAL> Register the PUT in TRT and invalidate DIR entry" 5163 5177 << " / nline = " << std::hex << m_nline[(addr_t)(m_cmd_cas_addr_fifo.read())] … … 5203 5217 #if DEBUG_MEMC_CAS 5204 5218 if(m_debug_cas_fsm) 5205 std::cout << " <MEMC " << name() 5219 std::cout << " <MEMC " << name() 5206 5220 << " CAS_BC_XRAM_REQ> Request a PUT transaction to IXR_CMD FSM" << std::hex 5207 5221 << " / nline = " << m_nline[(addr_t) m_cmd_cas_addr_fifo.read()] … … 5211 5225 else 5212 5226 { 5213 std::cout << "ERROR in MEM_CACHE / CAS_BC_XRAM_REQ state" 5227 std::cout << "ERROR in MEM_CACHE / CAS_BC_XRAM_REQ state" 5214 5228 << " : request should not have been previously set" << std::endl; 5215 5229 } … … 5232 5246 #if DEBUG_MEMC_CAS 5233 5247 if(m_debug_cas_fsm) 5234 std::cout << " <MEMC " << name() 5248 std::cout << " <MEMC " << name() 5235 5249 << " CAS_RSP_FAIL> Request TGT_RSP to send a failure response" << std::endl; 5236 5250 #endif … … 5254 5268 #if DEBUG_MEMC_CAS 5255 5269 if(m_debug_cas_fsm) 5256 std::cout << " <MEMC " << name() 5270 std::cout << " <MEMC " << name() 5257 5271 << " CAS_RSP_SUCCESS> Request TGT_RSP to send a success response" << std::endl; 5258 5272 #endif … … 5621 5635 #if DEBUG_MEMC_CC_SEND 5622 5636 if(m_debug_cc_send_fsm) 5623 std::cout << " <MEMC " << name() 5637 std::cout << " <MEMC " << name() 5624 5638 << " CC_SEND_CLEANUP_ACK> Cleanup Ack for srcid " 5625 5639 << std::hex << r_cleanup_to_cc_send_srcid.read() << std::endl; … … 5660 5674 #if DEBUG_MEMC_CC_SEND 5661 5675 if(m_debug_cc_send_fsm) 5662 std::cout << " <MEMC " << name() 5676 std::cout << " <MEMC " << name() 5663 5677 << " CC_SEND_XRAM_RSP_INVAL_NLINE> BC-Inval for line " 5664 5678 << std::hex << r_xram_rsp_to_cc_send_nline.read() << std::endl; … … 5688 5702 #if DEBUG_MEMC_CC_SEND 5689 5703 if(m_debug_cc_send_fsm) 5690 std::cout << " <MEMC " << name() 5704 std::cout << " <MEMC " << name() 5691 5705 << " CC_SEND_XRAM_RSP_BRDCAST_NLINE> BC-Inval for line " 5692 5706 << std::hex << r_xram_rsp_to_cc_send_nline.read() << std::endl; … … 5891 5905 // The CC_RECEIVE fsm controls the DSPIN target port on the coherence 5892 5906 // network. 5893 ////////////////////////////////////////////////////////////////////////////// /5907 ////////////////////////////////////////////////////////////////////////////// 5894 5908 5895 5909 switch(r_cc_receive_fsm.read()) … … 5906 5920 5907 5921 if((type == DspinDhccpParam::TYPE_CLEANUP_DATA) || 5908 (type == DspinDhccpParam::TYPE_CLEANUP_INST) 5909 { 5922 (type == DspinDhccpParam::TYPE_CLEANUP_INST)) 5923 { 5910 5924 r_cc_receive_fsm = CC_RECEIVE_CLEANUP; 5911 5925 break; 5912 5926 } 5913 5927 5914 5928 if(type == DspinDhccpParam::TYPE_MULTI_ACK) 5915 5929 { … … 5918 5932 } 5919 5933 5920 assert( 5921 false &&5922 " VCI_MEM_CACHE ERROR:Illegal type in coherence request");5923 5934 assert(false && 5935 "VCI_MEM_CACHE ERROR in CC_RECEIVE : " 5936 "Illegal type in coherence request"); 5937 5924 5938 break; 5925 5939 } 5926 5940 //////////////////////// 5927 case CC_RECEIVE_CLEANUP: // write first CLEANUP flit in CC_RECEIVE to CLEANUP fifo 5928 { 5929 if(not p_dspin_in.write or not m_cc_receive_to_cleanup_fifo.wok()) break; 5930 5931 assert( not p_dspin_in.eop.read() and 5932 "VCI_MEM_CACHE ERROR in CC_RECEIVE : CLEANUP command must have two flits"); 5941 case CC_RECEIVE_CLEANUP: 5942 { 5943 // write first CLEANUP flit in CC_RECEIVE to CLEANUP fifo 5944 5945 if(not p_dspin_in.write or not m_cc_receive_to_cleanup_fifo.wok()) 5946 break; 5947 5948 assert(not p_dspin_in.eop.read() and 5949 "VCI_MEM_CACHE ERROR in CC_RECEIVE : " 5950 "CLEANUP command must have two flits"); 5933 5951 5934 5952 cc_receive_to_cleanup_fifo_put = true; … … 5938 5956 } 5939 5957 //////////////////////////// 5940 case CC_RECEIVE_CLEANUP_EOP: // write second CLEANUP flit in CC_RECEIVE to CLEANUP fifo 5941 { 5942 if(not p_dspin_in.write or not m_cc_receive_to_cleanup_fifo.wok()) break; 5943 5944 assert( p_dspin_in.eop.read() and 5945 "VCI_MEM_CACHE ERROR in CC_RECEIVE : CLEANUP command must have two flits"); 5958 case CC_RECEIVE_CLEANUP_EOP: 5959 { 5960 // write second CLEANUP flit in CC_RECEIVE to CLEANUP fifo 5961 5962 if(not p_dspin_in.write or not m_cc_receive_to_cleanup_fifo.wok()) 5963 break; 5964 5965 assert(p_dspin_in.eop.read() and 5966 "VCI_MEM_CACHE ERROR in CC_RECEIVE : " 5967 "CLEANUP command must have two flits"); 5946 5968 5947 5969 cc_receive_to_cleanup_fifo_put = true; … … 5954 5976 case CC_RECEIVE_MULTI_ACK: 5955 5977 { 5978 // write MULTI_ACK flit in CC_RECEIVE to MULTI_ACK fifo 5979 5956 5980 // wait for a WOK in the CC_RECEIVE to MULTI_ACK fifo 5957 if(not p_dspin_in.write or not m_cc_receive_to_multi_ack_fifo.wok()) break; 5958 5959 assert( p_dspin_in.eop.read() and 5960 "VCI_MEM_CACHE ERROR in CC_RECEIVE : MULTI_ACK command must have one flit"); 5961 5962 cc_receive_to_multi_ack_fifo_put = true; 5963 r_cc_receive_fsm = CC_RECEIVE_IDLE; 5981 if(not p_dspin_in.write or not m_cc_receive_to_multi_ack_fifo.wok()) 5982 break; 5983 5984 assert(p_dspin_in.eop.read() and 5985 "VCI_MEM_CACHE ERROR in CC_RECEIVE : " 5986 "MULTI_ACK command must have one flit"); 5987 5988 cc_receive_to_multi_ack_fifo_put = true; 5989 r_cc_receive_fsm = CC_RECEIVE_IDLE; 5964 5990 break; 5965 5991 } … … 5982 6008 { 5983 6009 case TGT_RSP_READ_IDLE: 5984 { 6010 { 5985 6011 // write requests have the highest priority 5986 6012 if(r_write_to_tgt_rsp_req) r_tgt_rsp_fsm = TGT_RSP_WRITE; … … 6115 6141 } 6116 6142 #endif 6117 6118 uint32_t last_word_idx = r_read_to_tgt_rsp_word.read() + r_read_to_tgt_rsp_length.read() - 1; 6143 6144 uint32_t last_word_idx = r_read_to_tgt_rsp_word.read() + 6145 r_read_to_tgt_rsp_length.read() - 1; 6119 6146 bool is_last_word = (r_tgt_rsp_cpt.read() == last_word_idx); 6120 6147 bool is_ll = ((r_read_to_tgt_rsp_pktid.read() & 0x7) == TYPE_LL); 6121 6148 6122 if ( (is_last_word and not is_ll) or (r_tgt_rsp_key_sent.read() and is_ll)) 6149 if ((is_last_word and not is_ll) or 6150 (r_tgt_rsp_key_sent.read() and is_ll)) 6123 6151 { 6124 6152 // Last word in case of READ or second flit in case if LL … … 6211 6239 << " / cpt = " << std::dec << r_tgt_rsp_cpt.read() << std::endl; 6212 6240 #endif 6213 uint32_t last_word_idx = r_xram_rsp_to_tgt_rsp_word.read() + r_xram_rsp_to_tgt_rsp_length.read() - 1; 6241 uint32_t last_word_idx = r_xram_rsp_to_tgt_rsp_word.read() + 6242 r_xram_rsp_to_tgt_rsp_length.read() - 1; 6214 6243 bool is_last_word = (r_tgt_rsp_cpt.read() == last_word_idx); 6215 6244 bool is_ll = ((r_xram_rsp_to_tgt_rsp_pktid.read() & 0x7) == TYPE_LL); … … 6229 6258 { 6230 6259 r_tgt_rsp_key_sent = true; // Send second flit of ll 6231 } 6260 } 6232 6261 else 6233 6262 { … … 6388 6417 switch(r_alloc_dir_fsm.read()) 6389 6418 { 6390 case ALLOC_DIR_RESET: // Initializes the directory one SET per cycle. 6419 case ALLOC_DIR_RESET: // Initializes the directory one SET per cycle. 6391 6420 // All the WAYS of a SET initialized in parallel 6392 6421 … … 7154 7183 (r_ixr_rsp_fsm.read() == IXR_RSP_TRT_READ)) || 7155 7184 (r_ixr_rsp_fsm.read() == IXR_RSP_ACK)) 7156 7185 7157 7186 p_vci_ixr.rspack = true; 7158 7187 … … 7331 7360 cleanup_ack_type = DspinDhccpParam::TYPE_CLEANUP_ACK_INST; 7332 7361 } 7333 else 7362 else 7334 7363 { 7335 7364 cleanup_ack_type = DspinDhccpParam::TYPE_CLEANUP_ACK_DATA; … … 7338 7367 uint64_t flit = 0; 7339 7368 uint64_t dest = 7340 r_cleanup_to_cc_send_srcid.read() << 7369 r_cleanup_to_cc_send_srcid.read() << 7341 7370 (DspinDhccpParam::SRCID_WIDTH - vci_param_int::S); 7342 7371 … … 7378 7407 multi_inval_type = DspinDhccpParam::TYPE_MULTI_INVAL_INST; 7379 7408 } 7380 else 7409 else 7381 7410 { 7382 7411 multi_inval_type = DspinDhccpParam::TYPE_MULTI_INVAL_DATA; … … 7385 7414 uint64_t flit = 0; 7386 7415 uint64_t dest = 7387 m_xram_rsp_to_cc_send_srcid_fifo.read() << 7416 m_xram_rsp_to_cc_send_srcid_fifo.read() << 7388 7417 (DspinDhccpParam::SRCID_WIDTH - vci_param_int::S); 7389 7418 … … 7409 7438 7410 7439 p_dspin_out.write = true; 7411 p_dspin_out.data = flit; 7440 p_dspin_out.data = flit; 7412 7441 7413 7442 break; … … 7423 7452 r_xram_rsp_to_cc_send_nline.read(), 7424 7453 DspinDhccpParam::MULTI_INVAL_NLINE); 7425 7454 7426 7455 7427 7456 p_dspin_out.eop = true; … … 7517 7546 multi_updt_type = DspinDhccpParam::TYPE_MULTI_UPDT_INST; 7518 7547 } 7519 else 7548 else 7520 7549 { 7521 7550 multi_updt_type = DspinDhccpParam::TYPE_MULTI_UPDT_DATA; … … 7524 7553 uint64_t flit = 0; 7525 7554 uint64_t dest = 7526 m_write_to_cc_send_srcid_fifo.read() << 7555 m_write_to_cc_send_srcid_fifo.read() << 7527 7556 (DspinDhccpParam::SRCID_WIDTH - vci_param_int::S); 7528 7557 … … 7576 7605 { 7577 7606 7578 uint8_t multi_updt_cpt = 7607 uint8_t multi_updt_cpt = 7579 7608 r_cc_send_cpt.read() + r_write_to_cc_send_index.read(); 7580 7609 … … 7610 7639 multi_updt_type = DspinDhccpParam::TYPE_MULTI_UPDT_INST; 7611 7640 } 7612 else 7641 else 7613 7642 { 7614 7643 multi_updt_type = DspinDhccpParam::TYPE_MULTI_UPDT_DATA; … … 7617 7646 uint64_t flit = 0; 7618 7647 uint64_t dest = 7619 m_cas_to_cc_send_srcid_fifo.read() << 7648 m_cas_to_cc_send_srcid_fifo.read() << 7620 7649 (DspinDhccpParam::SRCID_WIDTH - vci_param_int::S); 7621 7650
Note: See TracChangeset
for help on using the changeset viewer.