From 0622f30961fc32b967bb1ef784afc5a205b16f6e Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Tue, 19 Feb 2013 05:56:05 -0500 Subject: 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. --- src/mem/bridge.hh | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/mem/bridge.hh') diff --git a/src/mem/bridge.hh b/src/mem/bridge.hh index 6855d2722..2e594a30a 100644 --- a/src/mem/bridge.hh +++ b/src/mem/bridge.hh @@ -84,20 +84,11 @@ class Bridge : public MemObject public: - Packet::SenderState *origSenderState; PortID origSrc; - RequestState(PacketPtr _pkt) - : origSenderState(_pkt->senderState), - origSrc(_pkt->getSrc()) + RequestState(PortID orig_src) : origSrc(orig_src) { } - void fixResponse(PacketPtr pkt) - { - assert(pkt->senderState == this); - pkt->setDest(origSrc); - pkt->senderState = origSenderState; - } }; /** -- cgit v1.2.3