ruby: improved component mapping
Review Request #3433 - Created April 4, 2016 and updated
Information | |
---|---|
Brandon Potter | |
gem5 | |
default | |
Reviewers | |
Default | |
Changeset 11435:9b3faddc9c0b --------------------------- ruby: improved component mapping This patch aims are improving how addresses are mapped to different entities in the memory system. The main issue was having a static member function in the DirectoryMemory class and several different globally visible functions almost doing the same thing. The functions map_Address_to_DirectoryNode, map_Address_to_Directory, and broadcast() are being dropped. There is no replacement provided for broadcast(), but one should be able to use the one already available provided in the NetDest class. The functions map_Address_to_DirectoryNode and map_Address_to_Directory should be replaced with mapAddressToRange().
No objections, but a high-level question: Should the long-term play here be to use the "normal" gem5 address mapping functionality embedded in the AddrRange class? This class (along with the XBar) already has support for interleaving and hashing.
I'm really not a fan of the way we're trying to do this. To summarize, this change distributes address mapping parameters through all of the Ruby controllers, just so that they can call a global function that takes those as parameters and returns the mapping.
This leads to a few problems. First, we'll have to change all of the protocol files, and get the correct parameters to the correct controllers in config files. This will be painful for users with protocols outside of mainline, because they need to reason about how to calculate correct parameters. Second, it's a confusing way to distribute mapping parameters; they are only used in calls to mapAddressToRange, which is a global function. The fact that mapAddressToRange is global indicates that there a number of ways we could organize this, some of which would likely avoid spreading parameters throughout protocol files. Finally, this is a very fragile way to handle component mapping, so it won't be extensible. What do I do if I notice that I need more complicated parameterization of the directory mapping function? It looks like I'd have to extend the function signature for mapAddressToRange to take more parameters, and then distribute more parameters through the relevent protocol files. This sounds very disruptive.
I think we should be aiming to implement this by moving mapAddressToRange into the RubySystem. Then, we can just give each RubySystem instance the number of controllers that it needs to map, and it can configure all of the appropriate mapping functions and parameters. The existing mapping functions used in protocol files can indirectly call the RubySystem's mapping functions as appropriate, so we shouldn't need to change protocol files (or if we do, it would be a 1-time change). This also encapsulates the mapping functionality in a single location, so modifying mapping functions and parameters should be far more extensible.
-
configs/ruby/GPU_RfO.py (Diff revision 1) -
Please maintain spacing around '='. It's really hard to read something like tcc_low_bit=block_size_bits, and it's inconsistent with spacing through the rest of the file (e.g. Cluster constructors)