build/X86_MESI_Two_Level/mem/protocol/Directory_Controller.cc
/** \brief Invalidate a cache block */
\brief Invalidate a cache block
\ brief Invalidate a cache block
void
Directory_Controller::inv_sendCacheInvalidate(Directory_TBE*& m_tbe_ptr, Addr addr)
{
    DPRINTF(RubyGenerated, "executing inv_sendCacheInvalidate\n");
    {
    const RequestMsg* in_msg_ptr M5_VAR_USED;
    in_msg_ptr = dynamic_cast<const RequestMsg *>(((*m_requestToDir_ptr)).peek());
    if (in_msg_ptr == NULL) {
        throw RejectException();
    }
{
    std::shared_ptr<ResponseMsg> out_msg = std::make_shared<ResponseMsg>(clockEdge());
    (*out_msg).m_addr = addr;
    (*out_msg).m_Type = CoherenceResponseType_INV;
    (*out_msg).m_Sender = m_machineID;
    (((*out_msg).m_Destination).add((*(getDirectoryEntry(addr))).m_Owner));
    (*out_msg).m_MessageSize = MessageSizeType_Response_Control;
    ((*m_responseFromDir_ptr)).enqueue(out_msg, clockEdge(), cyclesToTicks(Cycles(m_directory_latency)));
}
}
}
void Directory_Controller :: inv_sendCacheInvalidate ( Directory_TBE * & m_tbe_ptr , Addr addr ) { DPRINTF ( RubyGenerated , " \n " ) ; { const RequestMsg * in_msg_ptr M5_VAR_USED ; in_msg_ptr = dynamic_cast < const RequestMsg * > ( ( ( * m_requestToDir_ptr ) ) . peek ( ) ) ; if ( in_msg_ptr == NULL ) { throw RejectException ( ) ; } { std :: shared_ptr < ResponseMsg > out_msg = std :: make_shared < ResponseMsg > ( clockEdge ( ) ) ; ( * out_msg ) . m_addr = addr ; ( * out_msg ) . m_Type = CoherenceResponseType_INV ; ( * out_msg ) . m_Sender = m_machineID ; ( ( ( * out_msg ) . m_Destination ) . add ( ( * ( getDirectoryEntry ( addr ) ) ) . m_Owner ) ) ; ( * out_msg ) . m_MessageSize = MessageSizeType_Response_Control ; ( ( * m_responseFromDir_ptr ) ) . enqueue ( out_msg , clockEdge ( ) , cyclesToTicks ( Cycles ( m_directory_latency ) ) ) ; } } }
\brief Invalidate a cache block
\ brief Invalidate a cache block
// 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.