PerfectCacheMemory.hh (11025:4872dbdea907) | PerfectCacheMemory.hh (11168:f98eb2da15a4) |
---|---|
1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 15 unchanged lines hidden (view full) --- 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#ifndef __MEM_RUBY_STRUCTURES_PERFECTCACHEMEMORY_HH__ 30#define __MEM_RUBY_STRUCTURES_PERFECTCACHEMEMORY_HH__ 31 | 1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 15 unchanged lines hidden (view full) --- 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#ifndef __MEM_RUBY_STRUCTURES_PERFECTCACHEMEMORY_HH__ 30#define __MEM_RUBY_STRUCTURES_PERFECTCACHEMEMORY_HH__ 31 |
32#include "base/hashmap.hh" | 32#include <unordered_map> 33 |
33#include "mem/protocol/AccessPermission.hh" 34#include "mem/ruby/common/Address.hh" 35 36template<class ENTRY> 37struct PerfectCacheLineState 38{ 39 PerfectCacheLineState() { m_permission = AccessPermission_NUM; } 40 AccessPermission m_permission; --- 41 unchanged lines hidden (view full) --- 82 void print(std::ostream& out) const; 83 84 private: 85 // Private copy constructor and assignment operator 86 PerfectCacheMemory(const PerfectCacheMemory& obj); 87 PerfectCacheMemory& operator=(const PerfectCacheMemory& obj); 88 89 // Data Members (m_prefix) | 34#include "mem/protocol/AccessPermission.hh" 35#include "mem/ruby/common/Address.hh" 36 37template<class ENTRY> 38struct PerfectCacheLineState 39{ 40 PerfectCacheLineState() { m_permission = AccessPermission_NUM; } 41 AccessPermission m_permission; --- 41 unchanged lines hidden (view full) --- 83 void print(std::ostream& out) const; 84 85 private: 86 // Private copy constructor and assignment operator 87 PerfectCacheMemory(const PerfectCacheMemory& obj); 88 PerfectCacheMemory& operator=(const PerfectCacheMemory& obj); 89 90 // Data Members (m_prefix) |
90 m5::hash_map<Addr, PerfectCacheLineState<ENTRY> > m_map; | 91 std::unordered_map<Addr, PerfectCacheLineState<ENTRY> > m_map; |
91}; 92 93template<class ENTRY> 94inline std::ostream& 95operator<<(std::ostream& out, const PerfectCacheMemory<ENTRY>& obj) 96{ 97 obj.print(out); 98 out << std::flush; --- 93 unchanged lines hidden --- | 92}; 93 94template<class ENTRY> 95inline std::ostream& 96operator<<(std::ostream& out, const PerfectCacheMemory<ENTRY>& obj) 97{ 98 obj.print(out); 99 out << std::flush; --- 93 unchanged lines hidden --- |