diff options
author | Derek Hower <drh5@cs.wisc.edu> | 2009-08-05 14:23:32 -0500 |
---|---|---|
committer | Derek Hower <drh5@cs.wisc.edu> | 2009-08-05 14:23:32 -0500 |
commit | dff7c9eaa0795dc23b32608dc1e26026a5292d30 (patch) | |
tree | f5335c8359d19535c6832238dd51d528ba6c1086 /src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh | |
parent | 60d4a0f6d7328b251797b14c33fd6766b95bc1ea (diff) | |
parent | 867269bc9650e0b5b2384daf0c09fba60aa7438c (diff) | |
download | gem5-dff7c9eaa0795dc23b32608dc1e26026a5292d30.tar.xz |
merge
Diffstat (limited to 'src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh')
-rw-r--r-- | src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh b/src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh index cd3cdbe48..96405c8dd 100644 --- a/src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh +++ b/src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh @@ -85,6 +85,16 @@ MachineID map_Address_to_DMA(const Address & addr) return dma; } +inline +MachineID mapAddressToRange(const Address & addr, MachineType type, int low_bit, int num_bits) +{ + MachineID mach = {type, 0}; + if (num_bits == 0) + return mach; + mach.num = addr.bitSelect(low_bit, low_bit+num_bits-1); + return mach; +} + extern inline NodeID machineIDToNodeID(MachineID machID) { return machID.num; |