Changeset 71


Ignore:
Timestamp:
Aug 4, 2010, 8:47:36 PM (14 years ago)
Author:
bouyer
Message:

When updating PTE bits, don't write back to the dcache locally, the
ll/sc will update the cache for us.
Avoids potential coherence issues between the L1 cache and ram.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/vci_cc_vcache_wrapper2_v1/caba/source/src/vci_cc_vcache_wrapper2_v1.cpp

    r70 r71  
    22692269        else if ( r_itlb_acc_dcache_req ) // ins tlb write access bit
    22702270        {
    2271             bool write_hit = r_dcache.write(r_icache_paddr_save, r_icache_pte_update);
    2272             assert(write_hit && "Write on miss ignores data");
    22732271            r_dcache_itlb_ll_acc_req = true;
    22742272            r_dcache_fsm = DCACHE_ITLB_LL_WAIT;         
     
    31533151                {
    31543152                    r_dcache_tlb_ptba_read = false;
    3155                     write_hit = r_dcache.write(((paddr_t)(tlb_data & ((1<<(m_paddr_nbits - PAGE_K_NBITS))-1)) << PAGE_K_NBITS |
    3156                                                 (paddr_t)(((dreq.addr & PTD_ID2_MASK) >> PAGE_K_NBITS) << 3)), r_dcache_pte_update);
    3157                     //assert(write_hit && "Write on miss ignores data");
    31583153                    r_dcache_tlb_ll_dirty_req = true;
    31593154                    r_dcache_fsm = DCACHE_LL_DIRTY_WAIT;
     
    31813176                        r_dcache_pte_update = tlb_data | PTE_L_MASK;
    31823177                        r_dcache_tlb_ll_acc_req = true;
    3183                         write_hit = r_dcache.write(r_dcache_tlb_paddr,(tlb_data | PTE_L_MASK)); 
    3184                         assert(write_hit && "Write on miss ignores data"); 
    31853178                        r_dcache_fsm = DCACHE_TLB1_LL_WAIT;
    31863179                        m_cpt_dcache_data_write++;
     
    32003193                        r_dcache_pte_update = tlb_data | PTE_R_MASK;
    32013194                        r_dcache_tlb_ll_acc_req = true;
    3202                         write_hit = r_dcache.write(r_dcache_tlb_paddr,(tlb_data | PTE_R_MASK)); 
    3203                         assert(write_hit && "Write on miss ignores data"); 
    32043195                        r_dcache_fsm = DCACHE_TLB1_LL_WAIT;
    32053196                        m_cpt_dcache_data_write++;
     
    34953486                {
    34963487                    r_dcache_tlb_ptba_read = false;
    3497                     write_hit = r_dcache.write(((paddr_t)(rsp_dtlb_miss & ((1<<(m_paddr_nbits - PAGE_K_NBITS))-1)) << PAGE_K_NBITS |
    3498                                                 (paddr_t)(((dreq.addr & PTD_ID2_MASK) >> PAGE_K_NBITS) << 3)),r_dcache_pte_update);
    3499                     //assert(write_hit && "Write on miss ignores data");
    35003488                    r_dcache_tlb_ll_dirty_req = true;
    35013489                    r_dcache_fsm = DCACHE_LL_DIRTY_WAIT;
     
    35233511                        r_dcache_pte_update = rsp_dtlb_miss | PTE_L_MASK;
    35243512                        r_dcache_tlb_ll_acc_req = true;
    3525                         write_hit = r_dcache.write(r_dcache_tlb_paddr,(rsp_dtlb_miss | PTE_L_MASK)); 
    3526                         assert(write_hit && "Write on miss ignores data"); 
    35273513                        r_dcache_fsm        = DCACHE_TLB1_LL_WAIT;
    35283514                        m_cpt_dcache_data_write++;
     
    35423528                        r_dcache_pte_update = rsp_dtlb_miss | PTE_R_MASK;
    35433529                        r_dcache_tlb_ll_acc_req = true;
    3544                         write_hit = r_dcache.write(r_dcache_tlb_paddr,(rsp_dtlb_miss | PTE_R_MASK)); 
    3545                         assert(write_hit && "Write on miss ignores data"); 
    35463530                        r_dcache_fsm        = DCACHE_TLB1_LL_WAIT;
    35473531                        m_cpt_dcache_data_write++;
     
    36553639                        r_dcache_ppn_update = tlb_data_ppn;
    36563640                        r_dcache_tlb_ll_acc_req = true;
    3657                         write_hit = r_dcache.write(r_dcache_tlb_paddr,(tlb_data | PTE_L_MASK)); 
    3658                         assert(write_hit && "Write on miss ignores data"); 
    36593641                        r_dcache_fsm = DCACHE_TLB2_LL_WAIT;
    36603642                        m_cpt_dcache_data_write++;
     
    36763658                        r_dcache_ppn_update = tlb_data_ppn;
    36773659                        r_dcache_tlb_ll_acc_req = true;
    3678                         write_hit = r_dcache.write(r_dcache_tlb_paddr,(tlb_data | PTE_R_MASK)); 
    3679                         assert(write_hit && "Write on miss ignores data"); 
    36803660                        r_dcache_fsm = DCACHE_TLB2_LL_WAIT;
    36813661                        m_cpt_dcache_data_write++;
     
    39863966                        r_dcache_ppn_update = tlb_data_ppn;
    39873967                        r_dcache_tlb_ll_acc_req = true;
    3988                         write_hit = r_dcache.write(r_dcache_tlb_paddr,(rsp_dtlb_miss | PTE_L_MASK)); 
    3989                         assert(write_hit && "Write on miss ignores data"); 
    39903968                        r_dcache_fsm = DCACHE_TLB2_LL_WAIT;
    39913969                        m_cpt_dcache_data_write++;
     
    40073985                        r_dcache_ppn_update = tlb_data_ppn;
    40083986                        r_dcache_tlb_ll_acc_req = true;
    4009                         write_hit = r_dcache.write(r_dcache_tlb_paddr,(rsp_dtlb_miss | PTE_R_MASK)); 
    4010                         assert(write_hit && "Write on miss ignores data"); 
    40113987                        r_dcache_fsm = DCACHE_TLB2_LL_WAIT;
    40123988                        m_cpt_dcache_data_write++;
Note: See TracChangeset for help on using the changeset viewer.