Skip to content

Ruby recycle and stall_and_wait message delivery errors #800

Closed Answered by powerjg
JenniferBrana asked this question in Q&A
Discussion options

You must be logged in to vote

The code in question

void
AbstractController::stallBuffer(MessageBuffer* buf, Addr addr)
{
    if (m_waiting_buffers.count(addr) == 0) {
        MsgVecType* msgVec = new MsgVecType;
        msgVec->resize(m_in_ports, NULL);
        m_waiting_buffers[addr] = msgVec;
    }
    DPRINTF(RubyQueue, "stalling %s port %d addr %#x\n", buf, m_cur_in_port,
            addr);
    assert(m_in_ports > m_cur_in_port);
    (*(m_waiting_buffers[addr]))[m_cur_in_port] = buf;
}

I have to say, this code is incredibly confusing! Here's the best understanding I have.

m_waiting_buffers is a std::map<Addr, std::vector<MessageBuffer*>* > So, it's "just" a map from addresses to a set of buffer pointers we need to…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@mattsinc
Comment options

@JenniferBrana
Comment options

@powerjg
Comment options

Answer selected by ivanaamit
@JenniferBrana
Comment options

@BobbyRBruce
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
4 participants
Converted from issue

This discussion was converted from issue #799 on January 23, 2024 17:22.