CacheMemory.hh (11087:3c4bda5a2f66) | CacheMemory.hh (11168:f98eb2da15a4) |
---|---|
1/* 2 * Copyright (c) 1999-2012 Mark D. Hill and David A. Wood 3 * Copyright (c) 2013 Advanced Micro Devices, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 */ 29 30#ifndef __MEM_RUBY_STRUCTURES_CACHEMEMORY_HH__ 31#define __MEM_RUBY_STRUCTURES_CACHEMEMORY_HH__ 32 33#include <string> | 1/* 2 * Copyright (c) 1999-2012 Mark D. Hill and David A. Wood 3 * Copyright (c) 2013 Advanced Micro Devices, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 */ 29 30#ifndef __MEM_RUBY_STRUCTURES_CACHEMEMORY_HH__ 31#define __MEM_RUBY_STRUCTURES_CACHEMEMORY_HH__ 32 33#include <string> |
34#include <unordered_map> |
|
34#include <vector> 35 | 35#include <vector> 36 |
36#include "base/hashmap.hh" | |
37#include "base/statistics.hh" 38#include "mem/protocol/CacheRequestType.hh" 39#include "mem/protocol/CacheResourceType.hh" 40#include "mem/protocol/RubyRequest.hh" 41#include "mem/ruby/common/DataBlock.hh" 42#include "mem/ruby/slicc_interface/AbstractCacheEntry.hh" 43#include "mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh" 44#include "mem/ruby/structures/AbstractReplacementPolicy.hh" --- 118 unchanged lines hidden (view full) --- 163 CacheMemory& operator=(const CacheMemory& obj); 164 165 private: 166 // Data Members (m_prefix) 167 bool m_is_instruction_only_cache; 168 169 // The first index is the # of cache lines. 170 // The second index is the the amount associativity. | 37#include "base/statistics.hh" 38#include "mem/protocol/CacheRequestType.hh" 39#include "mem/protocol/CacheResourceType.hh" 40#include "mem/protocol/RubyRequest.hh" 41#include "mem/ruby/common/DataBlock.hh" 42#include "mem/ruby/slicc_interface/AbstractCacheEntry.hh" 43#include "mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh" 44#include "mem/ruby/structures/AbstractReplacementPolicy.hh" --- 118 unchanged lines hidden (view full) --- 163 CacheMemory& operator=(const CacheMemory& obj); 164 165 private: 166 // Data Members (m_prefix) 167 bool m_is_instruction_only_cache; 168 169 // The first index is the # of cache lines. 170 // The second index is the the amount associativity. |
171 m5::hash_map<Addr, int> m_tag_index; | 171 std::unordered_map<Addr, int> m_tag_index; |
172 std::vector<std::vector<AbstractCacheEntry*> > m_cache; 173 174 AbstractReplacementPolicy *m_replacementPolicy_ptr; 175 176 BankedArray dataArray; 177 BankedArray tagArray; 178 179 int m_cache_size; 180 int m_cache_num_sets; 181 int m_cache_num_set_bits; 182 int m_cache_assoc; 183 int m_start_index_bit; 184 bool m_resource_stalls; 185}; 186 187std::ostream& operator<<(std::ostream& out, const CacheMemory& obj); 188 189#endif // __MEM_RUBY_STRUCTURES_CACHEMEMORY_HH__ | 172 std::vector<std::vector<AbstractCacheEntry*> > m_cache; 173 174 AbstractReplacementPolicy *m_replacementPolicy_ptr; 175 176 BankedArray dataArray; 177 BankedArray tagArray; 178 179 int m_cache_size; 180 int m_cache_num_sets; 181 int m_cache_num_set_bits; 182 int m_cache_assoc; 183 int m_start_index_bit; 184 bool m_resource_stalls; 185}; 186 187std::ostream& operator<<(std::ostream& out, const CacheMemory& obj); 188 189#endif // __MEM_RUBY_STRUCTURES_CACHEMEMORY_HH__ |