From 91a84c5b3cfb888794ac0245c066a4724b9a0871 Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Fri, 14 Aug 2015 12:04:51 -0500 Subject: ruby: replace Address by Addr This patch eliminates the type Address defined by the ruby memory system. This memory system would now use the type Addr that is in use by the rest of the system. --- src/mem/ruby/structures/PersistentTable.cc | 36 +++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'src/mem/ruby/structures/PersistentTable.cc') diff --git a/src/mem/ruby/structures/PersistentTable.cc b/src/mem/ruby/structures/PersistentTable.cc index 57b06946e..1e4e0f555 100644 --- a/src/mem/ruby/structures/PersistentTable.cc +++ b/src/mem/ruby/structures/PersistentTable.cc @@ -47,7 +47,7 @@ PersistentTable::~PersistentTable() } void -PersistentTable::persistentRequestLock(const Address& address, +PersistentTable::persistentRequestLock(Addr address, MachineID locker, AccessType type) { @@ -59,7 +59,7 @@ PersistentTable::persistentRequestLock(const Address& address, MachineID locker = (MachineID) persistent_randomize[llocker]; #endif - assert(address == line_address(address)); + assert(address == makeLineAddress(address)); static const PersistentTableEntry dflt; pair r = @@ -82,7 +82,7 @@ PersistentTable::persistentRequestLock(const Address& address, } void -PersistentTable::persistentRequestUnlock(const Address& address, +PersistentTable::persistentRequestUnlock(Addr address, MachineID unlocker) { #if 0 @@ -93,7 +93,7 @@ PersistentTable::persistentRequestUnlock(const Address& address, MachineID unlocker = (MachineID) persistent_randomize[uunlocker]; #endif - assert(address == line_address(address)); + assert(address == makeLineAddress(address)); assert(m_map.count(address)); PersistentTableEntry& entry = m_map[address]; @@ -115,10 +115,10 @@ PersistentTable::persistentRequestUnlock(const Address& address, } bool -PersistentTable::okToIssueStarving(const Address& address, +PersistentTable::okToIssueStarving(Addr address, MachineID machId) const { - assert(address == line_address(address)); + assert(address == makeLineAddress(address)); AddressMap::const_iterator i = m_map.find(address); if (i == m_map.end()) { @@ -138,9 +138,9 @@ PersistentTable::okToIssueStarving(const Address& address, } MachineID -PersistentTable::findSmallest(const Address& address) const +PersistentTable::findSmallest(Addr address) const { - assert(address == line_address(address)); + assert(address == makeLineAddress(address)); AddressMap::const_iterator i = m_map.find(address); assert(i != m_map.end()); const PersistentTableEntry& entry = i->second; @@ -148,9 +148,9 @@ PersistentTable::findSmallest(const Address& address) const } AccessType -PersistentTable::typeOfSmallest(const Address& address) const +PersistentTable::typeOfSmallest(Addr address) const { - assert(address == line_address(address)); + assert(address == makeLineAddress(address)); AddressMap::const_iterator i = m_map.find(address); assert(i != m_map.end()); const PersistentTableEntry& entry = i->second; @@ -163,9 +163,9 @@ PersistentTable::typeOfSmallest(const Address& address) const } void -PersistentTable::markEntries(const Address& address) +PersistentTable::markEntries(Addr address) { - assert(address == line_address(address)); + assert(address == makeLineAddress(address)); AddressMap::iterator i = m_map.find(address); if (i == m_map.end()) return; @@ -180,18 +180,18 @@ PersistentTable::markEntries(const Address& address) } bool -PersistentTable::isLocked(const Address& address) const +PersistentTable::isLocked(Addr address) const { - assert(address == line_address(address)); + assert(address == makeLineAddress(address)); // If an entry is present, it must be locked return m_map.count(address) > 0; } int -PersistentTable::countStarvingForAddress(const Address& address) const +PersistentTable::countStarvingForAddress(Addr address) const { - assert(address == line_address(address)); + assert(address == makeLineAddress(address)); AddressMap::const_iterator i = m_map.find(address); if (i == m_map.end()) return 0; @@ -201,9 +201,9 @@ PersistentTable::countStarvingForAddress(const Address& address) const } int -PersistentTable::countReadStarvingForAddress(const Address& address) const +PersistentTable::countReadStarvingForAddress(Addr address) const { - assert(address == line_address(address)); + assert(address == makeLineAddress(address)); AddressMap::const_iterator i = m_map.find(address); if (i == m_map.end()) return 0; -- cgit v1.2.3