ruby: fix message buffer init order
authorJoe Gross <joe.gross@amd.com>
Wed, 16 Sep 2015 17:10:42 +0000 (13:10 -0400)
committerJoe Gross <joe.gross@amd.com>
Wed, 16 Sep 2015 17:10:42 +0000 (13:10 -0400)
commit950e431d8766a8cf3b897965c1726e6d2576c6dc
tree9fdb60b695b97e276aaec84ed4024a943ddd851e
parentc5058c0c007532c4c2dda5f8e24a92cccc010508
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.
src/mem/ruby/network/Network.cc
src/mem/ruby/network/Network.hh
src/mem/ruby/network/garnet/BaseGarnetNetwork.cc
src/mem/ruby/network/garnet/BaseGarnetNetwork.hh
src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh
src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc
src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh
src/mem/ruby/network/simple/SimpleNetwork.cc
src/mem/ruby/network/simple/SimpleNetwork.hh
src/mem/slicc/symbols/StateMachine.py