diff options
author | Brad Beckmann <Brad.Beckmann@amd.com> | 2009-08-11 12:22:41 -0700 |
---|---|---|
committer | Brad Beckmann <Brad.Beckmann@amd.com> | 2009-08-11 12:22:41 -0700 |
commit | b89add1e3f0807219320b8f00f918876921a68ab (patch) | |
tree | d7594f387b55768e07e261b96ac7cd9aad0a1c2b /src/mem/ruby/network/Network.hh | |
parent | 1c3efb48ad6658bb9c92682ab8bac12fd69b8a9f (diff) | |
parent | b952eb19c18bffcd4519bac19f79979fab477ff6 (diff) | |
download | gem5-b89add1e3f0807219320b8f00f918876921a68ab.tar.xz |
merged Tushar's bug fix with public repository changes
Diffstat (limited to 'src/mem/ruby/network/Network.hh')
-rw-r--r-- | src/mem/ruby/network/Network.hh | 41 |
1 files changed, 4 insertions, 37 deletions
diff --git a/src/mem/ruby/network/Network.hh b/src/mem/ruby/network/Network.hh index 17fbaab22..e7c86b6b2 100644 --- a/src/mem/ruby/network/Network.hh +++ b/src/mem/ruby/network/Network.hh @@ -71,6 +71,8 @@ public: int getEndpointBandwidth() { return m_endpoint_bandwidth; } bool getAdaptiveRouting() {return m_adaptive_routing; } int getLinkLatency() { return m_link_latency; } + int MessageSizeType_to_int(MessageSizeType size_type); + // returns the queue requested for the given component virtual MessageBuffer* getToNetQueue(NodeID id, bool ordered, int netNumber) = 0; @@ -107,6 +109,8 @@ protected: Topology* m_topology_ptr; bool m_adaptive_routing; int m_link_latency; + int m_control_msg_size; + int m_data_msg_size; }; // Output operator declaration @@ -123,41 +127,4 @@ ostream& operator<<(ostream& out, const Network& obj) return out; } -// Code to map network message size types to an integer number of bytes -const int CONTROL_MESSAGE_SIZE = 8; -const int DATA_MESSAGE_SIZE = (RubySystem::getBlockSizeBytes()+8); - -extern inline -int 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 CONTROL_MESSAGE_SIZE; - break; - case MessageSizeType_Data: - case MessageSizeType_Response_Data: - case MessageSizeType_ResponseLocal_Data: - case MessageSizeType_ResponseL2hit_Data: - case MessageSizeType_Writeback_Data: - return DATA_MESSAGE_SIZE; - break; - default: - ERROR_MSG("Invalid range for type MessageSizeType"); - break; - } - return 0; -} - #endif //NETWORK_H |