summaryrefslogtreecommitdiff
path: root/src/mem/ruby/system/Sequencer.cc
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2014-02-23 19:16:16 -0600
committerAndreas Hansson <andreas.hansson@arm.com>2014-02-23 19:16:16 -0600
commit5755fff99811a334874026c465ccebb9b0627230 (patch)
tree78e1978de08c9c69eba65efe4ffca35b39210f87 /src/mem/ruby/system/Sequencer.cc
parent6aafd5cb3fdaf43aeaf71ea47046dfc909eeeb62 (diff)
downloadgem5-5755fff99811a334874026c465ccebb9b0627230.tar.xz
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 <nilay@cs.wisc.edu>
Diffstat (limited to 'src/mem/ruby/system/Sequencer.cc')
-rw-r--r--src/mem/ruby/system/Sequencer.cc9
1 files changed, 2 insertions, 7 deletions
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<RubyPort::SenderState*>(pkt->senderState);
- // @todo This is a dangerous assumption on nothing else
- // modifying the senderState
RubyTester::SenderState* testerSenderState =
- safe_cast<RubyTester::SenderState*>(reqSenderState->predecessor);
+ pkt->findNextSenderState<RubyTester::SenderState>();
+ assert(testerSenderState);
testerSenderState->subBlock.mergeFrom(data);
}