summaryrefslogtreecommitdiff
path: root/src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh
diff options
context:
space:
mode:
authorDerek Hower <drh5@cs.wisc.edu>2009-08-05 14:23:32 -0500
committerDerek Hower <drh5@cs.wisc.edu>2009-08-05 14:23:32 -0500
commitdff7c9eaa0795dc23b32608dc1e26026a5292d30 (patch)
treef5335c8359d19535c6832238dd51d528ba6c1086 /src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh
parent60d4a0f6d7328b251797b14c33fd6766b95bc1ea (diff)
parent867269bc9650e0b5b2384daf0c09fba60aa7438c (diff)
downloadgem5-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.hh10
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;