From df973abef3a70074971375cfe52c46f53528c00e Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Thu, 16 Oct 2014 05:49:43 -0400 Subject: mem: Dynamically determine page bytes in memory components This patch takes a step towards an ISA-agnostic memory system by enabling the components to establish the page size after instantiation. The swap operation in the memory is now also allowing any granularity to avoid depending on the IntReg of the ISA. --- src/mem/ruby/common/Address.cc | 16 ---------------- src/mem/ruby/common/Address.hh | 2 -- 2 files changed, 18 deletions(-) (limited to 'src/mem/ruby/common') diff --git a/src/mem/ruby/common/Address.cc b/src/mem/ruby/common/Address.cc index eb234f46e..5d9fa49e5 100644 --- a/src/mem/ruby/common/Address.cc +++ b/src/mem/ruby/common/Address.cc @@ -26,8 +26,6 @@ * 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" @@ -136,20 +134,6 @@ Address::operator=(const Address& obj) return *this; } -void -Address::makePageAddress() -{ - m_address = maskLowOrderBits(TheISA::PageShift); -} - -Address -page_address(const Address& addr) -{ - Address temp = addr; - temp.makePageAddress(); - return temp; -} - Address next_stride_address(const Address& addr, int stride) { diff --git a/src/mem/ruby/common/Address.hh b/src/mem/ruby/common/Address.hh index feb8741c9..d47ff9ac5 100644 --- a/src/mem/ruby/common/Address.hh +++ b/src/mem/ruby/common/Address.hh @@ -69,7 +69,6 @@ class Address physical_address_t getLineAddress() const; physical_address_t getOffset() const; void makeLineAddress(); - void makePageAddress(); void makeNextStrideAddress(int stride); int64 memoryModuleIndex() const; @@ -201,7 +200,6 @@ Address::shiftLowOrderBits(unsigned int number) const } Address next_stride_address(const Address& addr, int stride); -Address page_address(const Address& addr); __hash_namespace_begin template <> struct hash
-- cgit v1.2.3