summaryrefslogtreecommitdiff
path: root/src/mem/ruby/network/Network.cc
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2010-03-31 16:56:45 -0700
committerNathan Binkert <nate@binkert.org>2010-03-31 16:56:45 -0700
commitbe10204729c107b41d5d7487323c732e9fa09df5 (patch)
tree5c8f4001c490c4d777e8756e536cd2f2340c9ebb /src/mem/ruby/network/Network.cc
parent60ae1d2b10002bb73b420fce91c4b74397c55457 (diff)
downloadgem5-be10204729c107b41d5d7487323c732e9fa09df5.tar.xz
style: another ruby style pass
Diffstat (limited to 'src/mem/ruby/network/Network.cc')
-rw-r--r--src/mem/ruby/network/Network.cc74
1 files changed, 38 insertions, 36 deletions
diff --git a/src/mem/ruby/network/Network.cc b/src/mem/ruby/network/Network.cc
index 380f7412d..89b9168b6 100644
--- a/src/mem/ruby/network/Network.cc
+++ b/src/mem/ruby/network/Network.cc
@@ -41,55 +41,57 @@ Network::Network(const Params *p)
m_link_latency = p->link_latency;
m_control_msg_size = p->control_msg_size;
- //
// Total nodes/controllers in network
// Must make sure this is called after the State Machine constructors
- //
- m_nodes = MachineType_base_number(MachineType_NUM);
+ m_nodes = MachineType_base_number(MachineType_NUM);
assert(m_nodes != 0);
assert(m_virtual_networks != 0);
assert(m_topology_ptr != NULL);
- //
// Initialize the controller's network pointers
- //
m_topology_ptr->initNetworkPtr(this);
}
-void Network::init()
+void
+Network::init()
{
- m_data_msg_size = RubySystem::getBlockSizeBytes() + m_control_msg_size;
+ m_data_msg_size = RubySystem::getBlockSizeBytes() + m_control_msg_size;
}
-int Network::MessageSizeType_to_int(MessageSizeType size_type)
+int
+Network::MessageSizeType_to_int(MessageSizeType size_type)
{
- switch(size_type) {
- case MessageSizeType_Undefined:
- ERROR_MSG("Can't convert Undefined MessageSizeType to integer");
- break;
- case MessageSizeType_Control:
- case MessageSizeType_Request_Control:
- case MessageSizeType_Reissue_Control:
- case MessageSizeType_Response_Control:
- case MessageSizeType_Writeback_Control:
- case MessageSizeType_Forwarded_Control:
- case MessageSizeType_Invalidate_Control:
- case MessageSizeType_Unblock_Control:
- case MessageSizeType_Persistent_Control:
- case MessageSizeType_Completion_Control:
- return m_control_msg_size;
- break;
- case MessageSizeType_Data:
- case MessageSizeType_Response_Data:
- case MessageSizeType_ResponseLocal_Data:
- case MessageSizeType_ResponseL2hit_Data:
- case MessageSizeType_Writeback_Data:
- return m_data_msg_size;
- break;
- default:
- ERROR_MSG("Invalid range for type MessageSizeType");
- break;
- }
- return 0;
+ switch(size_type) {
+ case MessageSizeType_Undefined:
+ ERROR_MSG("Can't convert Undefined MessageSizeType to integer");
+ break;
+ case MessageSizeType_Control:
+ case MessageSizeType_Request_Control:
+ case MessageSizeType_Reissue_Control:
+ case MessageSizeType_Response_Control:
+ case MessageSizeType_Writeback_Control:
+ case MessageSizeType_Forwarded_Control:
+ case MessageSizeType_Invalidate_Control:
+ case MessageSizeType_Unblock_Control:
+ case MessageSizeType_Persistent_Control:
+ case MessageSizeType_Completion_Control:
+ return m_control_msg_size;
+ case MessageSizeType_Data:
+ case MessageSizeType_Response_Data:
+ case MessageSizeType_ResponseLocal_Data:
+ case MessageSizeType_ResponseL2hit_Data:
+ case MessageSizeType_Writeback_Data:
+ return m_data_msg_size;
+ default:
+ ERROR_MSG("Invalid range for type MessageSizeType");
+ break;
+ }
+ return 0;
+}
+
+const Vector<Throttle*>*
+Network::getThrottles(NodeID id) const
+{
+ return NULL;
}