41 #ifndef __MEM_RUBY_STRUCTURES_TBETABLE_HH__
42 #define __MEM_RUBY_STRUCTURES_TBETABLE_HH__
45 #include <unordered_map>
77 void print(std::ostream& out)
const;
85 std::unordered_map<Addr, ENTRY>
m_map;
100 template<
class ENTRY>
105 assert(m_map.size() <= m_number_of_TBEs);
106 return !!m_map.count(address);
109 template<
class ENTRY>
113 assert(!isPresent(address));
114 assert(m_map.size() < m_number_of_TBEs);
115 m_map[address] = ENTRY();
118 template<
class ENTRY>
122 assert(isPresent(address));
123 assert(m_map.size() > 0);
124 m_map.erase(address);
127 template<
class ENTRY>
135 template<
class ENTRY>
139 if (m_map.find(address) != m_map.end())
return &(m_map.find(address)->second);
144 template<
class ENTRY>
153 #endif // __MEM_RUBY_STRUCTURES_TBETABLE_HH__