ruby: Fix Topology throttle connections
Review Request #1941 - Created June 30, 2013 and submitted
| Information | |
|---|---|
| Joel Hestness | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 9803:749372538449 --------------------------- ruby: Fix Topology throttle connections The Topology source sets up input and output buffers for each of the external nodes of a topology by indexing on Ruby's generated controller unique IDs. These unique IDs are found by adding the MachineType_base_number to the version number of each controller (see any generated *_Controller.cc - init() calls getToNetQueue and getFromNetQueue using m_version + base). However, the Topology object used the cntrl_id - which is required to be unique across all controllers - to index the controllers list as they are being connected to their input and output buffers. If the cntrl_ids did not match the Ruby unique ID, the throttles end up connected to incorrectly indexed nodes in the network, resulting in packets traversing incorrect network paths. This patch fixes the Topology indexing scheme by using the Ruby unique ID to match that of the SimpleNetwork buffer vectors.
Ran all Ruby regressions and observed no stats changes. It should be noted that more complicated SimpleNetwork topologies connecting numerous components will very likely witness throttle connection changes, which can cause changes in network performance, especially with throttle bandwidth_factor of 16B/cycle. It should also be noted that this patch removes the last hard dependency on the use of cntrl_ids in all Ruby code. Based on the potential confusion between Ruby's generated unique IDs and cntrl_ids, I recommend that cntrl_ids eventually be eliminated from the codebase.
Posted (July 2, 2013, 4:17 p.m.)
Joel, I am of the view that we should eliminate ruby's internal numbering instead. The cntrl_id is something that appears in the config.ini file and hence is visible to the user. But ruby's internal numbering of controllers never gets exposed.
