Changeset 70 for trunk/modules/vci_cc_vcache_wrapper2_v1/caba
- Timestamp:
- Aug 3, 2010, 10:37:39 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_cc_vcache_wrapper2_v1/caba/source/src/vci_cc_vcache_wrapper2_v1.cpp
r69 r70 2680 2680 else 2681 2681 { 2682 r_dcache_unc_req = true; 2683 r_dcache_fsm = DCACHE_UNC_WAIT; 2684 m_cpt_unc_read++; 2685 m_cost_unc_read_frz++; 2682 if (dreq.type == iss_t::DATA_SC && 2683 (r_mmu_mode.read() & DATA_TLB_MASK) && 2684 !dcache_pte_info.d) 2685 { 2686 /* dirty bit update */ 2687 m_cpt_data_tlb_update_dirty++; 2688 m_cost_data_tlb_update_dirty_frz++; 2689 if ( dcache_tlb.getpagesize(dcache_tlb_way, dcache_tlb_set) ) // 2M page size, one level page table 2690 { 2691 r_dcache_pte_update = dcache_tlb.getpte(dcache_tlb_way, dcache_tlb_set) | PTE_D_MASK; 2692 r_dcache_tlb_paddr = (paddr_t)r_mmu_ptpr << (INDEX1_NBITS+2) | (paddr_t)((dreq.addr>>PAGE_M_NBITS)<<2); 2693 r_dcache_tlb_ll_dirty_req = true; 2694 r_dcache_fsm = DCACHE_LL_DIRTY_WAIT; 2695 } 2696 else // 4k page size, two levels page table 2697 { 2698 if (dcache_hit_p) 2699 { 2700 r_dcache_pte_update = dcache_tlb.getpte(dcache_tlb_way, dcache_tlb_set) | PTE_D_MASK; 2701 r_dcache_tlb_paddr = (paddr_t)r_dcache_ptba_save | (paddr_t)(((dreq.addr&PTD_ID2_MASK)>>PAGE_K_NBITS) << 3); 2702 r_dcache_tlb_ll_dirty_req = true; 2703 r_dcache_fsm = DCACHE_LL_DIRTY_WAIT; 2704 } 2705 else // get PTBA to calculate the physical address of PTE 2706 { 2707 r_dcache_pte_update = dcache_tlb.getpte(dcache_tlb_way, dcache_tlb_set) | PTE_D_MASK; 2708 r_dcache_tlb_paddr = (paddr_t)r_mmu_ptpr << (INDEX1_NBITS+2) | (paddr_t)((dreq.addr>>PAGE_M_NBITS)<<2); 2709 r_dcache_tlb_ptba_read = true; 2710 r_dcache_fsm = DCACHE_DTLB1_READ_CACHE; 2711 } 2712 } 2713 } 2714 else 2715 { 2716 r_dcache_unc_req = true; 2717 r_dcache_fsm = DCACHE_UNC_WAIT; 2718 m_cpt_unc_read++; 2719 m_cost_unc_read_frz++; 2720 } 2686 2721 } 2687 2722 }
Note: See TracChangeset
for help on using the changeset viewer.