41 #ifndef __MEM_RUBY_STRUCTURES_TBETABLE_HH__
42 #define __MEM_RUBY_STRUCTURES_TBETABLE_HH__
45 #include <unordered_map>
71 void print(std::ostream& out)
const;
79 std::unordered_map<Addr, ENTRY>
m_map;
99 assert(m_map.size() <= m_number_of_TBEs);
100 return !!m_map.count(address);
103 template<
class ENTRY>
107 assert(!isPresent(address));
108 assert(m_map.size() < m_number_of_TBEs);
109 m_map[address] = ENTRY();
112 template<
class ENTRY>
116 assert(isPresent(address));
117 assert(m_map.size() > 0);
118 m_map.erase(address);
121 template<
class ENTRY>
129 template<
class ENTRY>
133 if (m_map.find(address) != m_map.end())
return &(m_map.find(address)->second);
138 template<
class ENTRY>
144 #endif // __MEM_RUBY_STRUCTURES_TBETABLE_HH__