From 950e431d8766a8cf3b897965c1726e6d2576c6dc Mon Sep 17 00:00:00 2001 From: Joe Gross Date: Wed, 16 Sep 2015 13:10:42 -0400 Subject: 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. --- .../ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc | 12 ------------ .../ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh | 3 --- 2 files changed, 15 deletions(-) (limited to 'src/mem/ruby/network/garnet/flexible-pipeline') diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc index 83cbe8d51..bd96fc2ed 100644 --- a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc +++ b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc @@ -143,18 +143,6 @@ GarnetNetwork::makeInternalLink(SwitchID src, SwitchID dest, BasicLink* link, link->m_weight); } -void -GarnetNetwork::checkNetworkAllocation(NodeID id, bool ordered, - int network_num, std::string vnet_type) -{ - assert(id < m_nodes); - assert(network_num < m_virtual_networks); - - if (ordered) { - m_ordered[network_num] = true; - } -} - /* * Go through all the routers, network interfaces and the interconnecting * links for reading/writing all the messages. diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh index 906e7eb3a..46f62c04f 100644 --- a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh +++ b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh @@ -79,9 +79,6 @@ class GarnetNetwork : public BaseGarnetNetwork uint32_t functionalWrite(Packet *pkt); private: - void checkNetworkAllocation(NodeID id, bool ordered, int network_num, - std::string vnet_type); - GarnetNetwork(const GarnetNetwork& obj); GarnetNetwork& operator=(const GarnetNetwork& obj); -- cgit v1.2.3