summaryrefslogtreecommitdiff
path: root/src/mem/ruby/network
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2012-10-02 14:35:45 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2012-10-02 14:35:45 -0500
commit88ba1c452b25de7f11dcb4a14bbeb8f540809918 (patch)
tree03dab82a1b7e2d7de285ec1b19c0980a9310dd8f /src/mem/ruby/network
parent4488379244cdf3c211e76dbf3b4278347f639039 (diff)
downloadgem5-88ba1c452b25de7f11dcb4a14bbeb8f540809918.tar.xz
ruby: makes some members non-static
This patch makes some of the members (profiler, network, memory vector) of ruby system non-static.
Diffstat (limited to 'src/mem/ruby/network')
-rw-r--r--src/mem/ruby/network/Network.cc6
-rw-r--r--src/mem/ruby/network/Network.hh10
-rw-r--r--src/mem/ruby/network/simple/Throttle.cc3
3 files changed, 11 insertions, 8 deletions
diff --git a/src/mem/ruby/network/Network.cc b/src/mem/ruby/network/Network.cc
index 2aa120cdf..5c025db2a 100644
--- a/src/mem/ruby/network/Network.cc
+++ b/src/mem/ruby/network/Network.cc
@@ -32,6 +32,10 @@
#include "mem/ruby/network/Topology.hh"
#include "mem/ruby/system/System.hh"
+uint32_t Network::m_virtual_networks;
+uint32_t Network::m_control_msg_size;
+uint32_t Network::m_data_msg_size;
+
Network::Network(const Params *p)
: SimObject(p)
{
@@ -58,7 +62,7 @@ Network::init()
m_data_msg_size = RubySystem::getBlockSizeBytes() + m_control_msg_size;
}
-int
+uint32_t
Network::MessageSizeType_to_int(MessageSizeType size_type)
{
switch(size_type) {
diff --git a/src/mem/ruby/network/Network.hh b/src/mem/ruby/network/Network.hh
index 8640ba9b1..e9c5a98b7 100644
--- a/src/mem/ruby/network/Network.hh
+++ b/src/mem/ruby/network/Network.hh
@@ -64,8 +64,8 @@ class Network : public SimObject
virtual void init();
- int getNumberOfVirtualNetworks() { return m_virtual_networks; }
- int MessageSizeType_to_int(MessageSizeType size_type);
+ static int getNumberOfVirtualNetworks() { return m_virtual_networks; }
+ static uint32_t MessageSizeType_to_int(MessageSizeType size_type);
// returns the queue requested for the given component
virtual MessageBuffer* getToNetQueue(NodeID id, bool ordered,
@@ -102,10 +102,10 @@ class Network : public SimObject
protected:
const std::string m_name;
int m_nodes;
- int m_virtual_networks;
+ static uint32_t m_virtual_networks;
Topology* m_topology_ptr;
- int m_control_msg_size;
- int m_data_msg_size;
+ static uint32_t m_control_msg_size;
+ static uint32_t m_data_msg_size;
};
inline std::ostream&
diff --git a/src/mem/ruby/network/simple/Throttle.cc b/src/mem/ruby/network/simple/Throttle.cc
index e4dc71527..653791c29 100644
--- a/src/mem/ruby/network/simple/Throttle.cc
+++ b/src/mem/ruby/network/simple/Throttle.cc
@@ -260,8 +260,7 @@ network_message_to_size(NetworkMessage* net_msg_ptr)
{
assert(net_msg_ptr != NULL);
- int size = RubySystem::getNetwork()->
- MessageSizeType_to_int(net_msg_ptr->getMessageSize());
+ int size = Network::MessageSizeType_to_int(net_msg_ptr->getMessageSize());
size *= MESSAGE_SIZE_MULTIPLIER;
// Artificially increase the size of broadcast messages