From 5755fff99811a334874026c465ccebb9b0627230 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Sun, 23 Feb 2014 19:16:16 -0600 Subject: ruby: Simplify RubyPort flow control and routing This patch simplfies the retry logic in the RubyPort, avoiding redundant attributes, and enforcing more stringent checks on the interactions with the normal ports. The patch also simplifies the routing done by the RubyPort, using the port identifiers instead of a heavy-weight sender state. The patch also fixes a bug in the sending of responses from PIO ports. Previously these responses bypassed the queue in the queued port, and ignored the return value, potentially leading to response packets being lost. Committed by: Nilay Vaish --- src/mem/ruby/system/Sequencer.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/mem/ruby/system/Sequencer.cc') diff --git a/src/mem/ruby/system/Sequencer.cc b/src/mem/ruby/system/Sequencer.cc index be554d5cf..8d9640a04 100644 --- a/src/mem/ruby/system/Sequencer.cc +++ b/src/mem/ruby/system/Sequencer.cc @@ -553,15 +553,10 @@ Sequencer::hitCallback(SequencerRequest* srequest, DataBlock& data, // If using the RubyTester, update the RubyTester sender state's // subBlock with the recieved data. The tester will later access // this state. - // Note: RubyPort will access it's sender state before the - // RubyTester. if (m_usingRubyTester) { - RubyPort::SenderState *reqSenderState = - safe_cast(pkt->senderState); - // @todo This is a dangerous assumption on nothing else - // modifying the senderState RubyTester::SenderState* testerSenderState = - safe_cast(reqSenderState->predecessor); + pkt->findNextSenderState(); + assert(testerSenderState); testerSenderState->subBlock.mergeFrom(data); } -- cgit v1.2.3