build/X86_MESI_Two_Level/mem/protocol/Directory_Controller.cc
// Actions
/** \brief Send ack to L2 */
Actions
\brief Send ack to L2
Actions \ brief Send ack to L2
void
Directory_Controller::a_sendAck(Directory_TBE*& m_tbe_ptr, Addr addr)
{
    DPRINTF(RubyGenerated, "executing a_sendAck\n");
    {
    const ResponseMsg* in_msg_ptr M5_VAR_USED;
    in_msg_ptr = dynamic_cast<const ResponseMsg *>(((*m_responseToDir_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_MEMORY_ACK;
    (*out_msg).m_Sender = m_machineID;
    (((*out_msg).m_Destination).add(((*in_msg_ptr)).m_Sender));
    (*out_msg).m_MessageSize = MessageSizeType_Response_Control;
    ((*m_responseFromDir_ptr)).enqueue(out_msg, clockEdge(), cyclesToTicks(Cycles(m_to_mem_ctrl_latency)));
}
}
}
void Directory_Controller :: a_sendAck ( Directory_TBE * & m_tbe_ptr , Addr addr ) { DPRINTF ( RubyGenerated , " \n " ) ; { const ResponseMsg * in_msg_ptr M5_VAR_USED ; in_msg_ptr = dynamic_cast < const ResponseMsg * > ( ( ( * m_responseToDir_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_MEMORY_ACK ; ( * out_msg ) . m_Sender = m_machineID ; ( ( ( * out_msg ) . m_Destination ) . add ( ( ( * in_msg_ptr ) ) . m_Sender ) ) ; ( * out_msg ) . m_MessageSize = MessageSizeType_Response_Control ; ( ( * m_responseFromDir_ptr ) ) . enqueue ( out_msg , clockEdge ( ) , cyclesToTicks ( Cycles ( m_to_mem_ctrl_latency ) ) ) ; } } }
Actions
\brief Send ack to L2
Actions \ brief Send ack to L2
// 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.