diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2013-02-19 05:56:05 -0500 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2013-02-19 05:56:05 -0500 |
commit | 0622f30961fc32b967bb1ef784afc5a205b16f6e (patch) | |
tree | b6b57cf049b7fc7e49cc65a735af7508862b9c24 /src/mem/ruby/system/Sequencer.cc | |
parent | f69d431ede9b815ea4b63a2d20237ed3e79df169 (diff) | |
download | gem5-0622f30961fc32b967bb1ef784afc5a205b16f6e.tar.xz |
mem: Add predecessor to SenderState base class
This patch adds a predecessor field to the SenderState base class to
make the process of linking them up more uniform, and enable a
traversal of the stack without knowing the specific type of the
subclasses.
There are a number of simplifications done as part of changing the
SenderState, particularly in the RubyTest.
Diffstat (limited to 'src/mem/ruby/system/Sequencer.cc')
-rw-r--r-- | src/mem/ruby/system/Sequencer.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mem/ruby/system/Sequencer.cc b/src/mem/ruby/system/Sequencer.cc index 1cdd6d806..f00f8407a 100644 --- a/src/mem/ruby/system/Sequencer.cc +++ b/src/mem/ruby/system/Sequencer.cc @@ -530,11 +530,13 @@ Sequencer::hitCallback(SequencerRequest* srequest, // Note: RubyPort will access it's sender state before the // RubyTester. if (m_usingRubyTester) { - RubyPort::SenderState *requestSenderState = + 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*>(requestSenderState->saved); - testerSenderState->subBlock->mergeFrom(data); + safe_cast<RubyTester::SenderState*>(reqSenderState->predecessor); + testerSenderState->subBlock.mergeFrom(data); } delete srequest; |