Ignore:
Timestamp:
Sep 4, 2013, 4:35:03 PM (11 years ago)
Author:
haoliu
Message:

bug fixed in vci_cc_vcache_wrapper(RWT),
when we have to modify the bit L/R(flag in pte1 or pte2) in using the cas operation,
with RWT if the ligne of the pte2 is not coherent, the cas will be done locally.

We forgot to modify locally in case of pte1 update.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/RWT/modules/vci_cc_vcache_wrapper/caba/source/src/vci_cc_vcache_wrapper.cpp

    r513 r515  
    343343      r_dcache_tlb_pte_flags("r_dcache_tlb_pte_flags"),
    344344      r_dcache_tlb_pte_ppn("r_dcache_tlb_pte_ppn"),
    345       r_dcache_tlb_cache_way("r_dcache_tlb_cache_way"),
    346       r_dcache_tlb_cache_set("r_dcache_tlb_cache_set"),
    347       r_dcache_tlb_cache_word("r_dcache_tlb_cache_word"),
     345//     r_dcache_tlb_cache_way("r_dcache_tlb_cache_way"),
     346//     r_dcache_tlb_cache_set("r_dcache_tlb_cache_set"),
     347//     r_dcache_tlb_cache_word("r_dcache_tlb_cache_word"),
    348348      r_dcache_tlb_way("r_dcache_tlb_way"),
    349349      r_dcache_tlb_set("r_dcache_tlb_set"),
     
    31703170                r_dcache_content_state[m_icache_sets*way+set] = LINE_CACHE_IN_TLB;
    31713171                r_dcache_tlb_pte_flags  = entry;
    3172                 r_dcache_tlb_cache_way  = way;
    3173                 r_dcache_tlb_cache_set  = set;
    3174                 r_dcache_tlb_cache_word = word;
     3172               //r_dcache_tlb_cache_way  = way;
     3173               //r_dcache_tlb_cache_set  = set;
     3174               //r_dcache_tlb_cache_word = word;
    31753175                r_dcache_fsm            = DCACHE_TLB_PTE1_SELECT;
     3176
     3177                r_cas_islocal    = (cache_state == CACHE_SLOT_STATE_VALID_NCC);//do not check L2 if NCC: the CAS is necessarily a success
     3178                r_cas_local_way  = way;
     3179                r_cas_local_set  = set;
     3180                r_cas_local_word = word;
    31763181
    31773182#if DEBUG_DCACHE
     
    34443449                r_dcache_tlb_pte_flags  = pte_flags;
    34453450                r_dcache_tlb_pte_ppn    = pte_ppn;
    3446                 r_dcache_tlb_cache_way  = way;
    3447                 r_dcache_tlb_cache_set  = set;
    3448                 r_dcache_tlb_cache_word = word;
     3451               //r_dcache_tlb_cache_way  = way;
     3452               //r_dcache_tlb_cache_set  = set;
     3453               //r_dcache_tlb_cache_word = word;
    34493454                r_dcache_fsm            = DCACHE_TLB_PTE2_SELECT;
    34503455
     3456                r_cas_islocal    = (cache_state == CACHE_SLOT_STATE_VALID_NCC);//do not check L2 if NCC: the CAS is necessarily a success
     3457                r_cas_local_way  = way;
     3458                r_cas_local_set  = set;
     3459                r_cas_local_word = word;
     3460         
    34513461#if DEBUG_DCACHE
    34523462if ( m_debug_activated )
     
    35573567        // and can be obtained in the mapping table.
    35583568        // As long as this computation is not done, all access are local.
    3559 
    3560         int  state;
    3561         size_t way;
    3562         size_t set;
    3563         size_t word;
    3564         r_dcache.read_dir(r_dcache_tlb_paddr.read(),
    3565                           &state,
    3566                           &way,
    3567                           &set,
    3568                           &word);
    3569         r_cas_islocal = (state == CACHE_SLOT_STATE_VALID_NCC);//do not check L2 if NCC: the CAS is necessarily a success
    3570         r_cas_local_way = way;
    3571         r_cas_local_set = set;
    3572         r_cas_local_word = word;
    35733569
    35743570        if ( local )                                            // local access
Note: See TracChangeset for help on using the changeset viewer.