summaryrefslogtreecommitdiff
path: root/src/mem/ruby/slicc_interface
diff options
context:
space:
mode:
authorDerek Hower <drh5@cs.wisc.edu>2009-08-04 23:05:37 -0500
committerDerek Hower <drh5@cs.wisc.edu>2009-08-04 23:05:37 -0500
commit7f012ef8dab812ac6dbad0ccafb8a5d22c1f3dcb (patch)
tree203f7f90177bc03b14de4681acf60287130aa6e0 /src/mem/ruby/slicc_interface
parent33b28fde7aca9bf1ae16b9db09e71ccd44d3ae76 (diff)
downloadgem5-7f012ef8dab812ac6dbad0ccafb8a5d22c1f3dcb.tar.xz
ruby: made mapAddressToRange based off a bit count
Diffstat (limited to 'src/mem/ruby/slicc_interface')
-rw-r--r--src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh b/src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh
index a6d99ada9..96405c8dd 100644
--- a/src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh
+++ b/src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh
@@ -86,10 +86,12 @@ MachineID map_Address_to_DMA(const Address & addr)
}
inline
-MachineID mapAddressToRange(const Address & addr, MachineType type, int low_bit, int high_bit)
+MachineID mapAddressToRange(const Address & addr, MachineType type, int low_bit, int num_bits)
{
MachineID mach = {type, 0};
- mach.num = addr.bitSelect(low_bit, high_bit);
+ if (num_bits == 0)
+ return mach;
+ mach.num = addr.bitSelect(low_bit, low_bit+num_bits-1);
return mach;
}