Changeset 210 for trunk/modules/vci_cc_vcache_wrapper_v4/caba/source
- Timestamp:
- Mar 20, 2012, 4:32:16 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_cc_vcache_wrapper_v4/caba/source/src/vci_cc_vcache_wrapper_v4.cpp
r209 r210 478 478 size_t cache_word; 479 479 uint32_t cache_rdata; 480 bool cache_hit = r_dcache.read ( addr,480 bool cache_hit = r_dcache.read_neutral( addr, 481 481 &cache_rdata, 482 482 &cache_way, … … 938 938 r_tgt_pktid = p_vci_tgt_c.pktid.read(); 939 939 940 r_tgt_paddr = (paddr_t)(p_vci_tgt_c.be.read() & 0x3) << 32 | 941 (paddr_t)p_vci_tgt_c.wdata.read() * m_dcache_words * 4; 940 if (sizeof(paddr_t) <= 32) { 941 assert(p_vci_tgt_c.be.read() == 0 && "byte enable should be 0 for 32bits paddr"); 942 r_tgt_paddr = 943 (paddr_t)p_vci_tgt_c.wdata.read() * m_dcache_words * 4; 944 } else { 945 r_tgt_paddr = (paddr_t)(p_vci_tgt_c.be.read() & 0x3) << 32 | 946 (paddr_t)p_vci_tgt_c.wdata.read() * m_dcache_words * 4; 947 } 942 948 943 949 if ( (address&0x3) == 0x3 ) // broadcast invalidate for data or instruction type … … 1253 1259 if ( (int)r_dcache_xtn_opcode.read() == (int)iss_t::XTN_MMU_ICACHE_PA_INV) 1254 1260 { 1255 r_icache_vci_paddr = (paddr_t)r_mmu_word_hi.read() << 32 | 1256 (paddr_t)r_mmu_word_lo.read(); 1261 if (sizeof(paddr_t) <= 32) { 1262 assert(r_mmu_word_hi.read() == 0 && 1263 "high bits should be 0 for 32bit paddr"); 1264 r_icache_vci_paddr = (paddr_t)r_mmu_word_lo.read(); 1265 } else { 1266 r_icache_vci_paddr = 1267 (paddr_t)r_mmu_word_hi.read() << 32 | 1268 (paddr_t)r_mmu_word_lo.read(); 1269 } 1257 1270 r_icache_fsm = ICACHE_XTN_CACHE_INVAL_PA; 1258 1271 break; … … 1633 1646 { 1634 1647 paddr_t nline; 1635 1636 r_icache.inval( r_icache_miss_way.read(), 1648 bool hit; 1649 1650 hit = r_icache.inval( r_icache_miss_way.read(), 1637 1651 r_icache_miss_set.read(), 1638 1652 &nline ); // unused 1653 assert(hit && "selected way/set line should be in icache"); 1639 1654 1640 1655 r_icache_fsm = ICACHE_MISS_WAIT; … … 2335 2350 case iss_t::XTN_MMU_DCACHE_PA_INV: // dcache, dtlb & itlb access 2336 2351 r_dcache_fsm = DCACHE_XTN_DC_INVAL_PA; 2337 r_dcache_p0_paddr = (paddr_t)r_mmu_word_hi.read() << 32 | 2338 (paddr_t)r_mmu_word_lo.read(); 2352 if (sizeof(paddr_t) <= 32) { 2353 assert(r_mmu_word_hi.read() == 0 && 2354 "high bits should be 0 for 32bit paddr"); 2355 r_dcache_p0_paddr = 2356 (paddr_t)r_mmu_word_lo.read(); 2357 } else { 2358 r_dcache_p0_paddr = 2359 (paddr_t)r_mmu_word_hi.read() << 32 | 2360 (paddr_t)r_mmu_word_lo.read(); 2361 } 2339 2362 break; 2340 2363 … … 3586 3609 size_t way = r_dcache_miss_way.read(); 3587 3610 size_t set = r_dcache_miss_set.read(); 3588 3589 r_dcache.inval( way, 3611 bool hit; 3612 3613 hit = r_dcache.inval( way, 3590 3614 set, 3591 3615 &nline ); 3592 3616 assert(hit && "selected way/set line should be in dcache"); 3617 3618 #if DEBUG_DCACHE 3619 if ( m_debug_dcache_fsm ) 3620 { 3621 std::cout << " <PROC.DCACHE_MISS_INVAL> inval line:" 3622 << " / way = " << way 3623 << " / set = " << set 3624 << " / nline = " << std::hex << nline << std::endl; 3625 } 3626 #endif 3593 3627 // if selective itlb & dtlb invalidate are required 3594 3628 // the miss response is not handled before invalidate completed
Note: See TracChangeset
for help on using the changeset viewer.