Ignore:
Timestamp:
Aug 6, 2010, 10:32:14 PM (14 years ago)
Author:
bouyer
Message:

2 fixes:

  • do not test r_dcache_in_[id]tlb[] just after setting the entry to false, just go to DCACHE_TLB_CC_INVAL in these cases.
  • if r_dcache_fsm_save is DCACHE_TLB1_UPDT or DCACHE_TLB2_UPDT, the dcache line is already valid, so move test for these cases in the dcache_hit case.
File:
1 edited

Legend:

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

    r71 r72  
    41194119            {
    41204120                // data TLB flush
    4121                 dcache_tlb.flush(true);      // global entries are not invalidated
     4121                dcache_tlb.flush(true);      // global entries are invalidated
    41224122                r_dtlb_translation_valid = false;
    41234123                r_dcache_ptba_ok = false;
     
    43794379                r_dcache_cleanup_line = victim_index;
    43804380                m_cpt_cc_cleanup_data++;
    4381                 if ( r_dcache_in_itlb[m_dcache_sets*way+set] || r_dcache_in_dtlb[m_dcache_sets*way+set] )
    4382                 {
    4383                     r_dcache_fsm = DCACHE_TLB_CC_INVAL;
    4384                     r_dcache_fsm_save = r_dcache_fsm;
    4385                     break;
    4386                 }
     4381                r_dcache_fsm = DCACHE_TLB_CC_INVAL;
     4382                r_dcache_fsm_save = r_dcache_fsm;
     4383                break;
    43874384            }
    43884385            m_cpt_dcache_dir_write++;
     
    45964593                r_dcache_cleanup_line = victim_index;
    45974594                m_cpt_cc_cleanup_data++;
    4598                 if ( r_dcache_in_itlb[m_dcache_sets*way+set] || r_dcache_in_dtlb[m_dcache_sets*way+set] )
    4599                 {
    4600                     r_dcache_fsm = DCACHE_TLB_CC_INVAL;
    4601                     r_dcache_fsm_save = r_dcache_fsm;
    4602                     break;
    4603                 }
     4595                r_dcache_fsm = DCACHE_TLB_CC_INVAL;
     4596                r_dcache_fsm_save = r_dcache_fsm;
     4597                break;
    46044598            }
    46054599
     
    47434737           ( (r_dcache_paddr_save.read() & ~((m_dcache_words<<2)-1)) == (r_tgt_addr.read() & ~((m_dcache_words<<2)-1))))
    47444738        || (( ( r_dcache_fsm_save == DCACHE_TLB1_READ )      || ( r_dcache_fsm_save == DCACHE_TLB2_READ )      ||
    4745              ( r_dcache_fsm_save == DCACHE_TLB1_READ_UPDT ) || ( r_dcache_fsm_save == DCACHE_TLB2_READ_UPDT ) ||
    4746              ( r_dcache_fsm_save == DCACHE_TLB1_UPDT )      || ( r_dcache_fsm_save == DCACHE_TLB2_UPDT )         /* ||
     4739             ( r_dcache_fsm_save == DCACHE_TLB1_READ_UPDT ) || ( r_dcache_fsm_save == DCACHE_TLB2_READ_UPDT) /* ||
    47474740             ( r_dcache_fsm_save == DCACHE_TLB1_LL_WAIT )   || ( r_dcache_fsm_save == DCACHE_TLB2_LL_WAIT )   ||
    47484741             ( r_dcache_fsm_save == DCACHE_TLB1_SC_WAIT )   || ( r_dcache_fsm_save == DCACHE_TLB2_SC_WAIT )   ||
     
    47814774            if ( dcache_hit )
    47824775            {
     4776                if (((r_dcache_tlb_paddr.read() & ~((m_dcache_words<<2)-1)) ==
     4777                     (r_tgt_addr.read() & ~((m_dcache_words<<2)-1))) &&
     4778                    (r_dcache_fsm_save == DCACHE_TLB1_UPDT ||
     4779                     r_dcache_fsm_save == DCACHE_TLB2_UPDT))
     4780                        r_dcache_inval_rsp = true;
    47834781                if ( r_dcache_in_dtlb[m_dcache_sets*way+set] || r_dcache_in_itlb[m_dcache_sets*way+set] )
    47844782                {
Note: See TracChangeset for help on using the changeset viewer.