* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "arch/isa_traits.hh"
+#include "config/the_isa.hh"
#include "mem/ruby/common/Address.hh"
#include "mem/ruby/system/System.hh"
+ RubySystem::getBlockSizeBytes()*stride;
}
-integer_t
+Index
Address::memoryModuleIndex() const
{
- integer_t index =
+ Index index =
bitSelect(RubySystem::getBlockSizeBits() +
RubySystem::getMemorySizeBits(), ADDRESS_WIDTH);
assert (index >= 0);
return *this;
}
+void
+Address::makePageAddress()
+{
+ m_address = maskLowOrderBits(TheISA::LogVMPageSize);
+}
+
+Address
+page_address(const Address& addr)
+{
+ Address temp = addr;
+ temp.makePageAddress();
+ return temp;
+}
+
+Address
+next_stride_address(const Address& addr, int stride)
+{
+ Address temp = addr;
+ temp.makeNextStrideAddress(stride);
+ return temp;
+}