summaryrefslogtreecommitdiff
path: root/src/mem/ruby/network/Network.hh
diff options
context:
space:
mode:
authorJoe Gross <joe.gross@amd.com>2015-09-16 13:10:42 -0400
committerJoe Gross <joe.gross@amd.com>2015-09-16 13:10:42 -0400
commit950e431d8766a8cf3b897965c1726e6d2576c6dc (patch)
tree9fdb60b695b97e276aaec84ed4024a943ddd851e /src/mem/ruby/network/Network.hh
parentc5058c0c007532c4c2dda5f8e24a92cccc010508 (diff)
downloadgem5-950e431d8766a8cf3b897965c1726e6d2576c6dc.tar.xz
ruby: fix message buffer init order
The recent changes to make MessageBuffers SimObjects required them to be initialized in a particular order, which could break some protocols. Fix this by calling initNetQueues on the external nodes of each external link in the constructor of Network. This patch also refactors the duplicated code for checking network allocation and setting net queues (which are called by initNetQueues) from the simple and garnet networks to be in Network.
Diffstat (limited to 'src/mem/ruby/network/Network.hh')
-rw-r--r--src/mem/ruby/network/Network.hh10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mem/ruby/network/Network.hh b/src/mem/ruby/network/Network.hh
index 26221521f..c06ee5a1a 100644
--- a/src/mem/ruby/network/Network.hh
+++ b/src/mem/ruby/network/Network.hh
@@ -72,10 +72,13 @@ class Network : public ClockedObject
static uint32_t MessageSizeType_to_int(MessageSizeType size_type);
// returns the queue requested for the given component
- virtual void setToNetQueue(NodeID id, bool ordered, int netNumber,
- std::string vnet_type, MessageBuffer *b) = 0;
+ void setToNetQueue(NodeID id, bool ordered, int netNumber,
+ std::string vnet_type, MessageBuffer *b);
virtual void setFromNetQueue(NodeID id, bool ordered, int netNumber,
- std::string vnet_type, MessageBuffer *b) = 0;
+ std::string vnet_type, MessageBuffer *b);
+
+ virtual void checkNetworkAllocation(NodeID id, bool ordered,
+ int network_num, std::string vnet_type);
virtual void makeOutLink(SwitchID src, NodeID dest, BasicLink* link,
LinkDirection direction,
@@ -107,6 +110,7 @@ class Network : public ClockedObject
uint32_t m_nodes;
static uint32_t m_virtual_networks;
+ std::vector<std::string> m_vnet_type_names;
Topology* m_topology_ptr;
static uint32_t m_control_msg_size;
static uint32_t m_data_msg_size;