diff options
author | Joe Gross <joe.gross@amd.com> | 2015-09-16 13:10:42 -0400 |
---|---|---|
committer | Joe Gross <joe.gross@amd.com> | 2015-09-16 13:10:42 -0400 |
commit | 950e431d8766a8cf3b897965c1726e6d2576c6dc (patch) | |
tree | 9fdb60b695b97e276aaec84ed4024a943ddd851e /src/mem/ruby/network/simple/SimpleNetwork.hh | |
parent | c5058c0c007532c4c2dda5f8e24a92cccc010508 (diff) | |
download | gem5-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/simple/SimpleNetwork.hh')
-rw-r--r-- | src/mem/ruby/network/simple/SimpleNetwork.hh | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/mem/ruby/network/simple/SimpleNetwork.hh b/src/mem/ruby/network/simple/SimpleNetwork.hh index 2d9b48dea..c5e56b1ec 100644 --- a/src/mem/ruby/network/simple/SimpleNetwork.hh +++ b/src/mem/ruby/network/simple/SimpleNetwork.hh @@ -56,23 +56,17 @@ class SimpleNetwork : public Network void collateStats(); void regStats(); - // sets the queue requested - void setToNetQueue(NodeID id, bool ordered, int network_num, - std::string vnet_type, MessageBuffer *b); - void setFromNetQueue(NodeID id, bool ordered, int network_num, - std::string vnet_type, MessageBuffer *b); - bool isVNetOrdered(int vnet) const { return m_ordered[vnet]; } // Methods used by Topology to setup the network - void makeOutLink(SwitchID src, NodeID dest, BasicLink* link, - LinkDirection direction, + void makeOutLink(SwitchID src, NodeID dest, BasicLink* link, + LinkDirection direction, const NetDest& routing_table_entry); void makeInLink(NodeID src, SwitchID dest, BasicLink* link, - LinkDirection direction, + LinkDirection direction, const NetDest& routing_table_entry); void makeInternalLink(SwitchID src, SwitchID dest, BasicLink* link, - LinkDirection direction, + LinkDirection direction, const NetDest& routing_table_entry); void print(std::ostream& out) const; @@ -81,7 +75,6 @@ class SimpleNetwork : public Network uint32_t functionalWrite(Packet *pkt); private: - void checkNetworkAllocation(NodeID id, bool ordered, int network_num); void addLink(SwitchID src, SwitchID dest, int link_latency); void makeLink(SwitchID src, SwitchID dest, const NetDest& routing_table_entry, int link_latency); @@ -98,7 +91,7 @@ class SimpleNetwork : public Network int m_buffer_size; int m_endpoint_bandwidth; - bool m_adaptive_routing; + bool m_adaptive_routing; //Statistical variables Stats::Formula m_msg_counts[MessageSizeType_NUM]; |