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/addr_mapper.hh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/mem/addr_mapper.hh') diff --git a/src/mem/addr_mapper.hh b/src/mem/addr_mapper.hh index 887635999..6604096bd 100644 --- a/src/mem/addr_mapper.hh +++ b/src/mem/addr_mapper.hh @@ -87,23 +87,16 @@ class AddrMapper : public MemObject public: /** - * Construct a new sender state and remember the original one - * so that we can implement a stack. + * Construct a new sender state to remember the original address. * - * @param _origSenderState Sender state to remember * @param _origAddr Address before remapping */ - AddrMapperSenderState(SenderState* _origSenderState, - Addr _origAddr) - : origSenderState(_origSenderState), origAddr(_origAddr) + AddrMapperSenderState(Addr _origAddr) : origAddr(_origAddr) { } /** Destructor */ ~AddrMapperSenderState() { } - /** Pointer to old sender state of packet */ - SenderState* origSenderState; - /** The original address the packet was destined for */ Addr origAddr; -- cgit v1.2.3