Changeset 247 for trunk/modules/vci_cc_vcache_wrapper_v4
- Timestamp:
- Aug 8, 2012, 12:03:25 PM (12 years ago)
- Location:
- trunk/modules/vci_cc_vcache_wrapper_v4/caba/source
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_cc_vcache_wrapper_v4/caba/source/include/vci_cc_vcache_wrapper_v4.h
r217 r247 254 254 const size_t m_dcache_words; 255 255 256 const size_t m_x_width; 257 const size_t m_y_width; 258 259 const size_t m_memory_cache_local_id; 260 256 261 const size_t m_proc_id; 257 262 … … 625 630 size_t wbuf_nlines, 626 631 size_t wbuf_nwords, 632 size_t x_width, 633 size_t y_width, 634 uint32_t memory_cache_local_id, 627 635 uint32_t max_frozen_cycles, 628 636 uint32_t debug_start_cycle, -
trunk/modules/vci_cc_vcache_wrapper_v4/caba/source/src/vci_cc_vcache_wrapper_v4.cpp
r239 r247 166 166 size_t wbuf_nlines, 167 167 size_t wbuf_nwords, 168 uint32_t max_frozen_cycles, 169 uint32_t debug_start_cycle, 168 size_t x_width, 169 size_t y_width, 170 uint32_t memory_cache_local_id, 171 uint32_t max_frozen_cycles, 172 uint32_t debug_start_cycle, 170 173 bool debug_ok) 171 174 : soclib::caba::BaseModule(name), … … 197 200 m_dcache_yzmask((~0)<<(uint32_log2(dcache_words) + 2)), 198 201 m_dcache_words(dcache_words), 202 203 m_x_width(x_width), 204 m_y_width(y_width), 205 206 m_memory_cache_local_id(memory_cache_local_id), 199 207 200 208 m_proc_id(proc_id), … … 4812 4820 // it depends on the CLEANUP FSM state 4813 4821 4822 paddr_t cleanup_nline; 4814 4823 paddr_t address; 4815 4824 4816 4825 if ( r_cleanup_fsm.read() == CLEANUP_DATA_GO ) 4817 address = r_dcache_cleanup_line.read()*m_dcache_words*4; 4826 { 4827 cleanup_nline = r_dcache_cleanup_line.read(); 4828 address = (m_x_width + m_y_width) ? (cleanup_nline * m_dcache_words * 4 ) >> 4829 (vci_param::N - m_x_width - m_y_width ) : 0; 4830 } 4818 4831 else if ( r_cleanup_fsm.read() == CLEANUP_INS_GO ) 4819 address = r_icache_cleanup_line.read()*m_icache_words*4; 4832 { 4833 cleanup_nline = r_icache_cleanup_line.read(); 4834 address = (m_x_width + m_y_width) ? (cleanup_nline * m_icache_words * 4 ) >> 4835 (vci_param::N - m_x_width - m_y_width ) : 0; 4836 } 4820 4837 else 4821 address = 0; 4838 { 4839 cleanup_nline = 0; 4840 address = 0; 4841 } 4842 4843 address <<= vci_param::S - m_x_width - m_y_width; 4844 address |= m_memory_cache_local_id; 4845 address <<= vci_param::N - vci_param::S; 4822 4846 4823 4847 p_vci_ini_c.cmdval = ((r_cleanup_fsm.read() == CLEANUP_DATA_GO) or 4824 4848 (r_cleanup_fsm.read() == CLEANUP_INS_GO) ); 4825 4849 p_vci_ini_c.address = address; 4826 p_vci_ini_c.wdata = 0;4827 p_vci_ini_c.be = 0xF;4850 p_vci_ini_c.wdata = (uint32_t) cleanup_nline; 4851 p_vci_ini_c.be = (cleanup_nline >> 32) & 0x3; 4828 4852 p_vci_ini_c.plen = 4; 4829 4853 p_vci_ini_c.cmd = vci_param::CMD_WRITE;
Note: See TracChangeset
for help on using the changeset viewer.