summaryrefslogtreecommitdiff
path: root/src/mem/ruby/network/Network.hh
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2013-03-22 15:53:23 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2013-03-22 15:53:23 -0500
commit5aa43e130acec02bc616008a8758cf5096025c19 (patch)
treef1277ef0002aadfb911f126ec0537afa572f3789 /src/mem/ruby/network/Network.hh
parent2d501276429ab674c146a86802e62538892fc500 (diff)
downloadgem5-5aa43e130acec02bc616008a8758cf5096025c19.tar.xz
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.
Diffstat (limited to 'src/mem/ruby/network/Network.hh')
-rw-r--r--src/mem/ruby/network/Network.hh6
1 files changed, 4 insertions, 2 deletions
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 <string>
#include <vector>
-#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<const Params *>(_params);}
virtual void init();