src/mem/ruby/structures/Prefetcher.cc
//added by hongyu: disable original stride and stream prefetcher.
added by hongyu: disable original stride and stream prefetcher.
added by hongyu : disable original stride and stream prefetcher .
void
Prefetcher::observeMiss(Addr address, const RubyRequestType& type)
{
    DPRINTF(RubyPrefetcher, "Observed miss for %#x\n", address);
    Addr line_addr = makeLineAddress(address);
    numMissObserved++;
    return;
   return;
    uint32_t index = 0;
    PrefetchEntry *pfEntry = getPrefetchEntry(line_addr, index);
    if (pfEntry != NULL) {
        if (pfEntry->requestIssued[index]) {
            if (pfEntry->requestCompleted[index]) {
                numMissedPrefetchedBlocks++;
                return;
            } else {
                numPartialHits++;
                observePfHit(line_addr);
                return;
            }
        } else {
            return;
        }
    }
    bool alloc = false;
    bool hit = accessUnitFilter(m_unit_filter, m_unit_filter_hit,
                                m_unit_filter_index, line_addr, 1, alloc);
    if (alloc) {
        initializeStream(line_addr, 1, getLRUindex(), type);
    }
    if (hit) {
        DPRINTF(RubyPrefetcher, "  *** hit in unit stride buffer\n");
        return;
    }
    hit = accessUnitFilter(m_negative_filter, m_negative_filter_hit,
        m_negative_filter_index, line_addr, -1, alloc);
    if (alloc) {
        initializeStream(line_addr, -1, getLRUindex(), type);
    }
    if (hit) {
        DPRINTF(RubyPrefetcher, "  *** hit in unit negative unit buffer\n");
        return;
    }
    int stride = 0;  
    hit = accessNonunitFilter(address, &stride, alloc);
    if (alloc) {
        assert(stride != 0);  
        initializeStream(line_addr, stride, getLRUindex(), type);
    }
    if (hit) {
        DPRINTF(RubyPrefetcher, "  *** hit in non-unit stride buffer\n");
        return;
    }
}
void Prefetcher :: observeMiss ( Addr address , const RubyRequestType & type ) { DPRINTF ( RubyPrefetcher , " \n " , address ) ; Addr line_addr = makeLineAddress ( address ) ; numMissObserved ++ ; return ; return ; uint32_t index = 0 ; PrefetchEntry * pfEntry = getPrefetchEntry ( line_addr , index ) ; if ( pfEntry != NULL ) { if ( pfEntry -> requestIssued [ index ] ) { if ( pfEntry -> requestCompleted [ index ] ) { numMissedPrefetchedBlocks ++ ; return ; } else { numPartialHits ++ ; observePfHit ( line_addr ) ; return ; } } else { return ; } } bool alloc = false ; bool hit = accessUnitFilter ( m_unit_filter , m_unit_filter_hit , m_unit_filter_index , line_addr , 1 , alloc ) ; if ( alloc ) { initializeStream ( line_addr , 1 , getLRUindex ( ) , type ) ; } if ( hit ) { DPRINTF ( RubyPrefetcher , " \n " ) ; return ; } hit = accessUnitFilter ( m_negative_filter , m_negative_filter_hit , m_negative_filter_index , line_addr , -1 , alloc ) ; if ( alloc ) { initializeStream ( line_addr , -1 , getLRUindex ( ) , type ) ; } if ( hit ) { DPRINTF ( RubyPrefetcher , " \n " ) ; return ; } int stride = 0 ; hit = accessNonunitFilter ( address , & stride , alloc ) ; if ( alloc ) { assert ( stride != 0 ) ; initializeStream ( line_addr , stride , getLRUindex ( ) , type ) ; } if ( hit ) { DPRINTF ( RubyPrefetcher , " \n " ) ; return ; } }
added by hongyu: disable original stride and stream prefetcher.
added by hongyu : disable original stride and stream prefetcher .
//if (curTick()>=5125471687500 && curTick()<=5127034428000){ //} //obfuscate single parallel //if (address==0x10c0000 && curTick()>5126174431000){ //Addr new_addr=makeLineAddress(0x7fe80000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //} //if (address==0x7fe40000 && curTick()>5126174431000){ // Addr new_addr=makeLineAddress(0x7fc00000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); // } //if (address==0x7fe80000 && curTick()>5126174431000){ //Addr new_addr=makeLineAddress(0x31c0000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); // } // if (address==0x7fec0000 && curTick()>5126174431000){ //Addr new_addr=makeLineAddress(0x3180000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); // } //if (address==0x3100000 && curTick()>5126174431000){ //Addr new_addr=makeLineAddress(0x3140000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //new_addr=makeLineAddress(0x7fc40000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //} //if (address==0x7fc40000 && curTick()>5126174431000){ //Addr new_addr=makeLineAddress(0x3140000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //} //if (address==0x7fc80000 && curTick()>5126174431000){ //Addr new_addr=makeLineAddress(0x3180000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //} //if (address==0x7fcc0000 && curTick()>5126174431000){ // Addr new_addr=makeLineAddress(0x1080000); // m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //} //if (address==0x7fd00000 && curTick()>5126174431000){ //Addr new_addr=makeLineAddress(0x7ff40000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //} //even group //if (address==0x10c1000 && curTick()>5126174431000){ //Addr new_addr=makeLineAddress(0x7fe81000); // m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //} //if (address==0x7fe01000 && curTick()>5126174431000){ //Addr new_addr=makeLineAddress(0x3141000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //} //if (address==0x7fe41000 && curTick()>5126174431000){ //Addr new_addr=makeLineAddress(0x3101000); // m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //} //if (address==0x7fe81000 && curTick()>5126174431000){ //Addr new_addr=makeLineAddress(0x7fec1000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); // } //if (address==0x3181000 && curTick()>5126174431000){ //Addr new_addr=makeLineAddress(0x7ff41000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //} //obfuscate multi parallel odd 1 to 0 //if (address==0x3140000 && curTick()>5125919929500){ //Addr new_addr=makeLineAddress(0x7fc00000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //} //if (address==0x3180000 && curTick()>5125919929500){ //Addr new_addr=makeLineAddress(0x7fc40000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //} //if (address==0x31c0000 && curTick()>5125919929500){ //Addr new_addr=makeLineAddress(0x7fc80000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //} //if (address==0x7fc40000 && curTick()>5125919929500){ //Addr new_addr=makeLineAddress(0x7fd00000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //} //if (address==0x7fcc0000 && curTick()>5125919929500){ //Addr new_addr=makeLineAddress(0x7ff40000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //} //even 1 to 0 //if (address==0x3141000 && curTick()>5125919929500){ //Addr new_addr=makeLineAddress(0x7fc01000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //} //if (address==0x3181000 && curTick()>5125919929500){ //Addr new_addr=makeLineAddress(0x7fc41000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //} //if (address==0x31c1000 && curTick()>5125919929500){ //Addr new_addr=makeLineAddress(0x7fc81000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //} //if (address==0x7fc41000 && curTick()>5125919929500){ //Addr new_addr=makeLineAddress(0x7fd01000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //} //if (address==0x7fcc1000 && curTick()>5125919929500){ //Addr new_addr=makeLineAddress(0x7ff41000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //} // odd 0 to 1 //if (address==0x10c1000 && curTick()>5124820800500){ //Addr new_addr=makeLineAddress(0x10c0000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //} //if (address==0x7fe01000 && curTick()>5125918495000){ //Addr new_addr=makeLineAddress(0x7fe00000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //} //if (address==0x7fe41000 && curTick()>5124820800500){ //Addr new_addr=makeLineAddress(0x7fe40000); //m_controller->enqueuePrefetch(new_addr, RubyRequestType_IFETCH); //} // check to see if we have already issued a prefetch for this block // We prefetched too early and now the prefetch block no // longer exists in the cache // The controller has issued the prefetch request, // but the request for the block arrived earlier. // The request is still in the prefetch queue of the controller. // Or was evicted because of other requests. // check to see if this address is in the unit stride filter // allocate a new prefetch stream // allocate a new prefetch stream // check to see if this address is in the non-unit stride filter // NULL value // ensure non-zero stride prefetches