From 5aa43e130acec02bc616008a8758cf5096025c19 Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Fri, 22 Mar 2013 15:53:23 -0500 Subject: ruby: convert Topology to regular class The Topology class in Ruby does not need to inherit from SimObject class. This patch turns it into a regular class. The topology object is now created in the constructor of the Network class. All the parameters for the topology class have been moved to the network class. --- src/mem/ruby/network/Network.hh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mem/ruby/network/Network.hh') diff --git a/src/mem/ruby/network/Network.hh b/src/mem/ruby/network/Network.hh index 9784af759..b0cca6806 100644 --- a/src/mem/ruby/network/Network.hh +++ b/src/mem/ruby/network/Network.hh @@ -44,17 +44,17 @@ #include #include -#include "mem/packet.hh" #include "mem/protocol/LinkDirection.hh" #include "mem/protocol/MessageSizeType.hh" #include "mem/ruby/common/TypeDefines.hh" +#include "mem/ruby/network/Topology.hh" +#include "mem/packet.hh" #include "params/RubyNetwork.hh" #include "sim/clocked_object.hh" class NetDest; class MessageBuffer; class Throttle; -class Topology; class Network : public ClockedObject { @@ -62,6 +62,8 @@ class Network : public ClockedObject typedef RubyNetworkParams Params; Network(const Params *p); virtual ~Network() {} + const Params * params() const + { return dynamic_cast(_params);} virtual void init(); -- cgit v1.2.3