Changeset 201 for trunk/modules/vci_cc_vcache_wrapper_v4
- Timestamp:
- Feb 24, 2012, 2:07:31 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
r199 r201 208 208 m_dcache_yzmask((~0)<<(uint32_log2(dcache_words) + 2)), 209 209 m_dcache_words(dcache_words), 210 211 m_proc_id(proc_id), 210 212 211 213 m_max_frozen_cycles(max_frozen_cycles), … … 1424 1426 r_icache_vci_paddr = paddr; 1425 1427 1426 // Finally, we get the instruction depending on cacheability 1428 // We enter this section only in case of TLB hit: 1429 // Finally, we get the instruction depending on cacheability, 1430 // we send the response to processor, and compute next state 1427 1431 if ( cacheable ) // cacheable read 1428 1432 { 1433 if ( (r_icache_vci_paddr.read() & ~PAGE_K_MASK) 1434 != (paddr & ~PAGE_K_MASK) ) // speculative access KO 1435 { 1436 1437 #ifdef INSTRUMENTATION 1438 m_cpt_icache_spc_miss++; 1439 #endif 1440 // we return an invalid response and stay in IDLE state 1441 // the cache access will cost one extra cycle. 1442 break; 1443 } 1444 1429 1445 if ( not cache_hit ) // cache miss 1430 1446 { … … 1440 1456 r_icache_miss_req = true; 1441 1457 } 1458 break; 1442 1459 } 1443 1460 else // cache hit 1444 1461 { 1445 if ( (r_icache_vci_paddr.read() & ~PAGE_K_MASK)1446 != (paddr & ~PAGE_K_MASK) ) // speculative access KO1447 {1448 1449 #ifdef INSTRUMENTATION1450 m_cpt_icache_spc_miss++;1451 #endif1452 // we return an invalid response1453 // and the cache access will cost one extra cycle.1454 break;1455 }1456 else // speculative access OK1457 {1458 1462 1459 1463 #ifdef INSTRUMENTATION 1460 1464 m_cpt_ins_read++; 1461 1465 #endif 1462 irsp.valid = true; 1463 irsp.instruction = cache_inst; 1464 } 1466 irsp.valid = true; 1467 irsp.instruction = cache_inst; 1465 1468 } 1466 1469 } … … 2051 2054 // There is 4 configurations to access the cache, 2052 2055 // depending on the pipe-line state, defined 2053 // by the r_dcache_p0_valid flip-flop (P1 stage activated)2054 // and r_dcache_p1_valid flip-flop (P2 stage activated) :2056 // by the r_dcache_p0_valid (V0) flip-flop : P1 stage activated 2057 // and r_dcache_p1_valid (V1) flip-flop : P2 stage activated 2055 2058 // V0 / V1 / Data / Directory / comment 2056 2059 // 0 / 0 / read(A0) / read(A0) / read speculative access … … 2709 2712 // SC request: 2710 2713 // - if a valid LL reservation (with the same address) is registered, 2711 // we request a SC transaction to CMD FSM and go to the DCACHE_ SC_WAIT state2714 // we request a SC transaction to CMD FSM and go to the DCACHE_UNC_WAIT state 2712 2715 // that will directly return the response to the processor, and invalidate 2713 // the LL reservation. We don't check a possible hit in dcache, as this is2714 // done by the coherence transaction...2716 // the LL reservation. We don't check a possible write hit in dcache, 2717 // as the cache update is done by the coherence transaction... 2715 2718 // - if there is no registerd LL, we just stay in IDLE state, invalidate 2716 2719 // the LL reservation, and return 1 (atomic access failed)
Note: See TracChangeset
for help on using the changeset viewer.