Changeset 247 for trunk/modules/vci_mem_cache_v4/caba
- Timestamp:
- Aug 8, 2012, 12:03:25 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_mem_cache_v4/caba/source/src/vci_mem_cache_v4.cpp
r246 r247 273 273 m_seglist(mtp.getSegmentList(vci_tgt_index)), 274 274 m_cseglist(mtc.getSegmentList(vci_tgt_index_cleanup)), 275 m_coherence_table( mtc.getCoherenceTable<vci_addr_t>() ),276 275 m_transaction_tab_lines(transaction_tab_lines), 277 276 m_transaction_tab( transaction_tab_lines, nwords ), … … 354 353 r_alloc_dir_fsm("r_alloc_dir_fsm"), 355 354 r_alloc_trt_fsm("r_alloc_trt_fsm"), 356 r_alloc_upt_fsm("r_alloc_upt_fsm") 357 355 r_alloc_upt_fsm("r_alloc_upt_fsm"), 356 r_alloc_heap_fsm("r_alloc_heap_fsm") 358 357 { 359 358 assert(IS_POW_OF_2(nsets)); … … 552 551 } 553 552 delete [] m_cache_data; 554 delete [] m_coherence_table;555 553 556 554 delete [] r_ixr_rsp_to_xram_rsp_rok; … … 587 585 r_cleanup_fsm = CLEANUP_IDLE; 588 586 r_alloc_dir_fsm = ALLOC_DIR_READ; 587 r_alloc_heap_fsm = ALLOC_HEAP_READ; 589 588 r_alloc_trt_fsm = ALLOC_TRT_READ; 590 589 r_alloc_upt_fsm = ALLOC_UPT_WRITE; … … 3298 3297 ((p_vci_tgt_cleanup.address.read() & 0x3) == 0) && reached) 3299 3298 { 3300 addr_t line = (addr_t)(m_nline[(vci_addr_t)(p_vci_tgt_cleanup.address.read())]); 3299 addr_t line =(((addr_t) p_vci_tgt_cleanup.be.read() << (vci_param::B*8))) | 3300 (((addr_t) p_vci_tgt_cleanup.wdata.read())); 3301 3301 3302 3302 r_cleanup_nline = line; … … 5253 5253 switch ( r_alloc_dir_fsm.read() ) 5254 5254 { 5255 5256 5255 //////////////////// 5257 5256 case ALLOC_DIR_READ: … … 5881 5880 p_vci_ini.cfixed = false; 5882 5881 5882 vci_addr_t vci_ini_address = 0; 5883 5883 switch ( r_init_cmd_fsm.read() ) { 5884 5884 … … 5897 5897 case INIT_CMD_INVAL_NLINE: 5898 5898 { 5899 vci_ini_address = (vci_addr_t) 5900 m_xram_rsp_to_init_cmd_srcid_fifo.read() << (vci_param::N - vci_param::S); 5901 5899 5902 p_vci_ini.cmdval = m_xram_rsp_to_init_cmd_inst_fifo.rok(); 5900 5903 if(m_xram_rsp_to_init_cmd_inst_fifo.rok()){ 5901 5904 if(m_xram_rsp_to_init_cmd_inst_fifo.read()) { 5902 p_vci_ini.address = (addr_t)(m_coherence_table[m_xram_rsp_to_init_cmd_srcid_fifo.read()]+4);5905 p_vci_ini.address = (addr_t) (vci_ini_address+4); 5903 5906 } else { 5904 p_vci_ini.address = (addr_t)(m_coherence_table[m_xram_rsp_to_init_cmd_srcid_fifo.read()]);5907 p_vci_ini.address = (addr_t) (vci_ini_address); 5905 5908 } 5906 5909 } else p_vci_ini.address = 0; // prevent segmentation faults by reading an empty fifo … … 5935 5938 break; 5936 5939 case INIT_CMD_UPDT_NLINE: 5940 vci_ini_address = (vci_addr_t) 5941 m_write_to_init_cmd_srcid_fifo.read() << (vci_param::N - vci_param::S); 5942 5937 5943 p_vci_ini.cmdval = m_write_to_init_cmd_inst_fifo.rok(); 5938 5944 if(m_write_to_init_cmd_inst_fifo.rok()){ 5939 5945 if(m_write_to_init_cmd_inst_fifo.read()) { 5940 p_vci_ini.address = (addr_t)( m_coherence_table[m_write_to_init_cmd_srcid_fifo.read()]+ 12);5946 p_vci_ini.address = (addr_t)(vci_ini_address + 12); 5941 5947 } else { 5942 p_vci_ini.address = (addr_t)( m_coherence_table[m_write_to_init_cmd_srcid_fifo.read()]+ 8);5948 p_vci_ini.address = (addr_t)(vci_ini_address + 8); 5943 5949 } 5944 5950 } else { … … 5953 5959 break; 5954 5960 case INIT_CMD_UPDT_INDEX: 5961 vci_ini_address = (vci_addr_t) 5962 m_write_to_init_cmd_srcid_fifo.read() << (vci_param::N - vci_param::S); 5963 5955 5964 p_vci_ini.cmdval = true; 5956 5965 if(m_write_to_init_cmd_inst_fifo.read()) { 5957 p_vci_ini.address = (addr_t)( m_coherence_table[m_write_to_init_cmd_srcid_fifo.read()]+ 12);5966 p_vci_ini.address = (addr_t)(vci_ini_address + 12); 5958 5967 } else { 5959 p_vci_ini.address = (addr_t)( m_coherence_table[m_write_to_init_cmd_srcid_fifo.read()]+ 8);5968 p_vci_ini.address = (addr_t)(vci_ini_address + 8); 5960 5969 } 5961 5970 p_vci_ini.wdata = r_write_to_init_cmd_index.read(); … … 5967 5976 break; 5968 5977 case INIT_CMD_UPDT_DATA: 5978 vci_ini_address = (vci_addr_t) 5979 m_write_to_init_cmd_srcid_fifo.read() << (vci_param::N - vci_param::S); 5980 5969 5981 p_vci_ini.cmdval = true; 5970 5982 if(m_write_to_init_cmd_inst_fifo.read()) { 5971 p_vci_ini.address = (addr_t)( m_coherence_table[m_write_to_init_cmd_srcid_fifo.read()]+ 12);5983 p_vci_ini.address = (addr_t)(vci_ini_address + 12); 5972 5984 } else { 5973 p_vci_ini.address = (addr_t)( m_coherence_table[m_write_to_init_cmd_srcid_fifo.read()]+ 8);5985 p_vci_ini.address = (addr_t)(vci_ini_address + 8); 5974 5986 } 5975 5987 p_vci_ini.wdata = r_write_to_init_cmd_data[r_init_cmd_cpt.read() + … … 5994 6006 break; 5995 6007 case INIT_CMD_SC_UPDT_NLINE: 6008 vci_ini_address = (vci_addr_t) 6009 m_sc_to_init_cmd_srcid_fifo.read() << (vci_param::N - vci_param::S); 6010 5996 6011 p_vci_ini.cmdval = m_sc_to_init_cmd_inst_fifo.rok(); 5997 6012 if(m_sc_to_init_cmd_inst_fifo.rok()){ 5998 6013 if( m_sc_to_init_cmd_inst_fifo.read() ) { 5999 p_vci_ini.address = (addr_t)( m_coherence_table[m_sc_to_init_cmd_srcid_fifo.read()]+ 12);6014 p_vci_ini.address = (addr_t)(vci_ini_address + 12); 6000 6015 } else { 6001 p_vci_ini.address = (addr_t)( m_coherence_table[m_sc_to_init_cmd_srcid_fifo.read()]+ 8);6016 p_vci_ini.address = (addr_t)(vci_ini_address + 8); 6002 6017 } 6003 6018 } else { … … 6016 6031 break; 6017 6032 case INIT_CMD_SC_UPDT_INDEX: 6033 vci_ini_address = (vci_addr_t) 6034 m_sc_to_init_cmd_srcid_fifo.read() << (vci_param::N - vci_param::S); 6035 6018 6036 p_vci_ini.cmdval = true; 6019 6037 if( m_sc_to_init_cmd_inst_fifo.read() ) { 6020 p_vci_ini.address = (addr_t)( m_coherence_table[m_sc_to_init_cmd_srcid_fifo.read()]+ 12);6038 p_vci_ini.address = (addr_t)(vci_ini_address + 12); 6021 6039 } else { 6022 p_vci_ini.address = (addr_t)( m_coherence_table[m_sc_to_init_cmd_srcid_fifo.read()]+ 8);6040 p_vci_ini.address = (addr_t)(vci_ini_address + 8); 6023 6041 } 6024 6042 p_vci_ini.wdata = r_sc_to_init_cmd_index.read(); … … 6034 6052 break; 6035 6053 case INIT_CMD_SC_UPDT_DATA: 6054 vci_ini_address = (vci_addr_t) 6055 m_sc_to_init_cmd_srcid_fifo.read() << (vci_param::N - vci_param::S); 6056 6036 6057 p_vci_ini.cmdval = true; 6037 6058 if( m_sc_to_init_cmd_inst_fifo.read() ) { 6038 p_vci_ini.address = (addr_t)( m_coherence_table[m_sc_to_init_cmd_srcid_fifo.read()]+ 12);6059 p_vci_ini.address = (addr_t)(vci_ini_address + 12); 6039 6060 } else { 6040 p_vci_ini.address = (addr_t)( m_coherence_table[m_sc_to_init_cmd_srcid_fifo.read()]+ 8);6061 p_vci_ini.address = (addr_t)(vci_ini_address + 8); 6041 6062 } 6042 6063 p_vci_ini.wdata = r_sc_to_init_cmd_wdata.read(); … … 6053 6074 break; 6054 6075 case INIT_CMD_SC_UPDT_DATA_HIGH: 6076 vci_ini_address = (vci_addr_t) 6077 m_sc_to_init_cmd_srcid_fifo.read() << (vci_param::N - vci_param::S); 6078 6055 6079 p_vci_ini.cmdval = true; 6056 6080 if( m_sc_to_init_cmd_inst_fifo.read() ) { 6057 p_vci_ini.address = (addr_t)( m_coherence_table[m_sc_to_init_cmd_srcid_fifo.read()]+ 12);6081 p_vci_ini.address = (addr_t)(vci_ini_address + 12); 6058 6082 } else { 6059 p_vci_ini.address = (addr_t)( m_coherence_table[m_sc_to_init_cmd_srcid_fifo.read()]+ 8);6083 p_vci_ini.address = (addr_t)(vci_ini_address + 8); 6060 6084 } 6061 6085 p_vci_ini.wdata = r_sc_to_init_cmd_wdata_high.read();
Note: See TracChangeset
for help on using the changeset viewer.