diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2015-08-14 12:04:51 -0500 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2015-08-14 12:04:51 -0500 |
commit | 91a84c5b3cfb888794ac0245c066a4724b9a0871 (patch) | |
tree | 79a8b41aff56655dbd187934d2709fdd7488c6ed /src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh | |
parent | 9ea5d9cad9381e05004de28ef25309ebe94c3a79 (diff) | |
download | gem5-91a84c5b3cfb888794ac0245c066a4724b9a0871.tar.xz |
ruby: replace Address by Addr
This patch eliminates the type Address defined by the ruby memory system.
This memory system would now use the type Addr that is in use by the
rest of the system.
Diffstat (limited to 'src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh')
-rw-r--r-- | src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh b/src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh index 14d24f028..46071335e 100644 --- a/src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh +++ b/src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh @@ -38,7 +38,7 @@ // used to determine the home directory // returns a value between 0 and total_directories_within_the_system inline NodeID -map_Address_to_DirectoryNode(const Address& addr) +map_Address_to_DirectoryNode(Addr addr) { return DirectoryMemory::mapAddressToDirectoryVersion(addr); } @@ -46,7 +46,7 @@ map_Address_to_DirectoryNode(const Address& addr) // used to determine the home directory // returns a value between 0 and total_directories_within_the_system inline MachineID -map_Address_to_Directory(const Address &addr) +map_Address_to_Directory(Addr addr) { MachineID mach = {MachineType_Directory, map_Address_to_DirectoryNode(addr)}; @@ -65,14 +65,14 @@ broadcast(MachineType type) } inline MachineID -mapAddressToRange(const Address & addr, MachineType type, int low_bit, +mapAddressToRange(Addr addr, MachineType type, int low_bit, int num_bits, int cluster_id = 0) { MachineID mach = {type, 0}; if (num_bits == 0) mach.num = cluster_id; else - mach.num = addr.bitSelect(low_bit, low_bit + num_bits - 1) + mach.num = bitSelect(addr, low_bit, low_bit + num_bits - 1) + (1 << num_bits) * cluster_id; return mach; } |