Ignore:
Timestamp:
Apr 17, 2014, 11:12:35 AM (10 years ago)
Author:
haoliu
Message:

MESI Bug fixed

File:
1 edited

Legend:

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

    r677 r680  
    388388      r_vci_rsp_fifo_dcache("r_vci_rsp_fifo_dcache", 16),       // 2 words depth
    389389//      r_vci_rsp_fifo_rpktid("r_vci_rsp_fifo_rpktid", 2),    // 2 words depth
    390       r_cc_send_data_fifo("r_cc_send_data_fifo", 16),
     390      r_cc_send_data_fifo("r_cc_send_data_fifo", 2),
    391391
    392392      r_cc_send_fsm("r_cc_send_fsm"),
     
    22982298        {
    22992299
    2300 #if 1
    2301             // @@@ DO NOT COMMIT: ALMOS KILLING SIMU PURPOSE
    2302             if (m_dreq.addr == 0x0 && m_dreq.wdata == 0xDEADDEAD) {
    2303                 std::cout << "*** Ecriture à l'adresse 0 pour fin de simulation ***" << std::endl;
    2304                 raise(SIGINT);
    2305             }
    2306 #endif
     2300//#if 1
     2301//            // @@@ DO NOT COMMIT: ALMOS KILLING SIMU PURPOSE
     2302//            if (m_dreq.addr == 0x0 && m_dreq.wdata == 0xDEADDEAD) {
     2303//                std::cout << "*** Ecriture à l'adresse 0 pour fin de simulation ***" << std::endl;
     2304//                raise(SIGINT);
     2305//            }
     2306//#endif
    23072307
    23082308            if ( r_mmu_mode.read() & DATA_TLB_MASK )  // DTLB activated
     
    52795279          ((r_dcache_vci_paddr.read() & mask) == (paddr & mask)))
    52805280        {
    5281 
    5282             if(r_dcache_read_for_modify.read() and(r_dcache_miss_type.read() == PROC_MISS) and (r_cc_receive_dcache_type.read() != CC_TYPE_UPDT) and (state == CACHE_SLOT_STATE_SHARED))
     5281           
     5282            if(r_dcache_read_for_modify.read() and(r_dcache_miss_type.read() == PROC_MISS) and
     5283              (r_cc_receive_dcache_type.read() != CC_TYPE_UPDT) and (state == CACHE_SLOT_STATE_SHARED))
    52835284            {
    52845285                r_dcache_miss_clack = true;
    52855286                r_dcache_fsm        = DCACHE_CC_INVAL;
    52865287            }
     5288            else if(r_dcache_read_for_modify.read() and (r_dcache_miss_type.read() == PROC_MISS) and
     5289                   (r_cc_receive_dcache_type.read() == CC_TYPE_BRDCAST) and (state == CACHE_SLOT_STATE_INVALID) and
     5290                   (r_cc_receive_dcache_srcid.read() == m_srcid))
     5291            {
     5292                r_cc_receive_dcache_req = false;
     5293                r_dcache_fsm            = r_dcache_fsm_cc_save.read();
     5294            }   
    52875295            else if(r_cc_receive_dcache_type.read() == CC_TYPE_UPDT)
    52885296            {
     
    53445352    std::cout << "  <PROC " << name()
    53455353              << " DCACHE_CC_CHECK> Coherence request matching a pending miss:"
     5354              << " state =" << state
     5355              << " r_receive_srcid = " << std::hex << r_cc_receive_dcache_srcid.read()
     5356              << " m_proc_id = " << std::hex << m_proc_id
    53465357              << " PADDR = " << std::hex << paddr << std::endl;
    53475358}
     
    53815392                r_dcache_cc_send_multi_ack_miss = false;
    53825393            }
    5383             else if ( r_cc_receive_dcache_type.read() == CC_TYPE_INVAL ) // hit inval
     5394            else if ( r_cc_receive_dcache_type.read() != CC_TYPE_UPDT ) // hit inval
    53845395            {
    53855396                r_dcache_fsm           = DCACHE_CC_INVAL;
     
    63196330                r_cc_receive_dcache_nline  = DspinDhccpParam::dspin_get(receive_data,
    63206331                                             DspinDhccpParam::BROADCAST_NLINE);
    6321                 r_cc_receive_dcache_type = CC_TYPE_INVAL;
     6332                r_cc_receive_dcache_type = CC_TYPE_BRDCAST;
    63226333                // request icache to handle the BROADCAST
    63236334                r_cc_receive_icache_req = true;
Note: See TracChangeset for help on using the changeset viewer.