build/X86_MESI_Two_Level/mem/protocol/L1Cache_Controller.cc
/** \brief Inform the prefetcher about the miss */
\brief Inform the prefetcher about the miss
\ brief Inform the prefetcher about the miss
void
L1Cache_Controller::po_observeMiss(L1Cache_TBE*& m_tbe_ptr, L1Cache_Entry*& m_cache_entry_ptr, Addr addr, int core_id)
{
    DPRINTF(RubyGenerated, "executing po_observeMiss\n");
    try {
       {
    const RubyRequest* in_msg_ptr M5_VAR_USED;
    in_msg_ptr = dynamic_cast<const RubyRequest *>(((*m_mandatoryQueue_ptr)).peek());
    if (in_msg_ptr == NULL) {
        throw RejectException();
    }
    if (m_enable_prefetch) {
        (((*m_prefetcher_ptr)).observeMiss(((*in_msg_ptr)).m_LineAddress, ((*in_msg_ptr)).m_Type));
    } else {
        DPRINTF(RubyPrefetcher, "MESI_Two_Level-L1cache.sm:1000: prefetcher disabled, address:%s", ((*in_msg_ptr)).m_LineAddress);
    }
    }
    } catch (const RejectException & e) {
       fatal("Error in action L1Cache:po_observeMiss: "
             "executed a peek statement with the wrong message "
             "type specified. ");
    }
}
void L1Cache_Controller :: po_observeMiss ( L1Cache_TBE * & m_tbe_ptr , L1Cache_Entry * & m_cache_entry_ptr , Addr addr , int core_id ) { DPRINTF ( RubyGenerated , " \n " ) ; try { { const RubyRequest * in_msg_ptr M5_VAR_USED ; in_msg_ptr = dynamic_cast < const RubyRequest * > ( ( ( * m_mandatoryQueue_ptr ) ) . peek ( ) ) ; if ( in_msg_ptr == NULL ) { throw RejectException ( ) ; } if ( m_enable_prefetch ) { ( ( ( * m_prefetcher_ptr ) ) . observeMiss ( ( ( * in_msg_ptr ) ) . m_LineAddress , ( ( * in_msg_ptr ) ) . m_Type ) ) ; } else { DPRINTF ( RubyPrefetcher , " " , ( ( * in_msg_ptr ) ) . m_LineAddress ) ; } } } catch ( const RejectException & e ) { fatal ( " " " " " " ) ; } }
\brief Inform the prefetcher about the miss
\ brief Inform the prefetcher about the miss
//fanyao added core_id // Declare message // If the cast fails, this is the wrong inport (wrong message type). // Throw an exception, and the caller will decide to either try a // different inport or punt.