network: convert links & switches to first class C++ SimObjects
Review Request #653 - Created April 22, 2011 and submitted
Information | |
---|---|
Brad Beckmann | |
gem5 | |
Reviewers | |
Default | |
ali, gblack, nate, stever |
network: convert links & switches to first class C++ SimObjects This patch converts links and switches from second class simobjects that were virtually ignored by the networks (both simple and Garnet) to first class simobjects that directly correspond to c++ ojbects manipulated by the topology and network classes. This is especially true for Garnet, where the links and switches directly correspond to specific C++ objects. By making this change, many aspects of the Topology class were simplified.
Posted (April 23, 2011, 1:44 p.m.)
The main question I have about this code is, should new Ruby code adhere to the style guide instead of the old Ruby style? Eventually, we should try migrate Ruby to the style guide, no? (I'm mostly talking about variable naming here)
Posted (April 25, 2011, 2:38 a.m.)
-
src/mem/ruby/network/BasicLink.py (Diff revision 1) -
could you add a comment somewhere that the bw_multiplier field is only used by the simple network?
-
src/mem/ruby/network/BasicRouter.hh (Diff revision 1) -
typo in "relation"
-
src/mem/ruby/network/Network.py (Diff revision 1) -
Some parameters such as topology, number_of_virtual_networks etc are used by all networks. bandwidth and adaptive routing parameters are only used by simple network. Either we could move them to a SimpleNetwork.py kind of file, OR perhaps we should move the BaseGarnetNetwork.py parameters here into Network.py with appropriate comments?
-
src/mem/ruby/network/garnet/fixed-pipeline/GarnetLink_d.py (Diff revision 1) -
I have been thinking of renaming vcs_per_class to vcs_per_vnet for sometime now, to make it consistent with "virtual networks" (instead of message class). But that would need a change in BaseGarnetNetwork.py/hh/cc too? If it is difficult for you to do, I can do that in a subsequent patch.
-
src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc (Diff revision 1) -
Why is "direction" needed in all the links? Don't the src/dest appropriately set up the producers and consumers for the link? Is "direction" being used for stats? To be consistent, the direction of a credit link will be opposite to the direction of the corresponding network link.
Posted (April 25, 2011, 7:20 a.m.)
Hi Brad, the updated patch hasn't applied cleanly and so the diff is not visible. - Tushar
Looks good to me Brad. I presume you already did extensive testing with Network_test and other protocols. Unless anyone has concerns, you can push it in. I'll wait for your patch that updates the bw parameters for both networks.