Ignore:
Timestamp:
Apr 9, 2014, 9:47:15 PM (11 years ago)
Author:
haoliu
Message:

MESI Bug fixed.
To be continue.....

File:
1 edited

Legend:

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

    r672 r674  
    12951295                    r_icache_fsm      = ICACHE_MISS_SELECT;
    12961296#if DEBUG_ICACHE
    1297 if ( m_debug_activated )
     1297if ( m_debug_activated or m_ireq.addr == 0x11020 )
    12981298std::cout << "  <PROC " << name() << " ICACHE_IDLE> READ MISS in icache"
    12991299          << " : PADDR = " << std::hex << paddr << std::endl;
     
    21002100
    21012101        // coherence request completed
    2102         r_icache_cc_send_req   = true;
    2103         r_icache_cc_send_nline = r_cc_receive_icache_nline.read();
    2104         r_icache_cc_send_way   = r_icache_cc_way.read();
    2105         r_icache_cc_send_type  = CC_TYPE_CLEANUP;
    2106 
    2107         r_icache_fsm           = r_icache_fsm_save.read();
     2102        r_icache_cc_send_req    = true;
     2103        r_icache_cc_send_nline  = r_cc_receive_icache_nline.read();
     2104        r_icache_cc_send_way    = r_icache_cc_way.read();
     2105        r_icache_cc_send_type   = CC_TYPE_CLEANUP;
     2106
     2107        r_icache_fsm            = r_icache_fsm_save.read();
     2108        r_cc_receive_icache_req = false;
    21082109
    21092110#if DEBUG_ICACHE
     
    28212822                                    m_drsp.rdata   = cache_rdata;
    28222823#if DEBUG_DCACHE
    2823 if ( m_debug_activated )
     2824if ( m_debug_activated or m_drsp.rdata == 0x11020)
    28242825std::cout << "  <PROC " << name() << " DCACHE_IDLE>"
    28252826          << " READ HIT in dcache"
     
    29672968                    }
    29682969#if DEBUG_DCACHE
    2969 if ( m_debug_activated )
     2970if ( m_debug_activated or m_dreq.wdata == 0x11020)
    29702971std::cout << "  <PROC " << name() << " DCACHE_IDLE>"
    29712972      << " WRITE REQ "
     
    56205621    }
    56215622    } // end switch r_dcache_fsm
    5622 if(r_dcache_miss_updt.read())
    5623 std::cout << "  <PROC " << name()
    5624           << " miss updt " << r_dcache_miss_updt.read() << std::endl;
     5623
     5624//if(r_dcache_miss_updt.read())
     5625//std::cout << "  <PROC " << name()
     5626//          << " miss updt " << r_dcache_miss_updt.read() << std::endl;
    56255627
    56265628//std::cout << "  <PROC " << name()
     
    62656267                r_cc_receive_dcache_srcid = DspinDhccpParam::dspin_get(receive_data,
    62666268                                            DspinDhccpParam::BROADCAST_SRCID);
    6267             }
    6268             r_cc_receive_fsm = CC_RECEIVE_BRDCAST_NLINE;
     6269                r_cc_receive_fsm          = CC_RECEIVE_BRDCAST_NLINE;
     6270            }
    62696271            break;
    62706272        }
     
    62786280            // not to actually post a request to an available cache => need a
    62796281            // flip_flop to check that ?
    6280             if (not (r_cc_receive_icache_req.read()) and
    6281                 not (r_cc_receive_dcache_req.read()) and
    6282                 (p_dspin_m2p.write.read()))
     6282            if (r_cc_receive_icache_req.read() or r_cc_receive_dcache_req.read())
     6283            {   
     6284                std::cout << "illege flags for handling brdcast request" << std::endl;
     6285                exit(0);
     6286            }
     6287            if(p_dspin_m2p.write.read())
    62836288            {
    62846289                // request dcache to handle the BROADCAST
     
    62966301                break;
    62976302            }
     6303
    62986304            // keep waiting for the caches to accept the request
    62996305            break;
     
    68466852        case CC_RECEIVE_BRDCAST_HEADER:
    68476853        {
    6848             p_dspin_m2p.read = true;
    6849             break;
    6850         }
    6851         //////////////////////////////
    6852         case CC_RECEIVE_BRDCAST_NLINE:
    6853         {
    6854             // TODO maybe we need to wait for both only to leave the state, but
    6855             // not to actually post a request to an available cache => need a
    6856             // flip_flop to check that ?
    68576854            if (not (r_cc_receive_icache_req.read()) and not (r_cc_receive_dcache_req.read()))
    68586855                p_dspin_m2p.read = true;
     
    68606857                p_dspin_m2p.read = false;
    68616858            break;
     6859        }
     6860        //////////////////////////////
     6861        case CC_RECEIVE_BRDCAST_NLINE:
     6862        {
     6863            // TODO maybe we need to wait for both only to leave the state, but
     6864            // not to actually post a request to an available cache => need a
     6865            // flip_flop to check that ?
     6866            p_dspin_m2p.read = true;
     6867            break;
     6868
    68626869        }
    68636870        /////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.